PageSourceSearch

https://cclocalnews.org/_static/??-eJy9kcFOwzAMhl8It4CEOg6IZ3ESr/W…TPTbgEVnIipVSzwtlo+08fLcHgfDq/D8HwBTXpRlg==

js cclocalnews.org collected 2026-10-02 22:14:19 UTC 300,918 bytes, 6,500 lines download raw bytes

vendor: 4,549 bytes, lines 1-9
1/*!
2 * jQuery UI Resizable 1.14.2
3 * https://jqueryui.com
4 *
5 * Copyright OpenJS Foundation and other contributors
6 * Released under the MIT license.
7 * https://jquery.org/license
8 */
9!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../disable-selection","../plugin","../version","../widget"],t):t(jQuery)}(function(z){"use strict";return z.widget("ui.resizable",z.ui.mouse,{version:"1.14.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){var i=!1,s=z(t).css("overflow");if("hidden"===s)return!1;if("scroll"===s)return!0;if(0<t[s=e&&"left"===e?"scrollLeft":"scrollTop"])return!0;try{t[s]=1,i=0<t[s],t[s]=0}catch(t){}return i},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),z.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(z("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this._proportionallyResize()),this._setupHandles(),e.autoHide&&z(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){z(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,h,n=this.options,o=this;if(this.handles=n.handles||(z(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=z(),this._addedHandles=z(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),h=z("<div>"),this._addClass(h,"ui-resizable-handle "+s),h.css({zIndex:n.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(h),this._addedHandles=this._addedHandles.add(h));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=z(this.handles[e]),this._on(this.handles[e],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=z(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?s.outerHeight():s.outerWidth(),i=["padding",/ne|nw|n
vendor: 4,452 bytes, line 9
9/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){o.resizing||(this.className&&(h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=h&&h[1]?h[1]:"se")}),n.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=z(this.handles[e])[0])!==t.target&&!z.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s,h=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),h.containment&&(e+=z(h.containment).scrollLeft()||0,i+=z(h.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this._helper||(s=this._calculateAdjustedElementDimensions(n)),this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width,height:s.height},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:s.width,height:s.height},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof h.aspectRatio?h.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=z(".ui-resizable-"+this.axis).css("cursor"),z("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(i=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),z.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,h=this.options,n=this;return this._helper&&(i=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:n.sizeDiff.height,e=e?0:n.sizeDiff.width,e={width:n.helper.width()-e,height:n.helper.height()-i},i=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,s=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null,h.animate||this.element.css(z.extend(e,{top:s,left:i})),n.helper.height(n.size.height),n.helper.width(n.size.width),this._helper)&&!h.animate&&this._proportionallyResize(),z("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.helper.css(t),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px",this.helper.width(t.width)),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px",this.helper.height(t.height)),t},_updateVirtualBoundaries:function(t){var e,i,s,h=this.options,h={minWidth:this._isNumber(h.minWidth)?h.minWidth:0,maxWidth:this._isNumber(h.maxWidth)?h.maxWidth:1/0,minHeight:this._isNumber(h.minHeight)?h.minHeight:0,maxHeight:this._isNumber(h.maxHeight)?h.maxHeight:1/0};(this._aspectRatio||t)&&(t=h.minHeight*this.aspectRatio,i=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,s=h.maxWidth/this.aspectRatio,h.minWidth<t&&(h.minWidth=t),h.minHeight<i&&(h.minHeight=i),e<h.maxWidth&&(h.maxWidth=e),s<h.maxHeight)&&(h.maxHeight=s),this._vBoundaries=h},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left
vendor: 5,172 bytes, line 9
9=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,h=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,n=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,o=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,r=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return n&&(t.width=e.minWidth),o&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),h&&(t.height=e.maxHeight),n&&r&&(t.left=a-e.minWidth),s&&r&&(t.left=a-e.maxWidth),o&&i&&(t.top=l-e.minHeight),h&&i&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],h=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(h[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_calculateAdjustedElementDimensions:function(t){var e,i,s=t.get(0);return"content-box"!==t.css("box-sizing")||!this._hasScroll(s)&&!this._hasScroll(s,"left")?{height:parseFloat(t.css("height")),width:parseFloat(t.css("width"))}:(e=parseFloat(s.style.width),s=parseFloat(s.style.height),i=this._getPaddingPlusBorderDimensions(t),e=isNaN(e)?this._getElementTheoreticalSize(t,i,"width"):e,{height:isNaN(s)?this._getElementTheoreticalSize(t,i,"height"):s,width:e})},_getElementTheoreticalSize:function(t,e,i){return Math.max(0,Math.ceil(t.get(0)["offset"+i[0].toUpperCase()+i.slice(1)]-e[i]-.5))||0},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||z("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return z.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return z.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return z.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return z.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){z.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),z.ui.plugin.add("resizable","animate",{stop:function(e){var i=z(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,h=s.length&&/textarea/i.test(s[0].nodeName),n=h&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=h?0:i.sizeDiff.width,h={width:i.size.width-h,height:i.size.height-n},n=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(z.extend(h,o&&n?{top:o,left:n}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&z(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),z.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,h=z(this).resizable("instance"),n=h.options,o=h.element,n=n.
vendor: 13,034 bytes, lines 9-27
9containment,o=n instanceof z?n.get(0):/parent/.test(n)?o.parent().get(0):n;o&&(h.containerElement=z(o),/document/.test(n)||n===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:z(document),left:0,top:0,width:z(document).width(),height:z(document).height()||document.body.parentNode.scrollHeight}):(i=z(o),s=[],z(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=h._num(i.css("padding"+e))}),h.containerOffset=i.offset(),h.containerPosition=i.position(),h.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=h.containerOffset,e=h.containerSize.height,t=h.containerSize.width,t=h._hasScroll(o,"left")?o.scrollWidth:t,e=h._hasScroll(o)?o.scrollHeight:e,h.parentData={element:o,left:n.left,top:n.top,width:t,height:e}))},resize:function(t){var e=z(this).resizable("instance"),i=e.options,s=e.containerOffset,h=e.position,t=e._aspectRatio||t.shiftKey,n={top:0,left:0},o=e.containerElement,a=!0;o[0]!==document&&/static/.test(o.css("position"))&&(n=s),h.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-n.left),t&&(e.size.height=e.size.width/e.aspectRatio,a=!1),e.position.left=i.helper?s.left:0),h.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),t&&(e.size.width=e.size.height*e.aspectRatio,a=!1),e.position.top=e._helper?s.top:0),o=e.containerElement.get(0)===e.element.parent().get(0),i=/relative|absolute/.test(e.containerElement.css("position")),o&&i?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),h=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-n.left:e.offset.left-s.left)),o=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-n.top:e.offset.top-s.top)),h+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-h,t)&&(e.size.height=e.size.width/e.aspectRatio,a=!1),o+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-o,t)&&(e.size.width=e.size.height*e.aspectRatio,a=!1),a||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=z(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,h=t.containerElement,n=z(t.helper),o=n.offset(),a=n.outerWidth()-t.sizeDiff.width,n=n.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(h.css("position"))&&z(this).css({left:o.left-s.left-i.left,width:a,height:n}),t._helper&&!e.animate&&/static/.test(h.css("position"))&&z(this).css({left:o.left-s.left-i.left,width:a,height:n})}}),z.ui.plugin.add("resizable","alsoResize",{start:function(){var i=z(this).resizable("instance"),t=i.options;z(t.alsoResize).each(function(){var t=z(this),e=i._calculateAdjustedElementDimensions(t);t.data("ui-resizable-alsoresize",{width:e.width,height:e.height,left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=z(this).resizable("instance"),s=e.options,h=e.originalSize,n=e.originalPosition,o={height:e.size.height-h.height||0,width:e.size.width-h.width||0,top:e.position.top-n.top||0,left:e.position.left-n.left||0};z(s.alsoResize).each(function(){var t=z(this),s=z(this).data("ui-resizable-alsoresize"),h={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];z.each(e,function(t,e){var i=(s[e]||0)+(o[e]||0);i&&0<=i&&(h[e]=i||null)}),t.css(h)})},stop:function(){z(this).removeData("ui-resizable-alsoresize")}}),z.ui.plugin.add("resizable","ghost",{start:function(){var t=z(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!0===z.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=z(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=z(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),z.ui.plugin.add("resizable","grid",{resize:function(){var t,e=z(this).resizable("instance"),i=e.options,s=e.size,h=e.originalSize,n=e.originalPosition,o=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,r=a[1]||1,p=Math.round((s.width-h.width)/l)*l,s=Math.round((s.height-h.height)/r)*r,d=h.width+p,g=h.height+s,u=i.maxWidth&&i.maxWidth<d,c=i.maxHeight&&i.maxHeight<g,f=i.minWidth&&i.minWidth>d,m=i.minHeight&&i.minHeight>g;i.grid=a,f&&(d+=l),m&&(g+=r),u&&(d-=l),c&&(g-=r),/^(se|s|e)$/.test(o)?(e.size.width=d,e.size.height=g):/^(ne)$/.test(o)?(e.size.width=d,e.size.height=g,e.position.top=n.top-s):/^(sw)$/.test(o)?(e.size.width=d,e.size.height=g,e.position.left=n.left-p):((g-r<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<g-r?(e.size.height=g,e.position.top=n.top-s):(g=r-t.height,e.size.height=g,e.position.top=n.top+h.height-g),0<d-l?(e.size.width=d,e.position.left=n.left-p):(d=l-t.width,e.size.width=d,e.position.left=n.left+h.width-d))}}),z.ui.resizable});;
10/*!
11 * jQuery UI Controlgroup 1.14.2
12 * https://jqueryui.com
13 *
14 * Copyright OpenJS Foundation and other contributors
15 * Released under the MIT license.
16 * https://jquery.org/license
17 */
18!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","../widget"],t):t(jQuery)}(function(r){"use strict";var s=/ui-corner-([a-z]){2,6}/g;return r.widget("ui.controlgroup",{version:"1.14.2",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var s=this,l=[];r.each(this.options.items,function(n,t){var e,o={};t&&("controlgroupLabel"===n?((e=s.element.find(t)).each(function(){var t=r(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),s._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),l=l.concat(e.get())):r.fn[n]&&(o=s["_"+n+"Options"]?s["_"+n+"Options"]("middle"):{classes:{}},s.element.find(t).each(function(){var t=r(this),e=t[n]("instance"),i=r.widget.extend({},o);"button"===n&&t.parent(".ui-spinner").length||((e=e||t[n]()[n]("instance"))&&(i.classes=s._resolveClassesValues(i.classes,e)),t[n](i),i=t[n]("widget"),r.data(i[0],"ui-controlgroup-data",e||t[n]("instance")),l.push(i[0]))})))}),this.childWidgets=r(r.uniqueSort(l)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=r(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,n){var o={};return r.each(i,function(t){var e=n.options.classes[t]||"",e=String.prototype.trim.call(e.replace(s,""));o[t]=(e+" "+i[t]).replace(/\s+/g," ")}),o},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?this._callChildMethod(e?"disable":"enable"):this.refresh()},refresh:function(){var o,s=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),o=this.childWidgets,(o=this.options.onlyVisible?o.filter(":visible"):o).length&&(r.each(["first","last"],function(t,e){var i,n=o[e]().data("ui-controlgroup-data");n&&s["_"+n.widgetName+"Options"]?((i=s["_"+n.widgetName+"Options"](1===o.length?"only":e)).classes=s._resolveClassesValues(i.classes,n),n.element[n.widgetName](i)):s._updateCornerClass(o[e](),e)}),this._callChildMethod("refresh"))}})});;
19/*!
20 * jQuery UI Checkboxradio 1.14.2
21 * https://jqueryui.com
22 *
23 * Copyright OpenJS Foundation and other contributors
24 * Released under the MIT license.
25 * https://jquery.org/license
26 */
27!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../form-reset-mixin","../labels","../widget"],e):e(jQuery)}(function(t){"use strict";return t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.14.2",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i=this._super()||{};return this._readType(),e=this.element.labels(),this.label=t(e[e.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",(e=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=e.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(i.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(i.disabled=e),i},_create:function(){var e=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),e&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e=this.element[0].name,i="input[name='"+CSS.escape(e)+"']";return e?(this.form.length?t(this.form[0].elements).filter(i):t(i).filter(function(){return 0===t(t(this).prop("form")).length})).not(this.element):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(e,i){"label"===e&&!i||(this._super(e,i),"disabled"===e?(this._toggleClass(this.label,null,"ui-state-disabled",i),this.element[0].disabled=i):this.refresh())},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>
vendor: 3,282 bytes, lines 27-36
27"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var e=this.label.contents().not(this.element[0]);this.icon&&(e=e.not(this.icon[0])),(e=this.iconSpace?e.not(this.iconSpace[0]):e).remove(),this.label.append(this.options.label)},refresh:function(){var e=this.element[0].checked,i=this.element[0].disabled;this._updateIcon(e),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),null!==this.options.label&&this._updateLabel(),i!==this.options.disabled&&this._setOptions({disabled:i})}}]),t.ui.checkboxradio});;
28/*!
29 * jQuery UI Button 1.14.2
30 * https://jqueryui.com
31 *
32 * Copyright OpenJS Foundation and other contributors
33 * Released under the MIT license.
34 * https://jquery.org/license
35 */
36!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./controlgroup","./checkboxradio","../keycode","../widget"],t):t(jQuery)}(function(e){"use strict";var h;return e.widget("ui.button",{version:"1.14.2",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,i=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(i.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(i.label=this.originalLabel),i},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===e.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,i){var t="iconPosition"!==t,o=t?this.options.iconPosition:i,s="top"===o||"bottom"===o;this.icon?t&&this._removeClass(this.icon,null,this.options.icon):(this.icon=e("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),t&&this._addClass(this.icon,null,i),this._attachIcon(o),s?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
vendor: 17,078 bytes, lines 36-45
36pace||(this.iconSpace=e("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(o))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var i=(void 0===t.showLabel?this.options:t).showLabel,o=(void 0===t.icon?this.options:t).icon;i||o||(t.showLabel=!0),this._super(t)},_setOption:function(t,i){"icon"===t&&(i?this._updateIcon(t,i):this.icon&&(this.icon.remove(),this.iconSpace)&&this.iconSpace.remove()),"iconPosition"===t&&this._updateIcon(t,i),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!i),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(i):(this.element.html(i),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,i),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",i),this.element[0].disabled=i)&&this.element.trigger("blur")},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!0===e.uiBackCompat&&(e.widget("ui.button",e.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,i){"text"===t?this._super("showLabel",i):("showLabel"===t&&(this.options.text=i),"icon"===t&&(this.options.icons.primary=i),"icons"===t&&(i.primary?(this._super("icon",i.primary),this._super("iconPosition","beginning")):i.secondary&&(this._super("icon",i.secondary),this._super("iconPosition","end"))),this._superApply(arguments))}}),e.fn.button=(h=e.fn.button,function(o){var t="string"==typeof o,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==o?this.each(function(){var t,i=e(this).attr("type"),i=e.data(this,"ui-"+("checkbox"!==i&&"radio"!==i?"button":"checkboxradio"));return"instance"===o?(n=i,!1):i?"function"!=typeof i[o]||"_"===o.charAt(0)?e.error("no such method '"+o+"' for button widget instance"):(t=i[o].apply(i,s))!==i&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:e.error("cannot call methods on button prior to initialization; attempted to call method '"+o+"'")}):n=void 0:(s.length&&(o=e.widget.extend.apply(null,[o].concat(s))),this.each(function(){var t=e(this).attr("type"),t="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",i=e.data(this,"ui-"+t);i?(i.option(o||{}),i._init&&i._init()):"button"==t?h.call(e(this),o):e(this).checkboxradio(e.extend({icon:!1},o))})),n}),e.fn.buttonset=function(){return e.ui.controlgroup||e.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),e.ui.button});;
37/*!
38 * jQuery UI Dialog 1.14.2
39 * https://jqueryui.com
40 *
41 * Copyright OpenJS Foundation and other contributors
42 * Released under the MIT license.
43 * https://jquery.org/license
44 */
45!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery","./button","./draggable","./mouse","./resizable","../focusable","../keycode","../position","../tabbable","../unique-id","../version","../widget"],i):i(jQuery)}(function(l){"use strict";return l.widget("ui.dialog",{version:"1.14.2",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(i){var t=l(this).css(i).offset().top;t<0&&l(this).css("top",i.top-t)}},resizable:!0,show:null,title:null,uiDialogTitleHeadingLevel:0,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&l.fn.draggable&&this._makeDraggable(),this.options.resizable&&l.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var i=this.options.appendTo;return i&&(i.jquery||i.nodeType)?l(i):this.document.find(i||"body").eq(0)},_destroy:function(){var i,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(i=t.parent.children().eq(t.index)).length&&i[0]!==this.element[0]?i.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:l.noop,enable:l.noop,close:function(i){var t=this;this._isOpen&&!1!==this._trigger("beforeClose",i)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||l(this.document[0].activeElement).trigger("blur"),this._hide(this.uiDialog,this.options.hide,function(){t._trigger("close",i)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(i,t){var e=!1,o=this.uiDialog.siblings(".ui-front:visible").map(function(){return+l(this).css("z-index")}).get(),o=Math.max.apply(null,o);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),e=!0),e&&!t&&this._trigger("focus",i),e},open:function(){var i=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=l(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){i._focusTabbable(),i._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var i=this._focusedElement;(i=(i=(i=(i=(i=i||this.element.find("[autofocus]")).length?i:this.element.find(":tabbable")).length?i:this.uiDialogButtonPane.find(":tabbable")).length?i:this.uiDialogTitlebarClose.filter(":tabbable")).length?i:this.uiDialog).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var i=this.document[0].activeElement;this.uiDialog[0]===i||l.contains(this.uiDialog[0],i)||this._focusTabbable()},_keepFocus:function(i){i.preventDefault(),this._restoreTabbableFocus()},_createWrapper:function(){this.uiDialog=l("<div>").hide().attr({tabIndex:-1,role:"dialog","aria-modal":this.options.modal?"true":null}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(i){var t,e,o;this.options.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===l.ui.keyCode.ESCAPE?(i.preventDefault(),this.close(i)):i.keyCode!==l.ui.keyCode.TAB||i.isDefaultPrevented()||(t=this.uiDialog.find(":tabbable"),e=t.first(),o=t.last(),i.target!==o[0]&&i.target!==this.uiDialog[0]||i.shiftKey?i.target!==e[0]&&i.target!==this.uiDialog[0]||!i.shiftKey||(this._delay(function(){o.trigger("focus")}),i.preventDefault()):(this._delay(function(){e.trigger("focus")}),i.preventDefault()))},mousedown:function(i){this._moveToTop(i)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){this.uiDialogTitlebar=l("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(i){l(i.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=l("<button type='button'></button>").button({label:l("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(i){i.preventDefault(),this.close(i)}});var i=Number.isInteger(this.options.uiDialogTitleHeadingLevel)&&0<this.options.uiDialogTitleHeadingLevel&&this.options.uiDialogTitleHeadingLevel<=6?"h"+this.options.uiDialogTitleHeadingLevel:"span",i=l("<"+i+">").uniqueId().prependTo(this.uiDialogTitlebar);this._addClass(i,"ui-dialog-title"),this._title(i),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":i.attr("id")})},_title:function(i){this.options.title?i.text(this.options.title):i.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=l("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=l("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var o=this,i=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),l.isEmptyObject(i)||Array.isArray(i)&&!i.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(l.each(i,function(i,t){var e;t=l.extend({type:"button"},t="function"==typeof t?{click:t,text:i}:t),e=t.click,i={icon:t.icon,iconPosition:t.iconPosition,showLabel:t.showLabel,icons:t.icons,text:t.text},delete t.click,delete t.icon,delete t.iconPosition,delete t.showLabel,delete t.icons,"boolean"==typeof t.text&&delete t.text,l("<button></button>",t).button(i).appendTo(o.uiButtonSet).on("click",function(){e.apply(o.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var s=this,n=this.options;function a(i){return{position:i.position,offset:i.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,t){s._addClass(l(this),"ui-dialog-dragging"),s._blockFrames(),s._trigger("dragStart",i,a(t))},drag:function(i,t){s._trigger("drag",i,a(t))},stop:function(i,t){var e=t.offset.left-s.document.scrollLeft(),o=t.offset.top-s.document.scrollTop();n.position={my:"left top",at:"left"+(0<=e?"+":"")+e+" top"+(0<=o?"+":"")+o,of:s.window},s._removeClass(l(this),"ui-dialog-dragging"),s._unblockFrames(),s._trigger("dragStop",i,a(t))}})},_makeResizable:function(){var s=this,n=this.options,i=n.resizable,t=this.uiDialog.css("position"),i="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";function a(i){return{originalPosition:i.originalPosition,originalSize:i.originalSize,position:i.position,size:i.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:i,start:function(i,t){s._addClass(l(this),"ui-dialog-resizing"),s._blockFrames(),s._trigger("resizeStart",i,a(t))},resize:function(i,t){s._trigger("resize",i,a(t))},stop:function(i,t){var e=s.uiDialog.offset(),o=e.left-s.document.scrollLeft(),e=e.top-s.document.scrollTop();n.height=s.uiDialog.height(),n.width=s.uiDialog.width(),n.position={my:"left top",at:"left"+(0<=o?"+":"")+o+" top"+(0<=e?"+":"")+e,of:s.window},s._removeClass(l(this),"ui-dialog-resizing"),s._unblockFrames(),s._trigger("resizeStop",i,a(t))}}).css("position",t)},_trackFocus:function(){this._on(this.widget(),{focusin:function(i){this._makeFocusTarget(),this._focusedElement=l(i.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var i=this._trackingInstances(),t=l.inArray(this,i);-1!==t&&i.splice(t,1)},_trackingInstances:function(){var i=this.document.data("ui-dialog-instances");return i||this.document.data("ui-dialog-instances",i=[]),i},_minHeight:function(){var i=this.options;return"auto"===i.height?i.minHeight:Math.min(i.minHeight,i.height)},_position:function(){var i=this.uiDialog.is(":visible");i||this.uiDialog.show(),this.uiDialog.position(this.options.position),i||this.uiDialog.hide()},_setOptions:function(i){var e=this,o=!1,s={};l.each(i,function(i,t){e._setOption(i,t),i in e.sizeRelatedOptions&&(o=!0),i in e.resizableRelatedOptions&&(s[i]=t)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(i,t){var e,o=this.uiDialog;"disabled"!==i&&(this._super(i,t),"appendTo"===i&&this.uiDialog.appendTo(this._appendTo()),"buttons"===i&&this._createButtons(),"closeText"===i&&this.uiDialogTitlebarClose.button({label:l("<a>").text(""+this.options.closeText).html()}),"draggable"===i&&((e=o.is(":data(ui-draggable)"))&&!t&&o.draggable("destroy"),!e)&&t&&this._makeDraggable(),"position"===i&&this._position(),"resizable"===i&&((e=o.is(":data(ui-resizable)"))&&!t&&o.resizable("destroy"),e&&"string"==typeof t&&o.resizable("option","handles",t),e||!1===t||this._makeResizable()),"title"===i&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")),"modal"===i)&&o.attr("aria-modal",t?"true":null)},_size:function(){var i,t,e,o=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),o.minWidth>o.width&&(o.width=o.minWidth),i=this.uiDialog.css({height:"auto",width:o.width}).outerHeight(),t=Math.max(0,o.minHeight-i),e="number"==typeof o.maxHeight?Math.max(0,o.maxHeight-i):"none","auto"===o.height?this.element.css({minHeight:t,maxHeight:e,height:"auto"}):this.element.height(Math.max(0,o.height-i)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var i=l(this);return l("<div>").css({position:"absolute",width:i.outerWidth(),height:i.outerHeight()}).appendTo(i.parent()).offset(i.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(i){return!!l(i.target).closest(".ui-dialog").length||!!l(i.target).closest(".ui-datepicker").length},_createOverlay:function(){var e;this.options.modal&&(e=!0,this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(i){var t;e||(t=this._trackingInstances()[0])._allowInteraction(i)||(i.preventDefault(),t._focusTabbable())}.bind(this)),this.overlay=l("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var i;this.options.modal&&this.overlay&&((i=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",i):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!0===l.uiBackCompat&&l.widget("ui.dialog",l.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(i,t){"dialogClass"===i&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}}),l.ui.dialog});;
vendor: 14,676 bytes, lines 46-49
46/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
47 * https://jqueryvalidation.org/
48 * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
49!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.n
49ame],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
vendor: 8,422 bytes, line 49
49return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});;
vendor: 3,099 bytes, lines 50-53
50/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
51 * https://jqueryvalidation.org/
52 * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
53!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e<d;e+=3)b+=3*parseInt(c[e],10)+7*parseInt(c[e+1],10)+parseInt(c[e+2],10);return 0!==b&&b%10===0},"Please enter a valid routing number."),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e<c.files.length;e++)if(f=c.files[e],!f.type.match(g))return!1;return!0},a.validator.format("Please enter a value with a valid mimetype.")),a.validator.addMethod("alphanumeric",function(a,b){return this.optional(b)||/^\w+$/i.test(a)},"Letters, numbers, and underscores only please."),a.validator.addMethod("bankaccountNL",function(a,b){if(this.optional(b))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(a))return!1;var c,d,e,f=a.replace(/ /g,""),g=0,h=f.length;for(c=0;c<h;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number."),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number."),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a.toUpperCase())},"Please specify a valid BIC code."),a.validator.addMethod("cifES",function(a,b){"use strict";function c(a){return a%2===0}if(this.optional(b))return!0;var d,e,f,g,h=new RegExp(/^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi),i=a.substring(0,1),j=a.substring(1,8),k=a.substring(8,9),l=0,m=0,n=0;if(9!==a.length||!h.test(a))return!1;for(d=0;d<j.length;d++)e=parseInt(j[d],10),c(d)?(e*=2,n+=e<10?e:e-9):m+=e;return l=m+n,f=(10-l.toString().substr(-1)).toString(),f=parseInt(f,10)>9?"0":f,g="JABCDEFGHI".substr(f,1
vendor: 18,499 bytes, line 53
53).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length<q)return!1;if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j<d.length;j++)e=d.charAt(j),"0"!==e&&(n=!1),n||(m+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(e));for(k=0;k<m.length;k++)f=m.charAt(k),p=""+o+f,o=p%97;return 1===o},"Please specify a valid IBAN."),a.validator.addMethod("integer",function(a,b){return this.optional(b)||/^-?\d+$/.test(a)},"A positive or negative non-decimal number please."),a.validator.addMethod("ipv4",function(a,b){return this.optional(b)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(a)},"Please enter a valid IP v4 address."),a.validator.addMethod("ipv6",function(a,b){return this.optional(b)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(a)},"Please enter a valid IP v6 address."),a.validator.addMethod("lessThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-lessThan-blur").length&&e.addClass("validate-lessThan-blur").on("blur.validate-lessThan",function(){a(c).valid()}),b<e.val()},"Please enter a lesser value."),a.validator.addMethod("lessThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-lessThanEqual-blur").length&&e.addClass("validate-lessThanEqual-blur").on("blur.validate-lessThanEqual",function(){a(c).valid()}),b<=e.val()},"Please enter a lesser value."),a.validator.addMethod("lettersonly",function(a,b){return this.optional(b)||/^[a-z]+$/i.test(a)},"Letters only please."),a.validator.addMethod("letterswithbasicpunc",function(a,b){return this.optional(b)||/^[a-z\-.,()'"\s]+$/i.test(a)},"Letters or punctuation only please."),a.validator.addMethod("maxfiles",function(b,c,d){return!!this.optional(c)||!("file"===a(c).attr("type")&&c.files&&c.files.length>d)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;e<c.files.length;e++)if(c.files[e].size>d)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;f<c.files.length;f++)if(e+=c.files[f].size,e>d)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++)
53{if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c<h.length;c++)if(d.toUpperCase()===h[c]){d=i[c],d*=e,isNaN(g)&&8===c&&(g=h[c]);break}}else d*=e;k+=d}return f=k%11,10===f&&(f="X"),f===g},"The specified vehicle identification number (VIN) is invalid."),a.validator.addMethod("zipcodeUS",function(a,b){return this.optional(b)||/^\d{5}(-\d{4})?$/.test(a)},"The specified US ZIP Code is invalid."),a.validator.addMethod("ziprange",function(a,b){return this.optional(b)||/^90[2-5]\d\{2\}-\d{4}$/.test(a)},"Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx."),a});;
54(function ($) {
55  "use strict";
56
57  var clientID = 0;
58  var destination;
59  var dialogType;
60  var $infoDialog;
61  var ajaxurl = oaInfo.ajax_url;
62  var initialLoad = true;
63  var loginType;
64  var sumbitListner = false;
65
66  /*!
67   * jquery fontsize 插件
68   * author: xiaolong
69   * 20170530
70   */
71
72  $.fn.submitCaptcha = function (param) {
73    // DEFAULT VARIABLES
74    var params = $.extend(
75      {
76        idCaptchaText: "fhws-subscribe-captchaText", // The ID for the captcha text. Default is 'captchaText'.
77        idCaptchaInput: "fhws-subscribe-captchaInput", // The ID for the captcha input. Default is 'captchaInput'.
78        class: "", // Class name for the submit button toggle. Default is ''.
79      },
80      param,
81    );
82
83    // Find and disable the submit button
84    var submit = $("#fhws-subscribe-widget-submit");
85    submit.attr("disabled", "disabled");
86    var showCaptcha = $("#fhws-subscribe-captcha");
87
88    showCaptcha.html("");
89    // Insert captcha text and input before the submit button with the given ID's
90    showCaptcha.html(
91      '<label class="me-2" id="' +
92        params.idCaptchaText +
93        '"></label>' +
94        '<input id="' +
95        params.idCaptchaInput +
96        '" aria-label="Captcha Input" type="text"  class="form-control" style="width:50px;display:inline-block";  required>',
97    );
98
99    // Select text and input elements to fill
100    var label = this.find("#" + params.idCaptchaText);
101    var input = this.find("#" + params.idCaptchaInput);
102
103    // Generate random numbers and the sum of them
104    var rndmNr1 = Math.floor(Math.random() * 10),
105      rndmNr2 = Math.floor(Math.random() * 10),
106      totalNr = rndmNr1 + rndmNr2;
107
108    // Print the numbers to screen
109    $(label).text(rndmNr1 + " + " + rndmNr2 + " =");
110
111    // Check the input value, enable it if the sum is correct
112    $(input).keyup(function () {
113      if ($(this).val() == totalNr)
114        submit.removeAttr("disabled").addClass(params.class);
115      else submit.attr("disabled", "disabled").removeClass(params.class);
116    });
117
118    // Don't breake jQuery chain!
119    return this;
120  };
121
122  $.fn.fhwsCaptcha = function (param) {
123    // DEFAULT VARIABLES
124    var params = $.extend(
125      {
126        idCaptchaText: "fhws-captchaText", // The ID for the captcha text. Default is 'captchaText'.
127        idCaptchaInput: "fhws-captchaInput", // The ID for the captcha input. Default is 'captchaInput'.
128        class: "", // Class name for the submit button toggle. Default is ''.
129      },
130      param,
131    );
132
133    // Find and disable the submit button
134    var submit = $("#fhws-share-subscribe-submit");
135    submit.attr("disabled", "disabled");
136    var showCaptcha = $("#fhws-captcha");
137
138    showCaptcha.html("");
139    // Insert captcha text and input before the submit button with the given ID's
140    showCaptcha.html(
141      '<p class="">Please answer the following:</p>' +
142        '<label class="me-2" id="' +
143        params.idCaptchaText +
144        '"></label>' +
145        '<input id="' +
146        params.idCaptchaInput +
147        '" aria-label="Captcha Input" type="text"  class="form-control" style="width:50px;display:inline-block";  required>',
148    );
149
150    // Select text and input elements to fill
151    var label = this.find("#" + params.idCaptchaText);
152    var input = this.find("#" + params.idCaptchaInput);
153
154    // Generate random numbers and the sum of them
155    var rndmNr1 = Math.floor(Math.random() * 10),
156      rndmNr2 = Math.floor(Math.random() * 10),
157      totalNr = rndmNr1 + rndmNr2;
158
159    // Print the numbers to screen
160    $(label).text(rndmNr1 + " + " + rndmNr2 + " =");
161
162    // Check the input value, enable it if the sum is correct
163    $(input).keyup(function () {
164      if ($(this).val() == totalNr)
165        submit.removeAttr("disabled").addClass(params.class);
166      else submit.attr("disabled", "disabled").removeClass(params.class);
167    });
168
169    // Don't breake jQuery chain!
170    return this;
171  };
172
173  $(document).ready(function () {
174    $("#fhws-subscribe-widget").submitCaptcha();
175
176    //move modal to body
177    $(".bootstrap-fhws-obituaries-container-1").appendTo("body");
178    //to close modals
179    $(".fhws-modal").on("click", function (event) {
180      $(event.target).modal("hide");
181    });
182
183    //text size control
184    var originalSize = parseInt(
185      $(".bootstrap-fhws-obituaries-container").css("font-size"),
186    );
187    var $sizeCtrl = $(".f1fd-size-ctl");
188    $sizeCtrl.on("click", function (e) {
189      $sizeCtrl.removeClass("active");
190      $(this).addClass("active");
191      window.localStorage.setItem(
192        "fhwstextsize",
193        $(this).index(".f1fd-size-ctl"),
194      );
195      switch ($(this).attr("id")) {
196        case "f1fd-text-size-base":
197          var f1FdSize = originalSize + "px";
198          break;
199        case "f1fd-text-size-zoom1":
200          var f1FdSize = originalSize + 3 + "px";
201          break;
202        case "f1fd-text-size-zoom2":
203          var f1FdSize = originalSize + 6 + "px";
204          break;
205      }
206      $(".bootstrap-fhws-obituaries-container").css("font-size", f1FdSize);
207    });
208
209    /*$('#fhws-fullscreen-button').on('click', function(){
210          var $_icon = $('#fhws-fullscreen-button-icon');
211          var fullscreen = '<svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>';
212          var exitFullscreen = '<svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path></svg>';
213          if (
214            document.fullscreenElement ||
215            document.webkitFullscreenElement ||
216            document.mozFullScreenElement ||
217            document.msFullscreenElement
218          ) {
219            if (document.exitFullscreen) {
220              document.exitFullscreen();
221            } else if (document.mozCancelFullScreen) {
222              document.mozCancelFullScreen();
223            } else if (document.webkitExitFullscreen) {
224              document.webkitExitFullscreen();
225            } else if (document.msExitFullscreen) {
226              document.msExitFullscreen();
227            }
228            $_icon.html(fullscreen);
229          } else {
230            var element = document.getElementById("fhws-main-obit");
231            if (element.requestFullscreen) {
232              element.requestFullscreen();
233            } else if (element.mozRequestFullScreen) {
234              element.mozRequestFullScreen();
235            } else if (element.webkitRequestFullscreen) {
236              element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
237            } else if (element.msRequestFullscreen) {
238              element.msRequestFullscreen();
239            }
240            $_icon.html(exitFullscreen);
241
242          }
243
244        }); */
245
246    var localStorageTextSize = JSON.parse(
247      window.localStorage.getItem("fhwstextsize"),
248    );
249    if (localStorageTextSize != null) {
250      $(".f1fd-size-ctl").eq(localStorage.getItem("fhwstextsize")).click();
251    }
252
253    $(".fhws-modal-dialog").draggable();
254
255    $("#fhws-share-subscribe-form").fhwsCaptcha();
256
257    // tab event
258    $(".nav-link").on("shown.bs.tab", function (event) {
259      var win = $(window).width(); //this = window
260      if (win <= 767) {
261        $([document.documentElement, document.body]).animate(
262          {
263            scrollTop: $("#pills-tabContent").offset().top,
264          },
265          2000,
266        );
267      }
268
269      $(".share").find("button").removeClass("active");
270      event.target; // newly activated tab
271      event.relatedTarget; // previous active tab
272      if (event.target.id == "pills-condolence") {
273        $("#share_memory").addClass("active");
274      }
275      if (event.target.id == "pills-flowers") {
276        $("#florist-one-flower-delivery-menu-link-1").trigger("click");
277        $("#send_flowers").addClass("active");
278      }
279      if (event.target.id == "pills-tree") {
280        $("#florist-one-flower-delivery-menu-link-0").trigger("click");
281        $("#plant_a_tree").addClass("active");
282      }
283    });
284
285    // check if share and subscribe modal is present on page
286    if (document.getElementById("fhws-share-subscribe-modal")) {
287      var fhwsModal = document.getElementById("fhws-share-subscribe-modal");
288      // share and subscribe modal
289      fhwsModal.addEventListener("show.bs.modal", function (event) {
290        $("#fhws-share-subscribe-form").fhwsCaptcha();
291
292        var id = event.relatedTarget.id;
293        var buttonAction =
294          event.relatedTarget.getAttribute("data-modal-action");
295        var form = document.getElementById("fhws-share-subscribe-form");
296        var modalId = document.getElementById("fhws-share-subscribe-modal");
297        var changeTitle = modalId.getElementsByClassName("modal-title")[0];
298        var changeInfo = modalId.getElementsByClassName("modal-info")[0];
299        var changeText = modalId.getElementsByClassName("form-label")[0];
300        var changeButton1 =
301          modalId.getElementsByClassName("button-one-text")[0];
302        var changeButton2 =
303          modalId.getElementsByClassName("button-two-text")[0];
304        var $statusBox = $(".fhws-share-subscribe-message");
305        var destination = event.relatedTarget.getAttribute("data-address");
306        var $submitButton = $("#fhws-share-subscribe-submit");
307        var $input = $("#fhws-share-subscribe-input");
308
309        changeButton2.innerHTML = $("#popup_submit").val();
310        changeButton1.innerHTML = $("#popup_cancel").val();
311
312        changeInfo.innerHTML = "";
313
314        $statusBox.html("");
315
316        form.reset();
317
318        switch (buttonAction) {
319          case "Email Direction":
320          case "Text Direction":
321            changeTitle.innerHTML =
322              buttonAction == "Text Direction"
323                ? $("#enter_your_phone_number").val()
324                : $("#enter_your_email_address").val();
325            changeText.innerHTML =
326              buttonAction == "Text Direction"
327                ? $("#enter_your_phone_number").val()
328                : $("#enter_your_email_address").val();
329            var data = {
330              action: "obituary_assistant_send_directions",
331              location: destination,
332            };
333            var successMsg = "Directions successfully sent";
334            var placeholder =
335              buttonAction == "Text Direction"
336                ? "123-123-1234"
337                : "[email protected]";
338            $("#button_action").val(
339              buttonAction == "Text Direction" ? "SMS" : "EMAIL",
340            );
341            break;
342          case "Subscribe to Obit":
343            changeTitle.innerHTML = $("#popup_subscribe_header").val();
344            changeText.innerHTML = $("#popup_subscribe_explanation").val();
345            var data = {
346              action: "obituary_assistant_subscribe_to_obituary",
347              obit_id: $("#obit_id").val(),
348            };
349            var successMsg = "Thanks for subscribing!";
350            var placeholder = $("#fhws_input_placeholder").val();
351            break;
352          case "Share Text":
353          case "Share Email":
354            changeTitle.innerHTML =
355              buttonAction == "Share Text"
356                ? $("#share_by_phone").val()
357                : $("#share_by_email").val();
358            changeText.innerHTML =
359              buttonAction == "Share Text"
360                ? $("#enter_your_phone_number").val()
361                : $("#enter_your_email_address").val();
362            var data = {
363              action: "obituary_assistant_share_obituary",
364              client_id: $("#client_id").val(),
365              obit_id: $("#obit_id").val(),
366              type: buttonAction == "Share Text" ? "sms" : "email",
367              url: window.location.href,
368            };
369            var successMsg =
370              buttonAction == "Share Text"
371                ? "Your text has been sent"
372                : "Your email has been sent";
373            var placeholder =
374              buttonAction == "Share Text"
375                ? $("#enter_your_phone_number").val()
376                : $("#enter_your_email_address").val();
377            $("#button_action").val(
378              buttonAction == "Share Text" ? "SMS" : "EMAIL",
379            );
380            break;
381          case "Subscribe to Obits":
382            changeTitle.innerHTML = "";
383            changeText.innerHTML = $(
384              "#subscribe_to_client_popup_explanation",
385            ).val();
386            var data = {
387              action: "obituary_assistant_subscribe_to_client",
388            };
389            var successMsg =
390              "Thanks for subscribing! Please check your inbox and confirm your email address";
391            var placeholder = $("#fhws_input_placeholder").val();
392            break;
393        }
394
395        //add info to submit button for action
396        $submitButton
397          .attr("data-info", JSON.stringify(data))
398          .attr("data-msg", successMsg);
399        $input.attr("placeholder", placeholder);
400
401        function sendAction() {
402          var validMsg = $("#fhws-share-subscribe-modal")
403            .find($input)
404            .attr("placeholder");
405          var data = JSON.parse(
406            $("#fhws-share-subscribe-submit").attr("data-info"),
407          );
408          var successMsgShow = $("#fhws-share-subscribe-submit").attr(
409            "data-msg",
410          );
411          var $sumbitMsg = $(".fhws-share-subscribe-message");
412          data.address = $input.val();
413          var inputValid = /^(1[-]*)?\d{3}[-]*\d{3}[-]*\d{4}$|^\S+@\S+\.\S+$/;
414          if (inputValid.test(data.address)) {
415            // validate
416            jQuery.post(
417              ajaxurl + "?_r=" + Math.random(),
418              data,
419              function (response, status) {
420                var obj = JSON.parse(response);
421                console.log(obj);
422                if (obj["SUCCESS"] || obj["success"]) {
423                  $sumbitMsg.html(
424                    '<div class="alert alert-success mt-3" role="alert">' +
425                      successMsgShow +
426                      "</div>",
427                  );
428                  window.setTimeout(function () {
429                    $sumbitMsg.fadeOut(2500, function () {
430                      $(this).empty().show();
431                      $("#fhws-share-subscribe-modal").hide();
432                    });
433                  }, 3000);
434                } else {
435                  var errorMsg =
436                    data["action"] ==
437                      "obituary_assistant_subscribe_to_client" ||
438                    data["action"] == "obituary_assistant_subscribe_to_obituary"
439                      ? "We’re sorry but there was a problem in subscribing. Either you are already subscribed or please check the information you are submitting."
440                      : "Sorry, there was an error. Please try again.";
441                  $sumbitMsg.html(
442                    '<div class="alert alert-danger  mt-3" role="alert">' +
443                      errorMsg +
444                      "</div>",
445                  );
446                }
447              },
448              "html",
449            );
450          } else {
451            $("#fhws-share-subscribe-input").focus();
452            if ($("#button_action").val() == "SMS") {
453              $sumbitMsg.html(
454                '<div class="alert alert-danger  mt-3" role="alert">Please enter a 10 digit phone number.</div>',
455              );
456            } else {
457              $sumbitMsg.html(
458                '<div class="alert alert-danger  mt-3" role="alert">Please try again, enter as ' +
459                  validMsg +
460                  "</div>",
461              );
462            }
463          }
464        }
465
466        if (!sumbitListner) {
467          // only add listener once
468          document
469            .getElementById("fhws-share-subscribe-submit")
470            .addEventListener("click", sendAction);
471          sumbitListner = true;
472        }
473      }); // end modal function
474    }
475
476    createInfoDialog();
477    $createDialog();
478
479    initialLoad = false;
480
481    //extra share buttons
482    $(".fhws-additioin-button").click(function (e) {
483      window.open($(this).attr("href"));
484    });
485
486    $("#share_memory, #testing").click(
487      function (e) {
488        e.preventDefault();
489
490        $(".share").find("button").removeClass("active");
491        $(this).addClass("active");
492
493        showTab($(this).attr("data-tab"));
494      },
495    );
496
497    // subscribe shortcode function
498    $(document).on("click", "#fhws-subscribe-widget-submit", function (e) {
499      e.preventDefault();
500
501      var $email = $("#fhws-subscribe-widget-email");
502      var $message = $("#fhws-subscribe-widget-message");
503      var userinput = $email.val();
504      var pattern =
505        /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
506
507      $message.text("");
508      if (!pattern.test(userinput)) {
509        $message.text("Please enter an valid email.");
510      } else {
511        var data = {
512          action: "obituary_assistant_subscribe_to_client",
513          address: userinput,
514        };
515        jQuery.post(
516          ajaxurl + "?_r=" + Math.random(),
517          data,
518          function (response, status) {
519            var successMsg;
520            var apiResponse = JSON.parse(response);
521            apiResponse = JSON.parse(apiResponse.success);
522            console.log(apiResponse);
523            if (apiResponse === false) {
524              successMsg =
525                "Either you are already subscribed or please check the information you are submitting.";
526            } else {
527              successMsg =
528                "Thanks for subscribing. Please check your inbox to verify your email.";
529              $email.val("");
530            }
531            $message.text(successMsg);
532          },
533          "html",
534        );
535      }
536    });
537
538    $(document).on("click", ".purchase-recognition-buttons", function (e) {
539      e.preventDefault();
540      showTab($(this).attr("data-tab"));
541
542      document
543        .querySelector(".florist-one-flower-delivery-menu")
544        .scrollIntoView(true);
545    });
546
547    /***************ShortCode_Sub_PoP****************/
548
549    $("#subscribe_to_client_widgt").click(function (e) {
550      e.preventDefault();
551      dialogType = 6;
552      $(".dialog-msg").html($("#subscribe_to_client_popup_explanation").val());
553      $("#phone-in").val("");
554      $("#phone-in").attr("placeholder", $("#placeholder").val());
555      $(".refreshButton").trigger("click");
556      $infoDialog.dialog("option", "title", $("#popup_subscribe_header").val());
557      $infoDialog.dialog("open");
558    });
559
560    $("#mms_photo").click(function (e) {
561      if ($getLogin() == 0) {
562        $(".login").trigger("click");
563      } else {
564        dialogType = 4;
565        $(".dialog-msg").html(
566          "You can also add photos via text message. Give us your number and we'll send you a text and then you can reply with photos and they will show up in the gallery!",
567        );
568        $("#phone-in").val("");
569        $("#phone-in").attr("placeholder", "123-123-1234");
570        $(".refreshButton").trigger("click");
571        $infoDialog.dialog("option", "title", "Enter Your Phone Number");
572        $infoDialog.dialog("open");
573      }
574    });
575
576    $(document).on(
577      "click",
578      ".fhw-solutions-obituaries_search-all-obits-button",
579      function (e) {
580        e.preventDefault();
581        searchForObit($(".fhw-solutions-obituaries_search-all-obits").val());
582      },
583    );
584
585    $(document).on("click", ".additional_link", function (e) {
586      e.preventDefault();
587      window.open($(this).attr("data-href"), "_blank");
588    });
589
590    var showDirections = function (address) {
591      var url = "http://maps.google.com/maps?saddr=&daddr=" + address;
592      window.open(url, "_blank");
593    };
594
595    //$("head").prepend('<meta property="og:image" content="https://res.cloudinary.com/ltkadmfy5/image/upload/t_individual_obituary_old/client/10/obit/0/profile/jibhwytwve4rrahodebb.jpg" />');
596    //$("head").prepend('<meta property="og:site_name" content="Your Website Title" />');
597    //$("meta[property='og:title']").attr("content", "Obituary For Test Middle Tescsfsfster");
598
599    $(document).on("click", ".oa-share-popup", function (e) {
600      var width = 575,
601        height = 400,
602        left = ($(window).width() - width) / 2,
603        top = ($(window).height() - height) / 2,
604        url = $(this).attr("data-href"),
605        opts =
606          "status=1" +
607          ",width=" +
608          width +
609          ",height=" +
610          height +
611          ",top=" +
612          top +
613          ",left=" +
614          left;
615      window.open(url, "twitter", opts);
616      return false;
617    });
618  });
619
620  var setLoginType = function (data) {
621    loginType = data;
622  };
623
624  var getLoginType = function () {
625    return loginType;
626  };
627
628  var checkCaptcha = function (callback) {
629    var data = {
630      action: "obituary_assistant_check_captcha",
631      captchaSelection: $("input[name=captchaSelection]").val(),
632    };
633    jQuery.post(
634      ajaxurl + "?_r=" + Math.random(),
635      data,
636      function (response, status) {
637        callback(response.human);
638      },
639      "json",
640    );
641  };
642
643  function returnData(param) {
644    return param;
645  }
646
647  var showTab = function (tab) {
648    //hide all
649
650    var $tab = $("#pills-tab");
651    var $tabContent = $("#pills-tabContent");
652
653    $tab.find("a").removeClass("active");
654    $tabContent.find(".tab-pane").removeClass("show active");
655
656    switch (tab) {
657      case "obit":
658        $("#obit_text").css("display", "block");
659        if ($(window).width() <= 800 && initialLoad == false) {
660          $([document.documentElement, document.body]).animate(
661            {
662              scrollTop: $(".obit_body").offset().top,
663            },
664            2000,
665          );
666        }
667        break;
668      case "photo":
669        $("#obit_photos_and_video").css("display", "block");
670        if ($(window).width() <= 800) {
671          $([document.documentElement, document.body]).animate(
672            {
673              scrollTop: $("#obit_photos_and_video").offset().top,
674            },
675            2000,
676          );
677        }
678        break;
679      case "condolence":
680        $("#condolence, #pills-condolence").addClass("show active");
681        document
682          .querySelector("#obituary-share-memory-container")
683          .scrollIntoView(false);
684        break;
685      case "flowers":
686        $("#flowers, #pills-flowers").addClass("show active");
687
688        if ($(".florist-one-flower-delivery").html().length < 1) {
689        }
690
691        if ($("#florist-one-flower-delivery-menu-link-0").hasClass("active")) {
692          $("#florist-one-flower-delivery-menu-link-1").trigger("click");
693        }
694        //$("#florist-one-flower-delivery-menu-link-1").trigger("click");
695        if ($(window).width() <= 800) {
696          $([document.documentElement, document.body]).animate(
697            {
698              scrollTop: $(".florist-one-flower-delivery").offset().top,
699            },
700            2000,
701          );
702        }
703        break;
704      case "trees":
705        if (
706          $("#client_type").val() == 5 ||
707          $("#client_type").val() == 7 ||
708          $("#flowers_enabled").val() == 0
709        ) {
710          $("#trees, #pills-tree").addClass("show active");
711        } else {
712          if ($(".florist-one-flower-delivery").html().length < 1) {
713            //$("#florist-one-flower-delivery-menu-link-0").trigger("click");
714          }
715          if (
716            !$("#florist-one-flower-delivery-menu-link-0").hasClass("active")
717          ) {
718            $("#florist-one-flower-delivery-menu-link-0").trigger("click");
719          }
720          $("#flowers, #pills-tree").addClass("show active");
721          if ($(window).width() <= 800) {
722            $([document.documentElement, document.body]).animate(
723              {
724                scrollTop: $(".florist-one-flower-delivery").offset().top,
725              },
726              2000,
727            );
728          }
729        }
730
731        break;
732    }
733  };
734
735  var createInfoDialog = function () {
736    $infoDialog = $("#dialog-enter-info").dialog({
737      autoResize: true,
738      autoOpen: false,
739      height: "auto",
740      width: "auto",
741      maxWidth: 575,
742      modal: true,
743      position: {
744        my: "center",
745        at: "center",
746      },
747      buttons: [
748        {
749          text: $("#popup_submit").val(),
750          click: infoIn,
751        },
752        {
753          text: $("#popup_cancel").val(),
754          click: function () {
755            $infoDialog.dialog("close");
756          },
757        },
758      ],
759    });
760  };
761
762  function infoIn() {
763    checkCaptcha(function (human) {
764      if (human == true) {
765        if (dialogType == 0) {
766          var data = {
767            action: "obituary_assistant_send_directions",
768            address: $("#phone-in").val(),
769            location: destination,
770          };
771          jQuery.post(
772            ajaxurl + "?_r=" + Math.random(),
773            data,
774            function (response, status) {
775              var obj = JSON.parse(response);
776              if (obj["SUCCESS"] == true) {
777                $(".dialog-enter-info-status").html(
778                  "Directions successfully sent",
779                );
780                $(".dialog-enter-info-status").addClass(
781                  "dialog-enter-info-status-success",
782                );
783                window.setTimeout(function () {
784                  $infoDialog.dialog("close");
785                  $(".dialog-enter-info-status").html("");
786                  $(".dialog-enter-info-status").removeClass(
787                    "dialog-enter-info-status-success",
788                  );
789                }, 1500);
790              } else {
791                $(".dialog-enter-info-status").html(
792                  "Sorry, there was an error. Please try again.",
793                );
794                $(".dialog-enter-info-status").addClass(
795                  "dialog-enter-info-status-error",
796                );
797                window.setTimeout(function () {
798                  $(".dialog-enter-info-status").html("");
799                  $(".dialog-enter-info-status").removeClass(
800                    "dialog-enter-info-status-error",
801                  );
802                }, 1500);
803              }
804            },
805            "html",
806          );
807        } else if (dialogType == 1) {
808          var data = {
809            action: "obituary_assistant_share_obituary",
810            client_id: $("#client_id").val(),
811            obit_id: $("#obit_id").val(),
812            type: "sms",
813            address: $("#phone-in").val(),
814            url: window.location.href,
815          };
816          jQuery.post(
817            ajaxurl + "?_r=" + Math.random(),
818            data,
819            function (response, status) {
820              var obj = JSON.parse(response);
821              if (obj["SUCCESS"] == true) {
822                $(".dialog-enter-info-status").html("Your text has been sent");
823                $(".dialog-enter-info-status").addClass(
824                  "dialog-enter-info-status-success",
825                );
826                window.setTimeout(function () {
827                  $infoDialog.dialog("close");
828                  $(".dialog-enter-info-status").html("");
829                  $(".dialog-enter-info-status").removeClass(
830                    "dialog-enter-info-status-success",
831                  );
832                }, 1500);
833              } else {
834                $(".dialog-enter-info-status").html(
835                  "Sorry, there was an error. Please try again.",
836                );
837                $(".dialog-enter-info-status").addClass(
838                  "dialog-enter-info-status-error",
839                );
840                window.setTimeout(function () {
841                  $(".dialog-enter-info-status").html("");
842                  $(".dialog-enter-info-status").removeClass(
843                    "dialog-enter-info-status-error",
844                  );
845                }, 1500);
846              }
847            },
848            "html",
849          );
850        } else if (dialogType == 2) {
851          var data = {
852            action: "obituary_assistant_share_obituary",
853            client_id: $("#client_id").val(),
854            obit_id: $("#obit_id").val(),
855            type: "email",
856            address: $("#phone-in").val(),
857            url: window.location.href,
858          };
859          jQuery.post(
860            ajaxurl + "?_r=" + Math.random(),
861            data,
862            function (response, status) {
863              var obj = JSON.parse(response);
864              if (obj["SUCCESS"] == true) {
865                $(".dialog-enter-info-status").html("Your email has been sent");
866                $(".dialog-enter-info-status").addClass(
867                  "dialog-enter-info-status-success",
868                );
869                window.setTimeout(function () {
870                  $infoDialog.dialog("close");
871                  $(".dialog-enter-info-status").html("");
872                  $(".dialog-enter-info-status").removeClass(
873                    "dialog-enter-info-status-success",
874                  );
875                }, 1500);
876              } else {
877                $(".dialog-enter-info-status").html(
878                  "Sorry, there was an error. Please try again.",
879                );
880                $(".dialog-enter-info-status").addClass(
881                  "dialog-enter-info-status-error",
882                );
883                window.setTimeout(function () {
884                  $(".dialog-enter-info-status").html("");
885                  $(".dialog-enter-info-status").removeClass(
886                    "dialog-enter-info-status-error",
887                  );
888                }, 1500);
889              }
890            },
891            "html",
892          );
893        } else if (dialogType == 4) {
894          var data = {
895            action: "obituary_assistant_share_obituary",
896            client_id: $("#client_id").val(),
897            obit_id: $("#obit_id").val(),
898            type: "sms-photo",
899            address: $("#phone-in").val(),
900            url: window.location.href,
901          };
902          jQuery.post(
903            ajaxurl + "?_r=" + Math.random(),
904            data,
905            function (response, status) {
906              var obj = JSON.parse(response);
907              if (obj["SUCCESS"] == true) {
908                $(".dialog-enter-info-status").html("Your text has been sent");
909                $(".dialog-enter-info-status").addClass(
910                  "dialog-enter-info-status-success",
911                );
912                window.setTimeout(function () {
913                  $infoDialog.dialog("close");
914                  $(".dialog-enter-info-status").html("");
915                  $(".dialog-enter-info-status").removeClass(
916                    "dialog-enter-info-status-success",
917                  );
918                }, 1500);
919              } else {
920                $(".dialog-enter-info-status").html(
921                  "Sorry, there was an error. Please try again.",
922                );
923                $(".dialog-enter-info-status").addClass(
924                  "dialog-enter-info-status-error",
925                );
926                window.setTimeout(function () {
927                  $(".dialog-enter-info-status").html("");
928                  $(".dialog-enter-info-status").removeClass(
929                    "dialog-enter-info-status-error",
930                  );
931                }, 1500);
932              }
933            },
934            "html",
935          );
936        } else if (dialogType == 5) {
937          var data = {
938            action: "obituary_assistant_subscribe_to_obituary",
939            obit_id: $("#obit_id").val(),
940            address: $("#phone-in").val(),
941          };
942          jQuery.post(
943            ajaxurl + "?_r=" + Math.random(),
944            data,
945            function (response, status) {
946              var obj = JSON.parse(response);
947              if (obj["success"] == true) {
948                $(".dialog-enter-info-status").html("Subscription added");
949                $(".dialog-enter-info-status").addClass(
950                  "dialog-enter-info-status-success",
951                );
952                window.setTimeout(function () {
953                  $infoDialog.dialog("close");
954                  $(".dialog-enter-info-status").html("");
955                  $(".dialog-enter-info-status").removeClass(
956                    "dialog-enter-info-status-success",
957                  );
958                }, 1500);
959              } else {
960                $(".dialog-enter-info-status").html(
961                  "Sorry, there was an error. Please try again.",
962                );
963                $(".dialog-enter-info-status").addClass(
964                  "dialog-enter-info-status-error",
965                );
966                window.setTimeout(function () {
967                  $(".dialog-enter-info-status").html("");
968                  $(".dialog-enter-info-status").removeClass(
969                    "dialog-enter-info-status-error",
970                  );
971                }, 1500);
972              }
973            },
974            "html",
975          );
976        } else if (dialogType == 6) {
977          var data = {
978            action: "obituary_assistant_subscribe_to_client",
979            address: $("#phone-in").val(),
980          };
981          jQuery.post(
982            ajaxurl + "?_r=" + Math.random(),
983            data,
984            function (response, status) {
985              var obj = JSON.parse(response);
986              if (obj["success"] == true) {
987                $(".dialog-enter-info-status").html("Subscription added");
988                $(".dialog-enter-info-status").addClass(
989                  "dialog-enter-info-status-success",
990                );
991                window.setTimeout(function () {
992                  $infoDialog.dialog("close");
993                  $(".dialog-enter-info-status").html("");
994                  $(".dialog-enter-info-status").removeClass(
995                    "dialog-enter-info-status-success",
996                  );
997                }, 1500);
998              } else {
999                $(".dialog-enter-info-status").html(
1000                  "Sorry, there was an error. Please try again.",
1001                );
1002                $(".dialog-enter-info-status").addClass(
1003                  "dialog-enter-info-status-error",
1004                );
1005                window.setTimeout(function () {
1006                  $(".dialog-enter-info-status").html("");
1007                  $(".dialog-enter-info-status").removeClass(
1008                    "dialog-enter-info-status-error",
1009                  );
1010                }, 1500);
1011              }
1012            },
1013            "html",
1014          );
1015        }
1016      } else {
1017        $(".dialog-enter-info-status").html(
1018          "Sorry, there was an issue with your image verification. Please try again.",
1019        );
1020        $(".dialog-enter-info-status").addClass(
1021          "dialog-enter-info-status-error",
1022        );
1023        window.setTimeout(function () {
1024          $(".dialog-enter-info-status").html("");
1025          $(".dialog-enter-info-status").removeClass(
1026            "dialog-enter-info-status-error",
1027          );
1028        }, 1500);
1029      }
1030    });
1031  }
1032
1033  var $createDialog = function () {
1034    var dialog;
1035    var form;
1036    var emailRegex =
1037      "/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/";
1038    var name = $("#name-in");
1039    var email = $("#email-in");
1040    var allFields = $([]).add(name).add(email);
1041    var tips = $(".validateTips");
1042
1043    function updateTips(t) {
1044      tips.text(t).addClass("ui-state-highlight");
1045      setTimeout(function () {
1046        tips.removeClass("ui-state-highlight", 1500);
1047      }, 500);
1048    }
1049
1050    function checkLength(o, n, min, max) {
1051      if (o.val().length > max || o.val().length < min) {
1052        o.addClass("ui-state-error");
1053        updateTips(
1054          "Length of " + n + " must be between " + min + " and " + max + ".",
1055        );
1056        return false;
1057      } else {
1058        return true;
1059      }
1060    }
1061
1062    function checkRegexp(o, regexp, n) {
1063      if (!regexp.test(o.val())) {
1064        o.addClass("ui-state-error");
1065        updateTips(n);
1066        return false;
1067      } else {
1068        return true;
1069      }
1070    }
1071
1072    function basiclogin() {
1073      var valid = true;
1074      allFields.removeClass("ui-state-error");
1075
1076      valid = valid && checkLength(name, "username", 3, 100);
1077      valid = valid && checkLength(email, "email", 6, 100);
1078
1079      /*<!---valid = valid && checkRegexp( name, /^[a-z]([0-9a-z_\s])+$/i, "Username may consist of a-z, 0-9, underscores, spaces and must begin with a letter." );
1080		valid = valid && checkRegexp( email, emailRegex, "eg. [email protected]" );--->*/
1081
1082      if (valid) {
1083        $setLogin(1, $("#name-in").val(), $("#email-in").val());
1084
1085        if ($(".login_type").val() == "condolence") {
1086          console.log("auto submit condolence form after login");
1087          $(".input-new-condolence-submit").trigger("click");
1088        }
1089
1090        $login.dialog("close");
1091        $getLogin();
1092      }
1093
1094      return valid;
1095    }
1096
1097    var $setLogin = function (type, user, email) {
1098      $.cookie("o-s-t", type);
1099      $.cookie("o-s-u", user);
1100      $.cookie("o-s-e", email);
1101      $(".refresh_condolence_button").trigger("click");
1102    };
1103
1104    var $login = $("#dialog").dialog({
1105      autoResize: true,
1106      autoOpen: false,
1107      height: "auto",
1108      width: "auto",
1109      maxWidth: 575,
1110      modal: true,
1111      position: {
1112        my: "center",
1113        at: "center",
1114      },
1115      buttons: [
1116        {
1117          text: $("#popup_submit").val(),
1118          click: basiclogin,
1119        },
1120        {
1121          text: $("#popup_cancel").val(),
1122          click: function () {
1123            $login.dialog("close");
1124          },
1125        },
1126      ],
1127      close: function () {
1128        form[0].reset();
1129        allFields.removeClass("ui-state-error");
1130      },
1131    });
1132
1133    form = $login.find("form").on("submit", function (event) {
1134      event.preventDefault();
1135      basiclogin();
1136    });
1137
1138    $(".login")
1139      .button()
1140      .click(function () {
1141        $login.dialog("open");
1142      });
1143
1144    $(".logout").click(function () {
1145      $logout();
1146    });
1147
1148    function isName(name) {
1149      var regex = /(.*[a-z]){3}/i;
1150      return regex.test(name);
1151    }
1152
1153    function isEmail(email) {
1154      var regex =
1155        /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
1156      return regex.test(email);
1157    }
1158
1159    //download
1160    $(document).on("click", "#obituary-share-icon-print", function (e) {
1161      e.preventDefault();
1162
1163      var obituaryReference = $(this).attr("data-obituary-ref");
1164
1165      if (!obituaryReference) {
1166        return;
1167      }
1168
1169      var oaEnvironment = String($("#oaEnvFromPhp").val() || "prod").toLowerCase();
1170      var printDomain =
1171        oaEnvironment === "dev"
1172          ? "https://dev.obituary-assistant.com"
1173          : "https://www.obituary-assistant.com";
1174
1175      window
1176        .open(
1177          printDomain +
1178            "/fhws/templates/standalone-new/print.cfm?obituary_ref=" +
1179            encodeURIComponent(obituaryReference),
1180          "_blank",
1181          "noopener,noreferrer",
1182        )
1183        .focus();
1184    });
1185
1186    // submit login
1187    $(document).on(
1188      "click",
1189      "#fws-solutions-obit-login-sumbit",
1190      function (event) {
1191        event.preventDefault();
1192        var name = $("#name-in");
1193        var email = $("#email-in");
1194
1195        if (!isEmail(email.val())) {
1196          email.addClass("alert-danger");
1197        } else {
1198          email.removeClass("alert-danger");
1199        }
1200
1201        if (!isName(name.val())) {
1202          name.addClass("alert-danger");
1203        } else {
1204          name.removeClass("alert-danger");
1205        }
1206
1207        if (isEmail(email.val()) && isName(name.val())) {
1208          $setLogin(1, $("#name-in").val(), $("#email-in").val());
1209
1210          if ($(".login_type").val() == "condolence") {
1211            console.log("auto submit condolence form after login");
1212            $(".input-new-condolence-submit").trigger("click");
1213          } else {
1214            $("#upload_photo").trigger("click");
1215          }
1216
1217          $("#fws-solutions-obit-login-close").trigger("click");
1218        }
1219      },
1220    );
1221  };
1222
1223  var getUrlParameter = function getUrlParameter(sParam) {
1224    var sPageURL = decodeURIComponent(window.location.search.substring(1)),
1225      sURLVariables = sPageURL.split("&"),
1226      sParameterName,
1227      i;
1228
1229    for (i = 0; i < sURLVariables.length; i++) {
1230      sParameterName = sURLVariables[i].split("=");
1231
1232      if (sParameterName[0] === sParam) {
1233        return sParameterName[1] === undefined ? true : sParameterName[1];
1234      }
1235    }
1236  };
1237
1238  var $getLoginVal = function (field) {
1239    switch (field) {
1240      case "type":
1241        return $.cookie("o-s-t");
1242        break;
1243      case "user":
1244        return $.cookie("o-s-u");
1245        break;
1246      case "email":
1247        return $.cookie("o-s-e");
1248        break;
1249    }
1250  };
1251
1252  var $getLogin = function () {
1253    if (
1254      $.cookie("o-s-t") === undefined ||
1255      $.cookie("o-s-u") === undefined ||
1256      $.cookie("o-s-e") === undefined
1257    ) {
1258      return 0;
1259    } else {
1260      return 1;
1261    }
1262  };
1263
1264  var searchForObit = function (searchString) {
1265    var data = {
1266      action: "obituary_assistant_search_for_obit",
1267      search_string: searchString,
1268    };
1269    jQuery.post(
1270      ajaxurl + "?_r=" + Math.random(),
1271      data,
1272      function (response, status) {
1273        $(".obit_listing").remove();
1274        $(".fhw-solutions-obituaries_all-obituary-listings").html(response);
1275      },
1276      "html",
1277    );
1278  };
1279
1280  $(document).on("click", ".fhws-scroll-page", function (e) {
1281    var div = $(this).attr("data-fhws-scroll");
1282    $("html, body").animate(
1283      {
1284        scrollTop: $("#" + div).offset().top - 200,
1285      },
1286      2000,
1287    );
1288  });
1289
1290  $(document).on("click", ".oa-useful-link-contact-us", function (e) {
1291    e.preventDefault();
1292    $("#submit_useful_link_div").removeClass("d-none");
1293    $("#success_message").addClass("d-none");
1294  });
1295
1296  $(document).on("click", ".oa-useful-link-contact-us-submit", function (e) {
1297    // validate here
1298    var $form = $(".oa-send-useful-link-form");
1299    $form.validate({
1300      rules: {
1301        useful_link_name: {
1302          required: true,
1303          minlength: 1,
1304          maxlength: 100,
1305        },
1306        useful_link_phone_number: {
1307          required: true,
1308          minlength: 1,
1309          maxlength: 20,
1310        },
1311        useful_link_email_address: {
1312          required: true,
1313          minlength: 1,
1314          maxlength: 100,
1315          email: true,
1316        },
1317        useful_link_business_name: {
1318          required: true,
1319          minlength: 1,
1320          maxlength: 100,
1321        },
1322        useful_link_description: {
1323          required: true,
1324          minlength: 1,
1325          maxlength: 100,
1326        },
1327      },
1328      onkeyup: false,
1329      onblur: false,
1330      onchange: false,
1331      errorClass: "alert alert-danger w-100",
1332      invalidHandler: function (event, validator) {},
1333      showErrors: function (errorMap, errorList) {
1334        this.defaultShowErrors();
1335      },
1336      submitHandler: function () {
1337        var data = {
1338          action: "obituary_assistant_submit_useful_link",
1339          name: $("#useful_link_name").val(),
1340          phone_number: $("#useful_link_phone_number").val(),
1341          email_address: $("#useful_link_email_address").val(),
1342          business_name: $("#useful_link_business_name").val(),
1343          description: $("#useful_link_description").val(),
1344          client_id: $("#client_id").val(),
1345        };
1346        jQuery.post(
1347          ajaxurl + "?_r=" + Math.random(),
1348          data,
1349          function (response, status) {
1350            if (response.SUCCESS) {
1351              $("#submit_useful_link_div").addClass("d-none");
1352              $("#success_message").html(
1353                "<h5>Your submission was received, thank you!</h5>",
1354              );
1355              $("#success_message").removeClass("d-none");
1356            } else {
1357              $("#submit_useful_link_div").addClass("d-none");
1358              $("#success_message").html("<h5>Something went wrong.</h5>");
1359              $("#success_message").removeClass("d-none");
1360            }
1361          },
1362          "json",
1363        );
1364      },
1365    });
1366  });
1367
1368  $(document).on(
1369    "keypress",
1370    ".fhw-solutions-obituaries_search-all-obits",
1371    function (e) {
1372      if (e.which == 10 || e.which == 13) {
1373        $("#fhw-solutions-obituaries_search-all-obits-button").trigger("click");
1374      }
1375    },
1376  );
1377})(jQuery);
1378;
1379(function(a){var d=oaInfo.ajax_url,h=function(){a("#fhw-solutions-obituries-modal").on("show.bs.modal",function(a){if(0!=g())return a.preventDefault()});a(".input-new-condolence-submit").click(function(b){0==g()?a(".login_type").val("condolence"):(b={action:"obituary_assistant_add_condolence",obit_id:a("#obit_id").val(),obit_string:a("#obit_url_rewrite").val(),type:e("type"),sender:e("user"),message:a(".input-new-condolence").val(),email:e("email"),celebration_type:a("input[name=obituary-candle-choice]").val(),"o-s-t":a.cookie("o-s-t"),
1380"o-s-u":a.cookie("o-s-u"),"o-s-e":a.cookie("o-s-e")},jQuery.post(d+"?_r="+Math.random(),b,function(b,d){console.log(b);a(".oa-condolences-partial").replaceWith(b);a("h4.condolence_honor").html(a("input[name=condolence_honor]").val());a(".condolence_counter").html(0<a(".oa-condolences-partial .list-group-item").length?" ("+a(".oa-condolences-partial .list-group-item").length+")":"");alert(a("#allow_condolences_message").val());a(".input-new-condolence").val("");a(".input-new-condolence-submit").addClass("d-none");a("#captcha-wrapper").css("display",
1381"none");f();a(".input-new-condolence-cancel-candle").trigger("click")},"html"))});a(".input-new-condolence").on("click keyup keydown keypress",function(){0<a(".input-new-condolence").val().length||a(".obituary-candle.selected").length?a(".input-new-condolence-submit").removeClass("d-none"):a(".input-new-condolence-submit").addClass("d-none")});a("div#condolence").on("click",".obituary-delete-condolence",function(b){b.preventDefault();b={action:"obituary_assistant_delete_condolence",
1382obit_id:a("#obit_id").val(),obit_string:a("#obit_url_rewrite").val(),post_id:a(this).attr("data-p-i"),"o-s-t":a.cookie("o-s-t"),"o-s-u":a.cookie("o-s-u"),"o-s-e":a.cookie("o-s-e")};jQuery.post(d+"?_r="+Math.random(),b,function(b,c){a(".oa-condolences-partial").replaceWith(b);a("h4.condolence_honor").html(a("input[name=condolence_honor]").val());a(".condolence_counter").html(0<a(".oa-condolences-partial .list-group-item").length?" ("+a(".oa-condolences-partial .list-group-item").length+")":"")},"html")});a("div#obit_condolences").on("click",".refresh_condolence_button",function(a){a.preventDefault();
1383c()});var c=function(){var c={action:"obituary_assistant_refresh_condolences",obit_id:a("#obit_id").val(),obit_string:a("#obit_url_rewrite").val(),"o-s-t":a.cookie("o-s-t"),"o-s-u":a.cookie("o-s-u"),"o-s-e":a.cookie("o-s-e")};jQuery.post(d+"?_r="+Math.random(),c,function(c,b){a(".oa-condolences-partial").replaceWith(c);a("h4.condolence_honor").html(a("input[name=condolence_honor]").val());a(".condolence_counter").html(0<a(".oa-condolences-partial .list-group-item").length?" ("+a(".oa-condolences-partial .list-group-item").length+")":"")},"html")};a("h4.condolence_honor").html(a("input[name=condolence_honor]").val())},
1384e=function(c){switch(c){case "type":return a.cookie("o-s-t");case "user":return a.cookie("o-s-u");case "email":return a.cookie("o-s-e")}},g=function(){return void 0===a.cookie("o-s-t")||void 0===a.cookie("o-s-u")||void 0===a.cookie("o-s-e")?0:1},f=function(){a(".obituary-candle").each(function(c,b){a(this).removeClass("selected");a(this).attr("src",a(this).attr("data-image-1"))});a("input[name=obituary-candle-choice]").val("")};a(document).on("click",".input-new-condolence-add-candle",function(){a(".obituary-candles").css("display",
1385"block");a(".input-new-condolence-add-candle").css("display","none");a(".input-new-condolence-cancel-candle").css("display","block")});a(document).on("click",".obituary-candle",function(){a(this).hasClass("selected")?(f(),0==a(".input-new-condolence").val().length&&a(".input-new-condolence-submit").addClass("d-none")):(f(),a(this).attr("src",a(this).attr("data-image-2")),a(this).addClass("selected"),a("input[name=obituary-candle-choice]").val(a(this).attr("data-candle-id")),a(".input-new-condolence-submit").removeClass("d-none"))});
1386a(document).ready(function(){h();a("img.obituary-candle").bind("dragstart",function(a){a.preventDefault()});a("textarea.input-new-condolence").bind("dragenter",function(a){a.preventDefault()});a("textarea.input-new-condolence").bind("dragover",function(a){a.preventDefault()});a("textarea.input-new-condolence").bind("dragdrop",function(a){a.preventDefault()})})})(jQuery);
1387;
1388/*!
1389 * jQuery Cookie Plugin v1.4.1
1390 * https://github.com/carhartl/jquery-cookie
1391 *
1392 * Copyright 2013 Klaus Hartl
1393 * Released under the MIT license
1394 */
1395(function (factory) {
1396	if (typeof define === 'function' && define.amd) {
1397		// AMD
1398		define(['jquery'], factory);
1399	} else if (typeof exports === 'object') {
1400		// CommonJS
1401		factory(require('jquery'));
1402	} else {
1403		// Browser globals
1404		factory(jQuery);
1405	}
1406}(function ($) {
1407
1408	var pluses = /\+/g;
1409
1410	function encode(s) {
1411		return config.raw ? s : encodeURIComponent(s);
1412	}
1413
1414	function decode(s) {
1415		return config.raw ? s : decodeURIComponent(s);
1416	}
1417
1418	function stringifyCookieValue(value) {
1419		return encode(config.json ? JSON.stringify(value) : String(value));
1420	}
1421
1422	function parseCookieValue(s) {
1423		if (s.indexOf('"') === 0) {
1424			// This is a quoted cookie as according to RFC2068, unescape...
1425			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
1426		}
1427
1428		try {
1429			// Replace server-side written pluses with spaces.
1430			// If we can't decode the cookie, ignore it, it's unusable.
1431			// If we can't parse the cookie, ignore it, it's unusable.
1432			s = decodeURIComponent(s.replace(pluses, ' '));
1433			return config.json ? JSON.parse(s) : s;
1434		} catch(e) {}
1435	}
1436
1437	function read(s, converter) {
1438		var value = config.raw ? s : parseCookieValue(s);
1439		return $.isFunction(converter) ? converter(value) : value;
1440	}
1441
1442	var config = $.cookie = function (key, value, options) {
1443
1444		// Write
1445
1446		if (value !== undefined && !$.isFunction(value)) {
1447			options = $.extend({}, config.defaults, options);
1448
1449			if (typeof options.expires === 'number') {
1450				var days = options.expires, t = options.expires = new Date();
1451				t.setTime(+t + days * 864e+5);
1452			}
1453
1454			return (document.cookie = [
1455				encode(key), '=', stringifyCookieValue(value),
1456				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
1457				options.path    ? '; path=' + options.path : '',
1458				options.domain  ? '; domain=' + options.domain : '',
1459				options.secure  ? '; secure' : ''
1460			].join(''));
1461		}
1462
1463		// Read
1464
1465		var result = key ? undefined : {};
1466
1467		// To prevent the for loop in the first place assign an empty array
1468		// in case there are no cookies at all. Also prevents odd result when
1469		// calling $.cookie().
1470		var cookies = document.cookie ? document.cookie.split('; ') : [];
1471
1472		for (var i = 0, l = cookies.length; i < l; i++) {
1473			var parts = cookies[i].split('=');
1474			var name = decode(parts.shift());
1475			var cookie = parts.join('=');
1476
1477			if (key && key === name) {
1478				// If second argument (value) is a function it's a converter...
1479				result = read(cookie, value);
1480				break;
1481			}
1482
1483			// Prevent storing a cookie that we couldn't decode.
1484			if (!key && (cookie = read(cookie)) !== undefined) {
1485				result[name] = cookie;
1486			}
1487		}
1488
1489		return result;
1490	};
1491
1492	config.defaults = {};
1493
1494	$.removeCookie = function (key, options) {
1495		if ($.cookie(key) === undefined) {
1496			return false;
1497		}
1498
1499		// Must not alter options, thus extending a fresh object...
1500		$.cookie(key, '', $.extend({}, options, { expires: -1 }));
1501		return !$.cookie(key);
1502	};
1503
1504}));
1505;
1506/*!
1507  * Bootstrap v5.0.1 (https://getbootstrap.com/)
1508  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
1509  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1510  */
1511(function (global, factory) {
1512  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core')) :
1513  typeof define === 'function' && define.amd ? define(['@popperjs/core'], factory) :
1514  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory(global.Popper));
1515}(this, (function (Popper) { 'use strict';
1516
1517  function _interopNamespace(e) {
1518    if (e && e.__esModule) return e;
1519    var n = Object.create(null);
1520    if (e) {
1521      Object.keys(e).forEach(function (k) {
1522        if (k !== 'default') {
1523          var d = Object.getOwnPropertyDescriptor(e, k);
1524          Object.defineProperty(n, k, d.get ? d : {
1525            enumerable: true,
1526            get: function () {
1527              return e[k];
1528            }
1529          });
1530        }
1531      });
1532    }
1533    n['default'] = e;
1534    return Object.freeze(n);
1535  }
1536
1537  var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
1538
1539  /**
1540   * --------------------------------------------------------------------------
1541   * Bootstrap (v5.0.1): dom/selector-engine.js
1542   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1543   * --------------------------------------------------------------------------
1544   */
1545
1546  /**
1547   * ------------------------------------------------------------------------
1548   * Constants
1549   * ------------------------------------------------------------------------
1550   */
1551  const NODE_TEXT = 3;
1552  const SelectorEngine = {
1553    find(selector, element = document.documentElement) {
1554      return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
1555    },
1556
1557    findOne(selector, element = document.documentElement) {
1558      return Element.prototype.querySelector.call(element, selector);
1559    },
1560
1561    children(element, selector) {
1562      return [].concat(...element.children).filter(child => child.matches(selector));
1563    },
1564
1565    parents(element, selector) {
1566      const parents = [];
1567      let ancestor = element.parentNode;
1568
1569      while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
1570        if (ancestor.matches(selector)) {
1571          parents.push(ancestor);
1572        }
1573
1574        ancestor = ancestor.parentNode;
1575      }
1576
1577      return parents;
1578    },
1579
1580    prev(element, selector) {
1581      let previous = element.previousElementSibling;
1582
1583      while (previous) {
1584        if (previous.matches(selector)) {
1585          return [previous];
1586        }
1587
1588        previous = previous.previousElementSibling;
1589      }
1590
1591      return [];
1592    },
1593
1594    next(element, selector) {
1595      let next = element.nextElementSibling;
1596
1597      while (next) {
1598        if (next.matches(selector)) {
1599          return [next];
1600        }
1601
1602        next = next.nextElementSibling;
1603      }
1604
1605      return [];
1606    }
1607
1608  };
1609
1610  /**
1611   * --------------------------------------------------------------------------
1612   * Bootstrap (v5.0.1): util/index.js
1613   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1614   * --------------------------------------------------------------------------
1615   */
1616
1617  const MAX_UID = 1000000;
1618  const MILLISECONDS_MULTIPLIER = 1000;
1619  const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
1620
1621  const toType = obj => {
1622    if (obj === null || obj === undefined) {
1623      return `${obj}`;
1624    }
1625
1626    return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
1627  };
1628  /**
1629   * --------------------------------------------------------------------------
1630   * Public Util Api
1631   * --------------------------------------------------------------------------
1632   */
1633
1634
1635  const getUID = prefix => {
1636    do {
1637      prefix += Math.floor(Math.random() * MAX_UID);
1638    } while (document.getElementById(prefix));
1639
1640    return prefix;
1641  };
1642
1643  const getSelector = element => {
1644    let selector = element.getAttribute('data-bs-target');
1645
1646    if (!selector || selector === '#') {
1647      let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
1648      // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
1649      // `document.querySelector` will rightfully complain it is invalid.
1650      // See https://github.com/twbs/bootstrap/issues/32273
1651
1652      if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
1653        return null;
1654      } // Just in case some CMS puts out a full URL with the anchor appended
1655
1656
1657      if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
1658        hrefAttr = `#${hrefAttr.split('#')[1]}`;
1659      }
1660
1661      selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
1662    }
1663
1664    return selector;
1665  };
1666
1667  const getSelectorFromElement = element => {
1668    const selector = getSelector(element);
1669
1670    if (selector) {
1671      return document.querySelector(selector) ? selector : null;
1672    }
1673
1674    return null;
1675  };
1676
1677  const getElementFromSelector = element => {
1678    const selector = getSelector(element);
1679    return selector ? document.querySelector(selector) : null;
1680  };
1681
1682  const getTransitionDurationFromElement = element => {
1683    if (!element) {
1684      return 0;
1685    } // Get transition-duration of the element
1686
1687
1688    let {
1689      transitionDuration,
1690      transitionDelay
1691    } = window.getComputedStyle(element);
1692    const floatTransitionDuration = Number.parseFloat(transitionDuration);
1693    const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
1694
1695    if (!floatTransitionDuration && !floatTransitionDelay) {
1696      return 0;
1697    } // If multiple durations are defined, take the first
1698
1699
1700    transitionDuration = transitionDuration.split(',')[0];
1701    transitionDelay = transitionDelay.split(',')[0];
1702    return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
1703  };
1704
1705  const triggerTransitionEnd = element => {
1706    element.dispatchEvent(new Event(TRANSITION_END));
1707  };
1708
1709  const isElement = obj => {
1710    if (!obj || typeof obj !== 'object') {
1711      return false;
1712    }
1713
1714    if (typeof obj.jquery !== 'undefined') {
1715      obj = obj[0];
1716    }
1717
1718    return typeof obj.nodeType !== 'undefined';
1719  };
1720
1721  const getElement = obj => {
1722    if (isElement(obj)) {
1723      // it's a jQuery object or a node element
1724      return obj.jquery ? obj[0] : obj;
1725    }
1726
1727    if (typeof obj === 'string' && obj.length > 0) {
1728      return SelectorEngine.findOne(obj);
1729    }
1730
1731    return null;
1732  };
1733
1734  const emulateTransitionEnd = (element, duration) => {
1735    let called = false;
1736    const durationPadding = 5;
1737    const emulatedDuration = duration + durationPadding;
1738
1739    function listener() {
1740      called = true;
1741      element.removeEventListener(TRANSITION_END, listener);
1742    }
1743
1744    element.addEventListener(TRANSITION_END, listener);
1745    setTimeout(() => {
1746      if (!called) {
1747        triggerTransitionEnd(element);
1748      }
1749    }, emulatedDuration);
1750  };
1751
1752  const typeCheckConfig = (componentName, config, configTypes) => {
1753    Object.keys(configTypes).forEach(property => {
1754      const expectedTypes = configTypes[property];
1755      const value = config[property];
1756      const valueType = value && isElement(value) ? 'element' : toType(value);
1757
1758      if (!new RegExp(expectedTypes).test(valueType)) {
1759        throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
1760      }
1761    });
1762  };
1763
1764  const isVisible = element => {
1765    if (!element) {
1766      return false;
1767    }
1768
1769    if (element.style && element.parentNode && element.parentNode.style) {
1770      const elementStyle = getComputedStyle(element);
1771      const parentNodeStyle = getComputedStyle(element.parentNode);
1772      return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
1773    }
1774
1775    return false;
1776  };
1777
1778  const isDisabled = element => {
1779    if (!element || element.nodeType !== Node.ELEMENT_NODE) {
1780      return true;
1781    }
1782
1783    if (element.classList.contains('disabled')) {
1784      return true;
1785    }
1786
1787    if (typeof element.disabled !== 'undefined') {
1788      return element.disabled;
1789    }
1790
1791    return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
1792  };
1793
1794  const findShadowRoot = element => {
1795    if (!document.documentElement.attachShadow) {
1796      return null;
1797    } // Can find the shadow root otherwise it'll return the document
1798
1799
1800    if (typeof element.getRootNode === 'function') {
1801      const root = element.getRootNode();
1802      return root instanceof ShadowRoot ? root : null;
1803    }
1804
1805    if (element instanceof ShadowRoot) {
1806      return element;
1807    } // when we don't find a shadow root
1808
1809
1810    if (!element.parentNode) {
1811      return null;
1812    }
1813
1814    return findShadowRoot(element.parentNode);
1815  };
1816
1817  const noop = () => {};
1818
1819  const reflow = element => element.offsetHeight;
1820
1821  const getjQuery = () => {
1822    const {
1823      jQuery
1824    } = window;
1825
1826    if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
1827      return jQuery;
1828    }
1829
1830    return null;
1831  };
1832
1833  const onDOMContentLoaded = callback => {
1834    if (document.readyState === 'loading') {
1835      document.addEventListener('DOMContentLoaded', callback);
1836    } else {
1837      callback();
1838    }
1839  };
1840
1841  const isRTL = () => document.documentElement.dir === 'rtl';
1842
1843  const defineJQueryPlugin = plugin => {
1844    onDOMContentLoaded(() => {
1845      const $ = getjQuery();
1846      /* istanbul ignore if */
1847
1848      if ($) {
1849        const name = plugin.NAME;
1850        const JQUERY_NO_CONFLICT = $.fn[name];
1851        $.fn[name] = plugin.jQueryInterface;
1852        $.fn[name].Constructor = plugin;
1853
1854        $.fn[name].noConflict = () => {
1855          $.fn[name] = JQUERY_NO_CONFLICT;
1856          return plugin.jQueryInterface;
1857        };
1858      }
1859    });
1860  };
1861
1862  const execute = callback => {
1863    if (typeof callback === 'function') {
1864      callback();
1865    }
1866  };
1867
1868  /**
1869   * --------------------------------------------------------------------------
1870   * Bootstrap (v5.0.1): dom/data.js
1871   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1872   * --------------------------------------------------------------------------
1873   */
1874
1875  /**
1876   * ------------------------------------------------------------------------
1877   * Constants
1878   * ------------------------------------------------------------------------
1879   */
1880  const elementMap = new Map();
1881  var Data = {
1882    set(element, key, instance) {
1883      if (!elementMap.has(element)) {
1884        elementMap.set(element, new Map());
1885      }
1886
1887      const instanceMap = elementMap.get(element); // make it clear we only want one instance per element
1888      // can be removed later when multiple key/instances are fine to be used
1889
1890      if (!instanceMap.has(key) && instanceMap.size !== 0) {
1891        // eslint-disable-next-line no-console
1892        console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
1893        return;
1894      }
1895
1896      instanceMap.set(key, instance);
1897    },
1898
1899    get(element, key) {
1900      if (elementMap.has(element)) {
1901        return elementMap.get(element).get(key) || null;
1902      }
1903
1904      return null;
1905    },
1906
1907    remove(element, key) {
1908      if (!elementMap.has(element)) {
1909        return;
1910      }
1911
1912      const instanceMap = elementMap.get(element);
1913      instanceMap.delete(key); // free up element references if there are no instances left for an element
1914
1915      if (instanceMap.size === 0) {
1916        elementMap.delete(element);
1917      }
1918    }
1919
1920  };
1921
1922  /**
1923   * --------------------------------------------------------------------------
1924   * Bootstrap (v5.0.1): dom/event-handler.js
1925   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1926   * --------------------------------------------------------------------------
1927   */
1928  /**
1929   * ------------------------------------------------------------------------
1930   * Constants
1931   * ------------------------------------------------------------------------
1932   */
1933
1934  const namespaceRegex = /[^.]*(?=\..*)\.|.*/;
1935  const stripNameRegex = /\..*/;
1936  const stripUidRegex = /::\d+$/;
1937  const eventRegistry = {}; // Events storage
1938
1939  let uidEvent = 1;
1940  const customEvents = {
1941    mouseenter: 'mouseover',
1942    mouseleave: 'mouseout'
1943  };
1944  const customEventsRegex = /^(mouseenter|mouseleave)/i;
1945  const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
1946  /**
1947   * ------------------------------------------------------------------------
1948   * Private methods
1949   * ------------------------------------------------------------------------
1950   */
1951
1952  function getUidEvent(element, uid) {
1953    return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
1954  }
1955
1956  function getEvent(element) {
1957    const uid = getUidEvent(element);
1958    element.uidEvent = uid;
1959    eventRegistry[uid] = eventRegistry[uid] || {};
1960    return eventRegistry[uid];
1961  }
1962
1963  function bootstrapHandler(element, fn) {
1964    return function handler(event) {
1965      event.delegateTarget = element;
1966
1967      if (handler.oneOff) {
1968        EventHandler.off(element, event.type, fn);
1969      }
1970
1971      return fn.apply(element, [event]);
1972    };
1973  }
1974
1975  function bootstrapDelegationHandler(element, selector, fn) {
1976    return function handler(event) {
1977      const domElements = element.querySelectorAll(selector);
1978
1979      for (let {
1980        target
1981      } = event; target && target !== this; target = target.parentNode) {
1982        for (let i = domElements.length; i--;) {
1983          if (domElements[i] === target) {
1984            event.delegateTarget = target;
1985
1986            if (handler.oneOff) {
1987              // eslint-disable-next-line unicorn/consistent-destructuring
1988              EventHandler.off(element, event.type, selector, fn);
1989            }
1990
1991            return fn.apply(target, [event]);
1992          }
1993        }
1994      } // To please ESLint
1995
1996
1997      return null;
1998    };
1999  }
2000
2001  function findHandler(events, handler, delegationSelector = null) {
2002    const uidEventList = Object.keys(events);
2003
2004    for (let i = 0, len = uidEventList.length; i < len; i++) {
2005      const event = events[uidEventList[i]];
2006
2007      if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
2008        return event;
2009      }
2010    }
2011
2012    return null;
2013  }
2014
2015  function normalizeParams(originalTypeEvent, handler, delegationFn) {
2016    const delegation = typeof handler === 'string';
2017    const originalHandler = delegation ? delegationFn : handler;
2018    let typeEvent = getTypeEvent(originalTypeEvent);
2019    const isNative = nativeEvents.has(typeEvent);
2020
2021    if (!isNative) {
2022      typeEvent = originalTypeEvent;
2023    }
2024
2025    return [delegation, originalHandler, typeEvent];
2026  }
2027
2028  function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
2029    if (typeof originalTypeEvent !== 'string' || !element) {
2030      return;
2031    }
2032
2033    if (!handler) {
2034      handler = delegationFn;
2035      delegationFn = null;
2036    } // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
2037    // this prevents the handler from being dispatched the same way as mouseover or mouseout does
2038
2039
2040    if (customEventsRegex.test(originalTypeEvent)) {
2041      const wrapFn = fn => {
2042        return function (event) {
2043          if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
2044            return fn.call(this, event);
2045          }
2046        };
2047      };
2048
2049      if (delegationFn) {
2050        delegationFn = wrapFn(delegationFn);
2051      } else {
2052        handler = wrapFn(handler);
2053      }
2054    }
2055
2056    const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
2057    const events = getEvent(element);
2058    const handlers = events[typeEvent] || (events[typeEvent] = {});
2059    const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
2060
2061    if (previousFn) {
2062      previousFn.oneOff = previousFn.oneOff && oneOff;
2063      return;
2064    }
2065
2066    const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
2067    const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
2068    fn.delegationSelector = delegation ? handler : null;
2069    fn.originalHandler = originalHandler;
2070    fn.oneOff = oneOff;
2071    fn.uidEvent = uid;
2072    handlers[uid] = fn;
2073    element.addEventListener(typeEvent, fn, delegation);
2074  }
2075
2076  function removeHandler(element, events, typeEvent, handler, delegationSelector) {
2077    const fn = findHandler(events[typeEvent], handler, delegationSelector);
2078
2079    if (!fn) {
2080      return;
2081    }
2082
2083    element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
2084    delete events[typeEvent][fn.uidEvent];
2085  }
2086
2087  function removeNamespacedHandlers(element, events, typeEvent, namespace) {
2088    const storeElementEvent = events[typeEvent] || {};
2089    Object.keys(storeElementEvent).forEach(handlerKey => {
2090      if (handlerKey.includes(namespace)) {
2091        const event = storeElementEvent[handlerKey];
2092        removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
2093      }
2094    });
vendor: 4,451 bytes, lines 2095-2239
2095  }
2096
2097  function getTypeEvent(event) {
2098    // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
2099    event = event.replace(stripNameRegex, '');
2100    return customEvents[event] || event;
2101  }
2102
2103  const EventHandler = {
2104    on(element, event, handler, delegationFn) {
2105      addHandler(element, event, handler, delegationFn, false);
2106    },
2107
2108    one(element, event, handler, delegationFn) {
2109      addHandler(element, event, handler, delegationFn, true);
2110    },
2111
2112    off(element, originalTypeEvent, handler, delegationFn) {
2113      if (typeof originalTypeEvent !== 'string' || !element) {
2114        return;
2115      }
2116
2117      const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
2118      const inNamespace = typeEvent !== originalTypeEvent;
2119      const events = getEvent(element);
2120      const isNamespace = originalTypeEvent.startsWith('.');
2121
2122      if (typeof originalHandler !== 'undefined') {
2123        // Simplest case: handler is passed, remove that listener ONLY.
2124        if (!events || !events[typeEvent]) {
2125          return;
2126        }
2127
2128        removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
2129        return;
2130      }
2131
2132      if (isNamespace) {
2133        Object.keys(events).forEach(elementEvent => {
2134          removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
2135        });
2136      }
2137
2138      const storeElementEvent = events[typeEvent] || {};
2139      Object.keys(storeElementEvent).forEach(keyHandlers => {
2140        const handlerKey = keyHandlers.replace(stripUidRegex, '');
2141
2142        if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
2143          const event = storeElementEvent[keyHandlers];
2144          removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
2145        }
2146      });
2147    },
2148
2149    trigger(element, event, args) {
2150      if (typeof event !== 'string' || !element) {
2151        return null;
2152      }
2153
2154      const $ = getjQuery();
2155      const typeEvent = getTypeEvent(event);
2156      const inNamespace = event !== typeEvent;
2157      const isNative = nativeEvents.has(typeEvent);
2158      let jQueryEvent;
2159      let bubbles = true;
2160      let nativeDispatch = true;
2161      let defaultPrevented = false;
2162      let evt = null;
2163
2164      if (inNamespace && $) {
2165        jQueryEvent = $.Event(event, args);
2166        $(element).trigger(jQueryEvent);
2167        bubbles = !jQueryEvent.isPropagationStopped();
2168        nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
2169        defaultPrevented = jQueryEvent.isDefaultPrevented();
2170      }
2171
2172      if (isNative) {
2173        evt = document.createEvent('HTMLEvents');
2174        evt.initEvent(typeEvent, bubbles, true);
2175      } else {
2176        evt = new CustomEvent(event, {
2177          bubbles,
2178          cancelable: true
2179        });
2180      } // merge custom information in our event
2181
2182
2183      if (typeof args !== 'undefined') {
2184        Object.keys(args).forEach(key => {
2185          Object.defineProperty(evt, key, {
2186            get() {
2187              return args[key];
2188            }
2189
2190          });
2191        });
2192      }
2193
2194      if (defaultPrevented) {
2195        evt.preventDefault();
2196      }
2197
2198      if (nativeDispatch) {
2199        element.dispatchEvent(evt);
2200      }
2201
2202      if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
2203        jQueryEvent.preventDefault();
2204      }
2205
2206      return evt;
2207    }
2208
2209  };
2210
2211  /**
2212   * --------------------------------------------------------------------------
2213   * Bootstrap (v5.0.1): base-component.js
2214   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2215   * --------------------------------------------------------------------------
2216   */
2217  /**
2218   * ------------------------------------------------------------------------
2219   * Constants
2220   * ------------------------------------------------------------------------
2221   */
2222
2223  const VERSION = '5.0.1';
2224
2225  class BaseComponent {
2226    constructor(element) {
2227      element = getElement(element);
2228
2229      if (!element) {
2230        return;
2231      }
2232
2233      this._element = element;
2234      Data.set(this._element, this.constructor.DATA_KEY, this);
2235    }
2236
2237    dispose() {
2238      Data.remove(this._element, this.constructor.DATA_KEY);
2239      EventHandler.off(this._element, this.constructor.EVENT_KEY);
2240      Object.getOwnPropertyNames(this).forEach(propertyName => {
2241        this[propertyName] = null;
2242      });
2243    }
2244
2245    _queueCallback(callback, element, isAnimated = true) {
2246      if (!isAnimated) {
2247        execute(callback);
2248        return;
2249      }
2250
2251      const transitionDuration = getTransitionDurationFromElement(element);
2252      EventHandler.one(element, 'transitionend', () => execute(callback));
2253      emulateTransitionEnd(element, transitionDuration);
2254    }
2255    /** Static */
2256
2257
2258    static getInstance(element) {
2259      return Data.get(element, this.DATA_KEY);
2260    }
2261
2262    static get VERSION() {
2263      return VERSION;
2264    }
2265
2266    static get NAME() {
2267      throw new Error('You have to implement the static method "NAME", for each component!');
2268    }
2269
2270    static get DATA_KEY() {
2271      return `bs.${this.NAME}`;
2272    }
2273
2274    static get EVENT_KEY() {
2275      return `.${this.DATA_KEY}`;
2276    }
2277
2278  }
2279
2280  /**
2281   * --------------------------------------------------------------------------
2282   * Bootstrap (v5.0.1): alert.js
2283   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2284   * --------------------------------------------------------------------------
2285   */
2286  /**
2287   * ------------------------------------------------------------------------
2288   * Constants
2289   * ------------------------------------------------------------------------
2290   */
2291
2292  const NAME$c = 'alert';
2293  const DATA_KEY$b = 'bs.alert';
2294  const EVENT_KEY$b = `.${DATA_KEY$b}`;
2295  const DATA_API_KEY$8 = '.data-api';
2296  const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
2297  const EVENT_CLOSE = `close${EVENT_KEY$b}`;
2298  const EVENT_CLOSED = `closed${EVENT_KEY$b}`;
2299  const EVENT_CLICK_DATA_API$7 = `click${EVENT_KEY$b}${DATA_API_KEY$8}`;
2300  const CLASS_NAME_ALERT = 'alert';
2301  const CLASS_NAME_FADE$6 = 'fade';
2302  const CLASS_NAME_SHOW$9 = 'show';
2303  /**
2304   * ------------------------------------------------------------------------
2305   * Class Definition
2306   * ------------------------------------------------------------------------
2307   */
2308
2309  class Alert extends BaseComponent {
2310    // Getters
2311    static get NAME() {
2312      return NAME$c;
2313    } // Public
2314
2315
2316    close(element) {
2317      const rootElement = element ? this._getRootElement(element) : this._element;
2318
2319      const customEvent = this._triggerCloseEvent(rootElement);
2320
2321      if (customEvent === null || customEvent.defaultPrevented) {
2322        return;
2323      }
2324
2325      this._removeElement(rootElement);
2326    } // Private
2327
2328
2329    _getRootElement(element) {
2330      return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`);
2331    }
2332
2333    _triggerCloseEvent(element) {
2334      return EventHandler.trigger(element, EVENT_CLOSE);
2335    }
2336
2337    _removeElement(element) {
2338      element.classList.remove(CLASS_NAME_SHOW$9);
2339      const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);
2340
2341      this._queueCallback(() => this._destroyElement(element), element, isAnimated);
2342    }
2343
2344    _destroyElement(element) {
2345      if (element.parentNode) {
2346        element.parentNode.removeChild(element);
2347      }
2348
2349      EventHandler.trigger(element, EVENT_CLOSED);
2350    } // Static
2351
2352
2353    static jQueryInterface(config) {
2354      return this.each(function () {
2355        let data = Data.get(this, DATA_KEY$b);
2356
2357        if (!data) {
2358          data = new Alert(this);
2359        }
2360
2361        if (config === 'close') {
2362          data[config](this);
2363        }
2364      });
2365    }
2366
2367    static handleDismiss(alertInstance) {
2368      return function (event) {
2369        if (event) {
2370          event.preventDefault();
2371        }
2372
2373        alertInstance.close(this);
2374      };
2375    }
2376
2377  }
2378  /**
2379   * ------------------------------------------------------------------------
2380   * Data Api implementation
2381   * ------------------------------------------------------------------------
2382   */
2383
2384
2385  EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
2386  /**
2387   * ------------------------------------------------------------------------
2388   * jQuery
2389   * ------------------------------------------------------------------------
2390   * add .Alert to jQuery only if jQuery is present
2391   */
2392
2393  defineJQueryPlugin(Alert);
2394
2395  /**
2396   * --------------------------------------------------------------------------
2397   * Bootstrap (v5.0.1): button.js
2398   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2399   * --------------------------------------------------------------------------
2400   */
2401  /**
2402   * ------------------------------------------------------------------------
2403   * Constants
2404   * ------------------------------------------------------------------------
2405   */
2406
2407  const NAME$b = 'button';
2408  const DATA_KEY$a = 'bs.button';
2409  const EVENT_KEY$a = `.${DATA_KEY$a}`;
2410  const DATA_API_KEY$7 = '.data-api';
2411  const CLASS_NAME_ACTIVE$3 = 'active';
2412  const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
2413  const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`;
2414  /**
2415   * ------------------------------------------------------------------------
2416   * Class Definition
2417   * ------------------------------------------------------------------------
2418   */
2419
2420  class Button extends BaseComponent {
2421    // Getters
2422    static get NAME() {
2423      return NAME$b;
2424    } // Public
2425
2426
2427    toggle() {
2428      // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle(
2428)` method
2429      this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));
2430    } // Static
2431
2432
2433    static jQueryInterface(config) {
2434      return this.each(function () {
2435        let data = Data.get(this, DATA_KEY$a);
2436
2437        if (!data) {
2438          data = new Button(this);
2439        }
2440
2441        if (config === 'toggle') {
2442          data[config]();
2443        }
2444      });
2445    }
2446
2447  }
2448  /**
2449   * ------------------------------------------------------------------------
2450   * Data Api implementation
2451   * ------------------------------------------------------------------------
2452   */
2453
2454
2455  EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {
2456    event.preventDefault();
2457    const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);
2458    let data = Data.get(button, DATA_KEY$a);
2459
2460    if (!data) {
2461      data = new Button(button);
2462    }
2463
2464    data.toggle();
2465  });
2466  /**
2467   * ------------------------------------------------------------------------
2468   * jQuery
2469   * ------------------------------------------------------------------------
2470   * add .Button to jQuery only if jQuery is present
2471   */
2472
2473  defineJQueryPlugin(Button);
2474
2475  /**
2476   * --------------------------------------------------------------------------
2477   * Bootstrap (v5.0.1): dom/manipulator.js
2478   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2479   * --------------------------------------------------------------------------
2480   */
2481  function normalizeData(val) {
2482    if (val === 'true') {
2483      return true;
2484    }
2485
2486    if (val === 'false') {
2487      return false;
2488    }
2489
2490    if (val === Number(val).toString()) {
2491      return Number(val);
2492    }
2493
2494    if (val === '' || val === 'null') {
2495      return null;
2496    }
2497
2498    return val;
2499  }
2500
2501  function normalizeDataKey(key) {
2502    return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
2503  }
2504
2505  const Manipulator = {
2506    setDataAttribute(element, key, value) {
2507      element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
2508    },
2509
2510    removeDataAttribute(element, key) {
2511      element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
2512    },
2513
2514    getDataAttributes(element) {
2515      if (!element) {
2516        return {};
2517      }
2518
2519      const attributes = {};
2520      Object.keys(element.dataset).filter(key => key.startsWith('bs')).forEach(key => {
2521        let pureKey = key.replace(/^bs/, '');
2522        pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
2523        attributes[pureKey] = normalizeData(element.dataset[key]);
2524      });
2525      return attributes;
2526    },
2527
2528    getDataAttribute(element, key) {
2529      return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
2530    },
2531
2532    offset(element) {
2533      const rect = element.getBoundingClientRect();
2534      return {
2535        top: rect.top + document.body.scrollTop,
2536        left: rect.left + document.body.scrollLeft
2537      };
2538    },
2539
2540    position(element) {
2541      return {
2542        top: element.offsetTop,
2543        left: element.offsetLeft
2544      };
2545    }
2546
2547  };
2548
2549  /**
2550   * --------------------------------------------------------------------------
2551   * Bootstrap (v5.0.1): carousel.js
2552   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2553   * --------------------------------------------------------------------------
2554   */
2555  /**
2556   * ------------------------------------------------------------------------
2557   * Constants
2558   * ------------------------------------------------------------------------
2559   */
2560
2561  const NAME$a = 'carousel';
2562  const DATA_KEY$9 = 'bs.carousel';
2563  const EVENT_KEY$9 = `.${DATA_KEY$9}`;
2564  const DATA_API_KEY$6 = '.data-api';
2565  const ARROW_LEFT_KEY = 'ArrowLeft';
2566  const ARROW_RIGHT_KEY = 'ArrowRight';
2567  const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
2568
2569  const SWIPE_THRESHOLD = 40;
2570  const Default$9 = {
2571    interval: 5000,
2572    keyboard: true,
2573    slide: false,
2574    pause: 'hover',
2575    wrap: true,
2576    touch: true
2577  };
2578  const DefaultType$9 = {
2579    interval: '(number|boolean)',
2580    keyboard: 'boolean',
2581    slide: '(boolean|string)',
2582    pause: '(string|boolean)',
2583    wrap: 'boolean',
2584    touch: 'boolean'
2585  };
2586  const ORDER_NEXT = 'next';
2587  const ORDER_PREV = 'prev';
2588  const DIRECTION_LEFT = 'left';
2589  const DIRECTION_RIGHT = 'right';
2590  const EVENT_SLIDE = `slide${EVENT_KEY$9}`;
2591  const EVENT_SLID = `slid${EVENT_KEY$9}`;
2592  const EVENT_KEYDOWN = `keydown${EVENT_KEY$9}`;
2593  const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$9}`;
2594  const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$9}`;
2595  const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;
2596  const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;
2597  const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;
2598  const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;
2599  const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;
2600  const EVENT_DRAG_START = `dragstart${EVENT_KEY$9}`;
2601  const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$9}${DATA_API_KEY$6}`;
2602  const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$9}${DATA_API_KEY$6}`;
2603  const CLASS_NAME_CAROUSEL = 'fhws-carousel';
2604  const CLASS_NAME_ACTIVE$2 = 'active';
2605  const CLASS_NAME_SLIDE = 'slide';
2606  const CLASS_NAME_END = 'carousel-item-end';
2607  const CLASS_NAME_START = 'carousel-item-start';
2608  const CLASS_NAME_NEXT = 'carousel-item-next';
2609  const CLASS_NAME_PREV = 'carousel-item-prev';
2610  const CLASS_NAME_POINTER_EVENT = 'pointer-event';
2611  const SELECTOR_ACTIVE$1 = '.active';
2612  const SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
2613  const SELECTOR_ITEM = '.carousel-item';
2614  const SELECTOR_ITEM_IMG = '.carousel-item img';
2615  const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
2616  const SELECTOR_INDICATORS = '.carousel-indicators';
2617  const SELECTOR_INDICATOR = '[data-bs-target]';
2618  const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
2619  const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
2620  const POINTER_TYPE_TOUCH = 'touch';
2621  const POINTER_TYPE_PEN = 'pen';
2622  /**
2623   * ------------------------------------------------------------------------
2624   * Class Definition
2625   * ------------------------------------------------------------------------
2626   */
2627
2628  class Carousel extends BaseComponent {
2629    constructor(element, config) {
2630      super(element);
2631      this._items = null;
2632      this._interval = null;
2633      this._activeElement = null;
2634      this._isPaused = false;
2635      this._isSliding = false;
2636      this.touchTimeout = null;
2637      this.touchStartX = 0;
2638      this.touchDeltaX = 0;
2639      this._config = this._getConfig(config);
2640      this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
2641      this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
2642      this._pointerEvent = Boolean(window.PointerEvent);
2643
2644      this._addEventListeners();
2645    } // Getters
2646
2647
2648    static get Default() {
2649      return Default$9;
2650    }
2651
2652    static get NAME() {
2653      return NAME$a;
2654    } // Public
2655
2656
2657    next() {
2658      if (!this._isSliding) {
2659        this._slide(ORDER_NEXT);
2660      }
2661    }
2662
2663    nextWhenVisible() {
2664      // Don't call next when the page isn't visible
2665      // or the carousel or its parent isn't visible
2666      if (!document.hidden && isVisible(this._element)) {
2667        this.next();
2668      }
2669    }
2670
2671    prev() {
2672      if (!this._isSliding) {
2673        this._slide(ORDER_PREV);
2674      }
2675    }
2676
2677    pause(event) {
2678      if (!event) {
2679        this._isPaused = true;
2680      }
2681
2682      if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
2683        triggerTransitionEnd(this._element);
2684        this.cycle(true);
2685      }
2686
2687      clearInterval(this._interval);
2688      this._interval = null;
2689    }
2690
2691    cycle(event) {
2692      if (!event) {
2693        this._isPaused = false;
2694      }
2695
2696      if (this._interval) {
2697        clearInterval(this._interval);
2698        this._interval = null;
2699      }
2700
2701      if (this._config && this._config.interval && !this._isPaused) {
2702        this._updateInterval();
2703
2704        this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
2705      }
2706    }
2707
2708    to(index) {
2709      this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
2710
2711      const activeIndex = this._getItemIndex(this._activeElement);
2712
2713      if (index > this._items.length - 1 || index < 0) {
2714        return;
2715      }
2716
2717      if (this._isSliding) {
2718        EventHandler.one(this._element, EVENT_SLID, () => this.to(index));
2719        return;
2720      }
2721
2722      if (activeIndex === index) {
2723        this.pause();
2724        this.cycle();
2725        return;
2726      }
2727
2728      const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
2729
2730      this._slide(order, this._items[index]);
2731    } // Private
2732
2733
2734    _getConfig(config) {
2735      config = { ...Default$9,
2736        ...config
2737      };
2738      typeCheckConfig(NAME$a, config, DefaultType$9);
2739      return config;
2740    }
2741
2742    _handleSwipe() {
2743      const absDeltax = Math.abs(this.touchDeltaX);
2744
2745      if (absDeltax <= SWIPE_THRESHOLD) {
2746        return;
2747      }
2748
2749      const direction = absDeltax / this.touchDeltaX;
2750      this.touchDeltaX = 0;
2751
2752      if (!direction) {
2753        return;
2754      }
2755
2756      this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT);
2757    }
2758
2759    _addEventListeners() {
2760      if (this._config.keyboard) {
2761        EventHandler.on(this._element, EVENT_KEYDOWN, event =>
2761 this._keydown(event));
2762      }
2763
2764      if (this._config.pause === 'hover') {
2765        EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event));
2766        EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));
2767      }
2768
2769      if (this._config.touch && this._touchSupported) {
2770        this._addTouchEventListeners();
2771      }
2772    }
2773
2774    _addTouchEventListeners() {
2775      const start = event => {
2776        if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
2777          this.touchStartX = event.clientX;
2778        } else if (!this._pointerEvent) {
2779          this.touchStartX = event.touches[0].clientX;
2780        }
2781      };
2782
2783      const move = event => {
2784        // ensure swiping with one touch and not pinching
2785        this.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this.touchStartX;
2786      };
2787
2788      const end = event => {
2789        if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
2790          this.touchDeltaX = event.clientX - this.touchStartX;
2791        }
2792
2793        this._handleSwipe();
2794
2795        if (this._config.pause === 'hover') {
2796          // If it's a touch-enabled device, mouseenter/leave are fired as
2797          // part of the mouse compatibility events on first tap - the carousel
2798          // would stop cycling until user tapped out of it;
2799          // here, we listen for touchend, explicitly pause the carousel
2800          // (as if it's the second time we tap on it, mouseenter compat event
2801          // is NOT fired) and after a timeout (to allow for mouse compatibility
2802          // events to fire) we explicitly restart cycling
2803          this.pause();
2804
2805          if (this.touchTimeout) {
2806            clearTimeout(this.touchTimeout);
2807          }
2808
2809          this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
2810        }
2811      };
2812
2813      SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
2814        EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault());
2815      });
2816
2817      if (this._pointerEvent) {
2818        EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event));
2819        EventHandler.on(this._element, EVENT_POINTERUP, event => end(event));
2820
2821        this._element.classList.add(CLASS_NAME_POINTER_EVENT);
2822      } else {
2823        EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event));
2824        EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event));
2825        EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event));
2826      }
2827    }
2828
2829    _keydown(event) {
2830      if (/input|textarea/i.test(event.target.tagName)) {
2831        return;
2832      }
2833
2834      if (event.key === ARROW_LEFT_KEY) {
2835        event.preventDefault();
2836
2837        this._slide(DIRECTION_RIGHT);
2838      } else if (event.key === ARROW_RIGHT_KEY) {
2839        event.preventDefault();
2840
2841        this._slide(DIRECTION_LEFT);
2842      }
2843    }
2844
2845    _getItemIndex(element) {
2846      this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];
2847      return this._items.indexOf(element);
2848    }
2849
2850    _getItemByOrder(order, activeElement) {
2851      const isNext = order === ORDER_NEXT;
2852      const isPrev = order === ORDER_PREV;
2853
2854      const activeIndex = this._getItemIndex(activeElement);
2855
2856      const lastItemIndex = this._items.length - 1;
2857      const isGoingToWrap = isPrev && activeIndex === 0 || isNext && activeIndex === lastItemIndex;
2858
2859      if (isGoingToWrap && !this._config.wrap) {
2860        return activeElement;
2861      }
2862
2863      const delta = isPrev ? -1 : 1;
2864      const itemIndex = (activeIndex + delta) % this._items.length;
2865      return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
2866    }
2867
2868    _triggerSlideEvent(relatedTarget, eventDirectionName) {
2869      const targetIndex = this._getItemIndex(relatedTarget);
2870
2871      const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));
2872
2873      return EventHandler.trigger(this._element, EVENT_SLIDE, {
2874        relatedTarget,
2875        direction: eventDirectionName,
2876        from: fromIndex,
2877        to: targetIndex
2878      });
2879    }
2880
2881    _setActiveIndicatorElement(element) {
2882      if (this._indicatorsElement) {
2883        const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE$1, this._indicatorsElement);
2884        activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);
2885        activeIndicator.removeAttribute('aria-current');
2886        const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement);
2887
2888        for (let i = 0; i < indicators.length; i++) {
2889          if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {
2890            indicators[i].classList.add(CLASS_NAME_ACTIVE$2);
2891            indicators[i].setAttribute('aria-current', 'true');
2892            break;
2893          }
2894        }
2895      }
2896    }
2897
2898    _updateInterval() {
2899      const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
2900
2901      if (!element) {
2902        return;
2903      }
2904
2905      const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
2906
2907      if (elementInterval) {
2908        this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
2909        this._config.interval = elementInterval;
2910      } else {
2911        this._config.interval = this._config.defaultInterval || this._config.interval;
2912      }
2913    }
2914
2915    _slide(directionOrOrder, element) {
2916      const order = this._directionToOrder(directionOrOrder);
2917
2918      const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
2919
2920      const activeElementIndex = this._getItemIndex(activeElement);
2921
2922      const nextElement = element || this._getItemByOrder(order, activeElement);
2923
2924      const nextElementIndex = this._getItemIndex(nextElement);
2925
2926      const isCycling = Boolean(this._interval);
2927      const isNext = order === ORDER_NEXT;
2928      const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
2929      const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
2930
2931      const eventDirectionName = this._orderToDirection(order);
2932
2933      if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$2)) {
2934        this._isSliding = false;
2935        return;
2936      }
2937
2938      const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
2939
2940      if (slideEvent.defaultPrevented) {
2941        return;
2942      }
2943
2944      if (!activeElement || !nextElement) {
2945        // Some weirdness is happening, so we bail
2946        return;
2947      }
2948
2949      this._isSliding = true;
2950
2951      if (isCycling) {
2952        this.pause();
2953      }
2954
2955      this._setActiveIndicatorElement(nextElement);
2956
2957      this._activeElement = nextElement;
2958
2959      const triggerSlidEvent = () => {
2960        EventHandler.trigger(this._element, EVENT_SLID, {
2961          relatedTarget: nextElement,
2962          direction: eventDirectionName,
2963          from: activeElementIndex,
2964          to: nextElementIndex
2965        });
2966      };
2967
2968      if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
2969        nextElement.classList.add(orderClassName);
2970        reflow(nextElement);
2971        activeElement.classList.add(directionalClassName);
2972        nextElement.classList.add(directionalClassName);
2973
2974        const completeCallBack = () => {
2975          nextElement.classList.remove(directionalClassName, orderClassName);
2976          nextElement.classList.add(CLASS_NAME_ACTIVE$2);
2977          activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
2978          this._isSliding = false;
2979          setTimeout(triggerSlidEvent, 0);
2980        };
2981
2982        this._queueCallback(completeCallBack, activeElement, true);
2983      } else {
2984        activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
2985        nextElement.classList.add(CLASS_NAME_ACTIVE$2);
2986        this._isSliding = false;
2987        triggerSlidEvent();
2988      }
2989
2990      if (isCycling) {
2991        this.cycle();
2992      }
2993    }
2994
2995    _directionToOrder(direction) {
2996      if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {
2997        return direction;
2998      }
2999
3000      if (isRTL()) {
3001        return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
3002      }
3003
3004      return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
3005    }
3006
3007    _orderToDirection(order) {
3008      if (![ORDER_NEXT, ORDER_PREV].includes(order)) {
3009        return order;
3010      }
3011
3012      if (isRTL()) {
3013        return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
3014      }
3015
3016      return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
3017    } // Static
3018
3019
3020    static carouselInterface(element, config) {
3021      let data = Data.get(element, DATA_KEY$9);
3022      let _config = { ...Default$9,
3023        ...Manipulator.getDataAttributes(element)
3024      };
3025
3026      if (typeof config === 'object') {
3027        _config = { ..._config,
3028          ...config
3029        };
3030      }
3031
3032      const action = typeof config === 'string' ? config : _config.slide;
3033
3034      if (!data) {
3035        data = new Carousel(element, _config);
3036      }
3037
3038      if (typeof config === 'number') {
3039        data.to(config);
3040      } else if (typeof action === 'string') {
3041        if (typeof data[action] === 'undefined') {
3042          throw new TypeError(`No method named "${action}"`);
3043        }
3044
3045        data[action]();
3046      } else if (_config.interval && _config.ride) {
3047        data.pause();
3048        data.cycle();
3049      }
3050    }
3051
3052    static jQueryInterface(config) {
3053      return this.each(function () {
3054        Carousel.carouselInterface(this, config);
3055      });
3056    }
3057
3058    static dataApiClickHandler(event) {
3059      const target = getElementFromSelector(this);
3060
3061      if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
3062        return;
3063      }
3064
3065      const config = { ...Manipulator.getDataAttributes(target),
3066        ...Manipulator.getDataAttributes(this)
3067      };
3068      const slideIndex = this.getAttribute('data-bs-slide-to');
3069
3070      if (slideIndex) {
3071        config.interval = false;
3072      }
3073
3074      Carousel.carouselInterface(target, config);
3075
3076      if (slideIndex) {
3077        Data.get(target, DATA_KEY$9).to(slideIndex);
3078      }
3079
3080      event.preventDefault();
3081    }
3082
3083  }
3084  /**
3085   * ------------------------------------------------------------------------
3086   * Data Api implementation
3087   * ------------------------------------------------------------------------
3088   */
3089
3090
3091  EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
3092  EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {
3093    const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
3094
3095    for (let i = 0, len = carousels.length; i < len; i++) {
3096      Carousel.carouselInterface(carousels[i], Data.get(carousels[i], DATA_KEY$9));
3097    }
3098  });
3099  /**
3100   * ------------------------------------------------------------------------
3101   * jQuery
3102   * ------------------------------------------------------------------------
3103   * add .Carousel to jQuery only if jQuery is present
3104   */
3105
3106  defineJQueryPlugin(Carousel);
3107
3108  /**
3109   * --------------------------------------------------------------------------
3110   * Bootstrap (v5.0.1): collapse.js
3111   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3112   * --------------------------------------------------------------------------
3113   */
3114  /**
3115   * ------------------------------------------------------------------------
3116   * Constants
3117   * ------------------------------------------------------------------------
3118   */
3119
3120  const NAME$9 = 'collapse';
3121  const DATA_KEY$8 = 'bs.collapse';
3122  const EVENT_KEY$8 = `.${DATA_KEY$8}`;
3123  const DATA_API_KEY$5 = '.data-api';
3124  const Default$8 = {
3125    toggle: true,
3126    parent: ''
3127  };
3128  const DefaultType$8 = {
3129    toggle: 'boolean',
3130    parent: '(string|element)'
3131  };
3132  const EVENT_SHOW$5 = `show${EVENT_KEY$8}`;
3133  const EVENT_SHOWN$5 = `shown${EVENT_KEY$8}`;
3134  const EVENT_HIDE$5 = `hide${EVENT_KEY$8}`;
3135  const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$8}`;
3136  const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;
3137  const CLASS_NAME_SHOW$8 = 'show';
3138  const CLASS_NAME_COLLAPSE = 'collapse';
3139  const CLASS_NAME_COLLAPSING = 'collapsing';
3140  const CLASS_NAME_COLLAPSED = 'collapsed';
3141  const WIDTH = 'width';
3142  const HEIGHT = 'height';
3143  const SELECTOR_ACTIVES = '.show, .collapsing';
3144  const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
3145  /**
3146   * ------------------------------------------------------------------------
3147   * Class Definition
3148   * ------------------------------------------------------------------------
3149   */
3150
3151  class Collapse extends BaseComponent {
3152    constructor(element, config) {
3153      super(element);
3154      this._isTransitioning = false;
3155      this._config = this._getConfig(config);
3156      this._triggerArray = SelectorEngine.find(`${SELECTOR_DATA_TOGGLE$4}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE$4}[data-bs-target="#${this._element.id}"]`);
3157      const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
3158
3159      for (let i = 0, len = toggleList.length; i < len; i++) {
3160        const elem = toggleList[i];
3161        const selector = getSelectorFromElement(elem);
3162        const filterElement = SelectorEngine.find(selector).filter(foundElem => foundElem === this._element);
3163
3164        if (selector !== null && filterElement.length) {
3165          this._selector = selector;
3166
3167          this._triggerArray.push(elem);
3168        }
3169      }
3170
3171      this._parent = this._config.parent ? this._getParent() : null;
3172
3173      if (!this._config.parent) {
3174        this._addAriaAndCollapsedClass(this._element, this._triggerArray);
3175      }
3176
3177      if (this._config.toggle) {
3178        this.toggle();
3179      }
3180    } // Getters
3181
3182
3183    static get Default() {
3184      return Default$8;
3185    }
3186
3187    static get NAME() {
3188      return NAME$9;
3189    } // Public
3190
3191
3192    toggle() {
3193      if (this._element.classList.contains(CLASS_NAME_SHOW$8)) {
3194        this.hide();
3195      } else {
3196        this.show();
3197      }
3198    }
3199
3200    show() {
3201      if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$8)) {
3202        return;
3203      }
3204
3205      let actives;
3206      let activesData;
3207
3208      if (this._parent) {
3209        actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(elem => {
3210          if (typeof this._config.parent === 'string') {
3211            return elem.getAttribute('data-bs-parent') === this._config.parent;
3212          }
3213
3214          return elem.classList.contains(CLASS_NAME_COLLAPSE);
3215        });
3216
3217        if (actives.length === 0) {
3218          actives = null;
3219        }
3220      }
3221
3222      const container = SelectorEngine.findOne(this._selector);
3223
3224      if (actives) {
3225        const tempActiveData = actives.find(elem => container !== elem);
3226        activesData = tempActiveData ? Data.get(tempActiveData, DATA_KEY$8) : null;
3227
3228        if (activesData && activesData._isTransitioning) {
3229          return;
3230        }
3231      }
3232
3233      const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$5);
3234
3235      if (startEvent.defaultPrevented) {
3236        return;
3237      }
3238
3239      if (actives) {
3240        actives.forEach(elemActive => {
3241          if (container !== elemActive) {
3242            Collapse.collapseInterface(elemActive, 'hide');
3243          }
3244
3245          if (!activesData) {
3246            Data.set(elemActive, DATA_KEY$8, null);
3247          }
3248        });
3249      }
3250
3251      const dimension = this._getDimension();
3252
3253      this._element.classList.remove(CLASS_NAME_COLLAPSE);
3254
3255      this._element.classList.add(CLASS_NAME_COLLAPSING);
3256
3257      this._element.style[dimension] = 0;
3258
3259      if (this._triggerArray.length) {
3260        this._triggerArray.forEach(element => {
3261          element.classList.remove(CLASS_NAME_COLLAPSED);
3262          element.setAttribute('aria-expanded', true);
3263        });
3264      }
3265
3266      this.setTransitioning(true);
3267
3268      const complete = () => {
3269        this._element.classList.remove(CLASS_NAME_COLLAPSING);
3270
3271        this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
3272
3273        this._element.style[dimension] = '';
3274        this.setTransitioning(false);
3275        EventHandler.trigger(this._element, EVENT_SHOWN$5);
3276      };
3277
3278      const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
3279      const scrollSize = `scroll${capitalizedDimension}`;
3280
3281      this._queueCallback(complete, this._element, true);
3282
3283      this._element.style[dimension] = `${this._element[scrollSize]}px`;
3284    }
3285
3286    hide() {
3287      if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$8)) {
3288        return;
3289      }
3290
3291      const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$5);
3292
3293      if (startEvent.defaultPrevented) {
3294        return;
3295      }
3296
3297      const dimension = this._getDimension();
3298
3299      this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
3300      reflow(this._element);
3301
3302      this._element.classList.add(CLASS_NAME_COLLAPSING);
3303
3304      this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
3305
3306      const triggerArrayLength = this._triggerArray.length;
3307
3308      if (triggerArrayLength > 0) {
3309        for (let i = 0; i < triggerArrayLength; i++) {
3310          const trigger = this._triggerArray[i];
3311          const elem = getElementFromSelector(trigger);
3312
3313          if (elem && !elem.classList.contains(CLASS_NAME_SHOW$8)) {
3314            trigger.classList.add(CLASS_NAME_COLLAPSED);
3315            trigger.setAttribute('aria-expanded', false);
3316          }
3317        }
3318      }
3319
3320      this.setTransitioning(true);
3321
3322      const complete = () => {
3323        this.setTransitioning(false);
3324
3325        this._element.classList.remove(CLASS_NAME_COLLAPSING);
3326
3327        this._element.classList.add(CLASS_NAME_COLLAPSE);
3328
3329        EventHandler.trigger(this._element, EVENT_HIDDEN$5);
3330      };
3331
3332      this._element.style[dimension] = '';
3333
3334      this._queueCallback(complete, this._element, true);
3335    }
3336
3337    setTransitioning(isTransitioning) {
3338      this._isTransitioning = isTransitioning;
3339    } // Private
3340
3341
3342    _getConfig(config) {
3343      config = { ...Default$8,
3344        ...config
3345      };
3346      config.toggle = Boolean(config.toggle); // Coerce string values
3347
3348      typeCheckConfig(NAME$9, config, DefaultType$8);
3349      return config;
3350    }
3351
3352    _getDimension() {
3353      return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
3354    }
3355
3356    _getParent() {
3357      let {
3358        parent
3359      } = this._config;
3360      parent = getElement(parent);
3361      const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`;
3362      SelectorEngine.find(selector, parent).forEach(element => {
3363        const selected = getElementFromSelector(element);
3364
3365        this._addAriaAndCollapsedClass(selected, [element]);
3366      });
3367      return parent;
3368    }
3369
3370    _addAriaAndCollapsedClass(element, triggerArray) {
3371      if (!element || !triggerArray.length) {
3372        return;
3373      }
3374
3375      const isOpen = element.classList.contains(CLASS_NAME_SHOW$8);
3376      triggerArray.forEach(elem => {
3377        if (isOpen) {
3378          elem.classList.remove(CLASS_NAME_COLLAPSED);
3379        } else {
3380          elem.classList.add(CLASS_NAME_COLLAPSED);
3381        }
3382
3383        elem.setAttribute('aria-expanded', isOpen);
3384      });
3385    } // Static
3386
3387
3388    static collapseInterface(element, config) {
3389      let data = Data.get(element, DATA_KEY$8);
3390      const _config = { ...Default$8,
3391        ...Manipulator.getDataAttributes(element),
3392        ...(typeof config === 'object' && config ? config : {})
3393      };
3394
3395      if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
3396        _config.toggle = false;
3397      }
3398
3399      if (!data) {
3400        data = new Collapse(element, _config);
3401      }
3402
3403      if (typeof config === 'string') {
3404        if (typeof data[config] === 'undefined') {
3405          throw new TypeError(`No method named "${config}"`);
3406        }
3407
3408        data[config]();
3409      }
3410    }
3411
3412    static jQueryInterface(config) {
3413      return this.each(function () {
3414        Collapse.collapseInterface(this, config);
3415      });
3416    }
3417
3418  }
3419  /**
3420   * ------------------------------------------------------------------------
3421   * Data Api implementation
3422   * ------------------------------------------------------------------------
3423   */
3424
3425
3426  EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {
3427    // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
3428    if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
3429      event.preventDefault();
3430    }
3431
3432    const triggerData = Manipulator.getDataAttributes(this);
3433    const selector = getSelectorFromElement(this);
3434    const selectorElements = SelectorEngine.find(selector);
3435    selectorElements.forEach(element => {
3436      const data = Data.get(element, DATA_KEY$8);
3437      let config;
3438
3439      if (data) {
3440        // update parent attribute
3441        if (data._parent === null && typeof triggerData.parent === 'string') {
3442          data._config.parent = triggerData.parent;
3443          data._parent = data._getParent();
3444        }
3445
3446        config = 'toggle';
3447      } else {
3448        config = triggerData;
3449      }
3450
3451      Collapse.collapseInterface(element, config);
3452    });
3453  });
3454  /**
3455   * ------------------------------------------------------------------------
3456   * jQuery
3457   * ------------------------------------------------------------------------
3458   * add .Collapse to jQuery only if jQuery is present
3459   */
3460
3461  defineJQueryPlugin(Collapse);
3462
3463  /**
3464   * --------------------------------------------------------------------------
3465   * Bootstrap (v5.0.1): dropdown.js
3466   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3467   * --------------------------------------------------------------------------
3468   */
3469  /**
3470   * ------------------------------------------------------------------------
3471   * Constants
3472   * ------------------------------------------------------------------------
3473   */
3474
3475  const NAME$8 = 'dropdown';
3476  const DATA_KEY$7 = 'bs.dropdown';
3477  const EVENT_KEY$7 = `.${DATA_KEY$7}`;
3478  const DATA_API_KEY$4 = '.data-api';
3479  const ESCAPE_KEY$2 = 'Escape';
3480  const SPACE_KEY = 'Space';
3481  const TAB_KEY = 'Tab';
3482  const ARROW_UP_KEY = 'ArrowUp';
3483  const ARROW_DOWN_KEY = 'ArrowDown';
3484  const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
3485
3486  const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);
3487  const EVENT_HIDE$4 = `hide${EVENT_KEY$7}`;
3488  const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$7}`;
3489  const EVENT_SHOW$4 = `show${EVENT_KEY$7}`;
3490  const EVENT_SHOWN$4 = `shown${EVENT_KEY$7}`;
3491  const EVENT_CLICK = `click${EVENT_KEY$7}`;
3492  const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;
3493  const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$7}${DATA_API_KEY$4}`;
3494  const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$7}${DATA_API_KEY$4}`;
3495  const CLASS_NAME_SHOW$7 = 'show';
3496  const CLASS_NAME_DROPUP = 'dropup';
3497  const CLASS_NAME_DROPEND = 'dropend';
3498  const CLASS_NAME_DROPSTART = 'dropstart';
3499  const CLASS_NAME_NAVBAR = 'navbar';
3500  const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]';
3501  const SELECTOR_MENU = '.dropdown-menu';
3502  const SELECTOR_NAVBAR_NAV = '.navbar-nav';
3503  const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
3504  const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';
3505  const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';
3506  const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
3507  const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
3508  const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
3509  const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
3510  const Default$7 = {
3511    offset: [0, 2],
3512    boundary: 'clippingParents',
3513    reference: 'toggle',
3514    display: 'dynamic',
3515    popperConfig: null,
3516    autoClose: true
3517  };
3518  const DefaultType$7 = {
3519    offset: '(array|string|function)',
3520    boundary: '(string|element)',
3521    reference: '(string|element|object)',
3522    display: 'string',
3523    popperConfig: '(null|object|function)',
3524    autoClose: '(boolean|string)'
3525  };
3526  /**
3527   * ------------------------------------------------------------------------
3528   * Class Definition
3529   * ------------------------------------------------------------------------
3530   */
3531
3532  class Dropdown extends BaseComponent {
3533    constructor(element, config) {
3534      super(element);
3535      this._popper = null;
3536      this._config = this._getConfig(config);
3537      this._menu = this._getMenuElement();
3538      this._inNavbar = this._detectNavbar();
3539
3540      this._addEventListeners();
3541    } // Getters
3542
3543
3544    static get Default() {
3545      return Default$7;
3546    }
3547
3548    static get DefaultType() {
3549      return DefaultType$7;
3550    }
3551
3552    static get NAME() {
3553      return NAME$8;
3554    } // Public
3555
3556
3557    toggle() {
3558      if (isDisabled(this._element)) {
3559        return;
3560      }
3561
3562      const isActive = this._element.classList.contains(CLASS_NAME_SHOW$7);
3563
3564      if (isActive) {
3565        this.hide();
3566        return;
3567      }
3568
3569      this.show();
3570    }
3571
3572    show() {
3573      if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
3574        return;
3575      }
3576
3577      const parent = Dropdown.getParentFromElement(this._element);
3578      const relatedTarget = {
3579        relatedTarget: this._element
3580      };
3581      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget);
3582
3583      if (showEvent.defaultPrevented) {
3584        return;
3585      } // Totally disable Popper for Dropdowns in Navbar
3586
3587
3588      if (this._inNavbar) {
3589        Manipulator.setDataAttribute(this._menu, 'popper', 'none');
3590      } else {
3591        if (typeof Popper__namespace === 'undefined') {
3592          throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
3593        }
3594
3595        let referenceElement = this._element;
3596
3597        if (this._config.reference === 'parent') {
3598          referenceElement = parent;
3599        } else if (isElement(this._config.reference)) {
3600          referenceElement = getElement(this._config.reference);
3601        } else if (typeof this._config.reference === 'object') {
3602          referenceElement = this._config.reference;
3603        }
3604
3605        const popperConfig = this._getPopperConfig();
3606
3607        const isDisplayStatic = popperConfig.modifiers.find(modifier =>
3607 modifier.name === 'applyStyles' && modifier.enabled === false);
3608        this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
3609
3610        if (isDisplayStatic) {
3611          Manipulator.setDataAttribute(this._menu, 'popper', 'static');
3612        }
3613      } // If this is a touch-enabled device we add extra
3614      // empty mouseover listeners to the body's immediate children;
3615      // only needed because of broken event delegation on iOS
3616      // http://dev.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
3617
3618
3619      if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
3620        [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', noop));
3621      }
3622
3623      this._element.focus();
3624
3625      this._element.setAttribute('aria-expanded', true);
3626
3627      this._menu.classList.toggle(CLASS_NAME_SHOW$7);
3628
3629      this._element.classList.toggle(CLASS_NAME_SHOW$7);
3630
3631      EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
3632    }
3633
3634    hide() {
3635      if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
3636        return;
3637      }
3638
3639      const relatedTarget = {
3640        relatedTarget: this._element
3641      };
3642
3643      this._completeHide(relatedTarget);
3644    }
3645
3646    dispose() {
3647      if (this._popper) {
3648        this._popper.destroy();
3649      }
3650
3651      super.dispose();
3652    }
3653
3654    update() {
3655      this._inNavbar = this._detectNavbar();
3656
3657      if (this._popper) {
3658        this._popper.update();
3659      }
3660    } // Private
3661
3662
3663    _addEventListeners() {
3664      EventHandler.on(this._element, EVENT_CLICK, event => {
3665        event.preventDefault();
3666        this.toggle();
3667      });
3668    }
3669
3670    _completeHide(relatedTarget) {
3671      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
3672
3673      if (hideEvent.defaultPrevented) {
3674        return;
3675      } // If this is a touch-enabled device we remove the extra
3676      // empty mouseover listeners we added for iOS support
3677
3678
3679      if ('ontouchstart' in document.documentElement) {
3680        [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', noop));
3681      }
3682
3683      if (this._popper) {
3684        this._popper.destroy();
3685      }
3686
3687      this._menu.classList.remove(CLASS_NAME_SHOW$7);
3688
3689      this._element.classList.remove(CLASS_NAME_SHOW$7);
3690
3691      this._element.setAttribute('aria-expanded', 'false');
3692
3693      Manipulator.removeDataAttribute(this._menu, 'popper');
3694      EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);
3695    }
3696
3697    _getConfig(config) {
3698      config = { ...this.constructor.Default,
3699        ...Manipulator.getDataAttributes(this._element),
3700        ...config
3701      };
3702      typeCheckConfig(NAME$8, config, this.constructor.DefaultType);
3703
3704      if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
3705        // Popper virtual elements require a getBoundingClientRect method
3706        throw new TypeError(`${NAME$8.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
3707      }
3708
3709      return config;
3710    }
3711
3712    _getMenuElement() {
3713      return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
3714    }
3715
3716    _getPlacement() {
3717      const parentDropdown = this._element.parentNode;
3718
3719      if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
3720        return PLACEMENT_RIGHT;
3721      }
3722
3723      if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
3724        return PLACEMENT_LEFT;
3725      } // We need to trim the value because custom properties can also include spaces
3726
3727
3728      const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
3729
3730      if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
3731        return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
3732      }
3733
3734      return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
3735    }
3736
3737    _detectNavbar() {
3738      return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null;
3739    }
3740
3741    _getOffset() {
3742      const {
3743        offset
3744      } = this._config;
3745
3746      if (typeof offset === 'string') {
3747        return offset.split(',').map(val => Number.parseInt(val, 10));
3748      }
3749
3750      if (typeof offset === 'function') {
3751        return popperData => offset(popperData, this._element);
3752      }
3753
3754      return offset;
3755    }
3756
3757    _getPopperConfig() {
3758      const defaultBsPopperConfig = {
3759        placement: this._getPlacement(),
3760        modifiers: [{
3761          name: 'preventOverflow',
3762          options: {
3763            boundary: this._config.boundary
3764          }
3765        }, {
3766          name: 'offset',
3767          options: {
3768            offset: this._getOffset()
3769          }
3770        }]
3771      }; // Disable Popper if we have a static display
3772
3773      if (this._config.display === 'static') {
3774        defaultBsPopperConfig.modifiers = [{
3775          name: 'applyStyles',
3776          enabled: false
3777        }];
3778      }
3779
3780      return { ...defaultBsPopperConfig,
3781        ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
3782      };
3783    }
3784
3785    _selectMenuItem(event) {
3786      const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
3787
3788      if (!items.length) {
3789        return;
3790      }
3791
3792      let index = items.indexOf(event.target); // Up
3793
3794      if (event.key === ARROW_UP_KEY && index > 0) {
3795        index--;
3796      } // Down
3797
3798
3799      if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
3800        index++;
3801      } // index is -1 if the first keydown is an ArrowUp
3802
3803
3804      index = index === -1 ? 0 : index;
3805      items[index].focus();
3806    } // Static
3807
3808
3809    static dropdownInterface(element, config) {
3810      let data = Data.get(element, DATA_KEY$7);
3811
3812      const _config = typeof config === 'object' ? config : null;
3813
3814      if (!data) {
3815        data = new Dropdown(element, _config);
3816      }
3817
3818      if (typeof config === 'string') {
3819        if (typeof data[config] === 'undefined') {
3820          throw new TypeError(`No method named "${config}"`);
3821        }
3822
3823        data[config]();
3824      }
3825    }
3826
3827    static jQueryInterface(config) {
3828      return this.each(function () {
3829        Dropdown.dropdownInterface(this, config);
3830      });
3831    }
3832
3833    static clearMenus(event) {
3834      if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
3835        return;
3836      }
3837
3838      const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);
3839
3840      for (let i = 0, len = toggles.length; i < len; i++) {
3841        const context = Data.get(toggles[i], DATA_KEY$7);
3842
3843        if (!context || context._config.autoClose === false) {
3844          continue;
3845        }
3846
3847        if (!context._element.classList.contains(CLASS_NAME_SHOW$7)) {
3848          continue;
3849        }
3850
3851        const relatedTarget = {
3852          relatedTarget: context._element
3853        };
3854
3855        if (event) {
3856          const composedPath = event.composedPath();
3857          const isMenuTarget = composedPath.includes(context._menu);
3858
3859          if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
3860            continue;
3861          } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
3862
3863
3864          if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
3865            continue;
3866          }
3867
3868          if (event.type === 'click') {
3869            relatedTarget.clickEvent = event;
3870          }
3871        }
3872
3873        context._completeHide(relatedTarget);
3874      }
3875    }
3876
3877    static getParentFromElement(element) {
3878      return getElementFromSelector(element) || element.parentNode;
3879    }
3880
3881    static dataApiKeydownHandler(event) {
3882      // If not input/textarea:
3883      //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
3884      // If input/textarea:
3885      //  - If space key => not a dropdown command
3886      //  - If key is other than escape
3887      //    - If key is not up or down => not a dropdown command
3888      //    - If trigger inside the menu => not a dropdown command
3889      if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY$2 && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {
3890        return;
3891      }
3892
3893      const isActive = this.classList.contains(CLASS_NAME_SHOW$7);
3894
3895      if (!isActive && event.key === ESCAPE_KEY$2) {
3896        return;
3897      }
3898
3899      event.preventDefault();
3900      event.stopPropagation();
3901
3902      if (isDisabled(this)) {
3903        return;
3904      }
3905
3906      const getToggleButton = () =>
3906 this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
3907
3908      if (event.key === ESCAPE_KEY$2) {
3909        getToggleButton().focus();
3910        Dropdown.clearMenus();
3911        return;
3912      }
3913
3914      if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
3915        getToggleButton().click();
3916        return;
3917      }
3918
3919      if (!isActive || event.key === SPACE_KEY) {
3920        Dropdown.clearMenus();
3921        return;
3922      }
3923
3924      Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
3925    }
3926
3927  }
3928  /**
3929   * ------------------------------------------------------------------------
3930   * Data Api implementation
3931   * ------------------------------------------------------------------------
3932   */
3933
3934
3935  EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);
3936  EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
3937  EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
3938  EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
3939  EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
3940    event.preventDefault();
3941    Dropdown.dropdownInterface(this);
3942  });
3943  /**
3944   * ------------------------------------------------------------------------
3945   * jQuery
3946   * ------------------------------------------------------------------------
3947   * add .Dropdown to jQuery only if jQuery is present
3948   */
3949
3950  defineJQueryPlugin(Dropdown);
3951
3952  /**
3953   * --------------------------------------------------------------------------
3954   * Bootstrap (v5.0.1): util/scrollBar.js
3955   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3956   * --------------------------------------------------------------------------
3957   */
3958  const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
3959  const SELECTOR_STICKY_CONTENT = '.sticky-top';
3960
3961  const getWidth = () => {
3962    // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
3963    const documentWidth = document.documentElement.clientWidth;
3964    return Math.abs(window.innerWidth - documentWidth);
3965  };
3966
3967  const hide = (width = getWidth()) => {
3968    _disableOverFlow(); // give padding to element to balances the hidden scrollbar width
3969
3970
3971    _setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements, to keep shown fullwidth
3972
3973
3974    _setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
3975
3976    _setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
3977  };
3978
3979  const _disableOverFlow = () => {
3980    const actualValue = document.body.style.overflow;
3981
3982    if (actualValue) {
3983      Manipulator.setDataAttribute(document.body, 'overflow', actualValue);
3984    }
3985
3986    document.body.style.overflow = 'hidden';
3987  };
3988
3989  const _setElementAttributes = (selector, styleProp, callback) => {
3990    const scrollbarWidth = getWidth();
3991    SelectorEngine.find(selector).forEach(element => {
3992      if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {
3993        return;
3994      }
3995
3996      const actualValue = element.style[styleProp];
3997      const calculatedValue = window.getComputedStyle(element)[styleProp];
3998      Manipulator.setDataAttribute(element, styleProp, actualValue);
3999      element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
4000    });
4001  };
4002
4003  const reset = () => {
4004    _resetElementAttributes('body', 'overflow');
4005
4006    _resetElementAttributes('body', 'paddingRight');
4007
4008    _resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
4009
4010    _resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
4011  };
4012
4013  const _resetElementAttributes = (selector, styleProp) => {
4014    SelectorEngine.find(selector).forEach(element => {
4015      const value = Manipulator.getDataAttribute(element, styleProp);
4016
4017      if (typeof value === 'undefined') {
4018        element.style.removeProperty(styleProp);
4019      } else {
4020        Manipulator.removeDataAttribute(element, styleProp);
4021        element.style[styleProp] = value;
4022      }
4023    });
4024  };
4025
4026  /**
4027   * --------------------------------------------------------------------------
4028   * Bootstrap (v5.0.1): util/backdrop.js
4029   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4030   * --------------------------------------------------------------------------
4031   */
4032  const Default$6 = {
4033    isVisible: true,
4034    // if false, we use the backdrop helper without adding any element to the dom
4035    isAnimated: false,
4036    rootElement: document.body,
4037    // give the choice to place backdrop under different elements
4038    clickCallback: null
4039  };
4040  const DefaultType$6 = {
4041    isVisible: 'boolean',
4042    isAnimated: 'boolean',
4043    rootElement: 'element',
4044    clickCallback: '(function|null)'
4045  };
4046  const NAME$7 = 'backdrop';
4047  const CLASS_NAME_BACKDROP = 'modal-backdrop';
4048  const CLASS_NAME_FADE$5 = 'fade';
4049  const CLASS_NAME_SHOW$6 = 'show';
4050  const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$7}`;
4051
4052  class Backdrop {
4053    constructor(config) {
4054      this._config = this._getConfig(config);
4055      this._isAppended = false;
4056      this._element = null;
4057    }
4058
4059    show(callback) {
4060      if (!this._config.isVisible) {
4061        execute(callback);
4062        return;
4063      }
4064
4065      this._append();
4066
4067      if (this._config.isAnimated) {
4068        reflow(this._getElement());
4069      }
4070
4071      this._getElement().classList.add(CLASS_NAME_SHOW$6);
4072
4073      this._emulateAnimation(() => {
4074        execute(callback);
4075      });
4076    }
4077
4078    hide(callback) {
4079      if (!this._config.isVisible) {
4080        execute(callback);
4081        return;
4082      }
4083
4084      this._getElement().classList.remove(CLASS_NAME_SHOW$6);
4085
4086      this._emulateAnimation(() => {
4087        this.dispose();
4088        execute(callback);
4089      });
4090    } // Private
4091
4092
4093    _getElement() {
4094      if (!this._element) {
4095        const backdrop = document.createElement('div');
4096        backdrop.className = CLASS_NAME_BACKDROP;
4097
4098        if (this._config.isAnimated) {
4099          backdrop.classList.add(CLASS_NAME_FADE$5);
4100        }
4101
4102        this._element = backdrop;
4103      }
4104
4105      return this._element;
4106    }
4107
4108    _getConfig(config) {
4109      config = { ...Default$6,
4110        ...(typeof config === 'object' ? config : {})
4111      };
4112      config.rootElement = config.rootElement || document.body;
4113      typeCheckConfig(NAME$7, config, DefaultType$6);
4114      return config;
4115    }
4116
4117    _append() {
4118      if (this._isAppended) {
4119        return;
4120      }
4121
4122      this._config.rootElement.appendChild(this._getElement());
4123
4124      EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {
4125        execute(this._config.clickCallback);
4126      });
4127      this._isAppended = true;
4128    }
4129
4130    dispose() {
4131      if (!this._isAppended) {
4132        return;
4133      }
4134
4135      EventHandler.off(this._element, EVENT_MOUSEDOWN);
4136
4137      this._getElement().parentNode.removeChild(this._element);
4138
4139      this._isAppended = false;
4140    }
4141
4142    _emulateAnimation(callback) {
4143      if (!this._config.isAnimated) {
4144        execute(callback);
4145        return;
4146      }
4147
4148      const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement());
4149      EventHandler.one(this._getElement(), 'transitionend', () => execute(callback));
4150      emulateTransitionEnd(this._getElement(), backdropTransitionDuration);
4151    }
4152
4153  }
4154
4155  /**
4156   * --------------------------------------------------------------------------
4157   * Bootstrap (v5.0.1): modal.js
4158   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4159   * --------------------------------------------------------------------------
4160   */
4161  /**
4162   * ------------------------------------------------------------------------
4163   * Constants
4164   * ------------------------------------------------------------------------
4165   */
4166
4167  const NAME$6 = 'modal';
4168  const DATA_KEY$6 = 'bs.modal';
4169  const EVENT_KEY$6 = `.${DATA_KEY$6}`;
4170  const DATA_API_KEY$3 = '.data-api';
4171  const ESCAPE_KEY$1 = 'Escape';
4172  const Default$5 = {
4173    backdrop: true,
4174    keyboard: true,
4175    focus: true
4176  };
4177  const DefaultType$5 = {
4178    backdrop: '(boolean|string)',
4179    keyboard: 'boolean',
4180    focus: 'boolean'
4181  };
4182  const EVENT_HIDE$3 = `hide${EVENT_KEY$6}`;
4183  const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`;
4184  const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
4185  const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
4186  const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
4187  const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
4188  const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
4189  const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`;
4190  const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
4191  const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;
4192  const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;
4193  const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
4194  const CLASS_NAME_OPEN = 'modal-open';
4195  const CLASS_NAME_FADE$4 = 'fade';
4196  const CLASS_NAME_SHOW$5 = 'show';
4197  const CLASS_NAME_STATIC = 'modal-static';
4198  const SELECTOR_DIALOG = '.modal-dialog';
4199  const SELECTOR_MODAL_BODY = '.modal-body';
4200  const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
4201  const SELECTOR_DATA_DISMISS$2 = '[data-bs-dismiss="modal"]';
4202  /**
4203   * ------------------------------------------------------------------------
4204   * Class Definition
4205   * ------------------------------------------------------------------------
4206   */
4207
4208  class Modal extends BaseComponent {
4209    constructor(element, config) {
4210      super(element);
4211      this._config = this._getConfig(config);
4212      this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
4213      this._backdrop = this._initializeBackDrop();
4214      this._isShown = false;
4215      this._ignoreBackdropClick = false;
4216      this._isTransitioning = false;
4217    } // Getters
4218
4219
4220    static get Default() {
4221      return Default$5;
4222    }
4223
4224    static get NAME() {
4225      return NAME$6;
4226    } // Public
4227
4228
4229    toggle(relatedTarget) {
4230      return this._isShown ? this.hide() : this.show(relatedTarget);
4231    }
4232
4233    show(relatedTarget) {
4234      if (this._isShown || this._isTransitioning) {
4235        return;
4236      }
4237
4238      if (this._isAnimated()) {
4239        this._isTransitioning = true;
4240      }
4241
4242      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
4243        relatedTarget
4244      });
4245
4246      if (this._isShown || showEvent.defaultPrevented) {
4247        return;
4248      }
4249
4250      this._isShown = true;
4251      hide();
4252      document.body.classList.add(CLASS_NAME_OPEN);
4253
4254      this._adjustDialog();
4255
4256      this._setEscapeEvent();
4257
4258      this._setResizeEvent();
4259
4260      EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, SELECTOR_DATA_DISMISS$2, event => this.hide(event));
4261      EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
4262        EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
4263          if (event.target === this._element) {
4264            this._ignoreBackdropClick = true;
4265          }
4266        });
4267      });
4268
4269      this._showBackdrop(() => this._showElement(relatedTarget));
4270    }
4271
4272    hide(event) {
4273      if (event) {
4274        event.preventDefault();
4275      }
4276
4277      if (!this._isShown || this._isTransitioning) {
4278        return;
4279      }
4280
4281      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);
4282
4283      if (hideEvent.defaultPrevented) {
4284        return;
4285      }
4286
4287      this._isShown = false;
4288
4289      const isAnimated = this._isAnimated();
4290
4291      if (isAnimated) {
4292        this._isTransitioning = true;
4293      }
4294
4295      this._setEscapeEvent();
4296
4297      this._setResizeEvent();
4298
4299      EventHandler.off(document, EVENT_FOCUSIN$2);
4300
4301      this._element.classList.remove(CLASS_NAME_SHOW$5);
4302
4303      EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);
4304      EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
4305
4306      this._queueCallback(() => this._hideModal(), this._element, isAnimated);
4307    }
4308
4309    dispose() {
4310      [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));
4311
4312      this._backdrop.dispose();
4313
4314      super.dispose();
4315      /**
4316       * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
4317       * Do not move `document` in `htmlElements` array
4318       * It will remove `EVENT_CLICK_DATA_API` event that should remain
4319       */
4320
4321      EventHandler.off(document, EVENT_FOCUSIN$2);
4322    }
4323
4324    handleUpdate() {
4325      this._adjustDialog();
4326    } // Private
4327
4328
4329    _initializeBackDrop() {
4330      return new Backdrop({
4331        isVisible: Boolean(this._config.backdrop),
4332        // 'static' option will be translated to true, and booleans will keep their value
4333        isAnimated: this._isAnimated()
4334      });
4335    }
4336
4337    _getConfig(config) {
4338      config = { ...Default$5,
4339        ...Manipulator.getDataAttributes(this._element),
4340        ...config
4341      };
4342      typeCheckConfig(NAME$6, config, DefaultType$5);
4343      return config;
4344    }
4345
4346    _showElement(relatedTarget) {
4347      const isAnimated = this._isAnimated();
4348
4349      const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
4350
4351      if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
4352        // Don't move modal's DOM position
4353        document.body.appendChild(this._element);
4354      }
4355
4356      this._element.style.display = 'block';
4357
4358      this._element.removeAttribute('aria-hidden');
4359
4360      this._element.setAttribute('aria-modal', true);
4361
4362      this._element.setAttribute('role', 'dialog');
4363
4364      this._element.scrollTop = 0;
4365
4366      if (modalBody) {
4367        modalBody.scrollTop = 0;
4368      }
4369
4370      if (isAnimated) {
4371        reflow(this._element);
4372      }
4373
4374      this._element.classList.add(CLASS_NAME_SHOW$5);
4375
4376      if (this._config.focus) {
4377        this._enforceFocus();
4378      }
4379
4380      const transitionComplete = () => {
4381        if (this._config.focus) {
4382          this._element.focus();
4383        }
4384
4385        this._isTransitioning = false;
4386        EventHandler.trigger(this._element, EVENT_SHOWN$3, {
4387          relatedTarget
4388        });
4389      };
4390
4391      this._queueCallback(transitionComplete, this._dialog, isAnimated);
4392    }
4393
4394    _enforceFocus() {
4395      EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop
4396
4397      EventHandler.on(document, EVENT_FOCUSIN$2, event => {
4398        if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
4399          this._element.focus();
4400        }
4401      });
4402    }
4403
4404    _setEscapeEvent() {
4405      if (this._isShown) {
4406        EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
4407          if (this._config.keyboard && event.key === ESCAPE_KEY$1) {
4408            event.preventDefault();
4409            this.hide();
4410          } else if (!this._config.keyboard && event.key === ESCAPE_KEY$1) {
4411            this._triggerBackdropTransition();
4412          }
4413        });
4414      } else {
4415        EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1);
4416      }
4417    }
4418
4419    _setResizeEvent() {
4420      if (this._isShown) {
4421        EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog());
4422      } else {
4423        EventHandler.off(window, EVENT_RESIZE);
4424      }
4425    }
4426
4427    _hideModal() {
4428      this._element.style.display = 'none';
4429
4430      this._element.setAttribute('aria-hidden', true);
4431
4432      this._element.removeAttribute('aria-modal');
4433
4434      this._element.removeAttribute('role');
4435
4436      this._isTransitioning = false;
4437
4438      this._backdrop.hide(() => {
4439        document.body.classList.remove(CLASS_NAME_OPEN);
4440
4441        this._resetAdjustments();
4442
4443        reset();
4444        EventHandler.trigger(this._element, EVENT_HIDDEN$3);
4445      });
4446    }
4447
4448    _showBackdrop(callback) {
4449      EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => {
4450        if (this._ignoreBackdropClick) {
4451          this._ignoreBackdropClick = false;
4452          return;
4453        }
4454
4455        if (event.target !== event.currentTarget) {
4456          return;
4457        }
4458
4459        if (this._config.backdrop === true) {
4460          this.hide();
4461        } else if (this._config.backdrop === 'static') {
4462          this._triggerBackdropTransition();
4463        }
4464      });
4465
4466      this._backdrop.show(callback);
4467    }
4468
4469    _isAnimated() {
4470      return this._element.classList.contains(CLASS_NAME_FADE$4);
4471    }
4472
4473    _triggerBackdropTransition() {
4474      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
4475
4476      if (hideEvent.defaultPrevented) {
4477        return;
4478      }
4479
4480      const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
4481
4482      if (!isModalOverflowing) {
4483        this._element.style.overflowY = 'hidden';
4484      }
4485
4486      this._element.classList.add(CLASS_NAME_STATIC);
4487
4488      const modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
4489      EventHandler.off(this._element, 'transitionend');
4490      EventHandler.one(this._element, 'transitionend', () => {
4491        this._element.classList.remove(CLASS_NAME_STATIC);
4492
4493        if (!isModalOverflowing) {
4494          EventHandler.one(this._element, 'transitionend', () => {
4495            this._element.style.overflowY = '';
4496          });
4497          emulateTransitionEnd(this._element, modalTransitionDuration);
4498        }
4499      });
4500      emulateTransitionEnd(this._element, modalTransitionDuration);
4501
4502      this._element.focus();
4503    } // ----------------------------------------------------------------------
4504    // the following methods are used to handle overflowing modals
4505    // ----------------------------------------------------------------------
4506
4507
4508    _adjustDialog() {
4509      const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
4510      const scrollbarWidth = getWidth();
4511      const isBodyOverflowing = scrollbarWidth > 0;
4512
4513      if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {
4514        this._element.style.paddingLeft = `${scrollbarWidth}px`;
4515      }
4516
4517      if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) {
4518        this._element.style.paddingRight = `${scrollbarWidth}px`;
4519      }
4520    }
4521
4522    _resetAdjustments() {
4523      this._element.style.paddingLeft = '';
4524      this._element.style.paddingRight = '';
4525    } // Static
4526
4527
4528    static jQueryInterface(config, relatedTarget) {
4529      return this.each(function () {
4530        const data = Modal.getInstance(this) || new Modal(this, typeof config === 'object' ? config : {});
4531
4532        if (typeof config !== 'string') {
4533          return;
4534        }
4535
4536        if (typeof data[config] === 'undefined') {
4537          throw new TypeError(`No method named "${config}"`);
4538        }
4539
4540        data[config](relatedTarget);
4541      });
4542    }
4543
4544  }
4545  /**
4546   * ------------------------------------------------------------------------
4547   * Data Api implementation
4548   * ------------------------------------------------------------------------
4549   */
4550
4551
4552  EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
4553    const target = getElementFromSelector(this);
4554
4555    if (['A', 'AREA'].includes(this.tagName)) {
4556      event.preventDefault();
4557    }
4558
4559    EventHandler.one(target, EVENT_SHOW$3, showEvent => {
4560      if (showEvent.defaultPrevented) {
4561        // only register focus restorer if modal will actually get shown
4562        return;
4563      }
4564
4565      EventHandler.one(target, EVENT_HIDDEN$3, () => {
4566        if (isVisible(this)) {
4567          this.focus();
4568        }
4569      });
4570    });
4571    const data = Modal.getInstance(target) || new Modal(target);
4572    data.toggle(this);
4573  });
4574  /**
4575   * ------------------------------------------------------------------------
4576   * jQuery
4577   * ------------------------------------------------------------------------
4578   * add .Modal to jQuery only if jQuery is present
4579   */
4580
4581  defineJQueryPlugin(Modal);
4582
4583  /**
4584   * --------------------------------------------------------------------------
4585   * Bootstrap (v5.0.1): offcanvas.js
4586   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4587   * --------------------------------------------------------------------------
4588   */
4589  /**
4590   * ------------------------------------------------------------------------
4591   * Constants
4592   * ------------------------------------------------------------------------
4593   */
4594
4595  const NAME$5 = 'offcanvas';
4596  const DATA_KEY$5 = 'bs.offcanvas';
4597  const EVENT_KEY$5 = `.${DATA_KEY$5}`;
4598  const DATA_API_KEY$2 = '.data-api';
4599  const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$5}${DATA_API_KEY$2}`;
4600  const ESCAPE_KEY = 'Escape';
4601  const Default$4 = {
4602    backdrop: true,
4603    keyboard: true,
4604    scroll: false
4605  };
4606  const DefaultType$4 = {
4607    backdrop: 'boolean',
4608    keyboard: 'boolean',
4609    scroll: 'boolean'
4610  };
4611  const CLASS_NAME_SHOW$4 = 'show';
4612  const OPEN_SELECTOR = '.offcanvas.show';
4613  const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
4614  const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
4615  const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
4616  const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
4617  const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
4618  const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
4619  const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
4620  const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
4621  const SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="offcanvas"]';
4622  const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
4623  /**
4624   * ------------------------------------------------------------------------
4625   * Class Definition
4626   * ------------------------------------------------------------------------
4627   */
4628
4629  class Offcanvas extends BaseComponent {
4630    constructor(element, config) {
4631      super(element);
4632      this._config = this._getConfig(config);
4633      this._isShown = false;
4634      this._backdrop = this._initializeBackDrop();
4635
4636      this._addEventListeners();
4637    } // Getters
4638
4639
4640    static get NAME() {
4641      return NAME$5;
4642    }
4643
4644    static get Default() {
4645      return Default$4;
4646    } // Public
4647
4648
4649    toggle(relatedTarget) {
4650      return this._isShown ? this.hide() : this.show(relatedTarget);
4651    }
4652
4653    show(relatedTarget) {
4654      if (this._isShown) {
4655        return;
4656      }
4657
4658      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {
4659        relatedTarget
4660      });
4661
4662      if (showEvent.defaultPrevented) {
4663        return;
4664      }
4665
4666      this._isShown = true;
4667      this._element.style.visibility = 'visible';
4668
4669      this._backdrop.show();
4670
4671      if (!this._config.scroll) {
4672        hide();
4673
4674        this._enforceFocusOnElement(this._element);
4675      }
4676
4677      this._element.removeAttribute('aria-hidden');
4678
4679      this._element.setAttribute('aria-modal', true);
4680
4681      this._element.setAttribute('role', 'dialog');
4682
4683      this._element.classList.add(CLASS_NAME_SHOW$4);
4684
4685      const completeCallBack = () => {
4686        EventHandler.trigger(this._element, EVENT_SHOWN$2, {
4687          relatedTarget
4688        });
4689      };
4690
4691      this._queueCallback(completeCallBack, this._element, true);
4692    }
4693
4694    hide() {
4695      if (!this._isShown) {
4696        return;
4697      }
4698
4699      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);
4700
4701      if (hideEvent.defaultPrevented) {
4702        return;
4703      }
4704
4705      EventHandler.off(document, EVENT_FOCUSIN$1);
4706
4707      this._element.blur();
4708
4709      this._isShown = false;
4710
4711      this._element.classList.remove(CLASS_NAME_SHOW$4);
4712
4713      this._backdrop.hide();
4714
4715      const completeCallback = () => {
4716        this._element.setAttribute('aria-hidden', true);
4717
4718        this._element.removeAttribute('aria-modal');
4719
4720        this._element.removeAttribute('role');
4721
4722        this._element.style.visibility = 'hidden';
4723
4724        if (!this._config.scroll) {
4725          reset();
4726        }
4727
4728        EventHandler.trigger(this._element, EVENT_HIDDEN$2);
4729      };
4730
4731      this._queueCallback(completeCallback, this._element, true);
4732    }
4733
4734    dispose() {
4735      this._backdrop.dispose();
4736
4737      super.dispose();
4738      EventHandler.off(document, EVENT_FOCUSIN$1);
4739    } // Private
4740
4741
4742    _getConfig(config) {
4743      config = { ...Default$4,
4744        ...Manipulator.getDataAttributes(this._element),
4745        ...(typeof config === 'object' ? config : {})
4746      };
4747      typeCheckConfig(NAME$5, config, DefaultType$4);
4748      return config;
4749    }
4750
4751    _initializeBackDrop() {
4752      return new Backdrop({
4753        isVisible: this._config.backdrop,
4754        isAnimated: true,
4755        rootElement: this._element.parentNode,
4756        clickCallback: () => this.hide()
4757      });
4758    }
4759
4760    _enforceFocusOnElement(element) {
4761      EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop
4762
4763      EventHandler.on(document, EVENT_FOCUSIN$1, event => {
4764        if (document !== event.target && element !== event.target && !element.contains(event.target)) {
4765          element.focus();
4766        }
4767      });
4768      element.focus();
4769    }
4770
4771    _addEventListeners() {
4772      EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, () => this.hide());
4773      EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
4774        if (this._config.keyboard && event.key === ESCAPE_KEY) {
4775          this.hide();
4776        }
4777      });
4778    } // Static
4779
4780
4781    static jQueryInterface(config) {
4782      return this.each(function () {
4783        const data = Data.get(this, DATA_KEY$5) || new Offcanvas(this, typeof config === 'object' ? config : {});
4784
4785        if (typeof config !== 'string') {
4786          return;
4787        }
4788
4789        if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
4790          throw new TypeError(`No method named "${config}"`);
4791        }
4792
4793        data[config](this);
4794      });
4795    }
4796
4797  }
4798  /**
4799   * ------------------------------------------------------------------------
4800   * Data Api implementation
4801   * ------------------------------------------------------------------------
4802   */
4803
4804
4805  EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
4806    const target = getElementFromSelector(this);
4807
4808    if (['A', 'AREA'].includes(this.tagName)) {
4809      event.preventDefault();
4810    }
4811
4812    if (isDisabled(this)) {
4813      return;
4814    }
4815
4816    EventHandler.one(target, EVENT_HIDDEN$2, () => {
4817      // focus on trigger when it is closed
4818      if (isVisible(this)) {
4819        this.focus();
4820      }
4821    }); // avoid conflict when clicking a toggler of an offcanvas, while another is open
4822
4823    const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
4824
4825    if (allReadyOpen && allReadyOpen !== target) {
4826      Offcanvas.getInstance(allReadyOpen).hide();
4827    }
4828
4829    const data = Data.get(target, DATA_KEY$5) || new Offcanvas(target);
4830    data.toggle(this);
4831  });
4832  EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {
4833    SelectorEngine.find(OPEN_SELECTOR).forEach(el => (Data.get(el, DATA_KEY$5) || new Offcanvas(el)).show());
4834  });
4835  /**
4836   * ------------------------------------------------------------------------
4837   * jQuery
4838   * ------------------------------------------------------------------------
4839   */
4840
4841  defineJQueryPlugin(Offcanvas);
4842
4843  /**
4844   * --------------------------------------------------------------------------
4845   * Bootstrap (v5.0.1): util/sanitizer.js
4846   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4847   * --------------------------------------------------------------------------
4848   */
4849  const uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
4850  const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
4851  /**
4852   * A pattern that recognizes a commonly useful subset of URLs that are safe.
4853   *
4854   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
4855   */
4856
4857  const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
4858  /**
4859   * A pattern that matches safe data URLs. Only matches image, video and audio types.
4860   *
4861   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
4862   */
4863
4864  const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
4865
4866  const allowedAttribute = (attr, allowedAttributeList) => {
4867    const attrName = attr.nodeName.toLowerCase();
4868
4869    if (allowedAttributeList.includes(attrName)) {
4870      if (uriAttrs.has(attrName)) {
4871        return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
4872      }
4873
4874      return true;
4875    }
4876
4877    const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.
4878
4879    for (let i = 0, len = regExp.length; i < len; i++) {
4880      if (regExp[i].test(attrName)) {
4881        return true;
4882      }
4883    }
4884
4885    return false;
4886  };
4887
4888  const DefaultAllowlist = {
4889    // Global attributes allowed on any supplied element below.
4890    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
4891    a: ['target', 'href', 'title', 'rel'],
4892    area: [],
4893    b: [],
4894    br: [],
4895    col: [],
4896    code: [],
4897    div: [],
4898    em: [],
4899    hr: [],
4900    h1: [],
4901    h2: [],
4902    h3: [],
4903    h4: [],
4904    h5: [],
4905    h6: [],
4906    i: [],
4907    img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
4908    li: [],
4909    ol: [],
4910    p: [],
4911    pre: [],
4912    s: [],
4913    small: [],
4914    span: [],
4915    sub: [],
4916    sup: [],
4917    strong: [],
4918    u: [],
4919    ul: []
4920  };
4921  function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
4922    if (!unsafeHtml.length) {
4923      return unsafeHtml;
4924    }
4925
4926    if (sanitizeFn && typeof sanitizeFn === 'function') {
4927      return sanitizeFn(unsafeHtml);
4928    }
4929
4930    const domParser = new window.DOMParser();
4931    const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
4932    const allowlistKeys = Object.keys(allowList);
4933    const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
4934
4935    for (let i = 0, len = elements.length; i < len; i++) {
4936      const el = elements[i];
4937      const elName = el.nodeName.toLowerCase();
4938
4939      if (!allowlistKeys.includes(elName)) {
4940        el.parentNode.removeChild(el);
4941        continue;
4942      }
4943
4944      const attributeList = [].concat(...el.attributes);
4945      const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
4946      attributeList.forEach(attr => {
4947        if (!allowedAttribute(attr, allowedAttributes)) {
4948          el.removeAttribute(attr.nodeName);
4949        }
4950      });
4951    }
4952
4953    return createdDocument.body.innerHTML;
4954  }
4955
4956  /**
4957   * --------------------------------------------------------------------------
4958   * Bootstrap (v5.0.1): tooltip.js
4959   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4960   * --------------------------------------------------------------------------
4961   */
4962  /**
4963   * ------------------------------------------------------------------------
4964   * Constants
4965   * ------------------------------------------------------------------------
4966   */
4967
4968  const NAME$4 = 'tooltip';
4969  const DATA_KEY$4 = 'bs.tooltip';
4970  const EVENT_KEY$4 = `.${DATA_KEY$4}`;
4971  const CLASS_PREFIX$1 = 'bs-tooltip';
4972  const BSCLS_PREFIX_REGEX$1 = new RegExp(`(^|\\s)${CLASS_PREFIX$1}\\S+`, 'g');
4973  const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
4974  const DefaultType$3 = {
4975    animation: 'boolean',
4976    template: 'string',
4977    title: '(string|element|function)',
4978    trigger: 'string',
4979    delay: '(number|object)',
4980    html: 'boolean',
4981    selector: '(string|boolean)',
4982    placement: '(string|function)',
4983    offset: '(array|string|function)',
4984    container: '(string|element|boolean)',
4985    fallbackPlacements: 'array',
4986    boundary: '(string|element)',
4987    customClass: '(string|function)',
4988    sanitize: 'boolean',
4989    sanitizeFn: '(null|function)',
4990    allowList: 'object',
4991    popperConfig: '(null|object|function)'
4992  };
4993  const AttachmentMap = {
4994    AUTO: 'auto',
4995    TOP: 'top',
4996    RIGHT: isRTL() ? 'left' : 'right',
4997    BOTTOM: 'bottom',
4998    LEFT: isRTL() ? 'right' : 'left'
4999  };
5000  const Default$3 = {
5001    animation: true,
5002    template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
5003    trigger: 'hover focus',
5004    title: '',
5005    delay: 0,
5006    html: false,
5007    selector: false,
5008    placement: 'top',
5009    offset: [0, 0],
5010    container: false,
5011    fallbackPlacements: ['top', 'right', 'bottom', 'left'],
5012    boundary: 'clippingParents',
5013    customClass: '',
5014    sanitize: true,
5015    sanitizeFn: null,
5016    allowList: DefaultAllowlist,
5017    popperConfig: null
5018  };
5019  const Event$2 = {
5020    HIDE: `hide${EVENT_KEY$4}`,
5021    HIDDEN: `hidden${EVENT_KEY$4}`,
5022    SHOW: `show${EVENT_KEY$4}`,
5023    SHOWN: `shown${EVENT_KEY$4}`,
5024    INSERTED: `inserted${EVENT_KEY$4}`,
5025    CLICK: `click${EVENT_KEY$4}`,
5026    FOCUSIN: `focusin${EVENT_KEY$4}`,
5027    FOCUSOUT: `focusout${EVENT_KEY$4}`,
5028    MOUSEENTER: `mouseenter${EVENT_KEY$4}`,
5029    MOUSELEAVE: `mouseleave${EVENT_KEY$4}`
5030  };
5031  const CLASS_NAME_FADE$3 = 'fade';
5032  const CLASS_NAME_MODAL = 'modal';
5033  const CLASS_NAME_SHOW$3 = 'show';
5034  const HOVER_STATE_SHOW = 'show';
5035  const HOVER_STATE_OUT = 'out';
5036  const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
5037  const TRIGGER_HOVER = 'hover';
5038  const TRIGGER_FOCUS = 'focus';
5039  const TRIGGER_CLICK = 'click';
5040  const TRIGGER_MANUAL = 'manual';
5041  /**
5042   * ------------------------------------------------------------------------
5043   * Class Definition
5044   * ------------------------------------------------------------------------
5045   */
5046
5047  class Tooltip extends BaseComponent {
5048    constructor(element, config) {
5049      if (typeof Popper__namespace === 'undefined') {
5050        throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
5051      }
5052
5053      super(element); // private
5054
5055      this._isEnabled = true;
5056      this._timeout = 0;
5057      this._hoverState = '';
5058      this._activeTrigger = {};
5059      this._popper = null; // Protected
5060
5061      this._config = this._getConfig(config);
5062      this.tip = null;
5063
5064      this._setListeners();
5065    } // Getters
5066
5067
5068    static get Default() {
5069      return Default$3;
5070    }
5071
5072    static get NAME() {
5073      return NAME$4;
5074    }
5075
5076    static get Event() {
5077      return Event$2;
5078    }
5079
5080    static get DefaultType() {
5081      return DefaultType$3;
5082    } // Public
5083
5084
5085    enable() {
5086      this._isEnabled = true;
5087    }
5088
5089    disable() {
5090      this._isEnabled = false;
5091    }
5092
5093    toggleEnabled() {
5094      this._isEnabled = !this._isEnabled;
5095    }
5096
5097    toggle(event) {
5098      if (!this._isEnabled) {
5099        return;
5100      }
5101
5102      if (event) {
5103        const context = this._initializeOnDelegatedTarget(event);
5104
5105        context._activeTrigger.click = !context._activeTrigger.click;
5106
5107        if (context._isWithActiveTrigger()) {
5108          context._enter(null, context);
5109        } else {
5110          context._leave(null, context);
5111        }
5112      } else {
5113        if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) {
5114          this._leave(null, this);
5115
5116          return;
5117        }
5118
5119        this._enter(null, this);
5120      }
5121    }
5122
5123    dispose() {
5124      clearTimeout(this._timeout);
5125      EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
5126
5127      if (this.tip && this.tip.parentNode) {
5128        this.tip.parentNode.removeChild(this.tip);
5129      }
5130
5131      if (this._popper) {
5132        this._popper.destroy();
5133      }
5134
5135      super.dispose();
5136    }
5137
5138    show() {
5139      if (this._element.style.display === 'none') {
5140        throw new Error('Please use show on visible elements');
5141      }
5142
5143      if (!(this.isWithContent() && this._isEnabled)) {
5144        return;
5145      }
5146
5147      const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);
5148      const shadowRoot = findShadowRoot(this._element);
5149      const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
5150
5151      if (showEvent.defaultPrevented || !isInTheDom) {
5152        return;
5153      }
5154
5155      const tip = this.getTipElement();
5156      const tipId = getUID(this.constructor.NAME);
5157      tip.setAttribute('id', tipId);
5158
5159      this._element.setAttribute('aria-describedby', tipId);
5160
5161      this.setContent();
5162
5163      if (this._config.animation) {
5164        tip.classList.add(CLASS_NAME_FADE$3);
5165      }
5166
5167      const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
5168
5169      const attachment = this._getAttachment(placement);
5170
5171      this._addAttachmentClass(attachment);
5172
5173      const {
5174        container
5175      } = this._config;
5176      Data.set(tip, this.constructor.DATA_KEY, this);
5177
5178      if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
5179        container.appendChild(tip);
5180        EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
5181      }
5182
5183      if (this._popper) {
5184        this._popper.update();
5185      } else {
5186        this._popper = Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
5187      }
5188
5189      tip.classList.add(CLASS_NAME_SHOW$3);
5190      const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
5191
5192      if (customClass) {
5193        tip.classList.add(...customClass.split(' '));
5194      } // If this is a touch-enabled device we add extra
5195      // empty mouseover listeners to the body's immediate children;
5196      // only needed because of broken event delegation on iOS
5197      // http://dev.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
5198
5199
5200      if ('ontouchstart' in document.documentElement) {
5201        [].concat(...document.body.children).forEach(element => {
5202          EventHandler.on(element, 'mouseover', noop);
5203        });
5204      }
5205
5206      const complete = () => {
5207        const prevHoverState = this._hoverState;
5208        this._hoverState = null;
5209        EventHandler.trigger(this._element, this.constructor.Event.SHOWN);
5210
5211        if (prevHoverState === HOVER_STATE_OUT) {
5212          this._leave(null, this);
5213        }
5214      };
5215
5216      const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
5217
5218      this._queueCallback(complete, this.tip, isAnimated);
5219    }
5220
5221    hide() {
5222      if (!this._popper) {
5223        return;
5224      }
5225
5226      const tip = this.getTipElement();
5227
5228      const complete = () => {
5229        if (this._isWithActiveTrigger()) {
5230          return;
5231        }
5232
5233        if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
5234          tip.parentNode.removeChild(tip);
5235        }
5236
5237        this._cleanTipClass();
5238
5239        this._element.removeAttribute('aria-describedby');
5240
5241        EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);
5242
5243        if (this._popper) {
5244          this._popper.destroy();
5245
5246          this._popper = null;
5247        }
5248      };
5249
5250      const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);
5251
5252      if (hideEvent.defaultPrevented) {
5253        return;
5254      }
5255
5256      tip.classList.remove(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra
5257      // empty mouseover listeners we added for iOS support
5258
5259      if ('ontouchstart' in document.documentElement) {
5260        [].concat(...document.body.children).forEach(element => EventHandler.off(element, 'mouseover', noop));
5261      }
5262
5263      this._activeTrigger[TRIGGER_CLICK] = false;
5264      this._activeTrigger[TRIGGER_FOCUS] = false;
5265      this._activeTrigger[TRIGGER_HOVER] = false;
5266      const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
5267
5268      this._queueCallback(complete, this.tip, isAnimated);
5269
5270      this._hoverState = '';
5271    }
5272
5273    update() {
5274      if (this._popper !== null) {
5275        this._popper.update();
5276      }
5277    } // Protected
5278
5279
5280    isWithContent() {
5281      return Boolean(this.getTitle());
5282    }
5283
5284    getTipElement() {
5285      if (this.tip) {
5286        return this.tip;
5287      }
5288
5289      const element = document.createElement('div');
5290      element.innerHTML = this._config.template;
5291      this.tip = element.children[0];
5292      return this.tip;
5293    }
5294
5295    setContent() {
5296      const tip = this.getTipElement();
5297      this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
5298      tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);
5299    }
5300
5301    setElementContent(element, content) {
5302      if (element === null) {
5303        return;
5304      }
5305
5306      if (isElement(content)) {
5307        content = getElement(content); // content is a DOM node or a jQuery
5308
5309        if (this._config.html) {
5310          if (content.parentNode !== element) {
5311            element.innerHTML = '';
5312            element.appendChild(content);
5313          }
5314        } else {
5315          element.textContent = content.textContent;
5316        }
5317
5318        return;
5319      }
5320
5321      if (this._config.html) {
5322        if (this._config.sanitize) {
5323          content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
5324        }
5325
5326        element.innerHTML = content;
5327      } else {
5328        element.textContent = content;
5329      }
5330    }
5331
5332    getTitle() {
5333      let title = this._element.getAttribute('data-bs-original-title');
5334
5335      if (!title) {
5336        title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
5337      }
5338
5339      return title;
5340    }
5341
5342    updateAttachment(attachment) {
5343      if (attachment === 'right') {
5344        return 'end';
5345      }
5346
5347      if (attachment === 'left') {
5348        return 'start';
5349      }
5350
5351      return attachment;
5352    } // Private
5353
5354
5355    _initializeOnDelegatedTarget(event, context) {
5356      const dataKey = this.constructor.DATA_KEY;
5357      context = context || Data.get(event.delegateTarget, dataKey);
5358
5359      if (!context) {
5360        context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
5361        Data.set(event.delegateTarget, dataKey, context);
5362      }
5363
5364      return context;
5365    }
5366
5367    _getOffset() {
5368      const {
5369        offset
5370      } = this._config;
5371
5372      if (typeof offset === 'string') {
5373        return offset.split(',').map(val => Number.parseInt(val, 10));
5374      }
5375
5376      if (typeof offset === 'function') {
5377        return popperData => offset(popperData, this._element);
5378      }
5379
5380      return offset;
5381    }
5382
5383    _getPopperConfig(attachment) {
5384      const defaultBsPopperConfig = {
5385        placement: attachment,
5386        modifiers: [{
5387          name: 'flip',
5388          options: {
5389            fallbackPlacements: this._config.fallbackPlacements
5390          }
5391        }, {
5392          name: 'offset',
5393          options: {
5394            offset: this._getOffset()
5395          }
5396        }, {
5397          name: 'preventOverflow',
5398          options: {
5399            boundary: this._config.boundary
5400          }
5401        }, {
5402          name: 'arrow',
5403          options: {
5404            element: `.${this.constructor.NAME}-arrow`
5405          }
5406        }, {
5407          name: 'onChange',
5408          enabled: true,
5409          phase: 'afterWrite',
5410          fn: data => this._handlePopperPlacementChange(data)
5411        }],
5412        onFirstUpdate: data => {
5413          if (data.options.placement !== data.placement) {
5414            this._handlePopperPlacementChange(data);
5415          }
5416        }
5417      };
5418      return { ...defaultBsPopperConfig,
5419        ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
5420      };
5421    }
5422
5423    _addAttachmentClass(attachment) {
5424      this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`);
5425    }
5426
5427    _getAttachment(placement) {
5428      return AttachmentMap[placement.toUpperCase()];
5429    }
5430
5431    _setListeners() {
5432      const triggers = this._config.trigger.split(' ');
5433
5434      triggers.forEach(trigger => {
5435        if (trigger === 'click') {
5436          EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
5437        } else if (trigger !== TRIGGER_MANUAL) {
5438          const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
5439          const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
5440          EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));
5441          EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));
5442        }
5443      });
5444
5445      this._hideModalHandler = () => {
5446        if (this._element) {
5447          this.hide();
5448        }
5449      };
5450
5451      EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
5452
5453      if (this._config.selector) {
5454        this._config = { ...this._config,
5455          trigger: 'manual',
5456          selector: ''
5457        };
5458      } else {
5459        this._fixTitle();
5460      }
5461    }
5462
5463    _fixTitle() {
5464      const title = this._element.getAttribute('title');
5465
5466      const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');
5467
5468      if (title || originalTitleType !== 'string') {
5469        this._element.setAttribute('data-bs-original-title', title || '');
5470
5471        if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {
5472          this._element.setAttribute('aria-label', title);
5473        }
5474
5475        this._element.setAttribute('title', '');
5476      }
5477    }
5478
5479    _enter(event, context) {
5480      context = this._initializeOnDelegatedTarget(event, context);
5481
5482      if (event) {
5483        context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
5484      }
5485
5486      if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
5487        context._hoverState = HOVER_STATE_SHOW;
5488        return;
5489      }
5490
5491      clearTimeout(context._timeout);
5492      context._hoverState = HOVER_STATE_SHOW;
5493
5494      if (!context._config.delay || !context._config.delay.show) {
5495        context.show();
5496        return;
5497      }
5498
5499      context._timeout = setTimeout(() => {
5500        if (context._hoverState === HOVER_STATE_SHOW) {
5501          context.show();
5502        }
5503      }, context._config.delay.show);
5504    }
5505
5506    _leave(event, context) {
5507      context = this._initializeOnDelegatedTarget(event, context);
5508
5509      if (event) {
5510        context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
5511      }
5512
5513      if (context._isWithActiveTrigger()) {
5514        return;
5515      }
5516
5517      clearTimeout(context._timeout);
5518      context._hoverState = HOVER_STATE_OUT;
5519
5520      if (!context._config.delay || !context._config.delay.hide) {
5521        context.hide();
5522        return;
5523      }
5524
5525      context._timeout = setTimeout(() => {
5526        if (context._hoverState === HOVER_STATE_OUT) {
5527          context.hide();
5528        }
5529      }, context._config.delay.hide);
5530    }
5531
5532    _isWithActiveTrigger() {
5533      for (const trigger in this._activeTrigger) {
5534        if (this._activeTrigger[trigger]) {
5535          return true;
5536        }
5537      }
5538
5539      return false;
5540    }
5541
5542    _getConfig(config) {
5543      const dataAttributes = Manipulator.getDataAttributes(this._element);
5544      Object.keys(dataAttributes).forEach(dataAttr => {
5545        if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
5546          delete dataAttributes[dataAttr];
5547        }
5548      });
5549      config = { ...this.constructor.Default,
5550        ...dataAttributes,
5551        ...(typeof config === 'object' && config ? config : {})
5552      };
5553      config.container = config.container === false ? document.body : getElement(config.container);
5554
5555      if (typeof config.delay === 'number') {
5556        config.delay = {
5557          show: config.delay,
5558          hide: config.delay
5559        };
5560      }
5561
5562      if (typeof config.title === 'number') {
5563        config.title = config.title.toString();
5564      }
5565
5566      if (typeof config.content === 'number') {
5567        config.content = config.content.toString();
5568      }
5569
5570      typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
5571
5572      if (config.sanitize) {
5573        config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
5574      }
5575
5576      return config;
5577    }
5578
5579    _getDelegateConfig() {
5580      const config = {};
5581
5582      if (this._config) {
5583        for (const key in this._config) {
5584          if (this.constructor.Default[key] !== this._config[key]) {
5585            config[key] = this._config[key];
5586          }
5587        }
5588      }
5589
5590      return config;
5591    }
5592
5593    _cleanTipClass() {
5594      const tip = this.getTipElement();
5595      const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
5596
5597      if (tabClass !== null && tabClass.length > 0) {
5598        tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
5599      }
5600    }
5601
5602    _handlePopperPlacementChange(popperData) {
5603      const {
5604        state
5605      } = popperData;
5606
5607      if (!state) {
5608        return;
5609      }
5610
5611      this.tip = state.elements.popper;
5612
5613      this._cleanTipClass();
5614
5615      this._addAttachmentClass(this._getAttachment(state.placement));
5616    } // Static
5617
5618
5619    static jQueryInterface(config) {
5620      return this.each(function () {
5621        let data = Data.get(this, DATA_KEY$4);
5622
5623        const _config = typeof config === 'object' && config;
5624
5625        if (!data && /dispose|hide/.test(config)) {
5626          return;
5627        }
5628
5629        if (!data) {
5630          data = new Tooltip(this, _config);
5631        }
5632
5633        if (typeof config === 'string') {
5634          if (typeof data[config] === 'undefined') {
5635            throw new TypeError(`No method named "${config}"`);
5636          }
5637
5638          data[config]();
5639        }
5640      });
5641    }
5642
5643  }
5644  /**
5645   * ------------------------------------------------------------------------
5646   * jQuery
5647   * ------------------------------------------------------------------------
5648   * add .Tooltip to jQuery only if jQuery is present
5649   */
5650
5651
5652  defineJQueryPlugin(Tooltip);
5653
5654  /**
5655   * --------------------------------------------------------------------------
5656   * Bootstrap (v5.0.1): popover.js
5657   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5658   * --------------------------------------------------------------------------
5659   */
5660  /**
5661   * ------------------------------------------------------------------------
5662   * Constants
5663   * ------------------------------------------------------------------------
5664   */
5665
5666  const NAME$3 = 'popover';
5667  const DATA_KEY$3 = 'bs.popover';
5668  const EVENT_KEY$3 = `.${DATA_KEY$3}`;
5669  const CLASS_PREFIX = 'bs-popover';
5670  const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
5671  const Default$2 = { ...Tooltip.Default,
5672    placement: 'right',
5673    offset: [0, 8],
5674    trigger: 'click',
5675    content: '',
5676    template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
5677  };
5678  const DefaultType$2 = { ...Tooltip.DefaultType,
5679    content: '(string|element|function)'
5680  };
5681  const Event$1 = {
5682    HIDE: `hide${EVENT_KEY$3}`,
5683    HIDDEN: `hidden${EVENT_KEY$3}`,
5684    SHOW: `show${EVENT_KEY$3}`,
5685    SHOWN: `shown${EVENT_KEY$3}`,
5686    INSERTED: `inserted${EVENT_KEY$3}`,
5687    CLICK: `click${EVENT_KEY$3}`,
5688    FOCUSIN: `focusin${EVENT_KEY$3}`,
5689    FOCUSOUT: `focusout${EVENT_KEY$3}`,
5690    MOUSEENTER: `mouseenter${EVENT_KEY$3}`,
5691    MOUSELEAVE: `mouseleave${EVENT_KEY$3}`
5692  };
5693  const CLASS_NAME_FADE$2 = 'fade';
5694  const CLASS_NAME_SHOW$2 = 'show';
5695  const SELECTOR_TITLE = '.popover-header';
5696  const SELECTOR_CONTENT = '.popover-body';
5697  /**
5698   * ------------------------------------------------------------------------
5699   * Class Definition
5700   * ------------------------------------------------------------------------
5701   */
5702
5703  class Popover extends Tooltip {
5704    // Getters
5705    static get Default() {
5706      return Default$2;
5707    }
5708
5709    static get NAME() {
5710      return NAME$3;
5711    }
5712
5713    static get Event() {
5714      return Event$1;
5715    }
5716
5717    static get DefaultType() {
5718      return DefaultType$2;
5719    } // Overrides
5720
5721
5722    isWithContent() {
5723      return this.getTitle() || this._getContent();
5724    }
5725
5726    setContent() {
5727      const tip = this.getTipElement(); // we use append for html objects to maintain js events
5728
5729      this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
5730
5731      let content = this._getContent();
5732
5733      if (typeof content === 'function') {
5734        content = content.call(this._element);
5735      }
5736
5737      this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
5738      tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
5739    } // Private
5740
5741
5742    _addAttachmentClass(attachment) {
5743      this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
5744    }
5745
5746    _getContent() {
5747      return this._element.getAttribute('data-bs-content') || this._config.content;
5748    }
5749
5750    _cleanTipClass() {
5751      const tip = this.getTipElement();
5752      const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
5753
5754      if (tabClass !== null && tabClass.length > 0) {
5755        tabClass.map(token =>
5755 token.trim()).forEach(tClass => tip.classList.remove(tClass));
5756      }
5757    } // Static
5758
5759
5760    static jQueryInterface(config) {
5761      return this.each(function () {
5762        let data = Data.get(this, DATA_KEY$3);
5763
5764        const _config = typeof config === 'object' ? config : null;
5765
5766        if (!data && /dispose|hide/.test(config)) {
5767          return;
5768        }
5769
5770        if (!data) {
5771          data = new Popover(this, _config);
5772          Data.set(this, DATA_KEY$3, data);
5773        }
5774
5775        if (typeof config === 'string') {
5776          if (typeof data[config] === 'undefined') {
5777            throw new TypeError(`No method named "${config}"`);
5778          }
5779
5780          data[config]();
5781        }
5782      });
5783    }
5784
5785  }
5786  /**
5787   * ------------------------------------------------------------------------
5788   * jQuery
5789   * ------------------------------------------------------------------------
5790   * add .Popover to jQuery only if jQuery is present
5791   */
5792
5793
5794  defineJQueryPlugin(Popover);
5795
5796  /**
5797   * --------------------------------------------------------------------------
5798   * Bootstrap (v5.0.1): scrollspy.js
5799   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5800   * --------------------------------------------------------------------------
5801   */
5802  /**
5803   * ------------------------------------------------------------------------
5804   * Constants
5805   * ------------------------------------------------------------------------
5806   */
5807
5808  const NAME$2 = 'scrollspy';
5809  const DATA_KEY$2 = 'bs.scrollspy';
5810  const EVENT_KEY$2 = `.${DATA_KEY$2}`;
5811  const DATA_API_KEY$1 = '.data-api';
5812  const Default$1 = {
5813    offset: 10,
5814    method: 'auto',
5815    target: ''
5816  };
5817  const DefaultType$1 = {
5818    offset: 'number',
5819    method: 'string',
5820    target: '(string|element)'
5821  };
5822  const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;
5823  const EVENT_SCROLL = `scroll${EVENT_KEY$2}`;
5824  const EVENT_LOAD_DATA_API = `load${EVENT_KEY$2}${DATA_API_KEY$1}`;
5825  const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
5826  const CLASS_NAME_ACTIVE$1 = 'active';
5827  const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
5828  const SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
5829  const SELECTOR_NAV_LINKS = '.nav-link';
5830  const SELECTOR_NAV_ITEMS = '.nav-item';
5831  const SELECTOR_LIST_ITEMS = '.list-group-item';
5832  const SELECTOR_DROPDOWN$1 = '.dropdown';
5833  const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
5834  const METHOD_OFFSET = 'offset';
5835  const METHOD_POSITION = 'position';
5836  /**
5837   * ------------------------------------------------------------------------
5838   * Class Definition
5839   * ------------------------------------------------------------------------
5840   */
5841
5842  class ScrollSpy extends BaseComponent {
5843    constructor(element, config) {
5844      super(element);
5845      this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
5846      this._config = this._getConfig(config);
5847      this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
5848      this._offsets = [];
5849      this._targets = [];
5850      this._activeTarget = null;
5851      this._scrollHeight = 0;
5852      EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process());
5853      this.refresh();
5854
5855      this._process();
5856    } // Getters
5857
5858
5859    static get Default() {
5860      return Default$1;
5861    }
5862
5863    static get NAME() {
5864      return NAME$2;
5865    } // Public
5866
5867
5868    refresh() {
5869      const autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
5870      const offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
5871      const offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
5872      this._offsets = [];
5873      this._targets = [];
5874      this._scrollHeight = this._getScrollHeight();
5875      const targets = SelectorEngine.find(this._selector);
5876      targets.map(element => {
5877        const targetSelector = getSelectorFromElement(element);
5878        const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;
5879
5880        if (target) {
5881          const targetBCR = target.getBoundingClientRect();
5882
5883          if (targetBCR.width || targetBCR.height) {
5884            return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
5885          }
5886        }
5887
5888        return null;
5889      }).filter(item => item).sort((a, b) =>
5889 a[0] - b[0]).forEach(item => {
5890        this._offsets.push(item[0]);
5891
5892        this._targets.push(item[1]);
5893      });
5894    }
5895
5896    dispose() {
5897      EventHandler.off(this._scrollElement, EVENT_KEY$2);
5898      super.dispose();
5899    } // Private
5900
5901
5902    _getConfig(config) {
5903      config = { ...Default$1,
5904        ...Manipulator.getDataAttributes(this._element),
5905        ...(typeof config === 'object' && config ? config : {})
5906      };
5907
5908      if (typeof config.target !== 'string' && isElement(config.target)) {
5909        let {
5910          id
5911        } = config.target;
5912
5913        if (!id) {
5914          id = getUID(NAME$2);
5915          config.target.id = id;
5916        }
5917
5918        config.target = `#${id}`;
5919      }
5920
5921      typeCheckConfig(NAME$2, config, DefaultType$1);
5922      return config;
5923    }
5924
5925    _getScrollTop() {
5926      return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
5927    }
5928
5929    _getScrollHeight() {
5930      return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
5931    }
5932
5933    _getOffsetHeight() {
5934      return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
5935    }
5936
5937    _process() {
5938      const scrollTop = this._getScrollTop() + this._config.offset;
5939
5940      const scrollHeight = this._getScrollHeight();
5941
5942      const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
5943
5944      if (this._scrollHeight !== scrollHeight) {
5945        this.refresh();
5946      }
5947
5948      if (scrollTop >= maxScroll) {
5949        const target = this._targets[this._targets.length - 1];
5950
5951        if (this._activeTarget !== target) {
5952          this._activate(target);
5953        }
5954
5955        return;
5956      }
5957
5958      if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
5959        this._activeTarget = null;
5960
5961        this._clear();
5962
5963        return;
5964      }
5965
5966      for (let i = this._offsets.length; i--;) {
5967        const isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
5968
5969        if (isActiveTarget) {
5970          this._activate(this._targets[i]);
5971        }
5972      }
5973    }
5974
5975    _activate(target) {
5976      this._activeTarget = target;
5977
5978      this._clear();
5979
5980      const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
5981
5982      const link = SelectorEngine.findOne(queries.join(','));
5983
5984      if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
5985        SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);
5986        link.classList.add(CLASS_NAME_ACTIVE$1);
5987      } else {
5988        // Set triggered link as active
5989        link.classList.add(CLASS_NAME_ACTIVE$1);
5990        SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {
5991          // Set triggered links parents as active
5992          // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
5993          SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1)); // Handle special case when .nav-link is inside .nav-item
5994
5995          SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(navItem => {
5996            SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1));
5997          });
5998        });
5999      }
6000
6001      EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
6002        relatedTarget: target
6003      });
6004    }
6005
6006    _clear() {
6007      SelectorEngine.find(this._selector).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));
6008    } // Static
6009
6010
6011    static jQueryInterface(config) {
6012      return this.each(function () {
6013        const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {});
6014
6015        if (typeof config !== 'string') {
6016          return;
6017        }
6018
6019        if (typeof data[config] === 'undefined') {
6020          throw new TypeError(`No method named "${config}"`);
6021        }
6022
6023        data[config]();
6024      });
6025    }
6026
6027  }
6028  /**
6029   * ------------------------------------------------------------------------
6030   * Data Api implementation
6031   * ------------------------------------------------------------------------
6032   */
6033
6034
6035  EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
6036    SelectorEngine.find(SELECTOR_DATA_SPY).forEach(spy => new ScrollSpy(spy));
6037  });
6038  /**
6039   * ------------------------------------------------------------------------
6040   * jQuery
6041   * ------------------------------------------------------------------------
6042   * add .ScrollSpy to jQuery only if jQuery is present
6043   */
6044
6045  defineJQueryPlugin(ScrollSpy);
6046
6047  /**
6048   * --------------------------------------------------------------------------
6049   * Bootstrap (v5.0.1): tab.js
6050   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6051   * --------------------------------------------------------------------------
6052   */
6053  /**
6054   * ------------------------------------------------------------------------
6055   * Constants
6056   * ------------------------------------------------------------------------
6057   */
6058
6059  const NAME$1 = 'tab';
6060  const DATA_KEY$1 = 'bs.tab';
6061  const EVENT_KEY$1 = `.${DATA_KEY$1}`;
6062  const DATA_API_KEY = '.data-api';
6063  const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;
6064  const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;
6065  const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;
6066  const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;
6067  const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}${DATA_API_KEY}`;
6068  const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
6069  const CLASS_NAME_ACTIVE = 'active';
6070  const CLASS_NAME_FADE$1 = 'fade';
6071  const CLASS_NAME_SHOW$1 = 'show';
6072  const SELECTOR_DROPDOWN = '.dropdown';
6073  const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
6074  const SELECTOR_ACTIVE = '.active';
6075  const SELECTOR_ACTIVE_UL = ':scope > li > .active';
6076  const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';
6077  const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
6078  const SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
6079  /**
6080   * ------------------------------------------------------------------------
6081   * Class Definition
6082   * ------------------------------------------------------------------------
6083   */
6084
6085  class Tab extends BaseComponent {
6086    // Getters
6087    static get NAME() {
6088      return NAME$1;
6089    } // Public
6090
6091
6092    show() {
6093      if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
6094        return;
6095      }
6096
6097      let previous;
6098      const target = getElementFromSelector(this._element);
6099
6100      const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP);
6101
6102      if (listElement) {
6103        const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
6104        previous = SelectorEngine.find(itemSelector, listElement);
6105        previous = previous[previous.length - 1];
6106      }
6107
6108      const hideEvent = previous ? EventHandler.trigger(previous, EVENT_HIDE$1, {
6109        relatedTarget: this._element
6110      }) : null;
6111      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, {
6112        relatedTarget: previous
6113      });
6114
6115      if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
6116        return;
6117      }
6118
6119      this._activate(this._element, listElement);
6120
6121      const complete = () => {
6122        EventHandler.trigger(previous, EVENT_HIDDEN$1, {
6123          relatedTarget: this._element
6124        });
6125        EventHandler.trigger(this._element, EVENT_SHOWN$1, {
6126          relatedTarget: previous
6127        });
6128      };
6129
6130      if (target) {
6131        this._activate(target, target.parentNode, complete);
6132      } else {
6133        complete();
6134      }
6135    } // Private
6136
6137
6138    _activate(element, container, callback) {
6139      const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE);
6140      const active = activeElements[0];
6141      const isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$1);
6142
6143      const complete = () => this._transitionComplete(element, active, callback);
6144
6145      if (active && isTransitioning) {
6146        active.classList.remove(CLASS_NAME_SHOW$1);
6147
6148        this._queueCallback(complete, element, true);
6149      } else {
6150        complete();
6151      }
6152    }
6153
6154    _transitionComplete(element, active, callback) {
6155      if (active) {
6156        active.classList.remove(CLASS_NAME_ACTIVE);
6157        const dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
6158
6159        if (dropdownChild) {
6160          dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
6161        }
6162
6163        if (active.getAttribute('role') === 'tab') {
6164          active.setAttribute('aria-selected', false);
6165        }
6166      }
6167
6168      element.classList.add(CLASS_NAME_ACTIVE);
6169
6170      if (element.getAttribute('role') === 'tab') {
6171        element.setAttribute('aria-selected', true);
6172      }
6173
6174      reflow(element);
6175
6176      if (element.classList.contains(CLASS_NAME_FADE$1)) {
6177        element.classList.add(CLASS_NAME_SHOW$1);
6178      }
6179
6180      let parent = element.parentNode;
6181
6182      if (parent && parent.nodeName === 'LI') {
6183        parent = parent.parentNode;
6184      }
6185
6186      if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
6187        const dropdownElement = element.closest(SELECTOR_DROPDOWN);
6188
6189        if (dropdownElement) {
6190          SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE));
6191        }
6192
6193        element.setAttribute('aria-expanded', true);
6194      }
6195
6196      if (callback) {
6197        callback();
6198      }
6199    } // Static
6200
6201
6202    static jQueryInterface(config) {
6203      return this.each(function () {
6204        const data = Data.get(this, DATA_KEY$1) || new Tab(this);
6205
6206        if (typeof config === 'string') {
6207          if (typeof data[config] === 'undefined') {
6208            throw new TypeError(`No method named "${config}"`);
6209          }
6210
6211          data[config]();
6212        }
6213      });
6214    }
6215
6216  }
6217  /**
6218   * ------------------------------------------------------------------------
6219   * Data Api implementation
6220   * ------------------------------------------------------------------------
6221   */
6222
6223
6224  EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
6225    if (['A', 'AREA'].includes(this.tagName)) {
6226      event.preventDefault();
6227    }
6228
6229    if (isDisabled(this)) {
6230      return;
6231    }
6232
6233    const data = Data.get(this, DATA_KEY$1) || new Tab(this);
6234    data.show();
6235  });
6236  /**
6237   * ------------------------------------------------------------------------
6238   * jQuery
6239   * ------------------------------------------------------------------------
6240   * add .Tab to jQuery only if jQuery is present
6241   */
6242
6243  defineJQueryPlugin(Tab);
6244
6245  /**
6246   * --------------------------------------------------------------------------
6247   * Bootstrap (v5.0.1): toast.js
6248   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6249   * --------------------------------------------------------------------------
6250   */
6251  /**
6252   * ------------------------------------------------------------------------
6253   * Constants
6254   * ------------------------------------------------------------------------
6255   */
6256
6257  const NAME = 'toast';
6258  const DATA_KEY = 'bs.toast';
6259  const EVENT_KEY = `.${DATA_KEY}`;
6260  const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
6261  const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
6262  const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
6263  const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
6264  const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
6265  const EVENT_HIDE = `hide${EVENT_KEY}`;
6266  const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
6267  const EVENT_SHOW = `show${EVENT_KEY}`;
6268  const EVENT_SHOWN = `shown${EVENT_KEY}`;
6269  const CLASS_NAME_FADE = 'fade';
6270  const CLASS_NAME_HIDE = 'hide';
6271  const CLASS_NAME_SHOW = 'show';
6272  const CLASS_NAME_SHOWING = 'showing';
6273  const DefaultType = {
6274    animation: 'boolean',
6275    autohide: 'boolean',
6276    delay: 'number'
6277  };
6278  const Default = {
6279    animation: true,
6280    autohide: true,
6281    delay: 5000
6282  };
6283  const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]';
6284  /**
6285   * ------------------------------------------------------------------------
6286   * Class Definition
6287   * ------------------------------------------------------------------------
6288   */
6289
6290  class Toast extends BaseComponent {
6291    constructor(element, config) {
6292      super(element);
6293      this._config = this._getConfig(config);
6294      this._timeout = null;
6295      this._hasMouseInteraction = false;
6296      this._hasKeyboardInteraction = false;
6297
6298      this._setListeners();
6299    } // Getters
6300
6301
6302    static get DefaultType() {
6303      return DefaultType;
6304    }
6305
6306    static get Default() {
6307      return Default;
6308    }
6309
6310    static get NAME() {
6311      return NAME;
6312    } // Public
6313
6314
6315    show() {
6316      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
6317
6318      if (showEvent.defaultPrevented) {
6319        return;
6320      }
6321
6322      this._clearTimeout();
6323
6324      if (this._config.animation) {
6325        this._element.classList.add(CLASS_NAME_FADE);
6326      }
6327
6328      const complete = () => {
6329        this._element.classList.remove(CLASS_NAME_SHOWING);
6330
6331        this._element.classList.add(CLASS_NAME_SHOW);
6332
6333        EventHandler.trigger(this._element, EVENT_SHOWN);
6334
6335        this._maybeScheduleHide();
6336      };
6337
6338      this._element.classList.remove(CLASS_NAME_HIDE);
6339
6340      reflow(this._element);
6341
6342      this._element.classList.add(CLASS_NAME_SHOWING);
6343
6344      this._queueCallback(complete, this._element, this._config.animation);
6345    }
6346
6347    hide() {
6348      if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
6349        return;
6350      }
6351
6352      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
6353
6354      if (hideEvent.defaultPrevented) {
6355        return;
6356      }
6357
6358      const complete = () => {
6359        this._element.classList.add(CLASS_NAME_HIDE);
6360
6361        EventHandler.trigger(this._element, EVENT_HIDDEN);
6362      };
6363
6364      this._element.classList.remove(CLASS_NAME_SHOW);
6365
6366      this._queueCallback(complete, this._element, this._config.animation);
6367    }
6368
6369    dispose() {
6370      this._clearTimeout();
6371
6372      if (this._element.classList.contains(CLASS_NAME_SHOW)) {
6373        this._element.classList.remove(CLASS_NAME_SHOW);
6374      }
6375
6376      super.dispose();
6377    } // Private
6378
6379
6380    _getConfig(config) {
6381      config = { ...Default,
6382        ...Manipulator.getDataAttributes(this._element),
6383        ...(typeof config === 'object' && config ? config : {})
6384      };
6385      typeCheckConfig(NAME, config, this.constructor.DefaultType);
6386      return config;
6387    }
6388
6389    _maybeScheduleHide() {
6390      if (!this._config.autohide) {
6391        return;
6392      }
6393
6394      if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
6395        return;
6396      }
6397
6398      this._timeout = setTimeout(() => {
6399        this.hide();
6400      }, this._config.delay);
6401    }
6402
6403    _onInteraction(event, isInteracting) {
6404      switch (event.type) {
6405        case 'mouseover':
6406        case 'mouseout':
6407          this._hasMouseInteraction = isInteracting;
6408          break;
6409
6410        case 'focusin':
6411        case 'focusout':
6412          this._hasKeyboardInteraction = isInteracting;
6413          break;
6414      }
6415
6416      if (isInteracting) {
6417        this._clearTimeout();
6418
6419        return;
6420      }
6421
6422      const nextElement = event.relatedTarget;
6423
6424      if (this._element === nextElement || this._element.contains(nextElement)) {
6425        return;
6426      }
6427
6428      this._maybeScheduleHide();
6429    }
6430
6431    _setListeners() {
6432      EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
6433      EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
6434      EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
6435      EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
6436      EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
6437    }
6438
6439    _clearTimeout() {
6440      clearTimeout(this._timeout);
6441      this._timeout = null;
6442    } // Static
6443
6444
6445    static jQueryInterface(config) {
6446      return this.each(function () {
6447        let data = Data.get(this, DATA_KEY);
6448
6449        const _config = typeof config === 'object' && config;
6450
6451        if (!data) {
6452          data = new Toast(this, _config);
6453        }
6454
6455        if (typeof config === 'string') {
6456          if (typeof data[config] === 'undefined') {
6457            throw new TypeError(`No method named "${config}"`);
6458          }
6459
6460          data[config](this);
6461        }
6462      });
6463    }
6464
6465  }
6466  /**
6467   * ------------------------------------------------------------------------
6468   * jQuery
6469   * ------------------------------------------------------------------------
6470   * add .Toast to jQuery only if jQuery is present
6471   */
6472
6473
6474  defineJQueryPlugin(Toast);
6475
6476  /**
6477   * --------------------------------------------------------------------------
6478   * Bootstrap (v5.0.1): index.umd.js
6479   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6480   * --------------------------------------------------------------------------
6481   */
6482  var index_umd = {
6483    Alert,
6484    Button,
6485    Carousel,
6486    Collapse,
6487    Dropdown,
6488    Modal,
6489    Offcanvas,
6490    Popover,
6491    ScrollSpy,
6492    Tab,
6493    Toast,
6494    Tooltip
6495  };
6496
6497  return index_umd;
6498
6499})));
6500//# sourceMappingURL=bootstrap.js.map;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.