/*! For license information please see tabs-block.js.LICENSE.txt */ !function(){var e={6942:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function a(){for(var e="",t=0;t(0,p.applyFilters)(e,function(e){return Array.isArray(e)?e:[e]}(t),n)}const b=m("tenup.tabs.header"),k=m("tenup.tabs.footer");var h=(0,l.compose)((0,c.withSelect)(((e,{clientId:t})=>{const{getBlock:n}=e("core/block-editor");return{block:n(t)}})),(0,c.withDispatch)((e=>{const{selectBlock:t,insertBlock:n,removeBlock:o}=e("core/block-editor");return{selectBlock:e=>t(e),insertBlock:n,removeBlock:o}})),(0,l.ifCondition)((({block:e})=>e&&e.innerBlocks)))((e=>{const{attributes:{tabsTitle:n},setAttributes:a,isSelected:l,className:c,clientId:p,block:m,selectBlock:h,insertBlock:f,removeBlock:g,activeClass:v="is-active"}=e,{innerBlocks:w}=m,[B,y]=(0,t.useState)(w.length),[E,_]=(0,t.useState)(""),H=r()({border:!l,"components-tab-panel__tabs-item-is-editing":E});(0,t.useEffect)((()=>{const e=w.length>0?w[0].clientId:null;w.length<1&&B>w.length&&g(p),w.length>0&&B>w.length&&(h(e),y(w.length)),E&&(document.getElementById(`block-${p}`).classList.add("is-tab-editing"),document.getElementById(`block-${E}`)&&document.getElementById(`block-${E}`).setAttribute("data-is-tab-header-editing",1))}),[h,p,B,y,E,m,w,g,v]);const x=e=>{_(e),h(e)},T=()=>{const e=document.querySelectorAll(`#block-${p} > .wp-block-tenup-tabs .wp-block[data-is-tab-header-editing]`);e&&e.forEach((e=>e.removeAttribute("data-is-tab-header-editing")))};return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:`${c} ${H} tabs-horizontal`},(0,t.createElement)(b,{blockProps:e}),(()=>{const e=w.map((e=>{const{attributes:n,clientId:a}=e,{header:i}=n;return(0,t.createElement)(t.Fragment,{key:a},(0,t.createElement)(s.Button,{orientation:"horizontal","data-tab-block":a,className:r()("tab-item",{untitled:!i},"components-tab-panel__tabs-item"),label:i||(0,o.__)("Tab Header","publisher-media-kit"),onClick:()=>{T(),x(a),document.getElementById(`block-${a}`).setAttribute("data-is-tab-header-editing",1)}},(0,u.decodeEntities)(i)||(0,o.__)("Tab Header","publisher-media-kit")))}));return(0,t.useEffect)((()=>{w.forEach((e=>{const t=document.querySelector(`.tab-header[data-tab-block="${e.clientId}"]`),n=document.querySelector(`.components-tab-panel__tabs-item[data-tab-block="${e.clientId}"]`);if(!n)return;const o=n.getBoundingClientRect();t&&n&&(t.style.left=`${n.offsetLeft}px`,t.style.width=o.width-2+"px",t.style.top="-58px")}))})),(0,t.createElement)("div",{className:"tab-control"},(0,t.createElement)("div",{className:"tabs-header"},(0,t.createElement)(d.RichText,{tagName:"h2",className:"tab-title",onChange:e=>a({tabsTitle:e}),value:n}),(0,t.createElement)(s.NavigableMenu,{stopNavigationEvents:!0,eventToOffset:()=>!1,role:"tablist",orientation:"horizontal",className:"components-tab-panel__tabs tab-list"},e,(0,t.createElement)(s.Button,{className:"add-tab-button",icon:"plus",label:(0,o.__)("Add New Tab","publisher-media-kit"),onClick:()=>{const e=(0,i.createBlock)("tenup/tabs-item",{header:""},[(0,i.createBlock)("core/paragraph")]);f(e,void 0,p),T(),x(e.clientId)}}))))})(),(0,t.createElement)("div",{className:"tab-group"},(0,t.createElement)(d.InnerBlocks,{orientation:"horizontal",allowedBlocks:["tenup/tabs-item"],template:[["tenup/tabs-item",{header:""},[["core/paragraph",{}]]]],templateInsertUpdatesSelection:!0,__experimentalCaptureToolbars:!0})),(0,t.createElement)(k,{blockProps:e})))}));var f=()=>(0,t.createElement)(d.InnerBlocks.Content,null),g=JSON.parse('{"name":"tenup/tabs","title":"Tabs","description":"Display sections of content with brief headings in a compact tab layout that shows one section at a time.","text-domain":"publisher-media-kit","category":"common","example":{"innerBlocks":[{"name":"tenup/tabs-item","attributes":{"header":"Tab Header"},"innerBlocks":[{"name":"core/paragraph","attributes":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis."}}]},{"name":"tenup/tabs-item","attributes":{"header":"Tab Two Header"},"innerBlocks":[{"name":"core/paragraph","attributes":{"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis."}},{"name":"core/image","attributes":{"url":"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}}]}]},"attributes":{"tabsTitle":{"type":"string"}},"supports":{"html":false}}');var v={from:[{type:"block",blocks:["tenup/accordion"],__experimentalConvert:e=>{const t=e.innerBlocks.map((({attributes:e,innerBlocks:t})=>["tenup/tabs-item",{...e},t]));return(0,i.createBlock)("tenup/tabs",{},(0,i.createBlocksFromInnerBlocksTemplate)(t))}}],to:[{type:"block",blocks:["tenup/accordion"],__experimentalConvert:e=>{const t=e.innerBlocks.map((({attributes:e,innerBlocks:t})=>["tenup/accordion-item",{...e},t]));return(0,i.createBlock)("tenup/accordion",{},(0,i.createBlocksFromInnerBlocksTemplate)(t))}}]};const{name:w}=g,B={title:(0,o.__)("Tabs","publisher-media-kit"),description:(0,o.__)("Add tabbed content.","publisher-media-kit")};var y={name:w,settings:{...g,...B,icon:(0,t.createElement)("svg",{width:"125",height:"118",viewBox:"0 0 125 118",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.0127 6H6V24.9508H33.0127V6ZM0 0V30.9508H39.0127V0H0Z",fill:"#404040"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M76.0064 6H48.9937V24.9508H76.0064V6ZM42.9937 0V30.9508H82.0064V0H42.9937Z",fill:"#404040"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119 6H91.9872V24.9508H119V6ZM85.9872 0V30.9508H125V0H85.9872Z",fill:"#404040"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119 40.0992H6V111.099H119V40.0992ZM0 34.0992V117.099H125V34.0992H0Z",fill:"#404040"})),edit:h,save:f,transforms:v}};wp.domReady((function(){(t=>{if(!t)return;const{name:n,settings:o}=t;e(n,o)})(y)}))}()}();; !function(){"use strict";const{registerBlockType:e}=wp.blocks;var t=window.wp.element,n=window.wp.i18n,l=window.wp.blockEditor,a=window.wp.compose,o=window.wp.data,r=window.wp.hooks,i=window.wp.htmlEntities,s=window.wp.components;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,t.createElement)(l.Inserter,{isAppender:!0,rootClientId:e,renderToggle:({onToggle:e,disabled:l})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(s.Button,c({onClick:e,disabled:l,icon:a},o),n))});d.defaultProps={buttonText:"",label:"",icon:"plus"};var p=d;function m(e){return({children:t,blockProps:n})=>(0,r.applyFilters)(e,function(e){return Array.isArray(e)?e:[e]}(t),n)}const u=m("tenup.tabsItem.header"),b=m("tenup.tabsItem.footer");var w=(0,a.compose)((0,o.withSelect)(((e,{clientId:t})=>{const{hasSelectedInnerBlock:n,getBlockParents:l,getBlock:a}=e("core/block-editor"),o=l(t),r=a(o[o.length-1]);let i=0;return r.innerBlocks.forEach(((e,n)=>{e.clientId===t&&(i=n)})),{position:i,hasSelectedInnerBlock:n}})))((e=>{const{isSelected:a,hasSelectedInnerBlock:o,setAttributes:s,clientId:c,position:d,name:m,attributes:{header:w}}=e,h=a||o()?"tab-content is-active":"tab-content";return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(u,{blockProps:e}),(0,t.createElement)("div",{className:h},(0,t.createElement)("div",{"data-tab-block":c,className:`tab-header orientation-horizontal position-${d}`},(0,t.createElement)(l.RichText,{tagName:"div",value:w,placeholder:(0,n.__)("Tab Header","publisher-media-kit"),onChange:e=>{s({header:(0,i.decodeEntities)(e).replace(/<\/?[a-z][^>]*?>/gi," ")})},allowedFormats:[]})),(0,t.createElement)(l.InnerBlocks,{templateInsertUpdatesSelection:!0,__experimentalCaptureToolbars:!0,allowedBlocks:(0,r.applyFilters)("tenup.tabs.allowedBlocks",!0,m),renderAppender:()=>(0,t.createElement)(p,{className:"tabs-item-appender",rootClientId:c,isTertiary:!0,showTooltip:!0,label:(0,n.__)("Insert Tab Content","publisher-media-kit")})})),(0,t.createElement)(b,{blockProps:e}))}));var h=()=>(0,t.createElement)(l.InnerBlocks.Content,null),f=JSON.parse('{"name":"tenup/tabs-item","attributes":{"header":{"type":"string"}},"supports":{"reusable":false,"html":false},"parent":["tenup/tabs"]}');const{name:v}=f,k={title:(0,n.__)("Tabs Item","publisher-media-kit"),description:(0,n.__)("Add a new tab.","publisher-media-kit")};var E={name:v,settings:{...f,...k,icon:(0,t.createElement)("svg",{width:"125",height:"118",viewBox:"0 0 125 118",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M0 28.0992H39V40.0992H0V28.0992Z",fill:"#404040"}),(0,t.createElement)("path",{d:"M0 0H39.0127V30.9508H0V0Z",fill:"#404040"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.0127 6H6V24.9508H33.0127V6ZM0 0V30.9508H39.0127V0H0Z",fill:"#404040"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M76.0064 6H48.9937V24.9508H76.0064V6ZM42.9937 0V30.9508H82.0064V0H42.9937Z",fill:"#404040"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119 6H91.9872V24.9508H119V6ZM85.9872 0V30.9508H125V0H85.9872Z",fill:"#404040"}),(0,t.createElement)("path",{d:"M0 34.0992H125V117.099H0V34.0992Z",fill:"#404040"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119 40.0992H6V111.099H119V40.0992ZM0 34.0992V117.099H125V34.0992H0Z",fill:"#404040"})),edit:w,save:h}};wp.domReady((function(){(t=>{if(!t)return;const{name:n,settings:l}=t;e(n,l)})(E)}))}();; (()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){if(this.formData={},this.tree={},!(t instanceof FormData))return this;this.formData=t;const e=()=>{const t=new Map;return t.largestIndex=0,t.set=function(e,i){""===e?e=t.largestIndex++:/^[0-9]+$/.test(e)&&(e=parseInt(e),t.largestIndex<=e&&(t.largestIndex=e+1)),Map.prototype.set.call(t,e,i)},t};this.tree=e();const i=/^(?[a-z][-a-z0-9_:]*)(?(?:\[(?:[a-z][-a-z0-9_:]*|[0-9]*)\])*)/i;for(const[t,s]of this.formData){const o=t.match(i);if(o)if(""===o.groups.array)this.tree.set(o.groups.name,s);else{const t=[...o.groups.array.matchAll(/\[([a-z][-a-z0-9_:]*|[0-9]*)\]/gi)].map((([t,e])=>e));t.unshift(o.groups.name);const i=t.pop();t.reduce(((t,i)=>{if(/^[0-9]+$/.test(i)&&(i=parseInt(i)),t.get(i)instanceof Map)return t.get(i);const s=e();return t.set(i,s),s}),this.tree).set(i,s)}}}t.r(e),t.d(e,{all:()=>D,any:()=>M,date:()=>m,dayofweek:()=>u,email:()=>r,enum:()=>h,file:()=>d,maxdate:()=>z,maxfilesize:()=>j,maxitems:()=>v,maxlength:()=>x,maxnumber:()=>y,mindate:()=>A,minfilesize:()=>$,minitems:()=>w,minlength:()=>g,minnumber:()=>b,number:()=>c,required:()=>n,requiredfile:()=>a,stepnumber:()=>I,tel:()=>l,time:()=>f,url:()=>p}),i.prototype.entries=function(){return this.tree.entries()},i.prototype.get=function(t){return this.tree.get(t)},i.prototype.getAll=function(t){if(!this.has(t))return[];const e=t=>{const i=[];if(t instanceof Map)for(const[s,o]of t)i.push(...e(o));else""!==t&&i.push(t);return i};return e(this.get(t))},i.prototype.has=function(t){return this.tree.has(t)},i.prototype.keys=function(){return this.tree.keys()},i.prototype.values=function(){return this.tree.values()};const s=i;function o({rule:t,field:e,error:i,...s}){this.rule=t,this.field=e,this.error=i,this.properties=s}const n=function(t){if(0===t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length)throw new o(this)},a=function(t){if(0===t.getAll(this.field).length)throw new o(this)},r=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(t.length<6)return!1;if(-1===t.indexOf("@",1))return!1;if(t.indexOf("@")!==t.lastIndexOf("@"))return!1;const[e,i]=t.split("@",2);if(!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/.test(e))return!1;if(/\.{2,}/.test(i))return!1;if(/(?:^[ \t\n\r\0\x0B.]|[ \t\n\r\0\x0B.]$)/.test(i))return!1;const s=i.split(".");if(s.length<2)return!1;for(const t of s){if(/(?:^[ \t\n\r\0\x0B-]|[ \t\n\r\0\x0B-]$)/.test(t))return!1;if(!/^[a-z0-9-]+$/i.test(t))return!1}return!0})))throw new o(this)},p=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(!e.every((t=>{try{return(t=>-1!==["http","https","ftp","ftps","mailto","news","irc","irc6","ircs","gopher","nntp","feed","telnet","mms","rtsp","sms","svn","tel","fax","xmpp","webcal","urn"].indexOf(t))(new URL(t).protocol.replace(/:$/,""))}catch{return!1}})))throw new o(this)},l=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>(((t=(t=t.replace(/[#*].*$/,"")).replaceAll(/[()/.*#\s-]+/g,"")).startsWith("+")||t.startsWith("00"))&&(t=`+${t.replace(/^[+0]+/,"")}`),!!/^[+]?[0-9]+$/.test(t)&&6t.trim())).filter((t=>""!==t)).every((t=>!!/^[-]?[0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)||!!/^[-]?(?:[0-9]+)?[.][0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t))))throw new o(this)},m=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(!/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.valueOf())})))throw new o(this)},f=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=t.match(/^([0-9]{2})\:([0-9]{2})(?:\:([0-9]{2}))?$/);if(!e)return!1;const i=parseInt(e[1]),s=parseInt(e[2]),o=e[3]?parseInt(e[3]):0;return 0<=i&&i<=23&&0<=s&&s<=59&&0<=o&&o<=59})))throw new o(this)},d=function(t){if(!t.getAll(this.field).every((t=>t instanceof File&&this.accept?.some((e=>/^\.[a-z0-9]+$/i.test(e)?t.name.toLowerCase().endsWith(e.toLowerCase()):(t=>{const e=[],i=t.match(/^(?[a-z]+)\/(?[*]|[a-z0-9.+-]+)$/i);if(i){const t=i.groups.toplevel.toLowerCase(),s=i.groups.sub.toLowerCase();for(const[o,n]of(()=>{const t=new Map;return t.set("jpg|jpeg|jpe","image/jpeg"),t.set("gif","image/gif"),t.set("png","image/png"),t.set("bmp","image/bmp"),t.set("tiff|tif","image/tiff"),t.set("webp","image/webp"),t.set("ico","image/x-icon"),t.set("heic","image/heic"),t.set("asf|asx","video/x-ms-asf"),t.set("wmv","video/x-ms-wmv"),t.set("wmx","video/x-ms-wmx"),t.set("wm","video/x-ms-wm"),t.set("avi","video/avi"),t.set("divx","video/divx"),t.set("flv","video/x-flv"),t.set("mov|qt","video/quicktime"),t.set("mpeg|mpg|mpe","video/mpeg"),t.set("mp4|m4v","video/mp4"),t.set("ogv","video/ogg"),t.set("webm","video/webm"),t.set("mkv","video/x-matroska"),t.set("3gp|3gpp","video/3gpp"),t.set("3g2|3gp2","video/3gpp2"),t.set("txt|asc|c|cc|h|srt","text/plain"),t.set("csv","text/csv"),t.set("tsv","text/tab-separated-values"),t.set("ics","text/calendar"),t.set("rtx","text/richtext"),t.set("css","text/css"),t.set("htm|html","text/html"),t.set("vtt","text/vtt"),t.set("dfxp","application/ttaf+xml"),t.set("mp3|m4a|m4b","audio/mpeg"),t.set("aac","audio/aac"),t.set("ra|ram","audio/x-realaudio"),t.set("wav","audio/wav"),t.set("ogg|oga","audio/ogg"),t.set("flac","audio/flac"),t.set("mid|midi","audio/midi"),t.set("wma","audio/x-ms-wma"),t.set("wax","audio/x-ms-wax"),t.set("mka","audio/x-matroska"),t.set("rtf","application/rtf"),t.set("js","application/javascript"),t.set("pdf","application/pdf"),t.set("swf","application/x-shockwave-flash"),t.set("class","application/java"),t.set("tar","application/x-tar"),t.set("zip","application/zip"),t.set("gz|gzip","application/x-gzip"),t.set("rar","application/rar"),t.set("7z","application/x-7z-compressed"),t.set("exe","application/x-msdownload"),t.set("psd","application/octet-stream"),t.set("xcf","application/octet-stream"),t.set("doc","application/msword"),t.set("pot|pps|ppt","application/vnd.ms-powerpoint"),t.set("wri","application/vnd.ms-write"),t.set("xla|xls|xlt|xlw","application/vnd.ms-excel"),t.set("mdb","application/vnd.ms-access"),t.set("mpp","application/vnd.ms-project"),t.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t.set("docm","application/vnd.ms-word.document.macroEnabled.12"),t.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),t.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),t.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),t.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),t.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),t.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),t.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),t.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),t.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),t.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),t.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),t.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),t.set("potm","application/vnd.ms-powerpoint.template.macroEnabled.12"),t.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),t.set("sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"),t.set("sldm","application/vnd.ms-powerpoint.slide.macroEnabled.12"),t.set("onetoc|onetoc2|onetmp|onepkg","application/onenote"),t.set("oxps","application/oxps"),t.set("xps","application/vnd.ms-xpsdocument"),t.set("odt","application/vnd.oasis.opendocument.text"),t.set("odp","application/vnd.oasis.opendocument.presentation"),t.set("ods","application/vnd.oasis.opendocument.spreadsheet"),t.set("odg","application/vnd.oasis.opendocument.graphics"),t.set("odc","application/vnd.oasis.opendocument.chart"),t.set("odb","application/vnd.oasis.opendocument.database"),t.set("odf","application/vnd.oasis.opendocument.formula"),t.set("wp|wpd","application/wordperfect"),t.set("key","application/vnd.apple.keynote"),t.set("numbers","application/vnd.apple.numbers"),t.set("pages","application/vnd.apple.pages"),t})())("*"===s&&n.startsWith(t+"/")||n===i[0])&&e.push(...o.split("|"))}return e})(e).some((e=>(e="."+e.trim(),t.name.toLowerCase().endsWith(e.toLowerCase())))))))))throw new o(this)},h=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>this.accept?.some((e=>t===String(e))))))throw new o(this)},u=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=0===(i=new Date(t).getDay())?7:i;var i;return this.accept?.some((t=>e===parseInt(t)))})))throw new o(this)},w=function(t){if(t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).lengtht.trim())).filter((t=>""!==t));if(parseInt(this.threshold)t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),0!==i&&it.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),parseInt(this.threshold)t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(t)t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(this.threshold)t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&tt.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&this.threshold{t instanceof File&&(i+=t.size)})),i{t instanceof File&&(i+=t.size)})),parseInt(this.threshold)t.trim())).filter((t=>""!==t)),i=parseFloat(this.base),s=parseFloat(this.interval);if(!(0{const e=(parseFloat(t)-i)%s;return"0.000000"===Math.abs(e).toFixed(6)||"0.000000"===Math.abs(e-s).toFixed(6)})))throw new o(this)},O=({ruleObj:t,options:i})=>{const{rule:s,...o}=t;return"function"==typeof e[s]&&("function"!=typeof e[s].matches||e[s].matches(o,i))},E=({ruleObj:t,formDataTree:i,options:s})=>{const{rule:o}=t;e[o].call(t,i,s)},k=[],F=t=>[...k].reduce(((t,e)=>i=>e(i,t)),t),D=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.every((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;if(void 0!==t.error)throw t;return!1}return!0})))throw new o(this)},M=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.some((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;return!1}return!0})))throw new o(this)};var L;window.swv={validators:e,validate:(t,e,i={})=>{const n=(t.rules??[]).filter((t=>O({ruleObj:t,options:i})));if(!n.length)return new Map;const a=F(E),r=new s(e),p=n.reduce(((t,e)=>{try{a({ruleObj:e,formDataTree:r,options:i})}catch(e){if(!(e instanceof o))throw e;if(void 0!==e.field&&!t.has(e.field)&&void 0!==e.error)return t.set(e.field,e)}return t}),new Map);for(const t of r.keys())p.has(t)||p.set(t,{validInputs:r.getAll(t)});return p},use:t=>{k.push(t)},...null!==(L=window.swv)&&void 0!==L?L:{}}})();;