{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js","webpack:///(webpack)/buildin/module.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js","webpack:///./node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js","webpack:///./node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js","webpack:///./app/javascript/packs/application.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","_typeof","iterator","obj","constructor","this","Rails","linkClickSelector","buttonClickSelector","selector","exclude","inputChangeSelector","formSubmitSelector","formInputClickSelector","formDisableSelector","formEnableSelector","fileInputSelector","linkDisableSelector","buttonDisableSelector","nonce","loadCSPNonce","ref","querySelector","content","cspNonce","Element","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","element","getData","setData","$","Array","querySelectorAll","csrfParam","csrfToken","meta","CSRFProtection","xhr","token","setRequestHeader","refreshCSRFTokens","param","forEach","input","CustomEvent","fire","preventDefault","params","evt","createEvent","initCustomEvent","bubbles","cancelable","detail","Event","result","defaultPrevented","dispatchEvent","stopEverything","stopPropagation","stopImmediatePropagation","delegate","eventType","handler","addEventListener","parentNode","AcceptHeaders","createXHR","prepareOptions","processResponse","text","html","xml","json","ajax","options","response","responseText","getResponseHeader","Math","floor","status","success","statusText","complete","beforeSend","readyState","XMLHttpRequest","OPENED","send","url","location","href","toUpperCase","indexOf","dataType","accept","done","open","crossDomain","withCredentials","onreadystatechange","DONE","parser","match","JSON","parse","removeChild","DOMParser","replace","parseFromString","isCrossDomain","originAnchor","urlAnchor","protocol","host","toArray","serializeElement","additionalParam","inputs","elements","disabled","option","selected","checked","map","encodeURIComponent","join","formElements","form","filter","el","allowAction","handleConfirm","confirm","answer","callback","getAttribute","disableFormElement","disableFormElements","disableLinkElement","enableFormElement","enableFormElements","enableLinkElement","isXhrRedirect","handleDisabledElement","enableElement","disableElement","replacement","innerHTML","originalText","removeEventListener","handleMethod","formContent","link","method","action","style","display","body","click","isRemote","handleRemote","button","enctype","FormData","append","args","arguments","formSubmitButtonClick","formNoValidate","preventInsignificantClick","insignificantMetaClick","metaKey","ctrlKey","jQuery","rails","ajaxPrefilter","originalOptions","start","_rails_loaded","webpackPolyfill","deprecate","paths","children","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","define","configurable","writable","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","GenStateSuspendedStart","arg","GenStateExecuting","GenStateCompleted","doneResult","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","GenStateSuspendedYield","makeInvokeMethod","fn","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","invoke","__await","then","unwrapped","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","async","iter","keys","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","_templateObject","_templateObject2","_get","receiver","Reflect","base","_getPrototypeOf","_superPropBase","desc","getOwnPropertyDescriptor","_defineProperty","_taggedTemplateLiteral","strings","raw","freeze","defineProperties","_createForOfIteratorHelper","allowArrayLike","it","isArray","_unsupportedIterableToArray","F","_e2","f","normalCompletion","didErr","step","_e3","return","_slicedToArray","arr","_arrayWithHoles","_i","_s","_e","_arr","_n","_d","_iterableToArrayLimit","_nonIterableRest","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","apply","_toConsumableArray","_arrayLikeToArray","_arrayWithoutHoles","from","_iterableToArray","_nonIterableSpread","minLen","toString","test","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","_inherits","subClass","superClass","_setPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Super","NewTarget","construct","_possibleConstructorReturn","_assertThisInitialized","ReferenceError","_wrapNativeSuper","Class","_cache","Map","has","set","Wrapper","_construct","Parent","a","sham","Proxy","Boolean","valueOf","customElements","polyfillWrapFlushCallback","BuiltInHTMLElement","HTMLElement","wrapperForTheName","FrameLoadingStyle","submittersByForm","WeakMap","clickCaptured","candidate","submitter","Node","parentElement","closest","navigator","vendor","SubmitEvent","HTMLFormElement","FrameElement","_HTMLElement","_super","_this","loaded","delegateConstructor","connect","disconnect","loadingStyleChanged","sourceURLChanged","disabledChanged","removeAttribute","toLowerCase","lazy","eager","frameLoadingStyleFromString","hasAttribute","isLoading","ownerDocument","isPreview","_a","_b","documentElement","expandURL","locatable","URL","baseURI","getAnchor","anchorMatch","hash","getExtension","pathname","split","getPathComponents","getLastPathComponent","isPrefixedBy","baseURL","prefix","origin","endsWith","getPrefix","startsWith","getRequestURL","anchor","toCacheKey","FetchMethod","FetchResponse","ok","succeeded","statusCode","redirected","contentType","header","clone","isHTML","headers","dispatch","eventName","_ref","isConnected","nextAnimationFrame","requestAnimationFrame","parseHTMLDocument","unindent","_len","_key","lines","interpolate","indent","line","reduce","string","uuid","_","random","FetchRequest","URLSearchParams","abortController","AbortController","resolveRequestPromise","defaultHeaders","isIdempotent","mergeFormDataEntries","entries","_allowRequestToBeIntercepted","_receive","_perform","searchParams","abort","_callee","fetchOptions","_context","prepareHeadersForRequest","allowRequestToBeIntercepted","requestStarted","fetch","receive","t0","requestErrored","requestFinished","_callee2","fetchResponse","_context2","requestPreventedHandlingResponse","requestSucceededWithResponse","requestFailedWithResponse","_x","credentials","redirect","signal","abortSignal","referrer","_callee3","requestInterception","_this2","_context3","resume","_x2","_step","currentSearchParams","search","_iterator","_ref3","File","delete","FormSubmissionState","FormEnctype","AppearanceObserver","_this3","started","intersect","lastEntry","isIntersecting","elementAppearedInViewport","intersectionObserver","IntersectionObserver","observe","unobserve","StreamMessage","templateElement","_step2","fragment","createDocumentFragment","_iterator2","foreignElements","importNode","templateChildren","streamElements","child","tagName","concat","FormSubmission","formElement","mustRedirect","initialized","formData","buildFormData","fetchRequest","_start","post","put","patch","fetchMethodFromString","formElementAction","urlEncoded","stringFormData","encoding","multipart","plain","formEnctypeFromString","_ref5","_ref6","_callee4","_FormSubmissionState","requesting","_context4","perform","_FormSubmissionState2","stopping","stopped","cancel","cookieName","cookie","find","decodeURIComponent","getCookieValue","getMetaContent","waiting","formSubmission","formSubmissionStarted","clientError","serverError","formSubmissionFailedWithResponse","requestMustRedirect","responseSucceededWithoutRedirect","formSubmissionErrored","receiving","formSubmissionSucceededWithResponse","assign","formSubmissionFinished","Snapshot","getElementForAnchor","id","snapshot","_step3","permanentElementMap","_iterator3","permanentElements","currentPermanentElement","newPermanentElement","getPermanentElementById","FormInterceptor","_this4","submitBubbled","shouldInterceptFormSubmission","formSubmissionIntercepted","View","resolveRenderPromise","resolveInterceptionPromise","_renderSnapshot","_render","scrollToElement","focusElement","scrollToPosition","x","y","scrollToAnchor","scrollIntoView","focus","_ref7","scrollRoot","scrollTo","_callee5","renderer","shouldRender","renderInterception","_this5","_context5","newSnapshot","renderPromise","prepareToRenderSnapshot","allowsImmediateRender","renderSnapshot","viewRenderedSnapshot","finishRenderingSnapshot","invalidate","_x3","viewInvalidated","markAsPreview","prepareToRender","_callee6","_context6","render","_x4","finishRendering","FrameView","_View","_super2","LinkInterceptor","_this6","clickBubbled","respondsToEventTarget","clickEvent","linkClicked","shouldInterceptLinkClick","linkClickIntercepted","willVisit","Bardo","replaceNewPermanentElementWithPlaceholder","replaceCurrentPermanentElementWithClone","replacePlaceholderWithPermanentElement","permanentElement","placeholder","createPlaceholderForPermanentElement","replaceWith","cloneNode","getPlaceholderById","placeholders","bardo","enter","leave","Renderer","currentSnapshot","_this7","resolvingFunctions","createdScriptElement","textContent","destinationElement","sourceElement","_i2","_arr2","attributes","_ref9","copyElementAttributes","preservingPermanentElements","connectedSnapshot","firstAutofocusableElement","elementIsFocusable","getPermanentElementMapForSnapshot","_Renderer","FrameRenderer","_render2","_super3","_callee7","_this8","_context7","loadFrameElement","scrollFrameIntoView","focusFirstAutofocusableElement","activateScriptElements","destinationRange","createRange","selectNodeContents","currentElement","deleteContents","frameElement","newElement","sourceRange","extractContents","autoscroll","firstElementChild","block","defaultValue","_step4","_iterator4","newScriptElements","inertScriptElement","activatedScriptElement","createScriptElement","ProgressBar","_this9","hiding","visible","trickle","setValue","stylesheetElement","createStylesheetElement","progressElement","createProgressElement","installStylesheetElement","installProgressElement","startTrickling","_this10","fadeProgressElement","uninstallProgressElement","stopTrickling","refresh","insertBefore","firstChild","width","opacity","animationDuration","trickleInterval","setInterval","clearInterval","_this11","defaultCSS","className","HeadSnapshot","_Snapshot","_super4","_this12","detailsByOuterHTML","elementIsNoscript","elementWithoutNonce","outerHTML","details","elementType","tracked","elementIsTracked","_this13","getElementsMatchingTypeNotInSnapshot","matchedType","_this14","_ref10","_ref11","_this15","_this15$detailsByOute","findMetaElementByName","_this16","elementIsMetaElementWithName","elementIsScript","elementIsStylesheet","TimingMetric","VisitState","PageSnapshot","_Snapshot2","_super5","headSnapshot","_this17","getSetting","cacheControlValue","getMetaValue","fromDocument","_ref12","SystemStatusCode","defaultOptions","historyChanged","Visit","restorationIdentifier","identifier","timingMetrics","followedRedirect","scrolled","snapshotCached","_Object$assign2","snapshotHTML","isSamePage","locationWithActionIsSamePage","_render3","_requestFailedWithResponse","_requestSucceededWithResponse","adapter","view","history","getRestorationDataForIdentifier","recordTimingMetric","visitStart","visitStarted","cancelRender","canceled","visitEnd","completed","visitCompleted","followRedirect","failed","visitFailed","actionForHistory","getHistoryMethodForAction","update","hasPreloadedResponse","simulateRequest","shouldIssueRequest","startRequest","recordResponse","finishRequest","requestStart","visitRequestStarted","isSuccessful","visitRequestCompleted","visitRequestFailedWithStatusCode","requestEnd","visitRequestFinished","_this18","_this$response","responseHTML","_callee8","_context8","cacheSnapshot","renderPage","fromHTMLString","visitRendered","renderError","fail","getCachedSnapshotForLocation","getPreloadedSnapshot","hasAnchor","isPreviewable","getCachedSnapshot","_this19","_callee9","_context9","redirectedToLocation","visitProposedToLocation","_this20","_callee10","_context10","_callee11","_context11","contentTypeMismatch","_x5","_x6","_callee12","_context12","_x7","_x8","networkFailure","scrollToRestoredPosition","scrollToTop","visitScrolledToSamePageLocation","lastRenderedLocation","scrollPosition","restorationData","metric","Date","getTime","replaceState","pushState","hasCachedSnapshot","_callee13","_this21","_context13","frame","performScroll","_x9","cancelAnimationFrame","BrowserAdapter","session","_this22","progressBar","showProgressBar","show","startVisit","visit","issueRequest","changeHistory","goToSamePageAnchor","loadCachedSnapshot","showVisitProgressBarAfterDelay","loadResponse","timeoutFailure","reload","hideVisitProgressBar","showFormProgressBarAfterDelay","hideFormProgressBar","visitProgressBarTimeout","progressBarDelay","hide","formProgressBarTimeout","CacheObserver","removeStaleElements","_step5","_iterator5","remove","FormSubmitObserver","_this23","submitCaptured","willSubmitForm","formSubmitted","FrameRedirector","linkInterceptor","formInterceptor","shouldRedirect","findFrameElement","History","_this24","pageLoaded","onPopState","shouldHandlePopState","turbo","historyPoppedToLocationWithRestorationIdentifier","onPageLoad","_ref17","_callee14","_context14","_x10","additionalData","previousScrollRestoration","scrollRestoration","pageIsLoaded","LinkClickObserver","_this25","clickEventIsSignificant","composedPath","findLinkFromClickTarget","_location","getLocationForLink","willFollowLinkToLocation","followedLinkToLocation","isContentEditable","which","altKey","shiftKey","isAction","PageStage","Navigator","_formSubmissionFailedWithResponse","_formSubmissionSucceededWithResponse","allowsVisitingLocationWithAction","currentVisit","proposeVisit","getActionForFormSubmission","_callee15","visitOptions","_context15","clearSnapshotCache","_x11","_x12","_callee16","_context16","_x13","_x14","currentAnchor","isRestorationToTop","oldURL","newURL","PageObserver","_this26","stage","initial","interpretReadyState","pageIsInteractive","pageIsComplete","pageWillUnload","loading","interactive","pageBecameInteractive","ScrollObserver","_this27","onScroll","updatePosition","pageXOffset","pageYOffset","position","scrollPositionChanged","StreamObserver","_this28","sources","Set","inspectFetchResponse","fetchResponseFromEvent","fetchResponseIsStream","receiveMessageResponse","receiveMessageEvent","receiveMessageHTML","_receiveMessageResponse","source","streamSourceIsConnected","add","_callee17","_context17","_x15","receivedMessageFromStream","_Renderer2","ErrorRenderer","_render4","_super6","_callee18","_context18","replaceHeadAndBody","_document","replaceChild","newHead","_step6","_iterator6","scriptElements","replaceableElement","_Renderer3","PageRenderer","_render5","_super7","isVisitable","trackedElementsAreIdentical","mergeHead","_callee19","_context19","replaceBody","copyNewHeadStylesheetElements","copyNewHeadScriptElements","removeCurrentHeadProvisionalElements","copyNewHeadProvisionalElements","_this29","activateNewBody","assignNewBody","currentHeadSnapshot","trackedElementSignature","newHeadSnapshot","_step7","_iterator7","newHeadStylesheetElements","_step8","_iterator8","newHeadScriptElements","_step9","_iterator9","currentHeadProvisionalElements","_step10","_iterator10","newHeadProvisionalElements","adoptNode","activateNewBodyScriptElements","_step11","_iterator11","newBodyScriptElements","HTMLBodyElement","getStylesheetElementsNotInSnapshot","getScriptElementsNotInSnapshot","provisionalElements","SnapshotCache","size","snapshots","read","touch","write","index","splice","unshift","trim","_step12","_iterator12","_View2","PageView","_cacheSnapshot","_super8","_this30","snapshotCache","clear","_callee20","_location2","_context20","shouldCacheSnapshot","viewWillCacheSnapshot","fromElement","isCacheable","Session","pageObserver","cacheObserver","linkClickObserver","formSubmitObserver","scrollObserver","streamObserver","frameRedirector","drive","enabled","connectStreamSource","disconnectStreamSource","delay","pageInvalidated","updateRestorationData","elementDriveEnabled","locationIsVisitable","applicationAllowsFollowingLinkToLocation","getActionForLink","convertLinkWithMethodClickToFormSubmission","linkMethod","hidden","applicationAllowsVisitingLocation","extendURLWithDeprecatedProperties","silent","notifyApplicationAfterVisitingLocation","notifyApplicationAfterPageLoad","getTimingMetrics","notifyApplicationAfterVisitingSamePageLocation","submitForm","assumeControlOfScrollRestoration","relinquishControlOfScrollRestoration","renderStreamMessage","notifyApplicationBeforeCachingSnapshot","_ref18","notifyApplicationBeforeRender","notifyApplicationAfterRender","notifyApplicationAfterFrameLoad","notifyApplicationAfterFrameRender","notifyApplicationAfterClickingLinkToLocation","notifyApplicationBeforeVisitingLocation","newBody","timing","HashChangeEvent","container","rootLocation","deprecatedLocationPropertyDescriptors","absoluteURL","navigator$1","Turbo","registerAdapter","clearCache","setProgressBarDelay","FrameController","resolveVisitPromise","connected","hasBeenLoaded","settingSourceURL","appearanceObserver","_extractForeignFrameElement","_visit","_requestSucceededWithResponse2","_loadResponse","_loadSourceURL","reloadable","loadingStyle","loadSourceURL","_callee21","previousURL","_context21","isActive","sourceURL","currentURL","frameLoaded","_callee22","_parseHTMLDocument","_context22","extractForeignFrameElement","t1","frameRendered","t2","_x16","shouldInterceptNavigation","navigateFrame","_callee23","_context23","_x17","_x18","_callee24","_this31","_context24","_x19","getFrameElementById","_callee25","_context25","CSS","escape","activateElement","_x20","getElementById","right","connectedCallback","consumer","StreamActions","after","_this32","targetElements","templateContent","nextSibling","_this33","removeDuplicateTargetChildren","before","_this34","prepend","_this35","_this36","_this37","_HTMLElement2","StreamElement","_render6","_connectedCallback","_super9","_callee26","_context26","_callee28","_this38","_context28","_callee27","_context27","beforeRenderEvent","performAction","duplicateChildren","existingChildren","flatMap","newChildrenIds","includes","actionFunction","raise","targetElementsById","targets","targetElementsByQuery","HTMLTemplateElement","description","getConsumer","_getConsumer","setConsumer","newConsumer","_createConsumer","_yield$import","createConsumer","subscribeTo","_subscribeTo","channel","mixin","_yield$getConsumer","subscriptions","currentScript","warn","TurboCableStreamSourceElement","received","dispatchMessageEvent","subscription","unsubscribe","MessageEvent","signed_stream_name","require"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBV,IAAYU,EAAgBV,IACpFI,EAASO,KAAKD,EAAgBV,GAAS,IAExCU,EAAgBV,GAAW,EAE5B,IAAID,KAAYG,EACZI,OAAOC,UAAUC,eAAeC,KAAKP,EAAaH,KACpDa,EAAQb,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCM,EAASC,QACdD,EAASU,OAATV,GAOF,IAAIW,EAAmB,GAKnBL,EAAkB,CACrB,EAAG,GAWJ,SAASM,EAAoBjB,GAG5B,GAAGgB,EAAiBhB,GACnB,OAAOgB,EAAiBhB,GAAUkB,QAGnC,IAAIC,EAASH,EAAiBhB,GAAY,CACzCI,EAAGJ,EACHoB,GAAG,EACHF,QAAS,IAUV,OANAL,EAAQb,GAAUU,KAAKS,EAAOD,QAASC,EAAQA,EAAOD,QAASD,GAG/DE,EAAOC,GAAI,EAGJD,EAAOD,QAKfD,EAAoBI,EAAI,SAAuBpB,GAC9C,IAAIqB,EAAW,GAKXC,EAAqBZ,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Q,SAAUC,EAASC,GAAU,IAAIgZ,EAAM/G,EAAGmH,MAAM5I,EAAMhC,GAAO,SAASyK,EAAMvW,GAAS,GAAmBsW,EAAKjZ,EAASC,EAAQiZ,EAAOC,EAAQ,OAAQxW,GAAU,SAASwW,EAAO5V,GAAO,GAAmB0V,EAAKjZ,EAASC,EAAQiZ,EAAOC,EAAQ,QAAS5V,GAAQ2V,OAAMvX,OAmE3W,WACE,OAAOqvC,EAAmB33B,MAAMnV,KAAMwK,cAKzC,CACDzL,IAAK,uBACLN,MAAO,WACLwnC,GAAuBjmC,MACnBA,KAAKuvC,cAAcvvC,KAAKuvC,aAAaC,gBAE1C,CACDzwC,IAAK,uBACLN,MAAO,SAA8BtE,GACnC,IAAI0C,EAAQ,IAAI4yC,aAAa,UAAW,CACtCt1C,KAAMA,IAER,OAAO6F,KAAKyD,cAAc5G,KAE3B,CACDkC,IAAK,UACLV,IAAK,WAGH,MAAO,CACLywC,QAHY9uC,KAAKyI,aAAa,WAI9BinC,mBAHuB1vC,KAAKyI,aAAa,0BArFiB6N,GAAY,GAAkBL,EAAYrb,UAAW0b,GAAiBC,GAAa,GAAkBN,EAAaM,GA6F3K64B,EApEwC,CAqEjC,GAAiB72B,cAEjCH,eAAenM,OAAO,4BAA6B,ICtGnD0jC,EAAQ,GAAcxkC","file":"js/application-6bd36ee13a25a3f74dbf.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"js/\" + ({\"0\":\"actioncable\"}[chunkId]||chunkId) + \"-\" + {\"0\":\"028c563138b6d62070ec\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","module.exports = require(\"regenerator-runtime\");\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/assets/javascripts\nReleased under the MIT license\n */\n;\n(function () {\n var context = this;\n (function () {\n (function () {\n this.Rails = {\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n buttonClickSelector: {\n selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n exclude: 'form button'\n },\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n formSubmitSelector: 'form:not([data-turbo=true])',\n formInputClickSelector: 'form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n };\n }).call(this);\n }).call(context);\n var Rails = context.Rails;\n (function () {\n (function () {\n var nonce;\n nonce = null;\n\n Rails.loadCSPNonce = function () {\n var ref;\n return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n };\n\n Rails.cspNonce = function () {\n return nonce != null ? nonce : Rails.loadCSPNonce();\n };\n }).call(this);\n (function () {\n var expando, m;\n m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n Rails.matches = function (element, selector) {\n if (selector.exclude != null) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n };\n\n expando = '_ujsData';\n\n Rails.getData = function (element, key) {\n var ref;\n return (ref = element[expando]) != null ? ref[key] : void 0;\n };\n\n Rails.setData = function (element, key, value) {\n if (element[expando] == null) {\n element[expando] = {};\n }\n\n return element[expando][key] = value;\n };\n\n Rails.$ = function (selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n };\n }).call(this);\n (function () {\n var $, csrfParam, csrfToken;\n $ = Rails.$;\n\n csrfToken = Rails.csrfToken = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-token]');\n return meta && meta.content;\n };\n\n csrfParam = Rails.csrfParam = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-param]');\n return meta && meta.content;\n };\n\n Rails.CSRFProtection = function (xhr) {\n var token;\n token = csrfToken();\n\n if (token != null) {\n return xhr.setRequestHeader('X-CSRF-Token', token);\n }\n };\n\n Rails.refreshCSRFTokens = function () {\n var param, token;\n token = csrfToken();\n param = csrfParam();\n\n if (token != null && param != null) {\n return $('form input[name=\"' + param + '\"]').forEach(function (input) {\n return input.value = token;\n });\n }\n };\n }).call(this);\n (function () {\n var CustomEvent, fire, matches, preventDefault;\n matches = Rails.matches;\n CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function CustomEvent(event, params) {\n var evt;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n preventDefault = CustomEvent.prototype.preventDefault;\n\n CustomEvent.prototype.preventDefault = function () {\n var result;\n result = preventDefault.call(this);\n\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function get() {\n return true;\n }\n });\n }\n\n return result;\n };\n }\n\n fire = Rails.fire = function (obj, name, data) {\n var event;\n event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n };\n\n Rails.stopEverything = function (e) {\n fire(e.target, 'ujs:everythingStopped');\n e.preventDefault();\n e.stopPropagation();\n return e.stopImmediatePropagation();\n };\n\n Rails.delegate = function (element, selector, eventType, handler) {\n return element.addEventListener(eventType, function (e) {\n var target;\n target = e.target;\n\n while (!(!(target instanceof Element) || matches(target, selector))) {\n target = target.parentNode;\n }\n\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n return e.stopPropagation();\n }\n });\n };\n }).call(this);\n (function () {\n var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n AcceptHeaders = {\n '*': '*/*',\n text: 'text/plain',\n html: 'text/html',\n xml: 'application/xml, text/xml',\n json: 'application/json, text/javascript',\n script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n };\n\n Rails.ajax = function (options) {\n var xhr;\n options = prepareOptions(options);\n xhr = createXHR(options, function () {\n var ref, response;\n response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n });\n\n if (options.beforeSend != null && !options.beforeSend(xhr, options)) {\n return false;\n }\n\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n };\n\n prepareOptions = function prepareOptions(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n\n if (options.type === 'GET' && options.data) {\n if (options.url.indexOf('?') < 0) {\n options.url += '?' + options.data;\n } else {\n options.url += '&' + options.data;\n }\n }\n\n if (AcceptHeaders[options.dataType] == null) {\n options.dataType = '*';\n }\n\n options.accept = AcceptHeaders[options.dataType];\n\n if (options.dataType !== '*') {\n options.accept += ', */*; q=0.01';\n }\n\n return options;\n };\n\n createXHR = function createXHR(options, done) {\n var xhr;\n xhr = new XMLHttpRequest();\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader('Accept', options.accept);\n\n if (typeof options.data === 'string') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n }\n\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n CSRFProtection(xhr);\n }\n\n xhr.withCredentials = !!options.withCredentials;\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n\n return xhr;\n };\n\n processResponse = function processResponse(response, type) {\n var parser, script;\n\n if (typeof response === 'string' && typeof type === 'string') {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n script = document.createElement('script');\n script.setAttribute('nonce', cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n parser = new DOMParser();\n type = type.replace(/;.+/, '');\n\n try {\n response = parser.parseFromString(response, type);\n } catch (error) {}\n }\n }\n\n return response;\n };\n\n Rails.href = function (element) {\n return element.href;\n };\n\n Rails.isCrossDomain = function (url) {\n var e, originAnchor, urlAnchor;\n originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n urlAnchor = document.createElement('a');\n\n try {\n urlAnchor.href = url;\n return !((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host || originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host);\n } catch (error) {\n e = error;\n return true;\n }\n };\n }).call(this);\n (function () {\n var matches, toArray;\n matches = Rails.matches;\n\n toArray = function toArray(e) {\n return Array.prototype.slice.call(e);\n };\n\n Rails.serializeElement = function (element, additionalParam) {\n var inputs, params;\n inputs = [element];\n\n if (matches(element, 'form')) {\n inputs = toArray(element.elements);\n }\n\n params = [];\n inputs.forEach(function (input) {\n if (!input.name || input.disabled) {\n return;\n }\n\n if (matches(input, 'fieldset[disabled] *')) {\n return;\n }\n\n if (matches(input, 'select')) {\n return toArray(input.options).forEach(function (option) {\n if (option.selected) {\n return params.push({\n name: input.name,\n value: option.value\n });\n }\n });\n } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n return params.push({\n name: input.name,\n value: input.value\n });\n }\n });\n\n if (additionalParam) {\n params.push(additionalParam);\n }\n\n return params.map(function (param) {\n if (param.name != null) {\n return encodeURIComponent(param.name) + \"=\" + encodeURIComponent(param.value);\n } else {\n return param;\n }\n }).join('&');\n };\n\n Rails.formElements = function (form, selector) {\n if (matches(form, 'form')) {\n return toArray(form.elements).filter(function (el) {\n return matches(el, selector);\n });\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n };\n }).call(this);\n (function () {\n var allowAction, fire, stopEverything;\n fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n Rails.handleConfirm = function (e) {\n if (!allowAction(this)) {\n return stopEverything(e);\n }\n };\n\n Rails.confirm = function (message, element) {\n return confirm(message);\n };\n\n allowAction = function allowAction(element) {\n var answer, callback, message;\n message = element.getAttribute('data-confirm');\n\n if (!message) {\n return true;\n }\n\n answer = false;\n\n if (fire(element, 'confirm')) {\n try {\n answer = Rails.confirm(message, element);\n } catch (error) {}\n\n callback = fire(element, 'confirm:complete', [answer]);\n }\n\n return answer && callback;\n };\n }).call(this);\n (function () {\n var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n Rails.handleDisabledElement = function (e) {\n var element;\n element = this;\n\n if (element.disabled) {\n return stopEverything(e);\n }\n };\n\n Rails.enableElement = function (e) {\n var element;\n\n if (e instanceof Event) {\n if (isXhrRedirect(e)) {\n return;\n }\n\n element = e.target;\n } else {\n element = e;\n }\n\n if (matches(element, Rails.linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return enableFormElements(element);\n }\n };\n\n Rails.disableElement = function (e) {\n var element;\n element = e instanceof Event ? e.target : e;\n\n if (matches(element, Rails.linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return disableFormElements(element);\n }\n };\n\n disableLinkElement = function disableLinkElement(element) {\n var replacement;\n\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n }\n\n element.addEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', true);\n };\n\n enableLinkElement = function enableLinkElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, 'ujs:enable-with', null);\n }\n\n element.removeEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', null);\n };\n\n disableFormElements = function disableFormElements(form) {\n return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n };\n\n disableFormElement = function disableFormElement(element) {\n var replacement;\n\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n if (matches(element, 'button')) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, 'ujs:enable-with', element.value);\n element.value = replacement;\n }\n }\n\n element.disabled = true;\n return setData(element, 'ujs:disabled', true);\n };\n\n enableFormElements = function enableFormElements(form) {\n return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n };\n\n enableFormElement = function enableFormElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n if (matches(element, 'button')) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n\n setData(element, 'ujs:enable-with', null);\n }\n\n element.disabled = false;\n return setData(element, 'ujs:disabled', null);\n };\n\n isXhrRedirect = function isXhrRedirect(event) {\n var ref, xhr;\n xhr = (ref = event.detail) != null ? ref[0] : void 0;\n return (xhr != null ? xhr.getResponseHeader(\"X-Xhr-Redirect\") : void 0) != null;\n };\n }).call(this);\n (function () {\n var stopEverything;\n stopEverything = Rails.stopEverything;\n\n Rails.handleMethod = function (e) {\n var csrfParam, csrfToken, form, formContent, href, link, method;\n link = this;\n method = link.getAttribute('data-method');\n\n if (!method) {\n return;\n }\n\n href = Rails.href(link);\n csrfToken = Rails.csrfToken();\n csrfParam = Rails.csrfParam();\n form = document.createElement('form');\n formContent = \"\";\n\n if (csrfParam != null && csrfToken != null && !Rails.isCrossDomain(href)) {\n formContent += \"\";\n }\n\n formContent += '';\n form.method = 'post';\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = 'none';\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n return stopEverything(e);\n };\n }).call(this);\n (function () {\n var ajax,\n fire,\n getData,\n isCrossDomain,\n isRemote,\n matches,\n serializeElement,\n setData,\n stopEverything,\n slice = [].slice;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n isRemote = function isRemote(element) {\n var value;\n value = element.getAttribute('data-remote');\n return value != null && value !== 'false';\n };\n\n Rails.handleRemote = function (e) {\n var button, data, dataType, element, method, url, withCredentials;\n element = this;\n\n if (!isRemote(element)) {\n return true;\n }\n\n if (!fire(element, 'ajax:before')) {\n fire(element, 'ajax:stopped');\n return false;\n }\n\n withCredentials = element.getAttribute('data-with-credentials');\n dataType = element.getAttribute('data-type') || 'script';\n\n if (matches(element, Rails.formSubmitSelector)) {\n button = getData(element, 'ujs:submit-button');\n method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n\n if (method.toUpperCase() === 'GET') {\n url = url.replace(/\\?.*$/, '');\n }\n\n if (element.enctype === 'multipart/form-data') {\n data = new FormData(element);\n\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n\n setData(element, 'ujs:submit-button', null);\n setData(element, 'ujs:submit-button-formmethod', null);\n setData(element, 'ujs:submit-button-formaction', null);\n } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n method = element.getAttribute('data-method');\n url = element.getAttribute('data-url');\n data = serializeElement(element, element.getAttribute('data-params'));\n } else {\n method = element.getAttribute('data-method');\n url = Rails.href(element);\n data = element.getAttribute('data-params');\n }\n\n ajax({\n type: method || 'GET',\n url: url,\n data: data,\n dataType: dataType,\n beforeSend: function beforeSend(xhr, options) {\n if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n return fire(element, 'ajax:send', [xhr]);\n } else {\n fire(element, 'ajax:stopped');\n return false;\n }\n },\n success: function success() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:success', args);\n },\n error: function error() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:error', args);\n },\n complete: function complete() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:complete', args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: withCredentials != null && withCredentials !== 'false'\n });\n return stopEverything(e);\n };\n\n Rails.formSubmitButtonClick = function (e) {\n var button, form;\n button = this;\n form = button.form;\n\n if (!form) {\n return;\n }\n\n if (button.name) {\n setData(form, 'ujs:submit-button', {\n name: button.name,\n value: button.value\n });\n }\n\n setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n };\n\n Rails.preventInsignificantClick = function (e) {\n var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n link = this;\n method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n data = link.getAttribute('data-params');\n metaClick = e.metaKey || e.ctrlKey;\n insignificantMetaClick = metaClick && method === 'GET' && !data;\n nonPrimaryMouseClick = e.button != null && e.button !== 0;\n\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n return e.stopImmediatePropagation();\n }\n };\n }).call(this);\n (function () {\n var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n if (typeof jQuery !== \"undefined\" && jQuery !== null && jQuery.ajax != null) {\n if (jQuery.rails) {\n throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n }\n\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter(function (options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n });\n }\n\n Rails.start = function () {\n if (window._rails_loaded) {\n throw new Error('rails-ujs has already been loaded!');\n }\n\n window.addEventListener('pageshow', function () {\n $(Rails.formEnableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n return $(Rails.linkDisableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n });\n delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n delegate(document, Rails.linkClickSelector, 'click', disableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', function (e) {\n return setTimeout(function () {\n return disableElement(e);\n }, 13);\n });\n delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n document.addEventListener('DOMContentLoaded', loadCSPNonce);\n return window._rails_loaded = true;\n };\n\n if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n Rails.start();\n }\n }).call(this);\n }).call(this);\n\n if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === \"object\" && module.exports) {\n module.exports = Rails;\n } else if (typeof define === \"function\" && define.amd) {\n define(Rails);\n }\n}).call(this);","module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var _templateObject, _templateObject2;\n\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\nTurbo 7.0.0\nCopyright © 2021 Basecamp, LLC\n */\n(function () {\n if (window.Reflect === undefined || window.customElements === undefined || window.customElements.polyfillWrapFlushCallback) {\n return;\n }\n\n var BuiltInHTMLElement = HTMLElement;\n var wrapperForTheName = {\n 'HTMLElement': function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor);\n }\n };\n window.HTMLElement = wrapperForTheName['HTMLElement'];\n HTMLElement.prototype = BuiltInHTMLElement.prototype;\n HTMLElement.prototype.constructor = HTMLElement;\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);\n})();\n\nvar submittersByForm = new WeakMap();\n\nfunction findSubmitterFromClickTarget(target) {\n var element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n var candidate = element ? element.closest(\"input, button\") : null;\n return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == \"submit\" ? candidate : null;\n}\n\nfunction clickCaptured(event) {\n var submitter = findSubmitterFromClickTarget(event.target);\n\n if (submitter && submitter.form) {\n submittersByForm.set(submitter.form, submitter);\n }\n}\n\n(function () {\n if (\"submitter\" in Event.prototype) return;\n var prototype;\n\n if (\"SubmitEvent\" in window && /Apple Computer/.test(navigator.vendor)) {\n prototype = window.SubmitEvent.prototype;\n } else if (\"SubmitEvent\" in window) {\n return;\n } else {\n prototype = window.Event.prototype;\n }\n\n addEventListener(\"click\", clickCaptured, true);\n Object.defineProperty(prototype, \"submitter\", {\n get: function get() {\n if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n return submittersByForm.get(this.target);\n }\n }\n });\n})();\n\nvar FrameLoadingStyle;\n\n(function (FrameLoadingStyle) {\n FrameLoadingStyle[\"eager\"] = \"eager\";\n FrameLoadingStyle[\"lazy\"] = \"lazy\";\n})(FrameLoadingStyle || (FrameLoadingStyle = {}));\n\nvar FrameElement = /*#__PURE__*/function (_HTMLElement) {\n _inherits(FrameElement, _HTMLElement);\n\n var _super = _createSuper(FrameElement);\n\n function FrameElement() {\n var _this;\n\n _classCallCheck(this, FrameElement);\n\n _this = _super.call(this);\n _this.loaded = Promise.resolve();\n _this.delegate = new FrameElement.delegateConstructor(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(FrameElement, [{\n key: \"connectedCallback\",\n value: function connectedCallback() {\n this.delegate.connect();\n }\n }, {\n key: \"disconnectedCallback\",\n value: function disconnectedCallback() {\n this.delegate.disconnect();\n }\n }, {\n key: \"reload\",\n value: function reload() {\n var src = this.src;\n this.src = null;\n this.src = src;\n }\n }, {\n key: \"attributeChangedCallback\",\n value: function attributeChangedCallback(name) {\n if (name == \"loading\") {\n this.delegate.loadingStyleChanged();\n } else if (name == \"src\") {\n this.delegate.sourceURLChanged();\n } else {\n this.delegate.disabledChanged();\n }\n }\n }, {\n key: \"src\",\n get: function get() {\n return this.getAttribute(\"src\");\n },\n set: function set(value) {\n if (value) {\n this.setAttribute(\"src\", value);\n } else {\n this.removeAttribute(\"src\");\n }\n }\n }, {\n key: \"loading\",\n get: function get() {\n return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n },\n set: function set(value) {\n if (value) {\n this.setAttribute(\"loading\", value);\n } else {\n this.removeAttribute(\"loading\");\n }\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return this.hasAttribute(\"disabled\");\n },\n set: function set(value) {\n if (value) {\n this.setAttribute(\"disabled\", \"\");\n } else {\n this.removeAttribute(\"disabled\");\n }\n }\n }, {\n key: \"autoscroll\",\n get: function get() {\n return this.hasAttribute(\"autoscroll\");\n },\n set: function set(value) {\n if (value) {\n this.setAttribute(\"autoscroll\", \"\");\n } else {\n this.removeAttribute(\"autoscroll\");\n }\n }\n }, {\n key: \"complete\",\n get: function get() {\n return !this.delegate.isLoading;\n }\n }, {\n key: \"isActive\",\n get: function get() {\n return this.ownerDocument === document && !this.isPreview;\n }\n }, {\n key: \"isPreview\",\n get: function get() {\n var _a, _b;\n\n return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute(\"data-turbo-preview\");\n }\n }], [{\n key: \"observedAttributes\",\n get: function get() {\n return [\"disabled\", \"loading\", \"src\"];\n }\n }]);\n\n return FrameElement;\n}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));\n\nfunction frameLoadingStyleFromString(style) {\n switch (style.toLowerCase()) {\n case \"lazy\":\n return FrameLoadingStyle.lazy;\n\n default:\n return FrameLoadingStyle.eager;\n }\n}\n\nfunction expandURL(locatable) {\n return new URL(locatable.toString(), document.baseURI);\n}\n\nfunction getAnchor(url) {\n var anchorMatch;\n\n if (url.hash) {\n return url.hash.slice(1);\n } else if (anchorMatch = url.href.match(/#(.*)$/)) {\n return anchorMatch[1];\n }\n}\n\nfunction getExtension(url) {\n return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\n\nfunction isHTML(url) {\n return !!getExtension(url).match(/^(?:|\\.(?:htm|html|xhtml))$/);\n}\n\nfunction isPrefixedBy(baseURL, url) {\n var prefix = getPrefix(url);\n return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\n\nfunction getRequestURL(url) {\n var anchor = getAnchor(url);\n return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\n\nfunction toCacheKey(url) {\n return getRequestURL(url);\n}\n\nfunction urlsAreEqual(left, right) {\n return expandURL(left).href == expandURL(right).href;\n}\n\nfunction getPathComponents(url) {\n return url.pathname.split(\"/\").slice(1);\n}\n\nfunction getLastPathComponent(url) {\n return getPathComponents(url).slice(-1)[0];\n}\n\nfunction getPrefix(url) {\n return addTrailingSlash(url.origin + url.pathname);\n}\n\nfunction addTrailingSlash(value) {\n return value.endsWith(\"/\") ? value : value + \"/\";\n}\n\nvar FetchResponse = /*#__PURE__*/function () {\n function FetchResponse(response) {\n _classCallCheck(this, FetchResponse);\n\n this.response = response;\n }\n\n _createClass(FetchResponse, [{\n key: \"succeeded\",\n get: function get() {\n return this.response.ok;\n }\n }, {\n key: \"failed\",\n get: function get() {\n return !this.succeeded;\n }\n }, {\n key: \"clientError\",\n get: function get() {\n return this.statusCode >= 400 && this.statusCode <= 499;\n }\n }, {\n key: \"serverError\",\n get: function get() {\n return this.statusCode >= 500 && this.statusCode <= 599;\n }\n }, {\n key: \"redirected\",\n get: function get() {\n return this.response.redirected;\n }\n }, {\n key: \"location\",\n get: function get() {\n return expandURL(this.response.url);\n }\n }, {\n key: \"isHTML\",\n get: function get() {\n return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n }\n }, {\n key: \"statusCode\",\n get: function get() {\n return this.response.status;\n }\n }, {\n key: \"contentType\",\n get: function get() {\n return this.header(\"Content-Type\");\n }\n }, {\n key: \"responseText\",\n get: function get() {\n return this.response.clone().text();\n }\n }, {\n key: \"responseHTML\",\n get: function get() {\n if (this.isHTML) {\n return this.response.clone().text();\n } else {\n return Promise.resolve(undefined);\n }\n }\n }, {\n key: \"header\",\n value: function header(name) {\n return this.response.headers.get(name);\n }\n }]);\n\n return FetchResponse;\n}();\n\nfunction dispatch(eventName) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n target = _ref.target,\n cancelable = _ref.cancelable,\n detail = _ref.detail;\n\n var event = new CustomEvent(eventName, {\n cancelable: cancelable,\n bubbles: true,\n detail: detail\n });\n\n if (target && target.isConnected) {\n target.dispatchEvent(event);\n } else {\n document.documentElement.dispatchEvent(event);\n }\n\n return event;\n}\n\nfunction nextAnimationFrame() {\n return new Promise(function (resolve) {\n return requestAnimationFrame(function () {\n return resolve();\n });\n });\n}\n\nfunction nextEventLoopTick() {\n return new Promise(function (resolve) {\n return setTimeout(function () {\n return resolve();\n }, 0);\n });\n}\n\nfunction nextMicrotask() {\n return Promise.resolve();\n}\n\nfunction parseHTMLDocument() {\n var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n return new DOMParser().parseFromString(html, \"text/html\");\n}\n\nfunction unindent(strings) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n var lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n var match = lines[0].match(/^\\s+/);\n var indent = match ? match[0].length : 0;\n return lines.map(function (line) {\n return line.slice(indent);\n }).join(\"\\n\");\n}\n\nfunction interpolate(strings, values) {\n return strings.reduce(function (result, string, i) {\n var value = values[i] == undefined ? \"\" : values[i];\n return result + string + value;\n }, \"\");\n}\n\nfunction uuid() {\n return Array.apply(null, {\n length: 36\n }).map(function (_, i) {\n if (i == 8 || i == 13 || i == 18 || i == 23) {\n return \"-\";\n } else if (i == 14) {\n return \"4\";\n } else if (i == 19) {\n return (Math.floor(Math.random() * 4) + 8).toString(16);\n } else {\n return Math.floor(Math.random() * 15).toString(16);\n }\n }).join(\"\");\n}\n\nvar FetchMethod;\n\n(function (FetchMethod) {\n FetchMethod[FetchMethod[\"get\"] = 0] = \"get\";\n FetchMethod[FetchMethod[\"post\"] = 1] = \"post\";\n FetchMethod[FetchMethod[\"put\"] = 2] = \"put\";\n FetchMethod[FetchMethod[\"patch\"] = 3] = \"patch\";\n FetchMethod[FetchMethod[\"delete\"] = 4] = \"delete\";\n})(FetchMethod || (FetchMethod = {}));\n\nfunction fetchMethodFromString(method) {\n switch (method.toLowerCase()) {\n case \"get\":\n return FetchMethod.get;\n\n case \"post\":\n return FetchMethod.post;\n\n case \"put\":\n return FetchMethod.put;\n\n case \"patch\":\n return FetchMethod.patch;\n\n case \"delete\":\n return FetchMethod.delete;\n }\n}\n\nvar FetchRequest = /*#__PURE__*/function () {\n function FetchRequest(delegate, method, location) {\n var body = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new URLSearchParams();\n var target = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n\n _classCallCheck(this, FetchRequest);\n\n this.abortController = new AbortController();\n\n this.resolveRequestPromise = function (value) {};\n\n this.delegate = delegate;\n this.method = method;\n this.headers = this.defaultHeaders;\n\n if (this.isIdempotent) {\n this.url = mergeFormDataEntries(location, _toConsumableArray(body.entries()));\n } else {\n this.body = body;\n this.url = location;\n }\n\n this.target = target;\n }\n\n _createClass(FetchRequest, [{\n key: \"location\",\n get: function get() {\n return this.url;\n }\n }, {\n key: \"params\",\n get: function get() {\n return this.url.searchParams;\n }\n }, {\n key: \"entries\",\n get: function get() {\n return this.body ? Array.from(this.body.entries()) : [];\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n this.abortController.abort();\n }\n }, {\n key: \"perform\",\n value: function () {\n var _perform = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var _a, _b, fetchOptions, response;\n\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n fetchOptions = this.fetchOptions;\n (_b = (_a = this.delegate).prepareHeadersForRequest) === null || _b === void 0 ? void 0 : _b.call(_a, this.headers, this);\n _context.next = 4;\n return this.allowRequestToBeIntercepted(fetchOptions);\n\n case 4:\n _context.prev = 4;\n this.delegate.requestStarted(this);\n _context.next = 8;\n return fetch(this.url.href, fetchOptions);\n\n case 8:\n response = _context.sent;\n _context.next = 11;\n return this.receive(response);\n\n case 11:\n return _context.abrupt(\"return\", _context.sent);\n\n case 14:\n _context.prev = 14;\n _context.t0 = _context[\"catch\"](4);\n\n if (!(_context.t0.name !== 'AbortError')) {\n _context.next = 19;\n break;\n }\n\n this.delegate.requestErrored(this, _context.t0);\n throw _context.t0;\n\n case 19:\n _context.prev = 19;\n this.delegate.requestFinished(this);\n return _context.finish(19);\n\n case 22:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this, [[4, 14, 19, 22]]);\n }));\n\n function perform() {\n return _perform.apply(this, arguments);\n }\n\n return perform;\n }()\n }, {\n key: \"receive\",\n value: function () {\n var _receive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(response) {\n var fetchResponse, event;\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n fetchResponse = new FetchResponse(response);\n event = dispatch(\"turbo:before-fetch-response\", {\n cancelable: true,\n detail: {\n fetchResponse: fetchResponse\n },\n target: this.target\n });\n\n if (event.defaultPrevented) {\n this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n } else if (fetchResponse.succeeded) {\n this.delegate.requestSucceededWithResponse(this, fetchResponse);\n } else {\n this.delegate.requestFailedWithResponse(this, fetchResponse);\n }\n\n return _context2.abrupt(\"return\", fetchResponse);\n\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function receive(_x) {\n return _receive.apply(this, arguments);\n }\n\n return receive;\n }()\n }, {\n key: \"fetchOptions\",\n get: function get() {\n var _a;\n\n return {\n method: FetchMethod[this.method].toUpperCase(),\n credentials: \"same-origin\",\n headers: this.headers,\n redirect: \"follow\",\n body: this.body,\n signal: this.abortSignal,\n referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href\n };\n }\n }, {\n key: \"defaultHeaders\",\n get: function get() {\n return {\n \"Accept\": \"text/html, application/xhtml+xml\"\n };\n }\n }, {\n key: \"isIdempotent\",\n get: function get() {\n return this.method == FetchMethod.get;\n }\n }, {\n key: \"abortSignal\",\n get: function get() {\n return this.abortController.signal;\n }\n }, {\n key: \"allowRequestToBeIntercepted\",\n value: function () {\n var _allowRequestToBeIntercepted = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(fetchOptions) {\n var _this2 = this;\n\n var requestInterception, event;\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n requestInterception = new Promise(function (resolve) {\n return _this2.resolveRequestPromise = resolve;\n });\n event = dispatch(\"turbo:before-fetch-request\", {\n cancelable: true,\n detail: {\n fetchOptions: fetchOptions,\n url: this.url.href,\n resume: this.resolveRequestPromise\n },\n target: this.target\n });\n\n if (!event.defaultPrevented) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 5;\n return requestInterception;\n\n case 5:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function allowRequestToBeIntercepted(_x2) {\n return _allowRequestToBeIntercepted.apply(this, arguments);\n }\n\n return allowRequestToBeIntercepted;\n }()\n }]);\n\n return FetchRequest;\n}();\n\nfunction mergeFormDataEntries(url, entries) {\n var currentSearchParams = new URLSearchParams(url.search);\n\n var _iterator = _createForOfIteratorHelper(entries),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ref4 = _step.value;\n\n var _ref3 = _slicedToArray(_ref4, 2);\n\n var name = _ref3[0];\n var value = _ref3[1];\n if (value instanceof File) continue;\n\n if (currentSearchParams.has(name)) {\n currentSearchParams.delete(name);\n url.searchParams.set(name, value);\n } else {\n url.searchParams.append(name, value);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return url;\n}\n\nvar AppearanceObserver = /*#__PURE__*/function () {\n function AppearanceObserver(delegate, element) {\n var _this3 = this;\n\n _classCallCheck(this, AppearanceObserver);\n\n this.started = false;\n\n this.intersect = function (entries) {\n var lastEntry = entries.slice(-1)[0];\n\n if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {\n _this3.delegate.elementAppearedInViewport(_this3.element);\n }\n };\n\n this.delegate = delegate;\n this.element = element;\n this.intersectionObserver = new IntersectionObserver(this.intersect);\n }\n\n _createClass(AppearanceObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n this.started = true;\n this.intersectionObserver.observe(this.element);\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n this.started = false;\n this.intersectionObserver.unobserve(this.element);\n }\n }\n }]);\n\n return AppearanceObserver;\n}();\n\nvar StreamMessage = /*#__PURE__*/function () {\n function StreamMessage(html) {\n _classCallCheck(this, StreamMessage);\n\n this.templateElement = document.createElement(\"template\");\n this.templateElement.innerHTML = html;\n }\n\n _createClass(StreamMessage, [{\n key: \"fragment\",\n get: function get() {\n var fragment = document.createDocumentFragment();\n\n var _iterator2 = _createForOfIteratorHelper(this.foreignElements),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var element = _step2.value;\n fragment.appendChild(document.importNode(element, true));\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return fragment;\n }\n }, {\n key: \"foreignElements\",\n get: function get() {\n return this.templateChildren.reduce(function (streamElements, child) {\n if (child.tagName.toLowerCase() == \"turbo-stream\") {\n return [].concat(_toConsumableArray(streamElements), [child]);\n } else {\n return streamElements;\n }\n }, []);\n }\n }, {\n key: \"templateChildren\",\n get: function get() {\n return Array.from(this.templateElement.content.children);\n }\n }], [{\n key: \"wrap\",\n value: function wrap(message) {\n if (typeof message == \"string\") {\n return new this(message);\n } else {\n return message;\n }\n }\n }]);\n\n return StreamMessage;\n}();\n\nStreamMessage.contentType = \"text/vnd.turbo-stream.html\";\nvar FormSubmissionState;\n\n(function (FormSubmissionState) {\n FormSubmissionState[FormSubmissionState[\"initialized\"] = 0] = \"initialized\";\n FormSubmissionState[FormSubmissionState[\"requesting\"] = 1] = \"requesting\";\n FormSubmissionState[FormSubmissionState[\"waiting\"] = 2] = \"waiting\";\n FormSubmissionState[FormSubmissionState[\"receiving\"] = 3] = \"receiving\";\n FormSubmissionState[FormSubmissionState[\"stopping\"] = 4] = \"stopping\";\n FormSubmissionState[FormSubmissionState[\"stopped\"] = 5] = \"stopped\";\n})(FormSubmissionState || (FormSubmissionState = {}));\n\nvar FormEnctype;\n\n(function (FormEnctype) {\n FormEnctype[\"urlEncoded\"] = \"application/x-www-form-urlencoded\";\n FormEnctype[\"multipart\"] = \"multipart/form-data\";\n FormEnctype[\"plain\"] = \"text/plain\";\n})(FormEnctype || (FormEnctype = {}));\n\nfunction formEnctypeFromString(encoding) {\n switch (encoding.toLowerCase()) {\n case FormEnctype.multipart:\n return FormEnctype.multipart;\n\n case FormEnctype.plain:\n return FormEnctype.plain;\n\n default:\n return FormEnctype.urlEncoded;\n }\n}\n\nvar FormSubmission = /*#__PURE__*/function () {\n function FormSubmission(delegate, formElement, submitter) {\n var mustRedirect = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n _classCallCheck(this, FormSubmission);\n\n this.state = FormSubmissionState.initialized;\n this.delegate = delegate;\n this.formElement = formElement;\n this.submitter = submitter;\n this.formData = buildFormData(formElement, submitter);\n this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);\n this.mustRedirect = mustRedirect;\n }\n\n _createClass(FormSubmission, [{\n key: \"method\",\n get: function get() {\n var _a;\n\n var method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formmethod\")) || this.formElement.getAttribute(\"method\") || \"\";\n return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;\n }\n }, {\n key: \"action\",\n get: function get() {\n var _a;\n\n var formElementAction = typeof this.formElement.action === 'string' ? this.formElement.action : null;\n return ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formaction\")) || this.formElement.getAttribute(\"action\") || formElementAction || \"\";\n }\n }, {\n key: \"location\",\n get: function get() {\n return expandURL(this.action);\n }\n }, {\n key: \"body\",\n get: function get() {\n if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {\n return new URLSearchParams(this.stringFormData);\n } else {\n return this.formData;\n }\n }\n }, {\n key: \"enctype\",\n get: function get() {\n var _a;\n\n return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formenctype\")) || this.formElement.enctype);\n }\n }, {\n key: \"isIdempotent\",\n get: function get() {\n return this.fetchRequest.isIdempotent;\n }\n }, {\n key: \"stringFormData\",\n get: function get() {\n return _toConsumableArray(this.formData).reduce(function (entries, _ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n name = _ref6[0],\n value = _ref6[1];\n\n return entries.concat(typeof value == \"string\" ? [[name, value]] : []);\n }, []);\n }\n }, {\n key: \"start\",\n value: function () {\n var _start = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {\n var _FormSubmissionState, initialized, requesting;\n\n return _regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _FormSubmissionState = FormSubmissionState, initialized = _FormSubmissionState.initialized, requesting = _FormSubmissionState.requesting;\n\n if (!(this.state == initialized)) {\n _context4.next = 4;\n break;\n }\n\n this.state = requesting;\n return _context4.abrupt(\"return\", this.fetchRequest.perform());\n\n case 4:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function start() {\n return _start.apply(this, arguments);\n }\n\n return start;\n }()\n }, {\n key: \"stop\",\n value: function stop() {\n var _FormSubmissionState2 = FormSubmissionState,\n stopping = _FormSubmissionState2.stopping,\n stopped = _FormSubmissionState2.stopped;\n\n if (this.state != stopping && this.state != stopped) {\n this.state = stopping;\n this.fetchRequest.cancel();\n return true;\n }\n }\n }, {\n key: \"prepareHeadersForRequest\",\n value: function prepareHeadersForRequest(headers, request) {\n if (!request.isIdempotent) {\n var token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n\n if (token) {\n headers[\"X-CSRF-Token\"] = token;\n }\n\n headers[\"Accept\"] = [StreamMessage.contentType, headers[\"Accept\"]].join(\", \");\n }\n }\n }, {\n key: \"requestStarted\",\n value: function requestStarted(request) {\n this.state = FormSubmissionState.waiting;\n dispatch(\"turbo:submit-start\", {\n target: this.formElement,\n detail: {\n formSubmission: this\n }\n });\n this.delegate.formSubmissionStarted(this);\n }\n }, {\n key: \"requestPreventedHandlingResponse\",\n value: function requestPreventedHandlingResponse(request, response) {\n this.result = {\n success: response.succeeded,\n fetchResponse: response\n };\n }\n }, {\n key: \"requestSucceededWithResponse\",\n value: function requestSucceededWithResponse(request, response) {\n if (response.clientError || response.serverError) {\n this.delegate.formSubmissionFailedWithResponse(this, response);\n } else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n var error = new Error(\"Form responses must redirect to another location\");\n this.delegate.formSubmissionErrored(this, error);\n } else {\n this.state = FormSubmissionState.receiving;\n this.result = {\n success: true,\n fetchResponse: response\n };\n this.delegate.formSubmissionSucceededWithResponse(this, response);\n }\n }\n }, {\n key: \"requestFailedWithResponse\",\n value: function requestFailedWithResponse(request, response) {\n this.result = {\n success: false,\n fetchResponse: response\n };\n this.delegate.formSubmissionFailedWithResponse(this, response);\n }\n }, {\n key: \"requestErrored\",\n value: function requestErrored(request, error) {\n this.result = {\n success: false,\n error: error\n };\n this.delegate.formSubmissionErrored(this, error);\n }\n }, {\n key: \"requestFinished\",\n value: function requestFinished(request) {\n this.state = FormSubmissionState.stopped;\n dispatch(\"turbo:submit-end\", {\n target: this.formElement,\n detail: Object.assign({\n formSubmission: this\n }, this.result)\n });\n this.delegate.formSubmissionFinished(this);\n }\n }, {\n key: \"requestMustRedirect\",\n value: function requestMustRedirect(request) {\n return !request.isIdempotent && this.mustRedirect;\n }\n }]);\n\n return FormSubmission;\n}();\n\nfunction buildFormData(formElement, submitter) {\n var formData = new FormData(formElement);\n var name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"name\");\n var value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"value\");\n\n if (name && value != null && formData.get(name) != value) {\n formData.append(name, value);\n }\n\n return formData;\n}\n\nfunction getCookieValue(cookieName) {\n if (cookieName != null) {\n var cookies = document.cookie ? document.cookie.split(\"; \") : [];\n var cookie = cookies.find(function (cookie) {\n return cookie.startsWith(cookieName);\n });\n\n if (cookie) {\n var value = cookie.split(\"=\").slice(1).join(\"=\");\n return value ? decodeURIComponent(value) : undefined;\n }\n }\n}\n\nfunction getMetaContent(name) {\n var element = document.querySelector(\"meta[name=\\\"\".concat(name, \"\\\"]\"));\n return element && element.content;\n}\n\nfunction responseSucceededWithoutRedirect(response) {\n return response.statusCode == 200 && !response.redirected;\n}\n\nvar Snapshot = /*#__PURE__*/function () {\n function Snapshot(element) {\n _classCallCheck(this, Snapshot);\n\n this.element = element;\n }\n\n _createClass(Snapshot, [{\n key: \"children\",\n get: function get() {\n return _toConsumableArray(this.element.children);\n }\n }, {\n key: \"hasAnchor\",\n value: function hasAnchor(anchor) {\n return this.getElementForAnchor(anchor) != null;\n }\n }, {\n key: \"getElementForAnchor\",\n value: function getElementForAnchor(anchor) {\n return anchor ? this.element.querySelector(\"[id='\".concat(anchor, \"'], a[name='\").concat(anchor, \"']\")) : null;\n }\n }, {\n key: \"isConnected\",\n get: function get() {\n return this.element.isConnected;\n }\n }, {\n key: \"firstAutofocusableElement\",\n get: function get() {\n return this.element.querySelector(\"[autofocus]\");\n }\n }, {\n key: \"permanentElements\",\n get: function get() {\n return _toConsumableArray(this.element.querySelectorAll(\"[id][data-turbo-permanent]\"));\n }\n }, {\n key: \"getPermanentElementById\",\n value: function getPermanentElementById(id) {\n return this.element.querySelector(\"#\".concat(id, \"[data-turbo-permanent]\"));\n }\n }, {\n key: \"getPermanentElementMapForSnapshot\",\n value: function getPermanentElementMapForSnapshot(snapshot) {\n var permanentElementMap = {};\n\n var _iterator3 = _createForOfIteratorHelper(this.permanentElements),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var currentPermanentElement = _step3.value;\n var id = currentPermanentElement.id;\n var newPermanentElement = snapshot.getPermanentElementById(id);\n\n if (newPermanentElement) {\n permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n return permanentElementMap;\n }\n }]);\n\n return Snapshot;\n}();\n\nvar FormInterceptor = /*#__PURE__*/function () {\n function FormInterceptor(delegate, element) {\n var _this4 = this;\n\n _classCallCheck(this, FormInterceptor);\n\n this.submitBubbled = function (event) {\n var form = event.target;\n\n if (form instanceof HTMLFormElement && form.closest(\"turbo-frame, html\") == _this4.element) {\n var submitter = event.submitter || undefined;\n\n if (_this4.delegate.shouldInterceptFormSubmission(form, submitter)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n\n _this4.delegate.formSubmissionIntercepted(form, submitter);\n }\n }\n };\n\n this.delegate = delegate;\n this.element = element;\n }\n\n _createClass(FormInterceptor, [{\n key: \"start\",\n value: function start() {\n this.element.addEventListener(\"submit\", this.submitBubbled);\n }\n }, {\n key: \"stop\",\n value: function stop() {\n this.element.removeEventListener(\"submit\", this.submitBubbled);\n }\n }]);\n\n return FormInterceptor;\n}();\n\nvar View = /*#__PURE__*/function () {\n function View(delegate, element) {\n _classCallCheck(this, View);\n\n this.resolveRenderPromise = function (value) {};\n\n this.resolveInterceptionPromise = function (value) {};\n\n this.delegate = delegate;\n this.element = element;\n }\n\n _createClass(View, [{\n key: \"scrollToAnchor\",\n value: function scrollToAnchor(anchor) {\n var element = this.snapshot.getElementForAnchor(anchor);\n\n if (element) {\n this.scrollToElement(element);\n this.focusElement(element);\n } else {\n this.scrollToPosition({\n x: 0,\n y: 0\n });\n }\n }\n }, {\n key: \"scrollToAnchorFromLocation\",\n value: function scrollToAnchorFromLocation(location) {\n this.scrollToAnchor(getAnchor(location));\n }\n }, {\n key: \"scrollToElement\",\n value: function scrollToElement(element) {\n element.scrollIntoView();\n }\n }, {\n key: \"focusElement\",\n value: function focusElement(element) {\n if (element instanceof HTMLElement) {\n if (element.hasAttribute(\"tabindex\")) {\n element.focus();\n } else {\n element.setAttribute(\"tabindex\", \"-1\");\n element.focus();\n element.removeAttribute(\"tabindex\");\n }\n }\n }\n }, {\n key: \"scrollToPosition\",\n value: function scrollToPosition(_ref7) {\n var x = _ref7.x,\n y = _ref7.y;\n this.scrollRoot.scrollTo(x, y);\n }\n }, {\n key: \"scrollToTop\",\n value: function scrollToTop() {\n this.scrollToPosition({\n x: 0,\n y: 0\n });\n }\n }, {\n key: \"scrollRoot\",\n get: function get() {\n return window;\n }\n }, {\n key: \"render\",\n value: function () {\n var _render = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(renderer) {\n var _this5 = this;\n\n var isPreview, shouldRender, snapshot, renderInterception, immediateRender;\n return _regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n isPreview = renderer.isPreview, shouldRender = renderer.shouldRender, snapshot = renderer.newSnapshot;\n\n if (!shouldRender) {\n _context5.next = 22;\n break;\n }\n\n _context5.prev = 2;\n this.renderPromise = new Promise(function (resolve) {\n return _this5.resolveRenderPromise = resolve;\n });\n this.renderer = renderer;\n this.prepareToRenderSnapshot(renderer);\n renderInterception = new Promise(function (resolve) {\n return _this5.resolveInterceptionPromise = resolve;\n });\n immediateRender = this.delegate.allowsImmediateRender(snapshot, this.resolveInterceptionPromise);\n\n if (immediateRender) {\n _context5.next = 11;\n break;\n }\n\n _context5.next = 11;\n return renderInterception;\n\n case 11:\n _context5.next = 13;\n return this.renderSnapshot(renderer);\n\n case 13:\n this.delegate.viewRenderedSnapshot(snapshot, isPreview);\n this.finishRenderingSnapshot(renderer);\n\n case 15:\n _context5.prev = 15;\n delete this.renderer;\n this.resolveRenderPromise(undefined);\n delete this.renderPromise;\n return _context5.finish(15);\n\n case 20:\n _context5.next = 23;\n break;\n\n case 22:\n this.invalidate();\n\n case 23:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this, [[2,, 15, 20]]);\n }));\n\n function render(_x3) {\n return _render.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"invalidate\",\n value: function invalidate() {\n this.delegate.viewInvalidated();\n }\n }, {\n key: \"prepareToRenderSnapshot\",\n value: function prepareToRenderSnapshot(renderer) {\n this.markAsPreview(renderer.isPreview);\n renderer.prepareToRender();\n }\n }, {\n key: \"markAsPreview\",\n value: function markAsPreview(isPreview) {\n if (isPreview) {\n this.element.setAttribute(\"data-turbo-preview\", \"\");\n } else {\n this.element.removeAttribute(\"data-turbo-preview\");\n }\n }\n }, {\n key: \"renderSnapshot\",\n value: function () {\n var _renderSnapshot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(renderer) {\n return _regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n _context6.next = 2;\n return renderer.render();\n\n case 2:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6);\n }));\n\n function renderSnapshot(_x4) {\n return _renderSnapshot.apply(this, arguments);\n }\n\n return renderSnapshot;\n }()\n }, {\n key: \"finishRenderingSnapshot\",\n value: function finishRenderingSnapshot(renderer) {\n renderer.finishRendering();\n }\n }]);\n\n return View;\n}();\n\nvar FrameView = /*#__PURE__*/function (_View) {\n _inherits(FrameView, _View);\n\n var _super2 = _createSuper(FrameView);\n\n function FrameView() {\n _classCallCheck(this, FrameView);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(FrameView, [{\n key: \"invalidate\",\n value: function invalidate() {\n this.element.innerHTML = \"\";\n }\n }, {\n key: \"snapshot\",\n get: function get() {\n return new Snapshot(this.element);\n }\n }]);\n\n return FrameView;\n}(View);\n\nvar LinkInterceptor = /*#__PURE__*/function () {\n function LinkInterceptor(delegate, element) {\n var _this6 = this;\n\n _classCallCheck(this, LinkInterceptor);\n\n this.clickBubbled = function (event) {\n if (_this6.respondsToEventTarget(event.target)) {\n _this6.clickEvent = event;\n } else {\n delete _this6.clickEvent;\n }\n };\n\n this.linkClicked = function (event) {\n if (_this6.clickEvent && _this6.respondsToEventTarget(event.target) && event.target instanceof Element) {\n if (_this6.delegate.shouldInterceptLinkClick(event.target, event.detail.url)) {\n _this6.clickEvent.preventDefault();\n\n event.preventDefault();\n\n _this6.delegate.linkClickIntercepted(event.target, event.detail.url);\n }\n }\n\n delete _this6.clickEvent;\n };\n\n this.willVisit = function () {\n delete _this6.clickEvent;\n };\n\n this.delegate = delegate;\n this.element = element;\n }\n\n _createClass(LinkInterceptor, [{\n key: \"start\",\n value: function start() {\n this.element.addEventListener(\"click\", this.clickBubbled);\n document.addEventListener(\"turbo:click\", this.linkClicked);\n document.addEventListener(\"turbo:before-visit\", this.willVisit);\n }\n }, {\n key: \"stop\",\n value: function stop() {\n this.element.removeEventListener(\"click\", this.clickBubbled);\n document.removeEventListener(\"turbo:click\", this.linkClicked);\n document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n }\n }, {\n key: \"respondsToEventTarget\",\n value: function respondsToEventTarget(target) {\n var element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n return element && element.closest(\"turbo-frame, html\") == this.element;\n }\n }]);\n\n return LinkInterceptor;\n}();\n\nvar Bardo = /*#__PURE__*/function () {\n function Bardo(permanentElementMap) {\n _classCallCheck(this, Bardo);\n\n this.permanentElementMap = permanentElementMap;\n }\n\n _createClass(Bardo, [{\n key: \"enter\",\n value: function enter() {\n for (var id in this.permanentElementMap) {\n var _this$permanentElemen = _slicedToArray(this.permanentElementMap[id], 2),\n newPermanentElement = _this$permanentElemen[1];\n\n this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n }\n }\n }, {\n key: \"leave\",\n value: function leave() {\n for (var id in this.permanentElementMap) {\n var _this$permanentElemen2 = _slicedToArray(this.permanentElementMap[id], 1),\n currentPermanentElement = _this$permanentElemen2[0];\n\n this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n }\n }\n }, {\n key: \"replaceNewPermanentElementWithPlaceholder\",\n value: function replaceNewPermanentElementWithPlaceholder(permanentElement) {\n var placeholder = createPlaceholderForPermanentElement(permanentElement);\n permanentElement.replaceWith(placeholder);\n }\n }, {\n key: \"replaceCurrentPermanentElementWithClone\",\n value: function replaceCurrentPermanentElementWithClone(permanentElement) {\n var clone = permanentElement.cloneNode(true);\n permanentElement.replaceWith(clone);\n }\n }, {\n key: \"replacePlaceholderWithPermanentElement\",\n value: function replacePlaceholderWithPermanentElement(permanentElement) {\n var placeholder = this.getPlaceholderById(permanentElement.id);\n placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);\n }\n }, {\n key: \"getPlaceholderById\",\n value: function getPlaceholderById(id) {\n return this.placeholders.find(function (element) {\n return element.content == id;\n });\n }\n }, {\n key: \"placeholders\",\n get: function get() {\n return _toConsumableArray(document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\"));\n }\n }], [{\n key: \"preservingPermanentElements\",\n value: function preservingPermanentElements(permanentElementMap, callback) {\n var bardo = new this(permanentElementMap);\n bardo.enter();\n callback();\n bardo.leave();\n }\n }]);\n\n return Bardo;\n}();\n\nfunction createPlaceholderForPermanentElement(permanentElement) {\n var element = document.createElement(\"meta\");\n element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n element.setAttribute(\"content\", permanentElement.id);\n return element;\n}\n\nvar Renderer = /*#__PURE__*/function () {\n function Renderer(currentSnapshot, newSnapshot, isPreview) {\n var _this7 = this;\n\n _classCallCheck(this, Renderer);\n\n this.currentSnapshot = currentSnapshot;\n this.newSnapshot = newSnapshot;\n this.isPreview = isPreview;\n this.promise = new Promise(function (resolve, reject) {\n return _this7.resolvingFunctions = {\n resolve: resolve,\n reject: reject\n };\n });\n }\n\n _createClass(Renderer, [{\n key: \"shouldRender\",\n get: function get() {\n return true;\n }\n }, {\n key: \"prepareToRender\",\n value: function prepareToRender() {\n return;\n }\n }, {\n key: \"finishRendering\",\n value: function finishRendering() {\n if (this.resolvingFunctions) {\n this.resolvingFunctions.resolve();\n delete this.resolvingFunctions;\n }\n }\n }, {\n key: \"createScriptElement\",\n value: function createScriptElement(element) {\n if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n return element;\n } else {\n var createdScriptElement = document.createElement(\"script\");\n\n if (this.cspNonce) {\n createdScriptElement.nonce = this.cspNonce;\n }\n\n createdScriptElement.textContent = element.textContent;\n createdScriptElement.async = false;\n copyElementAttributes(createdScriptElement, element);\n return createdScriptElement;\n }\n }\n }, {\n key: \"preservingPermanentElements\",\n value: function preservingPermanentElements(callback) {\n Bardo.preservingPermanentElements(this.permanentElementMap, callback);\n }\n }, {\n key: \"focusFirstAutofocusableElement\",\n value: function focusFirstAutofocusableElement() {\n var element = this.connectedSnapshot.firstAutofocusableElement;\n\n if (elementIsFocusable(element)) {\n element.focus();\n }\n }\n }, {\n key: \"connectedSnapshot\",\n get: function get() {\n return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n }\n }, {\n key: \"currentElement\",\n get: function get() {\n return this.currentSnapshot.element;\n }\n }, {\n key: \"newElement\",\n get: function get() {\n return this.newSnapshot.element;\n }\n }, {\n key: \"permanentElementMap\",\n get: function get() {\n return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n }\n }, {\n key: \"cspNonce\",\n get: function get() {\n var _a;\n\n return (_a = document.head.querySelector('meta[name=\"csp-nonce\"]')) === null || _a === void 0 ? void 0 : _a.getAttribute(\"content\");\n }\n }]);\n\n return Renderer;\n}();\n\nfunction copyElementAttributes(destinationElement, sourceElement) {\n for (var _i2 = 0, _arr2 = _toConsumableArray(sourceElement.attributes); _i2 < _arr2.length; _i2++) {\n var _ref9 = _arr2[_i2];\n var name = _ref9.name;\n var value = _ref9.value;\n destinationElement.setAttribute(name, value);\n }\n}\n\nfunction elementIsFocusable(element) {\n return element && typeof element.focus == \"function\";\n}\n\nvar FrameRenderer = /*#__PURE__*/function (_Renderer) {\n _inherits(FrameRenderer, _Renderer);\n\n var _super3 = _createSuper(FrameRenderer);\n\n function FrameRenderer() {\n _classCallCheck(this, FrameRenderer);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(FrameRenderer, [{\n key: \"shouldRender\",\n get: function get() {\n return true;\n }\n }, {\n key: \"render\",\n value: function () {\n var _render2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {\n var _this8 = this;\n\n return _regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n _context7.next = 2;\n return nextAnimationFrame();\n\n case 2:\n this.preservingPermanentElements(function () {\n _this8.loadFrameElement();\n });\n this.scrollFrameIntoView();\n _context7.next = 6;\n return nextAnimationFrame();\n\n case 6:\n this.focusFirstAutofocusableElement();\n _context7.next = 9;\n return nextAnimationFrame();\n\n case 9:\n this.activateScriptElements();\n\n case 10:\n case \"end\":\n return _context7.stop();\n }\n }\n }, _callee7, this);\n }));\n\n function render() {\n return _render2.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"loadFrameElement\",\n value: function loadFrameElement() {\n var _a;\n\n var destinationRange = document.createRange();\n destinationRange.selectNodeContents(this.currentElement);\n destinationRange.deleteContents();\n var frameElement = this.newElement;\n var sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();\n\n if (sourceRange) {\n sourceRange.selectNodeContents(frameElement);\n this.currentElement.appendChild(sourceRange.extractContents());\n }\n }\n }, {\n key: \"scrollFrameIntoView\",\n value: function scrollFrameIntoView() {\n if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n var element = this.currentElement.firstElementChild;\n var block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n\n if (element) {\n element.scrollIntoView({\n block: block\n });\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"activateScriptElements\",\n value: function activateScriptElements() {\n var _iterator4 = _createForOfIteratorHelper(this.newScriptElements),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var inertScriptElement = _step4.value;\n var activatedScriptElement = this.createScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n }, {\n key: \"newScriptElements\",\n get: function get() {\n return this.currentElement.querySelectorAll(\"script\");\n }\n }]);\n\n return FrameRenderer;\n}(Renderer);\n\nfunction readScrollLogicalPosition(value, defaultValue) {\n if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n return value;\n } else {\n return defaultValue;\n }\n}\n\nvar ProgressBar = /*#__PURE__*/function () {\n function ProgressBar() {\n var _this9 = this;\n\n _classCallCheck(this, ProgressBar);\n\n this.hiding = false;\n this.value = 0;\n this.visible = false;\n\n this.trickle = function () {\n _this9.setValue(_this9.value + Math.random() / 100);\n };\n\n this.stylesheetElement = this.createStylesheetElement();\n this.progressElement = this.createProgressElement();\n this.installStylesheetElement();\n this.setValue(0);\n }\n\n _createClass(ProgressBar, [{\n key: \"show\",\n value: function show() {\n if (!this.visible) {\n this.visible = true;\n this.installProgressElement();\n this.startTrickling();\n }\n }\n }, {\n key: \"hide\",\n value: function hide() {\n var _this10 = this;\n\n if (this.visible && !this.hiding) {\n this.hiding = true;\n this.fadeProgressElement(function () {\n _this10.uninstallProgressElement();\n\n _this10.stopTrickling();\n\n _this10.visible = false;\n _this10.hiding = false;\n });\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n this.value = value;\n this.refresh();\n }\n }, {\n key: \"installStylesheetElement\",\n value: function installStylesheetElement() {\n document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n }\n }, {\n key: \"installProgressElement\",\n value: function installProgressElement() {\n this.progressElement.style.width = \"0\";\n this.progressElement.style.opacity = \"1\";\n document.documentElement.insertBefore(this.progressElement, document.body);\n this.refresh();\n }\n }, {\n key: \"fadeProgressElement\",\n value: function fadeProgressElement(callback) {\n this.progressElement.style.opacity = \"0\";\n setTimeout(callback, ProgressBar.animationDuration * 1.5);\n }\n }, {\n key: \"uninstallProgressElement\",\n value: function uninstallProgressElement() {\n if (this.progressElement.parentNode) {\n document.documentElement.removeChild(this.progressElement);\n }\n }\n }, {\n key: \"startTrickling\",\n value: function startTrickling() {\n if (!this.trickleInterval) {\n this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n }\n }\n }, {\n key: \"stopTrickling\",\n value: function stopTrickling() {\n window.clearInterval(this.trickleInterval);\n delete this.trickleInterval;\n }\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this11 = this;\n\n requestAnimationFrame(function () {\n _this11.progressElement.style.width = \"\".concat(10 + _this11.value * 90, \"%\");\n });\n }\n }, {\n key: \"createStylesheetElement\",\n value: function createStylesheetElement() {\n var element = document.createElement(\"style\");\n element.type = \"text/css\";\n element.textContent = ProgressBar.defaultCSS;\n return element;\n }\n }, {\n key: \"createProgressElement\",\n value: function createProgressElement() {\n var element = document.createElement(\"div\");\n element.className = \"turbo-progress-bar\";\n return element;\n }\n }], [{\n key: \"defaultCSS\",\n get: function get() {\n return unindent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n .turbo-progress-bar {\\n position: fixed;\\n display: block;\\n top: 0;\\n left: 0;\\n height: 3px;\\n background: #0076ff;\\n z-index: 9999;\\n transition:\\n width \", \"ms ease-out,\\n opacity \", \"ms \", \"ms ease-in;\\n transform: translate3d(0, 0, 0);\\n }\\n \"])), ProgressBar.animationDuration, ProgressBar.animationDuration / 2, ProgressBar.animationDuration / 2);\n }\n }]);\n\n return ProgressBar;\n}();\n\nProgressBar.animationDuration = 300;\n\nvar HeadSnapshot = /*#__PURE__*/function (_Snapshot) {\n _inherits(HeadSnapshot, _Snapshot);\n\n var _super4 = _createSuper(HeadSnapshot);\n\n function HeadSnapshot() {\n var _this12;\n\n _classCallCheck(this, HeadSnapshot);\n\n _this12 = _super4.apply(this, arguments);\n _this12.detailsByOuterHTML = _this12.children.filter(function (element) {\n return !elementIsNoscript(element);\n }).map(function (element) {\n return elementWithoutNonce(element);\n }).reduce(function (result, element) {\n var outerHTML = element.outerHTML;\n var details = outerHTML in result ? result[outerHTML] : {\n type: elementType(element),\n tracked: elementIsTracked(element),\n elements: []\n };\n return Object.assign(Object.assign({}, result), _defineProperty({}, outerHTML, Object.assign(Object.assign({}, details), {\n elements: [].concat(_toConsumableArray(details.elements), [element])\n })));\n }, {});\n return _this12;\n }\n\n _createClass(HeadSnapshot, [{\n key: \"trackedElementSignature\",\n get: function get() {\n var _this13 = this;\n\n return Object.keys(this.detailsByOuterHTML).filter(function (outerHTML) {\n return _this13.detailsByOuterHTML[outerHTML].tracked;\n }).join(\"\");\n }\n }, {\n key: \"getScriptElementsNotInSnapshot\",\n value: function getScriptElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n }\n }, {\n key: \"getStylesheetElementsNotInSnapshot\",\n value: function getStylesheetElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n }\n }, {\n key: \"getElementsMatchingTypeNotInSnapshot\",\n value: function getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n var _this14 = this;\n\n return Object.keys(this.detailsByOuterHTML).filter(function (outerHTML) {\n return !(outerHTML in snapshot.detailsByOuterHTML);\n }).map(function (outerHTML) {\n return _this14.detailsByOuterHTML[outerHTML];\n }).filter(function (_ref10) {\n var type = _ref10.type;\n return type == matchedType;\n }).map(function (_ref11) {\n var _ref11$elements = _slicedToArray(_ref11.elements, 1),\n element = _ref11$elements[0];\n\n return element;\n });\n }\n }, {\n key: \"provisionalElements\",\n get: function get() {\n var _this15 = this;\n\n return Object.keys(this.detailsByOuterHTML).reduce(function (result, outerHTML) {\n var _this15$detailsByOute = _this15.detailsByOuterHTML[outerHTML],\n type = _this15$detailsByOute.type,\n tracked = _this15$detailsByOute.tracked,\n elements = _this15$detailsByOute.elements;\n\n if (type == null && !tracked) {\n return [].concat(_toConsumableArray(result), _toConsumableArray(elements));\n } else if (elements.length > 1) {\n return [].concat(_toConsumableArray(result), _toConsumableArray(elements.slice(1)));\n } else {\n return result;\n }\n }, []);\n }\n }, {\n key: \"getMetaValue\",\n value: function getMetaValue(name) {\n var element = this.findMetaElementByName(name);\n return element ? element.getAttribute(\"content\") : null;\n }\n }, {\n key: \"findMetaElementByName\",\n value: function findMetaElementByName(name) {\n var _this16 = this;\n\n return Object.keys(this.detailsByOuterHTML).reduce(function (result, outerHTML) {\n var _this16$detailsByOute = _slicedToArray(_this16.detailsByOuterHTML[outerHTML].elements, 1),\n element = _this16$detailsByOute[0];\n\n return elementIsMetaElementWithName(element, name) ? element : result;\n }, undefined);\n }\n }]);\n\n return HeadSnapshot;\n}(Snapshot);\n\nfunction elementType(element) {\n if (elementIsScript(element)) {\n return \"script\";\n } else if (elementIsStylesheet(element)) {\n return \"stylesheet\";\n }\n}\n\nfunction elementIsTracked(element) {\n return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\n\nfunction elementIsScript(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName == \"script\";\n}\n\nfunction elementIsNoscript(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName == \"noscript\";\n}\n\nfunction elementIsStylesheet(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName == \"style\" || tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\";\n}\n\nfunction elementIsMetaElementWithName(element, name) {\n var tagName = element.tagName.toLowerCase();\n return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\n\nfunction elementWithoutNonce(element) {\n if (element.hasAttribute(\"nonce\")) {\n element.setAttribute(\"nonce\", \"\");\n }\n\n return element;\n}\n\nvar PageSnapshot = /*#__PURE__*/function (_Snapshot2) {\n _inherits(PageSnapshot, _Snapshot2);\n\n var _super5 = _createSuper(PageSnapshot);\n\n function PageSnapshot(element, headSnapshot) {\n var _this17;\n\n _classCallCheck(this, PageSnapshot);\n\n _this17 = _super5.call(this, element);\n _this17.headSnapshot = headSnapshot;\n return _this17;\n }\n\n _createClass(PageSnapshot, [{\n key: \"clone\",\n value: function clone() {\n return new PageSnapshot(this.element.cloneNode(true), this.headSnapshot);\n }\n }, {\n key: \"headElement\",\n get: function get() {\n return this.headSnapshot.element;\n }\n }, {\n key: \"rootLocation\",\n get: function get() {\n var _a;\n\n var root = (_a = this.getSetting(\"root\")) !== null && _a !== void 0 ? _a : \"/\";\n return expandURL(root);\n }\n }, {\n key: \"cacheControlValue\",\n get: function get() {\n return this.getSetting(\"cache-control\");\n }\n }, {\n key: \"isPreviewable\",\n get: function get() {\n return this.cacheControlValue != \"no-preview\";\n }\n }, {\n key: \"isCacheable\",\n get: function get() {\n return this.cacheControlValue != \"no-cache\";\n }\n }, {\n key: \"isVisitable\",\n get: function get() {\n return this.getSetting(\"visit-control\") != \"reload\";\n }\n }, {\n key: \"getSetting\",\n value: function getSetting(name) {\n return this.headSnapshot.getMetaValue(\"turbo-\".concat(name));\n }\n }], [{\n key: \"fromHTMLString\",\n value: function fromHTMLString() {\n var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n return this.fromDocument(parseHTMLDocument(html));\n }\n }, {\n key: \"fromElement\",\n value: function fromElement(element) {\n return this.fromDocument(element.ownerDocument);\n }\n }, {\n key: \"fromDocument\",\n value: function fromDocument(_ref12) {\n var head = _ref12.head,\n body = _ref12.body;\n return new this(body, new HeadSnapshot(head));\n }\n }]);\n\n return PageSnapshot;\n}(Snapshot);\n\nvar TimingMetric;\n\n(function (TimingMetric) {\n TimingMetric[\"visitStart\"] = \"visitStart\";\n TimingMetric[\"requestStart\"] = \"requestStart\";\n TimingMetric[\"requestEnd\"] = \"requestEnd\";\n TimingMetric[\"visitEnd\"] = \"visitEnd\";\n})(TimingMetric || (TimingMetric = {}));\n\nvar VisitState;\n\n(function (VisitState) {\n VisitState[\"initialized\"] = \"initialized\";\n VisitState[\"started\"] = \"started\";\n VisitState[\"canceled\"] = \"canceled\";\n VisitState[\"failed\"] = \"failed\";\n VisitState[\"completed\"] = \"completed\";\n})(VisitState || (VisitState = {}));\n\nvar defaultOptions = {\n action: \"advance\",\n historyChanged: false\n};\nvar SystemStatusCode;\n\n(function (SystemStatusCode) {\n SystemStatusCode[SystemStatusCode[\"networkFailure\"] = 0] = \"networkFailure\";\n SystemStatusCode[SystemStatusCode[\"timeoutFailure\"] = -1] = \"timeoutFailure\";\n SystemStatusCode[SystemStatusCode[\"contentTypeMismatch\"] = -2] = \"contentTypeMismatch\";\n})(SystemStatusCode || (SystemStatusCode = {}));\n\nvar Visit = /*#__PURE__*/function () {\n function Visit(delegate, location, restorationIdentifier) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n _classCallCheck(this, Visit);\n\n this.identifier = uuid();\n this.timingMetrics = {};\n this.followedRedirect = false;\n this.historyChanged = false;\n this.scrolled = false;\n this.snapshotCached = false;\n this.state = VisitState.initialized;\n this.delegate = delegate;\n this.location = location;\n this.restorationIdentifier = restorationIdentifier || uuid();\n\n var _Object$assign2 = Object.assign(Object.assign({}, defaultOptions), options),\n action = _Object$assign2.action,\n historyChanged = _Object$assign2.historyChanged,\n referrer = _Object$assign2.referrer,\n snapshotHTML = _Object$assign2.snapshotHTML,\n response = _Object$assign2.response;\n\n this.action = action;\n this.historyChanged = historyChanged;\n this.referrer = referrer;\n this.snapshotHTML = snapshotHTML;\n this.response = response;\n this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);\n }\n\n _createClass(Visit, [{\n key: \"adapter\",\n get: function get() {\n return this.delegate.adapter;\n }\n }, {\n key: \"view\",\n get: function get() {\n return this.delegate.view;\n }\n }, {\n key: \"history\",\n get: function get() {\n return this.delegate.history;\n }\n }, {\n key: \"restorationData\",\n get: function get() {\n return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n }\n }, {\n key: \"silent\",\n get: function get() {\n return this.isSamePage;\n }\n }, {\n key: \"start\",\n value: function start() {\n if (this.state == VisitState.initialized) {\n this.recordTimingMetric(TimingMetric.visitStart);\n this.state = VisitState.started;\n this.adapter.visitStarted(this);\n this.delegate.visitStarted(this);\n }\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n if (this.state == VisitState.started) {\n if (this.request) {\n this.request.cancel();\n }\n\n this.cancelRender();\n this.state = VisitState.canceled;\n }\n }\n }, {\n key: \"complete\",\n value: function complete() {\n if (this.state == VisitState.started) {\n this.recordTimingMetric(TimingMetric.visitEnd);\n this.state = VisitState.completed;\n this.adapter.visitCompleted(this);\n this.delegate.visitCompleted(this);\n this.followRedirect();\n }\n }\n }, {\n key: \"fail\",\n value: function fail() {\n if (this.state == VisitState.started) {\n this.state = VisitState.failed;\n this.adapter.visitFailed(this);\n }\n }\n }, {\n key: \"changeHistory\",\n value: function changeHistory() {\n var _a;\n\n if (!this.historyChanged) {\n var actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? \"replace\" : this.action;\n var method = this.getHistoryMethodForAction(actionForHistory);\n this.history.update(method, this.location, this.restorationIdentifier);\n this.historyChanged = true;\n }\n }\n }, {\n key: \"issueRequest\",\n value: function issueRequest() {\n if (this.hasPreloadedResponse()) {\n this.simulateRequest();\n } else if (this.shouldIssueRequest() && !this.request) {\n this.request = new FetchRequest(this, FetchMethod.get, this.location);\n this.request.perform();\n }\n }\n }, {\n key: \"simulateRequest\",\n value: function simulateRequest() {\n if (this.response) {\n this.startRequest();\n this.recordResponse();\n this.finishRequest();\n }\n }\n }, {\n key: \"startRequest\",\n value: function startRequest() {\n this.recordTimingMetric(TimingMetric.requestStart);\n this.adapter.visitRequestStarted(this);\n }\n }, {\n key: \"recordResponse\",\n value: function recordResponse() {\n var response = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.response;\n this.response = response;\n\n if (response) {\n var statusCode = response.statusCode;\n\n if (isSuccessful(statusCode)) {\n this.adapter.visitRequestCompleted(this);\n } else {\n this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n }\n }\n }\n }, {\n key: \"finishRequest\",\n value: function finishRequest() {\n this.recordTimingMetric(TimingMetric.requestEnd);\n this.adapter.visitRequestFinished(this);\n }\n }, {\n key: \"loadResponse\",\n value: function loadResponse() {\n var _this18 = this;\n\n if (this.response) {\n var _this$response = this.response,\n statusCode = _this$response.statusCode,\n responseHTML = _this$response.responseHTML;\n this.render( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {\n return _regeneratorRuntime.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n _this18.cacheSnapshot();\n\n if (!_this18.view.renderPromise) {\n _context8.next = 4;\n break;\n }\n\n _context8.next = 4;\n return _this18.view.renderPromise;\n\n case 4:\n if (!(isSuccessful(statusCode) && responseHTML != null)) {\n _context8.next = 11;\n break;\n }\n\n _context8.next = 7;\n return _this18.view.renderPage(PageSnapshot.fromHTMLString(responseHTML));\n\n case 7:\n _this18.adapter.visitRendered(_this18);\n\n _this18.complete();\n\n _context8.next = 15;\n break;\n\n case 11:\n _context8.next = 13;\n return _this18.view.renderError(PageSnapshot.fromHTMLString(responseHTML));\n\n case 13:\n _this18.adapter.visitRendered(_this18);\n\n _this18.fail();\n\n case 15:\n case \"end\":\n return _context8.stop();\n }\n }\n }, _callee8);\n })));\n }\n }\n }, {\n key: \"getCachedSnapshot\",\n value: function getCachedSnapshot() {\n var snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n\n if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n if (this.action == \"restore\" || snapshot.isPreviewable) {\n return snapshot;\n }\n }\n }\n }, {\n key: \"getPreloadedSnapshot\",\n value: function getPreloadedSnapshot() {\n if (this.snapshotHTML) {\n return PageSnapshot.fromHTMLString(this.snapshotHTML);\n }\n }\n }, {\n key: \"hasCachedSnapshot\",\n value: function hasCachedSnapshot() {\n return this.getCachedSnapshot() != null;\n }\n }, {\n key: \"loadCachedSnapshot\",\n value: function loadCachedSnapshot() {\n var _this19 = this;\n\n var snapshot = this.getCachedSnapshot();\n\n if (snapshot) {\n var isPreview = this.shouldIssueRequest();\n this.render( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {\n return _regeneratorRuntime.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n _this19.cacheSnapshot();\n\n if (!_this19.isSamePage) {\n _context9.next = 5;\n break;\n }\n\n _this19.adapter.visitRendered(_this19);\n\n _context9.next = 12;\n break;\n\n case 5:\n if (!_this19.view.renderPromise) {\n _context9.next = 8;\n break;\n }\n\n _context9.next = 8;\n return _this19.view.renderPromise;\n\n case 8:\n _context9.next = 10;\n return _this19.view.renderPage(snapshot, isPreview);\n\n case 10:\n _this19.adapter.visitRendered(_this19);\n\n if (!isPreview) {\n _this19.complete();\n }\n\n case 12:\n case \"end\":\n return _context9.stop();\n }\n }\n }, _callee9);\n })));\n }\n }\n }, {\n key: \"followRedirect\",\n value: function followRedirect() {\n if (this.redirectedToLocation && !this.followedRedirect) {\n this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n action: 'replace',\n response: this.response\n });\n this.followedRedirect = true;\n }\n }\n }, {\n key: \"goToSamePageAnchor\",\n value: function goToSamePageAnchor() {\n var _this20 = this;\n\n if (this.isSamePage) {\n this.render( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {\n return _regeneratorRuntime.wrap(function _callee10$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n _this20.cacheSnapshot();\n\n _this20.adapter.visitRendered(_this20);\n\n case 2:\n case \"end\":\n return _context10.stop();\n }\n }\n }, _callee10);\n })));\n }\n }\n }, {\n key: \"requestStarted\",\n value: function requestStarted() {\n this.startRequest();\n }\n }, {\n key: \"requestPreventedHandlingResponse\",\n value: function requestPreventedHandlingResponse(request, response) {}\n }, {\n key: \"requestSucceededWithResponse\",\n value: function () {\n var _requestSucceededWithResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(request, response) {\n var responseHTML;\n return _regeneratorRuntime.wrap(function _callee11$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n _context11.next = 2;\n return response.responseHTML;\n\n case 2:\n responseHTML = _context11.sent;\n\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch\n });\n } else {\n this.redirectedToLocation = response.redirected ? response.location : undefined;\n this.recordResponse({\n statusCode: response.statusCode,\n responseHTML: responseHTML\n });\n }\n\n case 4:\n case \"end\":\n return _context11.stop();\n }\n }\n }, _callee11, this);\n }));\n\n function requestSucceededWithResponse(_x5, _x6) {\n return _requestSucceededWithResponse.apply(this, arguments);\n }\n\n return requestSucceededWithResponse;\n }()\n }, {\n key: \"requestFailedWithResponse\",\n value: function () {\n var _requestFailedWithResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(request, response) {\n var responseHTML;\n return _regeneratorRuntime.wrap(function _callee12$(_context12) {\n while (1) {\n switch (_context12.prev = _context12.next) {\n case 0:\n _context12.next = 2;\n return response.responseHTML;\n\n case 2:\n responseHTML = _context12.sent;\n\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch\n });\n } else {\n this.recordResponse({\n statusCode: response.statusCode,\n responseHTML: responseHTML\n });\n }\n\n case 4:\n case \"end\":\n return _context12.stop();\n }\n }\n }, _callee12, this);\n }));\n\n function requestFailedWithResponse(_x7, _x8) {\n return _requestFailedWithResponse.apply(this, arguments);\n }\n\n return requestFailedWithResponse;\n }()\n }, {\n key: \"requestErrored\",\n value: function requestErrored(request, error) {\n this.recordResponse({\n statusCode: SystemStatusCode.networkFailure\n });\n }\n }, {\n key: \"requestFinished\",\n value: function requestFinished() {\n this.finishRequest();\n }\n }, {\n key: \"performScroll\",\n value: function performScroll() {\n if (!this.scrolled) {\n if (this.action == \"restore\") {\n this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n } else {\n this.scrollToAnchor() || this.view.scrollToTop();\n }\n\n if (this.isSamePage) {\n this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n }\n\n this.scrolled = true;\n }\n }\n }, {\n key: \"scrollToRestoredPosition\",\n value: function scrollToRestoredPosition() {\n var scrollPosition = this.restorationData.scrollPosition;\n\n if (scrollPosition) {\n this.view.scrollToPosition(scrollPosition);\n return true;\n }\n }\n }, {\n key: \"scrollToAnchor\",\n value: function scrollToAnchor() {\n var anchor = getAnchor(this.location);\n\n if (anchor != null) {\n this.view.scrollToAnchor(anchor);\n return true;\n }\n }\n }, {\n key: \"recordTimingMetric\",\n value: function recordTimingMetric(metric) {\n this.timingMetrics[metric] = new Date().getTime();\n }\n }, {\n key: \"getTimingMetrics\",\n value: function getTimingMetrics() {\n return Object.assign({}, this.timingMetrics);\n }\n }, {\n key: \"getHistoryMethodForAction\",\n value: function getHistoryMethodForAction(action) {\n switch (action) {\n case \"replace\":\n return history.replaceState;\n\n case \"advance\":\n case \"restore\":\n return history.pushState;\n }\n }\n }, {\n key: \"hasPreloadedResponse\",\n value: function hasPreloadedResponse() {\n return _typeof(this.response) == \"object\";\n }\n }, {\n key: \"shouldIssueRequest\",\n value: function shouldIssueRequest() {\n if (this.isSamePage) {\n return false;\n } else if (this.action == \"restore\") {\n return !this.hasCachedSnapshot();\n } else {\n return true;\n }\n }\n }, {\n key: \"cacheSnapshot\",\n value: function cacheSnapshot() {\n if (!this.snapshotCached) {\n this.view.cacheSnapshot();\n this.snapshotCached = true;\n }\n }\n }, {\n key: \"render\",\n value: function () {\n var _render3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(callback) {\n var _this21 = this;\n\n return _regeneratorRuntime.wrap(function _callee13$(_context13) {\n while (1) {\n switch (_context13.prev = _context13.next) {\n case 0:\n this.cancelRender();\n _context13.next = 3;\n return new Promise(function (resolve) {\n _this21.frame = requestAnimationFrame(function () {\n return resolve();\n });\n });\n\n case 3:\n _context13.next = 5;\n return callback();\n\n case 5:\n delete this.frame;\n this.performScroll();\n\n case 7:\n case \"end\":\n return _context13.stop();\n }\n }\n }, _callee13, this);\n }));\n\n function render(_x9) {\n return _render3.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"cancelRender\",\n value: function cancelRender() {\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n delete this.frame;\n }\n }\n }]);\n\n return Visit;\n}();\n\nfunction isSuccessful(statusCode) {\n return statusCode >= 200 && statusCode < 300;\n}\n\nvar BrowserAdapter = /*#__PURE__*/function () {\n function BrowserAdapter(session) {\n var _this22 = this;\n\n _classCallCheck(this, BrowserAdapter);\n\n this.progressBar = new ProgressBar();\n\n this.showProgressBar = function () {\n _this22.progressBar.show();\n };\n\n this.session = session;\n }\n\n _createClass(BrowserAdapter, [{\n key: \"visitProposedToLocation\",\n value: function visitProposedToLocation(location, options) {\n this.navigator.startVisit(location, uuid(), options);\n }\n }, {\n key: \"visitStarted\",\n value: function visitStarted(visit) {\n visit.issueRequest();\n visit.changeHistory();\n visit.goToSamePageAnchor();\n visit.loadCachedSnapshot();\n }\n }, {\n key: \"visitRequestStarted\",\n value: function visitRequestStarted(visit) {\n this.progressBar.setValue(0);\n\n if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n this.showVisitProgressBarAfterDelay();\n } else {\n this.showProgressBar();\n }\n }\n }, {\n key: \"visitRequestCompleted\",\n value: function visitRequestCompleted(visit) {\n visit.loadResponse();\n }\n }, {\n key: \"visitRequestFailedWithStatusCode\",\n value: function visitRequestFailedWithStatusCode(visit, statusCode) {\n switch (statusCode) {\n case SystemStatusCode.networkFailure:\n case SystemStatusCode.timeoutFailure:\n case SystemStatusCode.contentTypeMismatch:\n return this.reload();\n\n default:\n return visit.loadResponse();\n }\n }\n }, {\n key: \"visitRequestFinished\",\n value: function visitRequestFinished(visit) {\n this.progressBar.setValue(1);\n this.hideVisitProgressBar();\n }\n }, {\n key: \"visitCompleted\",\n value: function visitCompleted(visit) {}\n }, {\n key: \"pageInvalidated\",\n value: function pageInvalidated() {\n this.reload();\n }\n }, {\n key: \"visitFailed\",\n value: function visitFailed(visit) {}\n }, {\n key: \"visitRendered\",\n value: function visitRendered(visit) {}\n }, {\n key: \"formSubmissionStarted\",\n value: function formSubmissionStarted(formSubmission) {\n this.progressBar.setValue(0);\n this.showFormProgressBarAfterDelay();\n }\n }, {\n key: \"formSubmissionFinished\",\n value: function formSubmissionFinished(formSubmission) {\n this.progressBar.setValue(1);\n this.hideFormProgressBar();\n }\n }, {\n key: \"showVisitProgressBarAfterDelay\",\n value: function showVisitProgressBarAfterDelay() {\n this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n }, {\n key: \"hideVisitProgressBar\",\n value: function hideVisitProgressBar() {\n this.progressBar.hide();\n\n if (this.visitProgressBarTimeout != null) {\n window.clearTimeout(this.visitProgressBarTimeout);\n delete this.visitProgressBarTimeout;\n }\n }\n }, {\n key: \"showFormProgressBarAfterDelay\",\n value: function showFormProgressBarAfterDelay() {\n if (this.formProgressBarTimeout == null) {\n this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n }\n }, {\n key: \"hideFormProgressBar\",\n value: function hideFormProgressBar() {\n this.progressBar.hide();\n\n if (this.formProgressBarTimeout != null) {\n window.clearTimeout(this.formProgressBarTimeout);\n delete this.formProgressBarTimeout;\n }\n }\n }, {\n key: \"reload\",\n value: function reload() {\n window.location.reload();\n }\n }, {\n key: \"navigator\",\n get: function get() {\n return this.session.navigator;\n }\n }]);\n\n return BrowserAdapter;\n}();\n\nvar CacheObserver = /*#__PURE__*/function () {\n function CacheObserver() {\n _classCallCheck(this, CacheObserver);\n\n this.started = false;\n }\n\n _createClass(CacheObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n }\n }\n }, {\n key: \"removeStaleElements\",\n value: function removeStaleElements() {\n var staleElements = _toConsumableArray(document.querySelectorAll('[data-turbo-cache=\"false\"]'));\n\n var _iterator5 = _createForOfIteratorHelper(staleElements),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var element = _step5.value;\n element.remove();\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n }\n }]);\n\n return CacheObserver;\n}();\n\nvar FormSubmitObserver = /*#__PURE__*/function () {\n function FormSubmitObserver(delegate) {\n var _this23 = this;\n\n _classCallCheck(this, FormSubmitObserver);\n\n this.started = false;\n\n this.submitCaptured = function () {\n removeEventListener(\"submit\", _this23.submitBubbled, false);\n addEventListener(\"submit\", _this23.submitBubbled, false);\n };\n\n this.submitBubbled = function (event) {\n if (!event.defaultPrevented) {\n var form = event.target instanceof HTMLFormElement ? event.target : undefined;\n var submitter = event.submitter || undefined;\n\n if (form) {\n var method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.method;\n\n if (method != \"dialog\" && _this23.delegate.willSubmitForm(form, submitter)) {\n event.preventDefault();\n\n _this23.delegate.formSubmitted(form, submitter);\n }\n }\n }\n };\n\n this.delegate = delegate;\n }\n\n _createClass(FormSubmitObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n addEventListener(\"submit\", this.submitCaptured, true);\n this.started = true;\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n removeEventListener(\"submit\", this.submitCaptured, true);\n this.started = false;\n }\n }\n }]);\n\n return FormSubmitObserver;\n}();\n\nvar FrameRedirector = /*#__PURE__*/function () {\n function FrameRedirector(element) {\n _classCallCheck(this, FrameRedirector);\n\n this.element = element;\n this.linkInterceptor = new LinkInterceptor(this, element);\n this.formInterceptor = new FormInterceptor(this, element);\n }\n\n _createClass(FrameRedirector, [{\n key: \"start\",\n value: function start() {\n this.linkInterceptor.start();\n this.formInterceptor.start();\n }\n }, {\n key: \"stop\",\n value: function stop() {\n this.linkInterceptor.stop();\n this.formInterceptor.stop();\n }\n }, {\n key: \"shouldInterceptLinkClick\",\n value: function shouldInterceptLinkClick(element, url) {\n return this.shouldRedirect(element);\n }\n }, {\n key: \"linkClickIntercepted\",\n value: function linkClickIntercepted(element, url) {\n var frame = this.findFrameElement(element);\n\n if (frame) {\n frame.setAttribute(\"reloadable\", \"\");\n frame.src = url;\n }\n }\n }, {\n key: \"shouldInterceptFormSubmission\",\n value: function shouldInterceptFormSubmission(element, submitter) {\n return this.shouldRedirect(element, submitter);\n }\n }, {\n key: \"formSubmissionIntercepted\",\n value: function formSubmissionIntercepted(element, submitter) {\n var frame = this.findFrameElement(element, submitter);\n\n if (frame) {\n frame.removeAttribute(\"reloadable\");\n frame.delegate.formSubmissionIntercepted(element, submitter);\n }\n }\n }, {\n key: \"shouldRedirect\",\n value: function shouldRedirect(element, submitter) {\n var frame = this.findFrameElement(element, submitter);\n return frame ? frame != element.closest(\"turbo-frame\") : false;\n }\n }, {\n key: \"findFrameElement\",\n value: function findFrameElement(element, submitter) {\n var id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\");\n\n if (id && id != \"_top\") {\n var frame = this.element.querySelector(\"#\".concat(id, \":not([disabled])\"));\n\n if (frame instanceof FrameElement) {\n return frame;\n }\n }\n }\n }]);\n\n return FrameRedirector;\n}();\n\nvar History = /*#__PURE__*/function () {\n function History(delegate) {\n var _this24 = this;\n\n _classCallCheck(this, History);\n\n this.restorationIdentifier = uuid();\n this.restorationData = {};\n this.started = false;\n this.pageLoaded = false;\n\n this.onPopState = function (event) {\n if (_this24.shouldHandlePopState()) {\n var _ref16 = event.state || {},\n turbo = _ref16.turbo;\n\n if (turbo) {\n _this24.location = new URL(window.location.href);\n var restorationIdentifier = turbo.restorationIdentifier;\n _this24.restorationIdentifier = restorationIdentifier;\n\n _this24.delegate.historyPoppedToLocationWithRestorationIdentifier(_this24.location, restorationIdentifier);\n }\n }\n };\n\n this.onPageLoad = /*#__PURE__*/function () {\n var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(event) {\n return _regeneratorRuntime.wrap(function _callee14$(_context14) {\n while (1) {\n switch (_context14.prev = _context14.next) {\n case 0:\n _context14.next = 2;\n return nextMicrotask();\n\n case 2:\n _this24.pageLoaded = true;\n\n case 3:\n case \"end\":\n return _context14.stop();\n }\n }\n }, _callee14);\n }));\n\n return function (_x10) {\n return _ref17.apply(this, arguments);\n };\n }();\n\n this.delegate = delegate;\n }\n\n _createClass(History, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n addEventListener(\"popstate\", this.onPopState, false);\n addEventListener(\"load\", this.onPageLoad, false);\n this.started = true;\n this.replace(new URL(window.location.href));\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n removeEventListener(\"popstate\", this.onPopState, false);\n removeEventListener(\"load\", this.onPageLoad, false);\n this.started = false;\n }\n }\n }, {\n key: \"push\",\n value: function push(location, restorationIdentifier) {\n this.update(history.pushState, location, restorationIdentifier);\n }\n }, {\n key: \"replace\",\n value: function replace(location, restorationIdentifier) {\n this.update(history.replaceState, location, restorationIdentifier);\n }\n }, {\n key: \"update\",\n value: function update(method, location) {\n var restorationIdentifier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : uuid();\n var state = {\n turbo: {\n restorationIdentifier: restorationIdentifier\n }\n };\n method.call(history, state, \"\", location.href);\n this.location = location;\n this.restorationIdentifier = restorationIdentifier;\n }\n }, {\n key: \"getRestorationDataForIdentifier\",\n value: function getRestorationDataForIdentifier(restorationIdentifier) {\n return this.restorationData[restorationIdentifier] || {};\n }\n }, {\n key: \"updateRestorationData\",\n value: function updateRestorationData(additionalData) {\n var restorationIdentifier = this.restorationIdentifier;\n var restorationData = this.restorationData[restorationIdentifier];\n this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);\n }\n }, {\n key: \"assumeControlOfScrollRestoration\",\n value: function assumeControlOfScrollRestoration() {\n var _a;\n\n if (!this.previousScrollRestoration) {\n this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : \"auto\";\n history.scrollRestoration = \"manual\";\n }\n }\n }, {\n key: \"relinquishControlOfScrollRestoration\",\n value: function relinquishControlOfScrollRestoration() {\n if (this.previousScrollRestoration) {\n history.scrollRestoration = this.previousScrollRestoration;\n delete this.previousScrollRestoration;\n }\n }\n }, {\n key: \"shouldHandlePopState\",\n value: function shouldHandlePopState() {\n return this.pageIsLoaded();\n }\n }, {\n key: \"pageIsLoaded\",\n value: function pageIsLoaded() {\n return this.pageLoaded || document.readyState == \"complete\";\n }\n }]);\n\n return History;\n}();\n\nvar LinkClickObserver = /*#__PURE__*/function () {\n function LinkClickObserver(delegate) {\n var _this25 = this;\n\n _classCallCheck(this, LinkClickObserver);\n\n this.started = false;\n\n this.clickCaptured = function () {\n removeEventListener(\"click\", _this25.clickBubbled, false);\n addEventListener(\"click\", _this25.clickBubbled, false);\n };\n\n this.clickBubbled = function (event) {\n if (_this25.clickEventIsSignificant(event)) {\n var target = event.composedPath && event.composedPath()[0] || event.target;\n\n var link = _this25.findLinkFromClickTarget(target);\n\n if (link) {\n var _location = _this25.getLocationForLink(link);\n\n if (_this25.delegate.willFollowLinkToLocation(link, _location)) {\n event.preventDefault();\n\n _this25.delegate.followedLinkToLocation(link, _location);\n }\n }\n }\n };\n\n this.delegate = delegate;\n }\n\n _createClass(LinkClickObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n addEventListener(\"click\", this.clickCaptured, true);\n this.started = true;\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n removeEventListener(\"click\", this.clickCaptured, true);\n this.started = false;\n }\n }\n }, {\n key: \"clickEventIsSignificant\",\n value: function clickEventIsSignificant(event) {\n return !(event.target && event.target.isContentEditable || event.defaultPrevented || event.which > 1 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);\n }\n }, {\n key: \"findLinkFromClickTarget\",\n value: function findLinkFromClickTarget(target) {\n if (target instanceof Element) {\n return target.closest(\"a[href]:not([target^=_]):not([download])\");\n }\n }\n }, {\n key: \"getLocationForLink\",\n value: function getLocationForLink(link) {\n return expandURL(link.getAttribute(\"href\") || \"\");\n }\n }]);\n\n return LinkClickObserver;\n}();\n\nfunction isAction(action) {\n return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\n\nvar Navigator = /*#__PURE__*/function () {\n function Navigator(delegate) {\n _classCallCheck(this, Navigator);\n\n this.delegate = delegate;\n }\n\n _createClass(Navigator, [{\n key: \"proposeVisit\",\n value: function proposeVisit(location) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n this.delegate.visitProposedToLocation(location, options);\n }\n }\n }, {\n key: \"startVisit\",\n value: function startVisit(locatable, restorationIdentifier) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n this.stop();\n this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({\n referrer: this.location\n }, options));\n this.currentVisit.start();\n }\n }, {\n key: \"submitForm\",\n value: function submitForm(form, submitter) {\n this.stop();\n this.formSubmission = new FormSubmission(this, form, submitter, true);\n\n if (this.formSubmission.isIdempotent) {\n this.proposeVisit(this.formSubmission.fetchRequest.url, {\n action: this.getActionForFormSubmission(this.formSubmission)\n });\n } else {\n this.formSubmission.start();\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.formSubmission) {\n this.formSubmission.stop();\n delete this.formSubmission;\n }\n\n if (this.currentVisit) {\n this.currentVisit.cancel();\n delete this.currentVisit;\n }\n }\n }, {\n key: \"adapter\",\n get: function get() {\n return this.delegate.adapter;\n }\n }, {\n key: \"view\",\n get: function get() {\n return this.delegate.view;\n }\n }, {\n key: \"history\",\n get: function get() {\n return this.delegate.history;\n }\n }, {\n key: \"formSubmissionStarted\",\n value: function formSubmissionStarted(formSubmission) {\n if (typeof this.adapter.formSubmissionStarted === 'function') {\n this.adapter.formSubmissionStarted(formSubmission);\n }\n }\n }, {\n key: \"formSubmissionSucceededWithResponse\",\n value: function () {\n var _formSubmissionSucceededWithResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(formSubmission, fetchResponse) {\n var responseHTML, statusCode, visitOptions;\n return _regeneratorRuntime.wrap(function _callee15$(_context15) {\n while (1) {\n switch (_context15.prev = _context15.next) {\n case 0:\n if (!(formSubmission == this.formSubmission)) {\n _context15.next = 5;\n break;\n }\n\n _context15.next = 3;\n return fetchResponse.responseHTML;\n\n case 3:\n responseHTML = _context15.sent;\n\n if (responseHTML) {\n if (formSubmission.method != FetchMethod.get) {\n this.view.clearSnapshotCache();\n }\n\n statusCode = fetchResponse.statusCode;\n visitOptions = {\n response: {\n statusCode: statusCode,\n responseHTML: responseHTML\n }\n };\n this.proposeVisit(fetchResponse.location, visitOptions);\n }\n\n case 5:\n case \"end\":\n return _context15.stop();\n }\n }\n }, _callee15, this);\n }));\n\n function formSubmissionSucceededWithResponse(_x11, _x12) {\n return _formSubmissionSucceededWithResponse.apply(this, arguments);\n }\n\n return formSubmissionSucceededWithResponse;\n }()\n }, {\n key: \"formSubmissionFailedWithResponse\",\n value: function () {\n var _formSubmissionFailedWithResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(formSubmission, fetchResponse) {\n var responseHTML, snapshot;\n return _regeneratorRuntime.wrap(function _callee16$(_context16) {\n while (1) {\n switch (_context16.prev = _context16.next) {\n case 0:\n _context16.next = 2;\n return fetchResponse.responseHTML;\n\n case 2:\n responseHTML = _context16.sent;\n\n if (!responseHTML) {\n _context16.next = 14;\n break;\n }\n\n snapshot = PageSnapshot.fromHTMLString(responseHTML);\n\n if (!fetchResponse.serverError) {\n _context16.next = 10;\n break;\n }\n\n _context16.next = 8;\n return this.view.renderError(snapshot);\n\n case 8:\n _context16.next = 12;\n break;\n\n case 10:\n _context16.next = 12;\n return this.view.renderPage(snapshot);\n\n case 12:\n this.view.scrollToTop();\n this.view.clearSnapshotCache();\n\n case 14:\n case \"end\":\n return _context16.stop();\n }\n }\n }, _callee16, this);\n }));\n\n function formSubmissionFailedWithResponse(_x13, _x14) {\n return _formSubmissionFailedWithResponse.apply(this, arguments);\n }\n\n return formSubmissionFailedWithResponse;\n }()\n }, {\n key: \"formSubmissionErrored\",\n value: function formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n }, {\n key: \"formSubmissionFinished\",\n value: function formSubmissionFinished(formSubmission) {\n if (typeof this.adapter.formSubmissionFinished === 'function') {\n this.adapter.formSubmissionFinished(formSubmission);\n }\n }\n }, {\n key: \"visitStarted\",\n value: function visitStarted(visit) {\n this.delegate.visitStarted(visit);\n }\n }, {\n key: \"visitCompleted\",\n value: function visitCompleted(visit) {\n this.delegate.visitCompleted(visit);\n }\n }, {\n key: \"locationWithActionIsSamePage\",\n value: function locationWithActionIsSamePage(location, action) {\n var anchor = getAnchor(location);\n var currentAnchor = getAnchor(this.view.lastRenderedLocation);\n var isRestorationToTop = action === 'restore' && typeof anchor === 'undefined';\n return action !== \"replace\" && getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) && (isRestorationToTop || anchor != null && anchor !== currentAnchor);\n }\n }, {\n key: \"visitScrolledToSamePageLocation\",\n value: function visitScrolledToSamePageLocation(oldURL, newURL) {\n this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n }\n }, {\n key: \"location\",\n get: function get() {\n return this.history.location;\n }\n }, {\n key: \"restorationIdentifier\",\n get: function get() {\n return this.history.restorationIdentifier;\n }\n }, {\n key: \"getActionForFormSubmission\",\n value: function getActionForFormSubmission(formSubmission) {\n var formElement = formSubmission.formElement,\n submitter = formSubmission.submitter;\n var action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-action\")) || formElement.getAttribute(\"data-turbo-action\");\n return isAction(action) ? action : \"advance\";\n }\n }]);\n\n return Navigator;\n}();\n\nvar PageStage;\n\n(function (PageStage) {\n PageStage[PageStage[\"initial\"] = 0] = \"initial\";\n PageStage[PageStage[\"loading\"] = 1] = \"loading\";\n PageStage[PageStage[\"interactive\"] = 2] = \"interactive\";\n PageStage[PageStage[\"complete\"] = 3] = \"complete\";\n})(PageStage || (PageStage = {}));\n\nvar PageObserver = /*#__PURE__*/function () {\n function PageObserver(delegate) {\n var _this26 = this;\n\n _classCallCheck(this, PageObserver);\n\n this.stage = PageStage.initial;\n this.started = false;\n\n this.interpretReadyState = function () {\n var readyState = _this26.readyState;\n\n if (readyState == \"interactive\") {\n _this26.pageIsInteractive();\n } else if (readyState == \"complete\") {\n _this26.pageIsComplete();\n }\n };\n\n this.pageWillUnload = function () {\n _this26.delegate.pageWillUnload();\n };\n\n this.delegate = delegate;\n }\n\n _createClass(PageObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n if (this.stage == PageStage.initial) {\n this.stage = PageStage.loading;\n }\n\n document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n addEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = true;\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n removeEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = false;\n }\n }\n }, {\n key: \"pageIsInteractive\",\n value: function pageIsInteractive() {\n if (this.stage == PageStage.loading) {\n this.stage = PageStage.interactive;\n this.delegate.pageBecameInteractive();\n }\n }\n }, {\n key: \"pageIsComplete\",\n value: function pageIsComplete() {\n this.pageIsInteractive();\n\n if (this.stage == PageStage.interactive) {\n this.stage = PageStage.complete;\n this.delegate.pageLoaded();\n }\n }\n }, {\n key: \"readyState\",\n get: function get() {\n return document.readyState;\n }\n }]);\n\n return PageObserver;\n}();\n\nvar ScrollObserver = /*#__PURE__*/function () {\n function ScrollObserver(delegate) {\n var _this27 = this;\n\n _classCallCheck(this, ScrollObserver);\n\n this.started = false;\n\n this.onScroll = function () {\n _this27.updatePosition({\n x: window.pageXOffset,\n y: window.pageYOffset\n });\n };\n\n this.delegate = delegate;\n }\n\n _createClass(ScrollObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n addEventListener(\"scroll\", this.onScroll, false);\n this.onScroll();\n this.started = true;\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n removeEventListener(\"scroll\", this.onScroll, false);\n this.started = false;\n }\n }\n }, {\n key: \"updatePosition\",\n value: function updatePosition(position) {\n this.delegate.scrollPositionChanged(position);\n }\n }]);\n\n return ScrollObserver;\n}();\n\nvar StreamObserver = /*#__PURE__*/function () {\n function StreamObserver(delegate) {\n var _this28 = this;\n\n _classCallCheck(this, StreamObserver);\n\n this.sources = new Set();\n this.started = false;\n\n this.inspectFetchResponse = function (event) {\n var response = fetchResponseFromEvent(event);\n\n if (response && fetchResponseIsStream(response)) {\n event.preventDefault();\n\n _this28.receiveMessageResponse(response);\n }\n };\n\n this.receiveMessageEvent = function (event) {\n if (_this28.started && typeof event.data == \"string\") {\n _this28.receiveMessageHTML(event.data);\n }\n };\n\n this.delegate = delegate;\n }\n\n _createClass(StreamObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n }, {\n key: \"connectStreamSource\",\n value: function connectStreamSource(source) {\n if (!this.streamSourceIsConnected(source)) {\n this.sources.add(source);\n source.addEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n }, {\n key: \"disconnectStreamSource\",\n value: function disconnectStreamSource(source) {\n if (this.streamSourceIsConnected(source)) {\n this.sources.delete(source);\n source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n }, {\n key: \"streamSourceIsConnected\",\n value: function streamSourceIsConnected(source) {\n return this.sources.has(source);\n }\n }, {\n key: \"receiveMessageResponse\",\n value: function () {\n var _receiveMessageResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(response) {\n var html;\n return _regeneratorRuntime.wrap(function _callee17$(_context17) {\n while (1) {\n switch (_context17.prev = _context17.next) {\n case 0:\n _context17.next = 2;\n return response.responseHTML;\n\n case 2:\n html = _context17.sent;\n\n if (html) {\n this.receiveMessageHTML(html);\n }\n\n case 4:\n case \"end\":\n return _context17.stop();\n }\n }\n }, _callee17, this);\n }));\n\n function receiveMessageResponse(_x15) {\n return _receiveMessageResponse.apply(this, arguments);\n }\n\n return receiveMessageResponse;\n }()\n }, {\n key: \"receiveMessageHTML\",\n value: function receiveMessageHTML(html) {\n this.delegate.receivedMessageFromStream(new StreamMessage(html));\n }\n }]);\n\n return StreamObserver;\n}();\n\nfunction fetchResponseFromEvent(event) {\n var _a;\n\n var fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;\n\n if (fetchResponse instanceof FetchResponse) {\n return fetchResponse;\n }\n}\n\nfunction fetchResponseIsStream(response) {\n var _a;\n\n var contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : \"\";\n return contentType.startsWith(StreamMessage.contentType);\n}\n\nvar ErrorRenderer = /*#__PURE__*/function (_Renderer2) {\n _inherits(ErrorRenderer, _Renderer2);\n\n var _super6 = _createSuper(ErrorRenderer);\n\n function ErrorRenderer() {\n _classCallCheck(this, ErrorRenderer);\n\n return _super6.apply(this, arguments);\n }\n\n _createClass(ErrorRenderer, [{\n key: \"render\",\n value: function () {\n var _render4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {\n return _regeneratorRuntime.wrap(function _callee18$(_context18) {\n while (1) {\n switch (_context18.prev = _context18.next) {\n case 0:\n this.replaceHeadAndBody();\n this.activateScriptElements();\n\n case 2:\n case \"end\":\n return _context18.stop();\n }\n }\n }, _callee18, this);\n }));\n\n function render() {\n return _render4.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"replaceHeadAndBody\",\n value: function replaceHeadAndBody() {\n var _document = document,\n documentElement = _document.documentElement,\n head = _document.head,\n body = _document.body;\n documentElement.replaceChild(this.newHead, head);\n documentElement.replaceChild(this.newElement, body);\n }\n }, {\n key: \"activateScriptElements\",\n value: function activateScriptElements() {\n var _iterator6 = _createForOfIteratorHelper(this.scriptElements),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var replaceableElement = _step6.value;\n var parentNode = replaceableElement.parentNode;\n\n if (parentNode) {\n var element = this.createScriptElement(replaceableElement);\n parentNode.replaceChild(element, replaceableElement);\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n }\n }, {\n key: \"newHead\",\n get: function get() {\n return this.newSnapshot.headSnapshot.element;\n }\n }, {\n key: \"scriptElements\",\n get: function get() {\n return _toConsumableArray(document.documentElement.querySelectorAll(\"script\"));\n }\n }]);\n\n return ErrorRenderer;\n}(Renderer);\n\nvar PageRenderer = /*#__PURE__*/function (_Renderer3) {\n _inherits(PageRenderer, _Renderer3);\n\n var _super7 = _createSuper(PageRenderer);\n\n function PageRenderer() {\n _classCallCheck(this, PageRenderer);\n\n return _super7.apply(this, arguments);\n }\n\n _createClass(PageRenderer, [{\n key: \"shouldRender\",\n get: function get() {\n return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n }\n }, {\n key: \"prepareToRender\",\n value: function prepareToRender() {\n this.mergeHead();\n }\n }, {\n key: \"render\",\n value: function () {\n var _render5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {\n return _regeneratorRuntime.wrap(function _callee19$(_context19) {\n while (1) {\n switch (_context19.prev = _context19.next) {\n case 0:\n this.replaceBody();\n\n case 1:\n case \"end\":\n return _context19.stop();\n }\n }\n }, _callee19, this);\n }));\n\n function render() {\n return _render5.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"finishRendering\",\n value: function finishRendering() {\n _get(_getPrototypeOf(PageRenderer.prototype), \"finishRendering\", this).call(this);\n\n if (!this.isPreview) {\n this.focusFirstAutofocusableElement();\n }\n }\n }, {\n key: \"currentHeadSnapshot\",\n get: function get() {\n return this.currentSnapshot.headSnapshot;\n }\n }, {\n key: \"newHeadSnapshot\",\n get: function get() {\n return this.newSnapshot.headSnapshot;\n }\n }, {\n key: \"newElement\",\n get: function get() {\n return this.newSnapshot.element;\n }\n }, {\n key: \"mergeHead\",\n value: function mergeHead() {\n this.copyNewHeadStylesheetElements();\n this.copyNewHeadScriptElements();\n this.removeCurrentHeadProvisionalElements();\n this.copyNewHeadProvisionalElements();\n }\n }, {\n key: \"replaceBody\",\n value: function replaceBody() {\n var _this29 = this;\n\n this.preservingPermanentElements(function () {\n _this29.activateNewBody();\n\n _this29.assignNewBody();\n });\n }\n }, {\n key: \"trackedElementsAreIdentical\",\n get: function get() {\n return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n }\n }, {\n key: \"copyNewHeadStylesheetElements\",\n value: function copyNewHeadStylesheetElements() {\n var _iterator7 = _createForOfIteratorHelper(this.newHeadStylesheetElements),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var element = _step7.value;\n document.head.appendChild(element);\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n }\n }, {\n key: \"copyNewHeadScriptElements\",\n value: function copyNewHeadScriptElements() {\n var _iterator8 = _createForOfIteratorHelper(this.newHeadScriptElements),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var element = _step8.value;\n document.head.appendChild(this.createScriptElement(element));\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n }\n }, {\n key: \"removeCurrentHeadProvisionalElements\",\n value: function removeCurrentHeadProvisionalElements() {\n var _iterator9 = _createForOfIteratorHelper(this.currentHeadProvisionalElements),\n _step9;\n\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n var element = _step9.value;\n document.head.removeChild(element);\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n }\n }, {\n key: \"copyNewHeadProvisionalElements\",\n value: function copyNewHeadProvisionalElements() {\n var _iterator10 = _createForOfIteratorHelper(this.newHeadProvisionalElements),\n _step10;\n\n try {\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var element = _step10.value;\n document.head.appendChild(element);\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n }\n }, {\n key: \"activateNewBody\",\n value: function activateNewBody() {\n document.adoptNode(this.newElement);\n this.activateNewBodyScriptElements();\n }\n }, {\n key: \"activateNewBodyScriptElements\",\n value: function activateNewBodyScriptElements() {\n var _iterator11 = _createForOfIteratorHelper(this.newBodyScriptElements),\n _step11;\n\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var inertScriptElement = _step11.value;\n var activatedScriptElement = this.createScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n }\n }, {\n key: \"assignNewBody\",\n value: function assignNewBody() {\n if (document.body && this.newElement instanceof HTMLBodyElement) {\n document.body.replaceWith(this.newElement);\n } else {\n document.documentElement.appendChild(this.newElement);\n }\n }\n }, {\n key: \"newHeadStylesheetElements\",\n get: function get() {\n return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n }, {\n key: \"newHeadScriptElements\",\n get: function get() {\n return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n }, {\n key: \"currentHeadProvisionalElements\",\n get: function get() {\n return this.currentHeadSnapshot.provisionalElements;\n }\n }, {\n key: \"newHeadProvisionalElements\",\n get: function get() {\n return this.newHeadSnapshot.provisionalElements;\n }\n }, {\n key: \"newBodyScriptElements\",\n get: function get() {\n return this.newElement.querySelectorAll(\"script\");\n }\n }]);\n\n return PageRenderer;\n}(Renderer);\n\nvar SnapshotCache = /*#__PURE__*/function () {\n function SnapshotCache(size) {\n _classCallCheck(this, SnapshotCache);\n\n this.keys = [];\n this.snapshots = {};\n this.size = size;\n }\n\n _createClass(SnapshotCache, [{\n key: \"has\",\n value: function has(location) {\n return toCacheKey(location) in this.snapshots;\n }\n }, {\n key: \"get\",\n value: function get(location) {\n if (this.has(location)) {\n var snapshot = this.read(location);\n this.touch(location);\n return snapshot;\n }\n }\n }, {\n key: \"put\",\n value: function put(location, snapshot) {\n this.write(location, snapshot);\n this.touch(location);\n return snapshot;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.snapshots = {};\n }\n }, {\n key: \"read\",\n value: function read(location) {\n return this.snapshots[toCacheKey(location)];\n }\n }, {\n key: \"write\",\n value: function write(location, snapshot) {\n this.snapshots[toCacheKey(location)] = snapshot;\n }\n }, {\n key: \"touch\",\n value: function touch(location) {\n var key = toCacheKey(location);\n var index = this.keys.indexOf(key);\n if (index > -1) this.keys.splice(index, 1);\n this.keys.unshift(key);\n this.trim();\n }\n }, {\n key: \"trim\",\n value: function trim() {\n var _iterator12 = _createForOfIteratorHelper(this.keys.splice(this.size)),\n _step12;\n\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var key = _step12.value;\n delete this.snapshots[key];\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n }\n }]);\n\n return SnapshotCache;\n}();\n\nvar PageView = /*#__PURE__*/function (_View2) {\n _inherits(PageView, _View2);\n\n var _super8 = _createSuper(PageView);\n\n function PageView() {\n var _this30;\n\n _classCallCheck(this, PageView);\n\n _this30 = _super8.apply(this, arguments);\n _this30.snapshotCache = new SnapshotCache(10);\n _this30.lastRenderedLocation = new URL(location.href);\n return _this30;\n }\n\n _createClass(PageView, [{\n key: \"renderPage\",\n value: function renderPage(snapshot) {\n var isPreview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var renderer = new PageRenderer(this.snapshot, snapshot, isPreview);\n return this.render(renderer);\n }\n }, {\n key: \"renderError\",\n value: function renderError(snapshot) {\n var renderer = new ErrorRenderer(this.snapshot, snapshot, false);\n return this.render(renderer);\n }\n }, {\n key: \"clearSnapshotCache\",\n value: function clearSnapshotCache() {\n this.snapshotCache.clear();\n }\n }, {\n key: \"cacheSnapshot\",\n value: function () {\n var _cacheSnapshot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {\n var snapshot, _location2;\n\n return _regeneratorRuntime.wrap(function _callee20$(_context20) {\n while (1) {\n switch (_context20.prev = _context20.next) {\n case 0:\n if (!this.shouldCacheSnapshot) {\n _context20.next = 6;\n break;\n }\n\n this.delegate.viewWillCacheSnapshot();\n snapshot = this.snapshot, _location2 = this.lastRenderedLocation;\n _context20.next = 5;\n return nextEventLoopTick();\n\n case 5:\n this.snapshotCache.put(_location2, snapshot.clone());\n\n case 6:\n case \"end\":\n return _context20.stop();\n }\n }\n }, _callee20, this);\n }));\n\n function cacheSnapshot() {\n return _cacheSnapshot.apply(this, arguments);\n }\n\n return cacheSnapshot;\n }()\n }, {\n key: \"getCachedSnapshotForLocation\",\n value: function getCachedSnapshotForLocation(location) {\n return this.snapshotCache.get(location);\n }\n }, {\n key: \"snapshot\",\n get: function get() {\n return PageSnapshot.fromElement(this.element);\n }\n }, {\n key: \"shouldCacheSnapshot\",\n get: function get() {\n return this.snapshot.isCacheable;\n }\n }]);\n\n return PageView;\n}(View);\n\nvar Session = /*#__PURE__*/function () {\n function Session() {\n _classCallCheck(this, Session);\n\n this.navigator = new Navigator(this);\n this.history = new History(this);\n this.view = new PageView(this, document.documentElement);\n this.adapter = new BrowserAdapter(this);\n this.pageObserver = new PageObserver(this);\n this.cacheObserver = new CacheObserver();\n this.linkClickObserver = new LinkClickObserver(this);\n this.formSubmitObserver = new FormSubmitObserver(this);\n this.scrollObserver = new ScrollObserver(this);\n this.streamObserver = new StreamObserver(this);\n this.frameRedirector = new FrameRedirector(document.documentElement);\n this.drive = true;\n this.enabled = true;\n this.progressBarDelay = 500;\n this.started = false;\n }\n\n _createClass(Session, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n this.pageObserver.start();\n this.cacheObserver.start();\n this.linkClickObserver.start();\n this.formSubmitObserver.start();\n this.scrollObserver.start();\n this.streamObserver.start();\n this.frameRedirector.start();\n this.history.start();\n this.started = true;\n this.enabled = true;\n }\n }\n }, {\n key: \"disable\",\n value: function disable() {\n this.enabled = false;\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n this.pageObserver.stop();\n this.cacheObserver.stop();\n this.linkClickObserver.stop();\n this.formSubmitObserver.stop();\n this.scrollObserver.stop();\n this.streamObserver.stop();\n this.frameRedirector.stop();\n this.history.stop();\n this.started = false;\n }\n }\n }, {\n key: \"registerAdapter\",\n value: function registerAdapter(adapter) {\n this.adapter = adapter;\n }\n }, {\n key: \"visit\",\n value: function visit(location) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.navigator.proposeVisit(expandURL(location), options);\n }\n }, {\n key: \"connectStreamSource\",\n value: function connectStreamSource(source) {\n this.streamObserver.connectStreamSource(source);\n }\n }, {\n key: \"disconnectStreamSource\",\n value: function disconnectStreamSource(source) {\n this.streamObserver.disconnectStreamSource(source);\n }\n }, {\n key: \"renderStreamMessage\",\n value: function renderStreamMessage(message) {\n document.documentElement.appendChild(StreamMessage.wrap(message).fragment);\n }\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.view.clearSnapshotCache();\n }\n }, {\n key: \"setProgressBarDelay\",\n value: function setProgressBarDelay(delay) {\n this.progressBarDelay = delay;\n }\n }, {\n key: \"location\",\n get: function get() {\n return this.history.location;\n }\n }, {\n key: \"restorationIdentifier\",\n get: function get() {\n return this.history.restorationIdentifier;\n }\n }, {\n key: \"historyPoppedToLocationWithRestorationIdentifier\",\n value: function historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {\n if (this.enabled) {\n this.navigator.startVisit(location, restorationIdentifier, {\n action: \"restore\",\n historyChanged: true\n });\n } else {\n this.adapter.pageInvalidated();\n }\n }\n }, {\n key: \"scrollPositionChanged\",\n value: function scrollPositionChanged(position) {\n this.history.updateRestorationData({\n scrollPosition: position\n });\n }\n }, {\n key: \"willFollowLinkToLocation\",\n value: function willFollowLinkToLocation(link, location) {\n return this.elementDriveEnabled(link) && this.locationIsVisitable(location) && this.applicationAllowsFollowingLinkToLocation(link, location);\n }\n }, {\n key: \"followedLinkToLocation\",\n value: function followedLinkToLocation(link, location) {\n var action = this.getActionForLink(link);\n this.convertLinkWithMethodClickToFormSubmission(link) || this.visit(location.href, {\n action: action\n });\n }\n }, {\n key: \"convertLinkWithMethodClickToFormSubmission\",\n value: function convertLinkWithMethodClickToFormSubmission(link) {\n var _a;\n\n var linkMethod = link.getAttribute(\"data-turbo-method\");\n\n if (linkMethod) {\n var form = document.createElement(\"form\");\n form.method = linkMethod;\n form.action = link.getAttribute(\"href\") || \"undefined\";\n form.hidden = true;\n (_a = link.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(form, link);\n return dispatch(\"submit\", {\n cancelable: true,\n target: form\n });\n } else {\n return false;\n }\n }\n }, {\n key: \"allowsVisitingLocationWithAction\",\n value: function allowsVisitingLocationWithAction(location, action) {\n return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n }\n }, {\n key: \"visitProposedToLocation\",\n value: function visitProposedToLocation(location, options) {\n extendURLWithDeprecatedProperties(location);\n this.adapter.visitProposedToLocation(location, options);\n }\n }, {\n key: \"visitStarted\",\n value: function visitStarted(visit) {\n extendURLWithDeprecatedProperties(visit.location);\n\n if (!visit.silent) {\n this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n }\n }\n }, {\n key: \"visitCompleted\",\n value: function visitCompleted(visit) {\n this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n }\n }, {\n key: \"locationWithActionIsSamePage\",\n value: function locationWithActionIsSamePage(location, action) {\n return this.navigator.locationWithActionIsSamePage(location, action);\n }\n }, {\n key: \"visitScrolledToSamePageLocation\",\n value: function visitScrolledToSamePageLocation(oldURL, newURL) {\n this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n }\n }, {\n key: \"willSubmitForm\",\n value: function willSubmitForm(form, submitter) {\n return this.elementDriveEnabled(form) && (!submitter || this.elementDriveEnabled(submitter));\n }\n }, {\n key: \"formSubmitted\",\n value: function formSubmitted(form, submitter) {\n this.navigator.submitForm(form, submitter);\n }\n }, {\n key: \"pageBecameInteractive\",\n value: function pageBecameInteractive() {\n this.view.lastRenderedLocation = this.location;\n this.notifyApplicationAfterPageLoad();\n }\n }, {\n key: \"pageLoaded\",\n value: function pageLoaded() {\n this.history.assumeControlOfScrollRestoration();\n }\n }, {\n key: \"pageWillUnload\",\n value: function pageWillUnload() {\n this.history.relinquishControlOfScrollRestoration();\n }\n }, {\n key: \"receivedMessageFromStream\",\n value: function receivedMessageFromStream(message) {\n this.renderStreamMessage(message);\n }\n }, {\n key: \"viewWillCacheSnapshot\",\n value: function viewWillCacheSnapshot() {\n var _a;\n\n if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {\n this.notifyApplicationBeforeCachingSnapshot();\n }\n }\n }, {\n key: \"allowsImmediateRender\",\n value: function allowsImmediateRender(_ref18, resume) {\n var element = _ref18.element;\n var event = this.notifyApplicationBeforeRender(element, resume);\n return !event.defaultPrevented;\n }\n }, {\n key: \"viewRenderedSnapshot\",\n value: function viewRenderedSnapshot(snapshot, isPreview) {\n this.view.lastRenderedLocation = this.history.location;\n this.notifyApplicationAfterRender();\n }\n }, {\n key: \"viewInvalidated\",\n value: function viewInvalidated() {\n this.adapter.pageInvalidated();\n }\n }, {\n key: \"frameLoaded\",\n value: function frameLoaded(frame) {\n this.notifyApplicationAfterFrameLoad(frame);\n }\n }, {\n key: \"frameRendered\",\n value: function frameRendered(fetchResponse, frame) {\n this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n }\n }, {\n key: \"applicationAllowsFollowingLinkToLocation\",\n value: function applicationAllowsFollowingLinkToLocation(link, location) {\n var event = this.notifyApplicationAfterClickingLinkToLocation(link, location);\n return !event.defaultPrevented;\n }\n }, {\n key: \"applicationAllowsVisitingLocation\",\n value: function applicationAllowsVisitingLocation(location) {\n var event = this.notifyApplicationBeforeVisitingLocation(location);\n return !event.defaultPrevented;\n }\n }, {\n key: \"notifyApplicationAfterClickingLinkToLocation\",\n value: function notifyApplicationAfterClickingLinkToLocation(link, location) {\n return dispatch(\"turbo:click\", {\n target: link,\n detail: {\n url: location.href\n },\n cancelable: true\n });\n }\n }, {\n key: \"notifyApplicationBeforeVisitingLocation\",\n value: function notifyApplicationBeforeVisitingLocation(location) {\n return dispatch(\"turbo:before-visit\", {\n detail: {\n url: location.href\n },\n cancelable: true\n });\n }\n }, {\n key: \"notifyApplicationAfterVisitingLocation\",\n value: function notifyApplicationAfterVisitingLocation(location, action) {\n return dispatch(\"turbo:visit\", {\n detail: {\n url: location.href,\n action: action\n }\n });\n }\n }, {\n key: \"notifyApplicationBeforeCachingSnapshot\",\n value: function notifyApplicationBeforeCachingSnapshot() {\n return dispatch(\"turbo:before-cache\");\n }\n }, {\n key: \"notifyApplicationBeforeRender\",\n value: function notifyApplicationBeforeRender(newBody, resume) {\n return dispatch(\"turbo:before-render\", {\n detail: {\n newBody: newBody,\n resume: resume\n },\n cancelable: true\n });\n }\n }, {\n key: \"notifyApplicationAfterRender\",\n value: function notifyApplicationAfterRender() {\n return dispatch(\"turbo:render\");\n }\n }, {\n key: \"notifyApplicationAfterPageLoad\",\n value: function notifyApplicationAfterPageLoad() {\n var timing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return dispatch(\"turbo:load\", {\n detail: {\n url: this.location.href,\n timing: timing\n }\n });\n }\n }, {\n key: \"notifyApplicationAfterVisitingSamePageLocation\",\n value: function notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n dispatchEvent(new HashChangeEvent(\"hashchange\", {\n oldURL: oldURL.toString(),\n newURL: newURL.toString()\n }));\n }\n }, {\n key: \"notifyApplicationAfterFrameLoad\",\n value: function notifyApplicationAfterFrameLoad(frame) {\n return dispatch(\"turbo:frame-load\", {\n target: frame\n });\n }\n }, {\n key: \"notifyApplicationAfterFrameRender\",\n value: function notifyApplicationAfterFrameRender(fetchResponse, frame) {\n return dispatch(\"turbo:frame-render\", {\n detail: {\n fetchResponse: fetchResponse\n },\n target: frame,\n cancelable: true\n });\n }\n }, {\n key: \"elementDriveEnabled\",\n value: function elementDriveEnabled(element) {\n var container = element === null || element === void 0 ? void 0 : element.closest(\"[data-turbo]\");\n\n if (this.drive) {\n if (container) {\n return container.getAttribute(\"data-turbo\") != \"false\";\n } else {\n return true;\n }\n } else {\n if (container) {\n return container.getAttribute(\"data-turbo\") == \"true\";\n } else {\n return false;\n }\n }\n }\n }, {\n key: \"getActionForLink\",\n value: function getActionForLink(link) {\n var action = link.getAttribute(\"data-turbo-action\");\n return isAction(action) ? action : \"advance\";\n }\n }, {\n key: \"locationIsVisitable\",\n value: function locationIsVisitable(location) {\n return isPrefixedBy(location, this.snapshot.rootLocation) && isHTML(location);\n }\n }, {\n key: \"snapshot\",\n get: function get() {\n return this.view.snapshot;\n }\n }]);\n\n return Session;\n}();\n\nfunction extendURLWithDeprecatedProperties(url) {\n Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\n\nvar deprecatedLocationPropertyDescriptors = {\n absoluteURL: {\n get: function get() {\n return this.toString();\n }\n }\n};\nvar session = new Session();\nvar navigator$1 = session.navigator;\n\nfunction start() {\n session.start();\n}\n\nfunction registerAdapter(adapter) {\n session.registerAdapter(adapter);\n}\n\nfunction visit(location, options) {\n session.visit(location, options);\n}\n\nfunction connectStreamSource(source) {\n session.connectStreamSource(source);\n}\n\nfunction disconnectStreamSource(source) {\n session.disconnectStreamSource(source);\n}\n\nfunction renderStreamMessage(message) {\n session.renderStreamMessage(message);\n}\n\nfunction clearCache() {\n session.clearCache();\n}\n\nfunction setProgressBarDelay(delay) {\n session.setProgressBarDelay(delay);\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n __proto__: null,\n navigator: navigator$1,\n session: session,\n PageRenderer: PageRenderer,\n PageSnapshot: PageSnapshot,\n start: start,\n registerAdapter: registerAdapter,\n visit: visit,\n connectStreamSource: connectStreamSource,\n disconnectStreamSource: disconnectStreamSource,\n renderStreamMessage: renderStreamMessage,\n clearCache: clearCache,\n setProgressBarDelay: setProgressBarDelay\n});\n\nvar FrameController = /*#__PURE__*/function () {\n function FrameController(element) {\n _classCallCheck(this, FrameController);\n\n this.resolveVisitPromise = function () {};\n\n this.connected = false;\n this.hasBeenLoaded = false;\n this.settingSourceURL = false;\n this.element = element;\n this.view = new FrameView(this, this.element);\n this.appearanceObserver = new AppearanceObserver(this, this.element);\n this.linkInterceptor = new LinkInterceptor(this, this.element);\n this.formInterceptor = new FormInterceptor(this, this.element);\n }\n\n _createClass(FrameController, [{\n key: \"connect\",\n value: function connect() {\n if (!this.connected) {\n this.connected = true;\n this.reloadable = false;\n\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n }\n\n this.linkInterceptor.start();\n this.formInterceptor.start();\n this.sourceURLChanged();\n }\n }\n }, {\n key: \"disconnect\",\n value: function disconnect() {\n if (this.connected) {\n this.connected = false;\n this.appearanceObserver.stop();\n this.linkInterceptor.stop();\n this.formInterceptor.stop();\n }\n }\n }, {\n key: \"disabledChanged\",\n value: function disabledChanged() {\n if (this.loadingStyle == FrameLoadingStyle.eager) {\n this.loadSourceURL();\n }\n }\n }, {\n key: \"sourceURLChanged\",\n value: function sourceURLChanged() {\n if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {\n this.loadSourceURL();\n }\n }\n }, {\n key: \"loadingStyleChanged\",\n value: function loadingStyleChanged() {\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n } else {\n this.appearanceObserver.stop();\n this.loadSourceURL();\n }\n }\n }, {\n key: \"loadSourceURL\",\n value: function () {\n var _loadSourceURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {\n var previousURL;\n return _regeneratorRuntime.wrap(function _callee21$(_context21) {\n while (1) {\n switch (_context21.prev = _context21.next) {\n case 0:\n if (!(!this.settingSourceURL && this.enabled && this.isActive && (this.reloadable || this.sourceURL != this.currentURL))) {\n _context21.next = 17;\n break;\n }\n\n previousURL = this.currentURL;\n this.currentURL = this.sourceURL;\n\n if (!this.sourceURL) {\n _context21.next = 17;\n break;\n }\n\n _context21.prev = 4;\n this.element.loaded = this.visit(this.sourceURL);\n this.appearanceObserver.stop();\n _context21.next = 9;\n return this.element.loaded;\n\n case 9:\n this.hasBeenLoaded = true;\n session.frameLoaded(this.element);\n _context21.next = 17;\n break;\n\n case 13:\n _context21.prev = 13;\n _context21.t0 = _context21[\"catch\"](4);\n this.currentURL = previousURL;\n throw _context21.t0;\n\n case 17:\n case \"end\":\n return _context21.stop();\n }\n }\n }, _callee21, this, [[4, 13]]);\n }));\n\n function loadSourceURL() {\n return _loadSourceURL.apply(this, arguments);\n }\n\n return loadSourceURL;\n }()\n }, {\n key: \"loadResponse\",\n value: function () {\n var _loadResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(fetchResponse) {\n var html, _parseHTMLDocument, body, snapshot, renderer;\n\n return _regeneratorRuntime.wrap(function _callee22$(_context22) {\n while (1) {\n switch (_context22.prev = _context22.next) {\n case 0:\n if (fetchResponse.redirected) {\n this.sourceURL = fetchResponse.response.url;\n }\n\n _context22.prev = 1;\n _context22.next = 4;\n return fetchResponse.responseHTML;\n\n case 4:\n html = _context22.sent;\n\n if (!html) {\n _context22.next = 19;\n break;\n }\n\n _parseHTMLDocument = parseHTMLDocument(html), body = _parseHTMLDocument.body;\n _context22.t0 = Snapshot;\n _context22.next = 10;\n return this.extractForeignFrameElement(body);\n\n case 10:\n _context22.t1 = _context22.sent;\n snapshot = new _context22.t0(_context22.t1);\n renderer = new FrameRenderer(this.view.snapshot, snapshot, false);\n\n if (!this.view.renderPromise) {\n _context22.next = 16;\n break;\n }\n\n _context22.next = 16;\n return this.view.renderPromise;\n\n case 16:\n _context22.next = 18;\n return this.view.render(renderer);\n\n case 18:\n session.frameRendered(fetchResponse, this.element);\n\n case 19:\n _context22.next = 25;\n break;\n\n case 21:\n _context22.prev = 21;\n _context22.t2 = _context22[\"catch\"](1);\n console.error(_context22.t2);\n this.view.invalidate();\n\n case 25:\n case \"end\":\n return _context22.stop();\n }\n }\n }, _callee22, this, [[1, 21]]);\n }));\n\n function loadResponse(_x16) {\n return _loadResponse.apply(this, arguments);\n }\n\n return loadResponse;\n }()\n }, {\n key: \"elementAppearedInViewport\",\n value: function elementAppearedInViewport(element) {\n this.loadSourceURL();\n }\n }, {\n key: \"shouldInterceptLinkClick\",\n value: function shouldInterceptLinkClick(element, url) {\n if (element.hasAttribute(\"data-turbo-method\")) {\n return false;\n } else {\n return this.shouldInterceptNavigation(element);\n }\n }\n }, {\n key: \"linkClickIntercepted\",\n value: function linkClickIntercepted(element, url) {\n this.reloadable = true;\n this.navigateFrame(element, url);\n }\n }, {\n key: \"shouldInterceptFormSubmission\",\n value: function shouldInterceptFormSubmission(element, submitter) {\n return this.shouldInterceptNavigation(element, submitter);\n }\n }, {\n key: \"formSubmissionIntercepted\",\n value: function formSubmissionIntercepted(element, submitter) {\n if (this.formSubmission) {\n this.formSubmission.stop();\n }\n\n this.reloadable = false;\n this.formSubmission = new FormSubmission(this, element, submitter);\n\n if (this.formSubmission.fetchRequest.isIdempotent) {\n this.navigateFrame(element, this.formSubmission.fetchRequest.url.href, submitter);\n } else {\n var fetchRequest = this.formSubmission.fetchRequest;\n this.prepareHeadersForRequest(fetchRequest.headers, fetchRequest);\n this.formSubmission.start();\n }\n }\n }, {\n key: \"prepareHeadersForRequest\",\n value: function prepareHeadersForRequest(headers, request) {\n headers[\"Turbo-Frame\"] = this.id;\n }\n }, {\n key: \"requestStarted\",\n value: function requestStarted(request) {\n this.element.setAttribute(\"busy\", \"\");\n }\n }, {\n key: \"requestPreventedHandlingResponse\",\n value: function requestPreventedHandlingResponse(request, response) {\n this.resolveVisitPromise();\n }\n }, {\n key: \"requestSucceededWithResponse\",\n value: function () {\n var _requestSucceededWithResponse2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(request, response) {\n return _regeneratorRuntime.wrap(function _callee23$(_context23) {\n while (1) {\n switch (_context23.prev = _context23.next) {\n case 0:\n _context23.next = 2;\n return this.loadResponse(response);\n\n case 2:\n this.resolveVisitPromise();\n\n case 3:\n case \"end\":\n return _context23.stop();\n }\n }\n }, _callee23, this);\n }));\n\n function requestSucceededWithResponse(_x17, _x18) {\n return _requestSucceededWithResponse2.apply(this, arguments);\n }\n\n return requestSucceededWithResponse;\n }()\n }, {\n key: \"requestFailedWithResponse\",\n value: function requestFailedWithResponse(request, response) {\n console.error(response);\n this.resolveVisitPromise();\n }\n }, {\n key: \"requestErrored\",\n value: function requestErrored(request, error) {\n console.error(error);\n this.resolveVisitPromise();\n }\n }, {\n key: \"requestFinished\",\n value: function requestFinished(request) {\n this.element.removeAttribute(\"busy\");\n }\n }, {\n key: \"formSubmissionStarted\",\n value: function formSubmissionStarted(formSubmission) {\n var frame = this.findFrameElement(formSubmission.formElement);\n frame.setAttribute(\"busy\", \"\");\n }\n }, {\n key: \"formSubmissionSucceededWithResponse\",\n value: function formSubmissionSucceededWithResponse(formSubmission, response) {\n var frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);\n frame.delegate.loadResponse(response);\n }\n }, {\n key: \"formSubmissionFailedWithResponse\",\n value: function formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n this.element.delegate.loadResponse(fetchResponse);\n }\n }, {\n key: \"formSubmissionErrored\",\n value: function formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n }, {\n key: \"formSubmissionFinished\",\n value: function formSubmissionFinished(formSubmission) {\n var frame = this.findFrameElement(formSubmission.formElement);\n frame.removeAttribute(\"busy\");\n }\n }, {\n key: \"allowsImmediateRender\",\n value: function allowsImmediateRender(snapshot, resume) {\n return true;\n }\n }, {\n key: \"viewRenderedSnapshot\",\n value: function viewRenderedSnapshot(snapshot, isPreview) {}\n }, {\n key: \"viewInvalidated\",\n value: function viewInvalidated() {}\n }, {\n key: \"visit\",\n value: function () {\n var _visit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(url) {\n var _this31 = this;\n\n var request;\n return _regeneratorRuntime.wrap(function _callee24$(_context24) {\n while (1) {\n switch (_context24.prev = _context24.next) {\n case 0:\n request = new FetchRequest(this, FetchMethod.get, expandURL(url), undefined, this.element);\n return _context24.abrupt(\"return\", new Promise(function (resolve) {\n _this31.resolveVisitPromise = function () {\n _this31.resolveVisitPromise = function () {};\n\n resolve();\n };\n\n request.perform();\n }));\n\n case 2:\n case \"end\":\n return _context24.stop();\n }\n }\n }, _callee24, this);\n }));\n\n function visit(_x19) {\n return _visit.apply(this, arguments);\n }\n\n return visit;\n }()\n }, {\n key: \"navigateFrame\",\n value: function navigateFrame(element, url, submitter) {\n var frame = this.findFrameElement(element, submitter);\n frame.setAttribute(\"reloadable\", \"\");\n frame.src = url;\n }\n }, {\n key: \"findFrameElement\",\n value: function findFrameElement(element, submitter) {\n var _a;\n\n var id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\") || this.element.getAttribute(\"target\");\n return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;\n }\n }, {\n key: \"extractForeignFrameElement\",\n value: function () {\n var _extractForeignFrameElement = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(container) {\n var element, id;\n return _regeneratorRuntime.wrap(function _callee25$(_context25) {\n while (1) {\n switch (_context25.prev = _context25.next) {\n case 0:\n id = CSS.escape(this.id);\n _context25.prev = 1;\n\n if (!(element = activateElement(container.querySelector(\"turbo-frame#\".concat(id)), this.currentURL))) {\n _context25.next = 4;\n break;\n }\n\n return _context25.abrupt(\"return\", element);\n\n case 4:\n if (!(element = activateElement(container.querySelector(\"turbo-frame[src][recurse~=\".concat(id, \"]\")), this.currentURL))) {\n _context25.next = 10;\n break;\n }\n\n _context25.next = 7;\n return element.loaded;\n\n case 7:\n _context25.next = 9;\n return this.extractForeignFrameElement(element);\n\n case 9:\n return _context25.abrupt(\"return\", _context25.sent);\n\n case 10:\n console.error(\"Response has no matching element\"));\n _context25.next = 16;\n break;\n\n case 13:\n _context25.prev = 13;\n _context25.t0 = _context25[\"catch\"](1);\n console.error(_context25.t0);\n\n case 16:\n return _context25.abrupt(\"return\", new FrameElement());\n\n case 17:\n case \"end\":\n return _context25.stop();\n }\n }\n }, _callee25, this, [[1, 13]]);\n }));\n\n function extractForeignFrameElement(_x20) {\n return _extractForeignFrameElement.apply(this, arguments);\n }\n\n return extractForeignFrameElement;\n }()\n }, {\n key: \"shouldInterceptNavigation\",\n value: function shouldInterceptNavigation(element, submitter) {\n var id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\") || this.element.getAttribute(\"target\");\n\n if (!this.enabled || id == \"_top\") {\n return false;\n }\n\n if (id) {\n var frameElement = getFrameElementById(id);\n\n if (frameElement) {\n return !frameElement.disabled;\n }\n }\n\n if (!session.elementDriveEnabled(element)) {\n return false;\n }\n\n if (submitter && !session.elementDriveEnabled(submitter)) {\n return false;\n }\n\n return true;\n }\n }, {\n key: \"id\",\n get: function get() {\n return this.element.id;\n }\n }, {\n key: \"enabled\",\n get: function get() {\n return !this.element.disabled;\n }\n }, {\n key: \"sourceURL\",\n get: function get() {\n if (this.element.src) {\n return this.element.src;\n }\n },\n set: function set(sourceURL) {\n this.settingSourceURL = true;\n this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;\n this.currentURL = this.element.src;\n this.settingSourceURL = false;\n }\n }, {\n key: \"reloadable\",\n get: function get() {\n var frame = this.findFrameElement(this.element);\n return frame.hasAttribute(\"reloadable\");\n },\n set: function set(value) {\n var frame = this.findFrameElement(this.element);\n\n if (value) {\n frame.setAttribute(\"reloadable\", \"\");\n } else {\n frame.removeAttribute(\"reloadable\");\n }\n }\n }, {\n key: \"loadingStyle\",\n get: function get() {\n return this.element.loading;\n }\n }, {\n key: \"isLoading\",\n get: function get() {\n return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;\n }\n }, {\n key: \"isActive\",\n get: function get() {\n return this.element.isActive && this.connected;\n }\n }]);\n\n return FrameController;\n}();\n\nfunction getFrameElementById(id) {\n if (id != null) {\n var element = document.getElementById(id);\n\n if (element instanceof FrameElement) {\n return element;\n }\n }\n}\n\nfunction activateElement(element, currentURL) {\n if (element) {\n var src = element.getAttribute(\"src\");\n\n if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n throw new Error(\"Matching element has a source URL which references itself\"));\n }\n\n if (element.ownerDocument !== document) {\n element = document.importNode(element, true);\n }\n\n if (element instanceof FrameElement) {\n element.connectedCallback();\n return element;\n }\n }\n}\n\nvar StreamActions = {\n after: function after() {\n var _this32 = this;\n\n this.targetElements.forEach(function (e) {\n var _a;\n\n return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(_this32.templateContent, e.nextSibling);\n });\n },\n append: function append() {\n var _this33 = this;\n\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach(function (e) {\n return e.append(_this33.templateContent);\n });\n },\n before: function before() {\n var _this34 = this;\n\n this.targetElements.forEach(function (e) {\n var _a;\n\n return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(_this34.templateContent, e);\n });\n },\n prepend: function prepend() {\n var _this35 = this;\n\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach(function (e) {\n return e.prepend(_this35.templateContent);\n });\n },\n remove: function remove() {\n this.targetElements.forEach(function (e) {\n return e.remove();\n });\n },\n replace: function replace() {\n var _this36 = this;\n\n this.targetElements.forEach(function (e) {\n return e.replaceWith(_this36.templateContent);\n });\n },\n update: function update() {\n var _this37 = this;\n\n this.targetElements.forEach(function (e) {\n e.innerHTML = \"\";\n e.append(_this37.templateContent);\n });\n }\n};\n\nvar StreamElement = /*#__PURE__*/function (_HTMLElement2) {\n _inherits(StreamElement, _HTMLElement2);\n\n var _super9 = _createSuper(StreamElement);\n\n function StreamElement() {\n _classCallCheck(this, StreamElement);\n\n return _super9.apply(this, arguments);\n }\n\n _createClass(StreamElement, [{\n key: \"connectedCallback\",\n value: function () {\n var _connectedCallback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {\n return _regeneratorRuntime.wrap(function _callee26$(_context26) {\n while (1) {\n switch (_context26.prev = _context26.next) {\n case 0:\n _context26.prev = 0;\n _context26.next = 3;\n return this.render();\n\n case 3:\n _context26.next = 8;\n break;\n\n case 5:\n _context26.prev = 5;\n _context26.t0 = _context26[\"catch\"](0);\n console.error(_context26.t0);\n\n case 8:\n _context26.prev = 8;\n this.disconnect();\n return _context26.finish(8);\n\n case 11:\n case \"end\":\n return _context26.stop();\n }\n }\n }, _callee26, this, [[0, 5, 8, 11]]);\n }));\n\n function connectedCallback() {\n return _connectedCallback.apply(this, arguments);\n }\n\n return connectedCallback;\n }()\n }, {\n key: \"render\",\n value: function () {\n var _render6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {\n var _this38 = this;\n\n var _a;\n\n return _regeneratorRuntime.wrap(function _callee28$(_context28) {\n while (1) {\n switch (_context28.prev = _context28.next) {\n case 0:\n return _context28.abrupt(\"return\", (_a = this.renderPromise) !== null && _a !== void 0 ? _a : this.renderPromise = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {\n return _regeneratorRuntime.wrap(function _callee27$(_context27) {\n while (1) {\n switch (_context27.prev = _context27.next) {\n case 0:\n if (!_this38.dispatchEvent(_this38.beforeRenderEvent)) {\n _context27.next = 4;\n break;\n }\n\n _context27.next = 3;\n return nextAnimationFrame();\n\n case 3:\n _this38.performAction();\n\n case 4:\n case \"end\":\n return _context27.stop();\n }\n }\n }, _callee27);\n }))());\n\n case 1:\n case \"end\":\n return _context28.stop();\n }\n }\n }, _callee28, this);\n }));\n\n function render() {\n return _render6.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"disconnect\",\n value: function disconnect() {\n try {\n this.remove();\n } catch (_a) {}\n }\n }, {\n key: \"removeDuplicateTargetChildren\",\n value: function removeDuplicateTargetChildren() {\n this.duplicateChildren.forEach(function (c) {\n return c.remove();\n });\n }\n }, {\n key: \"duplicateChildren\",\n get: function get() {\n var _a;\n\n var existingChildren = this.targetElements.flatMap(function (e) {\n return _toConsumableArray(e.children);\n }).filter(function (c) {\n return !!c.id;\n });\n\n var newChildrenIds = _toConsumableArray((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children).filter(function (c) {\n return !!c.id;\n }).map(function (c) {\n return c.id;\n });\n\n return existingChildren.filter(function (c) {\n return newChildrenIds.includes(c.id);\n });\n }\n }, {\n key: \"performAction\",\n get: function get() {\n if (this.action) {\n var actionFunction = StreamActions[this.action];\n\n if (actionFunction) {\n return actionFunction;\n }\n\n this.raise(\"unknown action\");\n }\n\n this.raise(\"action attribute is missing\");\n }\n }, {\n key: \"targetElements\",\n get: function get() {\n if (this.target) {\n return this.targetElementsById;\n } else if (this.targets) {\n return this.targetElementsByQuery;\n } else {\n this.raise(\"target or targets attribute is missing\");\n }\n }\n }, {\n key: \"templateContent\",\n get: function get() {\n return this.templateElement.content.cloneNode(true);\n }\n }, {\n key: \"templateElement\",\n get: function get() {\n if (this.firstElementChild instanceof HTMLTemplateElement) {\n return this.firstElementChild;\n }\n\n this.raise(\"first child element must be a