/*! * Bootstrap v4.5.0 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t,e){for(var n=0;n=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};c.jQueryDetection(),e.fn.emulateTransitionEnd=l,e.event.special[c.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var h="alert",u=e.fn[h],d=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=c.getSelectorFromElement(t),i=!1;return n&&(i=document.querySelector(n)),i||(i=e(t).closest(".alert")[0]),i},n._triggerCloseEvent=function(t){var n=e.Event("close.bs.alert");return e(t).trigger(n),n},n._removeElement=function(t){var n=this;if(e(t).removeClass("show"),e(t).hasClass("fade")){var i=c.getTransitionDurationFromElement(t);e(t).one(c.TRANSITION_END,(function(e){return n._destroyElement(t,e)})).emulateTransitionEnd(i)}else this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.alert");o||(o=new t(this),i.data("bs.alert",o)),"close"===n&&o[n](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',d._handleDismiss(new d)),e.fn[h]=d._jQueryInterface,e.fn[h].Constructor=d,e.fn[h].noConflict=function(){return e.fn[h]=u,d._jQueryInterface};var f=e.fn.button,g=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,i=e(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var s=i.querySelector(".active");s&&e(s).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),e(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&e(this._element).toggleClass("active"))},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=t.target,i=n;if(e(n).hasClass("btn")||(n=e(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))t.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"LABEL"===i.tagName&&o&&"checkbox"===o.type&&t.preventDefault(),g._jQueryInterface.call(e(n),"toggle")}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn")[0];e(n).toggleClass("focus",/^focus(in)?$/.test(t.type))})),e(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=t.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(c.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one("slid.bs.carousel",(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?"next":"prev";this._slide(o,this._items[t])}},n.dispose=function(){e(this._element).off(p),e.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=a(a({},v),t),c.typeCheckConfig(m,t,b),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&e(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&y[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&y[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(e(this._element).on("pointerdown.bs.carousel",(function(t){return n(t)})),e(this._element).on("pointerup.bs.carousel",(function(t){return i(t)})),this._element.classList.add("pointer-event")):(e(this._element).on("touchstart.bs.carousel",(function(t){return n(t)})),e(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),e(this._element).on("touchend.bs.carousel",(function(t){return i(t)})))}},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),s=e.Event("slide.bs.carousel",{relatedTarget:t,direction:n,from:o,to:i});return e(this._element).trigger(s),s},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));e(n).removeClass("active");var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass("active")}},n._slide=function(t,n){var i,o,s,r=this,a=this._element.querySelector(".active.carousel-item"),l=this._getItemIndex(a),h=n||a&&this._getItemByDirection(t,a),u=this._getItemIndex(h),d=Boolean(this._interval);if("next"===t?(i="carousel-item-left",o="carousel-item-next",s="left"):(i="carousel-item-right",o="carousel-item-prev",s="right"),h&&e(h).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(h,s).isDefaultPrevented()&&a&&h){this._isSliding=!0,d&&this.pause(),this._setActiveIndicatorElement(h);var f=e.Event("slid.bs.carousel",{relatedTarget:h,direction:s,from:l,to:u});if(e(this._element).hasClass("slide")){e(h).addClass(o),c.reflow(h),e(a).addClass(i),e(h).addClass(i);var g=parseInt(h.getAttribute("data-interval"),10);g?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=g):this._config.interval=this._config.defaultInterval||this._config.interval;var m=c.getTransitionDurationFromElement(a);e(a).one(c.TRANSITION_END,(function(){e(h).removeClass(i+" "+o).addClass("active"),e(a).removeClass("active "+o+" "+i),r._isSliding=!1,setTimeout((function(){return e(r._element).trigger(f)}),0)})).emulateTransitionEnd(m)}else e(a).removeClass("active"),e(h).addClass("active"),this._isSliding=!1,e(this._element).trigger(f);d&&this.cycle()}},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.carousel"),o=a(a({},v),e(this).data());"object"==typeof n&&(o=a(a({},o),n));var s="string"==typeof n?n:o.slide;if(i||(i=new t(this,o),e(this).data("bs.carousel",i)),"number"==typeof n)i.to(n);else if("string"==typeof s){if("undefined"==typeof i[s])throw new TypeError('No method named "'+s+'"');i[s]()}else o.interval&&o.ride&&(i.pause(),i.cycle())}))},t._dataApiClickHandler=function(n){var i=c.getSelectorFromElement(this);if(i){var o=e(i)[0];if(o&&e(o).hasClass("carousel")){var s=a(a({},e(o).data()),e(this).data()),r=this.getAttribute("data-slide-to");r&&(s.interval=!1),t._jQueryInterface.call(e(o),s),r&&e(o).data("bs.carousel").to(r),n.preventDefault()}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return v}}]),t}();e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",E._dataApiClickHandler),e(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=t.length;n0&&(this._selector=r,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var n=t.prototype;return n.toggle=function(){e(this._element).hasClass("show")?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!this._isTransitioning&&!e(this._element).hasClass("show")&&(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(n=null),!(n&&(i=e(n).not(this._selector).data("bs.collapse"))&&i._isTransitioning))){var s=e.Event("show.bs.collapse");if(e(this._element).trigger(s),!s.isDefaultPrevented()){n&&(t._jQueryInterface.call(e(n).not(this._selector),"hide"),i||e(n).data("bs.collapse",null));var r=this._getDimension();e(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[r]=0,this._triggerArray.length&&e(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var a="scroll"+(r[0].toUpperCase()+r.slice(1)),l=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,(function(){e(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[r]="",o.setTransitioning(!1),e(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(l),this._element.style[r]=this._element[a]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass("show")){var n=e.Event("hide.bs.collapse");if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",c.reflow(this._element),e(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var s=0;s0},i._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a(a({},e.offsets),t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},i._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),a(a({},t),this._config.popperConfig)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.dropdown");if(i||(i=new t(this,"object"==typeof n?n:null),e(this).data("bs.dropdown",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},t._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,s=i.length;o0&&r--,40===n.which&&rdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:F,popperConfig:null},Y={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},$=function(){function t(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var i=t.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},i.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var o=c.findShadowRoot(this.element),s=e.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),a=c.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&e(r).addClass("fade");var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var u=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,this._getPopperConfig(h)),e(r).addClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var d=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),"out"===n&&t._leave(null,t)};if(e(this.tip).hasClass("fade")){var f=c.getTransitionDurationFromElement(this.tip);e(this.tip).one(c.TRANSITION_END,d).emulateTransitionEnd(f)}else d()}},i.hide=function(t){var n=this,i=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),s=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(i).removeClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,e(this.tip).hasClass("fade")){var r=c.getTransitionDurationFromElement(i);e(i).one(c.TRANSITION_END,s).emulateTransitionEnd(r)}else s();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},i.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},i.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass("fade show")},i.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=H(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},i.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},i._getPopperConfig=function(t){var e=this;return a(a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),this.config.popperConfig)},i._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a(a({},e.offsets),t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},i._getContainer=function(){return!1===this.config.container?document.body:c.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},i._getAttachment=function(t){return K[t.toUpperCase()]},i._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i="hover"===n?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===n?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},e(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a(a({},this.config),{},{trigger:"manual",selector:""}):this._fixTitle()},i._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},i._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){"show"===n._hoverState&&n.show()}),n.config.delay.show):n.show())},i._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},i._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},i._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==V.indexOf(t)&&delete n[t]})),"number"==typeof(t=a(a(a({},this.constructor.Default),n),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),c.typeCheckConfig(U,t,this.constructor.DefaultType),t.sanitize&&(t.template=H(t.template,t.whiteList,t.sanitizeFn)),t},i._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},i._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(W);null!==n&&n.length&&t.removeClass(n.join(""))},i._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},i._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,o),e(this).data("bs.tooltip",i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return X}},{key:"NAME",get:function(){return U}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Y}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return z}}]),t}();e.fn[U]=$._jQueryInterface,e.fn[U].Constructor=$,e.fn[U].noConflict=function(){return e.fn[U]=M,$._jQueryInterface};var J="popover",G=e.fn[J],Z=new RegExp("(^|\\s)bs-popover\\S+","g"),tt=a(a({},$.Default),{},{placement:"right",trigger:"click",content:"",template:''}),et=a(a({},$.DefaultType),{},{content:"(string|element|function)"}),nt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},it=function(t){var n,i;function s(){return t.apply(this,arguments)||this}i=t,(n=s).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var r=s.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},r.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},r.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(Z);null!==n&&n.length>0&&t.removeClass(n.join(""))},s._jQueryInterface=function(t){return this.each((function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(s,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return tt}},{key:"NAME",get:function(){return J}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return nt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return et}}]),s}($);e.fn[J]=it._jQueryInterface,e.fn[J].Constructor=it,e.fn[J].noConflict=function(){return e.fn[J]=G,it._jQueryInterface};var ot="scrollspy",st=e.fn[ot],rt={offset:10,method:"auto",target:""},at={offset:"number",method:"string",target:"(string|element)"},lt=function(){function t(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return i._process(t)})),this.refresh(),this._process()}var n=t.prototype;return n.refresh=function(){var t=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var n,s=c.getSelectorFromElement(t);if(s&&(n=document.querySelector(s)),n){var r=n.getBoundingClientRect();if(r.width||r.height)return[e(n)[i]().top+o,s]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=a(a({},rt),"object"==typeof t&&t?t:{})).target&&c.isElement(t.target)){var n=e(t.target).attr("id");n||(n=c.getUID(ot),e(t.target).attr("id",n)),t.target="#"+n}return c.typeCheckConfig(ot,t,at),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active":".active";i=(i=e.makeArray(e(o).find(r)))[i.length-1]}var a=e.Event("hide.bs.tab",{relatedTarget:this._element}),l=e.Event("show.bs.tab",{relatedTarget:i});if(i&&e(i).trigger(a),e(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(n=document.querySelector(s)),this._activate(this._element,o);var h=function(){var n=e.Event("hidden.bs.tab",{relatedTarget:t._element}),o=e.Event("shown.bs.tab",{relatedTarget:i});e(i).trigger(n),e(t._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},n.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(t,n,i){var o=this,s=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?e(n).children(".active"):e(n).find("> li > .active"))[0],r=i&&s&&e(s).hasClass("fade"),a=function(){return o._transitionComplete(t,s,i)};if(s&&r){var l=c.getTransitionDurationFromElement(s);e(s).removeClass("show").one(c.TRANSITION_END,a).emulateTransitionEnd(l)}else a()},n._transitionComplete=function(t,n,i){if(n){e(n).removeClass("active");var o=e(n.parentNode).find("> .dropdown-menu .active")[0];o&&e(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),c.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var s=e(t).closest(".dropdown")[0];if(s){var r=[].slice.call(s.querySelectorAll(".dropdown-toggle"));e(r).addClass("active")}t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.tab");if(o||(o=new t(this),i.data("bs.tab",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),ht._jQueryInterface.call(e(this),"show")})),e.fn.tab=ht._jQueryInterface,e.fn.tab.Constructor=ht,e.fn.tab.noConflict=function(){return e.fn.tab=ct,ht._jQueryInterface};var ut=e.fn.toast,dt={animation:"boolean",autohide:"boolean",delay:"number"},ft={animation:!0,autohide:!0,delay:500},gt=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var n=t.prototype;return n.show=function(){var t=this,n=e.Event("show.bs.toast");if(e(this._element).trigger(n),!n.isDefaultPrevented()){this._config.animation&&this._element.classList.add("fade");var i=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),e(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),c.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var t=e.Event("hide.bs.toast");e(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},n.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains("show")&&this._element.classList.remove("show"),e(this._element).off("click.dismiss.bs.toast"),e.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(t){return t=a(a(a({},ft),e(this._element).data()),"object"==typeof t&&t?t:{}),c.typeCheckConfig("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;e(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},n._close=function(){var t=this,n=function(){t._element.classList.add("hide"),e(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.toast");if(o||(o=new t(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"DefaultType",get:function(){return dt}},{key:"Default",get:function(){return ft}}]),t}();e.fn.toast=gt._jQueryInterface,e.fn.toast.Constructor=gt,e.fn.toast.noConflict=function(){return e.fn.toast=ut,gt._jQueryInterface},t.Alert=d,t.Button=g,t.Carousel=E,t.Collapse=D,t.Dropdown=j,t.Modal=R,t.Popover=it,t.Scrollspy=lt,t.Tab=ht,t.Toast=gt,t.Tooltip=$,t.Util=c,Object.defineProperty(t,"__esModule",{value:!0})})); !function(t, e){"object" == typeof exports && "undefined" != typeof module?module.exports = e():"function" == typeof define && define.amd?define(e):t.Sweetalert2 = e()}(this, function(){"use strict"; function r(t){return(r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator?function(t){return typeof t}:function(t){return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype?"symbol":typeof t})(t)}function o(t, e){if (!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t, e){for (var n = 0; n < e.length; n++){var o = e[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value"in o && (o.writable = !0), Object.defineProperty(t, o.key, o)}}function a(t, e, n){return e && i(t.prototype, e), n && i(t, n), t}function s(){return(s = Object.assign || function(t){for (var e = 1; e < arguments.length; e++){var n = arguments[e]; for (var o in n)Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o])}return t}).apply(this, arguments)}function u(t){return(u = Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__ || Object.getPrototypeOf(t)})(t)}function c(t, e){return(c = Object.setPrototypeOf || function(t, e){return t.__proto__ = e, t})(t, e)}function l(t, e, n){return(l = function(){if ("undefined" == typeof Reflect || !Reflect.construct)return!1; if (Reflect.construct.sham)return!1; if ("function" == typeof Proxy)return!0; try{return Date.prototype.toString.call(Reflect.construct(Date, [], function(){})), !0} catch (t){return!1}}()?Reflect.construct:function(t, e, n){var o = [null]; o.push.apply(o, e); var i = new (Function.bind.apply(t, o)); return n && c(i, n.prototype), i}).apply(null, arguments)}function d(t, e){return!e || "object" != typeof e && "function" != typeof e?function(t){if (void 0 === t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t}(t):e}function p(t, e, n){return(p = "undefined" != typeof Reflect && Reflect.get?Reflect.get:function(t, e, n){var o = function(t, e){for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = u(t)); ); return t}(t, e); if (o){var i = Object.getOwnPropertyDescriptor(o, e); return i.get?i.get.call(n):i.value}})(t, e, n || t)}function f(e){return Object.keys(e).map(function(t){return e[t]})}function m(t){return Array.prototype.slice.call(t)}function g(t){console.error("".concat(e, " ").concat(t))}function h(t, e){!function(t){ - 1 === n.indexOf(t) && (n.push(t), w(t))}('"'.concat(t, '" is deprecated and will be removed in the next major release. Please use "').concat(e, '" instead.'))}function v(t){return t && Promise.resolve(t) === t}function t(t){var e = {}; for (var n in t)e[t[n]] = "swal2-" + t[n]; return e}function b(t, e){return t.classList.contains(e)}function y(t, e, n){if (function(e){m(e.classList).forEach(function(t){ - 1 === f(x).indexOf(t) && - 1 === f(S).indexOf(t) && e.classList.remove(t)})}(t), e && e[n]){if ("string" != typeof e[n] && !e[n].forEach)return w("Invalid type of customClass.".concat(n, '! Expected string or iterable object, got "').concat(r(e[n]), '"')); rt(t, e[n])}}var e = "SweetAlert2:", w = function(t){console.warn("".concat(e, " ").concat(t))}, n = [], C = function(t){return"function" == typeof t?t():t}, k = Object.freeze({cancel:"cancel", backdrop:"backdrop", close:"close", esc:"esc", timer:"timer"}), x = t(["container", "shown", "height-auto", "iosfix", "popup", "modal", "no-backdrop", "toast", "toast-shown", "toast-column", "show", "hide", "noanimation", "close", "title", "header", "content", "actions", "confirm", "cancel", "footer", "icon", "image", "input", "file", "range", "select", "radio", "checkbox", "label", "textarea", "inputerror", "validation-message", "progress-steps", "active-progress-step", "progress-step", "progress-step-line", "loading", "styled", "top", "top-start", "top-end", "top-left", "top-right", "center", "center-start", "center-end", "center-left", "center-right", "bottom", "bottom-start", "bottom-end", "bottom-left", "bottom-right", "grow-row", "grow-column", "grow-fullscreen", "rtl"]), S = t(["success", "warning", "info", "question", "error"]), P = {previousBodyPadding:null}; function B(t, e){if (!e)return null; switch (e){case"select":case"textarea":case"file":return st(t, x[e]); case"checkbox":return t.querySelector(".".concat(x.checkbox, " input")); case"radio":return t.querySelector(".".concat(x.radio, " input:checked")) || t.querySelector(".".concat(x.radio, " input:first-child")); case"range":return t.querySelector(".".concat(x.range, " input")); default:return st(t, x.input)}}function A(t){if (t.focus(), "file" !== t.type){var e = t.value; t.value = "", t.value = e}}function E(t, e, n){t && e && ("string" == typeof e && (e = e.split(/\s+/).filter(Boolean)), e.forEach(function(e){t.forEach?t.forEach(function(t){n?t.classList.add(e):t.classList.remove(e)}):n?t.classList.add(e):t.classList.remove(e)}))}function T(t, e, n){n || 0 === parseInt(n)?t.style[e] = "number" == typeof n?n + "px":n:t.style.removeProperty(e)}function L(t, e){var n = 1 < arguments.length && void 0 !== e?e:"flex"; t.style.opacity = "", t.style.display = n}function O(t){t.style.opacity = "", t.style.display = "none"}function M(t, e, n){e?L(t, n):O(t)}function V(t){return!(!t || !(t.offsetWidth || t.offsetHeight || t.getClientRects().length))}function j(t){var e = window.getComputedStyle(t), n = parseFloat(e.getPropertyValue("animation-duration") || "0"), o = parseFloat(e.getPropertyValue("transition-duration") || "0"); return 0 < n || 0 < o}function H(){return document.body.querySelector("." + x.container)}function I(t){var e = H(); return e?e.querySelector(t):null}function q(t){return I("." + t)}function R(){return q(x.popup)}function D(){var t = R(); return m(t.querySelectorAll("." + x.icon))}function N(){var t = D().filter(function(t){return V(t)}); return t.length?t[0]:null}function U(){return q(x.title)}function F(){return q(x.content)}function _(){return q(x.image)}function z(){return q(x["progress-steps"])}function W(){return q(x["validation-message"])}function K(){return I("." + x.actions + " ." + x.confirm)}function Y(){return I("." + x.actions + " ." + x.cancel)}function Z(){return q(x.actions)}function Q(){return q(x.header)}function $(){return q(x.footer)}function J(){return q(x.close)}function X(){var t = m(R().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t, e){return t = parseInt(t.getAttribute("tabindex")), (e = parseInt(e.getAttribute("tabindex"))) < t?1:t < e? - 1:0}), e = m(R().querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n')).filter(function(t){return"-1" !== t.getAttribute("tabindex")}); return function(t){for (var e = [], n = 0; n < t.length; n++) - 1 === e.indexOf(t[n]) && e.push(t[n]); return e}(t.concat(e)).filter(function(t){return V(t)})}function G(){return!ut() && !document.body.classList.contains(x["no-backdrop"])}function tt(){return"undefined" == typeof window || "undefined" == typeof document}function et(t){Fe.isVisible() && it !== t.target.value && Fe.resetValidationMessage(), it = t.target.value}function nt(t, e){t instanceof HTMLElement?e.appendChild(t):"object" === r(t)?dt(e, t):t && (e.innerHTML = t)}function ot(t, e){var n = Z(), o = K(), i = Y(); e.showConfirmButton || e.showCancelButton || O(n), y(n, e.customClass, "actions"), ft(o, "confirm", e), ft(i, "cancel", e), e.buttonsStyling?function(t, e, n){rt([t, e], x.styled), n.confirmButtonColor && (t.style.backgroundColor = n.confirmButtonColor); n.cancelButtonColor && (e.style.backgroundColor = n.cancelButtonColor); var o = window.getComputedStyle(t).getPropertyValue("background-color"); t.style.borderLeftColor = o, t.style.borderRightColor = o}(o, i, e):(at([o, i], x.styled), o.style.backgroundColor = o.style.borderLeftColor = o.style.borderRightColor = "", i.style.backgroundColor = i.style.borderLeftColor = i.style.borderRightColor = ""), e.reverseButtons && o.parentNode.insertBefore(i, o)}var it, rt = function(t, e){E(t, e, !0)}, at = function(t, e){E(t, e, !1)}, st = function(t, e){for (var n = 0; n < t.childNodes.length; n++)if (b(t.childNodes[n], e))return t.childNodes[n]}, ut = function(){return document.body.classList.contains(x["toast-shown"])}, ct = '\n
\n
\n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n').replace(/(^|\n)\s*/g, ""), lt = function(t){if (function(){var t = H(); t && (t.parentNode.removeChild(t), at([document.documentElement, document.body], [x["no-backdrop"], x["toast-shown"], x["has-column"]]))}(), tt())g("SweetAlert2 requires document to initialize"); else{var e = document.createElement("div"); e.className = x.container, e.innerHTML = ct; var n = function(t){return"string" == typeof t?document.querySelector(t):t}(t.target); n.appendChild(e), function(t){var e = R(); e.setAttribute("role", t.toast?"alert":"dialog"), e.setAttribute("aria-live", t.toast?"polite":"assertive"), t.toast || e.setAttribute("aria-modal", "true")}(t), function(t){"rtl" === window.getComputedStyle(t).direction && rt(H(), x.rtl)}(n), function(){var t = F(), e = st(t, x.input), n = st(t, x.file), o = t.querySelector(".".concat(x.range, " input")), i = t.querySelector(".".concat(x.range, " output")), r = st(t, x.select), a = t.querySelector(".".concat(x.checkbox, " input")), s = st(t, x.textarea); e.oninput = et, n.onchange = et, r.onchange = et, a.onchange = et, s.oninput = et, o.oninput = function(t){et(t), i.value = o.value}, o.onchange = function(t){et(t), o.nextSibling.value = o.value}}()}}, dt = function(t, e){if (t.innerHTML = "", 0 in e)for (var n = 0; n in e; n++)t.appendChild(e[n].cloneNode(!0)); else t.appendChild(e.cloneNode(!0))}, pt = function(){if (tt())return!1; var t = document.createElement("div"), e = {WebkitAnimation:"webkitAnimationEnd", OAnimation:"oAnimationEnd oanimationend", animation:"animationend"}; for (var n in e)if (Object.prototype.hasOwnProperty.call(e, n) && void 0 !== t.style[n])return e[n]; return!1}(); function ft(t, e, n){M(t, n["showC" + e.substring(1) + "Button"], "inline-block"), t.innerHTML = n[e + "ButtonText"], t.setAttribute("aria-label", n[e + "ButtonAriaLabel"]), t.className = x[e], y(t, n.customClass, e + "Button"), rt(t, n[e + "ButtonClass"])}function mt(t, e){var n = H(); n && (function(t, e){"string" == typeof e?t.style.background = e:e || rt([document.documentElement, document.body], x["no-backdrop"])}(n, e.backdrop), !e.backdrop && e.allowOutsideClick && w('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'), function(t, e){e in x?rt(t, x[e]):(w('The "position" parameter is not valid, defaulting to "center"'), rt(t, x.center))}(n, e.position), function(t, e){if (e && "string" == typeof e){var n = "grow-" + e; n in x && rt(t, x[n])}}(n, e.grow), y(n, e.customClass, "container"), e.customContainerClass && rt(n, e.customContainerClass))}function gt(t, e){t.placeholder && !e.inputPlaceholder || (t.placeholder = e.inputPlaceholder)}var ht = {promise:new WeakMap, innerParams:new WeakMap, domCache:new WeakMap}, vt = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], bt = function(t){if (!kt[t.input])return g('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input, '"')); var e = Ct(t.input), n = kt[t.input](e, t); L(n), setTimeout(function(){A(n)})}, yt = function(t, e){var n = B(F(), t); if (n)for (var o in function(t){for (var e = 0; e < t.attributes.length; e++){var n = t.attributes[e].name; - 1 === ["type", "value", "style"].indexOf(n) && t.removeAttribute(n)}}(n), e)"range" === t && "placeholder" === o || n.setAttribute(o, e[o])}, wt = function(t){var e = Ct(t.input); t.inputClass && rt(e, t.inputClass), t.customClass && rt(e, t.customClass.input)}, Ct = function(t){var e = x[t]?x[t]:x.input; return st(F(), e)}, kt = {}; kt.text = kt.email = kt.password = kt.number = kt.tel = kt.url = function(t, e){return"string" == typeof e.inputValue || "number" == typeof e.inputValue?t.value = e.inputValue:v(e.inputValue) || w('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(r(e.inputValue), '"')), gt(t, e), t.type = e.input, t}, kt.file = function(t, e){return gt(t, e), t}, kt.range = function(t, e){var n = t.querySelector("input"), o = t.querySelector("output"); return n.value = e.inputValue, n.type = e.input, o.value = e.inputValue, t}, kt.select = function(t, e){if (t.innerHTML = "", e.inputPlaceholder){var n = document.createElement("option"); n.innerHTML = e.inputPlaceholder, n.value = "", n.disabled = !0, n.selected = !0, t.appendChild(n)}return t}, kt.radio = function(t){return t.innerHTML = "", t}, kt.checkbox = function(t, e){var n = B(F(), "checkbox"); return n.value = 1, n.id = x.checkbox, n.checked = Boolean(e.inputValue), t.querySelector("span").innerHTML = e.inputPlaceholder, t}, kt.textarea = function(e, t){if (e.value = t.inputValue, gt(e, t), "MutationObserver"in window){var n = parseInt(window.getComputedStyle(R()).width), o = parseInt(window.getComputedStyle(R()).paddingLeft) + parseInt(window.getComputedStyle(R()).paddingRight); new MutationObserver(function(){var t = e.offsetWidth + o; R().style.width = n < t?t + "px":null}).observe(e, {attributes:!0, attributeFilter:["style"]})}return e}; function xt(t, e){var n = F().querySelector("#" + x.content); e.html?(nt(e.html, n), L(n, "block")):e.text?(n.textContent = e.text, L(n, "block")):O(n), function(t, o){var i = F(), e = ht.innerParams.get(t), r = !e || o.input !== e.input; vt.forEach(function(t){var e = x[t], n = st(i, e); yt(t, o.inputAttributes), n.className = e, r && O(n)}), o.input && (r && bt(o), wt(o))}(t, e), y(F(), e.customClass, "content")}function St(t, i){var r = z(); if (!i.progressSteps || 0 === i.progressSteps.length)return O(r); L(r), r.innerHTML = ""; var a = parseInt(null === i.currentProgressStep?Fe.getQueueStep():i.currentProgressStep); a >= i.progressSteps.length && w("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), i.progressSteps.forEach(function(t, e){var n = function(t){var e = document.createElement("li"); return rt(e, x["progress-step"]), e.innerHTML = t, e}(t); if (r.appendChild(n), e === a && rt(n, x["active-progress-step"]), e !== i.progressSteps.length - 1){var o = function(t){var e = document.createElement("li"); return rt(e, x["progress-step-line"]), t.progressStepsDistance && (e.style.width = t.progressStepsDistance), e}(t); r.appendChild(o)}})}function Pt(t, e){var n = Q(); y(n, e.customClass, "header"), St(0, e), function(t, e){var n = ht.innerParams.get(t); if (n && e.type === n.type && N())y(N(), e.customClass, "icon"); else if (Et(), e.type)if (Tt(), - 1 !== Object.keys(S).indexOf(e.type)){var o = I(".".concat(x.icon, ".").concat(S[e.type])); L(o), y(o, e.customClass, "icon"), E(o, "swal2-animate-".concat(e.type, "-icon"), e.animation)} else g('Unknown type! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.type, '"'))}(t, e), function(t, e){var n = _(); if (!e.imageUrl)return O(n); L(n), n.setAttribute("src", e.imageUrl), n.setAttribute("alt", e.imageAlt), T(n, "width", e.imageWidth), T(n, "height", e.imageHeight), n.className = x.image, y(n, e.customClass, "image"), e.imageClass && rt(n, e.imageClass)}(0, e), function(t, e){var n = U(); M(n, e.title || e.titleText), e.title && nt(e.title, n), e.titleText && (n.innerText = e.titleText), y(n, e.customClass, "title")}(0, e), function(t, e){var n = J(); n.innerHTML = e.closeButtonHtml, y(n, e.customClass, "closeButton"), M(n, e.showCloseButton), n.setAttribute("aria-label", e.closeButtonAriaLabel)}(0, e)}function Bt(t, e){!function(t, e){var n = R(); T(n, "width", e.width), T(n, "padding", e.padding), e.background && (n.style.background = e.background), n.className = x.popup, e.toast?(rt([document.documentElement, document.body], x["toast-shown"]), rt(n, x.toast)):rt(n, x.modal), y(n, e.customClass, "popup"), "string" == typeof e.customClass && rt(n, e.customClass), E(n, x.noanimation, !e.animation)}(0, e), mt(0, e), Pt(t, e), xt(t, e), ot(0, e), function(t, e){var n = $(); M(n, e.footer), e.footer && nt(e.footer, n), y(n, e.customClass, "footer")}(0, e), "function" == typeof e.onRender && e.onRender(R())}function At(){return K() && K().click()}var Et = function(){for (var t = D(), e = 0; e < t.length; e++)O(t[e])}, Tt = function(){for (var t = R(), e = window.getComputedStyle(t).getPropertyValue("background-color"), n = t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"), o = 0; o < n.length; o++)n[o].style.backgroundColor = e}; function Lt(){var t = R(); t || Fe.fire(""), t = R(); var e = Z(), n = K(), o = Y(); L(e), L(n), rt([t, e], x.loading), n.disabled = !0, o.disabled = !0, t.setAttribute("data-loading", !0), t.setAttribute("aria-busy", !0), t.focus()}function Ot(){return new Promise(function(t){var e = window.scrollX, n = window.scrollY; Ht.restoreFocusTimeout = setTimeout(function(){Ht.previousActiveElement && Ht.previousActiveElement.focus?(Ht.previousActiveElement.focus(), Ht.previousActiveElement = null):document.body && document.body.focus(), t()}, 100), void 0 !== e && void 0 !== n && window.scrollTo(e, n)})}function Mt(t){return Object.prototype.hasOwnProperty.call(It, t)}function Vt(t){return Rt[t]}var jt = [], Ht = {}, It = {title:"", titleText:"", text:"", html:"", footer:"", type:null, toast:!1, customClass:"", customContainerClass:"", target:"body", backdrop:!0, animation:!0, heightAuto:!0, allowOutsideClick:!0, allowEscapeKey:!0, allowEnterKey:!0, stopKeydownPropagation:!0, keydownListenerCapture:!1, showConfirmButton:!0, showCancelButton:!1, preConfirm:null, confirmButtonText:"OK", confirmButtonAriaLabel:"", confirmButtonColor:null, confirmButtonClass:"", cancelButtonText:"Cancel", cancelButtonAriaLabel:"", cancelButtonColor:null, cancelButtonClass:"", buttonsStyling:!0, reverseButtons:!1, focusConfirm:!0, focusCancel:!1, showCloseButton:!1, closeButtonHtml:"×", closeButtonAriaLabel:"Close this dialog", showLoaderOnConfirm:!1, imageUrl:null, imageWidth:null, imageHeight:null, imageAlt:"", imageClass:"", timer:null, width:null, padding:null, background:null, input:null, inputPlaceholder:"", inputValue:"", inputOptions:{}, inputAutoTrim:!0, inputClass:"", inputAttributes:{}, inputValidator:null, validationMessage:null, grow:!1, position:"center", progressSteps:[], currentProgressStep:null, progressStepsDistance:null, onBeforeOpen:null, onOpen:null, onRender:null, onClose:null, onAfterClose:null, scrollbarPadding:!0}, qt = ["title", "titleText", "text", "html", "type", "customClass", "showConfirmButton", "showCancelButton", "confirmButtonText", "confirmButtonAriaLabel", "confirmButtonColor", "confirmButtonClass", "cancelButtonText", "cancelButtonAriaLabel", "cancelButtonColor", "cancelButtonClass", "buttonsStyling", "reverseButtons", "imageUrl", "imageWidth", "imageHeigth", "imageAlt", "imageClass", "progressSteps", "currentProgressStep"], Rt = {customContainerClass:"customClass", confirmButtonClass:"customClass", cancelButtonClass:"customClass", imageClass:"customClass", inputClass:"customClass"}, Dt = ["allowOutsideClick", "allowEnterKey", "backdrop", "focusConfirm", "focusCancel", "heightAuto", "keydownListenerCapture"], Nt = Object.freeze({isValidParameter:Mt, isUpdatableParameter:function(t){return - 1 !== qt.indexOf(t)}, isDeprecatedParameter:Vt, argsToParams:function(n){var o = {}; switch (r(n[0])){case"object":s(o, n[0]); break; default:["title", "html", "type"].forEach(function(t, e){switch (r(n[e])){case"string":o[t] = n[e]; break; case"undefined":break; default:g("Unexpected type of ".concat(t, '! Expected "string", got ').concat(r(n[e])))}})}return o}, isVisible:function(){return V(R())}, clickConfirm:At, clickCancel:function(){return Y() && Y().click()}, getContainer:H, getPopup:R, getTitle:U, getContent:F, getImage:_, getIcon:N, getIcons:D, getCloseButton:J, getActions:Z, getConfirmButton:K, getCancelButton:Y, getHeader:Q, getFooter:$, getFocusableElements:X, getValidationMessage:W, isLoading:function(){return R().hasAttribute("data-loading")}, fire:function(){for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)e[n] = arguments[n]; return l(this, e)}, mixin:function(n){return function(t){function e(){return o(this, e), d(this, u(e).apply(this, arguments))}return function(t, e){if ("function" != typeof e && null !== e)throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, {constructor:{value:t, writable:!0, configurable:!0}}), e && c(t, e)}(e, t), a(e, [{key:"_main", value:function(t){return p(u(e.prototype), "_main", this).call(this, s({}, n, t))}}]), e}(this)}, queue:function(t){var r = this; jt = t; function a(t, e){jt = [], document.body.removeAttribute("data-swal2-queue-step"), t(e)}var s = []; return new Promise(function(i){!function e(n, o){n < jt.length?(document.body.setAttribute("data-swal2-queue-step", n), r.fire(jt[n]).then(function(t){void 0 !== t.value?(s.push(t.value), e(n + 1, o)):a(i, {dismiss:t.dismiss})})):a(i, {value:s})}(0)})}, getQueueStep:function(){return document.body.getAttribute("data-swal2-queue-step")}, insertQueueStep:function(t, e){return e && e < jt.length?jt.splice(e, 0, t):jt.push(t)}, deleteQueueStep:function(t){void 0 !== jt[t] && jt.splice(t, 1)}, showLoading:Lt, enableLoading:Lt, getTimerLeft:function(){return Ht.timeout && Ht.timeout.getTimerLeft()}, stopTimer:function(){return Ht.timeout && Ht.timeout.stop()}, resumeTimer:function(){return Ht.timeout && Ht.timeout.start()}, toggleTimer:function(){var t = Ht.timeout; return t && (t.running?t.stop():t.start())}, increaseTimer:function(t){return Ht.timeout && Ht.timeout.increase(t)}, isTimerRunning:function(){return Ht.timeout && Ht.timeout.isRunning()}}); function Ut(){var t = ht.innerParams.get(this), e = ht.domCache.get(this); t.showConfirmButton || (O(e.confirmButton), t.showCancelButton || O(e.actions)), at([e.popup, e.actions], x.loading), e.popup.removeAttribute("aria-busy"), e.popup.removeAttribute("data-loading"), e.confirmButton.disabled = !1, e.cancelButton.disabled = !1}function Ft(){null === P.previousBodyPadding && document.body.scrollHeight > window.innerHeight && (P.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = P.previousBodyPadding + function(){if ("ontouchstart"in window || navigator.msMaxTouchPoints)return 0; var t = document.createElement("div"); t.style.width = "50px", t.style.height = "50px", t.style.overflow = "scroll", document.body.appendChild(t); var e = t.offsetWidth - t.clientWidth; return document.body.removeChild(t), e}() + "px")}function _t(){return!!window.MSInputMethodContext && !!document.documentMode}function zt(){var t = H(), e = R(); t.style.removeProperty("align-items"), e.offsetTop < 0 && (t.style.alignItems = "flex-start")}var Wt = function(){var e, n = H(); n.ontouchstart = function(t){e = t.target === n || !function(t){return!!(t.scrollHeight > t.clientHeight)}(n) && "INPUT" !== t.target.tagName}, n.ontouchmove = function(t){e && (t.preventDefault(), t.stopPropagation())}}, Kt = {swalPromiseResolve:new WeakMap}; function Yt(t, e, n, o){n?Jt(t, o):(Ot().then(function(){return Jt(t, o)}), Ht.keydownTarget.removeEventListener("keydown", Ht.keydownHandler, {capture:Ht.keydownListenerCapture}), Ht.keydownHandlerAdded = !1), e.parentNode && e.parentNode.removeChild(e), G() && (null !== P.previousBodyPadding && (document.body.style.paddingRight = P.previousBodyPadding + "px", P.previousBodyPadding = null), function(){if (b(document.body, x.iosfix)){var t = parseInt(document.body.style.top, 10); at(document.body, x.iosfix), document.body.style.top = "", document.body.scrollTop = - 1 * t}}(), "undefined" != typeof window && _t() && window.removeEventListener("resize", zt), m(document.body.children).forEach(function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden", t.getAttribute("data-previous-aria-hidden")), t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")})), at([document.documentElement, document.body], [x.shown, x["height-auto"], x["no-backdrop"], x["toast-shown"], x["toast-column"]])}function Zt(t){var e = R(); if (e && !b(e, x.hide)){var n = ht.innerParams.get(this); if (n){var o = Kt.swalPromiseResolve.get(this); at(e, x.show), rt(e, x.hide), function(t, e, n){var o = H(), i = pt && j(e), r = n.onClose, a = n.onAfterClose; if (r !== null && typeof r === "function"){r(e)}if (i){$t(t, e, o, a)} else{Yt(t, o, ut(), a)}}(this, e, n), o(t || {})}}}function Qt(t){for (var e in t)t[e] = new WeakMap}var $t = function(t, e, n, o){Ht.swalCloseEventFinishedCallback = Yt.bind(null, t, n, ut(), o), e.addEventListener(pt, function(t){t.target === e && (Ht.swalCloseEventFinishedCallback(), delete Ht.swalCloseEventFinishedCallback)})}, Jt = function(t, e){setTimeout(function(){null !== e && "function" == typeof e && e(), R() || function(t){delete t.params, delete Ht.keydownHandler, delete Ht.keydownTarget, Qt(ht), Qt(Kt)}(t)})}; function Xt(t, e, n){var o = ht.domCache.get(t); e.forEach(function(t){o[t].disabled = n})}function Gt(t, e){if (!t)return!1; if ("radio" === t.type)for (var n = t.parentNode.parentNode.querySelectorAll("input"), o = 0; o < n.length; o++)n[o].disabled = e; else t.disabled = e}var te = function(){function n(t, e){o(this, n), this.callback = t, this.remaining = e, this.running = !1, this.start()}return a(n, [{key:"start", value:function(){return this.running || (this.running = !0, this.started = new Date, this.id = setTimeout(this.callback, this.remaining)), this.remaining}}, {key:"stop", value:function(){return this.running && (this.running = !1, clearTimeout(this.id), this.remaining -= new Date - this.started), this.remaining}}, {key:"increase", value:function(t){var e = this.running; return e && this.stop(), this.remaining += t, e && this.start(), this.remaining}}, {key:"getTimerLeft", value:function(){return this.running && (this.stop(), this.start()), this.remaining}}, {key:"isRunning", value:function(){return this.running}}]), n}(), ee = {email:function(t, e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e || "Invalid email address")}, url:function(t, e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e || "Invalid URL")}}; function ne(t){!function(e){e.inputValidator || Object.keys(ee).forEach(function(t){e.input === t && (e.inputValidator = ee[t])})}(t), t.showLoaderOnConfirm && !t.preConfirm && w("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"), t.animation = C(t.animation), function(t){t.target && ("string" != typeof t.target || document.querySelector(t.target)) && ("string" == typeof t.target || t.target.appendChild) || (w('Target parameter is not valid, defaulting to "body"'), t.target = "body")}(t), "string" == typeof t.title && (t.title = t.title.split("\n").join("
    ")), lt(t)}function oe(t, e){t.removeEventListener(pt, oe), e.style.overflowY = "auto"}function ie(t){var e = H(), n = R(); "function" == typeof t.onBeforeOpen && t.onBeforeOpen(n), me(e, n, t), pe(e, n), G() && fe(e, t.scrollbarPadding), ut() || Ht.previousActiveElement || (Ht.previousActiveElement = document.activeElement), "function" == typeof t.onOpen && setTimeout(function(){return t.onOpen(n)})}function re(t, e){"select" === e.input || "radio" === e.input?be(t, e): - 1 !== ["text", "email", "number", "tel", "textarea"].indexOf(e.input) && v(e.inputValue) && ye(t, e)}function ae(t, e){t.disableButtons(), e.input?ke(t, e):xe(t, e, !0)}function se(t, e){t.disableButtons(), e(k.cancel)}function ue(t, e){t.closePopup({value:e})}function ce(e, t, n, o){t.keydownTarget && t.keydownHandlerAdded && (t.keydownTarget.removeEventListener("keydown", t.keydownHandler, {capture:t.keydownListenerCapture}), t.keydownHandlerAdded = !1), n.toast || (t.keydownHandler = function(t){return Be(e, t, n, o)}, t.keydownTarget = n.keydownListenerCapture?window:R(), t.keydownListenerCapture = n.keydownListenerCapture, t.keydownTarget.addEventListener("keydown", t.keydownHandler, {capture:t.keydownListenerCapture}), t.keydownHandlerAdded = !0)}function le(t, e, n){for (var o = X(), i = 0; i < o.length; i++)return(e += n) === o.length?e = 0: - 1 === e && (e = o.length - 1), o[e].focus(); R().focus()}function de(t, e, n){e.toast?Oe(t, e, n):(Ve(t), je(t), He(t, e, n))}var pe = function(t, e){pt && j(e)?(t.style.overflowY = "hidden", e.addEventListener(pt, oe.bind(null, e, t))):t.style.overflowY = "auto"}, fe = function(t, e){!function(){if ((/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || "MacIntel" === navigator.platform && 1 < navigator.maxTouchPoints) && !b(document.body, x.iosfix)){var t = document.body.scrollTop; document.body.style.top = - 1 * t + "px", rt(document.body, x.iosfix), Wt()}}(), "undefined" != typeof window && _t() && (zt(), window.addEventListener("resize", zt)), m(document.body.children).forEach(function(t){t === H() || function(t, e){if ("function" == typeof t.contains)return t.contains(e)}(t, H()) || (t.hasAttribute("aria-hidden") && t.setAttribute("data-previous-aria-hidden", t.getAttribute("aria-hidden")), t.setAttribute("aria-hidden", "true"))}), e && Ft(), setTimeout(function(){t.scrollTop = 0})}, me = function(t, e, n){n.animation && rt(e, x.show), L(e), rt([document.documentElement, document.body, t], x.shown), n.heightAuto && n.backdrop && !n.toast && rt([document.documentElement, document.body], x["height-auto"])}, ge = function(t){return t.checked?1:0}, he = function(t){return t.checked?t.value:null}, ve = function(t){return t.files.length?null !== t.getAttribute("multiple")?t.files:t.files[0]:null}, be = function(e, n){function o(t){return we[n.input](i, Ce(t), n)}var i = F(); v(n.inputOptions)?(Lt(), n.inputOptions.then(function(t){e.hideLoading(), o(t)})):"object" === r(n.inputOptions)?o(n.inputOptions):g("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(r(n.inputOptions)))}, ye = function(e, n){var o = e.getInput(); O(o), n.inputValue.then(function(t){o.value = "number" === n.input?parseFloat(t) || 0:t + "", L(o), o.focus(), e.hideLoading()}).catch(function(t){g("Error in inputValue promise: " + t), o.value = "", L(o), o.focus(), e.hideLoading()})}, we = {select:function(t, e, i){var r = st(t, x.select); e.forEach(function(t){var e = t[0], n = t[1], o = document.createElement("option"); o.value = e, o.innerHTML = n, i.inputValue.toString() === e.toString() && (o.selected = !0), r.appendChild(o)}), r.focus()}, radio:function(t, e, a){var s = st(t, x.radio); e.forEach(function(t){var e = t[0], n = t[1], o = document.createElement("input"), i = document.createElement("label"); o.type = "radio", o.name = x.radio, o.value = e, a.inputValue.toString() === e.toString() && (o.checked = !0); var r = document.createElement("span"); r.innerHTML = n, r.className = x.label, i.appendChild(o), i.appendChild(r), s.appendChild(i)}); var n = s.querySelectorAll("input"); n.length && n[0].focus()}}, Ce = function(e){var n = []; return"undefined" != typeof Map && e instanceof Map?e.forEach(function(t, e){n.push([e, t])}):Object.keys(e).forEach(function(t){n.push([t, e[t]])}), n}, ke = function(e, n){var o = function(t, e){var n = t.getInput(); if (!n)return null; switch (e.input){case"checkbox":return ge(n); case"radio":return he(n); case"file":return ve(n); default:return e.inputAutoTrim?n.value.trim():n.value}}(e, n); n.inputValidator?(e.disableInput(), Promise.resolve().then(function(){return n.inputValidator(o, n.validationMessage)}).then(function(t){e.enableButtons(), e.enableInput(), t?e.showValidationMessage(t):xe(e, n, o)})):e.getInput().checkValidity()?xe(e, n, o):(e.enableButtons(), e.showValidationMessage(n.validationMessage))}, xe = function(e, t, n){(t.showLoaderOnConfirm && Lt(), t.preConfirm)?(e.resetValidationMessage(), Promise.resolve().then(function(){return t.preConfirm(n, t.validationMessage)}).then(function(t){V(W()) || !1 === t?e.hideLoading():ue(e, void 0 === t?n:t)})):ue(e, n)}, Se = ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Left", "Right", "Up", "Down"], Pe = ["Escape", "Esc"], Be = function(t, e, n, o){n.stopKeydownPropagation && e.stopPropagation(), "Enter" === e.key?Ae(t, e, n):"Tab" === e.key?Ee(e, n): - 1 !== Se.indexOf(e.key)?Te(): - 1 !== Pe.indexOf(e.key) && Le(e, n, o)}, Ae = function(t, e, n){if (!e.isComposing && e.target && t.getInput() && e.target.outerHTML === t.getInput().outerHTML){if ( - 1 !== ["textarea", "file"].indexOf(n.input))return; At(), e.preventDefault()}}, Ee = function(t, e){for (var n = t.target, o = X(), i = - 1, r = 0; r < o.length; r++)if (n === o[r]){i = r; break}t.shiftKey?le(0, i, - 1):le(0, i, 1), t.stopPropagation(), t.preventDefault()}, Te = function(){var t = K(), e = Y(); document.activeElement === t && V(e)?e.focus():document.activeElement === e && V(t) && t.focus()}, Le = function(t, e, n){C(e.allowEscapeKey) && (t.preventDefault(), n(k.esc))}, Oe = function(t, e, n){t.popup.onclick = function(){e.showConfirmButton || e.showCancelButton || e.showCloseButton || e.input || n(k.close)}}, Me = !1, Ve = function(e){e.popup.onmousedown = function(){e.container.onmouseup = function(t){e.container.onmouseup = void 0, t.target === e.container && (Me = !0)}}}, je = function(e){e.container.onmousedown = function(){e.popup.onmouseup = function(t){e.popup.onmouseup = void 0, t.target !== e.popup && !e.popup.contains(t.target) || (Me = !0)}}}, He = function(e, n, o){e.container.onclick = function(t){Me?Me = !1:t.target === e.container && C(n.allowOutsideClick) && o(k.backdrop)}}; var Ie = function(t, e, n){e.timer && (t.timeout = new te(function(){n("timer"), delete t.timeout}, e.timer))}, qe = function(t, e){if (!e.toast)return C(e.allowEnterKey)?e.focusCancel && V(t.cancelButton)?t.cancelButton.focus():e.focusConfirm && V(t.confirmButton)?t.confirmButton.focus():void le(0, - 1, 1):Re()}, Re = function(){document.activeElement && "function" == typeof document.activeElement.blur && document.activeElement.blur()}; var De, Ne = Object.freeze({hideLoading:Ut, disableLoading:Ut, getInput:function(t){var e = ht.innerParams.get(t || this), n = ht.domCache.get(t || this); return n?B(n.content, e.input):null}, close:Zt, closePopup:Zt, closeModal:Zt, closeToast:Zt, enableButtons:function(){Xt(this, ["confirmButton", "cancelButton"], !1)}, disableButtons:function(){Xt(this, ["confirmButton", "cancelButton"], !0)}, enableConfirmButton:function(){h("Swal.enableConfirmButton()", "Swal.getConfirmButton().removeAttribute('disabled')"), Xt(this, ["confirmButton"], !1)}, disableConfirmButton:function(){h("Swal.disableConfirmButton()", "Swal.getConfirmButton().setAttribute('disabled', '')"), Xt(this, ["confirmButton"], !0)}, enableInput:function(){return Gt(this.getInput(), !1)}, disableInput:function(){return Gt(this.getInput(), !0)}, showValidationMessage:function(t){var e = ht.domCache.get(this); e.validationMessage.innerHTML = t; var n = window.getComputedStyle(e.popup); e.validationMessage.style.marginLeft = "-".concat(n.getPropertyValue("padding-left")), e.validationMessage.style.marginRight = "-".concat(n.getPropertyValue("padding-right")), L(e.validationMessage); var o = this.getInput(); o && (o.setAttribute("aria-invalid", !0), o.setAttribute("aria-describedBy", x["validation-message"]), A(o), rt(o, x.inputerror))}, resetValidationMessage:function(){var t = ht.domCache.get(this); t.validationMessage && O(t.validationMessage); var e = this.getInput(); e && (e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedBy"), at(e, x.inputerror))}, getProgressSteps:function(){return h("Swal.getProgressSteps()", "const swalInstance = Swal.fire({progressSteps: ['1', '2', '3']}); const progressSteps = swalInstance.params.progressSteps"), ht.innerParams.get(this).progressSteps}, setProgressSteps:function(t){h("Swal.setProgressSteps()", "Swal.update()"); var e = s({}, ht.innerParams.get(this), {progressSteps:t}); St(0, e), ht.innerParams.set(this, e)}, showProgressSteps:function(){var t = ht.domCache.get(this); L(t.progressSteps)}, hideProgressSteps:function(){var t = ht.domCache.get(this); O(t.progressSteps)}, _main:function(t){!function(t){for (var e in t)Mt(i = e) || w('Unknown parameter "'.concat(i, '"')), t.toast && (o = e, - 1 !== Dt.indexOf(o) && w('The parameter "'.concat(o, '" is incompatible with toasts'))), Vt(n = void 0) && h(n, Vt(n)); var n, o, i}(t), R() && Ht.swalCloseEventFinishedCallback && (Ht.swalCloseEventFinishedCallback(), delete Ht.swalCloseEventFinishedCallback), Ht.deferDisposalTimer && (clearTimeout(Ht.deferDisposalTimer), delete Ht.deferDisposalTimer); var e = s({}, It, t); ne(e), Object.freeze(e), Ht.timeout && (Ht.timeout.stop(), delete Ht.timeout), clearTimeout(Ht.restoreFocusTimeout); var n = function(t){var e = {popup:R(), container:H(), content:F(), actions:Z(), confirmButton:K(), cancelButton:Y(), closeButton:J(), validationMessage:W(), progressSteps:z()}; return ht.domCache.set(t, e), e}(this); return Bt(this, e), ht.innerParams.set(this, e), function(n, o, i){return new Promise(function(t){var e = function t(e){n.closePopup({dismiss:e})}; Kt.swalPromiseResolve.set(n, t); Ie(Ht, i, e); o.confirmButton.onclick = function(){return ae(n, i)}; o.cancelButton.onclick = function(){return se(n, e)}; o.closeButton.onclick = function(){return e(k.close)}; de(o, i, e); ce(n, Ht, i, e); if (i.toast && (i.input || i.footer || i.showCloseButton)){rt(document.body, x["toast-column"])} else{at(document.body, x["toast-column"])}re(n, i); ie(i); qe(o, i); o.container.scrollTop = 0})}(this, n, e)}, update:function(e){var t = R(); if (!t || b(t, x.hide))return w("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); var n = {}; Object.keys(e).forEach(function(t){Fe.isUpdatableParameter(t)?n[t] = e[t]:w('Invalid parameter to update: "'.concat(t, '". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js'))}); var o = s({}, ht.innerParams.get(this), n); Bt(this, o), ht.innerParams.set(this, o), Object.defineProperties(this, {params:{value:s({}, this.params, e), writable:!1, enumerable:!0}})}}); function Ue(){if ("undefined" != typeof window){"undefined" == typeof Promise && g("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"), De = this; for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)e[n] = arguments[n]; var o = Object.freeze(this.constructor.argsToParams(e)); Object.defineProperties(this, {params:{value:o, writable:!1, enumerable:!0, configurable:!0}}); var i = this._main(this.params); ht.promise.set(this, i)}}Ue.prototype.then = function(t){return ht.promise.get(this).then(t)}, Ue.prototype.finally = function(t){return ht.promise.get(this).finally(t)}, s(Ue.prototype, Ne), s(Ue, Nt), Object.keys(Ne).forEach(function(e){Ue[e] = function(){var t; if (De)return(t = De)[e].apply(t, arguments)}}), Ue.DismissReason = k, Ue.version = "8.19.0"; var Fe = Ue; return Fe.default = Fe}), void 0 !== this && this.Sweetalert2 && (this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2);$(document).ready(function () { $('#loader').hide(); }); function redirectDomanda(id_domanda) { var object = { domanda: id_domanda } $.redirect("domanda.php", object); } function isValidIBANNumber(input) { var CODE_LENGTHS = { AD: 24, AE: 23, AT: 20, AZ: 28, BA: 20, BE: 16, BG: 22, BH: 22, BR: 29, CH: 21, CR: 21, CY: 28, CZ: 24, DE: 22, DK: 18, DO: 28, EE: 20, ES: 24, FI: 18, FO: 18, FR: 27, GB: 22, GI: 23, GL: 18, GR: 27, GT: 28, HR: 21, HU: 28, IE: 22, IL: 23, IS: 26, IT: 27, JO: 30, KW: 30, KZ: 20, LB: 28, LI: 21, LT: 20, LU: 20, LV: 21, MC: 27, MD: 24, ME: 22, MK: 19, MR: 27, MT: 31, MU: 30, NL: 18, NO: 15, PK: 24, PL: 28, PS: 29, PT: 25, QA: 29, RO: 24, RS: 22, SA: 24, SE: 24, SI: 19, SK: 24, SM: 27, TN: 24, TR: 26 }; var iban = String(input).toUpperCase().replace(/[^A-Z0-9]/g, ""), // keep only alphanumeric characters code = iban.match(/^([A-Z]{2})(d{2})([A-Zd]+)$/), // match and capture (1) the country code, (2) the check digits, and (3) the rest digits; // check syntax and length if (!code || iban.length !== CODE_LENGTHS[code[1]]) { return false; } // rearrange country code and check digits, and convert chars to ints digits = (code[3] + code[1] + code[2]).replace(/[A-Z]/g, function (letter) { return letter.charCodeAt(0) - 55; }); // final check return mod97(digits); } function mod97(string) { var checksum = string.slice(0, 2), fragment; for (var offset = 2; offset < string.length; offset += 7) { fragment = String(checksum) + string.substring(offset, offset + 7); checksum = parseInt(fragment, 10) % 97; } return checksum; } /**/ function functionSwallMsg(mode, testo) { var scrivotesto = ""; var indirizzo = ""; if (testo != "") { scrivotesto = testo; } if (mode == "success") { Swal.fire({ type: 'success', title: 'OK', text: scrivotesto, showCancelButton: false, confirmButtonColor: '#3085d6', confirmButtonText: 'OK', allowOutsideClick: false }).then((result) => {}) } else if (mode == "error") { if (testo == "") { testo = "Al momento non è possibile completare l'operazione"; } Swal.fire({ type: 'error', title: 'Attenzione', text: testo, allowOutsideClick: false }) } } function functionSwall(mode, testo, reinvio, valore) { var scrivotesto = ""; var indirizzo = ""; if (testo != "") { scrivotesto = testo; } if (reinvio && reinvio != "") { indirizzo = reinvio; } else { indirizzo = ""; } if (mode == "success") { Swal.fire({ type: 'success', title: 'OK', text: scrivotesto, showCancelButton: false, confirmButtonColor: '#3085d6', confirmButtonText: 'OK', allowOutsideClick: false }).then((result) => { if (result.value) { if (reinvio == "DOMANDA") { var object = { cod_fis_impresa: valore } $.redirect("domanda.php", object); } else { document.location.href = indirizzo; } } }) } else if (mode == "error") { if (testo == "") { testo = "Al momento non è possibile completare l'operazione"; } Swal.fire({ type: 'error', title: 'Attenzione', text: testo, allowOutsideClick: false }) } } function postdataClassic(url, oggetto, callback) { $.ajax({ url: url, method: "POST", data: oggetto, success: callback, error: function (reason, xhr) { console.log("error in processing your request", reason); } }) } function postdata(url, oggetto, callback) { $.ajax({ url: url, method: "POST", data: oggetto, processData: false, contentType: false, success: callback, error: function (reason, xhr) { console.log("error in processing your request", reason); } }) } function getdata(url, callback) { $.ajax({ url: url, method: "POST", success: callback, error: function (reason, xhr) { console.log("error in processing your request", reason); } }) } function resettaform(idform) { $("#" + idform)[0].reset(); console.log("fatto"); } function checkViewConsent(url) { if (CONSENSO == 0) { functionSwall('error', "E' necessario prestare il consenso al trattamento dei dati per usufruire dei servizi della piattaforma", ""); } else { document.location.href = url; } } function saveConsenso() { $('#loader').show(); var consenso = document.getElementById('consenso_informativo').checked; if (document.getElementById('consenso_informativo').checked) { var object = { consenso: consenso }; postdataClassic(WS_CALL + "?module=account&action=saveConsenso", object, function (response) { $('#loader').hide(); var risp = jQuery.parseJSON(response); if (risp.esito === 1) { functionSwall('success', 'Operazione Avvenuta con successo!!', BASE_HTTP + 'index.php'); } else { functionSwall('error', risp.erroreDescrizione, ""); } }); } else { $('#loader').hide(); functionSwall('error', "E' necessario prestare il consenso al trattamento dei dati per usufruire dei servizi della piattaforma", ""); } } function codiceFISCALE(codice_fiscale) { var cf = codice_fiscale.toUpperCase(); var cfReg = /^[A-Z]{6}\d{2}[A-Z]\d{2}[A-Z]\d{3}[A-Z]$/; if (!cfReg.test(cf)) return false; var set1 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var set2 = "ABCDEFGHIJABCDEFGHIJKLMNOPQRSTUVWXYZ"; var setpari = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var setdisp = "BAKPLCQDREVOSFTGUHMINJWZYX"; var s = 0; for (i = 1; i <= 13; i += 2) s += setpari.indexOf(set2.charAt(set1.indexOf(cf.charAt(i)))); for (i = 0; i <= 14; i += 2) s += setdisp.indexOf(set2.charAt(set1.indexOf(cf.charAt(i)))); if (s % 26 != cf.charCodeAt(15) - 'A'.charCodeAt(0)) return false; return true; } function number_format(number, decimals, decPoint, thousandsSep) { // eslint-disable-line camelcase // example 1: number_format(1234.56) // returns 1: '1,235' // example 2: number_format(1234.56, 2, ',', ' ') // returns 2: '1 234,56' // example 3: number_format(1234.5678, 2, '.', '') // returns 3: '1234.57' // example 4: number_format(67, 2, ',', '.') // returns 4: '67,00' // example 5: number_format(1000) // returns 5: '1,000' // example 6: number_format(67.311, 2) // returns 6: '67.31' // example 7: number_format(1000.55, 1) // returns 7: '1,000.6' // example 8: number_format(67000, 5, ',', '.') // returns 8: '67.000,00000' // example 9: number_format(0.9, 0) // returns 9: '1' // example 10: number_format('1.20', 2) // returns 10: '1.20' // example 11: number_format('1.20', 4) // returns 11: '1.2000' // example 12: number_format('1.2000', 3) // returns 12: '1.200' // example 13: number_format('1 000,50', 2, '.', ' ') // returns 13: '100 050.00' // example 14: number_format(1e-8, 8, '.', '') // returns 14: '0.00000001' number = (number + '').replace(/[^0-9+\-Ee.]/g, '') var n = !isFinite(+number) ? 0 : +number var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals) var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep var dec = (typeof decPoint === 'undefined') ? '.' : decPoint var s = '' var toFixedFix = function (n, prec) { if (('' + n).indexOf('e') === -1) { return +(Math.round(n + 'e+' + prec) + 'e-' + prec) } else { var arr = ('' + n).split('e') var sig = '' if (+arr[1] + prec > 0) { sig = '+' } return (+(Math.round(+arr[0] + 'e' + sig + (+arr[1] + prec)) + 'e-' + prec)).toFixed(prec) } } // @todo: for IE parseFloat(0.55).toFixed(0) = 0; s = (prec ? toFixedFix(n, prec).toString() : '' + Math.round(n)).split('.') if (s[0].length > 3) { s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep) } if ((s[1] || '').length < prec) { s[1] = s[1] || '' s[1] += new Array(prec - s[1].length + 1).join('0') } return s.join(dec) } /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ siparsFrameworkClass = function () { }, siparsFrameworkClass.prototype = { /* * Modal Loader Show/Hide */ ShowLoader: function () { $("#wait-spinner").show(); }, HideLoader: function () { $("#wait-spinner").hide(); }, /** * Apre un MessageBox con icona di esclamazione */ MessageWarning: function (text, title, width) { if (!title) title = "Validazione modulo"; if (!width) width = 300; Swal.fire({ title: title, text: text, type: "warning", showCancelButton: false, confirmButtonText: "OK" }); }, /** * Apre un MessageBox con icona di esclamazione */ MessageExclamation: function (text, title, width) { if (!title) title = "Validazione modulo"; if (!width) width = 300; Swal.fire({ title: title, text: text, type: "warning", showCancelButton: false, confirmButtonText: "OK" }); }, MessageSuccess: function (text, title, width, noReload) { if (!title) title = "Validazione modulo"; if (!width) width = 300; if (text == "") { text = "OK"; } Swal.fire({ title: title, text: text, type: "success", showCancelButton: false, confirmButtonText: "OK" }).then(result => { if (noReload != true) { location.reload(); } }); }, /** * Apre un MessageBox con icona di errore */ MessageError: function (text, title, width) { if (!title) title = "Errore imprevisto"; if (!width) width = 300; if (text == "") { text = "Al momento non è possibile completare l'operazione"; } Swal.fire({ title: title, text: text, type: "error", showCancelButton: false, confirmButtonText: "OK" }); }, /** * Apre un MessageBox con icona di informazioni */ MessageInfo: function (text, title, width) { if (!title) title = "Errore imprevisto"; if (!width) width = 300; if (text == "") { text = "Al momento non è possibile completare l'operazione"; } Swal.fire({ title: title, text: text, icon: "info", showCancelButton: false, confirmButtonText: "OK" }); }, ModModal: function (id_form, module, urlCallBack = '') { $("#loader").show(); var form = document.getElementById(id_form); var formData = new FormData(form); $.ajax({ url: WS_CALL + '?module=' + module, type: 'POST', data: formData, processData: false, contentType: false, beforeSend: function (data) { }, success: function (response) { //console.log(response); var res = jQuery.parseJSON(response); var risposta = res.esito; var descrizione_errore = res.descrizioneErrore; $("#loader").hide(); if (risposta === 1) { if (urlCallBack != "") { document.location.href = urlCallBack; return; } else { location.reload(); return; } } else { siparsFramework.MessageError(descrizione_errore, 'Attenzione'); return; } }, error: function (xhr, status, error) { $('#loader').hide(); alert("An AJAX error occured: " + status + "\nError: " + error); console.log(xhr); } }); }, takeChargeView: function (id, module, action, dataTable = '', id_form = '') { var id = id; if (id_form != "") $("#" + id_form)[0].reset(); $.post(WS_CALL + '?module=' + module + '&action=' + action, {id: id}, function (data) { if (dataTable != "") { var datatbale_name = $(dataTable).DataTable(); datatbale_name.ajax.reload(null, false); } $.each(JSON.parse(data), function (i, item) { $('#view_' + i).empty(); $('#view_' + i).append("" + item + ""); }); }); }, takeCharge: function (id, module, action, dataTable = '', id_form = '') { var id = id; if (id_form != "") $("#" + id_form)[0].reset(); $.post(WS_CALL + '?module=' + module + '&action=' + action, {id: id}, function (data) { if (dataTable != "") { var datatbale_name = $(dataTable).DataTable(); datatbale_name.ajax.reload(null, false); } $.each(JSON.parse(data), function (i, item) { $('#edit_' + i).val(item); console.log('#edit_' + i + ' --> '+item); /*if ($('#edit_' + i).is('select')) { $('#edit_' + i).formSelect(); }*/ }); }); }, takeChargeCodiciVari: function (id, gruppo, module, action, dataTable = '', id_form = '') { var id_codice = id; var gruppo = gruppo; if (id_form != "") $("#" + id_form)[0].reset(); $.post(WS_CALL + '?module=' + module + '&action=' + action, {id_codice: id_codice, gruppo: gruppo}, function (data) { if (dataTable != "") { var datatbale_name = $(dataTable).DataTable(); datatbale_name.ajax.reload(null, false); } $.each(JSON.parse(data), function (i, item) { $('#edit_' + i).val(item); if ($('#edit_' + i).is('select')) { $('#edit_' + i).formSelect(); } }); }); }, takeDelete: function (id, module, action, dataTable = '', reload = '') { var id = id; Swal.fire({ title: "Cancellazione", text: "Sei sicuro di cancellare il record selezionato?", icon: "warning", closeModal: true, showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'OK' }).then((result) => { if (result.value) { $.ajax({ url: WS_CALL + '?module=' + module + '&action=' + action, type: "POST", data: {id: id}, dataType: "html", success: function () { if (dataTable != "") { var datatbale_name = $(dataTable).DataTable(); datatbale_name.ajax.reload(null, false); } var NoReolad = true; if (reload) { document.location.href = reload; } siparsFrameworkClass.prototype.MessageSuccess("Il record e' stato cancellato con succcesso", "Cancellazione effettuata", '', NoReolad); }, error: function (xhr, ajaxOptions, thrownError) { siparsFrameworkClass.prototype.MessageSuccess(); } }); } // $.post(WS_CALL + '?module=' + module + '&action=' + action, // {id: id}, // function (data) { // // // // }); }); }, ButtonAdd: function (divId, config, fn) { var div = document.getElementById(divId); if (div !== null) { var btn = document.createElement('button'); var text = (config && config.text ? config.text : "Nuovo"); var href = (config && config.href ? config.href : ""); var txt = document.createTextNode(text); //var hidden = (permission !== '' ? (permission.Update ? false : true) : (config && config.hidden ? config.hidden : false)); var classDisabled = ""; // if (hidden) // classDisabled = "disabled"; btn.appendChild(txt); btn.setAttribute('type', 'button'); btn.setAttribute('class', 'btn btn-primary ' + classDisabled + ''); btn.setAttribute('data-toggle', 'modal'); btn.setAttribute('data-target', classDisabled); if (href != "") btn.setAttribute('href', href); if (fn) btn.setAttribute('onclick', fn); btn.setAttribute('id', 'buttonAdd'); div.appendChild(btn); } }, MessageConfirmDelete(text, title, width, url, data, fnCallback) { if (!title) title = "Conferma cancellazione"; if (!width) width = 300; if (text == "") { text = "Vuoi procedere con la cancellazione del record?"; } swal({ title: title, text: text, icon: "warning", closeModal: true, dangerMode: true, onClose: () => { fnCallback(); }, buttons: {cancel: { text: "ANNULLA", value: false, visible: true, className: "", closeModal: true }, confirm: { text: "OK", value: true, visible: true, className: "", closeModal: false }} }).then(function (isConfirm) { if (!isConfirm) return; $.ajax({ url: url, type: "POST", data: data, dataType: "html", success: function () { // if (callback){ // callback(); // } siparsFrameworkClass.prototype.MessageSuccess("Il record e' stato cancellato con successo", "Cancellazione effettuata"); }, error: function (xhr, ajaxOptions, thrownError) { siparsFrameworkClass.prototype.MessageSuccess(); } }); }); }, /** * Apre un MessageBox che richiama una funziona di callback */ MessageConfirmGeneric: function (text, title, width, url, data, fnCallbackSuccess, fnCallbackFailure, retid) { if (!title) title = "Errore imprevisto"; if (!width) width = 300; if (text == "") { text = "Al momento non è possibile completare l'operazione"; } swal({ title: title, text: text, icon: "warning", closeModal: true, buttons: {cancel: { text: "ANNULLA", value: false, visible: true, className: "", closeModal: true }, confirm: { text: "OK", value: true, visible: true, className: "", closeModal: false }} }).then(function (isConfirm) { if (!isConfirm) return; $.ajax({ url: url, type: "POST", data: data, dataType: "html", success: function (result) { console.log(result); var res = eval(result); if (retid != null && retid > 0) { return res[0].id; } else { if (res[0].esito == 1) { siparsFrameworkClass.prototype.MessageSuccess("Operazione completata con succcesso", "Operazione effettuata"); if (fnCallbackSuccess) { fnCallbackSuccess(); } } else { siparsFrameworkClass.prototype.MessageError(); } } }, error: function (xhr, ajaxOptions, thrownError) { siparsFrameworkClass.prototype.MessageError(); if (fnCallbackFailure) { fnCallbackFailure(); } } }); }); }, MessageConfirmFunction: function (text, title, width, fnCallbackSuccess) { if (!title) title = "Errore imprevisto"; if (!width) width = 300; if (text == "") { text = "Al momento non è possibile completare l'operazione"; } swal({ title: title, text: text, icon: "warning", closeModal: true, buttons: {cancel: { text: "ANNULLA", value: false, visible: true, className: "", closeModal: true }, confirm: { text: "OK", value: true, visible: true, className: "", closeModal: false }} }).then(function (isConfirm) { if (!isConfirm) return; if (fnCallbackSuccess) { fnCallbackSuccess(); } }); }, /** * Download forzato di un file * @param {type} url * @returns {undefined} */ downloadURL: function (url) { var hiddenIFrameID = 'hiddenDownloader', iframe = document.getElementById(hiddenIFrameID); if (iframe === null) { iframe = document.createElement('iframe'); iframe.id = hiddenIFrameID; iframe.style.display = 'none'; document.body.appendChild(iframe); } iframe.src = url; }, /* * restituisce le ore */ GetDay: function (min) { return Math.floor(min / (60 * 24)); }, /* * restituisce le ore */ GetHour: function (min) { var rest = min % (60 * 24); return Math.floor(rest / 60); }, /* * restituisce i minuti */ GetMinute: function (min) { return Math.floor(min % 60); }, /* * aggiunge zeri di riempimento prima del numero */ Pad: function (number, length) { var str = '' + number; while (str.length < length) { str = '0' + str; } return str; }, /* * clona un array */ ArrayClone: function (_ArryToClone) { var _Clone = new Array(); for (_IdClone in _ArryToClone) if (_ArryToClone[_IdClone].Constructor == Array) Clone(_ArryToClone[_IdClone]) else _Clone[_IdClone] = _ArryToClone[_IdClone] return _Clone }, /** ****** IN ARRAY AS PHP ****** **/ In_array: function (needle, haystack, argStrict) { var key = '', strict = !!argStrict; if (strict) { for (key in haystack) { if (haystack[key] === needle) { return true; } } } else { for (key in haystack) { if (haystack[key] == needle) { return true; } } } return false; }, /* ***** From seconds to locateDate ****** **/ SecondsToLocaleDate: function (d, hideMs) { // if (isNaN(d)) // { // return false; // } hideMs = (hideMs == true ? true : false); var newDate = new Date( ); var ms = ''; if (cnxplayer && d.toString().indexOf('.') > 0) { dp = d.toString().split('.'); ms = '.' + dp[1]; if (ms.length == 2) ms += '00'; else if (ms.length == 3) ms += '0'; ms = ms.substring(0, 4); } newDate.setTime(d * 1000); dateString = newDate.toLocaleString(); ds = ""; if (dateString.indexOf('/') > 0) { // dateString = dateString.replace("/", " "); ds = dateString.split('/'); dateString = ds[0] + ' ' + ds[1] + ' ' + ds[2];//+' '+ds[3]; } else { ds = dateString.split(' '); dateString = ds[1] + ' ' + ds[2].substring(0, 3) + ' ' + ds[3] + ' ' + ds[4]; } return (hideMs ? dateString : dateString + ms); }, /* ***** From seconds to time format H:m:s ****** **/ SecondsToHms: function (d) { d = Number(d); var h = Math.floor(d / 3600); var m = Math.floor(d % 3600 / 60); var s = Math.floor(d % 3600 % 60); return ((h < 10 ? "0" + h : h) + ":" + (m >= 0 ? (h >= 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s); }, /* ******* PRINT_R AS PHP******* */ Print_r: function (array, return_val) { var output = "", pad_char = " ", pad_val = 4; var formatArray = function (obj, cur_depth, pad_val, pad_char) { if (cur_depth > 0) { cur_depth++; } var base_pad = repeat_char(pad_val * cur_depth, pad_char); var thick_pad = repeat_char(pad_val * (cur_depth + 1), pad_char); var str = ""; if (obj instanceof Array || obj instanceof Object) { str += "Array\n" + base_pad + "(\n"; for (var key in obj) { if (obj[key] instanceof Array) { str += thick_pad + "[" + key + "] => " + formatArray(obj[key], cur_depth + 1, pad_val, pad_char); } else { str += thick_pad + "[" + key + "] => " + obj[key] + "\n"; } } str += base_pad + ")\n"; } else if (obj == null || obj == undefined) { str = ''; } else { str = obj.toString(); } return str; }; var repeat_char = function (len, pad_char) { var str = ""; for (var i = 0; i < len; i++) { str += pad_char; } ; return str; }; output = formatArray(array, 0, pad_val, pad_char); if (return_val !== true) { document.write("
    " + output + "
    "); return true; } else { return output; } }, /* *********** str_replace ************ */ str_replace: function (search, replace, subject, count) { // % note 1: The count parameter must be passed as a string in order // % note 1: to find a global variable in which the result will be given // * example 1: str_replace(' ', '.', 'Kevin van Zonneveld'); // * returns 1: 'Kevin.van.Zonneveld' // * example 2: str_replace(['{name}', 'l'], ['hello', 'm'], '{name}, lars'); // * returns 2: 'hemmo, mars' var i = 0, j = 0, temp = '', repl = '', sl = 0, fl = 0, f = [].concat(search), r = [].concat(replace), s = subject, ra = Object.prototype.toString.call(r) === '[object Array]', sa = Object.prototype.toString.call(s) === '[object Array]'; s = [].concat(s); if (count) { this.window[count] = 0; } for (i = 0, sl = s.length; i < sl; i++) { if (s[i] === '') { continue; } for (j = 0, fl = f.length; j < fl; j++) { temp = s[i] + ''; repl = ra ? (r[j] !== undefined ? r[j] : '') : r[0]; s[i] = (temp).split(f[j]).join(repl); if (count && s[i] !== temp) { this.window[count] += (temp.length - s[i].length) / f[j].length; } } } return sa ? s : s[0]; }, /* *********** str_replace ************ */ array2json: function (arr) { var parts = []; var is_list = (Object.prototype.toString.apply(arr) === '[object Array]'); for (var key in arr) { var value = arr[key]; if (typeof value == "object") { //Custom handling for arrays if (is_list) parts.push(array2json(value)); /* :RECURSION: */ else parts[key] = array2json(value); /* :RECURSION: */ } else { var str = ""; if (!is_list) str = '"' + key + '":'; //Custom handling for multiple data types if (typeof value == "number") str += value; //Numbers else if (value === false) str += 'false'; //The booleans else if (value === true) str += 'true'; else str += '"' + value + '"'; //All other things // :TODO: Is there any more datatype we should be in the lookout for? (Functions?) parts.push(str); } } var json = parts.join(","); if (is_list) return '[' + json + ']';//Return numerical JSON return '{' + json + '}';//Return associative JSON }, /* *********** json_encode ************ */ Json_encode: function (mixed_val) { // http://kevin.vanzonneveld.net // + original by: Public Domain (http://www.json.org/json2.js) // + reimplemented by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: Michael White // + input by: felix // + bugfixed by: Brett Zamir (http://brett-zamir.me) // * example 1: json_encode(['e', {pluribus: 'unum'}]); // * returns 1: '[\n "e",\n {\n "pluribus": "unum"\n}\n]' /* http://www.JSON.org/json2.js 2008-11-19 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See http://www.JSON.org/js.html */ var retVal, json = this.window.JSON; try { if (typeof json === 'object' && typeof json.stringify === 'function') { retVal = json.stringify(mixed_val); // Errors will not be caught here if our own equivalent to resource // (an instance of PHPJS_Resource) is used if (retVal === undefined) { throw new SyntaxError('json_encode'); } return retVal; } var value = mixed_val; var quote = function (string) { var escapable = /[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; var meta = {// table of character substitutions '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"': '\\"', '\\': '\\\\' }; escapable.lastIndex = 0; return escapable.test(string) ? '"' + string.replace(escapable, function (a) { var c = meta[a]; return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); }) + '"' : '"' + string + '"'; }; var str = function (key, holder) { var gap = ''; var indent = ' '; var i = 0; // The loop counter. var k = ''; // The member key. var v = ''; // The member value. var length = 0; var mind = gap; var partial = []; var value = holder[key]; // If the value has a toJSON method, call it to obtain a replacement value. if (value && typeof value === 'object' && typeof value.toJSON === 'function') { value = value.toJSON(key); } // What happens next depends on the value's type. switch (typeof value) { case 'string': return quote(value); case 'number': // JSON numbers must be finite. Encode non-finite numbers as null. return isFinite(value) ? String(value) : 'null'; case 'boolean': case 'null': // If the value is a boolean or null, convert it to a string. Note: // typeof null does not produce 'null'. The case is included here in // the remote chance that this gets fixed someday. return String(value); case 'object': // If the type is 'object', we might be dealing with an object or an array or // null. // Due to a specification blunder in ECMAScript, typeof null is 'object', // so watch out for that case. if (!value) { return 'null'; } if ((this.PHPJS_Resource && value instanceof this.PHPJS_Resource) || (window.PHPJS_Resource && value instanceof window.PHPJS_Resource)) { throw new SyntaxError('json_encode'); } // Make an array to hold the partial results of stringifying this object value. gap += indent; partial = []; // Is the value an array? if (Object.prototype.toString.apply(value) === '[object Array]') { // The value is an array. Stringify every element. Use null as a placeholder // for non-JSON values. length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value) || 'null'; } // Join all of the elements together, separated with commas, and wrap them in // brackets. v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']'; gap = mind; return v; } // Iterate through all of the keys in the object. for (k in value) { if (Object.hasOwnProperty.call(value, k)) { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ': ' : ':') + v); } } } // Join all of the member texts together, separated with commas, // and wrap them in braces. v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}'; gap = mind; return v; case 'undefined': // Fall-through case 'function': // Fall-through default: throw new SyntaxError('json_encode'); } }; // Make a fake root object containing our value under the key of ''. // Return the result of stringifying the value. return str('', { '': value }); } catch (err) { // Todo: ensure error handling above throws a SyntaxError in all cases where it could // (i.e., when the JSON global is not available and there is an error) if (!(err instanceof SyntaxError)) { throw new Error('Unexpected error type in json_encode()'); } this.php_js = this.php_js || {}; this.php_js.last_error_json = 4; // usable by json_last_error() return null; } }, /* * Check if exists key in array */ Array_key_exists: function (key, search) { // Checks if the given key or index exists in the array // // version: 1109.2015 // discuss at: http://phpjs.org/functions/array_key_exists // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: Felix Geisendoerfer (http://www.debuggable.com/felix) // * example 1: array_key_exists('kevin', {'kevin': 'van Zonneveld'}); // * returns 1: true if (!search || (search.constructor !== Array && search.constructor !== Object)) { return false; } return key in search; }, /* * Trim function (global, left trim and right trim) */ Trim: function (stringa) { return stringa.replace(/^\s+|\s+$/g, ""); }, Ltrim: function (stringa) { return stringa.replace(/^\s+/, ""); }, Rtrim: function (stringa) { return stringa.replace(/\s+$/, ""); } }; // Inizializzazione Fitosan Framework var siparsFramework = new siparsFrameworkClass(); /* jQuery Redirect v1.0.7 Copyright (c) 2013-2017 Miguel Galante Copyright (c) 2011-2013 Nemanja Avramovic, www.avramovic.info Licensed under CC BY-SA 4.0 License: http://creativecommons.org/licenses/by-sa/4.0/ This means everyone is allowed to: Share - copy and redistribute the material in any medium or format Adapt - remix, transform, and build upon the material for any purpose, even commercially. Under following conditions: Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. ShareAlike - If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. */ (function ($) { 'use strict'; /** * jQuery Redirect * @param {string} url - Url of the redirection * @param {Object} values - (optional) An object with the data to send. If not present will look for values as QueryString in the target url. * @param {string} method - (optional) The HTTP verb can be GET or POST (defaults to POST) * @param {string} target - (optional) The target of the form. "_blank" will open the url in a new window. * @param {boolean} traditional - (optional) This provides the same function as jquery's ajax function. The brackets are omitted on the field name if its an array. This allows arrays to work with MVC.net among others. * @param {boolean} redirectTop - (optional) If its called from a iframe, force to navigate the top window. */ $.redirect = function (url, values, method, target, traditional, redirectTop) { method = (method && ["GET", "POST", "PUT", "DELETE"].indexOf(method.toUpperCase()) !== -1) ? method.toUpperCase() : 'POST'; redirectTop = redirectTop || false; url = url.split("#"); var hash = url[1] ? ("#" + url[1]) : ""; url = url[0]; if (!values) { var obj = $.parseUrl(url); url = obj.url; values = obj.params; } values = removeNulls(values); var form = $('
    ') .attr("method", method) .attr("action", url + hash); if (target) { form.attr("target", target); } var submit = {}; //Create a symbol form[0][submit] = form[0].submit; iterateValues(values, [], form, null, traditional); if(redirectTop) { $('body', window.top.document).append(form); } else { $('body').append(form); } form[0][submit](); }; //Utility Functions /** * Url and QueryString Parser. * @param {string} url - a Url to parse. * @returns {object} an object with the parsed url with the following structure {url: URL, params:{ KEY: VALUE }} */ $.parseUrl = function (url) { if (url.indexOf('?') === -1) { return { url: url, params: {} }; } var parts = url.split('?'), query_string = parts[1], elems = query_string.split('&'); url = parts[0]; var i, pair, obj = {}; for (i = 0; i < elems.length; i+= 1) { pair = elems[i].split('='); obj[pair[0]] = pair[1]; } return { url: url, params: obj }; }; //Private Functions var getInput = function (name, value, parent, array, traditional) { var parentString; if (parent.length > 0) { parentString = parent[0]; var i; for (i = 1; i < parent.length; i += 1) { parentString += "[" + parent[i] + "]"; } if (array) { if (traditional) name = parentString; else name = parentString + "[" + name + "]"; } else { name = parentString + "[" + name + "]"; } } return $("").attr("type", "hidden") .attr("name", name) .attr("value", value); }; var iterateValues = function (values, parent, form, isArray, traditional) { var i, iterateParent = []; Object.keys(values).forEach(function(i) { if (typeof values[i] === "object") { iterateParent = parent.slice(); iterateParent.push(i); iterateValues(values[i], iterateParent, form, Array.isArray(values[i]), traditional); } else { form.append(getInput(i, values[i], parent, isArray, traditional)); } }); }; var removeNulls = function (values) { var propNames = Object.getOwnPropertyNames(values); for (var i = 0; i < propNames.length; i++) { var propName = propNames[i]; if (values[propName] === null || values[propName] === undefined) { delete values[propName]; } else if (typeof values[propName] === 'object') { values[propName] = removeNulls(values[propName]); } else if (values[propName].length < 1) { delete values[propName]; } } return values; }; }(window.jQuery || window.Zepto || window.jqlite)); /* * * @param {type} iban * @returns {undefined} * Controllo di verifica dell'iban inserito * */ ////function alertValidIBAN(iban) { //// console.log(isValidIBANNumber(iban)); ////} ///* // * Returns 1 if the IBAN is valid // * Returns FALSE if the IBAN"s length is not as should be (for CY the IBAN Should be 28 chars long starting with CY ) // * Returns any other number (checksum) when the IBAN is invalid (check digits do not match) // */ // //function isValidIBANNumber(input) { // var CODE_LENGTHS = { // AD: 24, AE: 23, AT: 20, AZ: 28, BA: 20, BE: 16, BG: 22, BH: 22, BR: 29, // CH: 21, CR: 21, CY: 28, CZ: 24, DE: 22, DK: 18, DO: 28, EE: 20, ES: 24, // FI: 18, FO: 18, FR: 27, GB: 22, GI: 23, GL: 18, GR: 27, GT: 28, HR: 21, // HU: 28, IE: 22, IL: 23, IS: 26, IT: 27, JO: 30, KW: 30, KZ: 20, LB: 28, // LI: 21, LT: 20, LU: 20, LV: 21, MC: 27, MD: 24, ME: 22, MK: 19, MR: 27, // MT: 31, MU: 30, NL: 18, NO: 15, PK: 24, PL: 28, PS: 29, PT: 25, QA: 29, // RO: 24, RS: 22, SA: 24, SE: 24, SI: 19, SK: 24, SM: 27, TN: 24, TR: 26 // }; // var iban = String(input).toUpperCase().replace(/[^A-Z0-9]/g, ""), // keep only alphanumeric characters // code = iban.match(/^([A-Z]{2})(d{2})([A-Zd]+)$/), // match and capture (1) the country code, (2) the check digits, and (3) the rest // digits; //// check syntax and length // if (!code || iban.length !== CODE_LENGTHS[code[1]]) { // return false; // } //// rearrange country code and check digits, and convert chars to ints // digits = (code[3] + code[1] + code[2]).replace(/[A-Z]/g, function (letter) { // return letter.charCodeAt(0) - 55; // }); //// final check // return mod97(digits); //} //function mod97(string) { // var checksum = string.slice(0, 2), fragment; // for (var offset = 2; offset < string.length; offset += 7) { // fragment = String(checksum) + string.substring(offset, offset + 7); // checksum = parseInt(fragment, 10) % 97; // } // return checksum; //} //function redirectDomanda(id_domanda) { // var object = { // domanda: id_domanda // } // $.redirect("domanda.php", object); //} //function calcolaValore() { // var totale = parseFloat($('#vi_tot_vol_iva_2019').val()); // //totale.toString().replace(/,/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ","); // // //var totale = $('#vi_tot_vol_iva_2019').val(); // var ris_divisione; // var ris_moltiplicazione; // var ris_percentuale; // ris_divisione = Number(totale / 12); // ris_moltiplicazione = Number(ris_divisione * 2); // ris_percentuale = Number((Number(ris_moltiplicazione * 40)) / 100); // console.log(ris_divisione); // console.log(ris_moltiplicazione); // console.log(ris_percentuale); // if (ris_percentuale <= 5000 || typeof ris_percentuale === 'undefined') { // $('#vi_contributo_dichiarato').val(Number(5000)); // } else if (ris_percentuale >= 35000) { // $('#vi_contributo_dichiarato').val(Number(35000)); // } else { // $('#vi_contributo_dichiarato').val(Number(ris_percentuale.toFixed(2))); // } //} //function salvaPunteggio() { // $('#loader').show(); // var form = document.getElementById('form-add-punteggio'); // var formInvio = new FormData(form); // formInvio.append('module', 'domanda_punteggio'); // formInvio.append('action', 'savePunteggio'); // formInvio.append('id_domanda', id_domanda); // postdata(WS_CALL, formInvio, function (response) { // $('#loader').hide(); // var risp = jQuery.parseJSON(response); // if (risp.esito === 1) { // $('#listaPunteggio').DataTable().ajax.reload(); // } else { // Swal.fire({ // title: 'Attenzione', // showDenyButton: true, // showCancelButton: false, // text: risp.erroreDescrizione, // allowOutsideClick: false, // confirmButtonText: `Ok`, // }).then((result) => { // if (result.value) { // $('#listaPunteggio').DataTable().ajax.reload(); // } // }) // } // }); //} $(document).ready(function () { $('#loader').hide(); }); function createOperatore() { $('#loader').show(); var form = document.getElementById('form-register'); var formInvio = new FormData(form); formInvio.append('module', 'account') formInvio.append('action', 'save') postdata(WS_CALL, formInvio, function (response) { $('#loader').hide(); var risp = jQuery.parseJSON(response); if (risp.esito === 1) { Swal.fire({ type: 'success', title: 'OK', text: 'Operazione Avvenuta con successo!!', showCancelButton: false, confirmButtonColor: '#3085d6', confirmButtonText: 'OK', allowOutsideClick: false }).then((result) => { if (result.value) { location.reload(); } }) } else { functionSwall('error', risp.erroreDescrizione, ''); } }); } function editOperatore() { $('#loader').show(); var form = document.getElementById('form-edit-operatore'); var formInvio = new FormData(form); formInvio.append('module', 'account') formInvio.append('action', 'edit') postdata(WS_CALL, formInvio, function (response) { $('#loader').hide(); var risp = jQuery.parseJSON(response); if (risp.esito === 1) { Swal.fire({ type: 'success', title: 'OK', text: 'Operazione Avvenuta con successo!!', showCancelButton: false, confirmButtonColor: '#3085d6', confirmButtonText: 'OK', allowOutsideClick: false }).then((result) => { if (result.value) { location.reload(); } }) } else { functionSwall('error', risp.erroreDescrizione, ''); } }); } function view_edit(ID) { postdata(WS_CALL + "?module=account&action=load&i=" + btoa(ID), "", function (response) { var m = JSON.parse(response); $.each(m, function (index, value) { $('#operatore_' + index).append(value); $('#operatore_' + index).val(value); }); }); } /*! Responsive 2.2.3 2014-2018 SpryMedia Ltd - datatables.net/license */ (function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(l){return d(l,window,document)}):"object"===typeof exports?module.exports=function(l,j){l||(l=window);if(!j||!j.fn.dataTable)j=require("datatables.net")(l,j).$;return d(j,l,l.document)}:d(jQuery,window,document)})(function(d,l,j,q){function t(a,b,c){var e=b+"-"+c;if(n[e])return n[e];for(var d=[],a=a.cell(b,c).node().childNodes,b=0,c=a.length;btd, >th", e).each(function(e){e=b.column.index("toData",e);!1===a.s.current[e]&&d(this).css("display","none")})});b.on("destroy.dtr",function(){b.off(".dtr");d(b.table().body()).off(".dtr");d(l).off("resize.dtr orientationchange.dtr");d.each(a.s.current,function(b,e){!1===e&&a._setColumnVis(b,!0)})});this.c.breakpoints.sort(function(a,b){return a.widthb.width?-1:0});this._classLogic();this._resizeAuto();c=this.c.details;!1!==c.type&&(a._detailsInit(),b.on("column-visibility.dtr",function(){a._timer&& clearTimeout(a._timer);a._timer=setTimeout(function(){a._timer=null;a._classLogic();a._resizeAuto();a._resize();a._redrawChildren()},100)}),b.on("draw.dtr",function(){a._redrawChildren()}),d(b.table().node()).addClass("dtr-"+c.type));b.on("column-reorder.dtr",function(){a._classLogic();a._resizeAuto();a._resize()});b.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});b.on("preXhr.dtr",function(){var e=[];b.rows().every(function(){this.child.isShown()&&e.push(this.id(true))});b.one("draw.dtr", function(){a._resizeAuto();a._resize();b.rows(e).every(function(){a._detailsDisplay(this,false)})})});b.on("init.dtr",function(){a._resizeAuto();a._resize();d.inArray(false,a.s.current)&&b.columns.adjust()});this._resize()},_columnsVisiblity:function(a){var b=this.s.dt,c=this.s.columns,e,f,g=c.map(function(a,b){return{columnIdx:b,priority:a.priority}}).sort(function(a,b){return a.priority!==b.priority?a.priority-b.priority:a.columnIdx-b.columnIdx}),h=d.map(c,function(e,c){return!1===b.column(c).visible()? "not-visible":e.auto&&null===e.minWidth?!1:!0===e.auto?"-":-1!==d.inArray(a,e.includeIn)}),m=0;e=0;for(f=h.length;em-c[k].minWidth?(s=!0,h[k]=!1):h[k]=!0,m-=c[k].minWidth)}g=!1;e=0;for(f=c.length;e=k&&f(d,b[c].name)}else{if("not-"===g){c=0;for(g=b.length;c").append(h).appendTo(f)}d("").append(g).appendTo(e);"inline"===this.c.details.type&&d(c).addClass("dtr-inline collapsed");d(c).find("[name]").removeAttr("name");d(c).css("position","relative"); c=d("
    ").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(c);c.insertBefore(a.table().node());g.each(function(c){c=a.column.index("fromVisible",c);b[c].minWidth=this.offsetWidth||0});c.remove()}},_setColumnVis:function(a,b){var c=this.s.dt,e=b?"":"none";d(c.column(a).header()).css("display",e);d(c.column(a).footer()).css("display",e);c.column(a).nodes().to$().css("display",e);d.isEmptyObject(n)||c.cells(null,a).indexes().each(function(a){r(c,a.row,a.column)})},_tabIndexes:function(){var a= this.s.dt,b=a.cells({page:"current"}).nodes().to$(),c=a.settings()[0],e=this.c.details.target;b.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");"number"===typeof e?a.cells(null,e,{page:"current"}).nodes().to$().attr("tabIndex",c.iTabIndex).data("dtr-keyboard",1):("td:first-child, th:first-child"===e&&(e=">td:first-child, >th:first-child"),d(e,a.rows({page:"current"}).nodes()).attr("tabIndex",c.iTabIndex).data("dtr-keyboard",1))}});i.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l", width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];i.display={childRow:function(a,b,c){if(b){if(d(a.node()).hasClass("parent"))return a.child(c(),"child").show(),!0}else{if(a.child.isShown())return a.child(!1),d(a.node()).removeClass("parent"),!1;a.child(c(),"child").show();d(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,b,c){if(!b&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),d(a.node()).removeClass("parent"), !1;a.child(c(),"child").show();d(a.node()).addClass("parent");return!0},modal:function(a){return function(b,c,e){if(c)d("div.dtr-modal-content").empty().append(e());else{var f=function(){g.remove();d(j).off("keypress.dtr")},g=d('
    ').append(d('
    ').append(d('
    ').append(e())).append(d('
    ×
    ').click(function(){f()}))).append(d('
    ').click(function(){f()})).appendTo("body"); d(j).on("keyup.dtr",function(a){27===a.keyCode&&(a.stopPropagation(),f())})}a&&a.header&&d("div.dtr-modal-content").prepend("

    "+a.header(b)+"

    ")}}};var n={};i.renderer={listHiddenNodes:function(){return function(a,b,c){var e=d('
      '),f=!1;d.each(c,function(b,c){c.hidden&&(d('
    • '+c.title+"
    • ").append(d('').append(t(a, c.rowIndex,c.columnIndex))).appendTo(e),f=!0)});return f?e:!1}},listHidden:function(){return function(a,b,c){return(a=d.map(c,function(a){return a.hidden?'
    • '+a.title+' '+a.data+"
    • ":""}).join(""))?d('
        ').append(a):!1}},tableAll:function(a){a=d.extend({tableClass:""},a);return function(b, c,e){b=d.map(e,function(a){return''+a.title+": "+a.data+""}).join("");return d('').append(b)}}};i.defaults={breakpoints:i.breakpoints,auto:!0,details:{display:i.display.childRow,renderer:i.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var p=d.fn.dataTable.Api;p.register("responsive()",function(){return this});p.register("responsive.index()", function(a){a=d(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});p.register("responsive.rebuild()",function(){return this.iterator("table",function(a){a._responsive&&a._responsive._classLogic()})});p.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});p.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==d.inArray(!1,a._responsive.s.current): !1});p.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(a,b){return a._responsive?a._responsive.s.current[b]:!1},1)});i.version="2.2.3";d.fn.dataTable.Responsive=i;d.fn.DataTable.Responsive=i;d(j).on("preInit.dt.dtr",function(a,b){if("dt"===a.namespace&&(d(b.nTable).hasClass("responsive")||d(b.nTable).hasClass("dt-responsive")||b.oInit.responsive||o.defaults.responsive)){var c=b.oInit.responsive;!1!==c&&new i(b,d.isPlainObject(c)? c:{})}});return i}); /*! Buttons for DataTables 1.6.0 ©2016-2019 SpryMedia Ltd - datatables.net/license */ (function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(u){return d(u,window,document)}):"object"===typeof exports?module.exports=function(u,t){u||(u=window);t&&t.fn.dataTable||(t=require("datatables.net")(u,t).$);return d(t,u,u.document)}:d(jQuery,window,document)})(function(d,u,t,p){function y(a){a=new m.Api(a);var b=a.init().buttons||m.defaults.buttons;return(new n(a,b)).container()}var m=d.fn.dataTable,B=0,C=0,q=m.ext.buttons,n=function(a,b){if(!(this instanceof n))return function(b){return(new n(b,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});d.isArray(b)&&(b={buttons:b});this.c=d.extend(!0,{},n.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new m.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+B++};this.dom={container:d("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)};this._constructor()};d.extend(n.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===p)return a.conf.action;a.conf.action= b;return this},active:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.button.active;c=d(c.node);if(b===p)return c.hasClass(a);c.toggleClass(a,b===p?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){b=b.split("-");var e=this.s;c=0;for(var d=b.length-1;c"),l.conf._collection= l.collection,this._expandButton(l.buttons,l.conf.buttons,!0,e)),r.init&&r.init.call(g.button(l.node),g,d(l.node),r),f++)}}},_buildButton:function(a,b){var c=this.c.dom.button,e=this.c.dom.buttonLiner,g=this.c.dom.collection,f=this.s.dt,h=function(b){return"function"===typeof b?b(f,l,a):b};b&&g.button&&(c=g.button);b&&g.buttonLiner&&(e=g.buttonLiner);if(a.available&&!a.available(f,a))return!1;var k=function(a,b,c,e){e.action.call(b.button(c),a,b,c,e);d(b.table().node()).triggerHandler("buttons-action.dt", [b.button(c),b,c,e])};g=a.tag||c.tag;var r=a.clickBlurs===p?!0:a.clickBlurs,l=d("<"+g+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(b){b.preventDefault();!l.hasClass(c.disabled)&&a.action&&k(b,f,l,a);r&&l.blur()}).on("keyup.dtb",function(b){13===b.keyCode&&!l.hasClass(c.disabled)&&a.action&&k(b,f,l,a)});"a"===g.toLowerCase()&&l.attr("href","#");"button"===g.toLowerCase()&&l.attr("type","button"); e.tag?(g=d("<"+e.tag+"/>").html(h(a.text)).addClass(e.className),"a"===e.tag.toLowerCase()&&g.attr("href","#"),l.append(g)):l.html(h(a.text));!1===a.enabled&&l.addClass(c.disabled);a.className&&l.addClass(a.className);a.titleAttr&&l.attr("title",h(a.titleAttr));a.attr&&l.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+C++);e=(e=this.c.dom.buttonContainer)&&e.tag?d("<"+e.tag+"/>").addClass(e.className).append(l):l;this._addKey(a);this.c.buttonCreated&&(e=this.c.buttonCreated(a,e));return{conf:a, node:l.get(0),inserter:e,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c").addClass(g.contentClassName).attr("role","menu");g.collectionTitle&&c.prepend('
        '+g.collectionTitle+"
        ");c.addClass(g.collectionLayout).css("display","none").append(a).insertAfter(f).stop().fadeIn(g.fade); e=c.css("position");"dt-container"===g.align&&(f=f.parent(),c.css("width",k.width()));if("absolute"===e){e=f.position();c.css({top:e.top+f.outerHeight(),left:e.left});var r=c.outerHeight(),l=c.outerWidth(),w=k.offset().top+k.height();w=e.top+f.outerHeight()+r-w;var D=e.top-r,m=k.offset().top;r=e.top-r-5;(w>m-D||g.dropup)&&-rk&&c.css("left", e.left-(r-k));k=f.offset().left+l;k>d(u).width()&&c.css("left",e.left-(k-d(u).width()))}else e=c.height()/2,e>d(u).height()/2&&(e=d(u).height()/2),c.css("marginTop",-1*e);g.background&&n.background(!0,g.backgroundClassName,g.fade,f);d("div.dt-button-background").on("click.dtb-collection",function(){});d("body").on("click.dtb-collection",function(b){var c=d.fn.addBack?"addBack":"andSelf";d(b.target).parents()[c]().filter(a).length||h()}).on("keyup.dtb-collection",function(a){27===a.keyCode&&h()}); g.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(a,b,c,e){e[0]!==f[0]&&h()})},0)}});n.background=function(a,b,c,e){c===p&&(c=400);e||(e=t.body);a?d("
        ").addClass(b).css("display","none").insertAfter(e).stop().fadeIn(c):d("div."+b).stop().fadeOut(c,function(){d(this).removeClass(b).remove()})};n.instanceSelector=function(a,b){if(a===p||null===a)return d.map(b,function(a){return a.inst});var c=[],e=d.map(b,function(a){return a.name}),g=function(a){if(d.isArray(a))for(var f= 0,k=a.length;f"+a+"":"";d('
        ').html(a).append(d("
        ")["string"=== typeof b?"html":"append"](b)).css("display","none").appendTo("body").fadeIn();c!==p&&0!==c&&(v=setTimeout(function(){e.buttons.info(!1)},c));this.on("destroy.btn-info",function(){e.buttons.info(!1)});return this});m.Api.register("buttons.exportData()",function(a){if(this.context.length)return E(new m.Api(this.context[0]),a)});m.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==p&&null!==b.title&&""!==b.title?b.title:b.filename;"function"=== typeof c&&(c=c());c===p||null===c?c=null:(-1!==c.indexOf("*")&&(c=d.trim(c.replace("*",d("head > title").text()))),c=c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(b=x(b.extension))||(b=""),c+=b);b=x(a.title);b=null===b?null:-1!==b.indexOf("*")?b.replace("*",d("head > title").text()||"Exported data"):b;return{filename:c,title:b,messageTop:z(this,a.message||a.messageTop,"top"),messageBottom:z(this,a.messageBottom,"bottom")}});var x=function(a){return null===a||a===p?null:"function"===typeof a? a():a},z=function(a,b,c){b=x(b);if(null===b)return null;a=d("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},A=d("