var E=(i,a)=>()=>(a||i((a={exports:{}}).exports,a),a.exports);var F=E((y,p)=>{(function(i,a){typeof y=="object"&&typeof p<"u"?p.exports=a():typeof define=="function"&&define.amd?define(a):(i=typeof globalThis<"u"?globalThis:i||self,i.FormValidation=i.FormValidation||{},i.FormValidation.plugins=i.FormValidation.plugins||{},i.FormValidation.plugins.Semantic=a())})(void 0,function(){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,e,r){return e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t,e){if(typeof e!="function"&&e!==null)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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},c(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},s(t,e)}function h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function b(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return b(t)}function _(t){var e=h();return function(){var n=c(t),o;if(e){var f=c(this).constructor;o=Reflect.construct(n,arguments,f)}else o=n.apply(this,arguments);return g(this,o)}}var O=FormValidation.utils.classSet,d=FormValidation.utils.hasClass,P=FormValidation.plugins.Framework,w=function(t){v(r,t);var e=_(r);function r(n){return i(this,r),e.call(this,Object.assign({},{formClass:"fv-plugins-semantic",messageClass:"ui pointing red label",rowInvalidClass:"error",rowPattern:/^.*(field|column).*$/,rowSelector:".fields",rowValidClass:"fv-has-success"},n))}return m(r,[{key:"onIconPlaced",value:function(o){var f=o.element.getAttribute("type");if(f==="checkbox"||f==="radio"){var u=o.element.parentElement;O(o.iconElement,{"fv-plugins-icon-check":!0}),u.parentElement.insertBefore(o.iconElement,u.nextSibling)}}},{key:"onMessagePlaced",value:function(o){var f=o.element.getAttribute("type"),u=o.elements.length;if((f==="checkbox"||f==="radio")&&u>1){var j=o.elements[u-1],l=j.parentElement;d(l,f)&&d(l,"ui")&&l.parentElement.insertBefore(o.messageElement,l.nextSibling)}}}]),r}(P);return w})});export default F();
