vartop='top';varbottom='bottom';varright='right';varleft='left';varauto='auto';varbasePlacements=[top,bottom,right,left];varstart='start';varend='end';varclippingParents='clippingParents';varviewport='viewport';varpopper='popper';varreference='reference';varvariationPlacements=/*#__PURE__*/basePlacements.reduce(function(acc,placement){returnacc.concat([placement+"-"+start,placement+"-"+end]);},[]);varplacements=/*#__PURE__*/[].concat(basePlacements,[auto]).reduce(function(acc,placement){returnacc.concat([placement,placement+"-"+start,placement+"-"+end]);},[]);// modifiers that need to read the DOM
functionisElement$1(node){varOwnElement=getWindow(node).Element;returnnodeinstanceofOwnElement||nodeinstanceofElement;}functionisHTMLElement(node){varOwnElement=getWindow(node).HTMLElement;returnnodeinstanceofOwnElement||nodeinstanceofHTMLElement;}functionisShadowRoot(node){// IE 11 has no ShadowRoot
// and applies them to the HTMLElements such as popper and arrow
functionapplyStyles(_ref){varstate=_ref.state;Object.keys(state.elements).forEach(function(name){varstyle=state.styles[name]||{};varattributes=state.attributes[name]||{};varelement=state.elements[name];// arrow is optional + virtual elements
if(!isHTMLElement(element)||!getNodeName(element)){return;}// Flow doesn't support to extend this property, but it's the most
// effective way to apply styles to an HTMLElement
// $FlowFixMe[cannot-write]
Object.assign(element.style,style);Object.keys(attributes).forEach(function(name){varvalue=attributes[name];if(value===false){element.removeAttribute(name);}else{element.setAttribute(name,value===true?'':value);}});});}functioneffect$2(_ref2){varstate=_ref2.state;varinitialStyles={popper:{position:state.options.strategy,left:'0',top:'0',margin:'0'},arrow:{position:'absolute'},reference:{}};Object.assign(state.elements.popper.style,initialStyles.popper);state.styles=initialStyles;if(state.elements.arrow){Object.assign(state.elements.arrow.style,initialStyles.arrow);}returnfunction(){Object.keys(state.elements).forEach(function(name){varelement=state.elements[name];varattributes=state.attributes[name]||{};varstyleProperties=Object.keys(state.styles.hasOwnProperty(name)?state.styles[name]:initialStyles[name]);// Set all values to an empty string to unset them
varstyle=styleProperties.reduce(function(style,property){style[property]='';returnstyle;},{});// arrow is optional + virtual elements
functioncontains(parent,child){varrootNode=child.getRootNode&&child.getRootNode();// First, attempt with faster native method
if(parent.contains(child)){returntrue;}// then fallback to custom implementation with Shadow DOM support
elseif(rootNode&&isShadowRoot(rootNode)){varnext=child;do{if(next&&parent.isSameNode(next)){returntrue;}// $FlowFixMe[prop-missing]: need a better way to handle this...
next=next.parentNode||next.host;}while(next);}// Give up, the result is false
functiongetParentNode(element){if(getNodeName(element)==='html'){returnelement;}return(// this is a quicker (but less type safe) way to save quite some bytes from the bundle
// $FlowFixMe[incompatible-return]
// $FlowFixMe[prop-missing]
element.assignedSlot||// step into the shadow DOM of the parent of a slotted node
getComputedStyle$1(element).position==='fixed'){returnnull;}returnelement.offsetParent;}// `.offsetParent` reports `null` for fixed elements, while absolute elements
// return the containing block
functiongetContainingBlock(element){varisFirefox=/firefox/i.test(getUAString());varisIE=/Trident/i.test(getUAString());if(isIE&&isHTMLElement(element)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
varelementCss=getComputedStyle$1(element);if(elementCss.position==='fixed'){returnnull;}}varcurrentNode=getParentNode(element);if(isShadowRoot(currentNode)){currentNode=currentNode.host;}while(isHTMLElement(currentNode)&&['html','body'].indexOf(getNodeName(currentNode))<0){varcss=getComputedStyle$1(currentNode);// This is non-exhaustive but covers the most common CSS properties that
vartoPaddingObject=functiontoPaddingObject(padding,state){padding=typeofpadding==='function'?padding(Object.assign({},state.rects,{placement:state.placement})):padding;returnmergePaddingObject(typeofpadding!=='number'?padding:expandToHashMap(padding,basePlacements));};functionarrow(_ref){var_state$modifiersData$;varstate=_ref.state,name=_ref.name,options=_ref.options;vararrowElement=state.elements.arrow;varpopperOffsets=state.modifiersData.popperOffsets;varbasePlacement=getBasePlacement(state.placement);varaxis=getMainAxisFromPlacement(basePlacement);varisVertical=[left,right].indexOf(basePlacement)>=0;varlen=isVertical?'height':'width';if(!arrowElement||!popperOffsets){return;}varpaddingObject=toPaddingObject(options.padding,state);vararrowRect=getLayoutRect(arrowElement);varminProp=axis==='y'?top:left;varmaxProp=axis==='y'?bottom:right;varendDiff=state.rects.reference[len]+state.rects.reference[axis]-popperOffsets[axis]-state.rects.popper[len];varstartDiff=popperOffsets[axis]-state.rects.reference[axis];vararrowOffsetParent=getOffsetParent(arrowElement);varclientSize=arrowOffsetParent?axis==='y'?arrowOffsetParent.clientHeight||0:arrowOffsetParent.clientWidth||0:0;varcenterToReference=endDiff/2-startDiff/2;// Make sure the arrow doesn't overflow the popper if the center point is
varunsetSides={top:'auto',right:'auto',bottom:'auto',left:'auto'};// Round the offsets to the nearest suitable subpixel based on the DPR.
// Zooming can change the DPR, but it seems to report a value that will
// cleanly divide the values into the appropriate subpixels.
functionroundOffsetsByDPR(_ref,win){varx=_ref.x,y=_ref.y;vardpr=win.devicePixelRatio||1;return{x:round(x*dpr)/dpr||0,y:round(y*dpr)/dpr||0};}functionmapToStyles(_ref2){var_Object$assign2;varpopper=_ref2.popper,popperRect=_ref2.popperRect,placement=_ref2.placement,variation=_ref2.variation,offsets=_ref2.offsets,position=_ref2.position,gpuAcceleration=_ref2.gpuAcceleration,adaptive=_ref2.adaptive,roundOffsets=_ref2.roundOffsets,isFixed=_ref2.isFixed;var_offsets$x=offsets.x,x=_offsets$x===void0?0:_offsets$x,_offsets$y=offsets.y,y=_offsets$y===void0?0:_offsets$y;var_ref3=typeofroundOffsets==='function'?roundOffsets({x:x,y:y}):{x:x,y:y};x=_ref3.x;y=_ref3.y;varhasX=offsets.hasOwnProperty('x');varhasY=offsets.hasOwnProperty('y');varsideX=left;varsideY=top;varwin=window;if(adaptive){varoffsetParent=getOffsetParent(popper);varheightProp='clientHeight';varwidthProp='clientWidth';if(offsetParent===getWindow(popper)){offsetParent=getDocumentElement(popper);if(getComputedStyle$1(offsetParent).position!=='static'&&position==='absolute'){heightProp='scrollHeight';widthProp='scrollWidth';}}// $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
functiongetScrollParent(node){if(['html','body','#document'].indexOf(getNodeName(node))>=0){// $FlowFixMe[incompatible-return]: assume body is always available
given a DOM element, return the list of all scroll parents, up the list of ancesors
until we get to the top window object. This list is what we attach scroll listeners
to, because if any of these parent elements scroll, we'll need to re-calculate the
reference element's position.
*/functionlistScrollParents(element,list){var_element$ownerDocumen;if(list===void0){list=[];}varscrollParent=getScrollParent(element);varisBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void0:_element$ownerDocumen.body);varwin=getWindow(scrollParent);vartarget=isBody?[win].concat(win.visualViewport||[],isScrollParent(scrollParent)?scrollParent:[]):scrollParent;varupdatedList=list.concat(target);returnisBody?updatedList:// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
functiongetInnerBoundingClientRect(element,strategy){varrect=getBoundingClientRect(element,false,strategy==='fixed');rect.top=rect.top+element.clientTop;rect.left=rect.left+element.clientLeft;rect.bottom=rect.top+element.clientHeight;rect.right=rect.left+element.clientWidth;rect.width=element.clientWidth;rect.height=element.clientHeight;rect.x=rect.left;rect.y=rect.top;returnrect;}functiongetClientRectFromMixedType(element,clippingParent,strategy){returnclippingParent===viewport?rectToClientRect(getViewportRect(element,strategy)):isElement$1(clippingParent)?getInnerBoundingClientRect(clippingParent,strategy):rectToClientRect(getDocumentRect(getDocumentElement(element)));}// A "clipping parent" is an overflowable container with the characteristic of
// clipping (or hiding) overflowing elements with a position different from
returnclippingParents.filter(function(clippingParent){returnisElement$1(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of
functiondetectOverflow(state,options){if(options===void0){options={};}var_options=options,_options$placement=_options.placement,placement=_options$placement===void0?state.placement:_options$placement,_options$strategy=_options.strategy,strategy=_options$strategy===void0?state.strategy:_options$strategy,_options$boundary=_options.boundary,boundary=_options$boundary===void0?clippingParents:_options$boundary,_options$rootBoundary=_options.rootBoundary,rootBoundary=_options$rootBoundary===void0?viewport:_options$rootBoundary,_options$elementConte=_options.elementContext,elementContext=_options$elementConte===void0?popper:_options$elementConte,_options$altBoundary=_options.altBoundary,altBoundary=_options$altBoundary===void0?false:_options$altBoundary,_options$padding=_options.padding,padding=_options$padding===void0?0:_options$padding;varpaddingObject=mergePaddingObject(typeofpadding!=='number'?padding:expandToHashMap(padding,basePlacements));varaltContext=elementContext===popper?reference:popper;varpopperRect=state.rects.popper;varelement=state.elements[altBoundary?altContext:elementContext];varclippingClientRect=getClippingRect(isElement$1(element)?element:element.contextElement||getDocumentElement(state.elements.popper),boundary,rootBoundary,strategy);varreferenceClientRect=getBoundingClientRect(state.elements.reference);varpopperOffsets=computeOffsets({reference:referenceClientRect,element:popperRect,placement:placement});varpopperClientRect=rectToClientRect(Object.assign({},popperRect,popperOffsets));varelementClientRect=elementContext===popper?popperClientRect:referenceClientRect;// positive = overflowing the clipping rect
// 0 or negative = within the clipping rect
varoverflowOffsets={top:clippingClientRect.top-elementClientRect.top+paddingObject.top,bottom:elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom,left:clippingClientRect.left-elementClientRect.left+paddingObject.left,right:elementClientRect.right-clippingClientRect.right+paddingObject.right};varoffsetData=state.modifiersData.offset;// Offsets can be applied only to the popper element
functioncomputeAutoPlacement(state,options){if(options===void0){options={};}var_options=options,placement=_options.placement,boundary=_options.boundary,rootBoundary=_options.rootBoundary,padding=_options.padding,flipVariations=_options.flipVariations,_options$allowedAutoP=_options.allowedAutoPlacements,allowedAutoPlacements=_options$allowedAutoP===void0?placements:_options$allowedAutoP;varvariation=getVariation(placement);varplacements$1=variation?flipVariations?variationPlacements:variationPlacements.filter(function(placement){returngetVariation(placement)===variation;}):basePlacements;varallowedPlacements=placements$1.filter(function(placement){returnallowedAutoPlacements.indexOf(placement)>=0;});if(allowedPlacements.length===0){allowedPlacements=placements$1;}// $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
functiongetExpandedFallbackPlacements(placement){if(getBasePlacement(placement)===auto){return[];}varoppositePlacement=getOppositePlacement(placement);return[getOppositeVariationPlacement(placement),oppositePlacement,getOppositeVariationPlacement(oppositePlacement)];}functionflip(_ref){varstate=_ref.state,options=_ref.options,name=_ref.name;if(state.modifiersData[name]._skip){return;}var_options$mainAxis=options.mainAxis,checkMainAxis=_options$mainAxis===void0?true:_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=_options$altAxis===void0?true:_options$altAxis,specifiedFallbackPlacements=options.fallbackPlacements,padding=options.padding,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,_options$flipVariatio=options.flipVariations,flipVariations=_options$flipVariatio===void0?true:_options$flipVariatio,allowedAutoPlacements=options.allowedAutoPlacements;varpreferredPlacement=state.options.placement;varbasePlacement=getBasePlacement(preferredPlacement);varisBasePlacement=basePlacement===preferredPlacement;varfallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipVariations?[getOppositePlacement(preferredPlacement)]:getExpandedFallbackPlacements(preferredPlacement));varplacements=[preferredPlacement].concat(fallbackPlacements).reduce(function(acc,placement){returnacc.concat(getBasePlacement(placement)===auto?computeAutoPlacement(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,padding:padding,flipVariations:flipVariations,allowedAutoPlacements:allowedAutoPlacements}):placement);},[]);varreferenceRect=state.rects.reference;varpopperRect=state.rects.popper;varchecksMap=newMap();varmakeFallbackChecks=true;varfirstFittingPlacement=placements[0];for(vari=0;i<placements.length;i++){varplacement=placements[i];var_basePlacement=getBasePlacement(placement);varisStartVariation=getVariation(placement)===start;varisVertical=[top,bottom].indexOf(_basePlacement)>=0;varlen=isVertical?'width':'height';varoverflow=detectOverflow(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,altBoundary:altBoundary,padding:padding});varmainVariationSide=isVertical?isStartVariation?right:left:isStartVariation?bottom:top;if(referenceRect[len]>popperRect[len]){mainVariationSide=getOppositePlacement(mainVariationSide);}varaltVariationSide=getOppositePlacement(mainVariationSide);varchecks=[];if(checkMainAxis){checks.push(overflow[_basePlacement]<=0);}if(checkAltAxis){checks.push(overflow[mainVariationSide]<=0,overflow[altVariationSide]<=0);}if(checks.every(function(check){returncheck;})){firstFittingPlacement=placement;makeFallbackChecks=false;break;}checksMap.set(placement,checks);}if(makeFallbackChecks){// `2` may be desired in some cases – research later
functionpreventOverflow(_ref){varstate=_ref.state,options=_ref.options,name=_ref.name;var_options$mainAxis=options.mainAxis,checkMainAxis=_options$mainAxis===void0?true:_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=_options$altAxis===void0?false:_options$altAxis,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,padding=options.padding,_options$tether=options.tether,tether=_options$tether===void0?true:_options$tether,_options$tetherOffset=options.tetherOffset,tetherOffset=_options$tetherOffset===void0?0:_options$tetherOffset;varoverflow=detectOverflow(state,{boundary:boundary,rootBoundary:rootBoundary,padding:padding,altBoundary:altBoundary});varbasePlacement=getBasePlacement(state.placement);varvariation=getVariation(state.placement);varisBasePlacement=!variation;varmainAxis=getMainAxisFromPlacement(basePlacement);varaltAxis=getAltAxis(mainAxis);varpopperOffsets=state.modifiersData.popperOffsets;varreferenceRect=state.rects.reference;varpopperRect=state.rects.popper;vartetherOffsetValue=typeoftetherOffset==='function'?tetherOffset(Object.assign({},state.rects,{placement:state.placement})):tetherOffset;varnormalizedTetherOffsetValue=typeoftetherOffsetValue==='number'?{mainAxis:tetherOffsetValue,altAxis:tetherOffsetValue}:Object.assign({mainAxis:0,altAxis:0},tetherOffsetValue);varoffsetModifierState=state.modifiersData.offset?state.modifiersData.offset[state.placement]:null;vardata={x:0,y:0};if(!popperOffsets){return;}if(checkMainAxis){var_offsetModifierState$;varmainSide=mainAxis==='y'?top:left;varaltSide=mainAxis==='y'?bottom:right;varlen=mainAxis==='y'?'height':'width';varoffset=popperOffsets[mainAxis];varmin$1=offset+overflow[mainSide];varmax$1=offset-overflow[altSide];varadditive=tether?-popperRect[len]/2:0;varminLen=variation===start?referenceRect[len]:popperRect[len];varmaxLen=variation===start?-popperRect[len]:-referenceRect[len];// We need to include the arrow in the calculation so the arrow doesn't go
// outside the reference bounds
vararrowElement=state.elements.arrow;vararrowRect=tether&&arrowElement?getLayoutRect(arrowElement):{width:0,height:0};vararrowPaddingObject=state.modifiersData['arrow#persistent']?state.modifiersData['arrow#persistent'].padding:getFreshSideObject();vararrowPaddingMin=arrowPaddingObject[mainSide];vararrowPaddingMax=arrowPaddingObject[altSide];// If the reference length is smaller than the arrow length, we don't want
// to include its full size in the calculation. If the reference is small
// and near the edge of a boundary, the popper can overflow even if the
// reference is not overflowing as well (e.g. virtual elements with no
functionisElementScaled(element){varrect=element.getBoundingClientRect();varscaleX=round(rect.width)/element.offsetWidth||1;varscaleY=round(rect.height)/element.offsetHeight||1;returnscaleX!==1||scaleY!==1;}// Returns the composite rect of an element relative to its offsetParent.
// Composite means it takes into account transforms as well as layout.
functionorder(modifiers){varmap=newMap();varvisited=newSet();varresult=[];modifiers.forEach(function(modifier){map.set(modifier.name,modifier);});// On visiting object, check for its dependencies and visit them recursively
functionsort(modifier){visited.add(modifier.name);varrequires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){vardepModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);}modifiers.forEach(function(modifier){if(!visited.has(modifier.name)){// check for visited object
sort(modifier);}});returnresult;}functionorderModifiers(modifiers){// order based on dependencies
varorderedModifiers=order(modifiers);// order based on phase
functionmergeByName(modifiers){varmerged=modifiers.reduce(function(merged,current){varexisting=merged[current.name];merged[current.name]=existing?Object.assign({},existing,current,{options:Object.assign({},existing.options,current.options),data:Object.assign({},existing.data,current.data)}):current;returnmerged;},{});// IE11 does not support Object.values
varDEFAULT_OPTIONS={placement:'bottom',modifiers:[],strategy:'absolute'};functionareValidElements(){for(var_len=arguments.length,args=newArray(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}return!args.some(function(element){return!(element&&typeofelement.getBoundingClientRect==='function');});}functionpopperGenerator(generatorOptions){if(generatorOptions===void0){generatorOptions={};}var_generatorOptions=generatorOptions,_generatorOptions$def=_generatorOptions.defaultModifiers,defaultModifiers=_generatorOptions$def===void0?[]:_generatorOptions$def,_generatorOptions$def2=_generatorOptions.defaultOptions,defaultOptions=_generatorOptions$def2===void0?DEFAULT_OPTIONS:_generatorOptions$def2;returnfunctioncreatePopper(reference,popper,options){if(options===void0){options=defaultOptions;}varstate={placement:'bottom',orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,defaultOptions),modifiersData:{},elements:{reference:reference,popper:popper},attributes:{},styles:{}};vareffectCleanupFns=[];varisDestroyed=false;varinstance={state:state,setOptions:functionsetOptions(setOptionsAction){varoptions=typeofsetOptionsAction==='function'?setOptionsAction(state.options):setOptionsAction;cleanupModifierEffects();state.options=Object.assign({},defaultOptions,state.options,options);state.scrollParents={reference:isElement$1(reference)?listScrollParents(reference):reference.contextElement?listScrollParents(reference.contextElement):[],popper:listScrollParents(popper)};// Orders the modifiers based on their dependencies and `phase`
// properties
varorderedModifiers=orderModifiers(mergeByName([].concat(defaultModifiers,state.options.modifiers)));// Strip out disabled modifiers
state.orderedModifiers=orderedModifiers.filter(function(m){returnm.enabled;});runModifierEffects();returninstance.update();},// Sync update – it will always be executed, even if not necessary. This
// is useful for low frequency updates where sync behavior simplifies the
// logic.
// For high frequency updates (e.g. `resize` and `scroll` events), always
// prefer the async Popper#update method
forceUpdate:functionforceUpdate(){if(isDestroyed){return;}var_state$elements=state.elements,reference=_state$elements.reference,popper=_state$elements.popper;// Don't proceed if `reference` or `popper` are not valid elements
// anymore
if(!areValidElements(reference,popper)){return;}// Store the reference and popper rects to be read by modifiers
state.rects={reference:getCompositeRect(reference,getOffsetParent(popper),state.options.strategy==='fixed'),popper:getLayoutRect(popper)};// Modifiers have the ability to reset the current update cycle. The
// most common use case for this is the `flip` modifier changing the
// placement, which then needs to re-run all the modifiers, because the
// logic was previously ran for the previous placement and is therefore
// stale/incorrect
state.reset=false;state.placement=state.options.placement;// On each update cycle, the `modifiersData` property for each modifier
// is filled with the initial data specified by the modifier. This means
// it doesn't persist and is fresh on each update.
// To ensure persistent data, use `${name}#persistent`
state.orderedModifiers.forEach(function(modifier){returnstate.modifiersData[modifier.name]=Object.assign({},modifier.data);});for(varindex=0;index<state.orderedModifiers.length;index++){if(state.reset===true){state.reset=false;index=-1;continue;}var_state$orderedModifie=state.orderedModifiers[index],fn=_state$orderedModifie.fn,_state$orderedModifie2=_state$orderedModifie.options,_options=_state$orderedModifie2===void0?{}:_state$orderedModifie2,name=_state$orderedModifie.name;if(typeoffn==='function'){state=fn({state:state,options:_options,name:name,instance:instance})||state;}}},// Async and optimistically optimized update – it will not be executed if
// not necessary (debounced to run at most once-per-tick)
update:debounce(function(){returnnewPromise(function(resolve){instance.forceUpdate();resolve(state);});}),destroy:functiondestroy(){cleanupModifierEffects();isDestroyed=true;}};if(!areValidElements(reference,popper)){returninstance;}instance.setOptions(options).then(function(state){if(!isDestroyed&&options.onFirstUpdate){options.onFirstUpdate(state);}});// Modifiers have the ability to execute arbitrary code before the first
// update cycle runs. They will be executed in the same order as the update
// cycle. This is useful when a modifier adds some persistent data that
// other modifiers need to use, but the modifier is run after the dependent
*/constelementMap=newMap();constData={set(element,key,instance){if(!elementMap.has(element)){elementMap.set(element,newMap());}constinstanceMap=elementMap.get(element);// make it clear we only want one instance per element
// can be removed later when multiple key/instances are fine to be used
console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);return;}instanceMap.set(key,instance);},get(element,key){if(elementMap.has(element)){returnelementMap.get(element).get(key)||null;}returnnull;},remove(element,key){if(!elementMap.has(element)){return;}constinstanceMap=elementMap.get(element);instanceMap.delete(key);// free up element references if there are no instances left for an element
*/constgetUID=prefix=>{do{prefix+=Math.floor(Math.random()*MAX_UID);}while(document.getElementById(prefix));returnprefix;};constgetTransitionDurationFromElement=element=>{if(!element){return0;}// Get transition-duration of the element
let{transitionDuration,transitionDelay}=window.getComputedStyle(element);constfloatTransitionDuration=Number.parseFloat(transitionDuration);constfloatTransitionDelay=Number.parseFloat(transitionDelay);// Return 0 if element or transition duration is not found
if(!floatTransitionDuration&&!floatTransitionDelay){return0;}// If multiple durations are defined, take the first
transitionDuration=transitionDuration.split(',')[0];transitionDelay=transitionDelay.split(',')[0];return(Number.parseFloat(transitionDuration)+Number.parseFloat(transitionDelay))*MILLISECONDS_MULTIPLIER;};consttriggerTransitionEnd=element=>{element.dispatchEvent(newEvent(TRANSITION_END));};constisElement=object=>{if(!object||typeofobject!=='object'){returnfalse;}if(typeofobject.jquery!=='undefined'){object=object[0];}returntypeofobject.nodeType!=='undefined';};constgetElement=object=>{// it's a jQuery object or a node element
if(isElement(object)){returnobject.jquery?object[0]:object;}if(typeofobject==='string'&&object.length>0){returndocument.querySelector(parseSelector(object));}returnnull;};constisVisible=element=>{if(!isElement(element)||element.getClientRects().length===0){returnfalse;}constelementIsVisible=getComputedStyle(element).getPropertyValue('visibility')==='visible';// Handle `details` element as its content may falsie appear visible when it is closed
constclosedDetails=element.closest('details:not([open])');if(!closedDetails){returnelementIsVisible;}if(closedDetails!==element){constsummary=element.closest('summary');if(summary&&summary.parentNode!==closedDetails){returnfalse;}if(summary===null){returnfalse;}}returnelementIsVisible;};constisDisabled=element=>{if(!element||element.nodeType!==Node.ELEMENT_NODE){returntrue;}if(element.classList.contains('disabled')){returntrue;}if(typeofelement.disabled!=='undefined'){returnelement.disabled;}returnelement.hasAttribute('disabled')&&element.getAttribute('disabled')!=='false';};constfindShadowRoot=element=>{if(!document.documentElement.attachShadow){returnnull;}// Can find the shadow root otherwise it'll return the document
if(typeofelement.getRootNode==='function'){constroot=element.getRootNode();returnrootinstanceofShadowRoot?root:null;}if(elementinstanceofShadowRoot){returnelement;}// when we don't find a shadow root
};constgetjQuery=()=>{if(window.jQuery&&!document.body.hasAttribute('data-bs-no-jquery')){returnwindow.jQuery;}returnnull;};constDOMContentLoadedCallbacks=[];constonDOMContentLoaded=callback=>{if(document.readyState==='loading'){// add listener on the first call when the document is in loading state
if(!DOMContentLoadedCallbacks.length){document.addEventListener('DOMContentLoaded',()=>{for(constcallbackofDOMContentLoadedCallbacks){callback();}});}DOMContentLoadedCallbacks.push(callback);}else{callback();}};constisRTL=()=>document.documentElement.dir==='rtl';constdefineJQueryPlugin=plugin=>{onDOMContentLoaded(()=>{const$=getjQuery();/* istanbul ignore if */if($){constname=plugin.NAME;constJQUERY_NO_CONFLICT=$.fn[name];$.fn[name]=plugin.jQueryInterface;$.fn[name].Constructor=plugin;$.fn[name].noConflict=()=>{$.fn[name]=JQUERY_NO_CONFLICT;returnplugin.jQueryInterface;};}});};constexecute=(possibleCallback,args=[],defaultValue=possibleCallback)=>{returntypeofpossibleCallback==='function'?possibleCallback.call(...args):defaultValue;};constexecuteAfterTransition=(callback,transitionElement,waitForTransition=true)=>{if(!waitForTransition){execute(callback);return;}constdurationPadding=5;constemulatedDuration=getTransitionDurationFromElement(transitionElement)+durationPadding;letcalled=false;consthandler=({target})=>{if(target!==transitionElement){return;}called=true;transitionElement.removeEventListener(TRANSITION_END,handler);execute(callback);};transitionElement.addEventListener(TRANSITION_END,handler);setTimeout(()=>{if(!called){triggerTransitionEnd(transitionElement);}},emulatedDuration);};/**
* Return the previous/next element of a list.
*
* @param {array} list The list of elements
* @param activeElement The active element
* @param shouldGetNext Choose to get next or previous element
* @param isCycleAllowed
* @return {Element|elem} The proper element
*/constgetNextActiveElement=(list,activeElement,shouldGetNext,isCycleAllowed)=>{constlistLength=list.length;letindex=list.indexOf(activeElement);// if the element does not exist in the list return an element
// depending on the direction and if cycle is allowed
*/functionmakeEventUid(element,uid){returnuid&&`${uid}::${uidEvent++}`||element.uidEvent||uidEvent++;}functiongetElementEvents(element){constuid=makeEventUid(element);element.uidEvent=uid;eventRegistry[uid]=eventRegistry[uid]||{};returneventRegistry[uid];}functionbootstrapHandler(element,fn){returnfunctionhandler(event){hydrateObj(event,{delegateTarget:element});if(handler.oneOff){EventHandler.off(element,event.type,fn);}returnfn.apply(element,[event]);};}functionbootstrapDelegationHandler(element,selector,fn){returnfunctionhandler(event){constdomElements=element.querySelectorAll(selector);for(let{target}=event;target&&target!==this;target=target.parentNode){for(constdomElementofdomElements){if(domElement!==target){continue;}hydrateObj(event,{delegateTarget:target});if(handler.oneOff){EventHandler.off(element,event.type,selector,fn);}returnfn.apply(target,[event]);}}};}functionfindHandler(events,callable,delegationSelector=null){returnObject.values(events).find(event=>event.callable===callable&&event.delegationSelector===delegationSelector);}functionnormalizeParameters(originalTypeEvent,handler,delegationFunction){constisDelegated=typeofhandler==='string';// TODO: tooltip passes `false` instead of selector, so we need to check
constcallable=isDelegated?delegationFunction:handler||delegationFunction;lettypeEvent=getTypeEvent(originalTypeEvent);if(!nativeEvents.has(typeEvent)){typeEvent=originalTypeEvent;}return[isDelegated,callable,typeEvent];}functionaddHandler(element,originalTypeEvent,handler,delegationFunction,oneOff){if(typeoforiginalTypeEvent!=='string'||!element){return;}let[isDelegated,callable,typeEvent]=normalizeParameters(originalTypeEvent,handler,delegationFunction);// in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
// this prevents the handler from being dispatched the same way as mouseover or mouseout does
if(originalTypeEventincustomEvents){constwrapFunction=fn=>{returnfunction(event){if(!event.relatedTarget||event.relatedTarget!==event.delegateTarget&&!event.delegateTarget.contains(event.relatedTarget)){returnfn.call(this,event);}};};callable=wrapFunction(callable);}constevents=getElementEvents(element);consthandlers=events[typeEvent]||(events[typeEvent]={});constpreviousFunction=findHandler(handlers,callable,isDelegated?handler:null);if(previousFunction){previousFunction.oneOff=previousFunction.oneOff&&oneOff;return;}constuid=makeEventUid(callable,originalTypeEvent.replace(namespaceRegex,''));constfn=isDelegated?bootstrapDelegationHandler(element,handler,callable):bootstrapHandler(element,callable);fn.delegationSelector=isDelegated?handler:null;fn.callable=callable;fn.oneOff=oneOff;fn.uidEvent=uid;handlers[uid]=fn;element.addEventListener(typeEvent,fn,isDelegated);}functionremoveHandler(element,events,typeEvent,handler,delegationSelector){constfn=findHandler(events[typeEvent],handler,delegationSelector);if(!fn){return;}element.removeEventListener(typeEvent,fn,Boolean(delegationSelector));deleteevents[typeEvent][fn.uidEvent];}functionremoveNamespacedHandlers(element,events,typeEvent,namespace){conststoreElementEvent=events[typeEvent]||{};for(const[handlerKey,event]ofObject.entries(storeElementEvent)){if(handlerKey.includes(namespace)){removeHandler(element,events,typeEvent,event.callable,event.delegationSelector);}}}functiongetTypeEvent(event){// allow to get the native events from namespaced events ('click.bs.button' --> 'click')
event=event.replace(stripNameRegex,'');returncustomEvents[event]||event;}constEventHandler={on(element,event,handler,delegationFunction){addHandler(element,event,handler,delegationFunction,false);},one(element,event,handler,delegationFunction){addHandler(element,event,handler,delegationFunction,true);},off(element,originalTypeEvent,handler,delegationFunction){if(typeoforiginalTypeEvent!=='string'||!element){return;}const[isDelegated,callable,typeEvent]=normalizeParameters(originalTypeEvent,handler,delegationFunction);constinNamespace=typeEvent!==originalTypeEvent;constevents=getElementEvents(element);conststoreElementEvent=events[typeEvent]||{};constisNamespace=originalTypeEvent.startsWith('.');if(typeofcallable!=='undefined'){// Simplest case: handler is passed, remove that listener ONLY.
staticgetDefault(){return{};}staticgetDefaultType(){return{};}staticgetNAME(){thrownewError('You have to implement the static method "NAME", for each component!');}_getConfig(config){config=this._mergeConfigObj(config);config=this._configAfterMerge(config);this._typeCheckConfig(config);returnconfig;}_configAfterMerge(config){returnconfig;}_mergeConfigObj(config,element){constjsonConfig=isElement(element)?Manipulator.getDataAttribute(element,'config'):{};// try to parse
return{...this.constructor.Default,...(typeofjsonConfig==='object'?jsonConfig:{}),...(isElement(element)?Manipulator.getDataAttributes(element):{}),...(typeofconfig==='object'?config:{})};}_typeCheckConfig(config,configTypes=this.constructor.DefaultType){for(const[property,expectedTypes]ofObject.entries(configTypes)){constvalue=config[property];constvalueType=isElement(value)?'element':toType(value);if(!newRegExp(expectedTypes).test(valueType)){thrownewTypeError(`${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);}}}}/**
*/classBaseComponentextendsConfig{constructor(element,config){super();element=getElement(element);if(!element){return;}this._element=element;this._config=this._getConfig(config);Data.set(this._element,this.constructor.DATA_KEY,this);}// Public
*/constgetSelector=element=>{letselector=element.getAttribute('data-bs-target');if(!selector||selector==='#'){lethrefAttribute=element.getAttribute('href');// The only valid content that could double as a selector are IDs or classes,
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
// `document.querySelector` will rightfully complain it is invalid.
// See https://github.com/twbs/bootstrap/issues/32273
if(!hrefAttribute||!hrefAttribute.includes('#')&&!hrefAttribute.startsWith('.')){returnnull;}// Just in case some CMS puts out a full URL with the anchor appended
if(hrefAttribute.includes('#')&&!hrefAttribute.startsWith('#')){hrefAttribute=`#${hrefAttribute.split('#')[1]}`;}selector=hrefAttribute&&hrefAttribute!=='#'?hrefAttribute.trim():null;}returnselector?selector.split(',').map(sel=>parseSelector(sel)).join(','):null;};constSelectorEngine={find(selector,element=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(element,selector));},findOne(selector,element=document.documentElement){returnElement.prototype.querySelector.call(element,selector);},children(element,selector){return[].concat(...element.children).filter(child=>child.matches(selector));},parents(element,selector){constparents=[];letancestor=element.parentNode.closest(selector);while(ancestor){parents.push(ancestor);ancestor=ancestor.parentNode.closest(selector);}returnparents;},prev(element,selector){letprevious=element.previousElementSibling;while(previous){if(previous.matches(selector)){return[previous];}previous=previous.previousElementSibling;}return[];},// TODO: this is now unused; remove later along with prev()
*/constenableDismissTrigger=(component,method='hide')=>{constclickEvent=`click.dismiss${component.EVENT_KEY}`;constname=component.NAME;EventHandler.on(document,clickEvent,`[data-bs-dismiss="${name}"]`,function(event){if(['A','AREA'].includes(this.tagName)){event.preventDefault();}if(isDisabled(this)){return;}consttarget=SelectorEngine.getElementFromSelector(this)||this.closest(`.${name}`);constinstance=component.getOrCreateInstance(target);// Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
staticjQueryInterface(config){returnthis.each(function(){constdata=Alert.getOrCreateInstance(this);if(typeofconfig!=='string'){return;}if(data[config]===undefined||config.startsWith('_')||config==='constructor'){thrownewTypeError(`No method named "${config}"`);}data[config](this);});}}/**
*/constNAME$c='carousel';constDATA_KEY$8='bs.carousel';constEVENT_KEY$8=`.${DATA_KEY$8}`;constDATA_API_KEY$5='.data-api';constARROW_LEFT_KEY$1='ArrowLeft';constARROW_RIGHT_KEY$1='ArrowRight';constTOUCHEVENT_COMPAT_WAIT=500;// Time for mouse compat events to fire after touch
constORDER_NEXT='next';constORDER_PREV='prev';constDIRECTION_LEFT='left';constDIRECTION_RIGHT='right';constEVENT_SLIDE=`slide${EVENT_KEY$8}`;constEVENT_SLID=`slid${EVENT_KEY$8}`;constEVENT_KEYDOWN$1=`keydown${EVENT_KEY$8}`;constEVENT_MOUSEENTER$1=`mouseenter${EVENT_KEY$8}`;constEVENT_MOUSELEAVE$1=`mouseleave${EVENT_KEY$8}`;constEVENT_DRAG_START=`dragstart${EVENT_KEY$8}`;constEVENT_LOAD_DATA_API$3=`load${EVENT_KEY$8}${DATA_API_KEY$5}`;constEVENT_CLICK_DATA_API$5=`click${EVENT_KEY$8}${DATA_API_KEY$5}`;constCLASS_NAME_CAROUSEL='carousel';constCLASS_NAME_ACTIVE$2='active';constCLASS_NAME_SLIDE='slide';constCLASS_NAME_END='carousel-item-end';constCLASS_NAME_START='carousel-item-start';constCLASS_NAME_NEXT='carousel-item-next';constCLASS_NAME_PREV='carousel-item-prev';constSELECTOR_ACTIVE='.active';constSELECTOR_ITEM='.carousel-item';constSELECTOR_ACTIVE_ITEM=SELECTOR_ACTIVE+SELECTOR_ITEM;constSELECTOR_ITEM_IMG='.carousel-item img';constSELECTOR_INDICATORS='.carousel-indicators';constSELECTOR_DATA_SLIDE='[data-bs-slide], [data-bs-slide-to]';constSELECTOR_DATA_RIDE='[data-bs-ride="carousel"]';constKEY_TO_DIRECTION={[ARROW_LEFT_KEY$1]:DIRECTION_RIGHT,[ARROW_RIGHT_KEY$1]:DIRECTION_LEFT};constDefault$b={interval:5000,keyboard:true,pause:'hover',ride:false,touch:true,wrap:true};constDefaultType$b={interval:'(number|boolean)',// TODO:v6 remove boolean support
_configAfterMerge(config){config.defaultInterval=config.interval;returnconfig;}_addEventListeners(){if(this._config.keyboard){EventHandler.on(this._element,EVENT_KEYDOWN$1,event=>this._keydown(event));}if(this._config.pause==='hover'){EventHandler.on(this._element,EVENT_MOUSEENTER$1,()=>this.pause());EventHandler.on(this._element,EVENT_MOUSELEAVE$1,()=>this._maybeEnableCycle());}if(this._config.touch&&Swipe.isSupported()){this._addTouchEventListeners();}}_addTouchEventListeners(){for(constimgofSelectorEngine.find(SELECTOR_ITEM_IMG,this._element)){EventHandler.on(img,EVENT_DRAG_START,event=>event.preventDefault());}constendCallBack=()=>{if(this._config.pause!=='hover'){return;}// If it's a touch-enabled device, mouseenter/leave are fired as
// part of the mouse compatibility events on first tap - the carousel
// would stop cycling until user tapped out of it;
// here, we listen for touchend, explicitly pause the carousel
// (as if it's the second time we tap on it, mouseenter compat event
// is NOT fired) and after a timeout (to allow for mouse compatibility
// events to fire) we explicitly restart cycling
this.pause();if(this.touchTimeout){clearTimeout(this.touchTimeout);}this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),TOUCHEVENT_COMPAT_WAIT+this._config.interval);};constswipeConfig={leftCallback:()=>this._slide(this._directionToOrder(DIRECTION_LEFT)),rightCallback:()=>this._slide(this._directionToOrder(DIRECTION_RIGHT)),endCallback:endCallBack};this._swipeHelper=newSwipe(this._element,swipeConfig);}_keydown(event){if(/input|textarea/i.test(event.target.tagName)){return;}constdirection=KEY_TO_DIRECTION[event.key];if(direction){event.preventDefault();this._slide(this._directionToOrder(direction));}}_getItemIndex(element){returnthis._getItems().indexOf(element);}_setActiveIndicatorElement(index){if(!this._indicatorsElement){return;}constactiveIndicator=SelectorEngine.findOne(SELECTOR_ACTIVE,this._indicatorsElement);activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);activeIndicator.removeAttribute('aria-current');constnewActiveIndicator=SelectorEngine.findOne(`[data-bs-slide-to="${index}"]`,this._indicatorsElement);if(newActiveIndicator){newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);newActiveIndicator.setAttribute('aria-current','true');}}_updateInterval(){constelement=this._activeElement||this._getActive();if(!element){return;}constelementInterval=Number.parseInt(element.getAttribute('data-bs-interval'),10);this._config.interval=elementInterval||this._config.defaultInterval;}_slide(order,element=null){if(this._isSliding){return;}constactiveElement=this._getActive();constisNext=order===ORDER_NEXT;constnextElement=element||getNextActiveElement(this._getItems(),activeElement,isNext,this._config.wrap);if(nextElement===activeElement){return;}constnextElementIndex=this._getItemIndex(nextElement);consttriggerEvent=eventName=>{returnEventHandler.trigger(this._element,eventName,{relatedTarget:nextElement,direction:this._orderToDirection(order),from:this._getItemIndex(activeElement),to:nextElementIndex});};constslideEvent=triggerEvent(EVENT_SLIDE);if(slideEvent.defaultPrevented){return;}if(!activeElement||!nextElement){// Some weirdness is happening, so we bail
// TODO: change tests that use empty divs to avoid this check
staticjQueryInterface(config){returnthis.each(function(){constdata=Carousel.getOrCreateInstance(this,config);if(typeofconfig==='number'){data.to(config);return;}if(typeofconfig==='string'){if(data[config]===undefined||config.startsWith('_')||config==='constructor'){thrownewTypeError(`No method named "${config}"`);}data[config]();}});}}/**
staticgetDefault(){returnDefault$a;}staticgetDefaultType(){returnDefaultType$a;}staticgetNAME(){returnNAME$b;}// Public
toggle(){if(this._isShown()){this.hide();}else{this.show();}}show(){if(this._isTransitioning||this._isShown()){return;}letactiveChildren=[];// find active children
config.parent=getElement(config.parent);returnconfig;}_getDimension(){returnthis._element.classList.contains(CLASS_NAME_HORIZONTAL)?WIDTH:HEIGHT;}_initializeChildren(){if(!this._config.parent){return;}constchildren=this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);for(constelementofchildren){constselected=SelectorEngine.getElementFromSelector(element);if(selected){this._addAriaAndCollapsedClass([element],this._isShown(selected));}}}_getFirstLevelChildren(selector){constchildren=SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN,this._config.parent);// remove children if greater depth
staticjQueryInterface(config){const_config={};if(typeofconfig==='string'&&/show|hide/.test(config)){_config.toggle=false;}returnthis.each(function(){constdata=Collapse.getOrCreateInstance(this,_config);if(typeofconfig==='string'){if(typeofdata[config]==='undefined'){thrownewTypeError(`No method named "${config}"`);}data[config]();}});}}/**
* Data API implementation
*/EventHandler.on(document,EVENT_CLICK_DATA_API$4,SELECTOR_DATA_TOGGLE$4,function(event){// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
*/constNAME$a='dropdown';constDATA_KEY$6='bs.dropdown';constEVENT_KEY$6=`.${DATA_KEY$6}`;constDATA_API_KEY$3='.data-api';constESCAPE_KEY$2='Escape';constTAB_KEY$1='Tab';constARROW_UP_KEY$1='ArrowUp';constARROW_DOWN_KEY$1='ArrowDown';constRIGHT_MOUSE_BUTTON=2;// MouseEvent.button value for the secondary button, usually the right button
staticgetDefault(){returnDefault$9;}staticgetDefaultType(){returnDefaultType$9;}staticgetNAME(){returnNAME$a;}// Public
toggle(){returnthis._isShown()?this.hide():this.show();}show(){if(isDisabled(this._element)||this._isShown()){return;}constrelatedTarget={relatedTarget:this._element};constshowEvent=EventHandler.trigger(this._element,EVENT_SHOW$5,relatedTarget);if(showEvent.defaultPrevented){return;}this._createPopper();// If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
_completeHide(relatedTarget){consthideEvent=EventHandler.trigger(this._element,EVENT_HIDE$5,relatedTarget);if(hideEvent.defaultPrevented){return;}// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if('ontouchstart'indocument.documentElement){for(constelementof[].concat(...document.body.children)){EventHandler.off(element,'mouseover',noop);}}if(this._popper){this._popper.destroy();}this._menu.classList.remove(CLASS_NAME_SHOW$6);this._element.classList.remove(CLASS_NAME_SHOW$6);this._element.setAttribute('aria-expanded','false');Manipulator.removeDataAttribute(this._menu,'popper');EventHandler.trigger(this._element,EVENT_HIDDEN$5,relatedTarget);}_getConfig(config){config=super._getConfig(config);if(typeofconfig.reference==='object'&&!isElement(config.reference)&&typeofconfig.reference.getBoundingClientRect!=='function'){// Popper virtual elements require a getBoundingClientRect method
thrownewTypeError(`${NAME$a.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);}returnconfig;}_createPopper(){if(typeofPopper==='undefined'){thrownewTypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)');}letreferenceElement=this._element;if(this._config.reference==='parent'){referenceElement=this._parent;}elseif(isElement(this._config.reference)){referenceElement=getElement(this._config.reference);}elseif(typeofthis._config.reference==='object'){referenceElement=this._config.reference;}constpopperConfig=this._getPopperConfig();this._popper=createPopper(referenceElement,this._menu,popperConfig);}_isShown(){returnthis._menu.classList.contains(CLASS_NAME_SHOW$6);}_getPlacement(){constparentDropdown=this._parent;if(parentDropdown.classList.contains(CLASS_NAME_DROPEND)){returnPLACEMENT_RIGHT;}if(parentDropdown.classList.contains(CLASS_NAME_DROPSTART)){returnPLACEMENT_LEFT;}if(parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)){returnPLACEMENT_TOPCENTER;}if(parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)){returnPLACEMENT_BOTTOMCENTER;}// We need to trim the value because custom properties can also include spaces
constisEnd=getComputedStyle(this._menu).getPropertyValue('--bs-position').trim()==='end';if(parentDropdown.classList.contains(CLASS_NAME_DROPUP)){returnisEnd?PLACEMENT_TOPEND:PLACEMENT_TOP;}returnisEnd?PLACEMENT_BOTTOMEND:PLACEMENT_BOTTOM;}_detectNavbar(){returnthis._element.closest(SELECTOR_NAVBAR)!==null;}_getOffset(){const{offset}=this._config;if(typeofoffset==='string'){returnoffset.split(',').map(value=>Number.parseInt(value,10));}if(typeofoffset==='function'){returnpopperData=>offset(popperData,this._element);}returnoffset;}_getPopperConfig(){constdefaultBsPopperConfig={placement:this._getPlacement(),modifiers:[{name:'preventOverflow',options:{boundary:this._config.boundary}},{name:'offset',options:{offset:this._getOffset()}}]};// Disable Popper if we have a static display or Dropdown is in Navbar
defaultBsPopperConfig.modifiers=[{name:'applyStyles',enabled:false}];}return{...defaultBsPopperConfig,...execute(this._config.popperConfig,[undefined,defaultBsPopperConfig])};}_selectMenuItem({key,target}){constitems=SelectorEngine.find(SELECTOR_VISIBLE_ITEMS,this._menu).filter(element=>isVisible(element));if(!items.length){return;}// if target isn't included in items (e.g. when expanding the dropdown)
// allow cycling to get the last item in case key equals ARROW_UP_KEY
staticjQueryInterface(config){returnthis.each(function(){constdata=Dropdown.getOrCreateInstance(this,config);if(typeofconfig!=='string'){return;}if(typeofdata[config]==='undefined'){thrownewTypeError(`No method named "${config}"`);}data[config]();});}staticclearMenus(event){if(event.button===RIGHT_MOUSE_BUTTON||event.type==='keyup'&&event.key!==TAB_KEY$1){return;}constopenToggles=SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);for(consttoggleofopenToggles){constcontext=Dropdown.getInstance(toggle);if(!context||context._config.autoClose===false){continue;}constcomposedPath=event.composedPath();constisMenuTarget=composedPath.includes(context._menu);if(composedPath.includes(context._element)||context._config.autoClose==='inside'&&!isMenuTarget||context._config.autoClose==='outside'&&isMenuTarget){continue;}// Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
if(context._menu.contains(event.target)&&(event.type==='keyup'&&event.key===TAB_KEY$1||/input|select|option|textarea|form/i.test(event.target.tagName))){continue;}constrelatedTarget={relatedTarget:context._element};if(event.type==='click'){relatedTarget.clickEvent=event;}context._completeHide(relatedTarget);}}staticdataApiKeydownHandler(event){// If not an UP | DOWN | ESCAPE key => not a dropdown command
// If input/textarea && if key is other than ESCAPE => not a dropdown command
constgetToggleButton=this.matches(SELECTOR_DATA_TOGGLE$3)?this:SelectorEngine.prev(this,SELECTOR_DATA_TOGGLE$3)[0]||SelectorEngine.next(this,SELECTOR_DATA_TOGGLE$3)[0]||SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3,event.delegateTarget.parentNode);constinstance=Dropdown.getOrCreateInstance(getToggleButton);if(isUpOrDownEvent){event.stopPropagation();instance.show();instance._selectMenuItem(event);return;}if(instance._isShown()){// else is escape and we check if it is shown
*/constNAME$9='backdrop';constCLASS_NAME_FADE$4='fade';constCLASS_NAME_SHOW$5='show';constEVENT_MOUSEDOWN=`mousedown.bs.${NAME$9}`;constDefault$8={className:'modal-backdrop',clickCallback:null,isAnimated:false,isVisible:true,// if false, we use the backdrop helper without adding any element to the dom
rootElement:'body'// give the choice to place backdrop under different elements
_getElement(){if(!this._element){constbackdrop=document.createElement('div');backdrop.className=this._config.className;if(this._config.isAnimated){backdrop.classList.add(CLASS_NAME_FADE$4);}this._element=backdrop;}returnthis._element;}_configAfterMerge(config){// use getElement() with the default "body" to get a fresh Element on each instantiation
*/constNAME$8='focustrap';constDATA_KEY$5='bs.focustrap';constEVENT_KEY$5=`.${DATA_KEY$5}`;constEVENT_FOCUSIN$2=`focusin${EVENT_KEY$5}`;constEVENT_KEYDOWN_TAB=`keydown.tab${EVENT_KEY$5}`;constTAB_KEY='Tab';constTAB_NAV_FORWARD='forward';constTAB_NAV_BACKWARD='backward';constDefault$7={autofocus:true,trapElement:null// The element to trap focus inside of
constdocumentWidth=document.documentElement.clientWidth;returnMath.abs(window.innerWidth-documentWidth);}hide(){constwidth=this.getWidth();this._disableOverFlow();// give padding to element to balance the hidden scrollbar width
this._setElementAttributes(this._element,PROPERTY_PADDING,calculatedValue=>calculatedValue+width);// trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
_disableOverFlow(){this._saveInitialAttribute(this._element,'overflow');this._element.style.overflow='hidden';}_setElementAttributes(selector,styleProperty,callback){constscrollbarWidth=this.getWidth();constmanipulationCallBack=element=>{if(element!==this._element&&window.innerWidth>element.clientWidth+scrollbarWidth){return;}this._saveInitialAttribute(element,styleProperty);constcalculatedValue=window.getComputedStyle(element).getPropertyValue(styleProperty);element.style.setProperty(styleProperty,`${callback(Number.parseFloat(calculatedValue))}px`);};this._applyManipulationCallback(selector,manipulationCallBack);}_saveInitialAttribute(element,styleProperty){constactualValue=element.style.getPropertyValue(styleProperty);if(actualValue){Manipulator.setDataAttribute(element,styleProperty,actualValue);}}_resetElementAttributes(selector,styleProperty){constmanipulationCallBack=element=>{constvalue=Manipulator.getDataAttribute(element,styleProperty);// We only want to remove the property if the value is `null`; the value can also be zero
_initializeBackDrop(){returnnewBackdrop({isVisible:Boolean(this._config.backdrop),// 'static' option will be translated to true, and booleans will keep their value,
isAnimated:this._isAnimated()});}_initializeFocusTrap(){returnnewFocusTrap({trapElement:this._element});}_showElement(relatedTarget){// try to append dynamic modal
if(!document.body.contains(this._element)){document.body.append(this._element);}this._element.style.display='block';this._element.removeAttribute('aria-hidden');this._element.setAttribute('aria-modal',true);this._element.setAttribute('role','dialog');this._element.scrollTop=0;constmodalBody=SelectorEngine.findOne(SELECTOR_MODAL_BODY,this._dialog);if(modalBody){modalBody.scrollTop=0;}reflow(this._element);this._element.classList.add(CLASS_NAME_SHOW$4);consttransitionComplete=()=>{if(this._config.focus){this._focustrap.activate();}this._isTransitioning=false;EventHandler.trigger(this._element,EVENT_SHOWN$4,{relatedTarget});};this._queueCallback(transitionComplete,this._dialog,this._isAnimated());}_addEventListeners(){EventHandler.on(this._element,EVENT_KEYDOWN_DISMISS$1,event=>{if(event.key!==ESCAPE_KEY$1){return;}if(this._config.keyboard){this.hide();return;}this._triggerBackdropTransition();});EventHandler.on(window,EVENT_RESIZE$1,()=>{if(this._isShown&&!this._isTransitioning){this._adjustDialog();}});EventHandler.on(this._element,EVENT_MOUSEDOWN_DISMISS,event=>{// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
EventHandler.one(this._element,EVENT_CLICK_DISMISS,event2=>{if(this._element!==event.target||this._element!==event2.target){return;}if(this._config.backdrop==='static'){this._triggerBackdropTransition();return;}if(this._config.backdrop){this.hide();}});});}_hideModal(){this._element.style.display='none';this._element.setAttribute('aria-hidden',true);this._element.removeAttribute('aria-modal');this._element.removeAttribute('role');this._isTransitioning=false;this._backdrop.hide(()=>{document.body.classList.remove(CLASS_NAME_OPEN);this._resetAdjustments();this._scrollBar.reset();EventHandler.trigger(this._element,EVENT_HIDDEN$4);});}_isAnimated(){returnthis._element.classList.contains(CLASS_NAME_FADE$3);}_triggerBackdropTransition(){consthideEvent=EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED$1);if(hideEvent.defaultPrevented){return;}constisModalOverflowing=this._element.scrollHeight>document.documentElement.clientHeight;constinitialOverflowY=this._element.style.overflowY;// return if the following background transition hasn't yet completed
staticjQueryInterface(config,relatedTarget){returnthis.each(function(){constdata=Modal.getOrCreateInstance(this,config);if(typeofconfig!=='string'){return;}if(typeofdata[config]==='undefined'){thrownewTypeError(`No method named "${config}"`);}data[config](relatedTarget);});}}/**
* Data API implementation
*/EventHandler.on(document,EVENT_CLICK_DATA_API$2,SELECTOR_DATA_TOGGLE$2,function(event){consttarget=SelectorEngine.getElementFromSelector(this);if(['A','AREA'].includes(this.tagName)){event.preventDefault();}EventHandler.one(target,EVENT_SHOW$4,showEvent=>{if(showEvent.defaultPrevented){// only register focus restorer if modal will actually get shown
return;}EventHandler.one(target,EVENT_HIDDEN$4,()=>{if(isVisible(this)){this.focus();}});});// avoid conflict when clicking modal toggler while another one is open
_initializeBackDrop(){constclickCallback=()=>{if(this._config.backdrop==='static'){EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED);return;}this.hide();};// 'static' option will be translated to true, and booleans will keep their value
staticjQueryInterface(config){returnthis.each(function(){constdata=Offcanvas.getOrCreateInstance(this,config);if(typeofconfig!=='string'){return;}if(data[config]===undefined||config.startsWith('_')||config==='constructor'){thrownewTypeError(`No method named "${config}"`);}data[config](this);});}}/**
* Data API implementation
*/EventHandler.on(document,EVENT_CLICK_DATA_API$1,SELECTOR_DATA_TOGGLE$1,function(event){consttarget=SelectorEngine.getElementFromSelector(this);if(['A','AREA'].includes(this.tagName)){event.preventDefault();}if(isDisabled(this)){return;}EventHandler.one(target,EVENT_HIDDEN$3,()=>{// focus on trigger when it is closed
if(isVisible(this)){this.focus();}});// avoid conflict when clicking a toggler of an offcanvas, while another is open
* A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
* contexts.
*
* Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
*/constSAFE_URL_PATTERN=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;constallowedAttribute=(attribute,allowedAttributeList)=>{constattributeName=attribute.nodeName.toLowerCase();if(allowedAttributeList.includes(attributeName)){if(uriAttributes.has(attributeName)){returnBoolean(SAFE_URL_PATTERN.test(attribute.nodeValue));}returntrue;}// Check if a regular expression validates the attribute.
staticgetDefault(){returnDefault$3;}staticgetDefaultType(){returnDefaultType$3;}staticgetNAME(){returnNAME$4;}// Public
enable(){this._isEnabled=true;}disable(){this._isEnabled=false;}toggleEnabled(){this._isEnabled=!this._isEnabled;}toggle(){if(!this._isEnabled){return;}if(this._isShown()){this._leave();return;}this._enter();}dispose(){clearTimeout(this._timeout);EventHandler.off(this._element.closest(SELECTOR_MODAL),EVENT_MODAL_HIDE,this._hideModalHandler);if(this._element.getAttribute('data-bs-original-title')){this._element.setAttribute('title',this._element.getAttribute('data-bs-original-title'));}this._disposePopper();super.dispose();}show(){if(this._element.style.display==='none'){thrownewError('Please use show on visible elements');}if(!(this._isWithContent()&&this._isEnabled)){return;}constshowEvent=EventHandler.trigger(this._element,this.constructor.eventName(EVENT_SHOW$2));constshadowRoot=findShadowRoot(this._element);constisInTheDom=(shadowRoot||this._element.ownerDocument.documentElement).contains(this._element);if(showEvent.defaultPrevented||!isInTheDom){return;}// TODO: v6 remove this or make it optional
this._disposePopper();consttip=this._getTipElement();this._element.setAttribute('aria-describedby',tip.getAttribute('id'));const{container}=this._config;if(!this._element.ownerDocument.documentElement.contains(this.tip)){container.append(tip);EventHandler.trigger(this._element,this.constructor.eventName(EVENT_INSERTED));}this._popper=this._createPopper(tip);tip.classList.add(CLASS_NAME_SHOW$2);// If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
if('ontouchstart'indocument.documentElement){for(constelementof[].concat(...document.body.children)){EventHandler.on(element,'mouseover',noop);}}constcomplete=()=>{EventHandler.trigger(this._element,this.constructor.eventName(EVENT_SHOWN$2));if(this._isHovered===false){this._leave();}this._isHovered=false;};this._queueCallback(complete,this.tip,this._isAnimated());}hide(){if(!this._isShown()){return;}consthideEvent=EventHandler.trigger(this._element,this.constructor.eventName(EVENT_HIDE$2));if(hideEvent.defaultPrevented){return;}consttip=this._getTipElement();tip.classList.remove(CLASS_NAME_SHOW$2);// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if('ontouchstart'indocument.documentElement){for(constelementof[].concat(...document.body.children)){EventHandler.off(element,'mouseover',noop);}}this._activeTrigger[TRIGGER_CLICK]=false;this._activeTrigger[TRIGGER_FOCUS]=false;this._activeTrigger[TRIGGER_HOVER]=false;this._isHovered=null;// it is a trick to support manual triggering
_isWithContent(){returnBoolean(this._getTitle());}_getTipElement(){if(!this.tip){this.tip=this._createTipElement(this._newContent||this._getContentForTemplate());}returnthis.tip;}_createTipElement(content){consttip=this._getTemplateFactory(content).toHtml();// TODO: remove this check in v6
if(!tip){returnnull;}tip.classList.remove(CLASS_NAME_FADE$2,CLASS_NAME_SHOW$2);// TODO: v6 the following can be achieved with CSS only
tip.classList.add(`bs-${this.constructor.NAME}-auto`);consttipId=getUID(this.constructor.NAME).toString();tip.setAttribute('id',tipId);if(this._isAnimated()){tip.classList.add(CLASS_NAME_FADE$2);}returntip;}setContent(content){this._newContent=content;if(this._isShown()){this._disposePopper();this.show();}}_getTemplateFactory(content){if(this._templateFactory){this._templateFactory.changeContent(content);}else{this._templateFactory=newTemplateFactory({...this._config,// the `content` var has to be after `this._config`
_initializeOnDelegatedTarget(event){returnthis.constructor.getOrCreateInstance(event.delegateTarget,this._getDelegateConfig());}_isAnimated(){returnthis._config.animation||this.tip&&this.tip.classList.contains(CLASS_NAME_FADE$2);}_isShown(){returnthis.tip&&this.tip.classList.contains(CLASS_NAME_SHOW$2);}_createPopper(tip){constplacement=execute(this._config.placement,[this,tip,this._element]);constattachment=AttachmentMap[placement.toUpperCase()];returncreatePopper(this._element,tip,this._getPopperConfig(attachment));}_getOffset(){const{offset}=this._config;if(typeofoffset==='string'){returnoffset.split(',').map(value=>Number.parseInt(value,10));}if(typeofoffset==='function'){returnpopperData=>offset(popperData,this._element);}returnoffset;}_resolvePossibleFunction(arg){returnexecute(arg,[this._element,this._element]);}_getPopperConfig(attachment){constdefaultBsPopperConfig={placement:attachment,modifiers:[{name:'flip',options:{fallbackPlacements:this._config.fallbackPlacements}},{name:'offset',options:{offset:this._getOffset()}},{name:'preventOverflow',options:{boundary:this._config.boundary}},{name:'arrow',options:{element:`.${this.constructor.NAME}-arrow`}},{name:'preSetPlacement',enabled:true,phase:'beforeMain',fn:data=>{// Pre-set Popper's placement attribute in order to read the arrow sizes properly.
// Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement
this._getTipElement().setAttribute('data-popper-placement',data.state.placement);}}]};return{...defaultBsPopperConfig,...execute(this._config.popperConfig,[undefined,defaultBsPopperConfig])};}_setListeners(){consttriggers=this._config.trigger.split(' ');for(consttriggeroftriggers){if(trigger==='click'){EventHandler.on(this._element,this.constructor.eventName(EVENT_CLICK$1),this._config.selector,event=>{constcontext=this._initializeOnDelegatedTarget(event);context._activeTrigger[TRIGGER_CLICK]=!(context._isShown()&&context._activeTrigger[TRIGGER_CLICK]);context.toggle();});}elseif(trigger!==TRIGGER_MANUAL){consteventIn=trigger===TRIGGER_HOVER?this.constructor.eventName(EVENT_MOUSEENTER):this.constructor.eventName(EVENT_FOCUSIN$1);consteventOut=trigger===TRIGGER_HOVER?this.constructor.eventName(EVENT_MOUSELEAVE):this.constructor.eventName(EVENT_FOCUSOUT$1);EventHandler.on(this._element,eventIn,this._config.selector,event=>{constcontext=this._initializeOnDelegatedTarget(event);context._activeTrigger[event.type==='focusin'?TRIGGER_FOCUS:TRIGGER_HOVER]=true;context._enter();});EventHandler.on(this._element,eventOut,this._config.selector,event=>{constcontext=this._initializeOnDelegatedTarget(event);context._activeTrigger[event.type==='focusout'?TRIGGER_FOCUS:TRIGGER_HOVER]=context._element.contains(event.relatedTarget);context._leave();});}}this._hideModalHandler=()=>{if(this._element){this.hide();}};EventHandler.on(this._element.closest(SELECTOR_MODAL),EVENT_MODAL_HIDE,this._hideModalHandler);}_fixTitle(){consttitle=this._element.getAttribute('title');if(!title){return;}if(!this._element.getAttribute('aria-label')&&!this._element.textContent.trim()){this._element.setAttribute('aria-label',title);}this._element.setAttribute('data-bs-original-title',title);// DO NOT USE IT. Is only for backwards compatibility
this._element.removeAttribute('title');}_enter(){if(this._isShown()||this._isHovered){this._isHovered=true;return;}this._isHovered=true;this._setTimeout(()=>{if(this._isHovered){this.show();}},this._config.delay.show);}_leave(){if(this._isWithActiveTrigger()){return;}this._isHovered=false;this._setTimeout(()=>{if(!this._isHovered){this.hide();}},this._config.delay.hide);}_setTimeout(handler,timeout){clearTimeout(this._timeout);this._timeout=setTimeout(handler,timeout);}_isWithActiveTrigger(){returnObject.values(this._activeTrigger).includes(true);}_getConfig(config){constdataAttributes=Manipulator.getDataAttributes(this._element);for(constdataAttributeofObject.keys(dataAttributes)){if(DISALLOWED_ATTRIBUTES.has(dataAttribute)){deletedataAttributes[dataAttribute];}}config={...dataAttributes,...(typeofconfig==='object'&&config?config:{})};config=this._mergeConfigObj(config);config=this._configAfterMerge(config);this._typeCheckConfig(config);returnconfig;}_configAfterMerge(config){config.container=config.container===false?document.body:getElement(config.container);if(typeofconfig.delay==='number'){config.delay={show:config.delay,hide:config.delay};}if(typeofconfig.title==='number'){config.title=config.title.toString();}if(typeofconfig.content==='number'){config.content=config.content.toString();}returnconfig;}_getDelegateConfig(){constconfig={};for(const[key,value]ofObject.entries(this._config)){if(this.constructor.Default[key]!==value){config[key]=value;}}config.selector=false;config.trigger='manual';// In the future can be replaced with:
staticjQueryInterface(config){returnthis.each(function(){constdata=Tooltip.getOrCreateInstance(this,config);if(typeofconfig!=='string'){return;}if(typeofdata[config]==='undefined'){thrownewTypeError(`No method named "${config}"`);}data[config]();});}}/**
staticjQueryInterface(config){returnthis.each(function(){constdata=Popover.getOrCreateInstance(this,config);if(typeofconfig!=='string'){return;}if(typeofdata[config]==='undefined'){thrownewTypeError(`No method named "${config}"`);}data[config]();});}}/**
*/constNAME$2='scrollspy';constDATA_KEY$2='bs.scrollspy';constEVENT_KEY$2=`.${DATA_KEY$2}`;constDATA_API_KEY='.data-api';constEVENT_ACTIVATE=`activate${EVENT_KEY$2}`;constEVENT_CLICK=`click${EVENT_KEY$2}`;constEVENT_LOAD_DATA_API$1=`load${EVENT_KEY$2}${DATA_API_KEY}`;constCLASS_NAME_DROPDOWN_ITEM='dropdown-item';constCLASS_NAME_ACTIVE$1='active';constSELECTOR_DATA_SPY='[data-bs-spy="scroll"]';constSELECTOR_TARGET_LINKS='[href]';constSELECTOR_NAV_LIST_GROUP='.nav, .list-group';constSELECTOR_NAV_LINKS='.nav-link';constSELECTOR_NAV_ITEMS='.nav-item';constSELECTOR_LIST_ITEMS='.list-group-item';constSELECTOR_LINK_ITEMS=`${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`;constSELECTOR_DROPDOWN='.dropdown';constSELECTOR_DROPDOWN_TOGGLE$1='.dropdown-toggle';constDefault$1={offset:null,// TODO: v6 @deprecated, keep it for backwards compatibility reasons
rootMargin:'0px 0px -25%',smoothScroll:false,target:null,threshold:[0.1,0.5,1]};constDefaultType$1={offset:'(number|null)',// TODO v6 @deprecated, keep it for backwards compatibility reasons
*/classScrollSpyextendsBaseComponent{constructor(element,config){super(element,config);// this._element is the observablesContainer and config.target the menu links wrapper
_configAfterMerge(config){// TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
config.target=getElement(config.target)||document.body;// TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
config.rootMargin=config.offset?`${config.offset}px 0px -30%`:config.rootMargin;if(typeofconfig.threshold==='string'){config.threshold=config.threshold.split(',').map(value=>Number.parseFloat(value));}returnconfig;}_maybeEnableSmoothScroll(){if(!this._config.smoothScroll){return;}// unregister any previous listeners
EventHandler.off(this._config.target,EVENT_CLICK);EventHandler.on(this._config.target,EVENT_CLICK,SELECTOR_TARGET_LINKS,event=>{constobservableSection=this._observableSections.get(event.target.hash);if(observableSection){event.preventDefault();constroot=this._rootElement||window;constheight=observableSection.offsetTop-this._element.offsetTop;if(root.scrollTo){root.scrollTo({top:height,behavior:'smooth'});return;}// Chrome 60 doesn't support `scrollTo`
root.scrollTop=height;}});}_getNewObserver(){constoptions={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};returnnewIntersectionObserver(entries=>this._observerCallback(entries),options);}// The logic of selection
_observerCallback(entries){consttargetElement=entry=>this._targetLinks.get(`#${entry.target.id}`);constactivate=entry=>{this._previousScrollData.visibleEntryTop=entry.target.offsetTop;this._process(targetElement(entry));};constparentScrollTop=(this._rootElement||document.documentElement).scrollTop;constuserScrollsDown=parentScrollTop>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=parentScrollTop;for(constentryofentries){if(!entry.isIntersecting){this._activeTarget=null;this._clearActiveClass(targetElement(entry));continue;}constentryIsLowerThanPrevious=entry.target.offsetTop>=this._previousScrollData.visibleEntryTop;// if we are scrolling down, pick the bigger offsetTop
if(userScrollsDown&&entryIsLowerThanPrevious){activate(entry);// if parent isn't scrolled, let's keep the first visible item, breaking the iteration
if(!parentScrollTop){return;}continue;}// if we are scrolling up, pick the smallest offsetTop
if(!userScrollsDown&&!entryIsLowerThanPrevious){activate(entry);}}}_initializeTargetsAndObservables(){this._targetLinks=newMap();this._observableSections=newMap();consttargetLinks=SelectorEngine.find(SELECTOR_TARGET_LINKS,this._config.target);for(constanchoroftargetLinks){// ensure that the anchor has an id and is not disabled
if(!anchor.hash||isDisabled(anchor)){continue;}constobservableSection=SelectorEngine.findOne(decodeURI(anchor.hash),this._element);// ensure that the observableSection exists & is visible
if(target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)){SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1,target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);return;}for(constlistGroupofSelectorEngine.parents(target,SELECTOR_NAV_LIST_GROUP)){// Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
staticjQueryInterface(config){returnthis.each(function(){constdata=ScrollSpy.getOrCreateInstance(this,config);if(typeofconfig!=='string'){return;}if(data[config]===undefined||config.startsWith('_')||config==='constructor'){thrownewTypeError(`No method named "${config}"`);}data[config]();});}}/**
*/constNAME$1='tab';constDATA_KEY$1='bs.tab';constEVENT_KEY$1=`.${DATA_KEY$1}`;constEVENT_HIDE$1=`hide${EVENT_KEY$1}`;constEVENT_HIDDEN$1=`hidden${EVENT_KEY$1}`;constEVENT_SHOW$1=`show${EVENT_KEY$1}`;constEVENT_SHOWN$1=`shown${EVENT_KEY$1}`;constEVENT_CLICK_DATA_API=`click${EVENT_KEY$1}`;constEVENT_KEYDOWN=`keydown${EVENT_KEY$1}`;constEVENT_LOAD_DATA_API=`load${EVENT_KEY$1}`;constARROW_LEFT_KEY='ArrowLeft';constARROW_RIGHT_KEY='ArrowRight';constARROW_UP_KEY='ArrowUp';constARROW_DOWN_KEY='ArrowDown';constHOME_KEY='Home';constEND_KEY='End';constCLASS_NAME_ACTIVE='active';constCLASS_NAME_FADE$1='fade';constCLASS_NAME_SHOW$1='show';constCLASS_DROPDOWN='dropdown';constSELECTOR_DROPDOWN_TOGGLE='.dropdown-toggle';constSELECTOR_DROPDOWN_MENU='.dropdown-menu';constNOT_SELECTOR_DROPDOWN_TOGGLE=`:not(${SELECTOR_DROPDOWN_TOGGLE})`;constSELECTOR_TAB_PANEL='.list-group, .nav, [role="tablist"]';constSELECTOR_OUTER='.nav-item, .list-group-item';constSELECTOR_INNER=`.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;constSELECTOR_DATA_TOGGLE='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';// TODO: could only be `tab` in v6
*/classTabextendsBaseComponent{constructor(element){super(element);this._parent=this._element.closest(SELECTOR_TAB_PANEL);if(!this._parent){return;// TODO: should throw exception in v6
// throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
_activate(element,relatedElem){if(!element){return;}element.classList.add(CLASS_NAME_ACTIVE);this._activate(SelectorEngine.getElementFromSelector(element));// Search and activate/show the proper section
constcomplete=()=>{if(element.getAttribute('role')!=='tab'){element.classList.add(CLASS_NAME_SHOW$1);return;}element.removeAttribute('tabindex');element.setAttribute('aria-selected',true);this._toggleDropDown(element,true);EventHandler.trigger(element,EVENT_SHOWN$1,{relatedTarget:relatedElem});};this._queueCallback(complete,element,element.classList.contains(CLASS_NAME_FADE$1));}_deactivate(element,relatedElem){if(!element){return;}element.classList.remove(CLASS_NAME_ACTIVE);element.blur();this._deactivate(SelectorEngine.getElementFromSelector(element));// Search and deactivate the shown section too
constcomplete=()=>{if(element.getAttribute('role')!=='tab'){element.classList.remove(CLASS_NAME_SHOW$1);return;}element.setAttribute('aria-selected',false);element.setAttribute('tabindex','-1');this._toggleDropDown(element,false);EventHandler.trigger(element,EVENT_HIDDEN$1,{relatedTarget:relatedElem});};this._queueCallback(complete,element,element.classList.contains(CLASS_NAME_FADE$1));}_keydown(event){if(![ARROW_LEFT_KEY,ARROW_RIGHT_KEY,ARROW_UP_KEY,ARROW_DOWN_KEY,HOME_KEY,END_KEY].includes(event.key)){return;}event.stopPropagation();// stopPropagation/preventDefault both added to support up/down keys without scrolling the page
event.preventDefault();constchildren=this._getChildren().filter(element=>!isDisabled(element));letnextActiveElement;if([HOME_KEY,END_KEY].includes(event.key)){nextActiveElement=children[event.key===HOME_KEY?0:children.length-1];}else{constisNext=[ARROW_RIGHT_KEY,ARROW_DOWN_KEY].includes(event.key);nextActiveElement=getNextActiveElement(children,event.target,isNext,true);}if(nextActiveElement){nextActiveElement.focus({preventScroll:true});Tab.getOrCreateInstance(nextActiveElement).show();}}_getChildren(){// collection of inner elements
returnSelectorEngine.find(SELECTOR_INNER_ELEM,this._parent);}_getActiveElem(){returnthis._getChildren().find(child=>this._elemIsActive(child))||null;}_setInitialAttributes(parent,children){this._setAttributeIfNotExists(parent,'role','tablist');for(constchildofchildren){this._setInitialAttributesOnChild(child);}}_setInitialAttributesOnChild(child){child=this._getInnerElement(child);constisActive=this._elemIsActive(child);constouterElem=this._getOuterElement(child);child.setAttribute('aria-selected',isActive);if(outerElem!==child){this._setAttributeIfNotExists(outerElem,'role','presentation');}if(!isActive){child.setAttribute('tabindex','-1');}this._setAttributeIfNotExists(child,'role','tab');// set attributes to the related panel too
this._setInitialAttributesOnTargetPanel(child);}_setInitialAttributesOnTargetPanel(child){consttarget=SelectorEngine.getElementFromSelector(child);if(!target){return;}this._setAttributeIfNotExists(target,'role','tabpanel');if(child.id){this._setAttributeIfNotExists(target,'aria-labelledby',`${child.id}`);}}_toggleDropDown(element,open){constouterElem=this._getOuterElement(element);if(!outerElem.classList.contains(CLASS_DROPDOWN)){return;}consttoggle=(selector,className)=>{constelement=SelectorEngine.findOne(selector,outerElem);if(element){element.classList.toggle(className,open);}};toggle(SELECTOR_DROPDOWN_TOGGLE,CLASS_NAME_ACTIVE);toggle(SELECTOR_DROPDOWN_MENU,CLASS_NAME_SHOW$1);outerElem.setAttribute('aria-expanded',open);}_setAttributeIfNotExists(element,attribute,value){if(!element.hasAttribute(attribute)){element.setAttribute(attribute,value);}}_elemIsActive(elem){returnelem.classList.contains(CLASS_NAME_ACTIVE);}// Try to get the inner element (usually the .nav-link)
_getInnerElement(elem){returnelem.matches(SELECTOR_INNER_ELEM)?elem:SelectorEngine.findOne(SELECTOR_INNER_ELEM,elem);}// Try to get the outer element (usually the .nav-item)
staticjQueryInterface(config){returnthis.each(function(){constdata=Tab.getOrCreateInstance(this);if(typeofconfig!=='string'){return;}if(data[config]===undefined||config.startsWith('_')||config==='constructor'){thrownewTypeError(`No method named "${config}"`);}data[config]();});}}/**
*/constNAME='toast';constDATA_KEY='bs.toast';constEVENT_KEY=`.${DATA_KEY}`;constEVENT_MOUSEOVER=`mouseover${EVENT_KEY}`;constEVENT_MOUSEOUT=`mouseout${EVENT_KEY}`;constEVENT_FOCUSIN=`focusin${EVENT_KEY}`;constEVENT_FOCUSOUT=`focusout${EVENT_KEY}`;constEVENT_HIDE=`hide${EVENT_KEY}`;constEVENT_HIDDEN=`hidden${EVENT_KEY}`;constEVENT_SHOW=`show${EVENT_KEY}`;constEVENT_SHOWN=`shown${EVENT_KEY}`;constCLASS_NAME_FADE='fade';constCLASS_NAME_HIDE='hide';// @deprecated - kept here only for backwards compatibility
staticjQueryInterface(config){returnthis.each(function(){constdata=Toast.getOrCreateInstance(this,config);if(typeofconfig==='string'){if(typeofdata[config]==='undefined'){thrownewTypeError(`No method named "${config}"`);}data[config](this);}});}}/**
* Data API implementation
*/enableDismissTrigger(Toast);/**
* jQuery
*/defineJQueryPlugin(Toast);
constProductManager=(el=null,options={})=>{// === DOM & VARS =======
constmodule=el||document.querySelector('.product-manager')||console.warn('Product Manager Element not found');if(!module)return;constDOM={module,table:module.querySelector('.table-products'),tbody:module.querySelector('tbody'),inputName:module.querySelector('.input-product-name'),inputPrice:module.querySelector('.input-product-price'),btnAdd:module.querySelector('.button-product-add'),templateRow:module.querySelector('.template-row')};constSERVER_BASE_URL='http://127.0.0.1:8000';// console.log(DOM);
consttrEl=DOM.templateRow.content.firstElementChild.cloneNode(true);consttdNameEl=trEl.querySelector('.td-name');consttdPriceEl=trEl.querySelector('.td-price');constbtnDragEl=trEl.querySelector('.button-product-drag');constbtnRemoveEl=trEl.querySelector('.button-product-remove');constbtnMoveUpEl=trEl.querySelector('.button-product-move-up');constbtnMoveDownEl=trEl.querySelector('.button-product-move-down');// Drag 'n Drop hinzufügen.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.