"use strict";(globalThis.blocksyJsonP=globalThis.blocksyJsonP||[]).push([[783],{6783(t,e,n){n.r(e),n.d(e,{bootButtonLoaderFlow:function(){return a}});const a=function(t={}){const e=(t={el:null,event:null,chunk:null,loadedChunks:{},ensureAtLeast:250,...t}).loadedChunks[t.chunk.id],n=(new Date).getTime(),{el:a}=t,o=a.dataset.buttonState,l=a.closest(".ct-panel.active");if(document.querySelector(".ct-panel.active")&&!l||"loading"===a.dataset.buttonState)return;if(l&&t.chunk.has_loader.will_open_overlay){a.dataset.buttonState="loading";const n=document.querySelector(".ct-panel.active .ct-toggle-close");if(e&&e.maybeGetPanelContent){e.maybeGetPanelContent(t.el,{event:t.event})&&(a.dataset.buttonState=o)}return void t.loadChunkWithPayload(t.chunk,{event:t.event,completeAction:function(t={}){t={hasCheckmarkWithTimeout:!1,finalState:"",onCompleted:function(){},...t},n&&(n.click(),ctEvents.once("ct:modal:closed",t.onCompleted))},initialState:o},a)}let i=!0;if(e&&e.maybeGetPanelContent){e.maybeGetPanelContent(t.el,{event:t.event})&&(i=!1)}i&&(a.dataset.buttonState="loading"),t.loadChunkWithPayload(t.chunk,{event:t.event,completeAction:function(e={}){const o=function(){const o=(new Date).getTime();o-n<t.ensureAtLeast&&i?setTimeout(function(){a.dataset.buttonState=e.finalState,e.onCompleted()},t.ensureAtLeast-(o-n)):(a.dataset.buttonState=e.finalState,e.onCompleted())};(e={hasCheckmarkWithTimeout:!1,finalState:"",onCompleted:function(){},...e}).hasCheckmarkWithTimeout?(a.dataset.buttonState="done",setTimeout(o,1e3)):o()},initialState:o},a)}}}]);