!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=y+l-f,h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}();
!function(name,definition){if(typeof module!='undefined'&&module.exports)module.exports=definition()
else if(typeof define=='function'&&define.amd)define(name,definition)
else this[name]=definition()}('bowser',function(){var t=true
function detect(ua){function getFirstMatch(regex){var match=ua.match(regex);return(match&&match.length>1&&match[1])||'';}
function getSecondMatch(regex){var match=ua.match(regex);return(match&&match.length>1&&match[2])||'';}
var iosdevice=getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase(),likeAndroid=/like android/i.test(ua),android=!likeAndroid&&/android/i.test(ua),nexusMobile=/nexus\s*[0-6]\s*/i.test(ua),nexusTablet=!nexusMobile&&/nexus\s*[0-9]+/i.test(ua),chromeos=/CrOS/.test(ua),silk=/silk/i.test(ua),sailfish=/sailfish/i.test(ua),tizen=/tizen/i.test(ua),webos=/(web|hpw)os/i.test(ua),windowsphone=/windows phone/i.test(ua),windows=!windowsphone&&/windows/i.test(ua),mac=!iosdevice&&!silk&&/macintosh/i.test(ua),linux=!android&&!sailfish&&!tizen&&!webos&&/linux/i.test(ua),edgeVersion=getFirstMatch(/edge\/(\d+(\.\d+)?)/i),versionIdentifier=getFirstMatch(/version\/(\d+(\.\d+)?)/i),tablet=/tablet/i.test(ua),mobile=!tablet&&/[^-]mobi/i.test(ua),xbox=/xbox/i.test(ua),result
if(/opera|opr|opios/i.test(ua)){result={name:'Opera',opera:t,version:versionIdentifier||getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}}
else if(/coast/i.test(ua)){result={name:'Opera Coast',coast:t,version:versionIdentifier||getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}}
else if(/yabrowser/i.test(ua)){result={name:'Yandex Browser',yandexbrowser:t,version:versionIdentifier||getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}}
else if(/ucbrowser/i.test(ua)){result={name:'UC Browser',ucbrowser:t,version:getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/mxios/i.test(ua)){result={name:'Maxthon',maxthon:t,version:getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/epiphany/i.test(ua)){result={name:'Epiphany',epiphany:t,version:getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/puffin/i.test(ua)){result={name:'Puffin',puffin:t,version:getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}}
else if(/sleipnir/i.test(ua)){result={name:'Sleipnir',sleipnir:t,version:getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/k-meleon/i.test(ua)){result={name:'K-Meleon',kMeleon:t,version:getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(windowsphone){result={name:'Windows Phone',windowsphone:t}
if(edgeVersion){result.msedge=t
result.version=edgeVersion}else{result.msie=t
result.version=getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i)}}
else if(/msie|trident/i.test(ua)){result={name:'Internet Explorer',msie:t,version:getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i)}}else if(chromeos){result={name:'Chrome',chromeos:t,chromeBook:t,chrome:t,version:getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}}else if(/chrome.+? edge/i.test(ua)){result={name:'Microsoft Edge',msedge:t,version:edgeVersion}}
else if(/vivaldi/i.test(ua)){result={name:'Vivaldi',vivaldi:t,version:getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i)||versionIdentifier}}
else if(sailfish){result={name:'Sailfish',sailfish:t,version:getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}}
else if(/seamonkey\//i.test(ua)){result={name:'SeaMonkey',seamonkey:t,version:getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i)}}
else if(/firefox|iceweasel|fxios/i.test(ua)){result={name:'Firefox',firefox:t,version:getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)}
if(/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)){result.firefoxos=t}}
else if(silk){result={name:'Amazon Silk',silk:t,version:getFirstMatch(/silk\/(\d+(\.\d+)?)/i)}}
else if(/phantom/i.test(ua)){result={name:'PhantomJS',phantom:t,version:getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i)}}
else if(/slimerjs/i.test(ua)){result={name:'SlimerJS',slimer:t,version:getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i)}}
else if(/blackberry|\bbb\d+/i.test(ua)||/rim\stablet/i.test(ua)){result={name:'BlackBerry',blackberry:t,version:versionIdentifier||getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}}
else if(webos){result={name:'WebOS',webos:t,version:versionIdentifier||getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)};if(/touchpad\//i.test(ua)){result.touchpad=t;}}
else if(/bada/i.test(ua)){result={name:'Bada',bada:t,version:getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i)};}
else if(tizen){result={name:'Tizen',tizen:t,version:getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||versionIdentifier};}
else if(/qupzilla/i.test(ua)){result={name:'QupZilla',qupzilla:t,version:getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||versionIdentifier}}
else if(/chromium/i.test(ua)){result={name:'Chromium',chromium:t,version:getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||versionIdentifier}}
else if(/chrome|crios|crmo/i.test(ua)){result={name:'Chrome',chrome:t,version:getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}}
else if(android){result={name:'Android',version:versionIdentifier}}
else if(/safari|applewebkit/i.test(ua)){result={name:'Safari',safari:t}
if(versionIdentifier){result.version=versionIdentifier}}
else if(iosdevice){result={name:iosdevice=='iphone'?'iPhone':iosdevice=='ipad'?'iPad':'iPod'}
if(versionIdentifier){result.version=versionIdentifier}}
else if(/googlebot/i.test(ua)){result={name:'Googlebot',googlebot:t,version:getFirstMatch(/googlebot\/(\d+(\.\d+))/i)||versionIdentifier}}else{result={name:getFirstMatch(/^(.*)\/(.*) /),version:getSecondMatch(/^(.*)\/(.*) /)};}
if(!result.msedge&&/(apple)?webkit/i.test(ua)){if(/(apple)?webkit\/537\.36/i.test(ua)){result.name=result.name||"Blink"
result.blink=t}else{result.name=result.name||"Webkit"
result.webkit=t}
if(!result.version&&versionIdentifier){result.version=versionIdentifier}}else if(!result.opera&&/gecko\//i.test(ua)){result.name=result.name||"Gecko"
result.gecko=t
result.version=result.version||getFirstMatch(/gecko\/(\d+(\.\d+)?)/i)}
if(!result.msedge&&(android||result.silk)){result.android=t}else if(iosdevice){result[iosdevice]=t
result.ios=t}else if(mac){result.mac=t}else if(xbox){result.xbox=t}else if(windows){result.windows=t}else if(linux){result.linux=t}
var osVersion='';if(result.windowsphone){osVersion=getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);}else if(iosdevice){osVersion=getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i);osVersion=osVersion.replace(/[_\s]/g,'.');}else if(android){osVersion=getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i);}else if(result.webos){osVersion=getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);}else if(result.blackberry){osVersion=getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i);}else if(result.bada){osVersion=getFirstMatch(/bada\/(\d+(\.\d+)*)/i);}else if(result.tizen){osVersion=getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i);}
if(osVersion){result.osversion=osVersion;}
var osMajorVersion=osVersion.split('.')[0];if(tablet||nexusTablet||iosdevice=='ipad'||(android&&(osMajorVersion==3||(osMajorVersion>=4&&!mobile)))||result.silk){result.tablet=t}else if(mobile||iosdevice=='iphone'||iosdevice=='ipod'||android||nexusMobile||result.blackberry||result.webos||result.bada){result.mobile=t}
if(result.msedge||(result.msie&&result.version>=10)||(result.yandexbrowser&&result.version>=15)||(result.vivaldi&&result.version>=1.0)||(result.chrome&&result.version>=20)||(result.firefox&&result.version>=20.0)||(result.safari&&result.version>=6)||(result.opera&&result.version>=10.0)||(result.ios&&result.osversion&&result.osversion.split(".")[0]>=6)||(result.blackberry&&result.version>=10.1)||(result.chromium&&result.version>=20)){result.a=t;}
else if((result.msie&&result.version<10)||(result.chrome&&result.version<20)||(result.firefox&&result.version<20.0)||(result.safari&&result.version<6)||(result.opera&&result.version<10.0)||(result.ios&&result.osversion&&result.osversion.split(".")[0]<6)||(result.chromium&&result.version<20)){result.c=t}else result.x=t
return result}
var bowser=detect(typeof navigator!=='undefined'?navigator.userAgent:'')
bowser.test=function(browserList){for(var i=0;i<browserList.length;++i){var browserItem=browserList[i];if(typeof browserItem==='string'){if(browserItem in bowser){return true;}}}
return false;}
function getVersionPrecision(version){return version.split(".").length;}
function map(arr,iterator){var result=[],i;if(Array.prototype.map){return Array.prototype.map.call(arr,iterator);}
for(i=0;i<arr.length;i++){result.push(iterator(arr[i]));}
return result;}
function compareVersions(versions){var precision=Math.max(getVersionPrecision(versions[0]),getVersionPrecision(versions[1]));var chunks=map(versions,function(version){var delta=precision-getVersionPrecision(version);version=version+new Array(delta+1).join(".0");return map(version.split("."),function(chunk){return new Array(20-chunk.length).join("0")+chunk;}).reverse();});while(--precision>=0){if(chunks[0][precision]>chunks[1][precision]){return 1;}
else if(chunks[0][precision]===chunks[1][precision]){if(precision===0){return 0;}}else{return-1;}}}
function isUnsupportedBrowser(minVersions,strictMode,ua){var _bowser=bowser;if(typeof strictMode==='string'){ua=strictMode;strictMode=void(0);}
if(strictMode===void(0)){strictMode=false;}
if(ua){_bowser=detect(ua);}
var version=""+_bowser.version;for(var browser in minVersions){if(minVersions.hasOwnProperty(browser)){if(_bowser[browser]){return compareVersions([version,minVersions[browser]])<0;}}}
return strictMode;}
function check(minVersions,strictMode,ua){return!isUnsupportedBrowser(minVersions,strictMode,ua);}
bowser.isUnsupportedBrowser=isUnsupportedBrowser;bowser.compareVersions=compareVersions;bowser.check=check;bowser._detect=detect;return bowser});(function($){UABBTrigger={triggerHook:function(hook,args){$('body').trigger('uabb-trigger.'+hook,args);},addHook:function(hook,callback){$('body').on('uabb-trigger.'+hook,callback);},removeHook:function(hook,callback){$('body').off('uabb-trigger.'+hook,callback);},};})(jQuery);jQuery(document).ready(function($){if(typeof bowser!=='undefined'&&bowser!==null){var uabb_browser=bowser.name,uabb_browser_v=bowser.version,uabb_browser_class=uabb_browser.replace(/\s+/g,'-').toLowerCase(),uabb_browser_v_class=uabb_browser_class+parseInt(uabb_browser_v);$('html').addClass(uabb_browser_class).addClass(uabb_browser_v_class);}
$('.uabb-row-separator').parents('html').css('overflow-x','hidden');});var wpAjaxUrl='https://theboxvlaanderen.be/wp-admin/admin-ajax.php';var flBuilderUrl='https://theboxvlaanderen.be/wp-content/plugins/bb-plugin/';var FLBuilderLayoutConfig={anchorLinkAnimations:{duration:1000,easing:'swing',offset:100},paths:{pluginUrl:'https://theboxvlaanderen.be/wp-content/plugins/bb-plugin/',wpAjaxUrl:'https://theboxvlaanderen.be/wp-admin/admin-ajax.php'},breakpoints:{small:768,medium:992,large:1200},waypoint:{offset:80},emptyColWidth:'0%'};(function($){if(typeof FLBuilderLayout!='undefined'){return;}
FLBuilderLayout={init:function(){FLBuilderLayout._destroy();FLBuilderLayout._initClasses();FLBuilderLayout._initBackgrounds();FLBuilderLayout._initButtons();FLBuilderLayout._initRowShapeLayerHeight();if(0===$('.fl-builder-edit').length){FLBuilderLayout._initAnchorLinks();FLBuilderLayout._initHash();FLBuilderLayout._initForms();FLBuilderLayout._reorderMenu();}else{FLBuilderLayout._initNestedColsWidth();}
$('body').removeClass('fl-no-js');},refreshGalleries:function(element){var $element='undefined'==typeof element?$('body'):$(element),mfContent=$element.find('.fl-mosaicflow-content'),wmContent=$element.find('.fl-gallery'),mfObject=null;if(mfContent){mfObject=mfContent.data('mosaicflow');if(mfObject){mfObject.columns=$([]);mfObject.columnsHeights=[];mfContent.data('mosaicflow',mfObject);mfContent.mosaicflow('refill');}}
if(wmContent){wmContent.trigger('refreshWookmark');}},refreshGridLayout:function(element){var $element='undefined'==typeof element?$('body'):$(element),msnryContent=$element.find('.masonry');if(msnryContent.length){msnryContent.masonry('layout');}},reloadSlider:function(content){var $content='undefined'==typeof content?$('body'):$(content);if($content.find('.bx-viewport > div').length>0){$.each($content.find('.bx-viewport > div'),function(key,slider){setTimeout(function(){$(slider).data('bxSlider').reloadSlider();},100);});}},resizeAudio:function(element){var $element='undefined'==typeof element?$('body'):$(element),audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio'),player=null,mejsPlayer=null,rail=null,railWidth=400;if(audioPlayers.length&&typeof mejs!=='undefined'){audioPlayers.each(function(){player=$(this);mejsPlayer=mejs.players[player.attr('id')];rail=player.find('.mejs-controls .mejs-time-rail');var innerMejs=player.find('.mejs-inner'),total=player.find('.mejs-controls .mejs-time-total');if(typeof mejsPlayer!=='undefined'){railWidth=Math.ceil(player.width()*0.8);if(innerMejs.length){rail.css('width',railWidth+'px!important');mejsPlayer.options.autosizeProgress=true;setTimeout(function(){mejsPlayer.setControlsSize();},50);player.find('.mejs-inner').css({visibility:'visible',height:'inherit'});}}});}},preloadAudio:function(element){var $element='undefined'==typeof element?$('body'):$(element),contentWrap=$element.closest('.fl-accordion-item'),audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio');if(!contentWrap.hasClass('fl-accordion-item-active')&&audioPlayers.find('.mejs-inner').length){audioPlayers.find('.mejs-inner').css({visibility:'hidden',height:0});}},resizeSlideshow:function(){if(typeof YUI!=='undefined'){YUI().use('node-event-simulate',function(Y){Y.one(window).simulate("resize");});}},reloadGoogleMap:function(element){var $element='undefined'==typeof element?$('body'):$(element),googleMap=$element.find('iframe[src*="google.com/maps"]');if(googleMap.length){googleMap.attr('src',function(i,val){return val;});}},_destroy:function(){var win=$(window);win.off('scroll.fl-bg-parallax');win.off('resize.fl-bg-video');},_isTouch:function(){if(('ontouchstart'in window)||(window.DocumentTouch&&document instanceof DocumentTouch)){return true;}
return false;},_isMobile:function(){return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent);},_initClasses:function(){var body=$('body'),ua=navigator.userAgent;if(!body.hasClass('fl-builder-blocks-only')&&!body.hasClass('archive')&&$('.fl-builder-content-primary').length>0){body.addClass('fl-builder');}
if(FLBuilderLayout._isTouch()){body.addClass('fl-builder-touch');}
if(FLBuilderLayout._isMobile()){body.addClass('fl-builder-mobile');}
if($(window).width()<FLBuilderLayoutConfig.breakpoints.small){body.addClass('fl-builder-breakpoint-small');}
if($(window).width()>FLBuilderLayoutConfig.breakpoints.small&&$(window).width()<FLBuilderLayoutConfig.breakpoints.medium){body.addClass('fl-builder-breakpoint-medium');}
if($(window).width()>FLBuilderLayoutConfig.breakpoints.medium&&$(window).width()<FLBuilderLayoutConfig.breakpoints.large){body.addClass('fl-builder-breakpoint-large');}
if($(window).width()>FLBuilderLayoutConfig.breakpoints.large){body.addClass('fl-builder-breakpoint-default');}
if(ua.indexOf('Trident/7.0')>-1&&ua.indexOf('rv:11.0')>-1){body.addClass('fl-builder-ie-11');}},_initBackgrounds:function(){var win=$(window);if($('.fl-row-bg-parallax').length>0&&!FLBuilderLayout._isMobile()){FLBuilderLayout._scrollParallaxBackgrounds();FLBuilderLayout._initParallaxBackgrounds();win.on('resize.fl-bg-parallax',FLBuilderLayout._initParallaxBackgrounds);win.on('scroll.fl-bg-parallax',FLBuilderLayout._scrollParallaxBackgrounds);}
if($('.fl-bg-video').length>0){FLBuilderLayout._initBgVideos();FLBuilderLayout._resizeBgVideos();var resizeBGTimer=null;win.on('resize.fl-bg-video',function(e){clearTimeout(resizeBGTimer);resizeBGTimer=setTimeout(function(){FLBuilderLayout._resizeBgVideos(e);},100);});}},_initButtons:function(){$('a.fl-button[role="button"]').on('keydown',function(event){if(event.key==='Enter'||event.key===' '){event.preventDefault();$(this).trigger('click');}});},_initParallaxBackgrounds:function(){$('.fl-row-bg-parallax').each(FLBuilderLayout._initParallaxBackground);},_initParallaxBackground:function(){var row=$(this),content=row.find('> .fl-row-content-wrap'),winWidth=$(window).width(),screenSize='',imageSrc={default:'',medium:'',responsive:'',};imageSrc.default=row.data('parallax-image')||'';imageSrc.medium=row.data('parallax-image-medium')||imageSrc.default;imageSrc.responsive=row.data('parallax-image-responsive')||imageSrc.medium;if(winWidth>FLBuilderLayoutConfig.breakpoints.medium){screenSize='default';}else if(winWidth>FLBuilderLayoutConfig.breakpoints.small&&winWidth<=FLBuilderLayoutConfig.breakpoints.medium){screenSize='medium';}else if(winWidth<=FLBuilderLayoutConfig.breakpoints.small){screenSize='responsive';}
content.css('background-image','url('+imageSrc[screenSize]+')');row.data('current-image-loaded',screenSize);},_scrollParallaxBackgrounds:function(){$('.fl-row-bg-parallax').each(FLBuilderLayout._scrollParallaxBackground);},_scrollParallaxBackground:function(){var win=$(window),row=$(this),content=row.find('> .fl-row-content-wrap'),speed=row.data('parallax-speed'),offset=content.offset(),yPos=-((win.scrollTop()-offset.top)/ speed),initialOffset=(row.data('parallax-offset')!=null)?row.data('parallax-offset'):0,totalOffset=yPos-initialOffset;content.css('background-position','center '+totalOffset+'px');},_initBgVideos:function(){$('.fl-bg-video').each(FLBuilderLayout._initBgVideo);},_initBgVideo:function(){var wrap=$(this),width=wrap.data('width'),height=wrap.data('height'),mp4=wrap.data('mp4'),youtube=wrap.data('youtube'),vimeo=wrap.data('vimeo'),mp4Type=wrap.data('mp4-type'),webm=wrap.data('webm'),webmType=wrap.data('webm-type'),fallback=wrap.data('fallback'),loaded=wrap.data('loaded'),videoMobile=wrap.data('video-mobile'),playPauseButton=wrap.find('.fl-bg-video-play-pause-control'),fallbackTag='',videoTag=null,mp4Tag=null,webmTag=null;if(loaded){return;}
videoTag=$('<video autoplay loop muted playsinline></video>');if('undefined'!=typeof fallback&&''!=fallback){videoTag.attr('poster','data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')
videoTag.css({backgroundImage:'url("'+fallback+'")',backgroundColor:'transparent',backgroundRepeat:'no-repeat',backgroundSize:'cover',backgroundPosition:'center center',})}
if('undefined'!=typeof mp4&&''!=mp4){mp4Tag=$('<source />');mp4Tag.attr('src',mp4);mp4Tag.attr('type',mp4Type);videoTag.append(mp4Tag);}
if('undefined'!=typeof webm&&''!=webm){webmTag=$('<source />');webmTag.attr('src',webm);webmTag.attr('type',webmType);videoTag.append(webmTag);}
if(!FLBuilderLayout._isMobile()||(FLBuilderLayout._isMobile()&&"yes"==videoMobile)){if('undefined'!=typeof youtube){FLBuilderLayout._initYoutubeBgVideo.apply(this);}
else if('undefined'!=typeof vimeo){FLBuilderLayout._initVimeoBgVideo.apply(this);}else{wrap.append(videoTag);if(playPauseButton.length>0){var video=videoTag[0];playPauseButton.on('click',{video:video},function(e){var video=e.data.video;if(video.paused){video.play();}else{video.pause();}});$(video).on('play playing',function(){playPauseButton.removeClass('fa-play').addClass('fa-pause');});$(video).on('pause ended waiting',function(){playPauseButton.removeClass('fa-pause').addClass('fa-play');});}}}else{videoTag.attr('src','')
wrap.append(videoTag);}
wrap.data('loaded',true);},_initYoutubeBgVideo:function(){var playerWrap=$(this),videoId=playerWrap.data('video-id'),videoPlayer=playerWrap.find('.fl-bg-video-player'),enableAudio=playerWrap.data('enable-audio'),audioButton=playerWrap.find('.fl-bg-video-audio'),playPauseButton=playerWrap.find('.fl-bg-video-play-pause-control'),startTime='undefined'!==typeof playerWrap.data('start')?playerWrap.data('start'):0,startTime='undefined'!==typeof playerWrap.data('t')&&startTime===0?playerWrap.data('t'):startTime,endTime='undefined'!==typeof playerWrap.data('end')?playerWrap.data('end'):0,loop='undefined'!==typeof playerWrap.data('loop')?playerWrap.data('loop'):1,stateCount=0,player,fallback_showing;if(videoId){fallback=playerWrap.data('fallback')||false
if(fallback){playerWrap.find('iframe').remove()
fallbackTag=$('<div></div>');fallbackTag.addClass('fl-bg-video-fallback');fallbackTag.css('background-image','url('+playerWrap.data('fallback')+')');fallbackTag.css('background-size','cover');fallbackTag.css('transition','background-image 1s')
playerWrap.append(fallbackTag);fallback_showing=true;}
FLBuilderLayout._onYoutubeApiReady(function(YT){setTimeout(function(){player=new YT.Player(videoPlayer[0],{videoId:videoId,events:{onReady:function(event){if("no"===enableAudio||FLBuilderLayout._isMobile()){event.target.mute();}
else if("yes"===enableAudio&&event.target.isMuted){event.target.unMute();}
playerWrap.data('YTPlayer',player);FLBuilderLayout._resizeYoutubeBgVideo.apply(playerWrap);event.target.playVideo();if(audioButton.length>0&&!FLBuilderLayout._isMobile()){audioButton.on('click',{button:audioButton,player:player},FLBuilderLayout._toggleBgVideoAudio);}
if(playPauseButton.length>0){playPauseButton.on('click',{player:player},function(e){var player=e.data.player;if(1===player.getPlayerState()){player.pauseVideo();}else{player.playVideo();}});}},onStateChange:function(event){if(event.data===1){if(fallback_showing){$('.fl-bg-video-fallback').css('background-image','url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)')}}
if(stateCount<4){stateCount++;}
if(stateCount>1&&-1===event.data&&"yes"===enableAudio){player.mute();player.playVideo();audioButton.show();}
if(event.data===YT.PlayerState.ENDED&&1===loop){if(startTime>0){player.seekTo(startTime);}else{player.playVideo();}}
if(event.data===YT.PlayerState.PLAYING){playPauseButton.removeClass('fa-play').addClass('fa-pause');}else if(event.data===YT.PlayerState.PAUSED){playPauseButton.removeClass('fa-pause').addClass('fa-play');}else if(event.data===YT.PlayerState.BUFFERING){playPauseButton.removeClass('fa-play').addClass('fa-pause');}else if(event.data===YT.PlayerState.CUED){playPauseButton.removeClass('fa-pause').addClass('fa-play');}else if(event.data===YT.PlayerState.ENDED){playPauseButton.removeClass('fa-pause').addClass('fa-play');}},onError:function(event){console.info('YT Error: '+event.data)
FLBuilderLayout._onErrorYoutubeVimeo(playerWrap)}},playerVars:{playsinline:FLBuilderLayout._isMobile()?1:0,controls:0,showinfo:0,rel:0,start:startTime,end:endTime,}});},1);});}},_onErrorYoutubeVimeo:function(playerWrap){fallback=playerWrap.data('fallback')||false
if(!fallback){return false;}
playerWrap.find('iframe').remove()
fallbackTag=$('<div></div>');fallbackTag.addClass('fl-bg-video-fallback');fallbackTag.css('background-image','url('+playerWrap.data('fallback')+')');playerWrap.append(fallbackTag);},_onYoutubeApiReady:function(callback){if(window.YT&&YT.loaded){callback(YT);}else{setTimeout(function(){FLBuilderLayout._onYoutubeApiReady(callback);},350);}},_initVimeoBgVideo:function(){var playerWrap=$(this),videoId=playerWrap.data('video-id'),videoHash=playerWrap.data('video-hash'),videoPlayer=playerWrap.find('.fl-bg-video-player'),enableAudio=playerWrap.data('enable-audio'),audioButton=playerWrap.find('.fl-bg-video-audio'),playPauseButton=playerWrap.find('.fl-bg-video-play-pause-control'),playerState='',player,width=playerWrap.outerWidth(),ua=navigator.userAgent;if(typeof Vimeo!=='undefined'&&videoId){const vimOptions={loop:true,title:false,portrait:false,background:true,autopause:false,muted:true,};if(videoHash.length){vimOptions.url=`https://player.vimeo.com/video/${ videoId }?h=${ videoHash }`;}else{vimOptions.id=videoId;}
player=new Vimeo.Player(videoPlayer[0],vimOptions);playerWrap.data('VMPlayer',player);if("no"===enableAudio){player.setVolume(0);}
else if("yes"===enableAudio){if(ua.indexOf("Safari")>-1||ua.indexOf("Chrome")>-1||ua.indexOf("Firefox")>-1){player.setVolume(0);audioButton.show();}else{player.setVolume(1);}}
player.play().catch(function(error){FLBuilderLayout._onErrorYoutubeVimeo(playerWrap)});if(audioButton.length>0){audioButton.on('click',{button:audioButton,player:player},FLBuilderLayout._toggleBgVideoAudio);}
player.on('play',function(){playerState='play';playPauseButton.removeClass('fa-play').addClass('fa-pause');});player.on('pause',function(){playerState='pause';playPauseButton.removeClass('fa-pause').addClass('fa-play');});player.on('ended',function(){playerState='ended';playPauseButton.removeClass('fa-pause').addClass('fa-play');});player.on('bufferstart',function(){playerState='bufferstart';playPauseButton.removeClass('fa-play').addClass('fa-pause');});if(playPauseButton.length>0){playPauseButton.on('click',{player:player},function(e){var player=e.data.player;if(playerState==='play'){player.pause();}else{player.play();}});}}},_toggleBgVideoAudio:function(e){var player=e.data.player,control=e.data.button.find('.fl-audio-control');if(control.hasClass('fa-volume-off')){control.removeClass('fa-volume-off').addClass('fa-volume-up');e.data.button.find('.fa-times').hide();if('function'===typeof player.unMute){player.unMute();}else{player.setVolume(1);}}else{control.removeClass('fa-volume-up').addClass('fa-volume-off');e.data.button.find('.fa-times').show();if('function'===typeof player.unMute){player.mute();}else{player.setVolume(0);}}},_videoBgSourceError:function(e){var source=$(e.target),wrap=source.closest('.fl-bg-video'),vid=wrap.find('video'),fallback=wrap.data('fallback'),fallbackTag='';source.remove();if(vid.find('source').length){return;}else if(''!==fallback){fallbackTag=$('<div></div>');fallbackTag.addClass('fl-bg-video-fallback');fallbackTag.css('background-image','url('+fallback+')');wrap.append(fallbackTag);vid.remove();}},_resizeBgVideos:function(){$('.fl-bg-video').each(function(){FLBuilderLayout._resizeBgVideo.apply(this);if($(this).parent().find('img').length>0){$(this).parent().imagesLoaded($.proxy(FLBuilderLayout._resizeBgVideo,this));}});},_resizeBgVideo:function(){if(0===$(this).find('video').length&&0===$(this).find('iframe').length){return;}
var wrap=$(this),wrapHeight=wrap.outerHeight(),wrapWidth=wrap.outerWidth(),vid=wrap.find('video'),vidHeight=wrap.data('height'),vidWidth=wrap.data('width'),newWidth=wrapWidth,newHeight=Math.round(vidHeight*wrapWidth/vidWidth),newLeft=0,newTop=0,iframe=wrap.find('iframe'),isRowFullHeight=$(this).closest('.fl-row-bg-video').hasClass('fl-row-full-height'),vidCSS={top:'50%',left:'50%',transform:'translate(-50%,-50%)',};if(vid.length){if(vidHeight===''||typeof vidHeight==='undefined'||vidWidth===''||typeof vidWidth==='undefined'){vid.css({'left':'0px','top':'0px','width':newWidth+'px'});vid.on('loadedmetadata',FLBuilderLayout._resizeOnLoadedMeta);return;}
if(!isRowFullHeight){if(newHeight<wrapHeight){newHeight=wrapHeight;newLeft=-((newWidth-wrapWidth)/ 2);newWidth=vidHeight?Math.round(vidWidth*wrapHeight/vidHeight):newWidth;}else{newTop=-((newHeight-wrapHeight)/2);}
vidCSS={left:newLeft+'px',top:newTop+'px',height:newHeight+'px',width:newWidth+'px',}}
vid.css(vidCSS);}
else if(iframe.length){if(typeof wrap.data('youtube')!=='undefined'){FLBuilderLayout._resizeYoutubeBgVideo.apply(this);}}},_resizeOnLoadedMeta:function(){var video=$(this),wrapHeight=video.parent().outerHeight(),wrapWidth=video.parent().outerWidth(),vidWidth=video[0].videoWidth,vidHeight=video[0].videoHeight,newHeight=Math.round(vidHeight*wrapWidth/vidWidth),newWidth=wrapWidth,newLeft=0,newTop=0;if(newHeight<wrapHeight){newHeight=wrapHeight;newWidth=Math.round(vidWidth*wrapHeight/vidHeight);newLeft=-((newWidth-wrapWidth)/2);}else{newTop=-((newHeight-wrapHeight)/2);}
video.parent().data('width',vidWidth);video.parent().data('height',vidHeight);video.css({'left':newLeft+'px','top':newTop+'px','width':newWidth+'px','height':newHeight+'px'});},_resizeYoutubeBgVideo:function(){var wrap=$(this),wrapWidth=wrap.outerWidth(),wrapHeight=wrap.outerHeight(),player=wrap.data('YTPlayer'),video=player?player.getIframe():null,aspectRatioSetting='16:9',aspectRatioArray=aspectRatioSetting.split(':'),aspectRatio=aspectRatioArray[0]/ aspectRatioArray[1],ratioWidth=wrapWidth / aspectRatio,ratioHeight=wrapHeight*aspectRatio,isWidthFixed=wrapWidth / wrapHeight>aspectRatio,width=isWidthFixed?wrapWidth:ratioHeight,height=isWidthFixed?ratioWidth:wrapHeight;if(video){$(video).width(width).height(height);}},_initHash:function(){var hash=window.location.hash.replace('#','').split('/').shift(),element=null,tabs=null,responsiveLabel=null,tabIndex=null,label=null;if(''!==hash){try{element=$('#'+hash);if(element.length>0){if(element.hasClass('fl-accordion-item')){setTimeout(function(){element.find('.fl-accordion-button').trigger('click');},100);}
if(element.hasClass('fl-tabs-panel')){setTimeout(function(){tabs=element.closest('.fl-tabs');responsiveLabel=element.find('.fl-tabs-panel-label');tabIndex=responsiveLabel.data('index');label=tabs.find('.fl-tabs-labels .fl-tabs-label[data-index='+tabIndex+']');label[0].click();FLBuilderLayout._scrollToElement(element);},100);}}}
catch(e){}}},_initAnchorLinks:function(){$('a, [role="link"]').each(FLBuilderLayout._initAnchorLink);},_initAnchorLink:function(){var link=$(this),href=link.data('url')?link.data('url'):link.attr('href'),target=link.data('url')?new URL(href,window.location.href):this,loc=window.location,id=null,element=null,flNode=false;if('undefined'!=typeof href&&href.indexOf('#')>-1&&link.closest('svg').length<1){if(loc.pathname.replace(/^\//,'')==target.pathname.replace(/^\//,'')&&loc.hostname==target.hostname){try{id=href.split('#').pop();if(!id){return;}
element=$('#'+id);if(element.length>0){flNode=element.hasClass('fl-row')||element.hasClass('fl-col')||element.hasClass('fl-module');if(!element.hasClass('fl-no-scroll')&&(link.hasClass('fl-scroll-link')||flNode)){$(link).on('click',FLBuilderLayout._scrollToElementOnLinkClick);}
if(element.hasClass('fl-accordion-item')){$(link).on('click',FLBuilderLayout._scrollToAccordionOnLinkClick);}
if(element.hasClass('fl-tabs-panel')){$(link).on('click',FLBuilderLayout._scrollToTabOnLinkClick);}}}
catch(e){}}}},_scrollToElementOnLinkClick:function(e,callback){var attribute=$(this).data('url')?$(this).data('url'):$(this).attr('href');var element=$('#'+attribute.split('#').pop());FLBuilderLayout._scrollToElement(element,callback);e.preventDefault();},_scrollToElement:function(element,callback){var config=FLBuilderLayoutConfig.anchorLinkAnimations,dest=0,win=$(window),doc=$(document);if(element.length>0){if('fixed'===element.css('position')||'fixed'===element.parent().css('position')){dest=element.position().top;}
else if(element.offset().top>doc.height()-win.height()){dest=doc.height()-win.height();}else{dest=element.offset().top-config.offset;}
$('html, body').stop(true).animate({scrollTop:dest},config.duration,config.easing,function(){if('undefined'!=typeof callback){callback();}
if(undefined!=element.attr('id')&&window.location.hash!=='#'+element.attr('id')){var firefox_version=window.navigator.userAgent.match(/Firefox\/(\d+)\./),firefox_version=firefox_version?parseInt(firefox_version[1],10):null;if(firefox_version!==null&&firefox_version<135){window.location.hash=element.attr('id');}else{if(history.pushState){history.pushState(null,null,'#'+element.attr('id'));}else{window.location.hash=element.attr('id');}}}});}},_scrollToAccordionOnLinkClick:function(e){var element=$('#'+$(this).attr('href').split('#').pop());if(element.length>0){var callback=function(){if(element){element.find('.fl-accordion-button').trigger('click');element=false;}};FLBuilderLayout._scrollToElementOnLinkClick.call(this,e,callback);}},_scrollToTabOnLinkClick:function(e){var element=$('#'+$(this).attr('href').split('#').pop()),tabs=null,label=null,responsiveLabel=null;if(element.length>0){tabs=element.closest('.fl-tabs');responsiveLabel=element.find('.fl-tabs-panel-label');tabIndex=responsiveLabel.data('index');label=tabs.find('.fl-tabs-labels .fl-tabs-label[data-index='+tabIndex+']');if(responsiveLabel.is(':visible')){var callback=function(){if(element){responsiveLabel.trigger($.Event('click',{which:1}));}};FLBuilderLayout._scrollToElementOnLinkClick.call(this,e,callback);}else{label[0].click();FLBuilderLayout._scrollToElement(element);}
e.preventDefault();}},_initForms:function(){if(!FLBuilderLayout._hasPlaceholderSupport){$('.fl-form-field input').each(FLBuilderLayout._initFormFieldPlaceholderFallback);}
$('.fl-form-field input').on('focus',FLBuilderLayout._clearFormFieldError);},_hasPlaceholderSupport:function(){var input=document.createElement('input');return'undefined'!=input.placeholder;},_initFormFieldPlaceholderFallback:function(){var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if('undefined'!=placeholder&&''===val){field.val(placeholder);field.on('focus',FLBuilderLayout._hideFormFieldPlaceholderFallback);field.on('blur',FLBuilderLayout._showFormFieldPlaceholderFallback);}},_hideFormFieldPlaceholderFallback:function(){var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if(val==placeholder){field.val('');}},_showFormFieldPlaceholderFallback:function(){var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if(''===val){field.val(placeholder);}},_clearFormFieldError:function(){var field=$(this);field.removeAttr('aria-invalid');field.removeClass('fl-form-error');const message=field.attr('aria-describedby');message?$('#'+message).hide():field.siblings('.fl-form-error-message').hide();},_initRowShapeLayerHeight:function(){FLBuilderLayout._adjustRowShapeLayerHeight();$(window).on('resize',FLBuilderLayout._adjustRowShapeLayerHeight);},_initNestedColsWidth:function(){var nestedCols=$('.fl-col-has-cols');if(nestedCols.length<=0){return;}
$(nestedCols).each(function(index,col){if($(col).width()<=0){$(col).css('width',FLBuilderLayoutConfig.emptyColWidth);}});},_adjustRowShapeLayerHeight:function(){var rowShapeLayers=$('.fl-builder-shape-layer');$(rowShapeLayers).each(function(index){var rowShapeLayer=$(this),shape=$(rowShapeLayer).find('svg'),height=shape.height(),excludeShapes='.fl-builder-shape-circle, .fl-builder-shape-dot-cluster, .fl-builder-shape-topography, .fl-builder-shape-rect';if(!rowShapeLayer.is(excludeShapes)){$(shape).css('height',Math.ceil(height));}});},_string_to_slug:function(str){str=str.replace(/^\s+|\s+$/g,'');if('undefined'==typeof window._fl_string_to_slug_regex){regex=new RegExp('[^a-zA-Z0-9\'":() !.,-_|]','g');}else{regex=new RegExp('[^'+window._fl_string_to_slug_regex+'\'":\(\) !.,-_|\\\p{Letter}]','ug');}
str=str.replace(regex,'').replace(/\s+/g,' ');return str;},_reorderMenu:function(){if($('#wp-admin-bar-fl-builder-frontend-edit-link-default li').length>1){$('#wp-admin-bar-fl-builder-frontend-duplicate-link').appendTo('#wp-admin-bar-fl-builder-frontend-edit-link-default').css('padding-top','5px').css('border-top','2px solid #1D2125').css('margin-top','5px')}}};$(function(){FLBuilderLayout.init();});})(jQuery);(function($){if(typeof FLBuilderLayoutModules!=='undefined'){return;}
FLBuilderLayoutModules={init:function(){if(0===$('.fl-builder-edit').length){FLBuilderLayoutModules._initModuleAnimations();}},_initModuleAnimations:function(){if(typeof jQuery.fn.waypoint!=='undefined'){$('.fl-animation').each(function(){var node=$(this),nodeTop=node.offset().top,winHeight=$(window).height(),bodyHeight=$('body').height(),waypoint=FLBuilderLayoutConfig.waypoint,offset='80%';if(typeof waypoint.offset!==undefined){offset=FLBuilderLayoutConfig.waypoint.offset+'%';}
if(bodyHeight-nodeTop<winHeight*0.2){offset='100%';}
node.waypoint({offset:offset,handler:FLBuilderLayoutModules._doModuleAnimation});});}},_doModuleAnimation:function(){var module='undefined'==typeof this.element?$(this):$(this.element),delay=parseFloat(module.data('animation-delay')),duration=parseFloat(module.data('animation-duration'));if(!isNaN(duration)){module.css('animation-duration',duration+'s');}
if(!isNaN(delay)&&delay>0){setTimeout(function(){module.addClass('fl-animated');},delay*1000);}else{setTimeout(function(){module.addClass('fl-animated');},1);}}};$(function(){FLBuilderLayoutModules.init();});})(jQuery);jQuery(function($){$(function(){$('.fl-node-jqn0wl2ftv1y .fl-photo-img').on('mouseenter',function(e){$(this).data('title',$(this).attr('title')).removeAttr('title');}).on('mouseleave',function(e){$(this).attr('title',$(this).data('title')).data('title',null);});});window._fl_string_to_slug_regex='a-zA-Z0-9';});jQuery(function($){$(function(){$('.fl-node-al9zmynuw3gr .fl-photo-img').on('mouseenter',function(e){$(this).data('title',$(this).attr('title')).removeAttr('title');}).on('mouseleave',function(e){$(this).attr('title',$(this).data('title')).data('title',null);});});window._fl_string_to_slug_regex='a-zA-Z0-9';});;(function($){PPAccordion=function(settings){this.id=settings.id;this.settings=settings;this.nodeClass='.fl-node-'+settings.id;this.accordion=$(this.nodeClass+' > .fl-module-content > .pp-accordion');this.clicked=false;this.nestedToggle=false;this.defaultOpened=false;this.offsetTop=settings.scrollOffsetTop;this.isBuilderActive=settings.isBuilderActive;this._init();};PPAccordion.prototype={settings:{},nodeClass:'',clicked:false,offsetTop:120,_init:function(){if(this.accordion.hasClass('pp-accordion-initialized')){return;}
var button=this.accordion.find('> .pp-accordion-item > .pp-accordion-button');button.off('click').on('click',this._buttonClick.bind(this));button.on('keypress',this._buttonClick.bind(this));button.on('mouseup',this._mouseEvent.bind(this));button.on('focus',this._focusIn.bind(this));button.on('focusout',this._focusOut.bind(this));this._responsiveCollapse();this._hashChange();$(window).on('hashchange',this._hashChange.bind(this));this.accordion.addClass('pp-accordion-initialized');},_hashChange:function(){var scrollPos=$(window).scrollTop();$(window).on('scroll',function(){scrollPos=$(window).scrollTop();});var hash=location.hash.split('/')[0].replace('!','');if(hash&&$(hash).length>0){var self=this;var element=$(hash+'.pp-accordion-item');if(element&&element.length>0){$('html, body').animate({scrollTop:element.offset().top-self.offsetTop},0,function(){location.href='#';window.scrollTo(0,scrollPos);setTimeout(function(){if(!element.hasClass('pp-accordion-item-active')){element.find('> .pp-accordion-button').trigger('click');}},100);var parentModules=element.parents('.fl-module');var elementNodeId=element.closest('.fl-module').data('node');parentModules.each(function(){if($(this).data('node')!==elementNodeId){var parentNodeId=$(this).data('node');if('undefined'!==typeof window['pp_accordion_'+parentNodeId]){var parentItem=$(this).find('.fl-node-'+elementNodeId).parents('.pp-accordion-item');if(!parentItem.hasClass('pp-accordion-item-active')){parentItem.find('> .pp-accordion-button').trigger('click');self.nestedToggle=true;setTimeout(function(){window.scrollTo(0,element.offset().top-self.offsetTop);},800);}}}});});}}},_mouseEvent:function(){this.clicked=true;},_buttonClick:function(e){e.preventDefault();e.stopPropagation();var button=$(e.target).closest('.pp-accordion-button'),accordion=button.closest('.pp-accordion'),item=button.closest('.pp-accordion-item'),allContent=accordion.find('> .pp-accordion-item > .pp-accordion-content'),content=button.siblings('.pp-accordion-content'),self=this;if(!this._validClick(e)){return;}
e.preventDefault();if(accordion.hasClass('pp-accordion-collapse')){accordion.find('> .pp-accordion-item-active .pp-accordion-button').attr('aria-expanded','false');accordion.find('> .pp-accordion-item-active .pp-accordion-content').attr('aria-hidden','true');accordion.find('> .pp-accordion-item-active').removeClass('pp-accordion-item-active');button.attr('aria-expanded','false');allContent.slideUp('normal');}
if(content.is(':hidden')){button.attr('aria-expanded','true');item.addClass('pp-accordion-item-active');if(this.defaultOpened){var speed=0;}else{var speed='normal';}
content.slideDown(speed,function(){self._slideDownComplete(this);$(this).attr('aria-hidden',false);});}else{button.attr('aria-expanded','false');item.removeClass('pp-accordion-item-active');content.slideUp('normal',function(){self._slideUpComplete(this);$(this).attr('aria-hidden',true);});}},_focusIn:function(e){var button=$(e.target).closest('.pp-accordion-button');button.attr('aria-selected','true');},_focusOut:function(e){var button=$(e.target).closest('.pp-accordion-button');button.attr('aria-selected','false');},_slideUpComplete:function(target){var content=$(target),accordion=content.closest('.pp-accordion');accordion.trigger('fl-builder.pp-accordion-toggle-complete');},_slideDownComplete:function(target){var content=$(target),accordion=content.closest('.pp-accordion'),item=content.parent(),win=$(window);FLBuilderLayout.refreshGalleries(content);FLBuilderLayout.refreshGridLayout(content);FLBuilderLayout.reloadSlider(content);FLBuilderLayout.resizeAudio(content);if(!this.defaultOpened){FLBuilderLayout.resizeSlideshow();}else{this.defaultOpened=false;}
if('undefined'!==typeof $.fn.isotope){var highestBox=0;var contentHeight=0;content.find('.pp-equal-height .pp-content-post').css('height','').each(function(){if($(this).height()>highestBox){highestBox=$(this).height();contentHeight=$(this).find('.pp-content-post-data').outerHeight();}});content.find('.pp-equal-height .pp-content-post').height(highestBox);content.find('.pp-content-post-grid').isotope('layout');}
if(!this.nestedToggle){if(item.offset().top<win.scrollTop()+100){if(!this.isBuilderActive&&(!this.clicked||this.settings.scrollAnimation)){$('html, body').animate({scrollTop:item.offset().top-this.offsetTop},500,'swing');}}}
this.clicked=false;this.nestedToggle=false;accordion.trigger('fl-builder.pp-accordion-toggle-complete');$(document).trigger('pp-accordion-toggle-complete',[accordion,item]);},_responsiveCollapse:function(){if(this.settings.responsiveCollapse&&window.innerWidth<=768){this.accordion.find('> .pp-accordion-item').removeClass('pp-accordion-item-active').find('> .pp-accordion-content').hide();return;}},_validClick:function(e){return(e.which==1||e.which==13||e.which==32||e.which==undefined)?true:false;}};})(jQuery);(function($){$(function(){window['pp_accordion_ha8ntxukyeij']=new PPAccordion({id:'ha8ntxukyeij',defaultItem:false,responsiveCollapse:false,scrollAnimation:true,scrollOffsetTop:120,isBuilderActive:false});});})(jQuery);
(function($){
'use strict';
})(jQuery);
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
(e=>{"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)})(function(c){function e(){}function d(e,t){f.ev.on(x+e+I,t)}function u(e,t,n,o){var i=document.createElement("div");return i.className="mfp-"+e,n&&(i.innerHTML=n),o?t&&t.appendChild(i):(i=c(i),t&&i.appendTo(t)),i}function p(e,t){f.ev.triggerHandler(x+e,t),f.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),f.st.callbacks[e])&&f.st.callbacks[e].apply(f,Array.isArray(t)?t:[t])}function m(e){return e===A&&f.currTemplate.closeBtn||(f.currTemplate.closeBtn=c(f.st.closeMarkup.replace(/%title%/g,f.st.tClose)),A=e),f.currTemplate.closeBtn}function r(){c.magnificPopup.instance||((f=new e).init(),c.magnificPopup.instance=f)}function a(){y&&(v.after(y.addClass(l)).detach(),y=null)}function i(){n&&c(document.body).removeClass(n)}function t(){i(),f.req&&f.req.abort()}var f,o,g,s,h,A,l,v,y,n,w="Close",F="BeforeClose",C="MarkupParse",b="Open",j="Change",x="mfp",I="."+x,k="mfp-ready",N="mfp-removing",T="mfp-prevent-close",P=!!window.jQuery,_=c(window),S=(c.magnificPopup={instance:null,proto:e.prototype={constructor:e,init:function(){var e=navigator.appVersion;f.isLowIE=f.isIE8=document.all&&!document.addEventListener,f.isAndroid=/android/gi.test(e),f.isIOS=/iphone|ipad|ipod/gi.test(e),f.supportsTransition=(()=>{var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1})(),f.probablyMobile=f.isAndroid||f.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),g=c(document),f.popupsCache={}},open:function(e){if(!1===e.isObj){f.items=e.items.toArray(),f.index=0;for(var t,n=e.items,o=0;o<n.length;o++)if((t=(t=n[o]).parsed?t.el[0]:t)===e.el[0]){f.index=o;break}}else f.items=Array.isArray(e.items)?e.items:[e.items],f.index=e.index||0;if(!f.isOpen){f.types=[],h="",e.mainEl&&e.mainEl.length?f.ev=e.mainEl.eq(0):f.ev=g,e.key?(f.popupsCache[e.key]||(f.popupsCache[e.key]={}),f.currTemplate=f.popupsCache[e.key]):f.currTemplate={},f.st=c.extend(!0,{},c.magnificPopup.defaults,e),f.fixedContentPos="auto"===f.st.fixedContentPos?!f.probablyMobile:f.st.fixedContentPos,f.st.modal&&(f.st.closeOnContentClick=!1,f.st.closeOnBgClick=!1,f.st.showCloseBtn=!1,f.st.enableEscapeKey=!1),f.bgOverlay||(f.bgOverlay=u("bg").on("click"+I,function(){f.close()}),f.wrap=u("wrap").attr("tabindex",-1).attr("role","dialog").attr("aria-modal",!0).attr("aria-label","Popup Image").on("click"+I,function(e){f._checkIfClose(e.target)&&f.close()}),f.container=u("container",f.wrap)),f.contentContainer=u("content"),f.st.preloader&&(f.preloader=u("preloader",f.container,f.st.tLoading));var i=c.magnificPopup.modules;for(o=0;o<i.length;o++){var r=(r=i[o]).charAt(0).toUpperCase()+r.slice(1);f["init"+r].call(f)}p("BeforeOpen"),f.st.showCloseBtn&&(f.st.closeBtnInside?(d(C,function(e,t,n,o){n.close_replaceWith=m(o.type)}),h+=" mfp-close-btn-in"):f.wrap.append(m())),f.st.alignTop&&(h+=" mfp-align-top"),f.fixedContentPos?f.wrap.css({overflow:f.st.overflowY,overflowX:"hidden",overflowY:f.st.overflowY}):f.wrap.css({top:_.scrollTop(),position:"absolute"}),!1!==f.st.fixedBgPos&&("auto"!==f.st.fixedBgPos||f.fixedContentPos)||f.bgOverlay.css({height:g.height(),position:"absolute"}),f.st.enableEscapeKey&&g.on("keyup"+I,function(e){27===e.keyCode&&f.close()}),_.on("resize"+I,function(){f.updateSize()}),f.st.closeOnContentClick||(h+=" mfp-auto-cursor"),h&&f.wrap.addClass(h);var a=f.wH=_.height(),s={},l=(f.fixedContentPos&&f._hasScrollBar(a)&&(l=f._getScrollbarSize())&&(s.marginRight=l),f.fixedContentPos&&(f.isIE7?c("body, html").css("overflow","hidden"):s.overflow="hidden"),f.st.mainClass);return f.isIE7&&(l+=" mfp-ie7"),l&&f._addClassToMFP(l),f.updateItemHTML(),p("BuildControls"),c("html").css(s),f.bgOverlay.add(f.wrap).prependTo(f.st.prependTo||c(document.body)),f._lastFocusedEl=document.activeElement,setTimeout(function(){f.content?(f._addClassToMFP(k),f._setFocus()):f.bgOverlay.addClass(k),g.on("focusin"+I,f._onFocusIn)},16),f.isOpen=!0,f.updateSize(a),p(b),e}f.updateItemHTML()},close:function(){f.isOpen&&(p(F),f.isOpen=!1,f.st.removalDelay&&!f.isLowIE&&f.supportsTransition?(f._addClassToMFP(N),setTimeout(function(){f._close()},f.st.removalDelay)):f._close())},_close:function(){p(w);var e=N+" "+k+" ";f.bgOverlay.detach(),f.wrap.detach(),f.container.empty(),f.st.mainClass&&(e+=f.st.mainClass+" "),f._removeClassFromMFP(e),f.fixedContentPos&&(e={marginRight:""},f.isIE7?c("body, html").css("overflow",""):e.overflow="",c("html").css(e)),g.off("keyup.mfp focusin"+I),f.ev.off(I),f.wrap.attr("class","mfp-wrap").removeAttr("style"),f.bgOverlay.attr("class","mfp-bg"),f.container.attr("class","mfp-container"),!f.st.showCloseBtn||f.st.closeBtnInside&&!0!==f.currTemplate[f.currItem.type]||f.currTemplate.closeBtn&&f.currTemplate.closeBtn.detach(),f.st.autoFocusLast&&f._lastFocusedEl&&c(f._lastFocusedEl).trigger("focus"),f.currItem=null,f.content=null,f.currTemplate=null,f.prevHeight=0,p("AfterClose")},updateSize:function(e){var t;f.isIOS?(t=document.documentElement.clientWidth/window.innerWidth,f.wrap.css("height",t=window.innerHeight*t),f.wH=t):f.wH=e||_.height(),f.fixedContentPos||f.wrap.css("height",f.wH),p("Resize")},updateItemHTML:function(){var e=f.items[f.index],t=(f.contentContainer.detach(),f.content&&f.content.detach(),(e=e.parsed?e:f.parseEl(f.index)).type),n=(p("BeforeChange",[f.currItem?f.currItem.type:"",t]),f.currItem=e,f.currTemplate[t]||(n=!!f.st[t]&&f.st[t].markup,p("FirstMarkupParse",n),f.currTemplate[t]=!n||c(n)),s&&s!==e.type&&f.container.removeClass("mfp-"+s+"-holder"),f["get"+t.charAt(0).toUpperCase()+t.slice(1)](e,f.currTemplate[t]));f.appendContent(n,t),e.preloaded=!0,p(j,e),s=e.type,f.container.prepend(f.contentContainer),p("AfterChange")},appendContent:function(e,t){(f.content=e)?f.st.showCloseBtn&&f.st.closeBtnInside&&!0===f.currTemplate[t]?f.content.find(".mfp-close").length||f.content.append(m()):f.content=e:f.content="",p("BeforeAppend"),f.container.addClass("mfp-"+t+"-holder"),f.contentContainer.append(f.content)},parseEl:function(e){var t,n=f.items[e];if((n=n.tagName?{el:c(n)}:(t=n.type,{data:n,src:n.src})).el){for(var o=f.types,i=0;i<o.length;i++)if(n.el.hasClass("mfp-"+o[i])){t=o[i];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=t||f.st.type||"inline",n.index=e,n.parsed=!0,f.items[e]=n,p("ElementParse",n),f.items[e]},addGroup:function(t,n){function e(e){e.mfpEl=this,f._openClick(e,t,n)}var o="click.magnificPopup";(n=n||{}).mainEl=t,n.items?(n.isObj=!0,t.off(o).on(o,e)):(n.isObj=!1,n.delegate?t.off(o).on(o,n.delegate,e):(n.items=t).off(o).on(o,e))},_openClick:function(e,t,n){var o=(void 0!==n.midClick?n:c.magnificPopup.defaults).midClick;if(o||!(2===e.which||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){o=(void 0!==n.disableOn?n:c.magnificPopup.defaults).disableOn;if(o)if("function"==typeof o){if(!o.call(f))return!0}else if(_.width()<o)return!0;e.type&&(e.preventDefault(),f.isOpen)&&e.stopPropagation(),n.el=c(e.mfpEl),n.delegate&&(n.items=t.find(n.delegate)),f.open(n)}},updateStatus:function(e,t){var n;f.preloader&&(o!==e&&f.container.removeClass("mfp-s-"+o),n={status:e,text:t=t||"loading"!==e?t:f.st.tLoading},p("UpdateStatus",n),e=n.status,t=n.text,f.st.allowHTMLInStatusIndicator?f.preloader.html(t):f.preloader.text(t),f.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),f.container.addClass("mfp-s-"+e),o=e)},_checkIfClose:function(e){if(!c(e).closest("."+T).length){var t=f.st.closeOnContentClick,n=f.st.closeOnBgClick;if(t&&n)return!0;if(!f.content||c(e).closest(".mfp-close").length||f.preloader&&e===f.preloader[0])return!0;if(e===f.content[0]||c.contains(f.content[0],e)){if(t)return!0}else if(n&&c.contains(document,e))return!0;return!1}},_addClassToMFP:function(e){f.bgOverlay.addClass(e),f.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),f.wrap.removeClass(e)},_hasScrollBar:function(e){return(f.isIE7?g.height():document.body.scrollHeight)>(e||_.height())},_setFocus:function(){(f.st.focus?f.content.find(f.st.focus).eq(0):f.wrap).trigger("focus")},_onFocusIn:function(e){if(e.target!==f.wrap[0]&&!c.contains(f.wrap[0],e.target))return f._setFocus(),!1},_parseMarkup:function(i,e,t){var r;t.data&&(e=c.extend(t.data,e)),p(C,[i,e,t]),c.each(e,function(e,t){if(void 0===t||!1===t)return!0;var n,o;1<(r=e.split("_")).length?0<(n=i.find(I+"-"+r[0])).length&&("replaceWith"===(o=r[1])?n[0]!==t[0]&&n.replaceWith(t):"img"===o?n.is("img")?n.attr("src",t):n.replaceWith(c("<img>").attr("src",t).attr("class",n.attr("class"))):n.attr(r[1],t)):f.st.allowHTMLInTemplate?i.find(I+"-"+e).html(t):i.find(I+"-"+e).text(t)})},_getScrollbarSize:function(){var e;return void 0===f.scrollbarSize&&((e=document.createElement("div")).style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),f.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),f.scrollbarSize}},modules:[],open:function(e,t){return r(),(e=e?c.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return c.magnificPopup.instance&&c.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(c.magnificPopup.defaults[e]=t.options),c.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close" aria-label="%title%"><span aria-hidden="true">&times;</span></button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0,allowHTMLInStatusIndicator:!1,allowHTMLInTemplate:!1}},c.fn.magnificPopup=function(e){r();var t,n,o,i=c(this);return"string"==typeof e?"open"===e?(t=P?i.data("magnificPopup"):i[0].magnificPopup,n=parseInt(arguments[1],10)||0,o=t.items?t.items[n]:(o=i,(o=t.delegate?o.find(t.delegate):o).eq(n)),f._openClick({mfpEl:o},i,t)):f.isOpen&&f[e].apply(f,Array.prototype.slice.call(arguments,1)):(e=c.extend(!0,{},e),P?i.data("magnificPopup",e):i[0].magnificPopup=e,f.addGroup(i,e)),i},"inline"),E=(c.magnificPopup.registerModule(S,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){f.types.push(S),d(w+"."+S,function(){a()})},getInline:function(e,t){var n,o,i;return a(),e.src?(n=f.st.inline,(o=c(e.src)).length?((i=o[0].parentNode)&&i.tagName&&(v||(l=n.hiddenClass,v=u(l),l="mfp-"+l),y=o.after(v).detach().removeClass(l)),f.updateStatus("ready")):(f.updateStatus("error",n.tNotFound),o=c("<div>")),e.inlineElement=o):(f.updateStatus("ready"),f._parseMarkup(t,{},e),t)}}}),"ajax");c.magnificPopup.registerModule(E,{options:{settings:null,cursor:"mfp-ajax-cur",tError:"The content could not be loaded."},proto:{initAjax:function(){f.types.push(E),n=f.st.ajax.cursor,d(w+"."+E,t),d("BeforeChange."+E,t)},getAjax:function(o){n&&c(document.body).addClass(n),f.updateStatus("loading");var e=c.extend({url:o.src,success:function(e,t,n){e={data:e,xhr:n};p("ParseAjax",e),f.appendContent(c(e.data),E),o.finished=!0,i(),f._setFocus(),setTimeout(function(){f.wrap.addClass(k)},16),f.updateStatus("ready"),p("AjaxContentAdded")},error:function(){i(),o.finished=o.loadError=!0,f.updateStatus("error",f.st.ajax.tError.replace("%url%",o.src))}},f.st.ajax.settings);return f.req=c.ajax(e),""}}});var z;c.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:"The image could not be loaded."},proto:{initImage:function(){var e=f.st.image,t=".image";f.types.push("image"),d(b+t,function(){"image"===f.currItem.type&&e.cursor&&c(document.body).addClass(e.cursor)}),d(w+t,function(){e.cursor&&c(document.body).removeClass(e.cursor),_.off("resize"+I)}),d("Resize"+t,f.resizeImage),f.isLowIE&&d("AfterChange",f.resizeImage)},resizeImage:function(){var e,t=f.currItem;t&&t.img&&f.st.image.verticalFit&&(e=0,f.isLowIE&&(e=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",f.wH-e))},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,z&&clearInterval(z),e.isCheckingImgSize=!1,p("ImageHasSize",e),e.imgHidden)&&(f.content&&f.content.removeClass("mfp-loading"),e.imgHidden=!1)},findImageSize:function(t){function n(e){z&&clearInterval(z),z=setInterval(function(){0<i.naturalWidth?f._onImageHasSize(t):(200<o&&clearInterval(z),3===++o?n(10):40===o?n(50):100===o&&n(500))},e)}var o=0,i=t.img[0];n(1)},getImage:function(e,t){function n(){e&&(e.img.off(".mfploader"),e===f.currItem&&(f._onImageHasSize(e),f.updateStatus("error",a.tError.replace("%url%",e.src))),e.hasSize=!0,e.loaded=!0,e.loadError=!0)}function o(){e&&(e.img[0].complete?(e.img.off(".mfploader"),e===f.currItem&&(f._onImageHasSize(e),f.updateStatus("ready")),e.hasSize=!0,e.loaded=!0,p("ImageLoadComplete")):++r<200?setTimeout(o,100):n())}var i,r=0,a=f.st.image,s=t.find(".mfp-img");return s.length&&((i=document.createElement("img")).className="mfp-img",e.el&&e.el.find("img").length&&(i.alt=e.el.find("img").attr("alt")),e.img=c(i).on("load.mfploader",o).on("error.mfploader",n),i.src=e.src,s.is("img")&&(e.img=e.img.clone()),0<(i=e.img[0]).naturalWidth?e.hasSize=!0:i.width||(e.hasSize=!1)),f._parseMarkup(t,{title:(e=>{if(e.data&&void 0!==e.data.title)return e.data.title;var t=f.st.image.titleSrc;if(t){if("function"==typeof t)return t.call(f,e);if(e.el)return e.el.attr(t)||""}return""})(e),img_replaceWith:e.img},e),f.resizeImage(),e.hasSize?(z&&clearInterval(z),e.loadError?(t.addClass("mfp-loading"),f.updateStatus("error",a.tError.replace("%url%",e.src))):(t.removeClass("mfp-loading"),f.updateStatus("ready"))):(f.updateStatus("loading"),e.loading=!0,e.hasSize||(e.imgHidden=!0,t.addClass("mfp-loading"),f.findImageSize(e))),t}}});function O(e){var t;f.currTemplate[L]&&(t=f.currTemplate[L].find("iframe")).length&&(e||(t[0].src="//about:blank"),f.isIE8)&&t.css("display",e?"block":"none")}function M(e){var t=f.items.length;return t-1<e?e-t:e<0?t+e:e}function D(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)}c.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,t,n,o,i,r,a=f.st.zoom,s=".zoom";a.enabled&&f.supportsTransition&&(t=a.duration,n=function(e){var e=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),t="all "+a.duration/1e3+"s "+a.easing,n={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return n["-webkit-"+o]=n["-moz-"+o]=n["-o-"+o]=n[o]=t,e.css(n),e},o=function(){f.content.css("visibility","visible")},d("BuildControls"+s,function(){f._allowZoom()&&(clearTimeout(i),f.content.css("visibility","hidden"),(e=f._getItemToZoom())?((r=n(e)).css(f._getOffset()),f.wrap.append(r),i=setTimeout(function(){r.css(f._getOffset(!0)),i=setTimeout(function(){o(),setTimeout(function(){r.remove(),e=r=null,p("ZoomAnimationEnded")},16)},t)},16)):o())}),d(F+s,function(){if(f._allowZoom()){if(clearTimeout(i),f.st.removalDelay=t,!e){if(!(e=f._getItemToZoom()))return;r=n(e)}r.css(f._getOffset(!0)),f.wrap.append(r),f.content.css("visibility","hidden"),setTimeout(function(){r.css(f._getOffset())},16)}}),d(w+s,function(){f._allowZoom()&&(o(),r&&r.remove(),e=null)}))},_allowZoom:function(){return"image"===f.currItem.type},_getItemToZoom:function(){return!!f.currItem.hasSize&&f.currItem.img},_getOffset:function(e){var e=e?f.currItem.img:f.st.zoom.opener(f.currItem.el||f.currItem),t=e.offset(),n=parseInt(e.css("padding-top"),10),o=parseInt(e.css("padding-bottom"),10),e=(t.top-=c(window).scrollTop()-n,{width:e.width(),height:(P?e.innerHeight():e[0].offsetHeight)-o-n});return(B=void 0===B?void 0!==document.createElement("p").style.MozTransform:B)?e["-moz-transform"]=e.transform="translate("+t.left+"px,"+t.top+"px)":(e.left=t.left,e.top=t.top),e}}});var B,L="iframe",H=(c.magnificPopup.registerModule(L,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},youtu_be:{index:"youtu.be",id:"/",src:"//www.youtube.com/embed/%id%?autoplay=1"},youtube_nocookie:{index:"youtube-nocookie.com",id:"/",src:"//www.youtube-nocookie.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){f.types.push(L),d("BeforeChange",function(e,t,n){t!==n&&(t===L?O():n===L&&O(!0))}),d(w+"."+L,function(){O()})},getIframe:function(e,t){var n=e.src,o=f.st.iframe,i=(c.each(o.patterns,function(){if(-1<n.indexOf(this.index))return this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1}),{});return o.srcAction&&(i[o.srcAction]=n),f._parseMarkup(t,i,e),f.updateStatus("ready"),t}}}),c.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%",langDir:null,loop:!0},proto:{initGallery:function(){var r=f.st.gallery,e=".mfp-gallery";if(f.direction=!0,!r||!r.enabled)return!1;r.langDir||(r.langDir=document.dir||"ltr"),h+=" mfp-gallery",d(b+e,function(){r.navigateByImgClick&&f.wrap.on("click"+e,".mfp-img",function(){if(1<f.items.length)return f.next(),!1}),g.on("keydown"+e,function(e){37===e.keyCode?"rtl"===r.langDir?f.next():f.prev():39===e.keyCode&&("rtl"===r.langDir?f.prev():f.next())}),f.updateGalleryButtons()}),d("UpdateStatus"+e,function(){f.updateGalleryButtons()}),d("UpdateStatus"+e,function(e,t){t.text&&(t.text=D(t.text,f.currItem.index,f.items.length))}),d(C+e,function(e,t,n,o){var i=f.items.length;n.counter=1<i?D(r.tCounter,o.index,i):""}),d("BuildControls"+e,function(){var e,t,n,o,i;1<f.items.length&&r.arrows&&!f.arrowLeft&&(t="rtl"===r.langDir?(i=r.tNext,e=r.tPrev,o="next","prev"):(i=r.tPrev,e=r.tNext,o="prev","next"),n=r.arrowMarkup,o=f.arrowLeft=c(n.replace(/%title%/gi,i).replace(/%action%/gi,o).replace(/%dir%/gi,"left")).attr("aria-label",i).addClass(T),i=f.arrowRight=c(n.replace(/%title%/gi,e).replace(/%action%/gi,t).replace(/%dir%/gi,"right")).attr("aria-label",e).addClass(T),"rtl"===r.langDir?(f.arrowNext=o,f.arrowPrev=i):(f.arrowNext=i,f.arrowPrev=o),o.on("click",function(){"rtl"===r.langDir?f.next():f.prev()}),i.on("click",function(){"rtl"===r.langDir?f.prev():f.next()}),f.container.append(o.add(i)),f.container.attr("role","region").attr("aria-label","carousel"))}),d(j+e,function(){f._preloadTimeout&&clearTimeout(f._preloadTimeout),f._preloadTimeout=setTimeout(function(){f.preloadNearbyImages(),f._preloadTimeout=null},16)}),d(w+e,function(){g.off(e),f.wrap.off("click"+e),f.arrowRight=f.arrowLeft=null})},next:function(){var e=M(f.index+1);if(!f.st.gallery.loop&&0===e)return!1;f.direction=!0,f.index=e,f.updateItemHTML()},prev:function(){var e=f.index-1;if(!f.st.gallery.loop&&e<0)return!1;f.direction=!1,f.index=M(e),f.updateItemHTML()},goTo:function(e){f.direction=e>=f.index,f.index=e,f.updateItemHTML()},preloadNearbyImages:function(){for(var e=f.st.gallery.preload,t=Math.min(e[0],f.items.length),n=Math.min(e[1],f.items.length),o=1;o<=(f.direction?n:t);o++)f._preloadItem(f.index+o);for(o=1;o<=(f.direction?t:n);o++)f._preloadItem(f.index-o)},_preloadItem:function(e){var t;e=M(e),f.items[e].preloaded||((t=f.items[e]).parsed||(t=f.parseEl(e)),p("LazyLoad",t),"image"===t.type&&(t.img=c('<img class="mfp-img" />').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,p("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0)},updateGalleryButtons:function(){f.st.gallery.loop||"object"!=typeof f.arrowPrev||null===f.arrowPrev||(0===f.index?f.arrowPrev.hide():f.arrowPrev.show(),f.index===f.items.length-1?f.arrowNext.hide():f.arrowNext.show())}}}),"retina");c.magnificPopup.registerModule(H,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){var n,o;1<window.devicePixelRatio&&(n=f.st.retina,o=n.ratio,1<(o=isNaN(o)?o():o))&&(d("ImageHasSize."+H,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/o,width:"100%"})}),d("ElementParse."+H,function(e,t){t.src=n.replaceSrc(t,o)}))}}}),r()});
!function(name,definition){if(typeof module!='undefined'&&module.exports)module.exports=definition()
else if(typeof define=='function'&&define.amd)define(name,definition)
else this[name]=definition()}('bowser',function(){var t=true
function detect(ua){function getFirstMatch(regex){var match=ua.match(regex);return(match&&match.length>1&&match[1])||'';}
function getSecondMatch(regex){var match=ua.match(regex);return(match&&match.length>1&&match[2])||'';}
var iosdevice=getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase(),likeAndroid=/like android/i.test(ua),android=!likeAndroid&&/android/i.test(ua),nexusMobile=/nexus\s*[0-6]\s*/i.test(ua),nexusTablet=!nexusMobile&&/nexus\s*[0-9]+/i.test(ua),chromeos=/CrOS/.test(ua),silk=/silk/i.test(ua),sailfish=/sailfish/i.test(ua),tizen=/tizen/i.test(ua),webos=/(web|hpw)os/i.test(ua),windowsphone=/windows phone/i.test(ua),windows=!windowsphone&&/windows/i.test(ua),mac=!iosdevice&&!silk&&/macintosh/i.test(ua),linux=!android&&!sailfish&&!tizen&&!webos&&/linux/i.test(ua),edgeVersion=getFirstMatch(/edge\/(\d+(\.\d+)?)/i),versionIdentifier=getFirstMatch(/version\/(\d+(\.\d+)?)/i),tablet=/tablet/i.test(ua),mobile=!tablet&&/[^-]mobi/i.test(ua),xbox=/xbox/i.test(ua),result
if(/opera|opr|opios/i.test(ua)){result={name:'Opera',opera:t,version:versionIdentifier||getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}}
else if(/coast/i.test(ua)){result={name:'Opera Coast',coast:t,version:versionIdentifier||getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}}
else if(/yabrowser/i.test(ua)){result={name:'Yandex Browser',yandexbrowser:t,version:versionIdentifier||getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}}
else if(/ucbrowser/i.test(ua)){result={name:'UC Browser',ucbrowser:t,version:getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/mxios/i.test(ua)){result={name:'Maxthon',maxthon:t,version:getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/epiphany/i.test(ua)){result={name:'Epiphany',epiphany:t,version:getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/puffin/i.test(ua)){result={name:'Puffin',puffin:t,version:getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}}
else if(/sleipnir/i.test(ua)){result={name:'Sleipnir',sleipnir:t,version:getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/k-meleon/i.test(ua)){result={name:'K-Meleon',kMeleon:t,version:getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(windowsphone){result={name:'Windows Phone',windowsphone:t}
if(edgeVersion){result.msedge=t
result.version=edgeVersion}else{result.msie=t
result.version=getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i)}}
else if(/msie|trident/i.test(ua)){result={name:'Internet Explorer',msie:t,version:getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i)}}else if(chromeos){result={name:'Chrome',chromeos:t,chromeBook:t,chrome:t,version:getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}}else if(/chrome.+? edge/i.test(ua)){result={name:'Microsoft Edge',msedge:t,version:edgeVersion}}
else if(/vivaldi/i.test(ua)){result={name:'Vivaldi',vivaldi:t,version:getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i)||versionIdentifier}}
else if(sailfish){result={name:'Sailfish',sailfish:t,version:getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}}
else if(/seamonkey\//i.test(ua)){result={name:'SeaMonkey',seamonkey:t,version:getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i)}}
else if(/firefox|iceweasel|fxios/i.test(ua)){result={name:'Firefox',firefox:t,version:getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)}
if(/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)){result.firefoxos=t}}
else if(silk){result={name:'Amazon Silk',silk:t,version:getFirstMatch(/silk\/(\d+(\.\d+)?)/i)}}
else if(/phantom/i.test(ua)){result={name:'PhantomJS',phantom:t,version:getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i)}}
else if(/slimerjs/i.test(ua)){result={name:'SlimerJS',slimer:t,version:getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i)}}
else if(/blackberry|\bbb\d+/i.test(ua)||/rim\stablet/i.test(ua)){result={name:'BlackBerry',blackberry:t,version:versionIdentifier||getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}}
else if(webos){result={name:'WebOS',webos:t,version:versionIdentifier||getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)};if(/touchpad\//i.test(ua)){result.touchpad=t;}}
else if(/bada/i.test(ua)){result={name:'Bada',bada:t,version:getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i)};}
else if(tizen){result={name:'Tizen',tizen:t,version:getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||versionIdentifier};}
else if(/qupzilla/i.test(ua)){result={name:'QupZilla',qupzilla:t,version:getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||versionIdentifier}}
else if(/chromium/i.test(ua)){result={name:'Chromium',chromium:t,version:getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||versionIdentifier}}
else if(/chrome|crios|crmo/i.test(ua)){result={name:'Chrome',chrome:t,version:getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}}
else if(android){result={name:'Android',version:versionIdentifier}}
else if(/safari|applewebkit/i.test(ua)){result={name:'Safari',safari:t}
if(versionIdentifier){result.version=versionIdentifier}}
else if(iosdevice){result={name:iosdevice=='iphone'?'iPhone':iosdevice=='ipad'?'iPad':'iPod'}
if(versionIdentifier){result.version=versionIdentifier}}
else if(/googlebot/i.test(ua)){result={name:'Googlebot',googlebot:t,version:getFirstMatch(/googlebot\/(\d+(\.\d+))/i)||versionIdentifier}}else{result={name:getFirstMatch(/^(.*)\/(.*) /),version:getSecondMatch(/^(.*)\/(.*) /)};}
if(!result.msedge&&/(apple)?webkit/i.test(ua)){if(/(apple)?webkit\/537\.36/i.test(ua)){result.name=result.name||"Blink"
result.blink=t}else{result.name=result.name||"Webkit"
result.webkit=t}
if(!result.version&&versionIdentifier){result.version=versionIdentifier}}else if(!result.opera&&/gecko\//i.test(ua)){result.name=result.name||"Gecko"
result.gecko=t
result.version=result.version||getFirstMatch(/gecko\/(\d+(\.\d+)?)/i)}
if(!result.msedge&&(android||result.silk)){result.android=t}else if(iosdevice){result[iosdevice]=t
result.ios=t}else if(mac){result.mac=t}else if(xbox){result.xbox=t}else if(windows){result.windows=t}else if(linux){result.linux=t}
var osVersion='';if(result.windowsphone){osVersion=getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);}else if(iosdevice){osVersion=getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i);osVersion=osVersion.replace(/[_\s]/g,'.');}else if(android){osVersion=getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i);}else if(result.webos){osVersion=getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);}else if(result.blackberry){osVersion=getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i);}else if(result.bada){osVersion=getFirstMatch(/bada\/(\d+(\.\d+)*)/i);}else if(result.tizen){osVersion=getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i);}
if(osVersion){result.osversion=osVersion;}
var osMajorVersion=osVersion.split('.')[0];if(tablet||nexusTablet||iosdevice=='ipad'||(android&&(osMajorVersion==3||(osMajorVersion>=4&&!mobile)))||result.silk){result.tablet=t}else if(mobile||iosdevice=='iphone'||iosdevice=='ipod'||android||nexusMobile||result.blackberry||result.webos||result.bada){result.mobile=t}
if(result.msedge||(result.msie&&result.version>=10)||(result.yandexbrowser&&result.version>=15)||(result.vivaldi&&result.version>=1.0)||(result.chrome&&result.version>=20)||(result.firefox&&result.version>=20.0)||(result.safari&&result.version>=6)||(result.opera&&result.version>=10.0)||(result.ios&&result.osversion&&result.osversion.split(".")[0]>=6)||(result.blackberry&&result.version>=10.1)||(result.chromium&&result.version>=20)){result.a=t;}
else if((result.msie&&result.version<10)||(result.chrome&&result.version<20)||(result.firefox&&result.version<20.0)||(result.safari&&result.version<6)||(result.opera&&result.version<10.0)||(result.ios&&result.osversion&&result.osversion.split(".")[0]<6)||(result.chromium&&result.version<20)){result.c=t}else result.x=t
return result}
var bowser=detect(typeof navigator!=='undefined'?navigator.userAgent:'')
bowser.test=function(browserList){for(var i=0;i<browserList.length;++i){var browserItem=browserList[i];if(typeof browserItem==='string'){if(browserItem in bowser){return true;}}}
return false;}
function getVersionPrecision(version){return version.split(".").length;}
function map(arr,iterator){var result=[],i;if(Array.prototype.map){return Array.prototype.map.call(arr,iterator);}
for(i=0;i<arr.length;i++){result.push(iterator(arr[i]));}
return result;}
function compareVersions(versions){var precision=Math.max(getVersionPrecision(versions[0]),getVersionPrecision(versions[1]));var chunks=map(versions,function(version){var delta=precision-getVersionPrecision(version);version=version+new Array(delta+1).join(".0");return map(version.split("."),function(chunk){return new Array(20-chunk.length).join("0")+chunk;}).reverse();});while(--precision>=0){if(chunks[0][precision]>chunks[1][precision]){return 1;}
else if(chunks[0][precision]===chunks[1][precision]){if(precision===0){return 0;}}else{return-1;}}}
function isUnsupportedBrowser(minVersions,strictMode,ua){var _bowser=bowser;if(typeof strictMode==='string'){ua=strictMode;strictMode=void(0);}
if(strictMode===void(0)){strictMode=false;}
if(ua){_bowser=detect(ua);}
var version=""+_bowser.version;for(var browser in minVersions){if(minVersions.hasOwnProperty(browser)){if(_bowser[browser]){return compareVersions([version,minVersions[browser]])<0;}}}
return strictMode;}
function check(minVersions,strictMode,ua){return!isUnsupportedBrowser(minVersions,strictMode,ua);}
bowser.isUnsupportedBrowser=isUnsupportedBrowser;bowser.compareVersions=compareVersions;bowser.check=check;bowser._detect=detect;return bowser});(function($){UABBTrigger={triggerHook:function(hook,args){$('body').trigger('uabb-trigger.'+hook,args);},addHook:function(hook,callback){$('body').on('uabb-trigger.'+hook,callback);},removeHook:function(hook,callback){$('body').off('uabb-trigger.'+hook,callback);},};})(jQuery);jQuery(document).ready(function($){if(typeof bowser!=='undefined'&&bowser!==null){var uabb_browser=bowser.name,uabb_browser_v=bowser.version,uabb_browser_class=uabb_browser.replace(/\s+/g,'-').toLowerCase(),uabb_browser_v_class=uabb_browser_class+parseInt(uabb_browser_v);$('html').addClass(uabb_browser_class).addClass(uabb_browser_v_class);}
$('.uabb-row-separator').parents('html').css('overflow-x','hidden');});;(function($){FLBuilderMenu=function(settings){this.nodeId=settings.id;this.nodeClass='.fl-node-'+settings.id;this.wrapperClass=this.nodeClass+' .fl-menu';this.type=settings.type;this.mobileToggle=settings.mobile;this.mobileBelowRow=settings.mobileBelowRow;this.mobileFlyout=settings.mobileFlyout;this.breakPoints=settings.breakPoints;this.mobileBreakpoint=settings.mobileBreakpoint;this.currentBrowserWidth=$(window).width();this.postId=settings.postId;this.mobileStacked=settings.mobileStacked;this.submenuIcon=settings.submenuIcon;this.flyoutWidth=settings.flyoutWidth;this._initMenu();$(window).on('resize',$.proxy(function(){var width=$(window).width();if(width!=this.currentBrowserWidth){this.currentBrowserWidth=width;this._initMenu(true);this._clickOrHover(true);}
this._resizeFlyoutMenuPanel();},this));$(window).on('scroll',$.proxy(function(){this._resizeFlyoutMenuPanel();},this));$(this.wrapperClass).on('keydown','.fl-menu-mobile-toggle, .menu-item:first a:first',$.proxy(function(event){if(event.key!=='Tab'||!this._isMenuToggle()||!this._isMobileBelowRowEnabled()){return;}
if(event.shiftKey&&$(event.target).is('a')){event.preventDefault();$(this.wrapperClass).find('.fl-menu-mobile-toggle').trigger('focus');}
else if(!event.shiftKey&&$(event.target).hasClass('fl-menu-mobile-toggle')&&$(event.target).hasClass('fl-active')){event.preventDefault();$(this.wrapperClass).find('.menu-item:first a:first').trigger('focus');}},this));$(this.wrapperClass).on('focusout',$.proxy(function(event){if($(this.wrapperClass+' nav').has($(event.relatedTarget)).length===0){if(this.type==='accordion'){this._toggleSubmenu($(event.target).parents('.fl-has-submenu:last'),false);}else{this._clickOrHover(true);}
const mobileToggle=$(this.wrapperClass).find('.fl-menu-mobile-toggle');if(this._isMenuToggle()&&mobileToggle.hasClass('fl-active')&&!$(event.relatedTarget).is(mobileToggle)&&'expanded'!==this.mobileToggle){mobileToggle.trigger('click');}}},this));};FLBuilderMenu.prototype={nodeClass:'',wrapperClass:'',type:'',breakPoints:{},$submenus:null,_isMobile:function(){return this.currentBrowserWidth<=this.breakPoints.small?true:false;},_isMouseAvailable:function(){return window.matchMedia("(pointer: fine) and (hover: hover)").matches;},_isMedium:function(){return this.currentBrowserWidth<=this.breakPoints.medium?true:false;},_isLarge:function(){return this.currentBrowserWidth<=this.breakPoints.large?true:false;},_isMenuToggle:function(){if(('always'==this.mobileBreakpoint||(this._isMobile()&&'mobile'==this.mobileBreakpoint)||(this._isMedium()&&'medium-mobile'==this.mobileBreakpoint)||(this._isLarge()&&'large-mobile'==this.mobileBreakpoint))&&($(this.wrapperClass).find('.fl-menu-mobile-toggle').is(':visible')||'expanded'==this.mobileToggle)){return true;}
return false;},_initMenu:function(resized=false){this._setupSubmenu();if(!resized){this._menuOnFocus();this._menuOnClick();this._menuOnEscape();}
if($(this.nodeClass).length&&this.type=='horizontal'){this._initMegaMenus();}
if(this._isMenuToggle()||this.type=='accordion'){$(this.wrapperClass).off('mouseenter mouseleave');this._clickOrHover();}else{this._submenuOnRight();this._submenuRowZindexFix();}
if(this.mobileToggle!='expanded'){this._toggleForMobile();}
if($(this.wrapperClass).find('.fl-menu-search-item').length){this._toggleMenuSearch();}
if($(this.wrapperClass).find('.fl-menu-cart-item').length){this._wooUpdateParams();}},_setupSubmenu:function(){if(!this._isMouseAvailable()||this._isMenuToggle()||this.type==='accordion'){$(this.wrapperClass).addClass('no-hover');}else{$(this.wrapperClass).removeClass('no-hover');}},_menuOnFocus:function(){$(this.wrapperClass).on('focus','a, .fl-menu-toggle',$.proxy(function(event){const focusedMenuItem=$(event.target).closest('.menu-item');const blurredMenuItem=$(event.relatedTarget).closest('.menu-item');if(focusedMenuItem.closest('ul').is(blurredMenuItem.closest('ul'))){if(!focusedMenuItem.is(blurredMenuItem)){this._toggleSubmenu(blurredMenuItem,false);}}
else if(focusedMenuItem.has(blurredMenuItem).length===blurredMenuItem.has(focusedMenuItem).length){blurredMenuItem.parents('.fl-has-submenu').each((_,parent)=>{if(focusedMenuItem.closest('ul').is($(parent).closest('ul'))){this._toggleSubmenu($(parent),false);return false;}});}
else if(focusedMenuItem.has(blurredMenuItem).length){if(this.type!=='accordion'&&this.submenuIcon==='none'){this._toggleSubmenu(blurredMenuItem,false);}}},this));},_menuOnEscape:function(){$(this.wrapperClass).on('keydown',$.proxy(function(event){if(event.key!=='Escape')return;const menuItem=$(event.target).closest('.menu-item');const mobileToggle=$(this.wrapperClass).find('.fl-menu-mobile-toggle');if(menuItem.length||$(event.target).hasClass('fl-menu-mobile-close')){if(menuItem.hasClass('fl-has-submenu')&&menuItem.find('.sub-menu:first').is(':visible')){this._toggleSubmenu(menuItem,false);}else{const parentMenuItem=menuItem.parents('.fl-has-submenu').not('.mega-menu.hide-heading, .mega-menu-disabled.hide-heading').first();if(parentMenuItem.length===0&&this._isMenuToggle()&&mobileToggle.hasClass('fl-active')){mobileToggle.trigger('blur').trigger('focus');}
else if(parentMenuItem.length!==0){this._toggleSubmenu(parentMenuItem,false);parentMenuItem.find('a:first').trigger('focus');}}}
else if($(event.target).hasClass('fl-menu-mobile-toggle')&&mobileToggle.hasClass('fl-active')){mobileToggle.trigger('blur').trigger('focus');}},this));},_menuOnClick:function(){$(this.wrapperClass).on('keydown','span.fl-menu-toggle',$.proxy(function(event){if(event.key==='Enter'||event.key===' '){event.preventDefault();$(event.target).trigger('click');}},this));$(this.wrapperClass).on('click','a, .fl-menu-toggle',$.proxy(function(event){event.stopPropagation();if(this._isMouseAvailable()&&!this._isMenuToggle()&&event.detail&&this.type!=='accordion')return;if($(event.target).is('a')&&(this.submenuIcon!=='none'||this.type==='accordion'))return;const menuItem=$(event.target).closest('.menu-item');const menuLink=menuItem.find('a:first').attr('href');const submenuHidden=menuItem.find('.sub-menu:first').is(':hidden');if(typeof menuLink==='undefined'||menuLink==='#'||submenuHidden){event.preventDefault();}
if($(event.target).hasClass('fl-menu-toggle')||submenuHidden){this._toggleSubmenu(menuItem,submenuHidden);}},this));},_toggleSubmenu:function(menuItem,opened){const togglingClass=this._isMenuToggle()||this.type==='accordion'?'fl-active':'focus';const toggleElement=this.submenuIcon==='none'?'a':'.fl-menu-toggle';const hiddenMenu='.mega-menu.hide-heading, .mega-menu-disabled.hide-heading';if(opened&&menuItem.hasClass('fl-has-submenu')&&!menuItem.is(hiddenMenu)){menuItem.addClass(togglingClass);menuItem.find(toggleElement).first().attr('aria-expanded',true);if(this._isMenuToggle()||this.type==='accordion'){menuItem.find('.sub-menu:first:hidden').slideDown();}}else{menuItem.parent().find('.menu-item').removeClass(togglingClass);menuItem.parent().find('.fl-has-submenu').not(hiddenMenu).find(toggleElement).attr('aria-expanded',false);if(this._isMenuToggle()||this.type==='accordion'){menuItem.find('.sub-menu:visible').slideUp();}}},_clickOrHover:function(clear=false){const selector=this._isMobileBelowRowEnabled()?this.nodeClass+'-clone':this.nodeClass;this.$submenus=this.$submenus||$(selector).find('.sub-menu');const className=this._isMenuToggle()||this.type==='accordion'?'fl-active':'focus';const toggleElement=this.submenuIcon==='none'?'a':'.fl-menu-toggle';const hiddenMenu='.mega-menu.hide-heading, .mega-menu-disabled.hide-heading';$(selector).find('.fl-has-submenu').not(hiddenMenu).each(function(){if(clear||!$(this).hasClass(className)){if(clear)$(this).removeClass(className);$(this).find(toggleElement+':first').attr('aria-expanded',false);if(className==='fl-active'){$(this).find('.sub-menu').fadeOut();}else if(className==='focus'){$(this).find('.sub-menu').css({'display':'','opacity':''});}}});},_submenuOnRight:function(){$(this.wrapperClass).on('mouseenter focus','.fl-has-submenu',$.proxy(function(e){if($(e.currentTarget).find('.sub-menu').length===0){return;}
var $link=$(e.currentTarget),$parent=$link.parent(),$subMenu=$link.find('.sub-menu'),subMenuWidth=$subMenu.width(),subMenuPos=0,bodyWidth=$('body').width();if($link.closest('.fl-menu-submenu-right').length!==0){$link.addClass('fl-menu-submenu-right');}else if($('body').hasClass('rtl')){subMenuPos=$parent.is('.sub-menu')?$parent.offset().left-subMenuWidth:$link.offset().left-$link.width()-subMenuWidth;if(subMenuPos<=0){$link.addClass('fl-menu-submenu-right');}}else{subMenuPos=$parent.is('.sub-menu')?$parent.offset().left+$parent.width()+subMenuWidth:$link.offset().left+$link.width()+subMenuWidth;if(subMenuPos>bodyWidth){$link.addClass('fl-menu-submenu-right');}}},this)).on('mouseleave','.fl-has-submenu',$.proxy(function(e){$(e.currentTarget).removeClass('fl-menu-submenu-right');},this));},_submenuRowZindexFix:function(){$(this.wrapperClass).on('mouseenter','ul.menu > .fl-has-submenu',$.proxy(function(e){if($(e.currentTarget).find('.sub-menu').length===0){return;}
$(this.nodeClass).closest('.fl-row').find('.fl-row-content').css('z-index','10');},this)).on('mouseleave','ul.menu > .fl-has-submenu',$.proxy(function(){$(this.nodeClass).closest('.fl-row').find('.fl-row-content').css('z-index','');},this));},_toggleForMobile:function(){var $wrapper=null,$menu=null,self=this;$(this.wrapperClass).find('ul.menu').attr('role','menu');$(this.wrapperClass).find('.fl-menu-mobile-toggle').attr('aria-controls',$(this.wrapperClass).find('ul.menu').attr('id'));if(this._isMenuToggle()){if(this._isMobileBelowRowEnabled()){this._placeMobileMenuBelowRow();$wrapper=$(this.wrapperClass);$menu=$(this.nodeClass+'-clone');$menu.find('ul.menu').show();}else{$wrapper=$(this.wrapperClass);$menu=$wrapper.find('.menu');}
if(!$wrapper.find('.fl-menu-mobile-toggle').hasClass('fl-active')&&!self.mobileFlyout){$menu.css({display:'none'});}
if(self.mobileFlyout){this._initFlyoutMenu();}
$wrapper.on('click','.fl-menu-mobile-toggle',function(e){e.stopImmediatePropagation();$(this).toggleClass('fl-active');if(self.mobileFlyout){self._toggleFlyoutMenu();const flyoutWrapper=$('.fl-menu-mobile-flyout');if($(this).hasClass('fl-active')){flyoutWrapper.attr('aria-hidden',false);flyoutWrapper.find('a[href], button, input, select, textarea, span.fl-menu-toggle, [tabindex="-1"]').attr('tabindex',0);}else{flyoutWrapper.attr('aria-hidden',true);flyoutWrapper.find('a[href], button, input, select, textarea, span.fl-menu-toggle, [tabindex]:not([tabindex="-1"])').attr('tabindex',-1);}}else{var targetMenu=null;if(self.mobileBelowRow){var $closestCol=$(this).parents('.fl-col, .fl-module-box'),$closestColGroup=$closestCol.length?$closestCol.parent('.fl-col-group'):null;targetMenu=$closestCol.length?$closestCol.last().next('.fl-menu-mobile-clone'):null;if($closestColGroup.length){if($closestColGroup.hasClass('fl-col-group-responsive-reversed')){$closestColGroup.find('.fl-menu-mobile-clone').css('order',-1);}else if($closestColGroup){$closestColGroup.find('.fl-menu-mobile-clone').css('order',2);}}}else{targetMenu=$(this).closest('.fl-menu').find('ul.menu');}
if(targetMenu.length){$menu=$(targetMenu);}
$menu.slideToggle();}
e.stopPropagation();});$menu.off().on('click','.menu-item > a[href*="#"]:not([href="#"])',function(){var $href=$(this).attr('href'),$targetID=$href.split('#')[1],element=$('#'+$targetID);if($('body').find(element).length>0){$(this).toggleClass('fl-active');FLBuilderLayout._scrollToElement(element);if(!self._isMenuToggle()){$menu.slideToggle();}}});}else{if(this._isMobileBelowRowEnabled()){this._removeMenuFromBelowRow();}
$wrapper=$(this.wrapperClass),$menu=$wrapper.find('ul.menu');$wrapper.find('.fl-menu-mobile-toggle').removeClass('fl-active');$menu.css({display:''});if(!this._isMobileBelowRowEnabled()){$menu.off('click','.menu-item > a[href*="#"]:not([href="#"])');}
if(this.mobileFlyout&&$wrapper.find('.fl-menu-mobile-flyout').length>0){$('body').css('margin','');$('.fl-builder-ui-pinned-content-transform').css('transform','');$menu.unwrap();$wrapper.find('.fl-menu-mobile-close').remove();$wrapper.find('.fl-menu-mobile-opacity').remove();}}},_initMegaMenus:function(){var module=$(this.nodeClass),rowContent=module.closest('.fl-row-content'),rowWidth=rowContent.width(),megas=module.find('.mega-menu'),disabled=module.find('.mega-menu-disabled'),isToggle=this._isMenuToggle();if(isToggle){megas.removeClass('mega-menu').addClass('mega-menu-disabled');module.find('li.mega-menu-disabled > ul.sub-menu').css('width','');rowContent.css('position','');}else{disabled.removeClass('mega-menu-disabled').addClass('mega-menu');module.find('li.mega-menu > ul.sub-menu').css('width',rowWidth+'px');rowContent.css('position','relative');}},_isMobileBelowRowEnabled:function(){return this.mobileBelowRow&&($(this.nodeClass).parents('.fl-col, .fl-module-box').length);},_placeMobileMenuBelowRow:function(){if($(this.nodeClass+'-clone').length){return;}
var module=$(this.nodeClass),clone=null,col=module.parents('.fl-col, .fl-module-box').last();if(module.length<1){return;}
clone=(module.length>1)?$(module[0]).clone():module.clone();module.find('ul.menu').remove();clone.addClass((this.nodeClass+'-clone').replace('.',''));clone.addClass('fl-menu-mobile-clone');clone.find('.fl-menu-mobile-toggle').remove();col.after(clone);if(module.hasClass('fl-animation')){clone.removeClass('fl-animation');}
this._menuOnFocus();this._menuOnClick();this._menuOnEscape();},_removeMenuFromBelowRow:function(){if(!$(this.nodeClass+'-clone').length){return;}
var module=$(this.nodeClass),clone=$(this.nodeClass+'-clone'),menu=clone.find('ul.menu');module.find('.fl-menu-mobile-toggle').after(menu);clone.remove();menu.find('a').each(FLBuilderLayout._initAnchorLink);},_initFlyoutMenu:function(){var wrapper=$(this.wrapperClass),menu=wrapper.find('ul.menu'),button=wrapper.find('.fl-menu-mobile-toggle');if(0===wrapper.find('.fl-menu-mobile-flyout').length){menu.wrap('<div class="fl-menu-mobile-flyout" aria-hidden="true"></div>');}
if(0===wrapper.find('.fl-menu-mobile-close').length){var close=window.fl_responsive_close||'Close'
wrapper.find('.fl-menu-mobile-flyout').prepend('<button class="fl-menu-mobile-close fl-content-ui-button" aria-label="'+close+'"><i class="fas fa-times"></i></button>');}
if(wrapper.hasClass('fl-menu-responsive-flyout-push-opacity')&&0===wrapper.find('.fl-menu-mobile-opacity').length){wrapper.append('<div class="fl-menu-mobile-opacity"></div>');}
wrapper.off('click','.fl-menu-mobile-opacity, .fl-menu-mobile-close').on('click','.fl-menu-mobile-opacity, .fl-menu-mobile-close',function(e){button.trigger('focus').trigger('click');e.stopPropagation();});if('undefined'!==typeof FLBuilder){FLBuilder.addHook('restartEditingSession',function(){$('.fl-builder-ui-pinned-content-transform').css('transform','');if(button.hasClass('fl-active')){button.trigger('click');}});}
$('.fl-menu-mobile-flyout').find('a[href], button, input, select, textarea, span.fl-menu-toggle, [tabindex]:not([tabindex="-1"])').attr('tabindex',-1);},_toggleFlyoutMenu:function(){var wrapper=$(this.wrapperClass),button=wrapper.find('.fl-menu-mobile-toggle'),position=wrapper.hasClass('fl-flyout-right')?'right':'left',pushMenu=wrapper.hasClass('fl-menu-responsive-flyout-push')||wrapper.hasClass('fl-menu-responsive-flyout-push-opacity'),opacity=wrapper.find('.fl-menu-mobile-opacity'),marginPos={},fixedPos={},fixedHeader=$('header, header > div');this._resizeFlyoutMenuPanel();if($('.fl-builder-ui-pinned-content-transform').length>0&&!$('body').hasClass('fl-builder-edit')){$('.fl-builder-ui-pinned-content-transform').css('transform','none');}
if(pushMenu){marginPos['margin-'+position]=button.hasClass('fl-active')?this.flyoutWidth+'px':'0px';$('body').animate(marginPos,200);if(fixedHeader.length>0){fixedPos[position]=button.hasClass('fl-active')?this.flyoutWidth+'px':'0px';fixedHeader.each(function(){if('fixed'==$(this).css('position')){$(this).css({'transition':'none'});$(this).animate(fixedPos,200);}});}}
if(opacity.length>0&&button.hasClass('fl-active')){opacity.show();}else{opacity.hide();}},_resizeFlyoutMenuPanel:function(){const wrapper=$(this.wrapperClass);const wrapFlyout=wrapper.find('.fl-menu-mobile-flyout');if(wrapFlyout.length>0){wrapFlyout.css(this._getFlyoutMenuPanelPosition());}},_getFlyoutMenuPanelPosition:function(){var wrapper=$(this.wrapperClass),button=wrapper.find('.fl-menu-mobile-toggle'),side=wrapper.hasClass('fl-flyout-right')?'right':'left',winHeight=$(window).outerHeight(),winTop=$(window).scrollTop(),adminBarHeight=$('#wpadminbar').length?$('#wpadminbar').height():0,flyoutPosition={};flyoutPosition[side]='-'+(parseInt(this.flyoutWidth)+15)+'px';if(!button.hasClass('fl-active')){return flyoutPosition;}
flyoutPosition[side]='0px';flyoutPosition['height']=winHeight+'px';flyoutPosition['top']='0px';if(adminBarHeight>0){const diff=adminBarHeight-winTop;flyoutPosition['top']=diff<=0?'0px':(diff)+'px';}
return flyoutPosition;},_toggleMenuSearch:function(){var wrapper=$(this.wrapperClass).find('.fl-menu-search-item'),button=wrapper.find('.fl-button:is(a, button)'),form=wrapper.find('.fl-search-form-input-wrap'),self=this;button.attr('tabindex',0);button.attr('aria-label','Search');button.on('click',function(e){e.preventDefault();if(form.is(':visible')){form.stop().fadeOut(200);}else{form.stop().fadeIn(200);$('body').on('click.fl-menu-search',$.proxy(self._hideMenuSearch,self));form.find('.fl-search-text').focus();}});},_hideMenuSearch:function(e){var form=$(this.wrapperClass).find('.fl-search-form-input-wrap');if(e!==undefined){if($(e.target).closest('.fl-menu-search-item').length>0){return;}}
form.stop().fadeOut(200);$('body').off('click.fl-menu-search');},_wooUpdateParams:function(){if('undefined'!==typeof wc_cart_fragments_params){wc_cart_fragments_params.wc_ajax_url+='&fl-menu-node='+this.nodeId+'&post-id='+this.postId;}
if('undefined'!==typeof wc_add_to_cart_params){wc_add_to_cart_params.wc_ajax_url+='&fl-menu-node='+this.nodeId+'&post-id='+this.postId;}},};})(jQuery);(function($){$(function(){new FLBuilderMenu({id:'60c5860bcd960',type:'horizontal',mobile:'hamburger',mobileBelowRow:true,mobileFlyout:false,breakPoints:{large:1200,medium:992,small:768},mobileBreakpoint:'mobile',postId:'5963',mobileStacked:true,submenuIcon:'arrows',flyoutWidth:'250',});});})(jQuery);jQuery(function($){$(function(){$('.fl-node-60c5865f75938 .fl-photo-img').on('mouseenter',function(e){$(this).data('title',$(this).attr('title')).removeAttr('title');}).on('mouseleave',function(e){$(this).attr('title',$(this).data('title')).data('title',null);});});window._fl_string_to_slug_regex='a-zA-Z0-9';});(function($){FLThemeBuilderHeaderLayout={win:null,body:null,header:null,overlay:false,hasAdminBar:false,stickyOn:'',breakpointWidth:0,init:function(){var editing=$('html.fl-builder-edit').length,header=$('.fl-builder-content[data-type=header]'),menuModule=header.find('.fl-module-menu'),breakpoint=null;if(!editing&&header.length){header.imagesLoaded($.proxy(function(){this.win=$(window);this.body=$('body');this.header=header.eq(0);this.overlay=!!Number(header.attr('data-overlay'));this.hasAdminBar=!!$('body.admin-bar').length;this.stickyOn=this.header.data('sticky-on');breakpoint=this.header.data('sticky-breakpoint');if(''==this.stickyOn){if(typeof FLBuilderLayoutConfig.breakpoints[breakpoint]!==undefined){this.breakpointWidth=FLBuilderLayoutConfig.breakpoints[breakpoint];}else{this.breakpointWidth=FLBuilderLayoutConfig.breakpoints.medium;}}
if(Number(header.attr('data-sticky'))){this.header.data('original-top',this.header.offset().top);this.win.on('resize',$.throttle(500,$.proxy(this._initSticky,this)));this._initSticky();}},this));}},_initSticky:function(e){var header=$('.fl-builder-content[data-type=header]'),windowSize=this.win.width(),makeSticky=false;makeSticky=this._makeWindowSticky(windowSize);if(makeSticky||(this.breakpointWidth>0&&windowSize>=this.breakpointWidth)){this.win.on('scroll.fl-theme-builder-header-sticky',$.proxy(this._doSticky,this));if(e&&'resize'===e.type){if(this.header.hasClass('fl-theme-builder-header-sticky')){this._doSticky(e);}
this._adjustStickyHeaderWidth();}
if(Number(header.attr('data-shrink'))){this.header.data('original-height',this.header.outerHeight());this.win.on('resize',$.throttle(500,$.proxy(this._initShrink,this)));this._initShrink();}
this._initFlyoutMenuFix(e);}else{this.win.off('scroll.fl-theme-builder-header-sticky');this.win.off('resize.fl-theme-builder-header-sticky');this.header.removeClass('fl-theme-builder-header-sticky');this.header.removeAttr('style');this.header.parent().css('padding-top','0');}},_makeWindowSticky:function(windowSize){var makeSticky=false;switch(this.stickyOn){case'xl':makeSticky=windowSize>FLBuilderLayoutConfig.breakpoints['large'];break;case'':case'desktop':makeSticky=windowSize>=FLBuilderLayoutConfig.breakpoints['medium'];break;case'desktop-medium':makeSticky=windowSize>FLBuilderLayoutConfig.breakpoints['small'];break;case'large':makeSticky=windowSize>FLBuilderLayoutConfig.breakpoints['medium']&&windowSize<=FLBuilderLayoutConfig.breakpoints['large'];break;case'large-medium':makeSticky=windowSize>FLBuilderLayoutConfig.breakpoints['small']&&windowSize<=FLBuilderLayoutConfig.breakpoints['large'];break;case'medium':makeSticky=(windowSize<=FLBuilderLayoutConfig.breakpoints['medium']&&windowSize>FLBuilderLayoutConfig.breakpoints['small']);break;case'medium-mobile':makeSticky=(windowSize<=FLBuilderLayoutConfig.breakpoints['medium']);break;case'mobile':makeSticky=(windowSize<=FLBuilderLayoutConfig.breakpoints['small']);break;case'all':makeSticky=true;break;}
return makeSticky;},_doSticky:function(e){var winTop=Math.floor(this.win.scrollTop()),headerTop=Math.floor(this.header.data('original-top')),hasStickyClass=this.header.hasClass('fl-theme-builder-header-sticky'),hasScrolledClass=this.header.hasClass('fl-theme-builder-header-scrolled'),beforeHeader=this.header.prevAll('.fl-builder-content'),bodyTopPadding=parseInt(jQuery('body').css('padding-top')),winBarHeight=$('#wpadminbar').length?$('#wpadminbar').outerHeight():0,headerHeight=0;if(isNaN(bodyTopPadding)){bodyTopPadding=0;}
if(this.hasAdminBar&&this.win.width()>600){winTop+=Math.floor(winBarHeight);}
if(winTop>headerTop){if(!hasStickyClass){if(e&&('scroll'===e.type||'smartscroll'===e.type)){this.header.addClass('fl-theme-builder-header-sticky');if(this.overlay&&beforeHeader.length){this.header.css('top',winBarHeight);}}
if(!this.overlay){this._adjustHeaderHeight();}}}
else if(hasStickyClass){this.header.removeClass('fl-theme-builder-header-sticky');this.header.removeAttr('style');this.header.parent().css('padding-top','0');}
this._adjustStickyHeaderWidth();if(winTop>headerTop){if(!hasScrolledClass){this.header.addClass('fl-theme-builder-header-scrolled');}}else if(hasScrolledClass){this.header.removeClass('fl-theme-builder-header-scrolled');}
this._flyoutMenuFix(e);},_initFlyoutMenuFix:function(e){var header=this.header,menuModule=header.closest('.fl-menu'),flyoutMenu=menuModule.find('.fl-menu-mobile-flyout'),isPushMenu=menuModule.hasClass('fl-menu-responsive-flyout-push')||menuModule.hasClass('fl-menu-responsive-flyout-push-opacity'),isOverlay=menuModule.hasClass('fl-menu-responsive-flyout-overlay'),flyoutPos=menuModule.hasClass('fl-flyout-right')?'right':'left',flyoutParent=header.parent().is('header')?header.parent().parent():header.parent();isFullWidth=this.win.width()===header.width(),flyoutLayout='',activePos=250,headerPos=0;if(!flyoutMenu.length){return;}
if(this.win.width()>header.parent().width()){headerPos=(this.win.width()-header.width())/ 2;}
if(isOverlay){activePos=headerPos;}
else if(isPushMenu){activePos=activePos+headerPos;}
flyoutMenu.data('activePos',activePos);if(isPushMenu){flyoutLayout='push-'+flyoutPos;}
else if(isOverlay){flyoutLayout='overlay-'+flyoutPos;}
if(isPushMenu&&!$('html').hasClass('fl-theme-builder-has-flyout-menu')){$('html').addClass('fl-theme-builder-has-flyout-menu');}
if(!flyoutParent.hasClass('fl-theme-builder-flyout-menu-'+flyoutLayout)){flyoutParent.addClass('fl-theme-builder-flyout-menu-'+flyoutLayout);}
if(!header.hasClass('fl-theme-builder-flyout-menu-overlay')&&isOverlay){header.addClass('fl-theme-builder-flyout-menu-overlay');}
if(!header.hasClass('fl-theme-builder-header-full-width')&&isFullWidth){header.addClass('fl-theme-builder-header-full-width');}
else if(!isFullWidth){header.removeClass('fl-theme-builder-header-full-width');}
menuModule.on('click','.fl-menu-mobile-toggle',$.proxy(function(event){if(menuModule.find('.fl-menu-mobile-toggle.fl-active').length){$('html').addClass('fl-theme-builder-flyout-menu-active');event.stopImmediatePropagation();}else{$('html').removeClass('fl-theme-builder-flyout-menu-active');}
this._flyoutMenuFix(event);},this));},_flyoutMenuFix:function(e){var header=this.header,menuModule=$(e.target).closest('.fl-menu'),flyoutMenu=menuModule.find('.fl-menu-mobile-flyout'),flyoutPos=menuModule.hasClass('fl-flyout-right')?'right':'left',menuOpacity=menuModule.find('.fl-menu-mobile-opacity'),isScroll='undefined'!==typeof e&&'scroll'===e.handleObj.type,activePos='undefined'!==typeof flyoutMenu.data('activePos')?flyoutMenu.data('activePos'):0,headerPos=(this.win.width()-header.width())/ 2,inactivePos=headerPos>0?activePos+4:254;if(!flyoutMenu.length){return;}
if(this.overlay){return;}
if($('.fl-theme-builder-flyout-menu-active').length){if(isScroll&&!flyoutMenu.hasClass('fl-menu-disable-transition')){flyoutMenu.addClass('fl-menu-disable-transition');}
if(header.hasClass('fl-theme-builder-header-sticky')){if(!isScroll){setTimeout($.proxy(function(){flyoutMenu.css(flyoutPos,'-'+activePos+'px');},this),1);}else{flyoutMenu.css(flyoutPos,'-'+activePos+'px');}}else{flyoutMenu.css(flyoutPos,'0px');}}else{if(flyoutMenu.hasClass('fl-menu-disable-transition')){flyoutMenu.removeClass('fl-menu-disable-transition');}
if(header.hasClass('fl-theme-builder-flyout-menu-overlay')&&headerPos>0&&headerPos<250){if(header.hasClass('fl-theme-builder-header-sticky')){inactivePos=headerPos+254;}else{inactivePos=254;}}
if(e&&e.type==='resize'){inactivePos=headerPos+254;}
flyoutMenu.css(flyoutPos,'-'+inactivePos+'px');}
if(e&&menuModule.is('.fl-menu-responsive-flyout-overlay')&&$.infinitescroll){e.stopImmediatePropagation();}
if(menuOpacity.length){if(header.hasClass('fl-theme-builder-header-sticky')){if('0px'===menuOpacity.css('left')){menuOpacity.css('left','-'+headerPos+'px');}}else{menuOpacity.css('left','');}}},_adjustStickyHeaderWidth:function(){if($('body').hasClass('fl-fixed-width')){var parentWidth=this.header.parent().width();if(this.win.width()>=992){this.header.css({'margin':'0 auto','max-width':parentWidth,});}else{this.header.css({'margin':'','max-width':'',});}}},_adjustHeaderHeight:function(){var beforeHeader=this.header.prevAll('.fl-builder-content'),beforeHeaderHeight=0,beforeHeaderFix=0,headerHeight=Math.floor(this.header.outerHeight()),bodyTopPadding=parseInt($('body').css('padding-top')),wpAdminBarHeight=0,totalHeaderHeight=0;if(isNaN(bodyTopPadding)){bodyTopPadding=0;}
if(beforeHeader.length){$.each(beforeHeader,function(){beforeHeaderHeight+=Math.floor($(this).outerHeight());});beforeHeaderFix=2;}
if(this.hasAdminBar&&this.win.width()<=600){wpAdminBarHeight=Math.floor($('#wpadminbar').outerHeight());}
totalHeaderHeight=Math.floor(beforeHeaderHeight+headerHeight);if(headerHeight>0){var headerParent=this.header.parent(),headerParentTopPadding=0;if($(headerParent).is('body')){headerParentTopPadding=Math.floor(headerHeight-wpAdminBarHeight);}else{headerParentTopPadding=Math.floor(headerHeight-bodyTopPadding-wpAdminBarHeight);}
$(headerParent).css('padding-top',(headerParentTopPadding-beforeHeaderFix)+'px');this.header.css({'-webkit-transform':'translate(0px, -'+totalHeaderHeight+'px)','-ms-transform':'translate(0px, -'+totalHeaderHeight+'px)','transform':'translate(0px, -'+totalHeaderHeight+'px)'});}},_initShrink:function(e){if(this.win.width()>=this.breakpointWidth){this.win.on('scroll.fl-theme-builder-header-shrink',$.proxy(this._doShrink,this));this._setImageMaxHeight();if(this.win.scrollTop()>0){this._doShrink();}}else{this.header.parent().css('padding-top','0');this.win.off('scroll.fl-theme-builder-header-shrink');this._removeShrink();this._removeImageMaxHeight();}},_doShrink:function(e){var winTop=this.win.scrollTop(),headerTop=this.header.data('original-top'),headerHeight=this.header.data('original-height'),shrinkImageHeight=this.header.data('shrink-image-height'),windowSize=this.win.width(),makeSticky=this._makeWindowSticky(windowSize),hasClass=this.header.hasClass('fl-theme-builder-header-shrink');if(this.hasAdminBar){winTop+=32;}
if(makeSticky&&(winTop>headerTop+headerHeight)){if(!hasClass){this.header.addClass('fl-theme-builder-header-shrink');this.header.find('img').each(function(i){var image=$(this),maxMegaMenu=image.closest('.max-mega-menu').length,imageInLightbox=image.closest('.fl-button-lightbox-content').length,imageInNavMenu=image.closest('li.menu-item').length;if(!(imageInLightbox||imageInNavMenu||maxMegaMenu)){image.css('max-height',shrinkImageHeight);}});this.header.find('.fl-row-content-wrap').each(function(){var row=$(this);if(parseInt(row.css('padding-bottom'))>5){row.addClass('fl-theme-builder-header-shrink-row-bottom');}
if(parseInt(row.css('padding-top'))>5){row.addClass('fl-theme-builder-header-shrink-row-top');}});this.header.find('.fl-module').each(function(){var module=$(this).find('.fl-module-content').length?$(this).find('.fl-module-content'):$(this);if(parseInt(module.css('margin-bottom'))>5){module.addClass('fl-theme-builder-header-shrink-module-bottom');}
if(parseInt(module.css('margin-top'))>5){module.addClass('fl-theme-builder-header-shrink-module-top');}});}}else if(hasClass){this.header.find('img').css('max-height','');this._removeShrink();}
if('undefined'===typeof(e)&&$('body').hasClass('fl-fixed-width')){if(!this.overlay){this._adjustHeaderHeight();}}},_removeShrink:function(){var rows=this.header.find('.fl-row-content-wrap'),modules=this.header.find('.fl-module, .fl-module-content');rows.removeClass('fl-theme-builder-header-shrink-row-bottom');rows.removeClass('fl-theme-builder-header-shrink-row-top');modules.removeClass('fl-theme-builder-header-shrink-module-bottom');modules.removeClass('fl-theme-builder-header-shrink-module-top');this.header.removeClass('fl-theme-builder-header-shrink');},_setImageMaxHeight:function(){var head=$('head'),stylesId='fl-header-styles-'+this.header.data('post-id'),styles='',images=this.header.find('.fl-module img');if($('#'+stylesId).length){return;}
images.each(function(i){var image=$(this),height=image.height(),node=image.closest('.fl-module').data('node'),className='fl-node-'+node+'-img-'+i,maxMegaMenu=image.closest('.max-mega-menu').length,imageInLightbox=image.closest('.fl-button-lightbox-content').length,imageInNavMenu=image.closest('li.menu-item').length;if(!(imageInLightbox||imageInNavMenu||maxMegaMenu)){image.addClass(className);styles+='.'+className+' { max-height: '+(height?height:image[0].height)+'px }';}});if(''!==styles){head.append('<style id="'+stylesId+'">'+styles+'</style>');}},_removeImageMaxHeight:function(){$('#fl-header-styles-'+this.header.data('post-id')).remove();},};$(function(){FLThemeBuilderHeaderLayout.init();});})(jQuery);
!function(name,definition){if(typeof module!='undefined'&&module.exports)module.exports=definition()
else if(typeof define=='function'&&define.amd)define(name,definition)
else this[name]=definition()}('bowser',function(){var t=true
function detect(ua){function getFirstMatch(regex){var match=ua.match(regex);return(match&&match.length>1&&match[1])||'';}
function getSecondMatch(regex){var match=ua.match(regex);return(match&&match.length>1&&match[2])||'';}
var iosdevice=getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase(),likeAndroid=/like android/i.test(ua),android=!likeAndroid&&/android/i.test(ua),nexusMobile=/nexus\s*[0-6]\s*/i.test(ua),nexusTablet=!nexusMobile&&/nexus\s*[0-9]+/i.test(ua),chromeos=/CrOS/.test(ua),silk=/silk/i.test(ua),sailfish=/sailfish/i.test(ua),tizen=/tizen/i.test(ua),webos=/(web|hpw)os/i.test(ua),windowsphone=/windows phone/i.test(ua),windows=!windowsphone&&/windows/i.test(ua),mac=!iosdevice&&!silk&&/macintosh/i.test(ua),linux=!android&&!sailfish&&!tizen&&!webos&&/linux/i.test(ua),edgeVersion=getFirstMatch(/edge\/(\d+(\.\d+)?)/i),versionIdentifier=getFirstMatch(/version\/(\d+(\.\d+)?)/i),tablet=/tablet/i.test(ua),mobile=!tablet&&/[^-]mobi/i.test(ua),xbox=/xbox/i.test(ua),result
if(/opera|opr|opios/i.test(ua)){result={name:'Opera',opera:t,version:versionIdentifier||getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}}
else if(/coast/i.test(ua)){result={name:'Opera Coast',coast:t,version:versionIdentifier||getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}}
else if(/yabrowser/i.test(ua)){result={name:'Yandex Browser',yandexbrowser:t,version:versionIdentifier||getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}}
else if(/ucbrowser/i.test(ua)){result={name:'UC Browser',ucbrowser:t,version:getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/mxios/i.test(ua)){result={name:'Maxthon',maxthon:t,version:getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/epiphany/i.test(ua)){result={name:'Epiphany',epiphany:t,version:getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/puffin/i.test(ua)){result={name:'Puffin',puffin:t,version:getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}}
else if(/sleipnir/i.test(ua)){result={name:'Sleipnir',sleipnir:t,version:getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/k-meleon/i.test(ua)){result={name:'K-Meleon',kMeleon:t,version:getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(windowsphone){result={name:'Windows Phone',windowsphone:t}
if(edgeVersion){result.msedge=t
result.version=edgeVersion}else{result.msie=t
result.version=getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i)}}
else if(/msie|trident/i.test(ua)){result={name:'Internet Explorer',msie:t,version:getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i)}}else if(chromeos){result={name:'Chrome',chromeos:t,chromeBook:t,chrome:t,version:getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}}else if(/chrome.+? edge/i.test(ua)){result={name:'Microsoft Edge',msedge:t,version:edgeVersion}}
else if(/vivaldi/i.test(ua)){result={name:'Vivaldi',vivaldi:t,version:getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i)||versionIdentifier}}
else if(sailfish){result={name:'Sailfish',sailfish:t,version:getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}}
else if(/seamonkey\//i.test(ua)){result={name:'SeaMonkey',seamonkey:t,version:getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i)}}
else if(/firefox|iceweasel|fxios/i.test(ua)){result={name:'Firefox',firefox:t,version:getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)}
if(/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)){result.firefoxos=t}}
else if(silk){result={name:'Amazon Silk',silk:t,version:getFirstMatch(/silk\/(\d+(\.\d+)?)/i)}}
else if(/phantom/i.test(ua)){result={name:'PhantomJS',phantom:t,version:getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i)}}
else if(/slimerjs/i.test(ua)){result={name:'SlimerJS',slimer:t,version:getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i)}}
else if(/blackberry|\bbb\d+/i.test(ua)||/rim\stablet/i.test(ua)){result={name:'BlackBerry',blackberry:t,version:versionIdentifier||getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}}
else if(webos){result={name:'WebOS',webos:t,version:versionIdentifier||getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)};if(/touchpad\//i.test(ua)){result.touchpad=t;}}
else if(/bada/i.test(ua)){result={name:'Bada',bada:t,version:getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i)};}
else if(tizen){result={name:'Tizen',tizen:t,version:getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||versionIdentifier};}
else if(/qupzilla/i.test(ua)){result={name:'QupZilla',qupzilla:t,version:getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||versionIdentifier}}
else if(/chromium/i.test(ua)){result={name:'Chromium',chromium:t,version:getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||versionIdentifier}}
else if(/chrome|crios|crmo/i.test(ua)){result={name:'Chrome',chrome:t,version:getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}}
else if(android){result={name:'Android',version:versionIdentifier}}
else if(/safari|applewebkit/i.test(ua)){result={name:'Safari',safari:t}
if(versionIdentifier){result.version=versionIdentifier}}
else if(iosdevice){result={name:iosdevice=='iphone'?'iPhone':iosdevice=='ipad'?'iPad':'iPod'}
if(versionIdentifier){result.version=versionIdentifier}}
else if(/googlebot/i.test(ua)){result={name:'Googlebot',googlebot:t,version:getFirstMatch(/googlebot\/(\d+(\.\d+))/i)||versionIdentifier}}else{result={name:getFirstMatch(/^(.*)\/(.*) /),version:getSecondMatch(/^(.*)\/(.*) /)};}
if(!result.msedge&&/(apple)?webkit/i.test(ua)){if(/(apple)?webkit\/537\.36/i.test(ua)){result.name=result.name||"Blink"
result.blink=t}else{result.name=result.name||"Webkit"
result.webkit=t}
if(!result.version&&versionIdentifier){result.version=versionIdentifier}}else if(!result.opera&&/gecko\//i.test(ua)){result.name=result.name||"Gecko"
result.gecko=t
result.version=result.version||getFirstMatch(/gecko\/(\d+(\.\d+)?)/i)}
if(!result.msedge&&(android||result.silk)){result.android=t}else if(iosdevice){result[iosdevice]=t
result.ios=t}else if(mac){result.mac=t}else if(xbox){result.xbox=t}else if(windows){result.windows=t}else if(linux){result.linux=t}
var osVersion='';if(result.windowsphone){osVersion=getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);}else if(iosdevice){osVersion=getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i);osVersion=osVersion.replace(/[_\s]/g,'.');}else if(android){osVersion=getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i);}else if(result.webos){osVersion=getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);}else if(result.blackberry){osVersion=getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i);}else if(result.bada){osVersion=getFirstMatch(/bada\/(\d+(\.\d+)*)/i);}else if(result.tizen){osVersion=getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i);}
if(osVersion){result.osversion=osVersion;}
var osMajorVersion=osVersion.split('.')[0];if(tablet||nexusTablet||iosdevice=='ipad'||(android&&(osMajorVersion==3||(osMajorVersion>=4&&!mobile)))||result.silk){result.tablet=t}else if(mobile||iosdevice=='iphone'||iosdevice=='ipod'||android||nexusMobile||result.blackberry||result.webos||result.bada){result.mobile=t}
if(result.msedge||(result.msie&&result.version>=10)||(result.yandexbrowser&&result.version>=15)||(result.vivaldi&&result.version>=1.0)||(result.chrome&&result.version>=20)||(result.firefox&&result.version>=20.0)||(result.safari&&result.version>=6)||(result.opera&&result.version>=10.0)||(result.ios&&result.osversion&&result.osversion.split(".")[0]>=6)||(result.blackberry&&result.version>=10.1)||(result.chromium&&result.version>=20)){result.a=t;}
else if((result.msie&&result.version<10)||(result.chrome&&result.version<20)||(result.firefox&&result.version<20.0)||(result.safari&&result.version<6)||(result.opera&&result.version<10.0)||(result.ios&&result.osversion&&result.osversion.split(".")[0]<6)||(result.chromium&&result.version<20)){result.c=t}else result.x=t
return result}
var bowser=detect(typeof navigator!=='undefined'?navigator.userAgent:'')
bowser.test=function(browserList){for(var i=0;i<browserList.length;++i){var browserItem=browserList[i];if(typeof browserItem==='string'){if(browserItem in bowser){return true;}}}
return false;}
function getVersionPrecision(version){return version.split(".").length;}
function map(arr,iterator){var result=[],i;if(Array.prototype.map){return Array.prototype.map.call(arr,iterator);}
for(i=0;i<arr.length;i++){result.push(iterator(arr[i]));}
return result;}
function compareVersions(versions){var precision=Math.max(getVersionPrecision(versions[0]),getVersionPrecision(versions[1]));var chunks=map(versions,function(version){var delta=precision-getVersionPrecision(version);version=version+new Array(delta+1).join(".0");return map(version.split("."),function(chunk){return new Array(20-chunk.length).join("0")+chunk;}).reverse();});while(--precision>=0){if(chunks[0][precision]>chunks[1][precision]){return 1;}
else if(chunks[0][precision]===chunks[1][precision]){if(precision===0){return 0;}}else{return-1;}}}
function isUnsupportedBrowser(minVersions,strictMode,ua){var _bowser=bowser;if(typeof strictMode==='string'){ua=strictMode;strictMode=void(0);}
if(strictMode===void(0)){strictMode=false;}
if(ua){_bowser=detect(ua);}
var version=""+_bowser.version;for(var browser in minVersions){if(minVersions.hasOwnProperty(browser)){if(_bowser[browser]){return compareVersions([version,minVersions[browser]])<0;}}}
return strictMode;}
function check(minVersions,strictMode,ua){return!isUnsupportedBrowser(minVersions,strictMode,ua);}
bowser.isUnsupportedBrowser=isUnsupportedBrowser;bowser.compareVersions=compareVersions;bowser.check=check;bowser._detect=detect;return bowser});(function($){UABBTrigger={triggerHook:function(hook,args){$('body').trigger('uabb-trigger.'+hook,args);},addHook:function(hook,callback){$('body').on('uabb-trigger.'+hook,callback);},removeHook:function(hook,callback){$('body').off('uabb-trigger.'+hook,callback);},};})(jQuery);jQuery(document).ready(function($){if(typeof bowser!=='undefined'&&bowser!==null){var uabb_browser=bowser.name,uabb_browser_v=bowser.version,uabb_browser_class=uabb_browser.replace(/\s+/g,'-').toLowerCase(),uabb_browser_v_class=uabb_browser_class+parseInt(uabb_browser_v);$('html').addClass(uabb_browser_class).addClass(uabb_browser_v_class);}
$('.uabb-row-separator').parents('html').css('overflow-x','hidden');});jQuery(function($){$(function(){$('.fl-node-3azrhte4y81w .fl-photo-img').on('mouseenter',function(e){$(this).data('title',$(this).attr('title')).removeAttr('title');}).on('mouseleave',function(e){$(this).attr('title',$(this).data('title')).data('title',null);});});window._fl_string_to_slug_regex='a-zA-Z0-9';});jQuery(function($){$(function(){$('.fl-node-8nhiwmd9ug0v .fl-photo-img').on('mouseenter',function(e){$(this).data('title',$(this).attr('title')).removeAttr('title');}).on('mouseleave',function(e){$(this).attr('title',$(this).data('title')).data('title',null);});});window._fl_string_to_slug_regex='a-zA-Z0-9';});jQuery(function($){$(function(){$('.fl-node-4mxzvtnyec83 .fl-photo-img').on('mouseenter',function(e){$(this).data('title',$(this).attr('title')).removeAttr('title');}).on('mouseleave',function(e){$(this).attr('title',$(this).data('title')).data('title',null);});});window._fl_string_to_slug_regex='a-zA-Z0-9';});jQuery(function($){$(function(){$('.fl-node-6mgfj1t8z5wi .fl-photo-img').on('mouseenter',function(e){$(this).data('title',$(this).attr('title')).removeAttr('title');}).on('mouseleave',function(e){$(this).attr('title',$(this).data('title')).data('title',null);});});window._fl_string_to_slug_regex='a-zA-Z0-9';});
!function(name,definition){if(typeof module!='undefined'&&module.exports)module.exports=definition()
else if(typeof define=='function'&&define.amd)define(name,definition)
else this[name]=definition()}('bowser',function(){var t=true
function detect(ua){function getFirstMatch(regex){var match=ua.match(regex);return(match&&match.length>1&&match[1])||'';}
function getSecondMatch(regex){var match=ua.match(regex);return(match&&match.length>1&&match[2])||'';}
var iosdevice=getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase(),likeAndroid=/like android/i.test(ua),android=!likeAndroid&&/android/i.test(ua),nexusMobile=/nexus\s*[0-6]\s*/i.test(ua),nexusTablet=!nexusMobile&&/nexus\s*[0-9]+/i.test(ua),chromeos=/CrOS/.test(ua),silk=/silk/i.test(ua),sailfish=/sailfish/i.test(ua),tizen=/tizen/i.test(ua),webos=/(web|hpw)os/i.test(ua),windowsphone=/windows phone/i.test(ua),windows=!windowsphone&&/windows/i.test(ua),mac=!iosdevice&&!silk&&/macintosh/i.test(ua),linux=!android&&!sailfish&&!tizen&&!webos&&/linux/i.test(ua),edgeVersion=getFirstMatch(/edge\/(\d+(\.\d+)?)/i),versionIdentifier=getFirstMatch(/version\/(\d+(\.\d+)?)/i),tablet=/tablet/i.test(ua),mobile=!tablet&&/[^-]mobi/i.test(ua),xbox=/xbox/i.test(ua),result
if(/opera|opr|opios/i.test(ua)){result={name:'Opera',opera:t,version:versionIdentifier||getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}}
else if(/coast/i.test(ua)){result={name:'Opera Coast',coast:t,version:versionIdentifier||getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}}
else if(/yabrowser/i.test(ua)){result={name:'Yandex Browser',yandexbrowser:t,version:versionIdentifier||getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}}
else if(/ucbrowser/i.test(ua)){result={name:'UC Browser',ucbrowser:t,version:getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/mxios/i.test(ua)){result={name:'Maxthon',maxthon:t,version:getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/epiphany/i.test(ua)){result={name:'Epiphany',epiphany:t,version:getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/puffin/i.test(ua)){result={name:'Puffin',puffin:t,version:getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}}
else if(/sleipnir/i.test(ua)){result={name:'Sleipnir',sleipnir:t,version:getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(/k-meleon/i.test(ua)){result={name:'K-Meleon',kMeleon:t,version:getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}}
else if(windowsphone){result={name:'Windows Phone',windowsphone:t}
if(edgeVersion){result.msedge=t
result.version=edgeVersion}else{result.msie=t
result.version=getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i)}}
else if(/msie|trident/i.test(ua)){result={name:'Internet Explorer',msie:t,version:getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i)}}else if(chromeos){result={name:'Chrome',chromeos:t,chromeBook:t,chrome:t,version:getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}}else if(/chrome.+? edge/i.test(ua)){result={name:'Microsoft Edge',msedge:t,version:edgeVersion}}
else if(/vivaldi/i.test(ua)){result={name:'Vivaldi',vivaldi:t,version:getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i)||versionIdentifier}}
else if(sailfish){result={name:'Sailfish',sailfish:t,version:getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}}
else if(/seamonkey\//i.test(ua)){result={name:'SeaMonkey',seamonkey:t,version:getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i)}}
else if(/firefox|iceweasel|fxios/i.test(ua)){result={name:'Firefox',firefox:t,version:getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)}
if(/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)){result.firefoxos=t}}
else if(silk){result={name:'Amazon Silk',silk:t,version:getFirstMatch(/silk\/(\d+(\.\d+)?)/i)}}
else if(/phantom/i.test(ua)){result={name:'PhantomJS',phantom:t,version:getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i)}}
else if(/slimerjs/i.test(ua)){result={name:'SlimerJS',slimer:t,version:getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i)}}
else if(/blackberry|\bbb\d+/i.test(ua)||/rim\stablet/i.test(ua)){result={name:'BlackBerry',blackberry:t,version:versionIdentifier||getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}}
else if(webos){result={name:'WebOS',webos:t,version:versionIdentifier||getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)};if(/touchpad\//i.test(ua)){result.touchpad=t;}}
else if(/bada/i.test(ua)){result={name:'Bada',bada:t,version:getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i)};}
else if(tizen){result={name:'Tizen',tizen:t,version:getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||versionIdentifier};}
else if(/qupzilla/i.test(ua)){result={name:'QupZilla',qupzilla:t,version:getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||versionIdentifier}}
else if(/chromium/i.test(ua)){result={name:'Chromium',chromium:t,version:getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||versionIdentifier}}
else if(/chrome|crios|crmo/i.test(ua)){result={name:'Chrome',chrome:t,version:getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}}
else if(android){result={name:'Android',version:versionIdentifier}}
else if(/safari|applewebkit/i.test(ua)){result={name:'Safari',safari:t}
if(versionIdentifier){result.version=versionIdentifier}}
else if(iosdevice){result={name:iosdevice=='iphone'?'iPhone':iosdevice=='ipad'?'iPad':'iPod'}
if(versionIdentifier){result.version=versionIdentifier}}
else if(/googlebot/i.test(ua)){result={name:'Googlebot',googlebot:t,version:getFirstMatch(/googlebot\/(\d+(\.\d+))/i)||versionIdentifier}}else{result={name:getFirstMatch(/^(.*)\/(.*) /),version:getSecondMatch(/^(.*)\/(.*) /)};}
if(!result.msedge&&/(apple)?webkit/i.test(ua)){if(/(apple)?webkit\/537\.36/i.test(ua)){result.name=result.name||"Blink"
result.blink=t}else{result.name=result.name||"Webkit"
result.webkit=t}
if(!result.version&&versionIdentifier){result.version=versionIdentifier}}else if(!result.opera&&/gecko\//i.test(ua)){result.name=result.name||"Gecko"
result.gecko=t
result.version=result.version||getFirstMatch(/gecko\/(\d+(\.\d+)?)/i)}
if(!result.msedge&&(android||result.silk)){result.android=t}else if(iosdevice){result[iosdevice]=t
result.ios=t}else if(mac){result.mac=t}else if(xbox){result.xbox=t}else if(windows){result.windows=t}else if(linux){result.linux=t}
var osVersion='';if(result.windowsphone){osVersion=getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);}else if(iosdevice){osVersion=getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i);osVersion=osVersion.replace(/[_\s]/g,'.');}else if(android){osVersion=getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i);}else if(result.webos){osVersion=getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);}else if(result.blackberry){osVersion=getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i);}else if(result.bada){osVersion=getFirstMatch(/bada\/(\d+(\.\d+)*)/i);}else if(result.tizen){osVersion=getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i);}
if(osVersion){result.osversion=osVersion;}
var osMajorVersion=osVersion.split('.')[0];if(tablet||nexusTablet||iosdevice=='ipad'||(android&&(osMajorVersion==3||(osMajorVersion>=4&&!mobile)))||result.silk){result.tablet=t}else if(mobile||iosdevice=='iphone'||iosdevice=='ipod'||android||nexusMobile||result.blackberry||result.webos||result.bada){result.mobile=t}
if(result.msedge||(result.msie&&result.version>=10)||(result.yandexbrowser&&result.version>=15)||(result.vivaldi&&result.version>=1.0)||(result.chrome&&result.version>=20)||(result.firefox&&result.version>=20.0)||(result.safari&&result.version>=6)||(result.opera&&result.version>=10.0)||(result.ios&&result.osversion&&result.osversion.split(".")[0]>=6)||(result.blackberry&&result.version>=10.1)||(result.chromium&&result.version>=20)){result.a=t;}
else if((result.msie&&result.version<10)||(result.chrome&&result.version<20)||(result.firefox&&result.version<20.0)||(result.safari&&result.version<6)||(result.opera&&result.version<10.0)||(result.ios&&result.osversion&&result.osversion.split(".")[0]<6)||(result.chromium&&result.version<20)){result.c=t}else result.x=t
return result}
var bowser=detect(typeof navigator!=='undefined'?navigator.userAgent:'')
bowser.test=function(browserList){for(var i=0;i<browserList.length;++i){var browserItem=browserList[i];if(typeof browserItem==='string'){if(browserItem in bowser){return true;}}}
return false;}
function getVersionPrecision(version){return version.split(".").length;}
function map(arr,iterator){var result=[],i;if(Array.prototype.map){return Array.prototype.map.call(arr,iterator);}
for(i=0;i<arr.length;i++){result.push(iterator(arr[i]));}
return result;}
function compareVersions(versions){var precision=Math.max(getVersionPrecision(versions[0]),getVersionPrecision(versions[1]));var chunks=map(versions,function(version){var delta=precision-getVersionPrecision(version);version=version+new Array(delta+1).join(".0");return map(version.split("."),function(chunk){return new Array(20-chunk.length).join("0")+chunk;}).reverse();});while(--precision>=0){if(chunks[0][precision]>chunks[1][precision]){return 1;}
else if(chunks[0][precision]===chunks[1][precision]){if(precision===0){return 0;}}else{return-1;}}}
function isUnsupportedBrowser(minVersions,strictMode,ua){var _bowser=bowser;if(typeof strictMode==='string'){ua=strictMode;strictMode=void(0);}
if(strictMode===void(0)){strictMode=false;}
if(ua){_bowser=detect(ua);}
var version=""+_bowser.version;for(var browser in minVersions){if(minVersions.hasOwnProperty(browser)){if(_bowser[browser]){return compareVersions([version,minVersions[browser]])<0;}}}
return strictMode;}
function check(minVersions,strictMode,ua){return!isUnsupportedBrowser(minVersions,strictMode,ua);}
bowser.isUnsupportedBrowser=isUnsupportedBrowser;bowser.compareVersions=compareVersions;bowser.check=check;bowser._detect=detect;return bowser});(function($){UABBTrigger={triggerHook:function(hook,args){$('body').trigger('uabb-trigger.'+hook,args);},addHook:function(hook,callback){$('body').on('uabb-trigger.'+hook,callback);},removeHook:function(hook,callback){$('body').off('uabb-trigger.'+hook,callback);},};})(jQuery);jQuery(document).ready(function($){if(typeof bowser!=='undefined'&&bowser!==null){var uabb_browser=bowser.name,uabb_browser_v=bowser.version,uabb_browser_class=uabb_browser.replace(/\s+/g,'-').toLowerCase(),uabb_browser_v_class=uabb_browser_class+parseInt(uabb_browser_v);$('html').addClass(uabb_browser_class).addClass(uabb_browser_v_class);}
$('.uabb-row-separator').parents('html').css('overflow-x','hidden');});(function($){$('.fl-node-60caf3995404b').each(function(){var $this=$(this);$this.find('.fl-button-lightbox').magnificPopup({type:'inline',items:{src:$this.find('.fl-button-lightbox-content')[0]},callbacks:{open:function(){var content=$(this.content),divWrap=$(content[0]).find('> div');divWrap.css('display','block');if(divWrap.find('form select').length>0){divWrap.find('form select').trigger('change');}
FLBuilderLayout.reloadSlider(content);FLBuilderLayout.resizeSlideshow();},},closeBtnInside:true,fixedContentPos:true,tLoading:'<i class="fas fa-spinner fa-spin fa-3x fa-fw"></i>',});});})(jQuery);
(r=>{FLTheme={init:function(){this._bind()},_bind:function(){var a=this;r(".navbar-toggle").on("click",this.navbarToggleClick),0!=r(".fl-page-bar-nav ul.sub-menu").length&&(this._setupDropDowns(),this._enableTopNavDropDowns()),0!=r(".fl-page-nav ul.sub-menu").length&&(r(window).on("resize.fl-page-nav-sub-menu",r.throttle(500,this._enablePageNavDropDowns)),this._setupDropDowns(),this._enablePageNavDropDowns()),0!=r(".fl-page-nav ul.menu").length&&(r(".fl-page-nav ul.menu").find(".menu-item").on("click",'> a[href*="#"]:not([href="#"])',this._setupCurrentNavItem),this._setupCurrentNavItem()),0!=r(".fl-page-nav-search").length&&r(".fl-page-nav-search a.fa-search").on("click",this._toggleNavSearch),0!=r(".fl-nav-vertical").length&&(r(window).on("resize",r.throttle(500,this._navVertical)),this._navVertical()),0!=r(".fl-fixed-width.fl-nav-vertical-right").length&&(r(window).on("resize",r.throttle(500,this._updateVerticalRightPos)),this._updateVerticalRightPos()),0!=r(".fl-page-nav-centered-inline-logo").length&&(r(window).on("resize",r.throttle(500,this._centeredInlineLogo)),this._centeredInlineLogo()),0!=r("body.fl-nav-left").length&&(r(window).on("resize",r.throttle(500,this._navLeft)),this._navLeft()),0!=r("body.fl-shrink").length&&0==r("html.fl-builder-edit").length&&(r(window).on("resize",r.throttle(500,this._shrinkHeaderEnable)),this._shrinkHeaderInit(),this._shrinkHeaderEnable()),0!=r(".fl-page-header-fixed").length&&(r(window).on("resize.fl-page-header-fixed",r.throttle(500,this._enableFixedHeader)),this._enableFixedHeader()),0!=r("body.fl-fixed-header").length&&0==r("html.fl-builder-edit").length&&(r(window).on("resize",r.throttle(500,this._fixedHeader)),this._fixedHeader()),0!=r("body.fl-scroll-header").length&&0==r("html.fl-builder-edit").length&&(r(window).on("resize",r.throttle(500,this._scrollHeader)),this._scrollHeader()),0!=r(".fl-page-header-primary").find("li.mega-menu").length&&(r(window).on("resize",r.throttle(500,this._megaMenu)),this._megaMenu()),0!=r(".fl-page-header-fixed").length&&(r(window).on("scroll.fl-mega-menu-on-scroll",r.throttle(500,this._megaMenuOnScroll)),r(window).on("resize.fl-mega-menu-on-scroll",r.throttle(500,this._megaMenuOnScroll))),0!=r("html.fl-builder-edit").length&&this._fixedHeadersWhenBuilderActive(),0!=r("body.fl-nav-mobile-offcanvas").length&&0!=!r("html.fl-builder-edit").length&&(r(window).on("resize",r.throttle(500,this._setupMobileNavLayout)),this._setupMobileNavLayout(),this._toggleMobileNavLayout()),r("body").on("click",this.closeMenu),r(".fl-theme-menu > li:last-child").on("focusout",function(e){void 0!==r(e.relatedTarget)[0]&&"nav-link"===r(e.relatedTarget)[0].className||a.closeMenu(e)}),0!=r(".fl-full-width.fl-footer-effect").length&&(r(window).on("resize",r.throttle(500,this._footerEffect)),this._footerEffect()),0!=r("body.fl-scroll-to-top").length&&this._toTop(),void 0!==r("body").magnificPopup&&this._enableLightbox(),void 0===r.fn.fitVids||r("body").hasClass("fl-builder")||this._enableFitVids(),FLTheme._navBackiosFix(),this._initSmoothScroll()},_isMobile:function(){return"ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent)},_initRetinaImages:function(){1<(window.devicePixelRatio||1)&&r("img[data-retina]").each(FLTheme._convertImageToRetina)},_convertImageToRetina:function(){var a=r(this),l=new Image,e=a.attr("src"),n=a.data("retina");if(void 0===(e=void 0===e?a.data("cfsrc"):e))return!1;var t=e.split(".").pop();""!=n&&(l.onload=function(){var e=l.width;l.height;"svg"==t&&(e=a.width(),a.height()),a.width(e),a.attr("src",n)},l.src=e)},_initMobileHeaderLogo:function(){this._enableMobileLogo(),r(window).on("resize",r.proxy(this._enableMobileLogo,this))},_enableMobileLogo:function(){var e,a=r(window),l=r(".fl-page-header-logo").find("img[data-mobile]"),n=null,t=null;0!==l.length&&r(l).each(function(){t=new Image,n=r(this),src=n.attr("src"),width=n.data("width"),height=n.data("height"),e=n.data("mobile"),mobileWidth=n.data("mobile-width"),mobileHeight=n.data("mobile-height"),n.attr("src",""),n.attr("data-src",src),a.width()<window.themeopts.mobile_breakpoint?""!=e&&(t.onload=function(){n.attr("src",e),n.attr("width",mobileWidth),n.attr("height",mobileHeight),n.css("width","")},t.src=src,n.show()):void 0!==n.data("src")&&(n.attr("src",n.data("src")),n.attr("width",width),n.attr("height",height),n.css("width",width))})},navbarToggleClick:function(e){var a,l=r("body").hasClass("fl-nav-mobile-offcanvas")?"flyout":"dropdown";"dropdown"==l?((a=r(e.target).closest(".fl-page-nav").find(".fl-page-nav-collapse")).toggleClass("collapse"),a.toggleClass("in")):"flyout"==l&&r(".fl-page").toggleClass("fl-nav-offcanvas-active"),e.stopPropagation()},closeMenu:function(e){var a=r("body").hasClass("fl-nav-mobile-offcanvas")?"flyout":"dropdown",l=r(".fl-page-nav-collapse").hasClass("in"),n=r(".fl-page").hasClass("fl-nav-offcanvas-active"),t=r(e.target).is(".mega-toggle-animated-inner, .mega-menu-toggle-animated-block, .mega-toggle-animated-box, .mega-toggle-blocks-right");void 0===e||void 0===e.target||t||("dropdown"==a&&l?r(".navbar-collapse.in").closest(".fl-page-nav").find(".navbar-toggle").trigger("click"):"flyout"==a&&n&&r(".fl-offcanvas-close").trigger("click"))},_setupDropDowns:function(){r("ul.sub-menu").each(function(){r(this).closest("li").find("a").first().attr("aria-haspopup","true")})},_enableTopNavDropDowns:function(){var e=r(".fl-page-bar-nav"),a=e.find(" > li"),e=e.find("> li").has("> ul.sub-menu").find(".fl-submenu-toggle-icon");!FLTheme._isMobile()||!1!==/iPhone|iPad/i.test(navigator.userAgent)?a.hover(FLTheme._navItemMouseover,FLTheme._navItemMouseout):(a.hover(function(){},FLTheme._navItemMouseout),e.on("click",FLTheme._navSubMenuToggleClick))},_navBackiosFix:function(){!1!==(ipad=null!==navigator.userAgent.match("iPhone|iPad")&&0<r(".menu-item-has-children").length)&&(window.onpageshow=function(e){e.persisted&&window.location.reload()})},_initSmoothScroll:function(){var e;"undefined"==typeof FLBuilderLayout||void 0!==window.themeopts.smooth&&"disabled"===window.themeopts.smooth||(e=(e=location.hash).replace(/(:|\!|\.|\[|\]|,|=|@|\/)/g,"\\$1"))&&r(e).length&&setTimeout(function(){window.scrollTo(0,0),FLBuilderLayout._scrollToElement(r(e))},1)},_enablePageNavDropDowns:function(){r(".fl-page-header").each(FLTheme._enablePageNavDropDown)},_enablePageNavDropDown:function(){var e=r(this).find(".fl-page-nav .fl-page-nav-collapse"),a=e.find("ul li"),l=e.find("li").has("> ul.sub-menu").find("> a"),n=(e.find("li").has("> ul.sub-menu").find(".fl-submenu-toggle-icon"),e.find("> ul > li").has("ul.sub-menu"));r(".fl-page-nav .navbar-toggle").is(":visible")?(a.off("mouseenter mouseleave"),(n=r("body").hasClass("fl-submenu-toggle")?e.find("> ul li").has("ul.sub-menu"):n).find("> a").off().on("click",FLTheme._navItemClickMobile),n.find(".fl-submenu-toggle-icon").off().on("click",FLTheme._navItemClickMobile),e.find(".menu").on("click",'.menu-item > a[href*="#"]',FLTheme._toggleForMobile),l.off("click",FLTheme._navSubMenuToggleClick)):(e.find("a").off("click",FLTheme._navItemClickMobile),e.find("a").off("click",FLTheme._toggleForMobile),e.find(".fl-submenu-toggle-icon").off("click",FLTheme._navItemClickMobile),e.removeClass("in").addClass("collapse"),a.removeClass("fl-mobile-sub-menu-open"),a.find("a").width(0).width("auto"),FLTheme._isMobile()?(a.hover(function(){},FLTheme._navItemMouseout),l.on("click",FLTheme._navSubMenuToggleClick)):(a.keydown(function(e){9===e.keyCode&&(el=r(this),(focused=el.find(":focus")).parent().is(":last-child")&&(sub=focused.parent().find("ul.sub-menu").first(),mega=focused.parent().parent().parent().parent().parent().hasClass("mega-menu"),mega_last=focused.parent().parent().parent().is(":last-child"),0<sub.length?sub.trigger("mouseenter"):mega&&!mega_last||el.trigger("mouseleave")),(parent=focused.closest("ul.sub-menu").parent()).hasClass("fl-sub-menu-open")||focused.trigger("mouseenter"))}),a.hover(FLTheme._navItemMouseover,FLTheme._navItemMouseout)))},_navItemClickMobile:function(e){var a,l=r(this).closest(".fl-page-nav-collapse"),n=r(this).closest("li"),t=r(this).attr("href"),i=n.find("ul.sub-menu"),o=r(e.target).hasClass("fl-submenu-toggle-icon"),s=null;t&&"#"!==t&&(a=t.split("#")[1],0<r("body").find("#"+a).length)&&n.hasClass("fl-mobile-sub-menu-open")&&((el=r(this).parent().closest("nav").find(".navbar-toggle")).trigger("click"),"undefined"!=typeof FLBuilderLayout)&&void 0===window.themeopts.smooth&&"disabled"!==window.themeopts.smooth&&setTimeout(function(){window.scrollTo(0,0),FLBuilderLayout._scrollToElement(r("#"+a))},1),("#"==t||o)&&n.hasClass("fl-mobile-sub-menu-open")?(e.preventDefault(),n.removeClass("fl-mobile-sub-menu-open"),i.hide()):n.hasClass("fl-mobile-sub-menu-open")||(e.preventDefault(),n.addClass("fl-mobile-sub-menu-open"),o&&0===r(".fl-submenu-toggle").length&&(s=i.find("li.menu-item-has-children")).addClass("fl-mobile-sub-menu-open"),i.fadeIn(200)),0!=r(".fl-nav-collapse-menu").length&&l.find("li.fl-mobile-sub-menu-open").not(r(this).parents(".fl-mobile-sub-menu-open")).not(s).removeClass("fl-mobile-sub-menu-open").find("ul.sub-menu").hide(),e.stopPropagation()},_setupCurrentNavItem:function(e){var a=r(".fl-page-nav .navbar-nav"),e=void 0!==e?r(e.target).prop("hash"):window.location.hash,l=(e=e.replace(/(:|\!|\.|\[|\]|,|=|@|\/)/g,"\\$1")).length?a.find("a[href*=\\"+e+"]:not([href=\\#])"):null,a=a.closest(".fl-page-nav").find(".fl-offcanvas-close");null!=l&&0<r("body").find(e).length&&(r(".current-menu-item").removeClass("current-menu-item"),l.parent().addClass("current-menu-item"),a)&&a.trigger("click")},_navItemMouseover:function(){var e,a,l,n,t,i,o;0===r(this).find("ul.sub-menu").length||(a=(e=r(this)).parent(),n=(l=e.find("ul.sub-menu")).width(),t=r(window).width(),(o=i=0)!==e.closest(".fl-sub-menu-right").length?e.addClass("fl-sub-menu-right"):r("body").hasClass("rtl")?(a.is("ul.sub-menu")?a.offset().left-n:e.offset().left-n)<=0&&e.addClass("fl-sub-menu-right"):t<(a.is("ul.sub-menu")?a.offset().left+2*n:e.offset().left+n)&&e.addClass("fl-sub-menu-right"),e.addClass("fl-sub-menu-open"),e.hasClass("hide-heading")||(l.hide(),l.stop().fadeIn(200)),FLTheme._hideNavSearch(),0===e.closest(".fl-page-nav-collapse").length)||!e.hasClass("mega-menu")||0<e.find(".mega-menu-spacer").length||(l.first().before('<div class="mega-menu-spacer"></div>'),i=e.find(".mega-menu-spacer").offset().top,o=l.first().offset().top,e.find(".mega-menu-spacer").css("padding-top",Math.floor(parseInt(o-i))+"px"))},_navItemMouseout:function(){var e=r(this),a=e.find("ul.sub-menu");e.hasClass("hide-heading")?FLTheme._navItemMouseoutComplete():a.stop().fadeOut({duration:200,done:FLTheme._navItemMouseoutComplete})},_navItemMouseoutComplete:function(){var e=r(this).parent();e.removeClass("fl-sub-menu-open"),e.removeClass("fl-sub-menu-right"),0<e.find(".mega-menu-spacer").length&&e.find(".mega-menu-spacer").remove(),r(this).show()},_navSubMenuToggleClick:function(e){var a=r(this).closest("li").eq(0);a.hasClass("fl-sub-menu-open")||(FLTheme._navItemMouseover.apply(a[0]),e.preventDefault())},_toggleForMobile:function(e){var a=r(".fl-page-nav .fl-page-nav-collapse"),l=r(this).attr("href"),n=r(this).closest("li").hasClass("menu-item-has-children");"#"!==l&&(l=l.split("#")[1],0<r("body").find("#"+l).length)&&!n&&(r.isFunction(a.collapse)?a.collapse("hide"):(el=r(this).parent().closest("nav").find(".navbar-toggle")).trigger("click"))},_toggleNavSearch:function(e){var a=r(".fl-page-nav-search form");e.preventDefault(),a.is(":visible")?a.stop().fadeOut(200):(a.stop().fadeIn(200),r("body").on("click.fl-page-nav-search",FLTheme._hideNavSearch),r(".fl-page-nav-search .fl-search-input").focus())},_hideNavSearch:function(e){var a=r(".fl-page-nav-search form");void 0!==e&&0<r(e.target).closest(".fl-page-nav-search").length||(a.stop().fadeOut(200),r("body").off("click.fl-page-nav-search"))},_navVertical:function(){r(window).width()>=window.themeopts.medium_breakpoint&&r(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always")&&(r("body").toggleClass("fl-nav-vertical"),r("body").hasClass("fl-nav-vertical-left")&&r("body").toggleClass("fl-nav-vertical-left"),r("body").hasClass("fl-nav-vertical-right"))&&r("body").toggleClass("fl-nav-vertical-right")},_updateVerticalRightPos:function(){var e=(r(window).width()-r(".fl-page").width())/2;r(".fl-page-header-vertical").css("right",e)},_navLeft:function(){var e=r(window);(e.width()<window.themeopts.medium_breakpoint||r(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always"))&&r(".fl-page-header-primary .fl-page-logo-wrap").insertBefore(".fl-page-header-primary .fl-page-nav-col"),e.width()>=window.themeopts.medium_breakpoint&&!r(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always")&&r(".fl-page-header-primary .fl-page-nav-col").insertBefore(".fl-page-header-primary .fl-page-logo-wrap"),0==r(".fl-page-header-fixed").length||r(".fl-page-header-fixed").hasClass("fl-page-nav-toggle-visible-always")||r(".fl-page-header-fixed .fl-page-fixed-nav-wrap").insertBefore(".fl-page-header-fixed .fl-page-logo-wrap")},_shrinkHeaderInit:function(){var n=r(window).scrollTop(),t=r(".fl-page-header");r("body").addClass("fl-shrink-header-enabled"),"scrollRestoration"in history&&(history.scrollRestoration="manual"),r(".fl-page-header-logo").imagesLoaded(function(){var e=r(".fl-logo-img"),a=r(".fl-page-header-logo:visible .fl-logo-img").first(),l=(a=a.length?a:e.first()).length?a.height():0;!(l=void 0!==a.data("origHeight")?parseInt(a.data("origHeight")):l)&&e.length&&(l=parseInt(e.first().data("origHeight"))||46),e.css("max-height",l),setTimeout(function(){r(".fl-page-header").addClass("fl-shrink-header-transition"),250<n?t.addClass("fl-shrink-header"):t.removeClass("fl-shrink-header")},100)})},_shrinkHeaderEnable:function(){var e,a,l,n,t,i=r(window);i.width()>=window.themeopts.medium_breakpoint?(a=(e=r(".fl-page-header")).outerHeight(),(t=n=0)!=(l=r(".fl-page-bar")).length?(t=(n+=l.outerHeight())+a,0!=r("body.admin-bar").length&&(n+=32),e.css("top",n)):t=a,0<e.prevAll(".fl-builder-content").length&&(FLTheme._initThemerLayoutFix(),t=l.outerHeight()),0===r(".fl-header-padding-top-custom").length&&r(".fl-page").css("padding-top",t),r(i).on("scroll.fl-shrink-header",FLTheme._shrinkHeader)):(r(".fl-page-header").css("top",0),r(".fl-page").css("padding-top",0),r(i).off("scroll.fl-shrink-header"))},_shrinkHeader:function(){var l=r(this).scrollTop(),n=r(".fl-page-header"),t=null;r(".fl-page-header-logo").imagesLoaded(function(){t=r(".fl-logo-img");var e=r(".fl-page-header-logo:visible .fl-logo-img").first(),a=(e=e.length?e:t.first()).length?e.height():t.first().data("origHeight")||46;void 0===t.data("origHeight")&&(t.data("origHeight",a),e.length)&&!e.is(t.first())&&e.data("origHeight",a),250<l?n.addClass("fl-shrink-header"):n.removeClass("fl-shrink-header"),void 0!==n.data("original-top")&&FLTheme._fixThemerLayoutOnScroll()})},_fixedHeader:function(){var e=r(window),a=r(".fl-page-header"),l=0,n=0,t=r(".fl-page-bar"),i=0;e.width()>=window.themeopts.medium_breakpoint?(l=a.outerHeight(),0!=t.length?(n=(i=t.outerHeight())+l,0!=r("body.admin-bar").length&&(i+=32),r("html.fl-builder-edit").length,a.css("top",i)):n=l,0<a.prevAll(".fl-builder-content").length&&(FLTheme._initThemerLayoutFix(),n=t.outerHeight(),r(e).on("scroll.fl-fixed-header",FLTheme._fixThemerLayoutOnScroll)),0===r("body.fl-scroll-header").length&&0===r(".fl-header-padding-top-custom").length&&r(".fl-page").css("padding-top",n),r(e).trigger("scroll")):(r(".fl-page-header").css("top",0),r(".fl-page").css("padding-top",0),r(e).off("scroll.fl-fixed-header"))},_enableFixedHeader:function(){var e=r(window);e.width()<window.themeopts.medium_breakpoint?(e.off("scroll.fl-page-header-fixed"),r(".fl-page-header-fixed").hide()):e.on("scroll.fl-page-header-fixed",FLTheme._toggleFixedHeader)},_initThemerLayoutFix:function(){var e=r(".fl-page-header"),a=e.prevAll(".fl-builder-content"),l=0;a.length&&(e.css("position","initial"),r.each(a,function(){l+=r(this).outerHeight()}),e.data("original-top",l))},_fixThemerLayoutOnScroll:function(){var e=r(window).scrollTop(),a=r(".fl-page-header"),l=a.data("original-top");void 0!==l&&(l<=e?a.css("position","fixed"):a.css("position","initial"),"undefined"!=typeof Waypoint)&&Waypoint.refreshAll()},_toggleFixedHeader:function(){var e=r(window),a=r(".fl-page-header-fixed"),l=a.is(":visible"),n=r(".fl-page-header-primary"),t=!1;(t=0===n.length?200<e.scrollTop():e.scrollTop()>n.height()+n.offset().top)&&!l?a.stop().fadeIn(200):!t&&l&&a.stop().hide()},_centeredInlineLogo:function(){var e=r(window),a=r(".fl-page-nav-centered-inline-logo .fl-page-header-logo").eq(0),l=r(".fl-logo-centered-inline .fl-page-header-logo"),n=r(".fl-page-nav-centered-inline-logo .fl-page-nav .navbar-nav"),t=n.children("li").length,i=Math.round(t/2)-1,o=r(".fl-page-nav-centered-inline-logo .fl-page-header-row");e.width()>=window.themeopts.medium_breakpoint&&l.length<1&&!r(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always")&&(a.hasClass("fl-inline-logo-left")&&t%2!=0?n.children("li:nth("+i+")").before('<li class="fl-logo-centered-inline"></li>'):n.children("li:nth("+i+")").after('<li class="fl-logo-centered-inline"></li>'),n.children(".fl-logo-centered-inline").append(a)),e.width()<window.themeopts.medium_breakpoint&&(r(".fl-logo-centered-inline").remove(),o.children(".fl-page-header-logo").length<1)&&o.prepend(l)},_scrollHeader:function(){var e=r(window),a=null,l=r(".fl-page-header-primary").data("fl-distance"),n=0,a=0!=r(".fl-page-bar").length?r(".fl-page-header-primary, .fl-page-bar"):r(".fl-page-header-primary");e.width()>=window.themeopts.medium_breakpoint?e.on("scroll.fl-show-header-on-scroll",function(){r(this).scrollTop()>l?a.addClass("fl-show"):(a.removeClass("fl-show"),r(".fl-responsive-nav-enabled").length&&(n=2*r(".fl-page-header-primary").height(),0!=r(".fl-page-bar").length&&(n+=r(".fl-page-bar").height()),void 0!==r(".fl-nav-offcanvas-collapse").css("top"))&&(n+=parseInt(r(".fl-nav-offcanvas-collapse").css("top"))),r(".fl-nav-offcanvas-active").length&&0<n&&r(".fl-nav-offcanvas-collapse").css({transform:"translateY("+n+"px)","-ms-transform":"translateY("+n+"px)","-webkit-transform":"translateY("+n+"px)"}))}):(e.off("scroll.fl-show-header-on-scroll"),r(".fl-nav-offcanvas-collapse").css("transform",""))},_megaMenu:function(){r(window);var e=r(".fl-page-header"),a=e.find(".fl-page-header-container").outerWidth(),l=null,n=0;e.find("li.mega-menu, li.mega-menu-disabled").each(function(){l=r(this),n=l.find("> ul.sub-menu").outerWidth(),void 0!==l.data("megamenu-width")&&(n=l.data("megamenu-width")),l.hasClass("mega-menu")&&a<n||FLTheme._isResponsiveNavEnabled()?(l.data("megamenu-width",n),FLTheme._isResponsiveNavEnabled()&&l.find("> ul.sub-menu").css("display","block"),l.removeClass("mega-menu"),l.hasClass("mega-menu-disabled")||l.addClass("mega-menu-disabled")):l.hasClass("mega-menu-disabled")&&n<=a&&(l.find("> ul.sub-menu").css("display",""),l.removeClass("mega-menu-disabled"),l.hasClass("mega-menu")||l.addClass("mega-menu"),l.addClass("mega-menu-items-"+l.children("ul").children("li").length))})},_megaMenuOnScroll:function(){var e=r(window),a=r(".fl-page-header-fixed"),l=a.find(".fl-page-header-container"),n=a.is(":visible"),t=null,i=null;n&&(a.find("li.mega-menu").each(function(){t=r(this),i=t.find("> ul.sub-menu"),l.outerWidth()<i.outerWidth()?(t.removeClass("mega-menu"),t.hasClass("mega-menu-disabled")||t.addClass("mega-menu-disabled")):(t.removeClass("mega-menu-disabled"),t.hasClass("mega-menu")||t.addClass("mega-menu"),t.addClass("mega-menu-items-"+t.children("ul").children("li").length))}),e.off("scroll.fl-mega-menu-on-scroll"),e.off("resize.fl-mega-menu-on-scroll"))},_fixedHeadersWhenBuilderActive:function(){0!=r("body.fl-shrink").length&&r("body").removeClass("fl-shrink"),0!=r("body.fl-fixed-header").length&&r("body").removeClass("fl-fixed-header"),0!=r("body.fl-scroll-header").length&&r("body").removeClass("fl-scroll-header")},_setupMobileNavLayout:function(){var e=r(window),a=r("button.navbar-toggle"),l=r(".fl-page-header:not(.fl-page-header-fixed)"),n=l.find(".fl-page-nav-collapse"),t=r(".fl-page"),i=0,o=(e.height(),r("body").hasClass("fl-offcanvas-push-opacity-left")||r("body").hasClass("fl-offcanvas-push-opacity-right"));l.find(".fl-page-header-logo").offset();FLTheme._isResponsiveNavEnabled()&&a.is(":visible")?(r("body").addClass("fl-responsive-nav-enabled"),a.attr("data-toggle","offcanvas"),n.addClass("fl-nav-offcanvas-collapse"),0===n.find(".fl-button-close").length&&n.prepend('<div class="fl-button-close"><button class="fl-offcanvas-close" aria-label="Close Menu"><i class="fas fa-times"></i></button></div>'),o&&0===r(".fl-offcanvas-opacity").length&&t.append('<div class="fl-offcanvas-opacity"></div>'),t.height()>e.height()&&(r(document).height(),0!=r("body.fl-shrink").length)&&l.height(),0!=r("body.admin-bar").length&&(i=r("#wpadminbar").height()),0==r(".fl-page-bar").length||r(".fl-page-header").hasClass("fl-page-nav-toggle-button")||(i+=r(".fl-page-bar").height()+1),r(".fl-scroll-header").length&&e.width()>=window.themeopts.medium_breakpoint?n.css("top",t.offset().top-i+"px"):n.css("top","")):(a.attr("data-toggle","collapse"),n.removeClass("fl-nav-offcanvas-collapse"),n.find(".fl-button-close").remove(),n.css("height",""),n.css("top",""),t.removeClass("fl-nav-offcanvas-active"),r("body").find(".fl-offcanvas-opacity").remove(),r("body").removeClass("fl-responsive-nav-enabled"))},_toggleMobileNavLayout:function(){r(".fl-page-nav").on("click",".fl-offcanvas-close",function(e){r(".fl-page").toggleClass("fl-nav-offcanvas-active"),e.stopPropagation()})},_footerEffect:function(){r(window).width()>=window.themeopts.mobile_breakpoint?r(".fl-page").css("margin-bottom",r(".fl-page-footer-wrap").height()):r(".fl-page").css("margin-bottom",0)},_toTop:function(){var e=r("#fl-to-top");e.each(function(){r(this).click(function(){return r("html,body").animate({scrollTop:0},"linear"),!1})}),r(window).scroll(function(){r(this).scrollTop()>window.themeopts.scrollTopPosition?e.fadeIn():e.fadeOut()})},_enableLightbox:function(){var e=r("body");"disabled"!==window.themeopts.lightbox&&(e.hasClass("fl-builder")||e.hasClass("woocommerce")||r(".fl-content a").filter(function(){return/\.(png|jpg|jpeg|gif|webp)(\?.*)?$/i.test(this.href)}).magnificPopup({closeBtnInside:!1,type:"image",gallery:{enabled:!0}}),e.hasClass("fl-builder")||e.hasClass("fl-theme-builder-singular"))&&!e.hasClass("woocommerce")&&r(".fl-rich-text a, .fl-module-fl-post-content a").filter(function(){return/\.(png|jpg|jpeg|gif|webp)(\?.*)?$/i.test(this.href)}).magnificPopup({closeBtnInside:!1,type:"image",gallery:{enabled:!0}})},_enableFitVids:function(){r(".fl-post-content").fitVids()},_isResponsiveNavEnabled:function(){var e=r(window);return enabled=!1,enabled=0<r(".fl-page-nav-toggle-visible-always").length||0<r(".fl-page-nav-toggle-visible-medium-mobile").length&&e.width()<window.themeopts.medium_breakpoint||0<r(".fl-page-nav-toggle-visible-mobile").length&&e.width()<window.themeopts.mobile_breakpoint?!0:enabled}},r(function(){FLTheme.init()}),0===r("html.fl-builder-edit").length&&FLTheme._initMobileHeaderLogo(),FLTheme._initRetinaImages()})(jQuery);
function frmFrontFormJS(){let jsErrors=[];function triggerCustomEvent(el,eventName,data){if(typeof window.CustomEvent!=="function")return;const event=new CustomEvent(eventName);event.frmData=data;el.dispatchEvent(event)}function getFieldId(field,fullID){let nameParts;let fieldId;let isRepeating=false;let fieldName="";if(field instanceof jQuery)field=field.get(0);fieldName=field.name;if(fieldName===undefined)fieldName="";if(fieldName===""){fieldName=field.getAttribute("data-name");if(fieldName===undefined)fieldName=
"";if(fieldName!==""&&fieldName)return fieldName;return 0}nameParts=fieldName.replace("item_meta[","").replace("[]","").split("]");if(nameParts.length<1)return 0;nameParts=nameParts.filter(function(n){return n!==""});fieldId=nameParts[0];if(nameParts.length===1)return fieldId;if(nameParts[1]==="[form"||nameParts[1]==="[row_ids")return 0;if(document.querySelector(`input[name="item_meta[${fieldId}][form]"]`)){fieldId=nameParts[2].replace("[","");isRepeating=true}if("other"===fieldId)if(isRepeating)fieldId=
nameParts[3].replace("[","");else fieldId=nameParts[1].replace("[","");if(fullID===true)if(fieldId===nameParts[0])fieldId=`${fieldId}-${nameParts[1].replace("[","")}`;else fieldId=`${fieldId}-${nameParts[0]}-${nameParts[1].replace("[","")}`;return fieldId}function disableSubmitButton($form){const form=$form instanceof jQuery?$form.get(0):$form;if(!form)return;form.querySelectorAll('input[type="submit"], input[type="button"], button[type="submit"], button.frm_save_draft').forEach(button=>button.disabled=
true)}function enableSubmitButton(form){form.querySelectorAll('input[type="submit"], input[type="button"], button[type="submit"]').forEach(button=>button.disabled=false)}function disableSaveDraft($form){const form=$form instanceof jQuery?$form.get(0):$form;if(!form)return;form.querySelectorAll("a.frm_save_draft").forEach(link=>link.style.pointerEvents="none")}function enableSaveDraft($form){const form=$form instanceof jQuery?$form.get(0):$form;if(!form)return;form.querySelectorAll(".frm_save_draft").forEach(saveDraftButton=>
{saveDraftButton.disabled=false;saveDraftButton.style.pointerEvents=""})}function validateForm(object){let errors=[];const vanillaJsObject="function"===typeof object.get?object.get(0):object;vanillaJsObject?.querySelectorAll(".frm_required_field").forEach(requiredField=>{const isVisible=requiredField.offsetParent!==null;if(!isVisible)return;requiredField.querySelectorAll("input, select, textarea").forEach(requiredInput=>{if(hasClass(requiredInput,"frm_optional")||hasClass(requiredInput,"ed_button"))return;
errors=checkRequiredField(requiredInput,errors)})});vanillaJsObject?.querySelectorAll("input,select,textarea").forEach(field=>{if(""===field.value){if("number"===field.type)checkValidity(field,errors);const isConfirmationField=field.name&&0===field.name.indexOf("item_meta[conf_");if(!isConfirmationField)return}validateFieldValue(field,errors,true);checkValidity(field,errors)});if(!hasInvisibleRecaptcha(object))errors=validateRecaptcha(object,errors);return errors}function checkValidity(field,errors){if("object"!==typeof field.validity||false!==field.validity.valid)return;const fieldID=getFieldId(field,true);if(errors[fieldID]===undefined)errors[fieldID]=getFieldValidationMessage(field,"data-invmsg");if("function"===typeof field.reportValidity)field.reportValidity()}function hasClass(element,targetClass){return element.classList&&element.classList.contains(targetClass)}function maybeValidateChange(field){if(field.type==="url")maybeAddHttpsToUrl(field);const form=field.closest("form");if(form&&hasClass(form,
"frm_js_validate"))validateField(field)}function maybeAddHttpsToUrl(field){const url=field.value;const matches=url.match(/^(https?|ftps?|mailto|news|feed|telnet):/);if(field.value!==""&&matches===null)field.value=`https://${url}`}function validateField(field){let errors;let key;errors=[];const fieldContainer=field.closest(".frm_form_field");if(!fieldContainer)return;if(hasClass(fieldContainer,"frm_required_field")&&!hasClass(field,"frm_optional"))errors=checkRequiredField(field,errors);if(errors.length<
1)validateFieldValue(field,errors,false);removeFieldError(fieldContainer);if(Object.keys(errors).length>0)for(key in errors)addFieldError(fieldContainer,key,errors)}function validateFieldValue(field,errors,onSubmit){if(field.type==="hidden");else if(field.type==="number")checkNumberField(field,errors);else if(field.type==="email")checkEmailField(field,errors,onSubmit);else if(field.type==="password")checkPasswordField(field,errors,onSubmit);else if(field.type==="url")checkUrlField(field,errors);else if(field.pattern!==null)checkPatternField(field,errors);if("tel"===field.type&&shouldCheckConfirmField(field,onSubmit))confirmField(field,errors);triggerCustomEvent(document,"frm_validate_field_value",{field,errors,onSubmit})}function checkRequiredField(field,errors){let tempVal;let i;let placeholder;let val="";let fieldID="";let fileID=field.getAttribute("data-frmfile");if(field.type==="hidden"&&fileID===null&&!isAppointmentField(field)&&!isInlineDatepickerField(field))return errors;if(field.type==="checkbox"||field.type==="radio")document.querySelectorAll(`input[name="${field.name}"]`).forEach(function(input){const requiredField=input.closest(".frm_required_field");if(!requiredField)return;const checkedInputs=requiredField.querySelectorAll("input:checked");checkedInputs.forEach(function(checkedInput){val=checkedInput.value})});else if(field.type==="file"||fileID){if(fileID===undefined){fileID=getFieldId(field,true);fileID=fileID.replace("file","")}if(errors[fileID]===undefined)val=getFileVals(fileID);fieldID=fileID}else{if(hasClass(field,
"frm_pos_none"))return errors;val=jQuery(field).val();if(val===null)val="";else if(typeof val!=="string"){tempVal=val;val="";for(i=0;i<tempVal.length;i++)if(tempVal[i]!=="")val=tempVal[i]}if(hasClass(field,"frm_other_input")){fieldID=getFieldId(field,false);if(val==="")field=document.getElementById(field.id.replace("-otext",""))}else fieldID=getFieldId(field,true);if("function"!==typeof fieldID.replace)fieldID=fieldID.toString();if(hasClass(field,"frm_time_select"))fieldID=fieldID.replace("-H","").replace("-m",
"");else if(isSignatureField(field)){if(val===""){const fieldContainer=field.closest(".frm_form_field");const outputField=fieldContainer?fieldContainer.querySelector(`[name="${field.getAttribute("name").replace("[typed]","[output]")}"]`):null;val=outputField?outputField.value:""}fieldID=fieldID.replace("-typed","")}placeholder=field.getAttribute("data-frmplaceholder");if(placeholder!==null&&val===placeholder)val=""}if(val===""){if(fieldID==="")fieldID=getFieldId(field,true);if(!(fieldID in errors))errors[fieldID]=
getFieldValidationMessage(field,"data-reqmsg")}return errors}function isSignatureField(field){const name=field.getAttribute("name");return"string"===typeof name&&"[typed]"===name.substr(-7)}function isAppointmentField(field){return hasClass(field,"ssa_appointment_form_field_appointment_id")}function isInlineDatepickerField(field){return"hidden"===field.type&&"_alt"===field.id.substr(-4)&&hasClass(field.nextElementSibling,"frm_date_inline")}function getFileVals(fileID){let val="";const fileFields=
document.querySelectorAll(`input[name="file${fileID}"], input[name="file${fileID}[]"], input[name^="item_meta[${fileID}]"]`);fileFields.forEach(function(field){if(val==="")val=field.value});return val}function checkUrlField(field,errors){let fieldID;const url=field.value;if(url!==""&&!/^http(s)?:\/\/(?:localhost|(?:[\da-z\.-]+\.[\da-z\.-]+))/i.test(url)){fieldID=getFieldId(field,true);if(!(fieldID in errors))errors[fieldID]=getFieldValidationMessage(field,"data-invmsg")}}function shouldCheckConfirmField(field,
onSubmit){if(onSubmit)return true;if(0===field.id.indexOf("field_conf_"))return true;return false}function checkEmailField(field,errors,onSubmit){const fieldID=getFieldId(field,true);const pattern=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i;if(""!==field.value&&pattern.test(field.value)===false)errors[fieldID]=getFieldValidationMessage(field,"data-invmsg");if(shouldCheckConfirmField(field,
onSubmit))confirmField(field,errors)}function checkPasswordField(field,errors,onSubmit){if(shouldCheckConfirmField(field,onSubmit))confirmField(field,errors)}function confirmField(field,errors){const fieldID=getFieldId(field,true);const strippedId=field.id.replace("conf_","");const strippedFieldID=fieldID.replace("conf_","");const confirmField=document.getElementById(strippedId.replace("field_","field_conf_"));if(confirmField===null||errors[`conf_${strippedFieldID}`]!==undefined)return;if(fieldID!==strippedFieldID){const firstField=document.getElementById(strippedId);const {value}=firstField;const confirmValue=confirmField.value;if(value!==confirmValue)errors[`conf_${strippedFieldID}`]=getFieldValidationMessage(confirmField,"data-confmsg")}else validateField(confirmField)}function checkNumberField(field,errors){let fieldID;const number=field.value;if(number!==""&&isNaN(number/1)!==false){fieldID=getFieldId(field,true);if(!(fieldID in errors))errors[fieldID]=getFieldValidationMessage(field,"data-invmsg")}}
function checkPatternField(field,errors){let fieldID;const text=field.value;let format=getFieldValidationMessage(field,"pattern");if(format!==""&&text!==""){fieldID=getFieldId(field,true);if(!(fieldID in errors))if("object"===typeof window.frmProForm&&"function"===typeof window.frmProForm.isIntlPhoneInput&&window.frmProForm.isIntlPhoneInput(field)){if(!window.frmProForm.validateIntlPhoneInput(field))errors[fieldID]=getFieldValidationMessage(field,"data-invmsg")}else{format=new RegExp(`^${format}$`,
"i");if(format.test(text)===false)errors[fieldID]=getFieldValidationMessage(field,"data-invmsg")}}}function setSelectPlaceholderColor(){const selects=document.querySelectorAll(".form-field select");const styleElement=document.querySelector(".with_frm_style");const textColorDisabled=styleElement?getComputedStyle(styleElement).getPropertyValue("--text-color-disabled").trim():"";if(!selects.length||!textColorDisabled)return;const changeSelectColor=function(select){if(select.options[select.selectedIndex]&&
hasClass(select.options[select.selectedIndex],"frm-select-placeholder"))select.style.setProperty("color",textColorDisabled,"important");else select.style.color=""};Array.prototype.forEach.call(selects,function(select){changeSelectColor(select);select.addEventListener("change",function(){changeSelectColor(select)})})}function hasInvisibleRecaptcha(object){if(isGoingToPrevPage(object))return false;const form=object instanceof jQuery?object.get(0):object;if(!form)return false;const recaptcha=form.querySelector('.frm-g-recaptcha[data-size="invisible"], .g-recaptcha[data-size="invisible"]');
if(recaptcha){const recaptchaID=recaptcha.dataset.rid;const alreadyChecked=grecaptcha.getResponse(recaptchaID);if(alreadyChecked.length===0)return recaptcha}return false}function executeInvisibleRecaptcha(invisibleRecaptcha){const recaptchaID=invisibleRecaptcha.dataset.rid;grecaptcha.reset(recaptchaID);grecaptcha.execute(recaptchaID)}function validateRecaptcha(form,errors){const formEl=form instanceof jQuery?form.get(0):form;if(!formEl)return errors;const recaptcha=formEl.querySelector(".frm-g-recaptcha");
if(!recaptcha)return errors;const recaptchaID=recaptcha.dataset.rid;let response;try{response=grecaptcha.getResponse(recaptchaID)}catch(e){if(formEl.querySelector('input[name="recaptcha_checked"]'))return errors;response=""}if(response.length===0){const fieldContainer=recaptcha.closest(".frm_form_field");if(fieldContainer&&fieldContainer.id){const fieldID=fieldContainer.id.replace("frm_field_","").replace("_container","");errors[fieldID]=""}}return errors}function getFieldValidationMessage(field,
messageType){let msg=field.getAttribute(messageType);if(null===msg)msg="";if(""!==msg&&shouldWrapErrorHtmlAroundMessageType(messageType))msg=wrapErrorHtml(msg,field);return msg}function wrapErrorHtml(msg,field){let errorHtml=field.getAttribute("data-error-html");if(null===errorHtml)return msg;errorHtml=errorHtml.replace(/\+/g,"%20");msg=decodeURIComponent(errorHtml).replace("[error]",msg);const fieldId=getFieldId(field,false);const split=fieldId.split("-");const fieldIdParts=field.id.split("_");fieldIdParts.shift();
split[0]=fieldIdParts.join("_");const errorKey=split.join("-");return msg.replace("[key]",errorKey)}function shouldWrapErrorHtmlAroundMessageType(type){return"pattern"!==type}function shouldJSValidate(object){if("function"===typeof object.get)object=object.get(0);let validate=hasClass(object,"frm_js_validate");if(validate&&typeof frmProForm!=="undefined"&&(frmProForm.savingDraft(object)||frmProForm.goingToPreviousPage(object)))validate=false;return validate}function getFormErrors(object,action){const fieldsets=
object.querySelectorAll(".frm_form_field");fieldsets.forEach(field=>field.classList.add("frm_doing_ajax"));const data=`${jQuery(object).serialize()}&action=frm_entries_${action}&nonce=${frm_js.nonce}`;const shouldTriggerEvent=object.classList.contains("frm_trigger_event_on_submit");const doRedirect=response=>{jQuery(document).trigger("frmBeforeFormRedirect",[object,response]);if(!response.openInNewTab){window.location=response.redirect;return}const newTab=window.open(response.redirect,"_blank");if(!newTab&&
response.fallbackMsg&&response.content)response.content=response.content.trim().replace(/(<\/div><\/div>)$/,` ${response.fallbackMsg}</div></div>`)};const success=function(response){const defaultResponse={content:"",errors:{},pass:false};if(response===null)response=defaultResponse;else{response=response.replace(/^\s+|\s+$/g,"");if(response.indexOf("{")===0)response=JSON.parse(response);else response=defaultResponse}if(response.redirect!==undefined){if(shouldTriggerEvent){triggerCustomEvent(object,
"frmSubmitEvent");return}if(response.delay)setTimeout(function(){doRedirect(response)},1E3*response.delay);else doRedirect(response)}if("string"===typeof response.content&&response.content!==""){if(shouldTriggerEvent){triggerCustomEvent(object,"frmSubmitEvent",{content:response.content});return}removeSubmitLoading(jQuery(object));if(frm_js.offset!=-1)frmFrontForm.scrollMsg(jQuery(object),false);const formIdInput=object.querySelector('input[name="form_id"]');const formID=formIdInput?formIdInput.value:
"";response.content=response.content.replace(/ frm_pro_form /g," frm_pro_form frm_no_hide ");const replaceContent=jQuery(object).closest(".frm_forms");removeAddedScripts(replaceContent,formID);const delay=maybeSlideOut(replaceContent,response.content);setTimeout(function(){afterFormSubmittedBeforeReplace(object,response);replaceContent.replaceWith(response.content);addUrlParam(response);if(typeof frmThemeOverride_frmAfterSubmit==="function"){const pageOrderInput=document.querySelector(`input[name="frm_page_order_${formID}"]`);
const pageOrder=pageOrderInput?pageOrderInput.value:"";const tempDiv=document.createElement("div");tempDiv.innerHTML=response.content;const formReturnedInput=tempDiv.querySelector('input[name="form_id"]');const formReturned=formReturnedInput?formReturnedInput.value:"";frmThemeOverride_frmAfterSubmit(formReturned,pageOrder,response.content,object)}afterFormSubmitted(object,response)},delay)}else if(Object.keys(response.errors).length){removeSubmitLoading(jQuery(object),"enable");let contSubmit=true;
removeAllErrors();let $fieldCont=null;for(const key in response.errors){const fieldContEl=object.querySelector(`#frm_field_${key}_container`);$fieldCont=fieldContEl?jQuery(fieldContEl):jQuery();if($fieldCont.length){if(!$fieldCont.is(":visible")){const inCollapsedSection=$fieldCont.closest(".frm_toggle_container");if(inCollapsedSection.length){let frmTrigger=inCollapsedSection.prev();if(!frmTrigger.hasClass("frm_trigger"))frmTrigger=frmTrigger.prev(".frm_trigger");frmTrigger.trigger("click")}}if($fieldCont.is(":visible")){addFieldError($fieldCont,
key,response.errors);contSubmit=false}}}object.querySelectorAll(".frm-g-recaptcha, .g-recaptcha, .h-captcha").forEach(function(captchaEl){const recaptchaID=captchaEl.dataset.rid;if(typeof grecaptcha!=="undefined"&&grecaptcha)if(recaptchaID)grecaptcha.reset(recaptchaID);else grecaptcha.reset();if(typeof hcaptcha!=="undefined"&&hcaptcha)hcaptcha.reset()});if(window.turnstile)object.querySelectorAll(".frm-cf-turnstile").forEach(turnstileField=>turnstileField.dataset.rid&&turnstile.reset(turnstileField.dataset.rid));
jQuery(document).trigger("frmFormErrors",[object,response]);fieldsets.forEach(field=>field.classList.remove("frm_doing_ajax"));scrollToFirstField(object);if(contSubmit)object.submit();else{object.insertAdjacentHTML("afterbegin",response.error_message);checkForErrorsAndMaybeSetFocus()}}else{showFileLoading(object);object.submit()}};const error=function(){object.querySelectorAll('input[type="submit"], input[type="button"]').forEach(button=>button.disabled=false);object.submit()};postToAjaxUrl(object,
data,success,error)}function postToAjaxUrl(form,data,success,error){let ajaxUrl=frm_js.ajax_url;const action=form.getAttribute("action");if("string"===typeof action&&action.includes("?action=frm_forms_preview"))ajaxUrl=action.split("?action=frm_forms_preview")[0];const ajaxParams={type:"POST",url:ajaxUrl,data,success};if("function"===typeof error)ajaxParams.error=error;jQuery.ajax(ajaxParams)}function afterFormSubmitted(object,response){const tempDiv=document.createElement("div");tempDiv.innerHTML=
response.content;const formCompleted=tempDiv.querySelector(".frm_message");if(formCompleted)jQuery(document).trigger("frmFormComplete",[object,response]);else jQuery(document).trigger("frmPageChanged",[object,response])}function afterFormSubmittedBeforeReplace(object,response){const tempDiv=document.createElement("div");tempDiv.innerHTML=response.content;const formCompleted=tempDiv.querySelector(".frm_message");if(formCompleted)triggerCustomEvent(document,"frmFormCompleteBeforeReplace",{object,response})}
function removeAddedScripts(formContainer,formID){const endReplace=document.querySelectorAll(`.frm_end_ajax_${formID}`);if(endReplace.length){formContainer.nextUntil(`.frm_end_ajax_${formID}`).remove();endReplace.forEach(el=>el.remove())}}function maybeSlideOut(oldContent,newContent){let c;let newClass="frm_slideout";if(newContent.includes(" frm_slide")){c=oldContent.children();if(newContent.includes(" frm_going_back"))newClass+=" frm_going_back";c.removeClass("frm_going_back");c.addClass(newClass);
return 300}return 0}function addUrlParam(response){let url;if(history.pushState&&response.page!==undefined){url=addQueryVar("frm_page",response.page);window.history.pushState({html:response.html},"",`?${url}`)}}function addQueryVar(key,value){key=encodeURI(key);value=encodeURI(value);const kvp=document.location.search.substr(1).split("&");let i=kvp.length;while(i--){const x=kvp[i].split("=");if(x[0]==key){x[1]=value;kvp[i]=x.join("=");break}}if(i<0)kvp[kvp.length]=[key,value].join("=");return kvp.join("&")}
function addFieldError($fieldCont,key,jsErrors){const container=$fieldCont instanceof jQuery?$fieldCont.get(0):$fieldCont;if(!container||container.offsetParent===null)return;container.classList.add("frm_blank_field");const input=container.querySelector("input, select, textarea");const id=getErrorElementId(key,input);let describedBy=input?input.getAttribute("aria-describedby"):null;if(typeof frmThemeOverride_frmPlaceError==="function")frmThemeOverride_frmPlaceError(key,jsErrors);else{let errorHtml;
if(jsErrors[key].includes("<div"))errorHtml=jsErrors[key];else{const roleString=frm_js.include_alert_role?'role="alert"':"";errorHtml=`<div class="frm_error" ${roleString} id="${id}">${jsErrors[key]}</div>`}container.insertAdjacentHTML("beforeend",errorHtml);if(input){if(!describedBy)describedBy=id;else if(!describedBy.includes(id)&&!describedBy.includes("frm_error_field_")){const {errorFirst}=input.dataset;if(errorFirst==="0")describedBy=`${describedBy} ${id}`;else describedBy=`${id} ${describedBy}`}input.setAttribute("aria-describedby",
describedBy)}}if(input)if(["radio","checkbox"].includes(input.type)){const group=input.closest('[role="radiogroup"], [role="group"]');if(group)group.setAttribute("aria-invalid","true")}else input.setAttribute("aria-invalid","true");jQuery(document).trigger("frmAddFieldError",[jQuery(container),key,jsErrors])}function getErrorElementId(key,input){if(isNaN(key)||!input||!input.id)return`frm_error_field_${key}`;return`frm_error_${input.id}`}function removeFieldError(fieldCont){const container=fieldCont instanceof
jQuery?fieldCont.get(0):fieldCont;if(!container)return;const errorMessage=container.querySelector(".frm_error");const errorId=errorMessage?errorMessage.id:"";const input=container.querySelector("input, select, textarea");let describedBy=input?input.getAttribute("aria-describedby"):null;container.classList.remove("frm_blank_field","has-error");if(input)if("true"===input.getAttribute("aria-invalid"))input.setAttribute("aria-invalid","false");else if(["radio","checkbox"].includes(input.type)){const group=
input.closest('[role="radiogroup"], [role="group"]');if(group)group.setAttribute("aria-invalid","false")}if(errorMessage)errorMessage.remove();if(input){input.removeAttribute("aria-describedby");if(describedBy){describedBy=describedBy.replace(errorId,"").trim();if(describedBy)input.setAttribute("aria-describedby",describedBy)}}}function removeAllErrors(){document.querySelectorAll(".form-field").forEach(field=>{field.classList.remove("frm_blank_field","has-error")});document.querySelectorAll(".form-field .frm_error").forEach(error=>
error.remove());document.querySelectorAll(".frm_error_style").forEach(error=>error.remove())}function scrollToFirstField(object){if("function"===typeof object.get)object=object.get(0);const field=object.querySelector(".frm_blank_field");if(field)frmFrontForm.scrollMsg(jQuery(field),object,true)}function showSubmitLoading($object){showLoadingIndicator($object);disableSubmitButton($object);disableSaveDraft($object)}function showLoadingIndicator($object){if(!$object.hasClass("frm_loading_form")&&!$object.hasClass("frm_loading_prev")){addLoadingClass($object);
$object.trigger("frmStartFormLoading")}}function addLoadingClass($object){const loadingClass=isGoingToPrevPage($object)?"frm_loading_prev":"frm_loading_form";$object.addClass(loadingClass)}function isGoingToPrevPage($object){return typeof frmProForm!=="undefined"&&frmProForm.goingToPreviousPage($object)}function removeSubmitLoading(_,enable,processesRunning){if(processesRunning>0)return;document.querySelectorAll(".frm_loading_form").forEach(function(form){form.classList.remove("frm_loading_form",
"frm_loading_prev");jQuery(form).trigger("frmEndFormLoading");if(enable==="enable"){enableSubmitButton(form);enableSaveDraft(form)}})}function showFileLoading(object){const loading=document.getElementById("frm_loading");if(loading===null)return;const fileInput=object.querySelector("input[type=file]");const fileval=fileInput?fileInput.value:"";if(fileval!=="")setTimeout(function(){jQuery(loading).fadeIn("slow")},2E3)}function confirmClick(){const message=this.dataset.frmconfirm;return confirm(message)}
function onHoneypotFieldChange(){const css=window.getComputedStyle(this).boxShadow;if(css&&css.match(/inset/))this.remove()}function changeFocusWhenClickComboFieldLabel(){let label;const comboInputsContainer=document.querySelectorAll(".frm_combo_inputs_container");comboInputsContainer.forEach(function(inputsContainer){if(!inputsContainer.closest(".frm_form_field"))return;label=inputsContainer.closest(".frm_form_field").querySelector(".frm_primary_label");if(!label)return;label.addEventListener("click",
function(){inputsContainer.querySelector(".frm_form_field:first-child input, .frm_form_field:first-child select, .frm_form_field:first-child textarea").focus()})})}function maybeFocusOnComboSubField(element){if("FIELDSET"!==element.nodeName)return false;if(!element.querySelector(".frm_combo_inputs_container"))return false;const comboSubfield=element.querySelector('[aria-invalid="true"]');if(comboSubfield){focusInput(comboSubfield);return true}return false}function checkForErrorsAndMaybeSetFocus(){if(!frm_js.focus_first_error)return;
const errors=document.querySelectorAll(".frm_form_field .frm_error");if(!errors.length)return;let element=errors[0];let timeoutCallback;do{element=element.previousSibling;if(["input","select","textarea"].includes(element.nodeName.toLowerCase())){focusInput(element);break}if(maybeFocusOnComboSubField(element))break;if(element.classList!==undefined){if(element.classList.contains("html-active"))timeoutCallback=function(){const textarea=element.querySelector("textarea");if(null!==textarea)textarea.focus()};
else if(element.classList.contains("tmce-active"))timeoutCallback=function(){tinyMCE.activeEditor.focus()};else if(element.classList.contains("frm_opt_container")){const firstInput=element.querySelector("input");if(firstInput){focusInput(firstInput);break}}if("function"===typeof timeoutCallback){setTimeout(timeoutCallback,0);break}}}while(element.previousSibling)}function focusInput(input){if(input.offsetParent!==null)input.focus();else triggerCustomEvent(document,"frmMaybeDelayFocus",{input})}function documentOn(event,
selector,handler,options){if(options===undefined)options=false;document.addEventListener(event,function(e){let target;for(target=e.target;target&&target!=this;target=target.parentNode)if(target.matches&&target.matches(selector)){handler.call(target,e);break}},options)}function initFloatingLabels(){const selector=".frm-show-form .frm_inside_container input, .frm-show-form .frm_inside_container select, .frm-show-form .frm_inside_container textarea";const floatClass="frm_label_float_top";const checkFloatLabel=
function(input){const container=input.closest(".frm_inside_container");if(!container)return;const shouldFloatTop=input.value||document.activeElement===input;container.classList.toggle(floatClass,shouldFloatTop);if("SELECT"===input.tagName){const firstOpt=input.querySelector("option:first-child");if(shouldFloatTop){if(firstOpt.hasAttribute("data-label")){firstOpt.textContent=firstOpt.getAttribute("data-label");firstOpt.removeAttribute("data-label")}}else if(firstOpt.textContent){firstOpt.setAttribute("data-label",
firstOpt.textContent);firstOpt.textContent=""}}};const checkDropdownLabel=function(){document.querySelectorAll(`.frm-show-form .frm_inside_container:not(.${floatClass}) select`).forEach(function(input){const firstOpt=input.querySelector("option:first-child");if(firstOpt.textContent){firstOpt.setAttribute("data-label",firstOpt.textContent);firstOpt.textContent=""}})};["focus","blur","change"].forEach(function(eventName){documentOn(eventName,selector,function(event){checkFloatLabel(event.target)},true)});
const runOnLoad=function(firstLoad){if(firstLoad&&document.activeElement&&["INPUT","SELECT","TEXTAREA"].includes(document.activeElement.tagName))checkFloatLabel(document.activeElement);else if(firstLoad)document.querySelectorAll(".frm_inside_container").forEach(function(container){const input=container.querySelector("input, select, textarea");if(input&&""!==input.value)checkFloatLabel(input)});checkDropdownLabel()};runOnLoad(true);jQuery(document).on("frmPageChanged",function(event){runOnLoad()});
document.addEventListener("frm_after_start_over",function(event){runOnLoad()})}function shouldUpdateValidityMessage(target){if("INPUT"!==target.nodeName)return false;if(!target.dataset.invmsg)return false;if("text"!==target.getAttribute("type"))return false;if(target.classList.contains("frm_verify"))return false;return true}function maybeClearCustomValidityMessage(event,field){let key;let isInvalid=false;if(!shouldUpdateValidityMessage(field))return;for(key in field.validity){if("customError"===key)continue;
if("valid"!==key&&field.validity[key]===true){isInvalid=true;break}}if(!isInvalid)field.setCustomValidity("")}function maybeShowNewTabFallbackMessage(){if(!window.frmShowNewTabFallback)return;const messageEl=document.querySelector(`#frm_form_${frmShowNewTabFallback.formId}_container .frm_message`);if(!messageEl)return;messageEl.insertAdjacentHTML("beforeend",` ${frmShowNewTabFallback.message}`)}function setCustomValidityMessage(){const forms=document.getElementsByClassName("frm-show-form");const {length}=
forms;for(let index=0;index<length;++index)forms[index].addEventListener("invalid",function(event){const {target}=event;if(shouldUpdateValidityMessage(target))target.setCustomValidity(target.dataset.invmsg)},true)}function enableSubmitButtonOnBackButtonPress(){window.addEventListener("pageshow",function(event){if(event.persisted){document.querySelectorAll(".frm_loading_form").forEach(function(form){enableSubmitButton(form)});removeSubmitLoading()}})}function destroyhCaptcha(){if(!window.hasOwnProperty("hcaptcha")||
!document.querySelector(".frm-show-form .h-captcha"))return;window.hcaptcha=null}function getUniqueKey(){const uniqueKey=Array.from(window.crypto.getRandomValues(new Uint8Array(8))).map(b=>b.toString(16).padStart(2,"0")).join("");const timestamp=Date.now().toString(16);return`${uniqueKey}-${timestamp}`}function animateScroll(start,end,duration){if(!window.hasOwnProperty("performance")||!window.hasOwnProperty("requestAnimationFrame")){document.documentElement.scrollTop=end;return}const startTime=performance.now();
const step=currentTime=>{const progress=Math.min((currentTime-startTime)/duration,1);document.documentElement.scrollTop=start+(end-start)*progress;if(progress<1)requestAnimationFrame(step)};requestAnimationFrame(step)}function maybeFixCaptchaLabel(captcha){const form=captcha.closest("form");if(!form)return;const label=form.querySelector('label[for="g-recaptcha-response"], label[for="cf-turnstile-response"]');const captchaResponse=form.querySelector('[name="g-recaptcha-response"], [name="cf-turnstile-response"]');
if(label&&captchaResponse)label.htmlFor=captchaResponse.id}return{init(){jQuery(document).off("submit.formidable",".frm-show-form");jQuery(document).on("submit.formidable",".frm-show-form",frmFrontForm.submitForm);jQuery(document).on("change",'.frm-show-form input[name^="item_meta"], .frm-show-form select[name^="item_meta"], .frm-show-form textarea[name^="item_meta"]',frmFrontForm.fieldValueChanged);jQuery(document).on("change",".frm_verify[id^=field_]",onHoneypotFieldChange);jQuery(document).on("click",
"a[data-frmconfirm]",confirmClick);checkForErrorsAndMaybeSetFocus();changeFocusWhenClickComboFieldLabel();initFloatingLabels();maybeShowNewTabFallbackMessage();jQuery(document).on("frmAfterAddRow",setCustomValidityMessage);setCustomValidityMessage();jQuery(document).on("frmFieldChanged",maybeClearCustomValidityMessage);setSelectPlaceholderColor();jQuery(document).on("elementor/popup/show",frmRecaptcha);enableSubmitButtonOnBackButtonPress();jQuery(document).on("frmPageChanged",destroyhCaptcha)},getFieldId,
renderCaptcha(captcha,captchaSelector){const rendered=captcha.getAttribute("data-rid")!==null;if(rendered)return;const size=captcha.getAttribute("data-size");const params={sitekey:captcha.getAttribute("data-sitekey"),size,theme:captcha.getAttribute("data-theme")};if(size==="invisible"){const formID=captcha.closest("form")?.querySelector('input[name="form_id"]')?.value;const captchaLabel=captcha.closest(".frm_form_field")?.querySelector(".frm_primary_label");if(captchaLabel)captchaLabel.style.display=
"none";params.callback=function(token){frmFrontForm.afterRecaptcha(token,formID)}}const activeCaptcha=getSelectedCaptcha(captchaSelector);const captchaContainer=typeof turnstile!=="undefined"&&turnstile===activeCaptcha?`#${captcha.id}`:captcha.id;const captchaID=activeCaptcha.render(captchaContainer,params);captcha.setAttribute("data-rid",captchaID);maybeFixCaptchaLabel(captcha)},afterSingleRecaptcha(){const recaptcha=document.querySelector(".frm-show-form .g-recaptcha");const object=recaptcha?recaptcha.closest("form"):
null;frmFrontForm.submitFormNow(object)},afterRecaptcha(_,formID){const object=document.querySelector(`#frm_form_${formID}_container form`);frmFrontForm.submitFormNow(object)},submitForm(e){frmFrontForm.submitFormManual(e,this)},submitFormManual(e,object){if(document.body.classList.contains("wp-admin")&&!object.closest(".frmapi-form"))return;e.preventDefault();if(typeof frmProForm!=="undefined"&&typeof frmProForm.submitAllowed==="function"&&!frmProForm.submitAllowed(object))return;const errors=frmFrontForm.validateFormSubmit(object);
if(Object.keys(errors).length!==0)return;const invisibleRecaptcha=hasInvisibleRecaptcha(object);if(invisibleRecaptcha){showLoadingIndicator(jQuery(object));executeInvisibleRecaptcha(invisibleRecaptcha)}else{showSubmitLoading(jQuery(object));frmFrontForm.submitFormNow(object)}},submitFormNow(object){let hasFileFields;let antispamInput;const classList=object.className.trim().split(/\s+/gi);if(object.hasAttribute("data-token")&&null===object.querySelector('[name="antispam_token"]')){antispamInput=document.createElement("input");
antispamInput.type="hidden";antispamInput.name="antispam_token";antispamInput.value=object.getAttribute("data-token");object.append(antispamInput)}const uniqueIDInput=document.createElement("input");uniqueIDInput.type="hidden";uniqueIDInput.name="unique_id";uniqueIDInput.value=getUniqueKey();object.append(uniqueIDInput);if(classList.includes("frm_ajax_submit")){const fileInputs=object.querySelectorAll('input[type="file"]');hasFileFields=Array.from(fileInputs).filter(input=>!!input.value).length;if(hasFileFields<
1){const actionInput=object.querySelector('input[name="frm_action"]');const action=actionInput?actionInput.value:"";frmFrontForm.checkFormErrors(object,action)}else object.submit()}else object.submit()},validateFormSubmit(object){const form=object instanceof jQuery?object.get(0):object;if(typeof tinyMCE!=="undefined"&&form&&form.querySelector(".wp-editor-wrap"))tinyMCE.triggerSave();jsErrors=[];if(shouldJSValidate(object)){frmFrontForm.getAjaxFormErrors(object);if(Object.keys(jsErrors).length)frmFrontForm.addAjaxFormErrors(object)}return jsErrors},
getAjaxFormErrors(object){let customErrors;let key;const form=object instanceof jQuery?object.get(0):object;jsErrors=validateForm(object);if(typeof frmThemeOverride_jsErrors==="function"){const actionInput=form?form.querySelector('input[name="frm_action"]'):null;const action=actionInput?actionInput.value:"";customErrors=frmThemeOverride_jsErrors(action,object);if(Object.keys(customErrors).length)for(key in customErrors)jsErrors[key]=customErrors[key]}triggerCustomEvent(document,"frm_get_ajax_form_errors",
{formEl:object,errors:jsErrors});return jsErrors},addAjaxFormErrors(object){let key;const form=object instanceof jQuery?object.get(0):object;removeAllErrors();for(key in jsErrors){const fieldCont=form?form.querySelector(`#frm_field_${key}_container`):null;if(fieldCont)addFieldError(fieldCont,key,jsErrors);else delete jsErrors[key]}scrollToFirstField(object);checkForErrorsAndMaybeSetFocus()},checkFormErrors:getFormErrors,checkRequiredField,showSubmitLoading,removeSubmitLoading,scrollToID(id){const object=
jQuery(document.getElementById(id));frmFrontForm.scrollMsg(object,false)},scrollMsg(id,object,animate){let newPos;let screenTop;let screenBottom;let scrollObj="";if(object===undefined){scrollObj=jQuery(document.getElementById(`frm_form_${id}_container`));if(scrollObj.length<1)return}else if(typeof id==="string"){const formEl=object instanceof jQuery?object.get(0):object;const fieldEl=formEl?formEl.querySelector(`#frm_field_${id}_container`):null;scrollObj=fieldEl?jQuery(fieldEl):jQuery()}else scrollObj=
id;jQuery(scrollObj).trigger("focus");newPos=scrollObj.offset().top;if(!newPos||frm_js.offset==="-1")return;newPos=newPos-frm_js.offset;const docMarginTop=getComputedStyle(document.documentElement).marginTop;const bodyMarginTop=getComputedStyle(document.body).marginTop;if(docMarginTop||bodyMarginTop)newPos=newPos-parseInt(docMarginTop)-parseInt(bodyMarginTop);if(newPos&&window.innerHeight){screenTop=document.documentElement.scrollTop||document.body.scrollTop;screenBottom=screenTop+window.innerHeight;
if(newPos>screenBottom||newPos<screenTop){if(animate===undefined)document.documentElement.scrollTop=newPos;else animateScroll(screenTop,newPos,500);return false}}},fieldValueChanged(e){const fieldId=frmFrontForm.getFieldId(this,false);if(!fieldId)return;if(e.frmTriggered&&e.frmTriggered==fieldId)return;jQuery(document).trigger("frmFieldChanged",[this,fieldId,e]);if(e.selfTriggered!==true)maybeValidateChange(this)},escapeHtml(text){console.warn("DEPRECATED: function frmFrontForm.escapeHtml in v6.17");
return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},triggerCustomEvent,documentOn}}window.frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(){frmFrontForm.init()});function frmRecaptcha(){frmCaptcha(".frm-g-recaptcha")}function frmHcaptcha(){frmCaptcha(".h-captcha")}function frmTurnstile(){frmCaptcha(".frm-cf-turnstile")}
function frmCaptcha(captchaSelector){if(".h-captcha"===captchaSelector){const captchaLabels=document.querySelectorAll('label[for="h-captcha-response"]');if(captchaLabels.length)captchaLabels.forEach(label=>{const captchaResponse=label.closest("form")?.querySelector('[name="h-captcha-response"]');if(captchaResponse)label.htmlFor=captchaResponse.id});return}let c;const captchas=document.querySelectorAll(captchaSelector);const cl=captchas.length;for(c=0;c<cl;c++){const closestForm=captchas[c].closest("form");
const formIsVisible=closestForm&&closestForm.offsetParent!==null;const captcha=captchas[c];if(!formIsVisible){const interval=setInterval(function(){if(closestForm&&closestForm.offsetParent!==null){frmFrontForm.renderCaptcha(captcha,captchaSelector);clearInterval(interval)}},400);continue}frmFrontForm.renderCaptcha(captcha,captchaSelector)}}
function getSelectedCaptcha(captchaSelector){if(captchaSelector===".frm-g-recaptcha")return grecaptcha;if(document.querySelector(".frm-cf-turnstile"))return turnstile;return hcaptcha}function frmAfterRecaptcha(token){frmFrontForm.afterSingleRecaptcha(token)};
function frmProFormJS(){let currentlyAddingRow=false;let action="";let processesRunning=0;const lookupQueues={};let hiddenSubmitButtons=[];let pendingDynamicFieldAjax=[];const pendingLookupFieldAjax=[];let listWrappersOriginal={};const intlPhoneInputs={};let autoId=0;function setNextPage(e){var closestButton;if(this.className.includes("frm_rootline_title")){closestButton=this.previousElementSibling;closestButton.click();return}if(this.className.includes("frm_rootline_single")){this.querySelector("input").click();
return}var $thisObj=jQuery(this);var thisType=$thisObj.attr("type");if(thisType!=="submit")e.preventDefault();var f=$thisObj.parents("form").first(),v="",d="",thisName=this.name;if(thisName==="frm_prev_page"||this.className.includes("frm_prev_page")){v=jQuery(f).find(".frm_next_page").attr("id").replace("frm_next_p_","");if(f.length)maybeAddEmptyHiddenInputsForCheckboxes(f.get(0))}else if(thisName==="frm_save_draft"||this.className.includes("frm_save_draft"))d=1;else if(this.className.includes("frm_page_skip")){var goingTo=
$thisObj.data("page");var formId=jQuery(f).find('input[name="form_id"]').val();var orderField=jQuery(f).find('input[name="frm_page_order_'+formId+'"]');jQuery(f).append('<input name="frm_last_page" type="hidden" value="'+orderField.val()+'" />');if(goingTo==="")orderField.remove();else orderField.val(goingTo)}else if(this.className.includes("frm_page_back"))v=$thisObj.data("page");if(1===d)resetTinyMceOnDraftSave();else resetTinyMceOnPageTurn();jQuery(".frm_next_page").val(v);jQuery(".frm_saving_draft").val(d);
if(thisType!=="submit")f.trigger("submit")}function maybeAddEmptyHiddenInputsForCheckboxes(form){form.querySelectorAll(".frm_opt_container").forEach(function(optContainer){var checkboxes,hiddenInput;checkboxes=optContainer.querySelectorAll('input[type="checkbox"]');if(checkboxes.length&&!jQuery(checkboxes).filter(":checked").length){hiddenInput=document.createElement("input");hiddenInput.setAttribute("type","hidden");hiddenInput.setAttribute("name",checkboxes[0].getAttribute("name"));optContainer.append(hiddenInput)}})}
function resetTinyMceOnDraftSave(){jQuery(document).one("frmFormComplete",function(){jQuery(".wp-editor-area").each(function(){reInitializeRichText(this.id)})})}function resetTinyMceOnPageTurn(){var removeIds=[];jQuery(".frm_form_field .wp-editor-area").each(function(){removeIds.push(this.id)});jQuery(document).one("frmPageChanged",function(){var removeIndex,removeId;for(removeIndex=0;removeIndex<removeIds.length;++removeIndex){removeId=removeIds[removeIndex];removeRichText(removeId)}checkConditionalLogic()})}
function toggleSection(e){var $toggleContainer,togglingOn;if(e.key!==undefined){if(e.key!==" ")return}else if(e.keyCode!==undefined&&e.keyCode!==32)return;e.preventDefault();$toggleContainer=jQuery(this).parent().children(".frm_toggle_container");togglingOn="none"===$toggleContainer.get(0).style.display;if(togglingOn)$toggleContainer.show();triggerEvent(document,"frmBeforeToggleSection",{toggleButton:this});if(togglingOn)$toggleContainer.hide();$toggleContainer.slideToggle("fast");if(togglingOn){this.className+=
" active";this.setAttribute("aria-expanded","true")}else{this.className=this.className.replace(" active","");this.setAttribute("aria-expanded","false")}}function loadDateFields(){jQuery(document).on("focusin",".frm_date",triggerDateField);document.addEventListener("focusout",keepFloatingLabelOnDateBlur,true);loadUniqueTimeFields()}function frmDatepickerPro(input,settings){if(input._flatpickr)return input._flatpickr;const _this=this;this.initAccessiblity=frmDatepickerPro.initAccessiblity;this.initMonthSelector=
frmDatepickerPro.initMonthSelector;this.initYearSelector=frmDatepickerPro.initYearSelector;this.parseFunctionConfig=frmDatepickerPro.parseFunctionConfig;this.getDateRange=frmDatepickerPro.getDateRange;this.callbacks=frmDatepickerPro.callbacks;this.getDefaultConfigs=frmDatepickerPro.getDefaultConfigs;this.isUsingACustomTheme=frmDatepickerPro.isUsingACustomTheme;this.getConfigs=function(){if("undefined"===typeof settings.datepickerJsOptions)return _this.getDefaultConfigs(settings,input);return{..._this.getDefaultConfigs(settings,
input),..._this.parseFunctionConfig(settings.datepickerJsOptions)}};return flatpickr(input,this.getConfigs())}frmDatepickerPro.getThemeType=function(){const themeFile=document.querySelector('link[href*="flatpickr/dist/themes/"]');const themeSelectors=[{name:"frm-dark",selector:"dark.css"},{name:"frm-material-blue",selector:"material_blue.css"},{name:"frm-material-green",selector:"material_green.css"},{name:"frm-material-orange",selector:"material_orange.css"},{name:"frm-material-red",selector:"material_red.css"},
{name:"frm-airbnb",selector:"airbnb.css"},{name:"frm-confetti",selector:"confetti.css"}];if(themeFile&&themeFile.href)for(const theme of themeSelectors)if(themeFile.href.includes(theme.selector))return theme.name;return""};frmDatepickerPro.themeType=frmDatepickerPro.getThemeType();frmDatepickerPro.isUsingACustomTheme=frmDatepickerPro.themeType!=="";frmDatepickerPro.callbacks={};frmDatepickerPro.callbacks.onOpen=function(selectedDates,dateStr,instance){instance.calendarContainer.classList.add("frm-datepicker",
"with_frm_style");if(frmDatepickerPro.isUsingACustomTheme)instance.calendarContainer.classList.add("frm-datepicker-custom-theme",frmDatepickerPro.themeType)};frmDatepickerPro.callbacks.onClose=function(selectedDates,dateStr,instance){if(!instance.config.inline){instance.calendarContainer.classList.remove("frm-datepicker","with_frm_style");if(frmDatepickerPro.isUsingACustomTheme)instance.calendarContainer.classList.remove("frm-datepicker-custom-theme",frmDatepickerPro.themeType)}triggerEvent(instance.input,
"frmFlatpickrClosed",{instance})};frmDatepickerPro.getDefaultConfigs=function(config,input){this.getSettings=function(){const result={};if(config.formidable_dates||config.options)return config;result.formidable_dates=config;result.options=config.datepickerOptions;return result};this.getDatesDisabled=function(settings){const disabledDates=settings?.formidable_dates?.datesDisabled||settings?.options?.datesDisabled;if(!Array.isArray(disabledDates))return[];return disabledDates.map(date=>new Date(date+
"T00:00:00"))};this.getInstanceElement=instance=>{if(instance.config.inline&&"INPUT"!==instance.element.nodeName){const fieldId=instance.element.dataset.fieldId;const element=document.querySelector(`input[name="item_meta[${fieldId}]"]`);if(element)return element;return instance.element}return instance.element};this.updateRangeFieldsOnChange=(mode,instance,dateStr,selectedDates)=>{if("range"!==mode)return;const fieldId=input.dataset.fieldId||input.dataset.rangeStartFieldId;const startDateField=document.querySelector(`input[data-field-id="${fieldId}"]`)||
document.querySelector(`input[type="hidden"][name="item_meta[${fieldId}]"]`);const [startDate,endDate]=selectedDates;const endDateField="undefined"!==typeof endDate?document.querySelector(`input[data-range-start-field-id="${fieldId}"]`):null;const instanceElement=this.getInstanceElement(instance);instanceElement.dataset.rangeValue=dateStr;if(instanceElement===startDateField&&null!==endDateField){instanceElement.value=flatpickr.formatDate(startDate,settings.options.fpDateFormat);endDateField.dataset.rangeValue=
dateStr;endDateField._flatpickr.setDate(dateStr);endDateField.value=flatpickr.formatDate(endDate,settings.options.fpDateFormat);endDateField.dispatchEvent(new Event("change",{bubbles:true}))}if(instanceElement===endDateField){instanceElement.value=flatpickr.formatDate(endDate,settings.options.fpDateFormat);startDateField.dataset.rangeValue=dateStr;startDateField._flatpickr.setDate(dateStr);startDateField.value=flatpickr.formatDate(startDate,settings.options.fpDateFormat)}};const settings=this.getSettings();
const mode=input.classList.contains("frm_date_range")||settings.formidable_dates&&settings.formidable_dates.isRangeEnabled?"range":"single";const inline=settings.formidable_dates&&settings.formidable_dates.inline;const showMonths=inline&&"range"===mode?2:1;const {min,max}=frmDatepickerPro.getDateRange(settings);const disabledDates=this.getDatesDisabled(settings);const firstDay=settings.options.firstDay||1;const flatpickrOptions={dateFormat:settings.options.fpDateFormat,inline:settings.formidable_dates&&
settings.formidable_dates.inline,minDate:min,maxDate:max,monthSelectorType:"true"===settings.options.changeMonth?"dropdown":"static",changeYear:settings.options.changeYear,closeOnSelect:true,showMonths:showMonths,locale:{...flatpickr.l10ns[settings.locale||settings.options.locale],firstDayOfWeek:firstDay},mode:mode,disable:[function(date){return settings.formidable_dates&&settings.formidable_dates.daysEnabled&&-1===settings.formidable_dates.daysEnabled.indexOf(date.getDay())},...(disabledDates?disabledDates:
[])],onReady:function(selectedDates,dateStr,instance){setTimeout(()=>frmDatepickerPro.setDefaultRangeValue(instance.element));if(instance.config.inline){instance.calendarContainer.classList.add("frm-datepicker","with_frm_style","frm_date_inline");if(frmDatepickerPro.isUsingACustomTheme)instance.calendarContainer.classList.add("frm-datepicker-custom-theme",frmDatepickerPro.themeType)}frmDatepickerPro.initMonthSelector(instance);frmDatepickerPro.initYearSelector(instance);frmDatepickerPro.initAccessiblity(instance)},
onChange:(selectedDates,dateStr,instance)=>{if(instance.config.inline){instance.config.altInputElement.value=dateStr;instance.config.altInputElement.dispatchEvent(new Event("change",{bubbles:true}))}this.updateRangeFieldsOnChange(mode,instance,dateStr,selectedDates)},onOpen:function(selectedDates,dateStr,instance){frmDatepickerPro.callbacks.onOpen(selectedDates,dateStr,instance)},onClose:frmDatepickerPro.callbacks.onClose,shorthandCurrentMonth:true,altInputClass:""};if(settings.formidable_dates&&
settings.formidable_dates.inline){flatpickrOptions.altInput=true;flatpickrOptions.altInputElement=document.querySelector(settings.options.altField)}return flatpickrOptions};frmDatepickerPro.setDefaultRangeValue=function(instanceElement){let input=instanceElement;if(instanceElement._flatpickr.config.inline){const fieldId=instanceElement.dataset.fieldId;input=document.querySelector(`input[name="item_meta[${fieldId}]"]`);input.dataset.fieldId=fieldId}if(!input.classList.contains("frm_date_range"))return null;
const startDate=input.dataset.rangeStartFieldId?document.querySelector(`input[data-field-id="${input.dataset.rangeStartFieldId}"]`):input;const startDateValue=startDate.value;const endDate=input.dataset.rangeStartFieldId?input:document.querySelector(`input[data-range-start-field-id="${input.dataset.fieldId}"]`);const endDateValue=endDate.value;if(instanceElement._flatpickr.config.inline){instanceElement._flatpickr.setDate(startDateValue+" to "+endDateValue);startDate.value=startDateValue;endDate.value=
endDateValue;return}if("undefined"===typeof startDate._flatpickr)return;startDate._flatpickr.setDate(startDateValue+" to "+endDateValue);startDate.value=startDateValue;endDate._flatpickr.setDate(startDateValue+" to "+endDateValue);endDate.value=endDateValue};frmDatepickerPro.initMonthSelector=function(instance){if("static"!==instance.config.monthSelectorType)return;instance.calendarContainer.classList.add("frm-date-no-month-select")};frmDatepickerPro.initYearSelector=function(instance){if("false"!==instance.config.changeYear)return;instance.calendarContainer.classList.add("frm-date-no-year-select")};frmDatepickerPro.initAccessiblity=function(instance){this.init=function(){instance.calendarContainer.setAttribute("role","dialog");instance.calendarContainer.setAttribute("tabindex","0");this.prevButton();this.nextButton()};this.prevButton=function(){const prevArrow=instance.calendarContainer.querySelector(".flatpickr-prev-month");if(null===prevArrow)return;prevArrow.setAttribute("tabindex","0");
prevArrow.setAttribute("role","button");prevArrow.addEventListener("keydown",function(event){if(event.key==="Enter")prevArrow.click()})};this.nextButton=function(){const nextArrow=instance.calendarContainer.querySelector(".flatpickr-next-month");if(null===nextArrow)return;nextArrow.setAttribute("tabindex","0");nextArrow.setAttribute("role","button");nextArrow.addEventListener("keydown",function(event){if(event.key==="Enter")nextArrow.click()})};this.init()};frmDatepickerPro.getDateRange=function(optionsData){const dates=
{min:null,max:null};const [minYear,maxYear]=optionsData.options.yearRange.split(":");dates.min=new Date(minYear+"-01-01T00:00:00");dates.max=new Date(maxYear+"-12-31T23:59:59");if(!optionsData.formidable_dates)return dates;if(optionsData.formidable_dates.maximum_date_cond)if(optionsData.maxDate)dates.max=optionsData.maxDate;else dates.max=frmDatepickerPro.parseOffsetDate(optionsData.formidable_dates.maximum_date_val);if(optionsData.formidable_dates.minimum_date_cond)if(optionsData.minDate)dates.min=
optionsData.minDate;else dates.min=frmDatepickerPro.parseOffsetDate(optionsData.formidable_dates.minimum_date_val);return dates};frmDatepickerPro.parseOffsetDate=function(date){const cleanedDate=date.toLowerCase().replace(/\s+/g,"");const regex=/^([+-]\d+)(day|days|month|months|year|years)$/;const match=cleanedDate.match(regex);if(!match)return date;const [,number,unit]=match;const amount=parseInt(number);const currentDate=new Date;if(unit.startsWith("day")){currentDate.setDate(currentDate.getDate()+
amount);return currentDate}if(unit.startsWith("month")){currentDate.setMonth(currentDate.getMonth()+amount);return currentDate}if(unit.startsWith("year")){currentDate.setFullYear(currentDate.getFullYear()+amount);return currentDate}return currentDate};frmDatepickerPro.parseFunctionConfig=function(config){const parsed=JSON.parse(config);const stringToFunction=str=>{if(typeof str==="string"&&str.startsWith("function"))return(new Function("return "+str))();return str};Object.keys(parsed).forEach(key=>
{if(Array.isArray(parsed[key]))parsed[key]=parsed[key].map(item=>stringToFunction(item));else parsed[key]=stringToFunction(parsed[key])});return parsed};frmDatepickerPro.useFlatpickr=()=>window.frm_js&&window.frm_js.datepickerLibrary==="flatpickr";function triggerDateField(){if(this.className.includes("frm_custom_date")||typeof __frmDatepicker==="undefined")return;var dateFields=__frmDatepicker,id=this.id,idParts=id.split("-"),altID="";if(isRepeatingFieldByName(this.name))altID='input[id^="'+idParts[0]+
'"]';else altID='input[id^="'+idParts.join("-")+'"]';var optKey=0;for(var i=0;i<dateFields.length;i++)if(dateFields[i].triggerID==="#"+id||dateFields[i].triggerID==altID){optKey=i;break}if(dateFields[optKey].options.defaultDate!=="")dateFields[optKey].options.defaultDate=new Date(dateFields[optKey].options.defaultDate);if(frmDatepickerPro.useFlatpickr())new frmDatepickerPro(this,dateFields[optKey]);else{dateFields[optKey].options.beforeShow=frmProForm.addFormidableClassToDatepicker;dateFields[optKey].options.onClose=
frmProForm.removeFormidableClassFromDatepicker;jQuery(this).datepicker(jQuery.extend({},jQuery.datepicker.regional[dateFields[optKey].locale],dateFields[optKey].options))}}function loadDropzones(repeatRow){if(typeof __frmDropzone==="undefined")return;var uploadFields=__frmDropzone;for(var i=0;i<uploadFields.length;i++)loadDropzone(i,repeatRow)}function loadDropzone(i,repeatRow){var field,max,uploadedCount,form,uploadFields=__frmDropzone,uploadField=uploadFields[i],selector="#"+uploadField.htmlID+
"_dropzone",fieldName=uploadField.fieldName;if(repeatRow!==undefined&&selector.includes("-0_dropzone")){selector=selector.replace("-0_dropzone","-"+repeatRow+"_dropzone");fieldName=fieldName.replace("[0]","["+repeatRow+"]");delete uploadField.mockFiles}field=jQuery(selector);if(field.length<1||field.hasClass("dz-clickable")||field.hasClass("dz-started"))return;max=uploadField.maxFiles;if(uploadField.mockFiles!==undefined){uploadedCount=uploadField.mockFiles.length;if(max>0)max=max-uploadedCount}form=
field.closest("form");uploadField=uploadFields[i];field.dropzone({url:getAjaxUrl(form.get(0)),headers:{"Frm-Dropzone":1},addRemoveLinks:false,paramName:field.attr("id").replace("_dropzone",""),maxFilesize:uploadField.maxFilesize,minFilesize:uploadField.minFilesize,maxFiles:max,uploadMultiple:uploadField.uploadMultiple,hiddenInputContainer:field.parent()[0],dictDefaultMessage:uploadField.defaultMessage,dictFallbackMessage:uploadField.fallbackMessage,dictFallbackText:uploadField.fallbackText,dictFileTooBig:uploadField.fileTooBig,
dictFileTooSmall:uploadField.fileTooSmall,dictInvalidFileType:uploadField.invalidFileType,dictResponseError:uploadField.responseError,dictCancelUpload:uploadField.cancel,dictCancelUploadConfirmation:uploadField.cancelConfirm,dictRemoveFile:uploadField.remove,dictMaxFilesExceeded:uploadField.maxFilesExceeded,resizeMethod:"contain",resizeWidth:uploadField.resizeWidth,resizeHeight:uploadField.resizeHeight,thumbnailWidth:60,thumbnailHeight:60,timeout:uploadField.timeout,previewTemplate:filePreviewHTML(uploadField),
acceptedFiles:uploadField.acceptedFiles,transformFile:(file,done)=>{if(!/Android/i.test(navigator.userAgent)||!/Chrome/i.test(navigator.userAgent)){done(file);return}const reader=new FileReader;reader.onload=()=>{const blob=new Blob([reader.result],{type:file.type});blob.name=file.name;blob.lastModified=file.lastModified;done(blob)};reader.onerror=()=>done(file);reader.readAsArrayBuffer(file)},fallback:function(){jQuery(this.element).closest("form").removeClass("frm_ajax_submit")},init:function(){var hidden,
mockFileIndex,mockFileData,mockFile;hidden=field.parent().find(".dz-hidden-input");if(hidden.attr("id")===undefined)hidden.attr("id",uploadFields[i].label);this.on("thumbnail",function(file){if(file.size<1024*1024*this.options.minFilesize)if("function"===typeof file.rejectSize)file.rejectSize()});this.on("sending",function(file,xhr,formData){if(isSpam(uploadFields[i].parentFormID,uploadField.checkHoneypot)){this.removeFile(file);alert(frm_js.file_spam);return false}formData.append("action","frm_submit_dropzone");
formData.append("field_id",uploadFields[i].fieldID);formData.append("form_id",uploadFields[i].formID);formData.append("nonce",frm_js.nonce);if(form.get(0).hasAttribute("data-token"))formData.append("antispam_token",form.get(0).getAttribute("data-token"))});this.on("processing",function(){if(!this.options.uploadMultiple)this.removeEventListeners()});this.on("success",function(file,response){var mediaIDs,m,mediaID;mediaIDs=JSON.parse(response);for(m=0;m<mediaIDs.length;m++)if(uploadFields[i].uploadMultiple!==true){mediaID=mediaIDs[m];jQuery('input[name="'+fieldName+'"]').val(mediaID)}if(this.options.uploadMultiple===false)this.disable();clearErrorsOnUpload(file.previewElement)});this.on("successmultiple",function(files,response){var mediaIDs=JSON.parse(response);for(var m=0;m<files.length;m++)jQuery(files[m].previewElement).append(getHiddenUploadHTML(uploadFields[i],mediaIDs[m],fieldName))});this.on("complete",function(file){var fileName,node,img,thumbnail;processesRunning--;if(form.length)removeSubmitLoading(form.get(0),
uploadFields[i].formID,processesRunning);if(file.mediaID===undefined)return;if(uploadFields[i].uploadMultiple)jQuery(file.previewElement).append(getHiddenUploadHTML(uploadFields[i],file.mediaID,fieldName));fileName=file.previewElement.querySelectorAll("[data-dz-name]");for(var _i=0,_len=fileName.length;_i<_len;_i++){node=fileName[_i];if(file.accessible)node.innerHTML='<a href="'+file.url+'" target="_blank" rel="noopener">'+file.name+"</a>";else node.innerHTML=file.name;if(file.ext){img=file.previewElement.querySelector(".dz-image img");
if(null!==img){thumbnail=maybeGetExtensionThumbnail(file.ext);if(false!==thumbnail)img.setAttribute("src",thumbnail)}}}});this.on("addedfile",function(file){var ext,thumbnail;ext=file.name.split(".").pop();thumbnail=maybeGetExtensionThumbnail(ext);processesRunning++;frmFrontForm.showSubmitLoading(form);if(false!==thumbnail)jQuery(file.previewElement).find(".dz-image img").attr("src",thumbnail)});function clearErrorsOnUpload(fileElement){var container=fileElement.closest(".frm_form_field");if(!container)return;
container.classList.remove("frm_blank_field","has-error");container.querySelectorAll(".form-field .frm_error, .frm_error_style").forEach(function(error){if(error.parentNode)error.parentNode.removeChild(error)})}this.on("removedfile",function(file){var fileCount=this.files.length;if(this.options.uploadMultiple===false&&fileCount<1)this.enable();if(file.accepted!==false&&uploadFields[i].uploadMultiple!==true)jQuery('input[name="'+fieldName+'"]').val("");if(file.accepted!==false&&file.mediaID!==undefined){jQuery(file.previewElement).remove();
fileCount=this.files.length;this.options.maxFiles=uploadFields[i].maxFiles-fileCount}});if(uploadFields[i].mockFiles!==undefined)for(mockFileIndex=0;mockFileIndex<uploadFields[i].mockFiles.length;mockFileIndex++){mockFileData=uploadFields[i].mockFiles[mockFileIndex];mockFile={name:mockFileData.name,size:mockFileData.size,url:mockFileData.file_url,mediaID:mockFileData.id,accessible:mockFileData.accessible,ext:mockFileData.ext,type:mockFileData.type};this.emit("addedfile",mockFile);if(mockFile.accessible&&
"string"===typeof mockFile.type&&0===mockFile.type.indexOf("image/"))this.emit("thumbnail",mockFile,mockFileData.url);this.emit("complete",mockFile);this.files.push(mockFile)}},accept:function(file,done){var message=this.options.dictFileTooSmall.replace("{{minFilesize}}",this.options.minFilesize);file.rejectSize=function(){done(message)};return done()}})}function loadImask(containerId){if(!window.IMask)return;let inputs;if(containerId)inputs=document.querySelectorAll("#"+containerId+" input[data-frmmask]");
else inputs=document.querySelectorAll("input[data-frmmask]");inputs.forEach(input=>{if(input.getAttribute("data-frm-imask-initialized"))return;input.setAttribute("data-frm-imask-initialized",1);const mask=IMask(input,{mask:input.dataset.frmmask,lazy:true,definitions:{"*":/[a-zA-Z0-9]/}});input.addEventListener("change",()=>mask.updateValue());input.addEventListener("focus",()=>{mask.updateOptions({lazy:false});if(input.hasAttribute("maxlength")&&input.value.length>=input.maxLength){if(!input.hasAttribute("original-maxlength"))input.setAttribute("original-maxlength",
input.maxLength);input.maxLength=parseInt(input.getAttribute("original-maxlength"))+1}if(""===mask.unmaskedValue)mask.alignCursor(0)});input.addEventListener("blur",()=>{input.value=input.value.trim();if(""===mask.unmaskedValue)mask.updateOptions({lazy:true});if(input.hasAttribute("original-maxlength"))input.maxLength=parseInt(input.getAttribute("original-maxlength"))})})}function removeSubmitLoading(form,formId,processesRunning){var isFinalSubmitButton,enable;isFinalSubmitButton=form.querySelector(".frm_submit .frm_button_submit.frm_final_submit");
enable=!isFinalSubmitButton||!submitButtonIsConditionallyDisabled(formId)?"enable":"";if(""===enable)jQuery(".frm_loading_form").find("a.frm_save_draft").css("pointer-events","");frmFrontForm.removeSubmitLoading(jQuery(form),enable,processesRunning)}function submitButtonIsConditionallyDisabled(formId){return submitButtonIsConditionallyNotAvailable(formId)&&"disable"===__FRMRULES["submit_"+formId].hideDisable}function submitButtonIsConditionallyNotAvailable(formId){var hideFields=document.getElementById("frm_hide_fields_"+
formId);return hideFields&&-1!==hideFields.value.indexOf('"frm_form_'+formId+'_container .frm_final_submit"')}function maybeGetExtensionThumbnail(ext){if(-1!==["jpg","jpeg","png"].indexOf(ext))return false;if("pdf"===ext)return getProPluginUrl()+"/images/pdf.svg";if(-1!==ext.indexOf("xls"))return getProPluginUrl()+"/images/xls.svg";return getProPluginUrl()+"/images/doc.svg"}function getProPluginUrl(){var freePluginUrlSplitBySlashes=frm_js.images_url.split("/");freePluginUrlSplitBySlashes.pop();freePluginUrlSplitBySlashes.pop();
freePluginUrlSplitBySlashes.push("formidable-pro");return freePluginUrlSplitBySlashes.join("/")}function filePreviewHTML(field){return'<div class="dz-preview dz-file-preview">\n'+'<div class="dz-image"><img data-dz-thumbnail /></div>\n'+'<div class="dz-column">\n'+'<div class="dz-details">\n'+'<div class="dz-filename"><span data-dz-name></span></div>\n'+" "+'<div class="dz-size"><span data-dz-size></span></div>\n'+'<a class="dz-remove frm_remove_link" href="javascript:undefined;" data-dz-remove title="'+
field.remove+'">'+'<svg width="16" height="16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m11.5 4.5-7 7M4.5 4.5l7 7" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/></svg>'+"</a>"+"</div>\n"+'<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n'+'<div class="dz-error-message"><span data-dz-errormessage></span></div>\n'+"</div>\n"+"</div>"}function getHiddenUploadHTML(field,mediaID,fieldName){return'<input name="'+fieldName+'[]" type="hidden" value="'+
mediaID+'" data-frmfile="'+field.fieldID+'" />'}function removeFile(){var fieldName=jQuery(this).data("frm-remove");fadeOut(jQuery(this).closest(".dz-preview"));var singleField=jQuery('input[name="'+fieldName+'"]');if(singleField.length)singleField.val("")}function postToAjaxUrl(form,data,success,error,extraParams){var ajaxParams="object"===typeof extraParams?extraParams:{};ajaxParams.type="POST";ajaxParams.url=getAjaxUrl(form);ajaxParams.data=data;ajaxParams.success=success;if("function"===typeof error)ajaxParams.error=
error;jQuery.ajax(ajaxParams)}function getAjaxUrl(form){var ajaxUrl,action;ajaxUrl=frm_js.ajax_url;action=form.getAttribute("action");if("string"===typeof action&&-1!==action.indexOf("?action=frm_forms_preview"))ajaxUrl=action.split("?action=frm_forms_preview")[0];return ajaxUrl}function isSpam(formID,checkHoneypot){if(isHeadless())return true;return checkHoneypot&&isHoneypotSpam(formID)}function isHoneypotSpam(formID){var honeypotField=document.getElementById("frm_email_"+formID);if(honeypotField===null)honeypotField=document.getElementById("frm_form_"+formID+"_container")?.querySelector('.frm_verify[id^="field_"]');return honeypotField!==null&&honeypotField.value!==""}function isHeadless(){return window._phantom||window.callPhantom||window.__phantomas||window.Buffer||window.emit||window.spawn}function showOtherText(){var type=this.type,other=false,select=false;if(type==="select-one"){select=true;var curOpt=this.options[this.selectedIndex];if(curOpt!==undefined&&curOpt.className==="frm_other_trigger")other=
true}else if(type==="select-multiple"){select=true;var allOpts=this.options;other=false;for(var i=0;i<allOpts.length;i++)if(allOpts[i].className==="frm_other_trigger")if(allOpts[i].selected){other=true;break}}if(select){var otherField=jQuery(this).parent().children(".frm_other_input");if(otherField.length)if(other)otherField[0].className=otherField[0].className.replace("frm_pos_none","");else{if(otherField[0].className.indexOf("frm_pos_none")<1)otherField[0].className=otherField[0].className+" frm_pos_none";
otherField[0].value=""}}else if(type==="radio"){if(jQuery(this).is(":checked")){jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none");jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")}}else if(type==="checkbox")if(this.checked)jQuery(this).closest(".frm_checkbox").children(".frm_other_input").removeClass("frm_pos_none");else jQuery(this).closest(".frm_checkbox").children(".frm_other_input").addClass("frm_pos_none").val("")}
function setToggleAriaChecked(){this.nextElementSibling.setAttribute("aria-checked",this.checked?"true":"false")}function maybeCheckDependent(_,field,fieldId,e){var $field,originalEvent;$field=jQuery(field);checkFieldsWithConditionalLogicDependentOnThis(fieldId,$field);originalEvent=getOriginalEvent(e);checkFieldsWatchingLookup(fieldId,$field,originalEvent);doCalculation(fieldId,$field)}function getOriginalEvent(e){var originalEvent;if(e.originalEvent!==undefined||e.currentTarget.className.includes("frm_chzn")||
e.currentTarget.className.includes("frm_slimselect"))originalEvent="value changed";else originalEvent="other";return originalEvent}function checkFieldsWithConditionalLogicDependentOnThis(fieldId,changedInput){if(typeof __FRMRULES==="undefined"||__FRMRULES[fieldId]===undefined||__FRMRULES[fieldId].dependents.length<1||changedInput===null||changedInput===undefined)return;var triggerFieldArgs=__FRMRULES[fieldId];var repeatArgs=getRepeatArgsFromFieldName(changedInput[0].name);pendingDynamicFieldAjax=
[];for(var i=0,l=triggerFieldArgs.dependents.length;i<l;i++)hideOrShowFieldById(triggerFieldArgs.dependents[i],repeatArgs);processPendingAjax()}function processPendingAjax(){var fieldsToProcess,postData,data,formId,form;if(!pendingDynamicFieldAjax.length)return;fieldsToProcess=pendingDynamicFieldAjax.slice();postData=[];for(data in fieldsToProcess)postData.push(fieldsToProcess[data].data);formId=fieldsToProcess[0].args.depFieldArgs.formId;function processDynamicField(html,depFieldArgs,onCurrentPage){var $fieldDiv,
$optContainer,$listInputs,listVal;if(onCurrentPage){$fieldDiv=jQuery("#"+depFieldArgs.containerId);addLoadingIcon($fieldDiv);$optContainer=$fieldDiv.find(".frm_opt_container, .frm_data_container");$optContainer.html(html);$listInputs=$optContainer.children("input");listVal=$listInputs.val();removeLoadingIcon($optContainer);if(""===html||""===listVal)hideDynamicField(depFieldArgs);else showDynamicField(depFieldArgs,$fieldDiv,$listInputs,true)}else updateHiddenDynamicListField(depFieldArgs,html)}function ajaxHandler(response){var i;
for(i=0;i<fieldsToProcess.length;i++)processDynamicField("undefined"===typeof response[i]?"":response[i],fieldsToProcess[i].args.depFieldArgs,fieldsToProcess[i].args.onCurrentPage)}form=getFormById(formId);if(form)postToAjaxUrl(form,{action:"frm_fields_ajax_get_data_arr",postData:postData},ajaxHandler,function(response){console.error(response)},{dataType:"json"})}function hideOrShowFieldById(fieldId,triggerFieldRepeatArgs){var depFieldArgs=getRulesForSingleField(fieldId);if(depFieldArgs===false||
depFieldArgs.conditions.length<1)return;var childFieldDivIds=getAllFieldDivIds(depFieldArgs,triggerFieldRepeatArgs);var childFieldNum=childFieldDivIds.length;for(var i=0;i<childFieldNum;i++){depFieldArgs.containerId=childFieldDivIds[i];addRepeatRow(depFieldArgs,childFieldDivIds[i]);hideOrShowSingleField(depFieldArgs)}}function getAllFieldDivIds(depFieldArgs,triggerFieldArgs){var childFieldDivs=[];if(depFieldArgs.isRepeating)if(triggerFieldArgs.repeatingSection!==""){var container="frm_field_"+depFieldArgs.fieldId+
"-";container+=triggerFieldArgs.repeatingSection+"-"+triggerFieldArgs.repeatRow+"_container";childFieldDivs.push(container)}else childFieldDivs=getAllRepeatingFieldDivIds(depFieldArgs);else if(depFieldArgs.fieldType==="submit")childFieldDivs.push(getSubmitButtonContainerID(depFieldArgs));else childFieldDivs.push("frm_field_"+depFieldArgs.fieldId+"_container");return childFieldDivs}function getSubmitButtonContainerID(depFieldArgs){return"frm_form_"+depFieldArgs.formId+"_container .frm_final_submit"}
function getAllRepeatingFieldDivIds(depFieldArgs){var childFieldDivs=[],containerFieldId=getContainerFieldId(depFieldArgs);if(isFieldDivOnPage("frm_field_"+containerFieldId+"_container"))childFieldDivs=getRepeatingFieldDivIdsOnCurrentPage(depFieldArgs.fieldId);else childFieldDivs=getRepeatingFieldDivIdsAcrossPage(depFieldArgs);return childFieldDivs}function getRepeatingFieldDivIdsOnCurrentPage(fieldId){var childFieldDivs=[],childFields=document.querySelectorAll(".frm_field_"+fieldId+"_container");
for(var i=0,l=childFields.length;i<l;i++)childFieldDivs.push(childFields[i].id);return childFieldDivs}function getRepeatingFieldDivIdsAcrossPage(depFieldArgs){var childFieldDivs=[],containerFieldId=getContainerFieldId(depFieldArgs),fieldDiv="frm_field_"+depFieldArgs.fieldId+"-"+containerFieldId+"-",allRows=document.querySelectorAll('[name="item_meta['+containerFieldId+'][row_ids][]"]');for(var i=0,l=allRows.length;i<l;i++)if(allRows[i].value!=="")childFieldDivs.push(fieldDiv+allRows[i].value+"_container");
if(childFieldDivs.length<1)childFieldDivs.push(fieldDiv+"0_container");return childFieldDivs}function getContainerFieldId(depFieldArgs){var containerFieldId="";if(depFieldArgs.inEmbedForm!=="0")containerFieldId=depFieldArgs.inEmbedForm;else if(depFieldArgs.inSection!=="0")containerFieldId=depFieldArgs.inSection;return containerFieldId}function addRepeatRow(depFieldArgs,childFieldDivId){if(depFieldArgs.isRepeating){var divParts=childFieldDivId.replace("_container","").split("-");depFieldArgs.repeatRow=
divParts[2]}else depFieldArgs.repeatRow=""}function hideOrShowSingleField(depFieldArgs){var i,add,logicOutcomes=[],len=depFieldArgs.conditions.length;for(i=0;i<len;i++){add=checkLogicCondition(depFieldArgs.conditions[i],depFieldArgs);if(add!==null)logicOutcomes.push(add)}if(logicOutcomes.length)routeToHideOrShowField(depFieldArgs,logicOutcomes)}function getRulesForSingleField(fieldId){if(typeof __FRMRULES==="undefined"||__FRMRULES[fieldId]===undefined)return false;return __FRMRULES[fieldId]}function checkLogicCondition(logicCondition,
depFieldArgs){var fieldId=logicCondition.fieldId,logicFieldArgs=getRulesForSingleField(fieldId),fieldValue=getFieldValue(logicFieldArgs,depFieldArgs);if(fieldValue===null)return null;return getLogicConditionOutcome(logicCondition,fieldValue,depFieldArgs,logicFieldArgs)}function getFieldValue(logicFieldArgs,depFieldArgs){var fieldValue="";if("name"===logicFieldArgs.fieldType)fieldValue=getValueFromNameField(logicFieldArgs,depFieldArgs);else if(logicFieldArgs.inputType==="radio"||logicFieldArgs.inputType==="checkbox"||logicFieldArgs.inputType==="toggle")fieldValue=getValueFromRadioOrCheckbox(logicFieldArgs,depFieldArgs);else if(logicFieldArgs.inputType==="date")fieldValue=getValueForDateField(logicFieldArgs,depFieldArgs);else fieldValue=getValueFromTextOrDropdown(logicFieldArgs,depFieldArgs);fieldValue=cleanFinalFieldValue(fieldValue);return fieldValue}function getValueForDateField(logicFieldArgs,depFieldArgs){const fieldId=logicFieldArgs.fieldId;const fieldContainer=document.getElementById("frm_field_"+
fieldId+"_container");if(fieldContainer&&fieldContainer.querySelector(".frm_date_inline")){const altField=fieldContainer.querySelector("#field_"+logicFieldArgs.fieldKey+"_alt");if(altField)return altField.value}return getValueFromTextOrDropdown(logicFieldArgs,depFieldArgs)}function getValueFromNameField(logicFieldArgs,depFieldArgs){var inputName,inputs,nameValues;inputName=buildLogicFieldInputName(logicFieldArgs,depFieldArgs);inputs=document.querySelectorAll('[name^="'+inputName+'"]');nameValues=
[];inputs.forEach(function(input){nameValues.push(input.value)});return nameValues.join(" ")}function getValueFromTextOrDropdown(logicFieldArgs,depFieldArgs){var logicFieldValue="";if(logicFieldArgs.isMultiSelect===true)return getValueFromMultiSelectDropdown(logicFieldArgs,depFieldArgs);var fieldCall="field_"+logicFieldArgs.fieldKey;if(logicFieldArgs.isRepeating)fieldCall+="-"+depFieldArgs.repeatRow;var logicFieldInput=document.getElementById(fieldCall);if(logicFieldInput===null){logicFieldValue=
parseTimeValue(logicFieldArgs,fieldCall);if(logicFieldValue==="")logicFieldValue=getValueFromMultiSelectDropdown(logicFieldArgs,depFieldArgs)}else logicFieldValue=logicFieldInput.value;return logicFieldValue}function parseTimeValue(logicFieldArgs,fieldCall){var logicFieldValue="";if(logicFieldArgs.fieldType==="time"){var hour=document.getElementById(fieldCall+"_H");if(hour!==null){var minute=document.getElementById(fieldCall+"_m");logicFieldValue=hour.value+":"+minute.value;var pm=document.getElementById(fieldCall+
"_A");if(logicFieldValue==":")logicFieldValue="";else if(pm!==null)logicFieldValue+=" "+pm.value}}return logicFieldValue}function getValueFromMultiSelectDropdown(logicFieldArgs,depFieldArgs){var inputName=buildLogicFieldInputName(logicFieldArgs,depFieldArgs),logicFieldInputs=document.querySelectorAll('[name^="'+inputName+'"]'),selectedVals=[];if(logicFieldInputs.length==1&&logicFieldInputs[0].type!=="hidden"){selectedVals=jQuery('[name^="'+inputName+'"]').val();if(selectedVals===null)selectedVals=
""}else selectedVals=getValuesFromCheckboxInputs(logicFieldInputs);return selectedVals}function getValueFromRadioOrCheckbox(logicFieldArgs,depFieldArgs){var logicFieldValue,inputName=buildLogicFieldInputName(logicFieldArgs,depFieldArgs),logicFieldInputs=document.querySelectorAll('input[name^="'+inputName+'"]');if(logicFieldInputs.length===0)return null;if(logicFieldArgs.inputType==="checkbox"||logicFieldArgs.inputType==="toggle")logicFieldValue=getValuesFromCheckboxInputs(logicFieldInputs);else logicFieldValue=
getValueFromRadioInputs(logicFieldInputs);return logicFieldValue}function buildLogicFieldInputName(logicFieldArgs,depFieldArgs){var inputName="";if(logicFieldArgs.isRepeating){var sectionId="";if(depFieldArgs.inEmbedForm!=="0")sectionId=depFieldArgs.inEmbedForm;else sectionId=depFieldArgs.inSection;var rowId=depFieldArgs.repeatRow;inputName="item_meta["+sectionId+"]["+rowId+"]["+logicFieldArgs.fieldId+"]"}else inputName="item_meta["+logicFieldArgs.fieldId+"]";return inputName}function getValuesFromCheckboxInputs(inputs){var checkedVals=
[];for(var i=0,l=inputs.length;i<l;i++)if(inputs[i].type==="hidden"||inputs[i].checked)checkedVals.push(inputs[i].value);else if(inputs[i].dataset.off!==undefined)checkedVals.push(inputs[i].dataset.off);if(checkedVals.length===0)checkedVals=false;return checkedVals}function cleanFinalFieldValue(fieldValue){if(fieldValue===undefined)fieldValue="";else if(typeof fieldValue==="string")fieldValue=fieldValue.trim();return fieldValue}function getLogicConditionOutcome(logicCondition,fieldValue,depFieldArgs,
logicFieldArgs){var outcome;if(depFieldArgs.fieldType==="data"&&logicFieldArgs.fieldType==="data")outcome=getDynamicFieldLogicOutcome(logicCondition,fieldValue,depFieldArgs);else{const values=maybePrepareValuesCompared(logicCondition,fieldValue,depFieldArgs.formId);outcome=operators(logicCondition.operator,values.logicValue,values.fieldValue)}return outcome}function getDynamicFieldLogicOutcome(logicCondition,fieldValue,depFieldArgs){var outcome=false;if(logicCondition.value==="")if(fieldValue===""||
fieldValue.length==1&&fieldValue[0]==="")outcome=false;else outcome=true;else{const values=maybePrepareValuesCompared(logicCondition,fieldValue,depFieldArgs.formId);outcome=operators(logicCondition.operator,values.logicValue,values.fieldValue)}depFieldArgs.dataLogic=logicCondition;depFieldArgs.dataLogic.actualValue=fieldValue;return outcome}function maybePrepareValuesCompared(logicCondition,fieldValue,formId){let logicValue=logicCondition.value;if("undefined"===typeof __FRMRULES||"undefined"===typeof __FRMRULES[logicCondition.fieldId])return{logicValue,
fieldValue};const logicConditionFieldType=__FRMRULES[logicCondition.fieldId].fieldType;if("total"===logicConditionFieldType){const currency=getCurrency(formId);logicValue=preparePrice(logicCondition.value,currency);fieldValue=preparePrice(fieldValue,currency)}else if("date"===logicConditionFieldType){const dateFormat=getDateFormatForField(logicCondition.fieldId);if(false!==dateFormat){logicValue=prepareDate(logicValue,dateFormat);fieldValue=prepareDate(fieldValue,dateFormat)}}return{logicValue,fieldValue}}
function prepareDate(date,format){if("Y-m-d"===format)return date;const possibleSeparators=["/",".","-"];let separator=false;possibleSeparators.forEach(sep=>{if(format.includes(sep))separator=sep});if(separator===false)return date;const split=date.split(separator);if(3!==split.length)return date;let yearPart,monthPart,dayPart;switch(format){case "Y/m/d":yearPart=split[0];monthPart=split[1];dayPart=split[2];break;case "n/j/Y":case "m/d/Y":monthPart=split[0];dayPart=split[1];yearPart=split[2];break;
case "d/m/Y":case "d.m.Y":case "j/m/Y":case "j/n/Y":case "j-m-Y":default:dayPart=split[0];monthPart=split[1];yearPart=split[2];break}if(yearPart.length!==4)return date;if(monthPart.length<2)monthPart="0"+monthPart;if(dayPart.length<2)dayPart="0"+dayPart;return yearPart+"-"+monthPart+"-"+dayPart}function getDateFormatForField(fieldId){if(!window.__frmDatepicker)return false;let fieldRule=false;__frmDatepicker.forEach(rule=>{if(!rule.fieldId||rule.fieldId===fieldId)fieldRule=rule});if(false===fieldRule)return false;
return fieldRule.options.fpDateFormat}function operators(op,a,b){var theOperators;a=prepareLogicValueForComparison(a);b=prepareEnteredValueForComparison(a,b);if(typeof a==="string"&&a.indexOf("&quot;")!="-1"&&operators(op,a.replace("&quot;",'"'),b))return true;theOperators={"==":function(c,d){return c===d},"!=":function(c,d){return c!==d},"<":function(c,d){return c>d},"<=":function(c,d){return c>=d},">":function(c,d){return c<d},">=":function(c,d){return c<=d},"LIKE":function(c,d){if(!d)return false;
c=prepareLogicValueForLikeComparison(c);d=prepareEnteredValueForLikeComparison(c,d);return d.includes(c)},"not LIKE":function(c,d){if(!d)return true;c=prepareLogicValueForLikeComparison(c);d=prepareEnteredValueForLikeComparison(c,d);return!d.includes(c)},"LIKE%":function(c,d){if(!d)return false;c=prepareLogicValueForLikeComparison(c);d=prepareEnteredValueForLikeComparison(c,d);if(Array.isArray(d))return false;return d.substr(0,c.length)===c},"%LIKE":function(c,d){if(!d)return false;c=prepareLogicValueForLikeComparison(c);
d=prepareEnteredValueForLikeComparison(c,d);if(Array.isArray(d))return false;return d.substr(-c.length)===c}};if("function"!==typeof theOperators[op])op="==";return theOperators[op](a,b)}function prepareLogicValueForComparison(a){if(shouldParseFloat(a))a=parseFloat(a);else if(typeof a==="string")a=a.trim();return a}function shouldParseFloat(value){return String(value).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)!==-1}function prepareEnteredValueForComparison(a,b){if(b===undefined||b===null||b===false)b="";if(Array.isArray(b)&&jQuery.inArray(String(a),b)>-1)b=a;if(typeof a==="number"&&typeof b==="string"&&shouldParseFloat(b))b=parseFloat(b);if(typeof b==="string")b=b.trim();return b}function prepareLogicValueForLikeComparison(val){return prepareValueForLikeComparison(val)}function prepareEnteredValueForLikeComparison(logicValue,enteredValue){enteredValue=prepareValueForLikeComparison(enteredValue);var currentValue="";if(Array.isArray(enteredValue))for(var i=0,l=enteredValue.length;i<l;i++){currentValue=
enteredValue[i].toLowerCase();if(currentValue.includes(logicValue)){enteredValue=logicValue;break}}return enteredValue}function prepareValueForLikeComparison(val){if(typeof val==="string")val=val.toLowerCase();else if(typeof val==="number")val=val.toString();return val}function routeToHideOrShowField(depFieldArgs,logicOutcomes){var onCurrentPage,action=getHideOrShowAction(depFieldArgs,logicOutcomes);if(depFieldArgs.fieldType==="submit")onCurrentPage=isSubmitButtonOnPage(depFieldArgs.containerId);
else onCurrentPage=isFieldDivOnPage(depFieldArgs.containerId);if(action==="show")if(depFieldArgs.fieldType==="data"&&depFieldArgs.hasOwnProperty("dataLogic"))updateDynamicField(depFieldArgs,onCurrentPage);else showFieldAndSetValue(depFieldArgs,onCurrentPage);else hideFieldAndClearValue(depFieldArgs,onCurrentPage)}function isFieldDivOnPage(containerId){var fieldDiv=document.getElementById(containerId);return fieldDiv!==null}function isSubmitButtonOnPage(container){var submitButton=document.querySelector("#"+
container);return submitButton!=null}function getHideOrShowAction(depFieldArgs,logicOutcomes){if(depFieldArgs.anyAll==="any")if(logicOutcomes.includes(true))action=depFieldArgs.showHide;else action=reverseAction(depFieldArgs.showHide);else if(logicOutcomes.includes(false))action=reverseAction(depFieldArgs.showHide);else action=depFieldArgs.showHide;return action}function reverseAction(action){if(action==="show")action="hide";else action="show";return action}function showFieldAndSetValue(depFieldArgs,
onCurrentPage){if(isFieldCurrentlyShown(depFieldArgs.containerId,depFieldArgs.formId))return;removeFromHideFields(depFieldArgs.containerId,depFieldArgs.formId);if(depFieldArgs.fieldType==="submit"){if(onCurrentPage)showOrEnableSubmitButton(depFieldArgs);return}if(onCurrentPage){setValuesInsideFieldOnPage(depFieldArgs.containerId,depFieldArgs);showFieldContainer(depFieldArgs.containerId);triggerEvent(document,"frmShowField");if(depFieldArgs.inputType==="rte")reInitializeRichText("field_"+depFieldArgs.fieldKey)}else setValuesInsideFieldAcrossPage(depFieldArgs)}
function reInitializeRichText(fieldId){var isVisible="undefined"!==typeof tinyMCE.editors[fieldId]&&!tinyMCE.editors[fieldId].isHidden();if(!isVisible)return;removeRichText(fieldId);initRichText(fieldId)}function showOrEnableSubmitButton(depFieldArgs){if(depFieldArgs.hideDisable&&depFieldArgs.hideDisable==="disable")enableButton("#"+depFieldArgs.containerId);else showFieldContainer(depFieldArgs.containerId);removeSubmitButtonFromHiddenList(depFieldArgs)}function removeSubmitButtonFromHiddenList(depFieldArgs){hiddenSubmitButtons=
hiddenSubmitButtons.filter(function(button){return button!==depFieldArgs.formKey})}function enableButton(buttonSelector){var button=document.querySelector(buttonSelector);if(button&&!button.closest(".frm_loading_form"))button.disabled=false}function setValuesInsideFieldOnPage(container,depFieldArgs){var inputs=getInputsInFieldOnPage(container),inContainer=depFieldArgs.fieldType==="divider"||depFieldArgs.fieldType==="form";setValueForInputs(inputs,inContainer,depFieldArgs.formId,"required")}function setValuesInsideFieldAcrossPage(depFieldArgs){var inputs=
getInputsInFieldAcrossPage(depFieldArgs),inContainer=depFieldArgs.fieldType==="divider"||depFieldArgs.fieldType==="form"||depFieldArgs.isRepeating;setValueForInputs(inputs,inContainer,depFieldArgs.formId)}function getInputsInFieldOnPage(containerId){var container="string"===typeof containerId?document.getElementById(containerId):containerId;return container.querySelectorAll('select[name^="item_meta"], textarea[name^="item_meta"], input[name^="item_meta"]')}function getInputsInFieldAcrossPage(depFieldArgs){var inputs=
[];if(depFieldArgs.fieldType==="divider")inputs=getInputsInHiddenSection(depFieldArgs);else if(depFieldArgs.fieldType==="form")inputs=getInputsInHiddenEmbeddedForm(depFieldArgs);else inputs=getHiddenInputs(depFieldArgs);return inputs}function getHiddenInputs(depFieldArgs){var name="";if(depFieldArgs.isRepeating){var containerFieldId=getContainerFieldId(depFieldArgs);name="item_meta["+containerFieldId+"]["+depFieldArgs.repeatRow+"]["+depFieldArgs.fieldId+"]"}else name="item_meta["+depFieldArgs.fieldId+
"]";return document.querySelectorAll('[name^="'+name+'"]')}function setValueForInputs(inputs,inContainer,formId,setRequired){var input,prevInput,i;if(!inputs.length)return;for(i=0;i<inputs.length;i++){input=inputs[i];if(inContainer&&isChildInputConditionallyHidden(input,formId))continue;if(setRequired==="required")maybeAddRequiredTag(input);if(skipSetValue(i,prevInput,inputs))continue;setDefaultValue(input,inContainer);maybeSetWatchingFieldValue(input);setShownProduct(input);maybeDoCalcForSingleField(input);
prevInput=input}}function maybeAddRequiredTag(input){var isRequired,isOptional;if(input.type==="checkbox"||input.type==="radio"||input.type==="file")return;isRequired=input.parentElement.className.indexOf("frm_required_field");isOptional=input.className.indexOf("frm_optional");if(isRequired>-1&&isOptional===-1)input.setAttribute("aria-required",true)}function skipSetValue(i,prevInput,inputs){var typeArray=["checkbox","radio"];if(i<1||prevInput===undefined)return false;if(null!==inputs[i].getAttribute("data-frmprice"))return false;
var isOther=inputs[i].className.includes("frm_other_input");return isOther||prevInput.name==inputs[i].name&&typeArray.includes(prevInput.type)}function isChildInputConditionallyHidden(input,formId){var fieldDivPart=frmFrontForm.getFieldId(input,true),fieldDivId="frm_field_"+fieldDivPart+"_container";return isFieldConditionallyHidden(fieldDivId,formId)}function showFieldContainer(containerId){var $container=jQuery("#"+containerId).show();if($container.hasClass("frm_inside_container")&&null===$container.find("select").val())$container.find("select").val("").trigger("change")}
function hideFieldAndClearValue(depFieldArgs,onCurrentPage){if(isFieldConditionallyHidden(depFieldArgs.containerId,depFieldArgs.formId))return;addToHideFields(depFieldArgs.containerId,depFieldArgs.formId);if(depFieldArgs.fieldType==="submit"){if(onCurrentPage)hideOrDisableSubmitButton(depFieldArgs);return}if(onCurrentPage){hideFieldContainer(depFieldArgs.containerId);clearInputsInFieldOnPage(depFieldArgs.containerId)}else clearInputsInFieldAcrossPage(depFieldArgs)}function hideOrDisableSubmitButton(depFieldArgs){if(depFieldArgs.containerId==undefined)depFieldArgs.containerId=getSubmitButtonContainerID(depFieldArgs);addSubmitButtonToHiddenList(depFieldArgs);if(depFieldArgs.hideDisable&&depFieldArgs.hideDisable==="disable")disableButton("#"+depFieldArgs.containerId);else hideFieldContainer(depFieldArgs.containerId)}function addSubmitButtonToHiddenList(depFieldArgs){hiddenSubmitButtons.push(depFieldArgs.formKey)}function isOnPageSubmitButtonHidden(formKey){return hiddenSubmitButtons.includes(formKey)}function hidePreviouslyHiddenSubmitButton(submitContainerID){var formId=
submitContainerID.replace("frm_form_","");formId=formId.replace("_container .frm_final_submit","");var depFieldArgs=getRulesForSingleField("submit_"+formId);if(depFieldArgs)hideOrDisableSubmitButton(depFieldArgs)}function getFormKeyFromFormElementID(elementId){return elementId.replace("form_","")}function hideFieldContainer(containerId){jQuery("#"+containerId).hide()}function disableButton(buttonSelector){jQuery(buttonSelector).prop("disabled",true)}function jsonParse(str){try{var obj=JSON.parse(str);
return obj}catch(e){return false}}function clearInputsInFieldOnPage(containerId){var inputs=getInputsInFieldOnPage(containerId);clearValueForInputs(inputs,"required")}function clearInputsInFieldAcrossPage(depFieldArgs){var inputs=getInputsInFieldAcrossPage(depFieldArgs);clearValueForInputs(inputs)}function getInputsInHiddenSection(depFieldArgs){var inputs=[];if(depFieldArgs.fieldType==="divider")inputs=document.querySelectorAll('[data-sectionid="'+depFieldArgs.fieldId+'"]');return inputs}function getInputsInHiddenEmbeddedForm(depFieldArgs){return document.querySelectorAll('[id^="field_'+
depFieldArgs.fieldKey+'-"]')}function changeSelectColor(select){if(select.options[select.selectedIndex]?.classList.contains("frm-select-placeholder")){const styleElement=select.closest(".with_frm_style");const textColorDisabled=styleElement?getComputedStyle(styleElement).getPropertyValue("--text-color-disabled").trim():"";select.style.setProperty("color",textColorDisabled,"important")}}function clearValueForInputs(inputs,required,resetToDefault){var prevInput,blankSelect,valueChanged,l,i,input,defaultVal,
reset,linkedRadioInput;if(inputs.length<1)return;valueChanged=true;l=inputs.length;for(i=0;i<l;i++){input=inputs[i];defaultVal=input.getAttribute("data-frmval");reset=resetToDefault&&defaultVal;if(input.className.includes("frm_dnc")||input.name.includes("[row_ids]")){prevInput=input;continue}if(i>0&&prevInput.name!=input.name&&valueChanged===true)triggerChange(jQuery(prevInput));valueChanged=true;if(input.type==="radio"||input.type==="checkbox"){if(!reset)input.checked=false;else if("radio"===input.type)input.checked=
defaultVal===input.value;else resetCheckboxInputToValue(input,defaultVal);maybeClearStarRatingInput(input)}else if(input.tagName==="SELECT")if(isSlimSelect(input))setSlimValue(input,reset?defaultVal:"");else{if(!reset&&resetToDefault&&input.getAttribute("data-placeholder")){reset=true;defaultVal=""}if(!reset){blankSelect=input.selectedIndex===0&&input.options[0].text.trim()==="";if(blankSelect||input.selectedIndex===-1)valueChanged=false;else input.selectedIndex=-1}else valueChanged=resetSelectInputToValue(input,
defaultVal);const chosenId=input.id.replace(/[^\w]/g,"_");const autocomplete=document.getElementById(chosenId+"_chosen");if(autocomplete!==null)jQuery(input).trigger("chosen:updated")}else if(input.type==="range"){let sliderDefault=defaultVal;if(!reset){const min=parseFloat(input.getAttribute("min"));const max=parseFloat(input.getAttribute("max"));const mid=(max-min)/2+min;const step=parseFloat(input.getAttribute("step"),10);const midSteps=Math.round(mid/step);sliderDefault=midSteps*step;input.parentElement.querySelector(".frm_range_value").textContent=
sliderDefault}input.value=sliderDefault;initRangeInput([input])}else if(input.getAttribute("data-frmprice")!==null)setHiddenProduct(input);else{if(!reset)input.value="";else input.value=defaultVal;linkedRadioInput=input.id.includes("-otext")?document.getElementById(input.id.replace("-otext","")):null;if(linkedRadioInput&&linkedRadioInput.checked===false)input.classList.add("frm_pos_none");if(null!==input.getAttribute("data-frmfile"))clearDropzoneFiles(input);if(input.type==="hidden"&&input.closest(".frm_range_container "))resetRangeInput(input)}if(required==="required"){input.required=false;input.setAttribute("aria-required",false)}prevInput=inputs[i]}if(valueChanged===true)triggerChange(jQuery(prevInput))}function resetRangeInput(input){const rangeContainer=input.parentElement;const rangeSliderWrapperClone=rangeContainer.querySelector(".frm-slider-wrapper").cloneNode(true);rangeContainer.querySelector("div:last-of-type").replaceChild(rangeSliderWrapperClone,rangeContainer.querySelector(".frm-slider-wrapper"));initializeRangeSlider(input,rangeContainer)}
function setSlimValue(input,value){if(value.length&&"["===value[0]&&-1!==value.indexOf(",")&&"]"===value[value.length-1]&&"multiple"===input.getAttribute("multiple"))value=JSON.parse(value);input.slim.setSelected(value)}function maybeClearStarRatingInput(input){var starGroup,checkedInput;if("radio"!==input.type||!input.matches(".frm-star-group input:last-of-type"))return;starGroup=input.closest(".frm-star-group");checkedInput=starGroup.querySelector("input:checked");if(checkedInput)updateStars(checkedInput);
else clearStars(starGroup,true)}function resetCheckboxInputToValue(input,val){var i;val=jsonParse(val);if(!val)return;for(i in val)if(val[i]===input.value){input.checked=true;return}input.checked=false}function resetSelectInputToValue(input,val){if(input.multiple)return resetMultiSelectInputToValue(input,val);var i,valueChanged=false,options=input.querySelectorAll("option");for(i=0;i<options.length;i++){if(val===options[i].value&&!options[i].selected){options[i].selected=true;valueChanged=true;continue}if(val!==options[i].value&&options[i].selected){options[i].selected=false;valueChanged=true}}return valueChanged}function resetMultiSelectInputToValue(input,val){val=jsonParse(val);if(!val)return false;var i,contained,valueChanged=false,options=input.querySelectorAll("option");for(i=0;i<options.length;i++){contained=objectContainValue(val,options[i].value);if(contained&&!options[i].selected){options[i].selected=true;valueChanged=true;continue}if(!contained&&options[i].selected){options[i].selected=false;valueChanged=
true}}return valueChanged}function objectContainValue(obj,val){var x;for(x in obj)if(obj[x]===val)return true;return false}function clearDropzoneFiles(hiddenFileIdField){var dropzoneElement=hiddenFileIdField.nextElementSibling;if(dropzoneElement&&-1!==dropzoneElement.className.indexOf("frm_dropzone")&&"object"===typeof dropzoneElement.dropzone&&"function"===typeof dropzoneElement.dropzone.removeAllFiles)dropzoneElement.dropzone.removeAllFiles(true)}function isFieldCurrentlyShown(containerId,formId){return isFieldConditionallyHidden(containerId,
formId)===false}function isFieldConditionallyHidden(containerId,formId){var hidden=false,hiddenFields=getHiddenFields(formId);if(hiddenFields.includes(containerId))hidden=true;return hidden}function clearHideFields(){var hideFieldInputs=document.querySelectorAll('[id^="frm_hide_fields_"]');clearValueForInputs(hideFieldInputs)}function addToHideFields(htmlFieldId,formId){var hiddenFields=getHiddenFields(formId);if(hiddenFields.includes(htmlFieldId));else{hiddenFields.push(htmlFieldId);hiddenFields=
JSON.stringify(hiddenFields);var frmHideFieldsInput=document.getElementById("frm_hide_fields_"+formId);if(frmHideFieldsInput!==null)frmHideFieldsInput.value=hiddenFields}}function getAllHiddenFields(){var formId,i,hiddenFields=[],hideFieldInputs=document.querySelectorAll('*[id^="frm_hide_fields_"]'),formTotal=hideFieldInputs.length;for(i=0;i<formTotal;i++){formId=hideFieldInputs[i].id.replace("frm_hide_fields_","");hiddenFields=hiddenFields.concat(getHiddenFields(formId))}return hiddenFields}function getHiddenFields(formId){var hiddenFields=
[];var frmHideFieldsInput=document.getElementById("frm_hide_fields_"+formId);if(frmHideFieldsInput===null)return hiddenFields;hiddenFields=frmHideFieldsInput.value;if(hiddenFields)hiddenFields=JSON.parse(hiddenFields);else hiddenFields=[];return hiddenFields}function setDefaultValue(input,inContainer){var placeholder,isMultipleSelect,$input=jQuery(input),defaultValue=$input.data("frmval");if(defaultValue===undefined&&input.classList.contains("wp-editor-area")){var defaultField=document.getElementById(input.id+
"-frmval");if(defaultField!==null){defaultValue=defaultField.value;var targetTinyMceEditor=tinymce.get(input.id);if(null!==targetTinyMceEditor)targetTinyMceEditor.setContent(defaultValue)}}else if(defaultValue===undefined&&input.type==="hidden"){var $select=$input.next("select[disabled]");if($select.length>0)defaultValue=$select.data("frmval")}placeholder=defaultValue;defaultValue=setDropdownPlaceholder(defaultValue,input);if(placeholder!==defaultValue)placeholder=true;if(defaultValue!==undefined){var numericKey=
new RegExp(/\[\d*\]$/i);if(input.type==="checkbox"||input.type==="radio")setCheckboxOrRadioDefaultValue(input.name,defaultValue);else if(input.type==="hidden"&&input.name.includes("[]"))setHiddenCheckboxDefaultValue(input.name,defaultValue);else if(!inContainer&&input.type==="hidden"&&input.name.includes("][")&&numericKey.test(input.name))setHiddenCheckboxDefaultValue(input.name.replace(numericKey,""),defaultValue);else{isMultipleSelect=false;if(placeholder&&"boolean"!==typeof placeholder&&input.tagName==="SELECT"&&-1!==input.className.indexOf("frm_chzn"))placeholder=false;if("SELECT"===input.tagName&&"multiple"===input.getAttribute("multiple"))isMultipleSelect=true;if(defaultValue.constructor===Object)if(!isMultipleSelect){var addressType=input.getAttribute("name").split("[").slice(-1)[0];if(addressType!==null){addressType=addressType.replace("]","");defaultValue=defaultValue[addressType];if(defaultValue===undefined)defaultValue=""}}if(isMultipleSelect)selectMultiselectOptions(input,defaultValue);
else{if(typeof defaultValue==="object")defaultValue="["+defaultValue+"]";if(isSlimSelect(input)){if(""===defaultValue)maybeRemoveHiddenPlaceholder(input);input.slim.setSelected(defaultValue)}else if(input.classList.contains("frm_chzn")){if(""===defaultValue)maybeRemoveHiddenPlaceholder(input);jQuery(input).val(defaultValue).trigger("chosen:updated")}else{input.value=defaultValue;if("hidden"===input.type&&input.dataset.isRangeSliderInitialized)input.dispatchEvent(new Event("change"));if("range"===input.type)input.dispatchEvent(new Event("input"))}}if("SELECT"===input.tagName)changeSelectColor(input)}if(!placeholder&&input.tagName==="SELECT"){maybeUpdateChosenOptions(input);if(input.value==="")setOtherSelectValue(input,defaultValue)}triggerChange($input)}else if("SELECT"===input.tagName)maybeRemoveHiddenPlaceholder(input)}function maybeRemoveHiddenPlaceholder(input){const hiddenPlaceholder=input.querySelector('option[value=""].frm_hidden.frm_hidden_placeholder');if(!hiddenPlaceholder)return false;
hiddenPlaceholder.remove();return true}function isSlimSelect(input){return input.classList.contains("frm_slimselect")&&"object"===typeof input.slim}function selectMultiselectOptions(select,values){if(isSlimSelect(select)&&"function"===typeof Object.values){select.slim.setSelected(Object.values(values));return}var valueKey,option;for(valueKey in values){option=select.querySelector('option[value="'+values[valueKey]+'"]');if(option)option.selected=true}}function setDropdownPlaceholder(defaultValue,input){var placeholder;
if(defaultValue===undefined&&input.tagName==="SELECT"){placeholder=input.getAttribute("data-placeholder");if(placeholder!==null)defaultValue=""}return defaultValue}function setCheckboxOrRadioDefaultValue(inputName,defaultValue){var radioInputs=document.getElementsByName(inputName),isSet=false,firstInput=false;if(typeof defaultValue==="object")defaultValue=Object.keys(defaultValue).map(function(key){return defaultValue[key]});let hiddenFieldIndex=0;for(var i=0,l=radioInputs.length;i<l;i++){if(firstInput===false)firstInput=radioInputs[i];if(radioInputs[i].type==="hidden"){if(Array.isArray(defaultValue)&&defaultValue[hiddenFieldIndex]!==null&&"undefined"!==typeof defaultValue[hiddenFieldIndex])radioInputs[i].value=defaultValue[hiddenFieldIndex];else radioInputs[i].value=defaultValue;hiddenFieldIndex++;isSet=true}else if(radioInputs[i].value==defaultValue||Array.isArray(defaultValue)&&defaultValue.includes(radioInputs[i].value)){radioInputs[i].checked=true;isSet=true;if(radioInputs[i].type==="radio")break}}if(!isSet&&
firstInput!==false)setOtherValueLimited(firstInput,defaultValue)}function setHiddenCheckboxDefaultValue(inputName,defaultValue){var hiddenInputs=jQuery('input[name^="'+inputName+'"]').get();if(typeof defaultValue==="object")defaultValue=Object.keys(defaultValue).map(function(key){return defaultValue[key]});if(Array.isArray(defaultValue))for(var i=0,l=defaultValue.length;i<l;i++)if(i in hiddenInputs)hiddenInputs[i].value=defaultValue[i];else;else if(hiddenInputs[0]!==null&&hiddenInputs[0]!==undefined)hiddenInputs[0].value=
defaultValue}function removeFromHideFields(htmlFieldId,formId){var hiddenFields=getHiddenFields(formId);var itemIndex=hiddenFields.indexOf(htmlFieldId);if(itemIndex>-1){hiddenFields.splice(itemIndex,1);hiddenFields=JSON.stringify(hiddenFields);var frmHideFieldsInput=document.getElementById("frm_hide_fields_"+formId);frmHideFieldsInput.value=hiddenFields}}function checkFieldsWatchingLookup(fieldId,changedInput,originalEvent){if(typeof __FRMLOOKUP==="undefined"||__FRMLOOKUP[fieldId]===undefined||__FRMLOOKUP[fieldId].dependents.length<
1||changedInput===null||changedInput===undefined)return;var triggerFieldArgs=__FRMLOOKUP[fieldId];var parentRepeatArgs=getRepeatArgsFromFieldName(changedInput[0].name);for(var i=0,l=triggerFieldArgs.dependents.length;i<l;i++)updateWatchingFieldById(triggerFieldArgs.dependents[i],parentRepeatArgs,originalEvent)}function updateWatchingFieldById(fieldId,parentRepeatArgs,originalEvent){var childFieldArgs=getLookupArgsForSingleField(fieldId);if(childFieldArgs===false||childFieldArgs.parents.length<1)return;
if(childFieldArgs.fieldType==="lookup")updateLookupFieldOptions(childFieldArgs,parentRepeatArgs);else if(originalEvent==="value changed")updateWatchingFieldValue(childFieldArgs,parentRepeatArgs)}function updateLookupFieldOptions(childFieldArgs,parentRepeatArgs){var childFieldElements=[];if(parentRepeatArgs.repeatRow!=="")childFieldElements=getRepeatingFieldDivOnCurrentPage(childFieldArgs,parentRepeatArgs);else childFieldElements=getAllFieldDivsOnCurrentPage(childFieldArgs);for(var i=0,l=childFieldElements.length;i<
l;i++){addRepeatRow(childFieldArgs,childFieldElements[i].id);updateSingleLookupField(childFieldArgs,childFieldElements[i])}processPendingLookups()}function processPendingLookups(){const unprocessedPendingLookups=getUnprocessedPendingLookups();if(!unprocessedPendingLookups.length)return;const formId=unprocessedPendingLookups[0].childFieldArgs.formId;const allFormIds=[];const batchSize=20;const batches=Math.ceil(unprocessedPendingLookups.length/batchSize);for(let batchNumber=0;batchNumber<batches;++batchNumber){const start=
batchNumber*batchSize;const end=start+batchSize;const currentBatch=unprocessedPendingLookups.slice(start,end);currentBatch.forEach(function(pendingLookup){pendingLookup.pending=false;allFormIds.push(pendingLookup.childFieldArgs.formId)});postToAjaxUrl(getFormById(formId),{action:"frm_replace_lookup_field_options_arr",postData:currentBatch.map(pendingLookup=>pendingLookup.childFieldArgs),nonce:frm_js.nonce},function(newOptionsByFieldId){allFormIds.forEach(enableFormAfterLookup);Object.entries(newOptionsByFieldId).forEach(entry=>
{const key=entry[0];const newOptions=entry[1];const optionLabels="undefined"!==typeof newOptionsByFieldId[key+"_label"]?newOptionsByFieldId[key+"_label"]:[];currentBatch.forEach(function(pendingLookup){if(!isNaN(key)&&pendingLookup.childFieldArgs.unique===parseInt(key))pendingLookup.callback(newOptions,optionLabels)})})},false,{dataType:"json"})}}function getUnprocessedPendingLookups(){return pendingLookupFieldAjax.filter(pendingLookup=>pendingLookup.pending)}function getRepeatingFieldDivOnCurrentPage(childFieldArgs,
parentRepeatArgs){var childFieldDivs=[],selector="frm_field_"+childFieldArgs.fieldId+"-";selector+=parentRepeatArgs.repeatingSection+"-"+parentRepeatArgs.repeatRow+"_container";var container=document.getElementById(selector);if(container!==null)childFieldDivs.push(container);return childFieldDivs}function updateWatchingFieldValue(childFieldArgs,parentRepeatArgs){var childFieldElements=getAllTextFieldInputs(childFieldArgs,parentRepeatArgs);for(var i=0,l=childFieldElements.length;i<l;i++){addRepeatRowForInput(childFieldElements[i].name,
childFieldArgs);updateSingleWatchingField(childFieldArgs,childFieldElements[i])}}function getLookupArgsForSingleField(fieldId){if(typeof __FRMLOOKUP==="undefined"||__FRMLOOKUP[fieldId]===undefined)return false;return __FRMLOOKUP[fieldId]}function updateSingleLookupField(childFieldArgs,childElement){childFieldArgs.parentVals=getParentLookupFieldVals(childFieldArgs);if(childFieldArgs.inputType==="select")maybeReplaceSelectLookupFieldOptions(childFieldArgs,childElement);else if(childFieldArgs.inputType==="radio"||childFieldArgs.inputType==="checkbox")maybeReplaceCbRadioLookupOptions(childFieldArgs,childElement);else if(childFieldArgs.inputType==="data")maybeReplaceLookupList(childFieldArgs,childElement)}function updateSingleWatchingField(childFieldArgs,childElement){childFieldArgs.parentVals=getParentLookupFieldVals(childFieldArgs);if(currentLookupHasQueue(childElement.id)){addLookupToQueueOfTwo(childFieldArgs,childElement);return}addLookupToQueueOfTwo(childFieldArgs,childElement);maybeInsertValueInFieldWatchingLookup(childFieldArgs,
childElement)}function getAllTextFieldInputs(childFieldArgs,parentRepeatArgs){var selector="field_"+childFieldArgs.fieldKey;if(childFieldArgs.isRepeating)if(parentRepeatArgs.repeatingSection!=="")selector='[id="'+selector+"-"+parentRepeatArgs.repeatRow+'"]';else selector='[id^="'+selector+'-"]';else selector='[id="'+selector+'"]';return document.querySelectorAll(selector)}function maybeSetWatchingFieldValue(input){var fieldId=frmFrontForm.getFieldId(input,false),childFieldArgs=getLookupArgsForSingleField(fieldId);
if(childFieldArgs===false||childFieldArgs.fieldType==="lookup")return;updateSingleWatchingField(childFieldArgs,input)}function getAllFieldDivsOnCurrentPage(childFieldArgs){var childFieldDivs=[];if(childFieldArgs.isRepeating)childFieldDivs=document.querySelectorAll(".frm_field_"+childFieldArgs.fieldId+"_container");else{var container=document.getElementById("frm_field_"+childFieldArgs.fieldId+"_container");if(container!==null)childFieldDivs.push(container)}return childFieldDivs}function getParentLookupFieldVals(childFieldArgs){var parentFieldArgs,
parentVals=[],parentIds=childFieldArgs.parents,parentValue=false;for(var i=0,l=parentIds.length;i<l;i++){parentFieldArgs=getLookupArgsForSingleField(parentIds[i]);parentValue=getFieldValue(parentFieldArgs,childFieldArgs);if(parentValue===""||parentValue===false){parentVals=false;break}parentVals[i]=parentValue}return parentVals}function getValueFromRadioInputs(radioInputs){var radioValue=false,l=radioInputs.length;for(var i=0;i<l;i++)if(radioInputs[i].type==="hidden"||radioInputs[i].checked){radioValue=
radioInputs[i].value;break}return radioValue}function maybeReplaceSelectLookupFieldOptions(childFieldArgs,childDiv){var childSelect=childDiv.getElementsByTagName("SELECT")[0];if(childSelect===null)return;var currentValue=childSelect.value;if(childFieldArgs.parentVals===false){childSelect.options.length=1;childSelect.value="";maybeUpdateChosenOptions(childSelect);if(currentValue!=="")triggerChange(jQuery(childSelect),childFieldArgs.fieldKey)}else{disableLookup(childSelect);disableFormPreLookup(childFieldArgs.formId);
getLookupValues(childFieldArgs,function(newOptions,optionLabels){replaceSelectLookupFieldOptions(childFieldArgs,childSelect,newOptions,optionLabels);triggerLookupOptionsLoaded(jQuery(childDiv));enableFormAfterLookup(childFieldArgs.formId)})}}function maybeUpdateChosenOptions(childSelect){if(childSelect.className.includes("frm_chzn")&&jQuery().chosen)jQuery(childSelect).trigger("chosen:updated")}function disableLookup(childSelect){childSelect.className=childSelect.className+" frm_loading_lookup";childSelect.disabled=
true;maybeUpdateChosenOptions(childSelect)}function disableFormPreLookup(formId){processesRunning++;if(processesRunning===1){var form=getFormById(formId);if(form!==null)frmFrontForm.showSubmitLoading(jQuery(form))}}function enableFormAfterLookup(formId){var form;processesRunning--;if(processesRunning<=0){form=getFormById(formId);if(form!==null)removeSubmitLoading(form,formId,processesRunning)}}function getFormById(formId){var form=document.querySelector("#frm_form_"+formId+"_container form");if(form===null){form=document.getElementById("frm_form_"+formId+"_container");if(form!==null)form=form.closest("form")}return form}function enableLookup(childSelect,isReadOnly){if(isReadOnly===false)childSelect.disabled=false;childSelect.className=childSelect.className.replace(" frm_loading_lookup","")}function isMultiSelect(element){return element.tagName.toLowerCase()==="select"&&element.multiple}function getSelectedOptions(element){if(isSlimSelect(element))return element.slim.getSelected();if(!isMultiSelect(element))return element.value;
var i,option,selectedOptions=[];for(i=0;i<element.options.length;i++){option=element.options[i];if(option.selected)selectedOptions.push(option.value)}return selectedOptions}function setSelectedOptions(element,values){var option;if(!isMultiSelect(element)){element.value=values;return}Array.from(element.options).forEach(function(option){option.selected=false});values.forEach(function(value){option=element.querySelector('option[value="'+value+'"]');if(option)option.selected=true})}function replaceSelectLookupFieldOptions(fieldArgs,
childSelect,newOptions,optionLabels){var origVal,i,optsLength,newOption,optionData;origVal=getSelectedOptions(childSelect);for(i=childSelect.options.length;i>0;i--)childSelect.remove(i);optsLength=newOptions.length;optionData=[];if(childSelect.options.length>0&&""===childSelect.options[0].value)optionData.push({text:childSelect.options[0].textContent,value:childSelect.options[0].value,placeholder:true});for(i=0;i<optsLength;i++){const optionLabel=optionLabels[i]||newOptions[i];newOption=new Option(optionLabel,
newOptions[i],false,false);childSelect.options[i+1]=newOption;optionData.push(newOption)}if(childSelect.slim)childSelect.slim.setData(optionData);setSelectLookupVal(childSelect,origVal);enableLookup(childSelect,fieldArgs.isReadOnly);maybeUpdateChosenOptions(childSelect);if(getSelectedOptions(childSelect).toString()!==origVal.toString())triggerChange(jQuery(childSelect),fieldArgs.fieldKey)}function setSelectLookupVal(childSelect,origVal){if(isSlimSelect(childSelect)){if(!valueIsSingleItemArrayWithEmptyString(origVal))setSlimValue(childSelect,
origVal);return}setSelectedOptions(childSelect,origVal);if(childSelect.value===""){var defaultValue=childSelect.getAttribute("data-frmval");if(defaultValue!==null)childSelect.value=defaultValue}if(childSelect.value==="")childSelect.value=""}function valueIsSingleItemArrayWithEmptyString(value){return Array.isArray(value)&&1===value.length&&""===value[0]}function maybeReplaceCbRadioLookupOptions(childFieldArgs,childDiv){if(childFieldArgs.parentVals===false){var inputs=childDiv.getElementsByTagName("input");
maybeHideRadioLookup(childFieldArgs,childDiv);clearValueForInputs(inputs)}else replaceCbRadioLookupOptions(childFieldArgs,childDiv)}function replaceCbRadioLookupOptions(childFieldArgs,childDiv){var optContainer,inputs,currentValue,defaultValue,form,data,success;optContainer=childDiv.getElementsByClassName("frm_opt_container")[0];inputs=optContainer.getElementsByTagName("input");currentValue="";addLoadingIconJS(childDiv,optContainer);if(childFieldArgs.inputType=="radio")currentValue=getValueFromRadioInputs(inputs);
else currentValue=getValuesFromCheckboxInputs(inputs);defaultValue=jQuery(inputs[0]).data("frmval");disableFormPreLookup(childFieldArgs.formId);form=getFormById(childFieldArgs.formId);data={action:"frm_replace_cb_radio_lookup_options",parent_fields:childFieldArgs.parents,parent_vals:childFieldArgs.parentVals,field_id:childFieldArgs.fieldId,container_field_id:getContainerFieldId(childFieldArgs),row_index:childFieldArgs.repeatRow,current_value:currentValue,default_value:defaultValue,nonce:frm_js.nonce};
success=function(newHtml){var input;optContainer.innerHTML=newHtml;removeLoadingIconJS(childDiv,optContainer);if(inputs.length==1&&inputs[0].value==="")maybeHideRadioLookup(childFieldArgs,childDiv);else{maybeShowRadioLookup(childFieldArgs,childDiv);maybeSetDefaultCbRadioValue(childFieldArgs,inputs,defaultValue)}input=inputs[0];triggerChange(jQuery(input),childFieldArgs.fieldKey);triggerLookupOptionsLoaded(jQuery(childDiv));enableFormAfterLookup(childFieldArgs.formId)};postToAjaxUrl(form,data,success)}
function maybeReplaceLookupList(childFieldArgs,childDiv){var inputs=childDiv.getElementsByTagName("input"),content=inputs[0].previousElementSibling;if(childFieldArgs.parentVals===false){maybeHideRadioLookup(childFieldArgs,childDiv);if(content!==undefined)content.innerHTML=""}else getLookupValues(childFieldArgs,function(response,optionLabels){content.innerHTML=optionLabels.length?optionLabels.join(", "):response.join(", ");inputs[0].value=response;maybeShowRadioLookup(childFieldArgs,childDiv);triggerLookupOptionsLoaded(jQuery(childDiv))})}
function getLookupValues(childFieldArgs,callback){disableFormPreLookup(childFieldArgs.formId);const pendingLookupArgs={formId:childFieldArgs.formId,fieldId:childFieldArgs.fieldId,parents:childFieldArgs.parents,parentVals:childFieldArgs.parentVals,unique:getAutoId()};pendingLookupFieldAjax.push({childFieldArgs:pendingLookupArgs,callback,pending:true})}function getAutoId(){return autoId++}function triggerLookupOptionsLoaded($fieldDiv){$fieldDiv.trigger("frmLookupOptionsLoaded")}function maybeSetDefaultCbRadioValue(childFieldArgs,
inputs,defaultValue){if(defaultValue===undefined)return;var currentValue=false;if(childFieldArgs.inputType==="radio")currentValue=getValueFromRadioInputs(inputs);else currentValue=getValuesFromCheckboxInputs(inputs);if(currentValue!==false||inputs.length<1)return;var inputName=inputs[0].name;setCheckboxOrRadioDefaultValue(inputName,defaultValue)}function maybeHideRadioLookup(childFieldArgs,childDiv){if(isFieldConditionallyHidden(childDiv.id,childFieldArgs.formId))return;hideFieldContainer(childDiv.id);
addToHideFields(childDiv.id,childFieldArgs.formId)}function maybeShowRadioLookup(childFieldArgs,childDiv){if(isFieldCurrentlyShown(childDiv.id,childFieldArgs.formId))return;var logicArgs=getRulesForSingleField(childFieldArgs.fieldId);if(logicArgs===false||logicArgs.conditions.length<1){removeFromHideFields(childDiv.id,childFieldArgs.formId);showFieldContainer(childDiv.id)}else{logicArgs.containerId=childDiv.id;logicArgs.repeatRow=childFieldArgs.repeatRow;hideOrShowSingleField(logicArgs)}}function maybeInsertValueInFieldWatchingLookup(childFieldArgs,
childInput){if(isChildInputConditionallyHidden(childInput,childFieldArgs.formId)){checkQueueAfterLookupCompleted(childInput.id);return}if(childFieldArgs.parentVals===false){var newValue=childInput.getAttribute("data-frmval");if(newValue===null)newValue="";insertValueInFieldWatchingLookup(childFieldArgs,childInput,newValue);checkQueueAfterLookupCompleted(childInput.id)}else{disableFormPreLookup(childFieldArgs.formId);postToAjaxUrl(getFormById(childFieldArgs.formId),{action:"frm_get_lookup_text_value",
parent_fields:childFieldArgs.parents,parent_vals:childFieldArgs.parentVals,field_id:childFieldArgs.fieldId,nonce:frm_js.nonce},function(newValue){if(!isChildInputConditionallyHidden(childInput,childFieldArgs.formId)&&childInput.value!=newValue)insertValueInFieldWatchingLookup(childFieldArgs.fieldKey,childInput,newValue);enableFormAfterLookup(childFieldArgs.formId);checkQueueAfterLookupCompleted(childInput.id)})}}function currentLookupHasQueue(elementId){return elementId in lookupQueues&&lookupQueues[elementId].length>
0}function addLookupToQueueOfTwo(childFieldArgs,childInput){var elementId=childInput.id;if(elementId in lookupQueues){if(lookupQueues[elementId].length>=2)lookupQueues[elementId]=lookupQueues[elementId].slice(0,1)}else lookupQueues[elementId]=[];lookupQueues[elementId].push({childFieldArgs:childFieldArgs,childInput:childInput})}function checkQueueAfterLookupCompleted(elementId){removeLookupFromQueue(elementId);doNextItemInLookupQueue(elementId)}function removeLookupFromQueue(elementId){lookupQueues[elementId].shift()}
function doNextItemInLookupQueue(elementId){if(!currentLookupHasQueue(elementId))return;const childFieldArgs=lookupQueues[elementId][0].childFieldArgs;const childInput=lookupQueues[elementId][0].childInput;updateParentValsForLookup(childInput.name,childFieldArgs);maybeInsertValueInFieldWatchingLookup(childFieldArgs,childInput)}function updateParentValsForLookup(childInputName,childFieldArgs){if(!childInputName)return;childFieldArgs.repeatRow=getRepeatArgsFromFieldName(childInputName).repeatRow;childFieldArgs.parentVals=
getParentLookupFieldVals(childFieldArgs)}function decodeEntities(string){var decoded=string.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'");return decoded}function insertValueInFieldWatchingLookup(fieldKey,childInput,newValue){childInput.value=decodeEntities(newValue);triggerChange(jQuery(childInput),fieldKey)}function addRepeatRowForInput(fieldName,childFieldArgs){var repeatArgs=getRepeatArgsFromFieldName(fieldName);if(repeatArgs.repeatRow!=="")childFieldArgs.repeatRow=repeatArgs.repeatRow;else childFieldArgs.repeatRow=""}function updateDynamicField(depFieldArgs,onCurrentPage){var depFieldArgsCopy=cloneObjectForDynamicFields(depFieldArgs);if(depFieldArgsCopy.inputType==="data")updateDynamicListData(depFieldArgsCopy,onCurrentPage);else if(onCurrentPage)updateDynamicFieldOptions(depFieldArgsCopy)}function cloneObjectForDynamicFields(depFieldArgs){var dataLogic={actualValue:depFieldArgs.dataLogic.actualValue,fieldId:depFieldArgs.dataLogic.fieldId};
var dynamicFieldArgs={fieldId:depFieldArgs.fieldId,fieldKey:depFieldArgs.fieldKey,formId:depFieldArgs.formId,containerId:depFieldArgs.containerId,repeatRow:depFieldArgs.repeatRow,dataLogic:dataLogic,children:"",inputType:depFieldArgs.inputType};return dynamicFieldArgs}pendingDynamicFieldAjax=[];function updateDynamicListData(depFieldArgs,onCurrentPage){var $fieldDiv;if(onCurrentPage){$fieldDiv=jQuery("#"+depFieldArgs.containerId);addLoadingIcon($fieldDiv)}pendingDynamicFieldAjax.push({args:{depFieldArgs:depFieldArgs,
onCurrentPage:onCurrentPage},data:{entry_id:depFieldArgs.dataLogic.actualValue,current_field:depFieldArgs.fieldId,hide_id:depFieldArgs.containerId,on_current_page:onCurrentPage,nonce:frm_js.nonce}})}function updateDynamicFieldOptions(depFieldArgs){var $fieldDiv=jQuery("#"+depFieldArgs.containerId),$fieldInputs=$fieldDiv.find('select[name^="item_meta"], input[name^="item_meta"]'),prevValue=getFieldValueFromInputs($fieldInputs),defaultVal=$fieldInputs.data("frmval"),editingEntry=$fieldDiv.closest("form").find('input[name="id"]').val();
addLoadingIcon($fieldDiv);postToAjaxUrl(getFormById(depFieldArgs.formId),{action:"frm_fields_ajax_data_options",trigger_field_id:depFieldArgs.dataLogic.fieldId,entry_id:depFieldArgs.dataLogic.actualValue,field_id:depFieldArgs.fieldId,default_value:defaultVal,container_id:depFieldArgs.containerId,editing_entry:editingEntry,prev_val:prevValue,nonce:frm_js.nonce},function(html){var $optContainer=$fieldDiv.find(".frm_opt_container, .frm_data_container");$optContainer.html(html);var $dynamicFieldInputs=
$optContainer.find('select, input[type="checkbox"], input[type="radio"]');removeLoadingIcon($optContainer);if(html===""||$dynamicFieldInputs.length<1)hideDynamicField(depFieldArgs);else{var valueChanged=dynamicFieldValueChanged(depFieldArgs,$dynamicFieldInputs,prevValue);showDynamicField(depFieldArgs,$fieldDiv,$dynamicFieldInputs,valueChanged)}})}function dynamicFieldValueChanged(depFieldArgs,$dynamicFieldInputs,prevValue){var newValue=getFieldValueFromInputs($dynamicFieldInputs);return prevValue!==newValue}function updateHiddenDynamicListField(depFieldArgs,newValue){var inputId="field_"+depFieldArgs.fieldKey;if(depFieldArgs.repeatRow!=="")inputId+="-"+depFieldArgs.repeatRow;var listInput=document.getElementById(inputId);if(listInput===null)return;listInput.value=newValue;if(isFieldConditionallyHidden(depFieldArgs.containerId,depFieldArgs.formId))removeFromHideFields(depFieldArgs.containerId,depFieldArgs.formId);triggerChange(jQuery(listInput))}function addLoadingIcon($fieldDiv){var currentHTML=
$fieldDiv.html();if(currentHTML.includes("frm-loading-img"));else{var loadingIcon='<span class="frm-loading-img"></span>';$fieldDiv.html(currentHTML+loadingIcon);var $optContainer=$fieldDiv.find(".frm_opt_container, .frm_data_container");$optContainer.hide()}}function addLoadingIconJS(fieldDiv,optContainer){var currentHTML=fieldDiv.innerHTML;if(currentHTML.includes("frm-loading-img"));else{optContainer.classList.add("frm_hidden");var loadingIcon=document.createElement("span");loadingIcon.setAttribute("class",
"frm-loading-img");fieldDiv.insertBefore(loadingIcon,optContainer.nextSibling)}}function removeLoadingIcon($optContainer){$optContainer.parent().children(".frm-loading-img").remove();$optContainer.show()}function removeLoadingIconJS(fieldDiv,optContainer){var loadingIcon=fieldDiv.getElementsByClassName("frm-loading-img")[0];if(loadingIcon!==null&&loadingIcon!==undefined)loadingIcon.parentNode.removeChild(loadingIcon);optContainer.classList.remove("frm_hidden")}function getFieldValueFromInputs($inputs){var fieldValue=
[],currentValue="";$inputs.each(function(){currentValue=this.value;if(this.type==="radio"||this.type==="checkbox"){if(this.checked===true)fieldValue.push(currentValue)}else if(currentValue!=="")fieldValue.push(currentValue)});if(fieldValue.length===0)fieldValue="";return fieldValue}function hideDynamicField(depFieldArgs){hideFieldAndClearValue(depFieldArgs,true)}function showDynamicField(depFieldArgs,$fieldDiv,$fieldInputs,valueChanged){if(isFieldConditionallyHidden(depFieldArgs.containerId,depFieldArgs.formId)){removeFromHideFields(depFieldArgs.containerId,
depFieldArgs.formId);$fieldDiv.show()}if($fieldInputs.hasClass("frm_chzn")||$fieldInputs.hasClass("frm_slimselect"))loadAutocomplete();if(valueChanged===true)triggerChange($fieldInputs)}function triggerCalc(){if(typeof __FRMCALC==="undefined")return;var triggers=__FRMCALC.triggers;if(triggers)jQuery(triggers.join()).trigger({type:"change",selfTriggered:true});triggerCalcWithoutFields()}function triggerCalcWithoutFields(){var calcs=__FRMCALC.calc,vals=[];for(var fieldKey in calcs)if(calcs[fieldKey].fields.length<
1&&calcs[fieldKey].calc&&"0"!==calcs[fieldKey].calc){var totalField=document.getElementById("field_"+fieldKey);if(totalField!==null&&!isChildInputConditionallyHidden(totalField,calcs[fieldKey].form_id))doSingleCalculation(__FRMCALC,fieldKey,vals)}}function doCalculation(fieldId,triggerField){if(typeof __FRMCALC==="undefined")return;var allCalcs=__FRMCALC,calc=allCalcs.fields[fieldId],vals=[];if(calc===undefined)return;var keys=calc.total;var len=keys.length;var pages=getStartEndPage(allCalcs.calc[keys[0]]);
for(var i=0,l=len;i<l;i++){var totalOnPage=isTotalFieldOnPage(allCalcs.calc[keys[i]],pages);if(totalOnPage&&isTotalFieldConditionallyHidden(allCalcs.calc[keys[i]],triggerField.attr("name"))===false)doSingleCalculation(allCalcs,keys[i],vals,triggerField)}}function getStartEndPage(thisField){var formId=thisField.form_id,formContainer=document.getElementById("frm_form_"+formId+"_container");if(formContainer===null&&thisField.in_section){var fieldContainer=document.getElementById("frm_field_"+thisField.in_section+
"_container");if(fieldContainer===null)return[];formContainer=closest(fieldContainer,function(el){return el.tagName==="FORM"});formId=formContainer.elements.namedItem("form_id").value}var hasPreviousPage=formContainer.getElementsByClassName("frm_next_page");var hasAnotherPage=document.getElementById("frm_page_order_"+formId);var pages=[];if(hasPreviousPage.length>0)pages.start=hasPreviousPage[0];if(hasAnotherPage!==null)pages.end=hasAnotherPage;return pages}function closest(el,fn){return el&&(fn(el)?
el:closest(el.parentNode,fn))}function isTotalFieldOnPage(calcDetails,pages){if(pages.start!==undefined||pages.end!==undefined){var hiddenTotalField=jQuery('input[type=hidden][name*="['+calcDetails.field_id+']"]');if(hiddenTotalField.length)return isHiddenTotalOnPage(hiddenTotalField,pages)}return true}function isHiddenTotalOnPage(hiddenTotalField,pages){var onPage,hiddenParent=hiddenTotalField.closest(".frm_form_field");if(hiddenParent.length)return true;var totalPos=hiddenTotalField.index();var isAfterStart=
true;var isBeforeEnd=true;if(pages.start!==undefined)isAfterStart=jQuery(pages.start).index()<totalPos;if(pages.end!==undefined)isBeforeEnd=jQuery(pages.end).index()>totalPos;onPage=isAfterStart&&isBeforeEnd;if(!onPage)onPage=hiddenTotalField.closest(".do-calculation").length>0;return onPage}function isTotalFieldConditionallyHidden(calcDetails,triggerFieldName){var hidden=false,fieldId=calcDetails.field_id,formId=calcDetails.form_id,hiddenFields=getHiddenFields(formId);if(hiddenFields.length<1)return hidden;
if(calcDetails.inSection==="0"&&calcDetails.inEmbedForm==="0")hidden=isNonRepeatingFieldConditionallyHidden(fieldId,hiddenFields);else{var repeatArgs=getRepeatArgsFromFieldName(triggerFieldName);if(isNonRepeatingFieldConditionallyHidden(fieldId,hiddenFields))hidden=true;else if(isRepeatingFieldConditionallyHidden(fieldId,repeatArgs,hiddenFields))hidden=true;else if(calcDetails.inSection!=="0"&&calcDetails.inEmbedForm!=="0")hidden=isRepeatingFieldConditionallyHidden(calcDetails.inSection,repeatArgs,
hiddenFields);else if(calcDetails.inSection!=="0")hidden=isNonRepeatingFieldConditionallyHidden(calcDetails.inSection,hiddenFields);else if(calcDetails.inEmbedForm!=="0")hidden=isNonRepeatingFieldConditionallyHidden(calcDetails.inEmbedForm,hiddenFields)}return hidden}function isNonRepeatingFieldConditionallyHidden(fieldId,hiddenFields){var htmlID="frm_field_"+fieldId+"_container";return hiddenFields.includes(htmlID)}function isRepeatingFieldConditionallyHidden(fieldId,repeatArgs,hiddenFields){var hidden=
false;if(repeatArgs.repeatingSection){var fieldRepeatId="frm_field_"+fieldId+"-"+repeatArgs.repeatingSection;fieldRepeatId+="-"+repeatArgs.repeatRow+"_container";hidden=hiddenFields.includes(fieldRepeatId)}return hidden}function maybeShowCalculationsErrorAlert(err,fieldKey,thisFullCalc){var alertMessage="";if(!jQuery("form").hasClass("frm-admin-viewing"))return;alertMessage+=frm_js.calc_error+" "+fieldKey+":\n\n";alertMessage+=thisFullCalc+"\n\n";if(err.message)alertMessage+=err.message+"\n\n";alert(alertMessage)}
function treatAsUTC(date){var copy=new Date(date.valueOf());copy.setMinutes(copy.getMinutes()-copy.getTimezoneOffset());return copy}function normalizeDate(date){switch(typeof date){case "number":return new Date(date*864E5);case "string":return new Date(date);default:return date}}function calculateDateDifference(a,b,format,fieldId,compareId){a=normalizeDate(a);b=normalizeDate(b);switch(format){case "days":{if("function"===typeof window.frmCalcDateDifferenceDays&&fieldId&&compareId)return window.frmCalcDateDifferenceDays(treatAsUTC(a),
treatAsUTC(b),fieldId,compareId);return Math.floor((treatAsUTC(b)-treatAsUTC(a))/864E5)}case "years":default:{var years=b.getFullYear()-a.getFullYear();if(b.getMonth()<a.getMonth()||b.getMonth()===a.getMonth()&&b.getDate()<a.getDate())years--;return years}}}function getTotalOrCalcField(triggerField,fieldKey){const form=document.contains(triggerField[0])?triggerField.closest("form"):jQuery(`#frm_field_${triggerField[0].dataset.sectionid}_container`).closest("form");return form.find(fieldKey)}function doSingleCalculation(allCalcs,
fieldKey,vals,triggerField){var currency,total,dec,updatedTotal,totalField,thisCalc=allCalcs.calc[fieldKey],thisFullCalc=thisCalc.calc,fieldInfo={triggerField:triggerField,inSection:false,thisFieldCall:'input[id^="field_'+fieldKey+'-"]'};if(triggerField!==undefined&&triggerField&&triggerField.length)totalField=getTotalOrCalcField(triggerField,"#field_"+fieldKey);else totalField=jQuery(document.getElementById("field_"+fieldKey));if(totalField.get(0)?.dataset.minGap)return;if(totalField.attr("type")==="range")return;if(totalField.length<1&&triggerField!==undefined){fieldInfo.inSection=true;fieldInfo.thisFieldId=objectSearch(allCalcs.fieldsWithCalc,fieldKey);totalField=getSiblingField(fieldInfo)}if(totalField===null||totalField.length<1)return;thisFullCalc=getValsForSingleCalc(thisCalc,thisFullCalc,allCalcs,vals,fieldInfo);total="";dec="";if("function"===typeof window["frmProGetCalcTotal"+thisCalc.calc_type])total=window["frmProGetCalcTotal"+thisCalc.calc_type].call(thisCalc,thisFullCalc,{totalField});
else if(thisCalc.calc_type==="text")total=thisFullCalc;else{if("date"===thisCalc.calc_type)return;dec=thisCalc.calc_dec;if(thisFullCalc.includes(").toFixed(")){var calcParts=thisFullCalc.split(").toFixed(");if(isNumeric(calcParts[1])){dec=calcParts[1];thisFullCalc=thisFullCalc.replace(").toFixed("+dec,"")}}thisFullCalc=trimNumericCalculation(thisFullCalc);if(thisFullCalc!=="")try{total=parseFloat(eval(thisFullCalc))}catch(err){maybeShowCalculationsErrorAlert(err,fieldKey,thisFullCalc)}if(total===undefined||isNaN(total))total=0;if(isNumeric(dec)&&total!=="")total=total.toFixed(dec)}if(thisCalc.is_currency===true&&isNumeric(total)){currency=getCurrencyFromCalcRule(thisCalc);if(currency.decimals>0){total=Math.round10(total,currency.decimals);total=maybeAddTrailingZeroToPrice(total,currency);dec=currency.decimals}}if(totalField.val()===total){setDisplayedTotal(totalField,total,currency);return}updatedTotal=false;if((isNumeric(dec)||thisCalc.is_currency)&&["number","text"].includes(totalField.attr("type"))){if(total.toString().slice(-1)=="0"&&navigator.userAgent.toLowerCase().includes("firefox"))totalField[0].setAttribute("type","text");if(totalField.parent().is(".frm_with_box.frm_hidden")&&"string"===typeof total){updatedTotal=true;totalField.val(total.replace(",","."))}}if(!updatedTotal)totalField.val(total);triggerEvent(document,"frmCalcUpdatedTotal",{totalField:totalField,total:total});if(triggerField===null||triggerField===undefined||totalField.attr("name")!=triggerField.attr("name"))totalField.trigger({type:"change",selfTriggered:true,
frmTriggered:fieldKey});setDisplayedTotal(totalField,total,currency)}function setDisplayedTotal(totalField,total,currency){var prepend,append,showTotal=totalField.parent().prev();if(!showTotal.hasClass("frm_total_formatted"))return;prepend=showTotal.data("prepend");append=showTotal.data("append");if(prepend===undefined)prepend="";if(append===undefined)append="";if(typeof currency==="object"){total=formatCurrency(total,currency);if(currency.symbol_left===prepend)prepend="";if(currency.symbol_right===append)append=""}if(prepend!=="")prepend='<span class="frm_inline_pre">'+prepend+"</span>";if(append!=="")append='<span class="frm_inline_pre">'+append+"</span>";showTotal.html(prepend+'<span class="frm_inline_total">'+total+"</span>"+append)}function getValsForSingleCalc(thisCalc,thisFullCalc,allCalcs,vals,fieldInfo){var fCount,f,field,date,findVar;fCount=thisCalc.fields.length;for(f=0;f<fCount;f++){field={triggerField:fieldInfo.triggerField,thisFieldId:thisCalc.fields[f],inSection:fieldInfo.inSection,
valKey:fieldInfo.inSection+""+thisCalc.fields[f],thisField:allCalcs.fields[thisCalc.fields[f]],thisFieldCall:"input"+allCalcs.fieldKeys[thisCalc.fields[f]],formID:thisCalc.form_id};field=getCallForField(field,allCalcs);if(!thisCalc.calc_type){field.valKey="num"+field.valKey;vals=getCalcFieldId(field,allCalcs,vals);if(vals[field.valKey]===undefined||isNaN(vals[field.valKey])){vals[field.valKey]=0;if(field.thisField.type==="date"){date=tryToGetDateValue(field);if(null!==date)vals[field.valKey]=Math.floor(date.getTime()/
864E5);else thisFullCalc=""}}else if(0===vals[field.valKey]&&field.thisField.type==="date"&&dateValueShouldBeClearedForDateCalculation(field,fieldInfo))thisFullCalc=""}else{field.valKey="text"+field.valKey;vals=getTextCalcFieldId(field,vals);if(vals[field.valKey]===undefined)vals[field.valKey]=""}if(thisCalc.calc_type==="text")thisFullCalc=replaceShortcodesWithShowOptions(thisFullCalc,vals,field);findVar="["+field.thisFieldId+"]";findVar=findVar.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");thisFullCalc=
thisFullCalc.replace(new RegExp(findVar,"g"),vals[field.valKey])}return thisFullCalc}function replaceShortcodesWithShowOptions(fullCalc,vals,field){fullCalc=replaceShowShortcode(fullCalc,vals,field,"label",function(){return getOptionLabelsFromValues(vals[field.valKey],field)});Array.prototype.forEach.call(["first","middle","last"],function(nameFieldPart){fullCalc=replaceNameShortcode(fullCalc,vals,field,nameFieldPart)});return fullCalc}function replaceNameShortcode(fullCalc,vals,field,show){var valueCallback=
function(){var match=false;document.querySelectorAll(field.thisFieldCall).forEach(function(input){if(show===input.id.substr(-show.length))match=input});return match?match.value:""};return replaceShowShortcode(fullCalc,vals,field,show,valueCallback)}function replaceShowShortcode(fullCalc,vals,field,show,valueCallback){var findVar;findVar="["+field.thisFieldId+" show="+show+"]";if(-1===fullCalc.indexOf(findVar))return fullCalc;vals[field.valKey+show]=valueCallback();findVar=findVar.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,
"\\$1");fullCalc=fullCalc.replace(new RegExp(findVar,"g"),vals[field.valKey+show]);return fullCalc}function tryToGetDateValue(field){var $element=jQuery(field.thisField.key);return $element.hasClass("hasDatepicker")?$element.datepicker("getDate"):null}function dateValueShouldBeClearedForDateCalculation(field,fieldInfo){if(fieldInfo.triggerField!==null){if(fieldInfo.triggerField.is("input")){if(datepickerFieldShouldBeClearedForDateCalculation(fieldInfo.triggerField))return fieldShouldBeClearedForDateCalculation(field.thisFieldCall,
field.thisField.key);return""===fieldInfo.triggerField.val()}return fieldInfo.triggerField.is("div")&&fieldInfo.triggerField.end().is("input")&&""===fieldInfo.triggerField.end().val()}else if(fieldShouldBeClearedForDateCalculation(field.thisFieldCall,field.thisField.key))return true;return false}function datepickerFieldShouldBeClearedForDateCalculation(field){var dateValue=field.hasClass("hasDatepicker")?field.datepicker("getDate"):null;return null!==dateValue&&-72E6!==dateValue.getTime()}function fieldShouldBeClearedForDateCalculation(fieldCall,
fieldKey){return 0===fieldCall.indexOf("input")&&0===fieldKey.indexOf("[id=")&&""===jQuery(fieldKey).val()}function getOptionLabelsFromValues(value,field){var fieldId,options,split,labels,length,index;fieldId=field.thisFieldId;if("undefined"===typeof __FRMCALC.options||"undefined"===typeof __FRMCALC.options[fieldId])return value;options=__FRMCALC.options[fieldId];if("checkbox"===field.thisField.type){split=value.split(", ");labels=[];length=split.length;for(index=0;index<length;++index)if("undefined"!==typeof options[split[index]])labels.push(options[split[index]]);return labels.join(", ")}return"undefined"!==typeof options[value]?options[value]:""}function trimNumericCalculation(numericCalc){var lastChar=numericCalc.charAt(numericCalc.length-1);if(lastChar==="+"||lastChar==="-")numericCalc=numericCalc.substr(0,numericCalc.length-1);return numericCalc}function getCallForField(field,allCalcs){if(field.thisField.type==="checkbox"||field.thisField.type==="radio"||field.thisField.type==="scale"||field.thisField.type==="star")field.thisFieldCall=field.thisFieldCall+":checked,"+field.thisFieldCall+"[type=hidden]";else if(field.thisField.type==="select"||field.thisField.type==="time")field.thisFieldCall="select"+allCalcs.fieldKeys[field.thisFieldId]+" option:selected,"+field.thisFieldCall+"[type=hidden]";else if(field.thisField.type==="textarea")field.thisFieldCall=field.thisFieldCall+",textarea"+allCalcs.fieldKeys[field.thisFieldId];return field}function maybeDoCalcForSingleField(fieldInput){if(typeof __FRMCALC==="undefined")return;if(!fieldCanDoCalc(fieldInput.type))return;var allCalcs=__FRMCALC,fieldKey=getFieldKey(fieldInput.id,fieldInput.name),triggerField=maybeGetTriggerField(fieldInput),vals=[];if(allCalcs.calc[fieldKey]===undefined)return;doSingleCalculation(allCalcs,fieldKey,vals,triggerField)}function fieldCanDoCalc(fieldType){return-1!==["text","hidden","number","textarea"].indexOf(fieldType)}function getFieldKey(fieldHtmlId,fieldName){var fieldKey=fieldHtmlId.replace("field_",""),newFieldKey="";
if(isRepeatingFieldByName(fieldName)){var fieldKeyParts=fieldKey.split("-");for(var i=0;i<fieldKeyParts.length-1;i++)if(newFieldKey==="")newFieldKey=fieldKeyParts[i];else newFieldKey=newFieldKey+"-"+fieldKeyParts[i];fieldKey=newFieldKey}return fieldKey}function maybeGetTriggerField(fieldInput){var triggerField=null;if(isRepeatingFieldByName(fieldInput.name))if(fieldInput.type!=="hidden")triggerField=jQuery(fieldInput).closest(".frm_form_field");else triggerField=jQuery(fieldInput);return triggerField}
function isRepeatingFieldByName(fieldName){var fieldNameParts=fieldName.split("][");return fieldNameParts.length>=3}function getCalcFieldId(field,allCalcs,vals){if(vals[field.valKey]!==undefined&&vals[field.valKey]!==0)return vals;vals[field.valKey]=0;var currency,calcField=getCalcField(field);if(calcField===false)return vals;calcField.each(function(){const thisVal=getOptionValue(field.thisField,this);const hasCustomFormat=this.classList.contains("frm-has-number-format");if(field.thisField.type==="date"){var d=getDateFieldValue(allCalcs.date,thisVal);if(d!==null)vals[field.valKey]=Math.ceil(d/(1E3*60*60*24))}else if("data"===field.thisField.type){vals[field.valKey]=0;if(""!==thisVal)if("SELECT"===this.tagName)vals[field.valKey]=parseFloat(this.querySelector('option[value="'+thisVal+'"]').textContent);else if(null!==this.closest(".frm_checkbox")){vals[field.valKey]=0;jQuery(this.closest(".frm_opt_container").querySelectorAll("input:checked")).each(function(){vals[field.valKey]+=parseFloat(this.parentNode.textContent)})}else vals[field.valKey]=
parseFloat(this.parentNode.textContent)}else if(this.hasAttribute("data-frmprice")||field.thisField.type==="total"||hasCustomFormat){currency=getCurrency(field.formID);vals[field.valKey]+=parseFloat(!currency?thisVal:(hasCustomFormat&&String(thisVal).trim().startsWith("-")?"-":"")+preparePrice(thisVal,currency))}else{var n=thisVal;if(n!==""&&n!==0){n=n.trim();n=parseFloat(n.replace(/,/g,"").match(/-?[\d\.e]+$/))}if(n===undefined||isNaN(n)||n==="")n=0;vals[field.valKey]+=n}});return vals}function getTextCalcFieldId(field,
vals){if(vals[field.valKey]!==undefined&&vals[field.valKey]!=="")return vals;vals[field.valKey]="";var calcField=getCalcField(field);if(calcField===false)return vals;var count=0;var sep="";calcField.each(function(){var thisVal=getOptionValue(field.thisField,this);thisVal=thisVal.trim();sep=getCalcSep(field,count);if(thisVal!==""){vals[field.valKey]+=sep+thisVal;count++}});return vals}function getCalcSep(field,count){var sep="";if(count>0){if(field.thisField.type==="time")if(count==1)sep=":";else{if(count==2)sep=" "}else sep=", ";var customSep=jQuery(document).triggerHandler("frmCalSeparation",[field.thisField,count]);if(customSep!==undefined)sep=customSep}return sep}function getCalcField(field){var calcField;if(field.inSection===false){if("name"===field.thisField.type)return getOffScreenFieldForName(field);if("undefined"!==typeof field.triggerField&&field.triggerField&&field.triggerField.length)calcField=getTotalOrCalcField(field.triggerField,field.thisFieldCall);else calcField=jQuery(field.thisFieldCall);
if(!calcField.length&&-1!==["date","data"].indexOf(field.thisField.type)){calcField=jQuery(field.thisField.key);if(!calcField.length&&"data"===field.thisField.type)calcField=jQuery(field.thisField.key.replace('="',"^=").replace('"]',"-")+"]:checked")}}else calcField=getSiblingField(field);if(calcField===null||calcField===undefined||calcField.length<1)calcField=false;if(calcField.length>1)calcField=filterCalcField(calcField,field.thisFieldId);return calcField}function filterCalcField($calcField,thisFieldId){return $calcField.filter(function(){var target=
"OPTION"===this.nodeName?this.closest("select"):this;return target&&target.name&&target.name.includes(thisFieldId)})}function getOffScreenFieldForName(field){var nameParts,input;nameParts=[];document.querySelectorAll(field.thisFieldCall).forEach(function(input){nameParts.push(input.value)});input=document.createElement("input");input.value=nameParts.join(" ");return jQuery(input)}function getDateFieldValue(dateFormat,thisVal){var d=0;if(!thisVal);else if(jQuery.datepicker===undefined){const splitAt=
["/","."].find(char=>dateFormat.includes(char))||"-";var year="",month="",day="",formatPieces=dateFormat.split(splitAt),datePieces=thisVal.split(splitAt);for(var i=0;i<formatPieces.length;i++)if(formatPieces[i]==="y"){var currentYear=(new Date).getFullYear()+15;var currentYearPlusFifteen=currentYear.toString().substr(2,2);if(datePieces[i]>currentYearPlusFifteen)year="19"+datePieces[i];else year="20"+datePieces[i]}else if(formatPieces[i]==="yy")year=datePieces[i];else if(formatPieces[i]==="m"||formatPieces[i]==="mm"){month=datePieces[i];if(month.length<2)month="0"+month}else if(formatPieces[i]==="d"||formatPieces[i]==="dd"){day=datePieces[i];if(day.length<2)day="0"+day}d=Date.parse(year+"-"+month+"-"+day)}else d=jQuery.datepicker.parseDate(dateFormat,thisVal);return d}function getSiblingField(field){if(field.triggerField===undefined)return null;var fields=null,container=field.triggerField.closest(".frm_repeat_sec, .frm_repeat_inline, .frm_repeat_grid"),repeatArgs=getRepeatArgsFromFieldName(field.triggerField.attr("name")),
siblingFieldCall=field.thisFieldCall.replace("[id=","[id^=").replace(/-"]/g,"-"+repeatArgs.repeatRow+'"]');if(container.length||repeatArgs.repeatRow!==""){if(container.length)fields=container.find(siblingFieldCall+","+siblingFieldCall.replace("input[","select["));else fields=jQuery(siblingFieldCall);if(fields===null||fields===undefined||fields.length<1)fields=uncheckedSiblingOrOutsideSection(field,container,siblingFieldCall)}else fields=getNonSiblingField(field);return fields}function uncheckedSiblingOrOutsideSection(field,
container,siblingFieldCall){var fields=null;if(siblingFieldCall.indexOf(":checked")){var inSection=container.find(siblingFieldCall.replace(":checked",""));if(inSection.length<1)fields=getNonSiblingField(field)}else fields=getNonSiblingField(field);return fields}function getNonSiblingField(field){var nonSiblingField=jQuery(field.thisFieldCall+","+field.thisFieldCall.replace("input[","select["));if(!nonSiblingField.length&&"input["===field.thisFieldCall.substr(0,6))if("undefined"!==typeof field.triggerField&&
field.triggerField.is("div")&&field.triggerField.hasClass("frm_form_field"))nonSiblingField=field.triggerField.find(field.thisFieldCall.replace("input[","textarea["));else nonSiblingField=jQuery(field.thisFieldCall.replace("input[","textarea["));return nonSiblingField}function getOptionValue(thisField,currentOpt){var thisVal;if(isOtherOption(thisField,currentOpt))thisVal=getOtherValueAnyField(thisField,currentOpt);else if(currentOpt.type==="checkbox"||currentOpt.type==="radio")if(currentOpt.checked)thisVal=
currentOpt.hasAttribute("data-frmprice")?currentOpt.dataset.frmprice:currentOpt.value;else thisVal=currentOpt.dataset.off;else if(currentOpt.hasAttribute("data-frmprice"))thisVal=currentOpt.dataset.frmprice;else if(isCurrencyFormatField(thisField)){const fieldKey=thisField.key.replace('[id="field_',"").replace('"]',"");const calcRule=window.__FRMCALC?.calc?.[fieldKey];thisVal=jQuery(currentOpt).val();if(!calcRule)return thisVal;const resultFieldKey=thisField.total[0];const totalField=resultFieldKey?
window.__FRMCALC?.calc?.[resultFieldKey]:false;if(!totalField||totalField.calc_type!=="text"){const isNegative="-"===thisVal.charAt(0);const currency=getCurrencyFromCalcRule(calcRule);thisVal=""+preparePrice(thisVal,currency);if(isNegative)thisVal="-"+thisVal}}else thisVal=jQuery(currentOpt).val();if(thisVal===undefined)thisVal="";return thisVal}function isCurrencyFormatField(field){const fieldKey=field.key.replace('[id="field_',"").replace('"]',"");const isCalcField=window.__FRMCALC?.calc?.[fieldKey]?.is_currency;
return isCalcField?true:false}function isOtherOption(thisField,currentOpt){var isOtherOpt=false;if(currentOpt.type==="hidden"){if(getOtherValueLimited(currentOpt)!=="")isOtherOpt=true}else if(thisField.type==="select"){var optClass=currentOpt.className;if(optClass&&optClass.includes("frm_other_trigger"))isOtherOpt=true}else if(thisField.type==="checkbox"||thisField.type==="radio")if(currentOpt.id.includes("-other_")&&!currentOpt.id.includes("-otext"))isOtherOpt=true;return isOtherOpt}function getOtherValueLimited(currentOpt){var otherVal=
"",otherText=document.getElementById(currentOpt.id+"-otext");if(otherText!==null&&otherText.value!=="")otherVal=otherText.value;return otherVal}function getOtherValueAnyField(thisField,currentOpt){var otherVal=0;if(thisField.type==="select")if(currentOpt.type==="hidden")if(isCurrentOptRepeating(currentOpt));else otherVal=getOtherValueLimited(currentOpt);else otherVal=getOtherSelectValue(currentOpt);else if(thisField.type==="checkbox"||thisField.type==="radio")if(currentOpt.type==="hidden");else otherVal=
getOtherValueLimited(currentOpt);return otherVal}function isCurrentOptRepeating(currentOpt){var isRepeating=false,parts=currentOpt.name.split("[");if(parts.length>2)isRepeating=true;return isRepeating}function getOtherSelectValue(currentOpt){var fields=getOtherSelects(currentOpt);return fields.val()}function setOtherSelectValue(thisField,value){var i,fields=getOtherSelects(thisField);if(fields.length<1)return;fields.val(value);for(i=0;i<thisField.options.length;i++)if(thisField.options[i].className.includes("frm_other_trigger"))thisField.options[i].selected=
true}function getOtherSelects(currentOpt){return jQuery(currentOpt).closest(".frm_other_container").find(".frm_other_input")}function setOtherValueLimited(thisField,value){var otherText,baseId,parentInput,i=0,idParts=thisField.id.split("-");idParts.pop();baseId=idParts.join("-");otherText=document.querySelectorAll("[id^="+baseId+"-other][id$=otext]");if(otherText.length>0)for(i=0;i<otherText.length;i++)if(otherText[i].value===""){otherText[i].value=value;parentInput=document.getElementById(otherText[i].id.replace("-otext",
""));if(parentInput!==null)parentInput.checked=true}}function savingDraftEntry(object){var isDraft=false,savingDraft=jQuery(object).find(".frm_saving_draft");if(savingDraft.length)isDraft=savingDraft.val();return isDraft}function goingToPrevPage(object){var goingBack=false,nextPage=jQuery(object).find(".frm_next_page");if(nextPage.length&&nextPage.val()){var formID=jQuery(object).find('input[name="form_id"]').val();var prevPage=jQuery(object).find('input[name="frm_page_order_'+formID+'"]');if(prevPage.length)prevPage=
parseInt(prevPage.val());else prevPage=0;if(!prevPage||parseInt(nextPage.val())<prevPage)goingBack=true}return goingBack}function afterFormSubmitted(event,form){checkConditionalLogic("pageLoad");doEditInPlaceCleanUp(form);checkFieldsOnPage();maybeShowMoreStepsButton()}function afterPageChanged(){checkFieldsOnPage();addTopAddRowBtnForRepeater();maybeDisableCheckboxesWithLimit();calcProductsTotal();maybeShowMoreStepsButton();triggerChangeOnCalcTriggers();maybeAddIntlTelInput(document.querySelectorAll(".frm-intl-tel-input"));
initRangeInput(document.querySelectorAll(".with_frm_style input[type=range]"));initFormatFieldValueNumbers()}function triggerChangeOnCalcTriggers(){if("undefined"===typeof __FRMCALC||"undefined"===typeof __FRMCALC.fieldKeys)return;Object.values(__FRMCALC.fieldKeys).forEach(function(key){jQuery(key+":not(label):not([type=hidden])").each(function(){jQuery(this).trigger({type:"change",selfTriggered:true})})})}function generateGoogleTables(graphs,graphType){for(var num=0;num<graphs.length;num++)generateSingleGoogleTable(graphs[num],
graphType)}function generateSingleGoogleTable(opts,type){google.load("visualization","1.0",{packages:[type],callback:function(){compileGoogleTable(opts)}})}function compileGoogleTable(opts){var data=new google.visualization.DataTable,showID=false;const ownerDocument=opts.document||document;if(jQuery.inArray("id",opts.options.fields)!==-1){showID=true;data.addColumn("number",frm_js.id)}var colCount=opts.fields.length;var type="string";for(var i=0,l=colCount;i<l;i++){var thisCol=opts.fields[i];type=
getGraphType(thisCol);data.addColumn(type,thisCol.name)}var showEdit=false;if(opts.options.edit_link){showEdit=true;data.addColumn("string",opts.options.edit_link)}var showDelete=false;if(opts.options.delete_link){showDelete=true;data.addColumn("string",opts.options.delete_link)}var col=0;if(opts.entries!==null){var entryCount=opts.entries.length;data.addRows(entryCount);var row=0;for(var e=0,len=entryCount;e<len;e++){col=0;var entry=opts.entries[e];if(showID){data.setCell(row,col,entry.id);col++}for(var field=
0,fieldCount=colCount;field<fieldCount;field++){var thisEntryCol=opts.fields[field];type=getGraphType(thisEntryCol);var fieldVal=entry.metas[thisEntryCol.id];if(type==="number"&&(fieldVal===null||fieldVal===""))fieldVal=0;else if(type==="boolean")if(fieldVal===null||fieldVal=="false"||fieldVal===false)fieldVal=false;else fieldVal=true;data.setCell(row,col,fieldVal);col++}if(showEdit){if(entry.editLink!==undefined)data.setCell(row,col,'<a href="'+entry.editLink+'">'+opts.options.edit_link+"</a>");
else data.setCell(row,col,"");col++}if(showDelete)if(entry.deleteLink!==undefined)data.setCell(row,col,'<a href="'+entry.deleteLink+'" class="frm_delete_link" data-frmconfirm="'+opts.options.confirm+'">'+opts.options.delete_link+"</a>");else data.setCell(row,col,"");row++}}else{data.addRows(1);col=0;for(i=0,l=colCount;i<l;i++){if(col>0)data.setCell(0,col,"");else data.setCell(0,col,opts.options.no_entries);col++}}var chart=new google.visualization.Table(ownerDocument.getElementById("frm_google_table_"+
opts.options.form_id));chart.draw(data,opts.graphOpts)}function generateGoogleGraphs(graphs){var l,i;l=graphs.length;for(i=0;i<l;i++){generateSingleGoogleGraph(graphs[i]);if("string"===typeof graphs[i].options.width&&"%"===graphs[i].options.width.substr(-1))addResponsiveGraphListener(graphs[i])}}function addResponsiveGraphListener(graphData){window.addEventListener("resize",function(){generateSingleGoogleGraph(graphData)})}function generateSingleGoogleGraph(graphData){google.charts.load("current",
{packages:[graphData.package]});google.charts.setOnLoadCallback(function(){compileGoogleGraph(graphData)})}function compileGoogleGraph(graphData){var data=new google.visualization.DataTable;data=google.visualization.arrayToDataTable(graphData.data);const ownerDocument=graphData.document||document;var chartDiv=ownerDocument.getElementById("chart_"+graphData.graph_id);if(chartDiv===null)return;var type=graphData.type.charAt(0).toUpperCase()+graphData.type.slice(1);if(type!=="Histogram"&&type!=="Table")type+=
"Chart";var chart=new google.visualization[type](chartDiv);chart.draw(data,graphData.options);jQuery(ownerDocument).trigger("frmDrawChart",[chart,"chart_"+graphData.graph_id,data])}function getGraphType(field){var type="string";if(field.type==="number")type="number";else if(field.type==="checkbox"||field.type==="select"){var optCount=field.options.length;if(field.type==="select"&&field.options[0]==="")if(field.field_options.post_field==="post_status")optCount=3;else optCount=optCount-1;if(optCount==1)type="boolean"}return type}function removeRow(){if(!confirmRowRemoval())return;var rowNum=jQuery(this).data("key"),sectionID=jQuery(this).data("parent"),id="frm_section_"+sectionID+"-"+rowNum,thisRow=jQuery(this).parents('div[id^="frm_section_"]'),fields=thisRow.find("input, select, textarea, .frm_html_container"),formId=jQuery(this).closest("form").find('input[name="form_id"]').val();thisRow.fadeOut("slow",function(){const repeaterRow=thisRow[0].closest(".frm_section_heading");if(repeaterRow.querySelectorAll(".frm_repeat_sec, .frm_repeat_inline, .frm_repeat_grid")?.length===1)repeaterRow.querySelector(".frm_hidden_container.frm_repeat_buttons.frm_hidden").style.display="inline-block";thisRow.remove();fields.each(function(){var fieldID;if(this.matches(".frm_html_container"))fieldID=getHtmlFieldID(this);else fieldID=frmFrontForm.getFieldId(this,false);if(this.type!="file")doCalculation(fieldID,jQuery(this));var container="frm_field_"+fieldID+"-"+sectionID+"-"+rowNum+"_container";removeFromHideFields(container,formId);if(this.classList.contains("wp-editor-area"))removeRichText(this.id)});
showAddButton(sectionID);maybeHideRemoveButtons(sectionID);if(typeof frmThemeOverride_frmRemoveRow==="function")frmThemeOverride_frmRemoveRow(id,thisRow);jQuery(document).trigger("frmAfterRemoveRow")});return false}function maybeHideRemoveButtons(sectionID){var sectionContainer,repeatButtons,minRows,currentRows;sectionContainer=document.querySelector("#frm_field_"+sectionID+"_container");if(!sectionContainer)return;repeatButtons=sectionContainer.querySelector(".frm_repeat_buttons[data-repeat-min]");
if(!repeatButtons||!repeatButtons.dataset.repeatMin)return;minRows=repeatButtons.dataset.repeatMin;currentRows=document.querySelectorAll(".frm_repeat_"+sectionID).length;if(currentRows<=minRows)hideRemoveButtons(sectionID)}function getHtmlFieldID(field){var parentIDParts;parentIDParts=field.id.split("_");if(parentIDParts.length<3)return 0;parentIDParts=parentIDParts[2];parentIDParts=parentIDParts.split("-");if(!parentIDParts.length)return 0;return parentIDParts[0]}function confirmRowRemoval(){if(!frm_js.repeaterRowDeleteConfirmation)return true;
return confirm(frm_js.repeaterRowDeleteConfirmation)}function hideAddButton(sectionID){getRepeaterAddButtons(sectionID).forEach(function(button){button.classList.add("frm_hide_add_button")})}function showAddButton(sectionID){getRepeaterAddButtons(sectionID).forEach(function(button){button.classList.remove("frm_hide_add_button")})}function getRepeaterAddButtons(sectionID){return getFieldContainerChildren(sectionID,".frm_add_form_row")}function hideRemoveButtons(sectionID){getRepeaterRemoveButtons(sectionID).forEach(function(button){button.classList.add("frm_hide_remove_button")})}
function showRemoveButtons(sectionID){getRepeaterRemoveButtons(sectionID).forEach(function(button){button.classList.remove("frm_hide_remove_button")})}function getRepeaterRemoveButtons(sectionID){return getFieldContainerChildren(sectionID,".frm_remove_form_row")}function getFieldContainer(fieldD){return document.getElementById("frm_field_"+fieldD+"_container")}function getFieldContainerChildren(fieldID,childSelector){var container=getFieldContainer(fieldID);if(!container)return[];return container.querySelectorAll(childSelector)}
function addRow(){var thisBtn,id,i,numberOfSections,lastRowIndex,stateField,state,form,data,success,error,extraParams;if(currentlyAddingRow===true)return false;currentlyAddingRow=true;thisBtn=jQuery(this);id=thisBtn.data("parent");i=0;numberOfSections=jQuery(".frm_repeat_"+id).length;if(numberOfSections>0){lastRowIndex=false;document.querySelectorAll(".frm_repeat_"+id).forEach(function(element){var strippedId=element.id.replace("frm_section_"+id+"-",""),parsedId;if(!strippedId.length||"i"===strippedId[0])return;
parsedId=parseInt(strippedId);if(parsedId&&(false===lastRowIndex||parsedId>lastRowIndex))lastRowIndex=parsedId});if(false===lastRowIndex)i=1;else i=lastRowIndex+1}stateField=document.querySelector('input[name="frm_state"]');state=null!==stateField?stateField.value:"";form=jQuery(this).closest("form").get(0);data={action:"frm_add_form_row",field_id:id,i:i,numberOfSections:numberOfSections,nonce:frm_js.nonce,frm_state:state};triggerEvent(form,"frmBeforeNewRepeaterRow",data);success=function(r){var html,
item,checked,fieldID,fieldObject,repeatArgs,j,inputRanges;if(r.html){html=r.html;item=jQuery(html).addClass("frm-fade-in");const repeaterSection=thisBtn[0].closest(".frm_section_heading");const toggleContainer=repeaterSection.querySelector(".frm_toggle_container.frm_grid_container");if(toggleContainer)toggleContainer.append(item[0]);else repeaterSection.append(item[0]);const repeatButtons=repeaterSection.querySelector(".frm_hidden_container.frm_repeat_buttons.frm_hidden");if(repeatButtons)repeatButtons.style.display=
"none";inputRanges=item[0].querySelectorAll("input[type=range]");for(j=0;j<inputRanges.length;j++)handleSliderEvent.call(inputRanges[j]);if(r.is_repeat_limit_reached)hideAddButton(id);if(!r.passes_repeat_min_check)hideRemoveButtons(id);else showRemoveButtons(id);checked=["other"];repeatArgs={repeatingSection:id.toString(),repeatRow:i.toString()};jQuery(html).find("input, select, textarea").each(function(){if(this.name==="")return true;if(this.type==="file")fieldID=this.name.replace("file","").split("-")[0];
else fieldID=this.name.replace("item_meta[","").split("]")[2].replace("[","");if(jQuery.inArray(fieldID,checked)==-1){if(this.id===false||this.id==="")return;fieldObject=jQuery("#"+this.id);checked.push(fieldID);hideOrShowFieldById(fieldID,repeatArgs);updateWatchingFieldById(fieldID,repeatArgs,"value changed");checkFieldsWithConditionalLogicDependentOnThis(fieldID,fieldObject);checkFieldsWatchingLookup(fieldID,fieldObject,"value changed");doCalculation(fieldID,fieldObject);maybeDoCalcForSingleField(fieldObject.get(0))}});
jQuery(html).find(".frm_html_container").each(function(){var fieldID=this.id.replace("frm_field_","").split("-")[0];checked.push(fieldID);hideOrShowFieldById(fieldID,repeatArgs)});maybeAddIntlTelInput(item.find(".frm-intl-tel-input").get());if(item.closest(".with_frm_style").length>0)initRangeInput(item.find("input[type=range]").get());initFormatFieldValueNumbers();loadDropzones(repeatArgs.repeatRow);loadSliders();loadAutocomplete();loadImask();jQuery(html).find(".frm_html_container").each(function(){var fieldID=
this.id.replace("frm_field_","").split("-")[0];checked.push(fieldID);hideOrShowFieldById(fieldID,repeatArgs)});jQuery(html).find(".wp-editor-area").each(function(){initRichText(this.id)})}if(typeof frmThemeOverride_frmAddRow==="function")frmThemeOverride_frmAddRow(id,r);jQuery(document).trigger("frmAfterAddRow");handleRangeSliders();triggerEvent(document,"frmAfterAddRepeaterRow",{repeater:item.get(0)});jQuery(".frm_repeat_"+id).each(function(i){this.style.zIndex=999-i});currentlyAddingRow=false};
error=function(){currentlyAddingRow=false};extraParams={dataType:"json"};postToAjaxUrl(form,data,success,error,extraParams);return false}function triggerToggleClickOnSpace(e){if(32===e.which)this.click()}function removeRichText(id){tinymce.EditorManager.execCommand ("mceRemoveEditor",true,id)}function initRichText(id){var key=Object.keys(tinyMCEPreInit.mceInit)[0],orgSettings=tinyMCEPreInit.mceInit[key],newValues={selector:"#"+id,body_class:orgSettings.body_class.replace(key,id)},newSettings=Object.assign({},
orgSettings,newValues);tinymce.init(newSettings)}function editEntry(){var $edit=jQuery(this),entryId=$edit.data("entryid"),prefix=$edit.data("prefix"),postId=$edit.data("pageid"),formId=$edit.data("formid"),cancel=$edit.data("cancel"),fields=$edit.data("fields"),excludeFields=$edit.data("excludefields"),startPage=$edit.data("startpage"),$cont=jQuery(document.getElementById(prefix+entryId)),orig=$cont.html();$cont.html('<span class="frm-loading-img" id="'+prefix+entryId+'"></span><div class="frm_orig_content" style="display:none">'+
orig+"</div>");jQuery.ajax({type:"POST",url:getUrlForInPlaceEdit(),dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:postId,entry_id:entryId,id:formId,nonce:frm_js.nonce,fields:fields,exclude_fields:excludeFields,start_page:startPage},success:function(html){$cont.children(".frm-loading-img").replaceWith(html);$edit.removeClass("frm_inplace_edit").addClass("frm_cancel_edit");$edit.html(cancel);checkConditionalLogic("editInPlace");if(typeof frmFrontForm.fieldValueChanged==="function")jQuery(document).on("change",
'.frm-show-form input[name^="item_meta"], .frm-show-form select[name^="item_meta"], .frm-show-form textarea[name^="item_meta"]',frmFrontForm.fieldValueChanged);checkFieldsOnPage(prefix+entryId);triggerEvent(document,"frmInPlaceEdit")}});return false}function getUrlForInPlaceEdit(){var url=frm_js.ajax_url,queryParams=getQueryParamsForInPlaceEdit();Array.prototype.forEach.call(Object.keys(queryParams),function(queryParamKey){url+=-1===url.indexOf("?")?"?":"&";url+=queryParamKey+"="+queryParams[queryParamKey]});
return url}function getQueryParamsForInPlaceEdit(){var queryParams,queryString,pairs,keysToSkip,length,i,pair,key,value;queryParams={};queryString=window.location.search.substring(1);pairs=queryString.split("&");keysToSkip=["action","start_page","nonce","post_id","entry_id","id","fields","doing_wp_cron"];length=pairs.length;for(i=0;i<length;i++){pair=pairs[i].split("=");key=decodeURIComponent(pair[0]);if(-1!==keysToSkip.indexOf(key))continue;value=decodeURIComponent(pair[1]);if(queryParams.hasOwnProperty(key))if(Array.isArray(queryParams[key]))queryParams[key].push(value);
else queryParams[key]=[queryParams[key],value];else queryParams[key]=value}return queryParams}function cancelEdit(event){event.preventDefault();const $cancelLink=jQuery(this);const prefix=$cancelLink.data("prefix");const entryId=$cancelLink.data("entryid");const $cont=jQuery(document.getElementById(prefix+entryId));$cont.children(".frm_forms").replaceWith("");$cont.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content");switchCancelToEdit($cancelLink)}function switchCancelToEdit($link){var label=
$link.data("edit");$link.removeClass("frm_cancel_edit").addClass("frm_inplace_edit");$link.html(label)}function deleteEntry(){var entryId,prefix,$link=jQuery(this),confirmText=$link.data("deleteconfirm");if(confirm(confirmText)){entryId=$link.data("entryid");prefix=$link.data("prefix");$link.replaceWith('<span class="frm-loading-img" id="frm_delete_'+entryId+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:entryId,nonce:frm_js.nonce},success:function(html){if(html.replace(/^\s+|\s+$/g,
"")==="success"){var container=jQuery(document.getElementById(prefix+entryId));container.fadeOut("slow",function(){container.remove()});jQuery(document.getElementById("frm_delete_"+entryId)).fadeOut("slow");jQuery(document).trigger("frmEntryDeleted",[entryId])}else jQuery(document.getElementById("frm_delete_"+entryId)).replaceWith(html)}})}return false}function doEditInPlaceCleanUp(form){var entryIdField=jQuery(form).find('input[name="id"]');if(entryIdField.length){var link=document.getElementById("frm_edit_"+
entryIdField.val());if(isCancelLink(link))switchCancelToEdit(jQuery(link))}}function isCancelLink(link){return link!==null&&link.className.includes("frm_cancel_edit")}function loadUniqueTimeFields(){var timeFields,i,dateField;if(typeof __frmUniqueTimes==="undefined")return;timeFields=__frmUniqueTimes;for(i=0;i<timeFields.length;i++){dateField=document.getElementById(timeFields[i].dateID);jQuery(dateField).on("change",maybeTriggerUniqueTime);if(""!==dateField.value)jQuery(dateField).trigger("change")}}
function maybeTriggerUniqueTime(){var timeFields=__frmUniqueTimes;for(var i=0;i<timeFields.length;i++)if(timeFields[i].dateID==this.id)frmProForm.removeUsedTimes(this,timeFields[i].timeID)}function checkFieldsOnPage(containerId,event){if("undefined"===typeof event)event="";checkPreviouslyHiddenFields();loadDateFields();loadCustomInputMasks();loadSliders();loadAutocomplete(containerId);checkDynamicFields(event);checkLookupFields();setTimeout(triggerCalc,0);loadDropzones();loadImask(containerId);checkPasswordFields();
triggerLookupWatchUpdates()}function triggerLookupWatchUpdates(){var i,fieldId,keys,value,$changedInput;if(typeof __FRMLOOKUP==="undefined"||document.querySelector('form input[name="id"]'))return;keys=Object.keys(__FRMLOOKUP);for(i=0;i<keys.length;i++){fieldId=keys[i];value=__FRMLOOKUP[fieldId];if(value.dependents.length<=0)continue;$changedInput=jQuery("#field_"+value.fieldKey);if($changedInput.length)checkFieldsWatchingLookup(fieldId,$changedInput,"value changed")}}function checkPasswordFields(){var passwordFields=
document.querySelectorAll(".frm_strength_meter"),event=document.createEvent("HTMLEvents");event.initEvent("keyup",true,true);for(var i=0;i<passwordFields.length;i++)passwordFields[i].dispatchEvent(event)}function checkPreviouslyHiddenFields(){if(typeof __frmHideFields!=="undefined")frmProForm.hidePreviouslyHiddenFields()}function loadAutocomplete(containerId){loadChosen(containerId);loadSlimSelect(containerId)}function loadChosen(chosenContainer){var opts;if(!jQuery().chosen)return;opts={allow_single_deselect:true,
no_results_text:frm_js.no_results,search_contains:true};if(typeof __frmChosen!=="undefined")opts="{"+__frmChosen+"}";if(chosenContainer!==undefined)jQuery("#"+chosenContainer).find(".frm_chzn").chosen(opts);else jQuery(".frm_chzn").chosen(opts)}function loadSlimSelect(containerId){var container,dropdowns;if("undefined"===typeof SlimSelect)return;if("undefined"!==typeof containerId){container=document.getElementById(containerId);if(!container)return;dropdowns=container.querySelectorAll("select.frm_slimselect")}else dropdowns=
document.querySelectorAll("select.frm_slimselect");dropdowns.forEach(function(autocompleteInput){var emptyOption,allowDeselect,isMultiSelect,tabindex;if("none"===autocompleteInput.style.display||autocompleteInput.classList.contains("ss-main")||autocompleteInput.classList.contains("ss-content"))return;emptyOption=autocompleteInput.querySelector('option[value=""]');allowDeselect=false;isMultiSelect="multiple"===autocompleteInput.getAttribute("multiple");if(emptyOption&&""===emptyOption.textContent.trim()){allowDeselect=
true;if(isMultiSelect)emptyOption.parentElement.removeChild(emptyOption);else emptyOption.setAttribute("data-placeholder","true")}else if(autocompleteInput.querySelector('option[data-placeholder="true"]'))allowDeselect=true;tabindex=autocompleteInput.getAttribute("tabindex");autocompleteInput.style.color="";new SlimSelect({select:autocompleteInput,settings:{placeholderText:"",searchText:frm_js.no_results,searchPlaceholder:" ",allowDeselect:allowDeselect,closeOnSelect:!isMultiSelect,keepOrder:true},
events:{afterOpen:function(){var ssContent,ssContentSearchInput,ssList,label;ssContent=document.querySelector('.ss-content[data-id="'+autocompleteInput.dataset.id+'"]');if(!ssContent)return;ssContent.removeAttribute("role");ssContentSearchInput=ssContent.querySelector(".ss-search input");if(!ssContentSearchInput)return;ssContentSearchInput.removeAttribute("aria-label");ssList=ssContent.querySelector(".ss-list");if(ssList){ssList.style.height=getHeightForSlimSelectList(ssContent)+"px";ssList.setAttribute("role",
"listbox")}label=document.querySelector('label[for="'+autocompleteInput.id+'"]');if(label){ssContentSearchInput.setAttribute("aria-labelledby",label.id);if(ssList)ssList.setAttribute("aria-labelledby",label.id)}}}});if(tabindex)copyTabIndexAttributeToSlimSelectElement(autocompleteInput,tabindex);makeSlimSelectAccessibilityChanges(autocompleteInput);maybeApplySlimSelectAutoWidth(autocompleteInput,allowDeselect);autocompleteInput.addEventListener("change",function(){jQuery(autocompleteInput).trigger("change")})})}
function copyTabIndexAttributeToSlimSelectElement(autocompleteInput,tabindex){var slimselectElement=getSlimSelectMainElement(autocompleteInput);if(slimselectElement)slimselectElement.setAttribute("tabindex",tabindex)}function getSlimSelectMainElement(autocompleteInput){return document.querySelector('.ss-main[data-id="'+autocompleteInput.getAttribute("data-id")+'"]')}function getHeightForSlimSelectList(ssContent){var ssSearch,listHeight;listHeight=jQuery(ssContent).outerHeight();ssSearch=ssContent.querySelector(".ss-search");
if(ssSearch)listHeight-=jQuery(ssSearch).outerHeight();return listHeight}function makeSlimSelectAccessibilityChanges(autocompleteInput){addAriaLabelledByToSlimSelectMainElement(autocompleteInput);openSlimSelectOnLabelClick(autocompleteInput)}function maybeApplySlimSelectAutoWidth(autocompleteInput,allowDeselect){var slimselectElement,extraRequiredWidth;if(!autocompleteInput.classList.contains("auto_width"))return;slimselectElement=getSlimSelectMainElement(autocompleteInput);if(slimselectElement){extraRequiredWidth=
allowDeselect?36:14;slimselectElement.style.minWidth=jQuery(autocompleteInput).outerWidth()+extraRequiredWidth+"px"}}function addAriaLabelledByToSlimSelectMainElement(autocompleteInput){var label,slimselectElement;label=document.querySelector('label[for="'+autocompleteInput.id+'"]');if(label){slimselectElement=getSlimSelectMainElement(autocompleteInput);if(slimselectElement)slimselectElement.setAttribute("aria-labelledby",label.id)}}function openSlimSelectOnLabelClick(autocompleteInput){var label=
document.querySelector('label[for="'+autocompleteInput.id+'"]');if(label){label.addEventListener("click",labelListener);function labelListener(){setTimeout(function(){autocompleteInput.slim.open()},0)}}}function isPreviousSelectedStar(input){return null!==input.getAttribute("data-frm-star-selected")}function loadStars(){if(isPreviousSelectedStar(this)){clearStars(this.parentElement,false);return}updateStars(this,true)}function hoverStars(){var input=this.previousSibling;if(input.checked||isPreviousSelectedStar(this))return;
updateStars(input,false)}function updateStars(hovered,onClick){var starGroup=hovered.parentElement,stars=starGroup.children,current=parseInt(hovered.value),starClass="star-rating",selectLabel=false;starGroup.className+=" frm-star-hovered";for(var i=0;i<stars.length;i++)if(stars[i].matches("."+starClass))if(selectLabel)stars[i].className+=" star-rating-hover";else stars[i].classList.remove("star-rating-hover","star-rating-on");else{selectLabel=parseInt(stars[i].value)<=current;if(onClick)stars[i].removeAttribute("data-frm-star-selected")}if(onClick)hovered.setAttribute("data-frm-star-selected",
"")}function unhoverStars(){var input=this.previousSibling,starGroup=input.parentElement;starGroup.classList.remove("frm-star-hovered");var stars=starGroup.children;var selected=jQuery(starGroup).find("input:checked").attr("id");var isSelected="";var starClass="star-rating";for(var i=stars.length-1;i>0;i--)if(stars[i].matches("."+starClass)){stars[i].classList.remove("star-rating-hover");if(isSelected===""&&selected!==undefined&&stars[i].getAttribute("for")==selected)isSelected=" star-rating-on";
if(isSelected!=="")stars[i].className+=isSelected}}function clearStars(starGroup,noClearInput){var labels,input;labels=starGroup.querySelectorAll(".star-rating-on");if(labels&&labels.length)labels.forEach(function(el){el.classList.remove("star-rating-on")});if(!noClearInput){input=starGroup.querySelector('input[type="radio"]:checked');if(input){input.checked=false;input.removeAttribute("data-frm-star-selected")}}}function formatValueAsCurrency(value,fieldKey){const currency=getCurrencyFromCalcRule(__FRMCALC.calc[fieldKey]);
return(new DOMParser).parseFromString(formatCurrency(normalizeTotal(value,currency),currency),"text/html").documentElement.textContent}function handleSliderEvent(){if(this.type!=="range")return;const sliderValueEl=this.parentNode.querySelector(".frm_range_value");const fieldKey=getFieldKey(this.id,this.name);if(window.__FRMCALC?.calc[fieldKey])sliderValueEl.textContent=formatValueAsCurrency(this.value,fieldKey);else sliderValueEl.textContent=this.value}function loadSliders(){handleRangeSliders()}
function getCurrencyFromCalcRule(calcRule){return"undefined"!==typeof calcRule.custom_currency?calcRule.custom_currency:getCurrency(calcRule.form_id)}function setInlineFormWidth(){var children,f,inlineForm,inlineForms=jQuery(".frm_inline_form .frm_fields_container");if(inlineForms.length)for(f=0;f<inlineForms.length;f++){inlineForm=jQuery(inlineForms[f]);children=inlineForm.children(".frm_form_field");if(children.length<=12&&!fieldHasLayoutClass(children.last()))addAutoInlineLayout(inlineForm,children)}}
function fieldHasLayoutClass(field){var i,classList=field.attr("class"),layoutClasses=["frm_full","half","third","fourth","fifth","sixth","seventh","eighth"];if(classList===undefined)return false;for(i=1;i<=12;i++){if(field.hasClass("frm"+i))return true;if(i===12)for(var c=0;c<layoutClasses.length;c++){if(classList.includes(layoutClasses[c]))return true;if(c===layoutClasses.length-1)return false}}}function addAutoInlineLayout(inlineForm,children){var fieldCount,colCount,i;fieldCount=children.length+
1;colCount=Math.max(2,Math.ceil(12/fieldCount));for(i=0;i<children.length;i++)if(!fieldHasLayoutClass(jQuery(children[i])))jQuery(children[i]).addClass("frm"+colCount);inlineForm.children(".frm_submit").addClass("frm"+colCount)}function checkConditionalLogic(event){if(typeof __frmHideOrShowFields!=="undefined")frmProForm.hideOrShowFields(__frmHideOrShowFields,event);else showForm()}function showForm(){document.querySelectorAll(".frm_pro_form").forEach(form=>{jQuery(form).fadeIn("slow");triggerEvent(form,
"frmProAfterFormFadeIn")})}function checkDynamicFields(event){if(typeof __frmDepDynamicFields!=="undefined"){if("pageLoad"===event&&typeof __frmHideOrShowFields==="undefined")clearHideFields();frmProForm.checkDependentDynamicFields(__frmDepDynamicFields)}}function checkLookupFields(){if(typeof __frmDepLookupFields!=="undefined")frmProForm.checkDependentLookupFields(__frmDepLookupFields)}function triggerChange(input,fieldKey){if(fieldKey===undefined)fieldKey="dependent";if(input.length>1)input=input.eq(0);
input.trigger({type:"change",selfTriggered:true,frmTriggered:fieldKey})}function loadCustomInputMasks(){if(typeof __frmMasks==="undefined")return;var maskFields=__frmMasks;for(var i=0;i<maskFields.length;i++)jQuery(maskFields[i].trigger).attr("data-frmmask",maskFields[i].mask)}function getRepeatArgsFromFieldName(fieldName){var repeatArgs={repeatingSection:"",repeatRow:""};if(fieldName!==undefined&&isRepeatingFieldByName(fieldName)){var inputNameParts=fieldName.split("][");repeatArgs.repeatingSection=
inputNameParts[0].replace("item_meta[","");repeatArgs.repeatRow=inputNameParts[1]}return repeatArgs}function fadeOut($remove){$remove.fadeOut("slow",function(){$remove.remove()})}function objectSearch(array,value){for(var prop in array)if(array.hasOwnProperty(prop))if(array[prop]===value)return prop;return null}function isNumeric(obj){return!Array.isArray(obj)&&obj-parseFloat(obj)+1>=0}function checkPasswordField(){var fieldId,fieldIdSplit,checks,split,suffix,check,span;if(this.className.includes("frm_strength_meter")){fieldId=
this.name.substr(this.name.indexOf("[")+1).replace(/\]\[\d\]\[/,"-");if(fieldId[fieldId.length-1]==="]")fieldId=fieldId.substr(0,fieldId.length-1);fieldIdSplit=fieldId.split("-");if(fieldIdSplit.length===2)fieldId=fieldIdSplit[1]+"-"+fieldIdSplit[0];checks=passwordChecks();split=this.id.split("-");suffix=split.length>1&&!isNaN(split[split.length-1])?"-"+split[split.length-1]:"";for(check in checks){span=document.getElementById("frm-pass-"+check+"-"+fieldId+suffix);addOrRemoveVerifyPass(checks[check],
this.value,span)}}}function passwordChecks(){return{"eight-char":/^.{8,}$/,number:/\d/,uppercase:/[A-Z]/,lowercase:/[a-z]/,"special-char":/(?=.*[^a-zA-Z0-9])/}}function addOrRemoveVerifyPass(regEx,password,span){if(span!==null){var remove=regEx.test(password);if(remove)maybeRemovePassReq(span);else maybeRemovePassVerified(span)}}function maybeRemovePassReq(span){if(span.classList.contains("frm-pass-req")){span.classList.remove("frm-pass-req");span.classList.add("frm-pass-verified")}}function maybeRemovePassVerified(span){if(span.classList.contains("frm-pass-verified")){span.classList.remove("frm-pass-verified");
span.classList.add("frm-pass-req")}}function checkCheckboxSelectionLimit(){var limit=parseInt(this.getAttribute("data-frmlimit")),checked=this.checked;if(!limit)return;var allBoxes=jQuery(this).parents(".frm_opt_container").find('input[type="checkbox"]');if(limit>=allBoxes.length)return;var checkedBoxes=allBoxes.filter(function(){return this.checked});if(checked){if(checkedBoxes.length>=limit)allBoxes.filter(function(){return!this.checked}).attr("disabled","disabled")}else{const checkboxesLimitNotReached=
allBoxes.filter(function(){return!this.getAttribute("data-max-reached")});checkboxesLimitNotReached.prop("disabled",false)}}function addTopAddRowBtnForRepeater(){jQuery('.frm_section_heading:has(div[class*="frm_repeat_"])').each(function(){const firstRepeatedSection=jQuery(this).find('div[class*="frm_repeat_"]').first()[0];const addButtonWrapper=document.createElement("div");addButtonWrapper.classList.add("frm_form_field","frm_hidden_container","frm_repeat_buttons","frm_hidden");const addButton=firstRepeatedSection.querySelector(".frm_add_form_row");
if(addButton)addButtonWrapper.append(addButton.cloneNode(true));const buttonContainer=firstRepeatedSection.closest(".frm_toggle_container.frm_grid_container");if(buttonContainer)buttonContainer.prepend(addButtonWrapper);else firstRepeatedSection.parentNode.insertBefore(addButtonWrapper,firstRepeatedSection)})}function maybeDisableCheckboxesWithLimit(){jQuery('input[type="checkbox"][data-frmlimit]:not(:checked)').each(function(){var limit=parseInt(this.getAttribute("data-frmlimit"));if(!limit)return;
var allBoxes=jQuery(this).parents(".frm_opt_container").find('input[type="checkbox"]');if(limit>=allBoxes.length)return;var checkedBoxes=allBoxes.filter(function(){return this.checked});if(limit>checkedBoxes.length)return;this.setAttribute("disabled","disabled")})}function checkQuantityFieldMinMax(input){if(""===input.value)return 0;const val=parseFloat(input.value?input.value.trim():0);if(isNaN(val))return 0;let max=input.hasAttribute("max")?parseFloat(input.getAttribute("max")):0;let min=input.hasAttribute("min")?
parseFloat(input.getAttribute("min")):0;max=isNaN(max)?0:max;min=isNaN(min)?0:min<0?0:min;if(val<min){input.value=min;return min}if(0!==max&&val>max){input.value=max;return max}return val}function setHiddenProduct(input){input.setAttribute("data-frmhidden","1");triggerChange(jQuery(input))}function setHiddenProductContainer(container){if(container.innerHTML.includes("data-frmprice"))jQuery(container).find("input[data-frmprice], select:has([data-frmprice])").attr("data-frmhidden","1")}function setShownProduct(input){var wasHidden=
input.getAttribute("data-frmhidden");if(wasHidden!==null){input.removeAttribute("data-frmhidden");triggerChange(jQuery(input))}}function calcProductsTotal(e){var formTotals=[],totalFields;if(typeof __FRMCURR==="undefined")return;if(undefined!==e&&"undefined"!==typeof e.target&&("keyup"===e.type||"change"===e.type)){var el=e.target;if(el.hasAttribute("data-frmprice")&&el instanceof HTMLInputElement&&"text"===el.type)el.setAttribute("data-frmprice",el.value.trim())}totalFields=jQuery("[data-frmtotal]");
if(!totalFields.length)return;totalFields.each(function(){var currency,formId,formatted,total=0,totalField=jQuery(this),$form=totalField.closest("form"),isRepeatingTotal=isRepeatingFieldByName(this.name);if(!$form.length)return;formId=$form.find('input[name="form_id"]').val();currency=getCurrency(formId);if(formTotals[formId]!==undefined&&!isRepeatingTotal)total=formTotals[formId];else{$form.find("input[data-frmprice],select:has([data-frmprice])").each(function(){var quantity,$this,price=0,isUserDef=
false,isSingle=false;if(isRepeatingTotal&&!isRepeatingWithTotal(this,totalField[0]))return;if(this.hasAttribute("data-frmhigherpg")||isProductFieldHidden(this))return;if(this.tagName==="SELECT"){if(this.selectedIndex!==-1)price=this.options[this.selectedIndex].getAttribute("data-frmprice")}else{isUserDef="text"===this.type;isSingle="hidden"===this.type;$this=jQuery(this);if(!isUserDef&&!isSingle&&!$this.is(":checked"))return;price=this.getAttribute("data-frmprice")}if(!price)price=0;else{price=preparePrice(price,
currency);quantity=getQuantity(isUserDef,this);price=parseFloat(quantity)*parseFloat(price)}if("true"===this.getAttribute("data-frmdiscount"))price=price*-1;total+=price});if(!isRepeatingTotal)formTotals[formId]=total}total=isNaN(total)?0:total;currency.decimal_separator=currency.decimal_separator.trim();if(!currency.decimal_separator.length)currency.decimal_separator=".";total=normalizeTotal(total,currency);totalField.val(total);triggerChange(totalField);total=formatCurrency(total,currency);formatted=
totalField.prev(".frm_total_formatted");if(formatted.length<1)formatted=totalField.closest(".frm_form_field").find(".frm_total_formatted");if(formatted.length)formatted.html(total)})}function normalizeTotal(total,currency){const isLargeTotal=total>Number.MAX_SAFE_INTEGER;if(!isLargeTotal){const {decimals}=currency;total=decimals>0?Math.round10(total,decimals):Math.ceil(total)}return maybeAddTrailingZeroToPrice(total,currency,isLargeTotal)}function formatCurrency(total,currency){total=maybeAddTrailingZeroToPrice(total,
currency);if(total.length&&(total[total.length-1]==="."||total[total.length-1]===currency.decimal_separator))total=total.substr(0,total.length-1);total=maybeRemoveTrailingZerosFromPrice(total,currency);total=addThousands(total,currency);const leftSymbol=currency.symbol_left?currency.symbol_left+currency.symbol_padding:"";const rightSymbol=currency.symbol_right?currency.symbol_padding+currency.symbol_right:"";return leftSymbol+total+rightSymbol}function maybeRemoveTrailingZerosFromPrice(total,currency){var split=
total.split(currency.decimal_separator);if(2!==split.length||split[1].length<=currency.decimals)return total;if(0===currency.decimals)return split[0];return split[0]+currency.decimal_separator+split[1].substr(0,currency.decimals)}function addRteRequiredMessages(){var keys,length,index,key,field;if("undefined"===typeof __FRMRTEREQMESSAGES)return;keys=Object.keys(__FRMRTEREQMESSAGES);length=keys.length;for(index=0;index<length;++index){key=keys[index];field=document.getElementById(key);if(field)field.setAttribute("data-reqmsg",
__FRMRTEREQMESSAGES[key])}}function isProductFieldHidden(input){return input.getAttribute("data-frmhidden")!==null}function isRepeatingWithTotal(input,total){var regex=/item_meta\[.+?\]\[.+?\]/;return isRepeatingFieldByName(input.name)&&total.name.match(regex)[0]===input.name.match(regex)[0]}function getCurrency(formId){if(typeof __FRMCURR!=="undefined"&&__FRMCURR[formId]!==undefined)return __FRMCURR[formId]}function getQuantity(isUserDef,field){var quantity,quantityFields,isRepeating,fieldID,$this=
jQuery(field);fieldID=frmFrontForm.getFieldId(field,false);if(!fieldID)return 0;isRepeating=isRepeatingFieldByName(field.name);if(isRepeating){var match=field.name.match(/item_meta\[.+?\]\[.+?\]/);if(null===match)return 0;$this.nameMatch=match[0]}quantity=getQuantityField($this,fieldID,isRepeating);if(quantity)quantity=checkQuantityFieldMinMax(quantity);else{quantityFields=getQuantityFields($this,isRepeating);if(1===quantityFields.length&&""===quantityFields[0].getAttribute("data-frmproduct").trim())quantity=
checkQuantityFieldMinMax(quantityFields[0]);else quantity=1}if(0===quantity&&isUserDef)quantity=1;return quantity}function getQuantityField(elementObj,fieldID,isRepeating){var quantity,quantityFields=elementObj.closest("form").find("[data-frmproduct]");fieldID=fieldID.toString();quantityFields.each(function(){var ids;if(isRepeating&&-1===this.name.indexOf(elementObj.nameMatch))return true;ids=JSON.parse(this.getAttribute("data-frmproduct").trim());if(""===ids)return true;ids="string"===typeof ids?
[ids.toString()]:ids;if(ids.includes(fieldID)){quantity=this;return false}});return quantity}function getQuantityFields(elementObj,isRepeating){var quantityFields;if(isRepeating)quantityFields=elementObj.closest("form").find('[name^="'+elementObj.nameMatch+'"]'+"[data-frmproduct]");else quantityFields=elementObj.closest("form").find('[data-frmproduct]:not([id*="-"])');return quantityFields}function preparePrice(price,currency){var matches;if(!price)return 0;price=price+"";const regex=getRegexForPrice(currency);
matches=price.match(regex);if(null===matches)return 0;price=matches.length?matches[matches.length-1]:0;price=price.trim();if(currency.decimal_separator==="."&&3===price.split(".").length&&price[0]===".")price=price.substr(1);if(price){price=maybeUseDecimal(price,currency);price=price.split(currency.thousand_separator).join("").replace(currency.decimal_separator,".")}return price}function getRegexForPrice(currency){let regexString="[0-9,.";if(currency.thousand_separator!=="."&&currency.thousand_separator!==",")regexString+=currency.thousand_separator;if(currency.decimal_separator!=="."&&currency.decimal_separator!==",")regexString+=currency.decimal_separator;regexString+="]*\\.?\\,?[0-9]+";return new RegExp(regexString,"g")}function maybeUseDecimal(amount,currency){var usedForDecimal,amountParts;if(currency.thousand_separator=="."){amountParts=amount.split(".");usedForDecimal=2==amountParts.length&&2==amountParts[1].length;if(usedForDecimal)amount=amount.replace(".",currency.decimal_separator)}return amount}
function maybeAddTrailingZeroToPrice(price,currency,force=false){if("number"!==typeof price&&!force)return price;price+="";var pos=price.indexOf(".");if(pos===-1){price=price+".";for(let n=0;n<currency.decimals;++n)price+="0"}else{const decimalsString=price.substring(pos+1);if(decimalsString.length<currency.decimals){if(decimalsString.length<2)price+="0";for(let n=2;n<currency.decimals;++n)price+="0"}}return price.replace(".",currency.decimal_separator)}function addThousands(total,{decimal_separator,
thousand_separator}){const split=decimal_separator===""?[total.toString()]:total.split(decimal_separator);if(thousand_separator)split[0]=split[0].replace(/\B(?=(\d{3})+(?!\d))/g,thousand_separator);return split.join(decimal_separator)}function setAutoHeightForTextArea(){document.querySelectorAll(".frm-show-form textarea").forEach(function(element){var minHeight,callback;if(element.dataset.autoGrow===undefined||element.getAttribute("frm-autogrow"))return;minHeight=getElementHeight(element);element.style.overflowY=
"hidden";element.style.transition="none";callback=function(){adjustHeight(element,minHeight)};callback();element.addEventListener("input",callback);if(shouldCallResizeCallback())window.addEventListener("resize",callback);document.addEventListener("frmShowField",callback);element.setAttribute("frm-autogrow",1)})}function shouldCallResizeCallback(){if(!("userAgent"in navigator))return true;const userAgent=navigator.userAgent.toLowerCase();return!userAgent.includes("android")&&!userAgent.includes("iphone")}
function getElementHeight(element){var clone,container,height;clone=element.cloneNode(true);clone.style.position="absolute";clone.style.left="-10000px";clone.style.top="-10000px";container=jQuery(element).closest(".frm_forms").get(0);container.append(clone);height=clone.clientHeight;container.removeChild(clone);return height}function adjustHeight(el,minHeight){if(minHeight>=el.scrollHeight)return;el.style.height=0;el.style.height=Math.max(minHeight,el.scrollHeight)+"px"}function updateContentLength(){function onChange(e){var length,
max,type,messageEl=e.target.nextElementSibling,countEl=messageEl.querySelector("span");if(!countEl)return;type=messageEl.getAttribute("data-max-type");max=parseInt(messageEl.getAttribute("data-max"));if("word"===type)length=e.target.value.split(/\s+/).filter(function(word){return word}).length;else length=e.target.value.length;countEl.innerText=length;messageEl.classList.toggle("frm_limit_error",length>max)}document.addEventListener("input",function(e){var target;for(target=e.target;target&&target!=this;target=target.parentNode)if(target.matches("textarea")&&target.nextElementSibling&&target.nextElementSibling.matches(".frm_pro_max_limit_desc")){onChange(e);break}},false)}function triggerEvent(element,eventType,data){if("function"===typeof frmFrontForm.triggerCustomEvent)frmFrontForm.triggerCustomEvent(element,eventType,data)}function startOverButton(){function getInputs(formEl){return getInputsInFieldOnPage(formEl)}function resetInputs(formEl){var inputs=getInputs(formEl);function resetRepeater(repeatBtns){var repeater,
items;repeater=repeatBtns.parentElement;items=repeater.querySelectorAll(".frm_repeat_sec, .frm_repeat_inline, .frm_repeat_grid");if(!items.length){currentlyAddingRow=false;repeatBtns.querySelector(".frm_add_form_row").click()}else if(items.length>1)items.forEach(function(item,index){if(index)item.parentElement.removeChild(item);else item.querySelector(".frm_add_form_row").classList.remove("frm_hide_add_button")})}formEl.querySelectorAll(".frm_section_heading > .frm_repeat_buttons").forEach(resetRepeater);
clearValueForInputs(inputs,"",true);inputs.forEach(function(input){if(input.disabled&&input.getAttribute("data-frmlimit"))input.removeAttribute("disabled")})}function isMultiPagesForm(formId){return document.getElementById("frm_page_order_"+formId)||document.querySelector("#frm_form_"+formId+'_container input[name="frm_next_page"]')}function reloadForm(formId,formEl){const stateField=document.querySelector('input[name="frm_state"]');const state=null!==stateField?stateField.value:"";formEl.classList.add("frm_loading_form");
postToAjaxUrl(formEl,{action:"frm_load_form",form:formId,_ajax_nonce:frm_js.nonce,frm_state:state},function(response){var idValueMapping;if(!response.success){console.warn(response);return}idValueMapping=getDefaultValuesFromForm(formEl);jQuery(formEl.closest(".frm_forms")).replaceWith(response.data);setDefaultValues(idValueMapping);maybeShowMoreStepsButton();if("undefined"!==typeof __frmAjaxDropzone)window.__frmDropzone=__frmAjaxDropzone;checkConditionalLogic("pageLoad");checkFieldsOnPage("frm_form_"+
formId+"_container");triggerCompletedEvent(formId)},function(response){console.warn(response)})}function getDefaultValuesFromForm(formEl){var inputs,values={};inputs=formEl.querySelectorAll("[data-frmval]");inputs.forEach(function(input){values[input.id]=input.getAttribute("data-frmval")});return values}function setDefaultValues(idValueMapping){Object.keys(idValueMapping).forEach(function(id){var input=document.getElementById(id);if(!input)return;input.setAttribute("data-frmval",idValueMapping[id]);
if("checkbox"===input.type||"radio"===input.type){if(input.value===idValueMapping[id])input.checked=true;return}input.value=idValueMapping[id]})}function hasSaveDraft(formEl){return!!formEl.querySelector(".frm_save_draft")}function deleteDraft(formId,formEl){postToAjaxUrl(formEl,{action:"frm_delete_draft_entry",form:formId,_ajax_nonce:frm_js.nonce})}function onClickStartOver(e){e.preventDefault();var formEl,formId,draftIdInput;formEl=e.target.closest("form");if(!formEl)return;formId=formEl.querySelector('input[name="form_id"]').value;
if(hasSaveDraft(formEl)){deleteDraft(formId,formEl);draftIdInput=formEl.querySelector('input[name="id"]');if(draftIdInput)draftIdInput.remove();formEl.querySelector('input[name="frm_action"]').value="create"}if(isMultiPagesForm(formId))reloadForm(formId,formEl);else{resetInputs(formEl);triggerCompletedEvent(formId)}}function triggerCompletedEvent(formId){triggerEvent(document,"frm_after_start_over",{formId:formId})}document.addEventListener("click",function(e){var target;for(target=e.target;target&&
target!=this;target=target.parentNode)if(target.matches(".frm_start_over")){onClickStartOver.call(target,e);break}},false)}function maybeShowMoreStepsButton(){var i,listWrappers,listWrapper,rootlineSteps,wrappingElementsCount,startIndex,hiddenSteps,showMoreButtonLi,showMoreButton,hiddenStepsWrapper,oldIE;listWrappers=document.getElementsByClassName("frm_rootline");copyRootlines(listWrappers);oldIE=isOldIEVersion(10);for(i=0;i<listWrappers.length;i++){listWrapper=listWrappers[i];if(oldIE){listWrapper.className+=
" frm_hidden";continue}rootlineSteps=listWrapper.children;wrappingElementsCount=countOverflowPages(rootlineSteps);if(!wrappingElementsCount)continue;showMoreButton=listWrapper.querySelector(".frm_rootline_show_more_btn");if(!showMoreButton)continue;showMoreButton.addEventListener("click",showMoreSteps);showMoreButtonLi=showMoreButton.parentNode;showMoreButtonLi.className=showMoreButtonLi.className.replace(" frm_hidden","");startIndex=rootlineSteps.length-wrappingElementsCount>1?rootlineSteps.length-
wrappingElementsCount-3:0;hiddenSteps=[].slice.call(rootlineSteps,Math.max(startIndex,1),rootlineSteps.length-2);hiddenStepsWrapper=showMoreButtonLi.querySelector(".frm_rootline_hidden_steps");hiddenSteps.forEach(function(hiddenStep){hiddenStepsWrapper.append(hiddenStep)});moveRootlineTitles(hiddenStepsWrapper,listWrapper,showMoreButton);listWrapper.insertBefore(showMoreButtonLi,listWrapper.children[listWrapper.children.length-1]);if(listWrapper.children[listWrapper.children.length-1].className.includes("frm_current_page"))updateRootlineStyle(hiddenStepsWrapper)}}
function isOldIEVersion(max){var version,myNav=navigator.userAgent.toLowerCase();version=myNav.includes("msie")?parseInt(myNav.split("msie")[1]):false;return version!==false&&max>=version}function countOverflowPages(rootlineSteps){var j,wrappingElementsCount=0;for(j=0;j<rootlineSteps.length;j++)if(rootlineSteps[j].offsetTop!==rootlineSteps[0].offsetTop&&!rootlineSteps[j].className.includes("frm_rootline_show_hidden_steps_btn"))wrappingElementsCount++;return wrappingElementsCount}function moveRootlineTitles(hiddenStepsWrapper,
listWrapper,showMoreButton){var currentPageTitle,currentStepTitle,rootlineGroup,activeHiddenStepLink=hiddenStepsWrapper.querySelector("input:not(.frm_page_back):not(.frm_page_skip)");if(activeHiddenStepLink){currentPageTitle=activeHiddenStepLink.parentElement.querySelector(".frm_rootline_title");maybeUpdateRootlineTitles(activeHiddenStepLink.parentElement.previousElementSibling,hiddenStepsWrapper);showMoreButton.parentElement.className+=" active";showMoreButton.className+=" active"}else currentPageTitle=
listWrapper.querySelector(".frm_current_page").querySelector(".frm_rootline_title");if(!currentPageTitle)return;currentStepTitle=currentPageTitle.textContent;if(!currentStepTitle)return;rootlineGroup=listWrapper.closest(".frm_rootline_group");showCurrentHiddenStepText(currentStepTitle)}function showCurrentHiddenStepText(currentStepTitle){var rootlineCurrentStep=document.createElement("span");rootlineCurrentStep.className="frm_rootline_title";rootlineCurrentStep.textContent=currentStepTitle;document.querySelector(".frm_rootline_show_hidden_steps_btn").append(rootlineCurrentStep)}
function copyRootlines(listWrappers){var i,listWrapper,rootlinesBackup;rootlinesBackup={};for(i=0;i<listWrappers.length;i++){listWrapper=listWrappers[i];rootlinesBackup[listWrapper.closest("form").getAttribute("id")]=listWrapper.cloneNode(true)}listWrappersOriginal=rootlinesBackup}function maybeUpdateRootlineTitles(previousPageLink,hiddenStepsWrapper){var i;if(previousPageLink){i=0;while(previousPageLink){i++;previousPageLink=previousPageLink.previousElementSibling}updateRootlineStyle(hiddenStepsWrapper,
i)}}function updateRootlineStyle(hiddenStepsWrapper,uptoIndex){var rootlineTitles,rootlineTitle;if(!uptoIndex)uptoIndex=hiddenStepsWrapper.children.length;rootlineTitles=[].slice.call(hiddenStepsWrapper.children,0,uptoIndex);rootlineTitles.forEach(function(el){rootlineTitle=el.querySelector(".frm_rootline_title");if(rootlineTitle)rootlineTitle.className+=" frm_prev_page_title"})}function showMoreSteps(e){var hiddenStepsWrapper=e.target.parentElement.querySelector("ul");if(hiddenStepsWrapper.className.includes("frm_hidden"))hiddenStepsWrapper.className=
hiddenStepsWrapper.className.replace(" frm_hidden","");else hiddenStepsWrapper.className+=" frm_hidden"}function validateForm(){document.addEventListener("frm_get_ajax_form_errors",function(event){if(!event.frmData.formEl)return;validateCheckboxMinSelections(event.frmData.formEl,event.frmData.errors)})}function validateCheckboxMinSelections(formEl,errors){var checkboxes,checkedField={},errorMsg=frmCheckboxI18n.errorMsg.min_selections;if("function"===typeof formEl.get)formEl=formEl.get(0);checkboxes=
formEl.querySelectorAll('input[type="checkbox"][data-frmmin]:checked');checkboxes.forEach(function(checkbox){var min,fieldEl,checkedCheckboxes,key;min=parseInt(checkbox.dataset.frmmin,10);if(!min)return;fieldEl=checkbox.closest(".frm_form_field");key=fieldEl.id.replace("frm_field_","").replace("_container","");if(checkedField[key])return;checkedCheckboxes=fieldEl.querySelectorAll('input[type="checkbox"]:checked');if(!checkedCheckboxes.length)return;if(checkedCheckboxes.length<min)errors[key]=errorMsg.replace("%1$d",
min).replace("%2$d",checkedCheckboxes.length);checkedField[key]=true})}function validateFieldValue(){document.addEventListener("frm_validate_field_value",function(event){if("object"!==typeof event.frmData.field||"object"!==typeof event.frmData.errors)return;if("password"===event.frmData.field.type)validatePasswordStrength(event.frmData.field,event.frmData.errors)})}function validatePasswordStrength(field,errors){var check,regex,checks;if("object"!==typeof window.frm_password_checks)return;if(-1===field.className.indexOf("frm_strong_pass")||0===field.id.indexOf("field_conf_"))return;checks=window.frm_password_checks;for(check in checks){regex=checks[check].regex.slice(1,checks[check].regex.length-1);regex=new RegExp(regex);if(!regex.test(field.value)){errors[frmFrontForm.getFieldId(field)]=checks[check].message;return}}}function maybeTriggerCalc(event){if(event.persisted||window.performance&&window.performance.getEntriesByType("navigation")[0].type==="back_forward")triggerCalc()}function showMoreStepsButtonEvents(){var timeout;
window.addEventListener("resize",function(){var i,listWrappers,listWrapper,form;listWrappers=document.getElementsByClassName("frm_rootline");for(i=0;i<listWrappers.length;i++){listWrapper=listWrappers[i];form=listWrapper.closest("form");form.querySelector(".frm_rootline_group").replaceChild(listWrappersOriginal[form.getAttribute("id")],listWrapper)}clearTimeout(timeout);timeout=setTimeout(maybeShowMoreStepsButton(),100)})}function handleShowPasswordBtn(){documentOn("click",".frm_show_password_btn",
function(event){var input=event.target.closest(".frm_show_password_wrapper").querySelector("input"),button=input.nextElementSibling;if("password"===input.type){input.type="text";button.setAttribute("data-show-password-label",button.title);button.title=button.getAttribute("data-hide-password-label")}else{input.type="password";button.title=button.getAttribute("data-show-password-label")}button.setAttribute("aria-label",button.title)})}function handleRangeSliders(){document.querySelectorAll(".frm_range_container").forEach(function(rangeContainer){const rangeInput=
rangeContainer.querySelector('input[type="hidden"]');if(!rangeInput||rangeInput.dataset.isRangeSliderInitialized)return;initializeRangeSlider(rangeInput,rangeContainer)})}function documentOn(event,selector,handler,options){if("undefined"===typeof options)options=false;document.addEventListener(event,function(e){var target;for(target=e.target;target&&target!=this;target=target.parentNode)if(target&&target.matches&&target.matches(selector)){handler.call(target,e);break}},options)}function handleElementorPopupConflicts(){var elementorPopupWrapper=
document.querySelector(".elementor-popup-modal");if(null!==elementorPopupWrapper){elementorPopupWrapper.querySelectorAll(".frm_dropzone").forEach(function(item){item.classList.remove("dz-clickable")});elementorPopupWrapper.querySelectorAll(".frm_form_field .chosen-container").forEach(function(chosenContainer){chosenContainer.remove()})}loadDropzones();loadAutocomplete()}function getAllFormClasses(input){var formContainer,formClasses;formContainer=input.closest(".with_frm_style");if(!formContainer)return[];
formClasses=[];Array.prototype.forEach.call(formContainer.className.split(" "),function(className){var trimmedClassName=className.trim();if(""!==trimmedClassName&&"frm_forms"!==trimmedClassName)formClasses.push(trimmedClassName)});return formClasses}function maybeAddIntlTelInput(phoneInputs){if(document.body.classList.contains("wp-admin")||typeof window.intlTelInput!=="function")return;phoneInputs.forEach(function(phoneInput){const parentContainer=document.createElement("div");parentContainer.classList.add("frm_forms",
"with_frm_style");document.body.append(parentContainer);const intlPhoneConfig={initialCountry:"auto",formatOnDisplay:false,dropdownContainer:parentContainer,geoIpLookup:function(callback){if("function"===typeof window.fetch)fetch("https://ipapi.co/json").then(function(res){return res.json()}).then(function(data){callback(data.country_code)}).catch(function(){callback("us")})},loadUtils:()=>import((getProPluginUrl()+"/js/intl-tel-input-utils.min.js"))};if(phoneInput.dataset.onlyCountries){intlPhoneConfig.onlyCountries=
phoneInput.dataset.onlyCountries.split(",");if(1===intlPhoneConfig.onlyCountries.length){intlPhoneConfig.initialCountry=intlPhoneConfig.onlyCountries[0];intlPhoneConfig.allowDropdown=false}}if(phoneInput.dataset.countryOrder)intlPhoneConfig.countryOrder=phoneInput.dataset.countryOrder.split(",");const intlTelInputInstance=window.intlTelInput(phoneInput,intlPhoneConfig);phoneInput.addEventListener("countrychange",function(){if(!this.value)return;this.dispatchEvent(new Event("change",{bubbles:true}))});
phoneInput.addEventListener("blur",function(){if(phoneInput.dataset.numberFormat)phoneInput.value=intlTelInputInstance.getNumber(determineNumberFormat(phoneInput.dataset.numberFormat));else phoneInput.value=intlTelInputInstance.getNumber()});intlPhoneInputs[phoneInput.id]=intlTelInputInstance})}function determineNumberFormat(numberFormat){numberFormat=numberFormat.toLowerCase();const map={e164:0,international:1,national:2,rfc3966:3};return map[numberFormat]??0}function maybeUpdateFormsOverflowX(){document.querySelectorAll(".frm-show-form").forEach(function(slideinForm){slideinForm.style["overflow-x"]=
"visible"})}function initRangeInput(rangeInputs){rangeInputs.forEach(function(rangeInput){updateRangeInputBackground(rangeInput);rangeInput.addEventListener("input",function(){updateRangeInputBackground(rangeInput)});rangeInput.addEventListener("onchange",function(){updateRangeInputBackground(rangeInput)})});function updateRangeInputBackground(rangeInput){const sliderValuePercent=(rangeInput.value-rangeInput.min)/(rangeInput.max-rangeInput.min)*100;rangeInput.style.background=`linear-gradient(to right, var(--slider-color) 0%, var(--slider-color) ${sliderValuePercent}%, var(--slider-bar-color) ${sliderValuePercent}% 100%)`}}function initFormatFieldValueNumbers(){document.querySelectorAll(".frm-has-number-format:not([data-has-number-format-events])").forEach(field=>{field.dataset.hasNumberFormatEvents=true;document.addEventListener("frmShowField",()=>onShowField(field));field.addEventListener("focus",handleFocus);field.addEventListener("blur",handleBlur);if(field.classList.contains("frm_field_number"))field.addEventListener("keydown",restrictToNumericInput);triggerFormatting(field)});function triggerFormatting(field){field.dispatchEvent(new Event("blur",
{bubbles:true}))}function onShowField(field){if(!field.offsetHeight||field.value!=="")return;const {rawValue,frmval}=field.dataset;const valueToUse=rawValue||frmval;if(valueToUse??false){field.value=valueToUse;triggerFormatting(field)}}function handleFocus({target:field}){const {rawValue}=field.dataset;if(rawValue!==null)field.value=rawValue}function handleBlur({target:field}){const previousValue=field.value;const previousRawValue=field.getAttribute("data-raw-value")??"";const fieldKey=getFieldKey(field.id,
field.name);const userTyped=field.value;field.setAttribute("data-raw-value",userTyped);field.value=applyNumberFormatting(userTyped,fieldKey);if(previousValue!==field.value||previousRawValue!==userTyped)field.dispatchEvent(new Event("change",{bubbles:true}))}function restrictToNumericInput(event){const {target:field,key,ctrlKey,metaKey}=event;const fieldKey=getFieldKey(field.id,field.name);const formatConfig=getCurrencyFromCalcRule(__FRMCALC.calc?.[fieldKey])||{};const decimalSeparator=formatConfig.decimal_separator??
".";const thousandSeparator=formatConfig.thousand_separator??"";const decimals=parseInt(formatConfig.decimals??2,10);const allowedKeys=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Home","End","Enter"];if(allowedKeys.includes(key)||ctrlKey||metaKey)return;let regexPattern="^[0-9\\+\\-";if(decimals>0)regexPattern+=escapeForRegex(decimalSeparator);if(thousandSeparator)regexPattern+=escapeForRegex(thousandSeparator);regexPattern+="]$";const oneCharRegex=new RegExp(regexPattern);
if(!oneCharRegex.test(key)){event.preventDefault();return}if(decimals===0&&key===(decimalSeparator!==""?decimalSeparator:".")){event.preventDefault();return}if(key===decimalSeparator&&field.value.includes(decimalSeparator)){event.preventDefault();return}if((key==="+"||key==="-")&&field.selectionStart!==0)event.preventDefault()}function applyNumberFormatting(text,fieldKey){if(!__FRMCALC?.calc?.[fieldKey])return text;const formatConfig=getCurrencyFromCalcRule(__FRMCALC.calc[fieldKey]);const {decimal_separator:decimalSeparator=
".",thousand_separator:thousandSeparator=",",symbol_left:symbolLeft="",symbol_right:symbolRight="",symbol_padding:symbolPadding=""}=formatConfig;const escapedDecimalSeparator=escapeForRegex(decimalSeparator);const escapedThousandSeparator=escapeForRegex(thousandSeparator);const escapedSymbolLeft=escapeForRegex(symbolLeft);const escapedSymbolRight=escapeForRegex(symbolRight);const escapedSymbolPadding=escapeForRegex(symbolPadding);let pattern="(?<!\\S)";if(symbolLeft)pattern+=`(?:${escapedSymbolLeft}${symbolPadding?
escapedSymbolPadding:""})?`;pattern+=`([-+]?\\d+(?:${escapedThousandSeparator}\\d+)*(?:${escapedDecimalSeparator}\\d+)?)`;if(symbolRight)pattern+=`(?:${symbolPadding?escapedSymbolPadding:""}${escapedSymbolRight})?`;pattern+="(?!\\S)";const numericRegex=new RegExp(pattern,"g");return text.replace(numericRegex,match=>{const sign=match.startsWith("-")?"-":match.startsWith("+")?"+":"";const signRemoved=match.replace(/^[-+]/,"");const number=stripSymbolsAndFormatNumber(signRemoved,formatConfig);const formatted=
formatCurrency(normalizeTotal(number,formatConfig),formatConfig);return`${sign}${formatted}`})}function stripSymbolsAndFormatNumber(value,config={}){const {symbol_left:symbolLeft="",symbol_right:symbolRight="",decimal_separator:decimalSeparator=".",thousand_separator:thousandSeparator=","}=config;let cleanedValue=value.trim();if(symbolLeft)cleanedValue=cleanedValue.replace(symbolLeft,"");if(symbolRight)cleanedValue=cleanedValue.replace(symbolRight,"");cleanedValue=cleanedValue.trim();if(thousandSeparator){const split=
cleanedValue.split(thousandSeparator);if(split.length!==2||split[1].length>2)cleanedValue=split.join("");else cleanedValue=split[0]+"."+split[1]}if(decimalSeparator.trim()&&decimalSeparator!==".")cleanedValue=cleanedValue.split(decimalSeparator).join(".");return cleanedValue.trim()}function escapeForRegex(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}function initializeRangeSlider(rangeInput,rangeContainer){const parseDataset=dataset=>{const parsed={};for(const [key,value]of Object.entries(dataset))parsed[key]=
parseFloat(value,10);return parsed};const {minGap,maxGap}=parseDataset(rangeInput.dataset);const min=parseFloat(rangeInput.min,10);const max=parseFloat(rangeInput.max,10);const minRange=minGap||0;const maxRange=maxGap||max-min;if(min>=max)throw new Error("Min value must be less than max value");if(minRange<=0||minRange>max-min)throw new Error("Invalid minimum range value");if(maxRange<minRange||maxRange>max-min)throw new Error("Invalid maximum range value");const values=rangeInput.value.split(",");
values[0]=values[0]||min;values[1]=values[1]||max;const step=parseFloat(rangeInput.step,10);const sliderRange=max-min;const stepInPercent=step/sliderRange*100;const minRangePercent=minRange/sliderRange*100;const maxRangePercent=maxRange/sliderRange*100;const minHandle=rangeContainer.querySelector(".min-handle");const maxHandle=rangeContainer.querySelector(".max-handle");const rangeElement=rangeContainer.querySelector(".frm-slider-range");const minValueDisplay=rangeContainer.querySelector(".min-value");
const maxValueDisplay=rangeContainer.querySelector(".max-value");const track=rangeContainer.querySelector(".frm-slider-track");let decimalsToUse=0;[step,min,max,minRange,maxRange].forEach(value=>{const decimal=countDecimals(value);if(decimal>decimalsToUse)decimalsToUse=decimal});const initialMinValue=Math.max(values[0],min);const initialMaxValue=Math.min(values[1],initialMinValue+maxRange,max);const getWidthWithHiddenParent=element=>{if(!element.isConnected)return 0;if(element.closest(".frm_form_field").style.display!=="none"&&element.closest(".frm_toggle_container.frm_grid_container")?.style.display!=="none"){const trackRect=track.getBoundingClientRect();return trackRect.width}const originalParent=element.parentNode;const originalNextSibling=element.nextSibling;document.body.append(element);const width=element.offsetWidth;if(originalNextSibling)originalParent.insertBefore(element,originalNextSibling);else originalParent.append(element);return width};let trackWidth=getWidthWithHiddenParent(track);let minPos=(initialMinValue-
min)/sliderRange*100;let maxPos=(initialMaxValue-min)/sliderRange*100;updateHandlesPositionAndValue();window.addEventListener("resize",function(){trackWidth=getWidthWithHiddenParent(track)});let isDragging=false;let activeHandle=null;let startX=0;let startMinPos=0;let startMaxPos=0;setupHandle(minHandle);setupHandle(maxHandle);rangeInput.addEventListener("change",setHandlesBasedOnValue);function setupHandle(handle){handle.addEventListener("touchstart",handleTouchStart,{passive:false});handle.addEventListener("mousedown",
handleMouseDown)}function handleTouchStart(e){isDragging=true;activeHandle=e.target;const touch=e.touches[0];startX=touch.clientX;startMinPos=minPos;startMaxPos=maxPos;document.addEventListener("touchmove",handleTouchMove,{passive:false});document.addEventListener("touchend",handleTouchEnd);e.preventDefault()}function handleMouseDown(e){isDragging=true;activeHandle=e.target;startX=e.clientX;startMinPos=minPos;startMaxPos=maxPos;document.addEventListener("mousemove",onMouseMove);document.addEventListener("mouseup",
onMouseUp);e.preventDefault()}function handleTouchMove(e){if(!isDragging)return;const touch=e.touches[0];const mouseEvent=new MouseEvent("mousemove",{clientX:touch.clientX,clientY:touch.clientY});onMouseMove(mouseEvent,e);e.preventDefault()}function handleTouchEnd(){document.removeEventListener("touchmove",handleTouchMove);document.removeEventListener("touchend",handleTouchEnd)}function onMouseMove(e){if(!isDragging)return;const deltaX=e.clientX-startX;const deltaPercent=deltaX/trackWidth*100;const minHandleIsMoved=
activeHandle===minHandle;let newMinPos,newMaxPos,hasMovedMinimumSteps;if(minHandleIsMoved){newMinPos=startMinPos+deltaPercent;hasMovedMinimumSteps=Math.abs(newMinPos-minPos)>=stepInPercent}else{newMaxPos=startMaxPos+deltaPercent;hasMovedMinimumSteps=Math.abs(newMaxPos-maxPos)>=stepInPercent}if(!hasMovedMinimumSteps)return;const movingRight=minHandleIsMoved?newMinPos>minPos:newMaxPos>maxPos;const numberOfNewSteps=movingRight?Math.floor(deltaPercent/stepInPercent):Math.ceil(deltaPercent/stepInPercent);
const newRange=activeHandle===minHandle?maxPos-newMinPos:newMaxPos-minPos;const stepsDelta=numberOfNewSteps*stepInPercent;if(activeHandle===minHandle){if(newRange<minRangePercent){const tempMinPos=Math.max(startMinPos+stepsDelta,0);if(tempMinPos+minRangePercent<=100){minPos=tempMinPos;maxPos=Math.max(0,minPos+minRangePercent)}}else if(newRange>maxRangePercent){minPos=Math.max(0,startMinPos+stepsDelta);maxPos=minPos+maxRangePercent}else minPos=Math.max(0,startMinPos+stepsDelta);updateHandlesPositionAndValue();
return}if(newRange<minRangePercent){const tempMaxPos=Math.min(startMaxPos+stepsDelta,100);if(tempMaxPos-minRangePercent>=0){maxPos=tempMaxPos;minPos=Math.max(0,maxPos-minRangePercent)}}else if(newRange>maxRangePercent){maxPos=Math.min(100,startMaxPos+stepsDelta);minPos=maxPos-maxRangePercent}else maxPos=Math.min(100,startMaxPos+stepsDelta);updateHandlesPositionAndValue()}function updateHandlesPositionAndValue(){minPos=parseFloat(minPos);maxPos=parseFloat(maxPos);minHandle.style.left=`${minPos}%`;
maxHandle.style.right=`${100-maxPos}%`;updateRangeElement();const {currentMin,currentMax}=prepareCurrentValues();updateDisplayedValues(currentMin,currentMax);rangeContainer.querySelector("input").value=`${currentMin},${currentMax}`}function countDecimals(num){const str=num.toString();const decimalIndex=str.indexOf(".");return decimalIndex===-1?0:str.length-decimalIndex-1}function formatSliderValue(value){const fieldKey=getFieldKey(rangeInput.id,rangeInput.name);if(window.__FRMCALC?.calc[fieldKey])return formatValueAsCurrency(value,
fieldKey);return value}function updateDisplayedValues(currentMin,currentMax){minValueDisplay.textContent=formatSliderValue(currentMin);maxValueDisplay.textContent=formatSliderValue(currentMax)}function prepareCurrentValues(){let currentMin=(min+minPos/stepInPercent*step).toFixed(decimalsToUse);let currentMax=(min+maxPos/stepInPercent*step).toFixed(decimalsToUse);currentMin=Number(currentMin).toPrecision().toString();currentMax=Number(currentMax).toPrecision().toString();return{currentMin,currentMax}}
function onMouseUp(){isDragging=false;document.removeEventListener("mousemove",onMouseMove);document.removeEventListener("mouseup",onMouseUp)}function updateRangeElement(){rangeElement.style.left=`${minPos}%`;rangeElement.style.width=`${maxPos-minPos}%`}function setHandlesBasedOnValue(){const {minGap}=parseDataset(rangeInput.dataset);const min=parseFloat(rangeInput.min,10);const max=parseFloat(rangeInput.max,10);const minRange=minGap||0;const sliderRange=max-min;const values=rangeInput.value.split(",");
values[0]=values[0]||min;values[1]=values[1]||max;const initialMinValue=Math.max(values[0],min);const initialMaxValue=Math.min(Math.max(values[1],initialMinValue+minRange),max);minPos=(initialMinValue-min)/sliderRange*100;maxPos=(initialMaxValue-min)/sliderRange*100;updateHandlesPositionAndValue()}}return{init:function(){maybeUpdateFormsOverflowX();maybeAddIntlTelInput(document.querySelectorAll(".frm-intl-tel-input"));initRangeInput(document.querySelectorAll(".with_frm_style input[type=range]"));
initFormatFieldValueNumbers();addEventListener("pageshow",maybeTriggerCalc);jQuery(document).on("frmFormComplete",afterFormSubmitted);jQuery(document).on("frmPageChanged",afterPageChanged);jQuery(document).on("frmAfterAddRow frmAfterRemoveRow",calcProductsTotal);jQuery(document).on("click",".frm_trigger",toggleSection);jQuery(document).on("keydown",".frm_trigger",toggleSection);var $blankField=jQuery(".frm_blank_field");if($blankField.length)$blankField.closest(".frm_toggle_container").prev(".frm_trigger").trigger("click");
jQuery(document).on("click",".frm_remove_link",removeFile);jQuery(document).on("frmFieldChanged",maybeCheckDependent);jQuery(document).on("keyup","input.frm_strength_meter",checkPasswordField);jQuery(document).on("keydown",".frm_switch",triggerToggleClickOnSpace);jQuery(document).on("mouseenter click",".frm-star-group input",loadStars);jQuery(document).on("mouseenter",".frm-star-group .star-rating:not(.star-rating-readonly)",hoverStars);jQuery(document).on("mouseleave",".frm-star-group .star-rating:not(.star-rating-readonly)",
unhoverStars);jQuery(document).on("click",'.frm-show-form input[type="submit"], .frm-show-form input[name="frm_prev_page"], .frm_page_back, .frm_page_skip, .frm-show-form .frm_save_draft, .frm_prev_page, .frm_button_submit, .frm_rootline_show_hidden_steps_btn .frm_rootline_single',setNextPage);jQuery(document).on("change",'.frm_other_container input[type="checkbox"], .frm_other_container input[type="radio"], .frm_other_container select',showOtherText);jQuery(document).on("change",'.frm_switch_block input[type="checkbox"]',
setToggleAriaChecked);jQuery(document).on("click",".frm_remove_form_row",removeRow);jQuery(document).on("click",".frm_add_form_row",addRow);jQuery(document).on("click",".frm_edit_link_container a.frm_inplace_edit",editEntry);jQuery(document).on("click",".frm_edit_link_container a.frm_cancel_edit",cancelEdit);jQuery(document).on("click",".frm_ajax_delete",deleteEntry);jQuery(".frm_month_heading, .frm_year_heading").on("click",function(){var content=jQuery(this).children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s");
if(content.hasClass("ui-icon-triangle-1-e")){content.addClass("ui-icon-triangle-1-s").removeClass("ui-icon-triangle-1-e");jQuery(this).next(".frm_toggle_container").fadeIn("slow")}else{content.addClass("ui-icon-triangle-1-e").removeClass("ui-icon-triangle-1-s");jQuery(this).next(".frm_toggle_container").hide()}});jQuery(document).on("elementor/popup/show",handleElementorPopupConflicts);addTopAddRowBtnForRepeater();jQuery(document).on("click",'input[type="checkbox"][data-frmlimit]',checkCheckboxSelectionLimit);
jQuery(document).on("change",'[type="checkbox"][data-frmprice],[type="radio"][data-frmprice],[type="hidden"][data-frmprice],select:has([data-frmprice])',calcProductsTotal);jQuery(document).on("keyup change",'[data-frmproduct],[type="text"][data-frmprice]',calcProductsTotal);jQuery(document).on("frmFormComplete frmPageChanged frmInPlaceEdit frmAfterAddRow",setAutoHeightForTextArea);maybeDisableCheckboxesWithLimit();setInlineFormWidth();checkConditionalLogic("pageLoad");checkFieldsOnPage(undefined,
"pageLoad");processPendingAjax();addRteRequiredMessages();setAutoHeightForTextArea();updateContentLength();calcProductsTotal();startOverButton();maybeShowMoreStepsButton();showMoreStepsButtonEvents();validateFieldValue();validateForm();handleShowPasswordBtn();jQuery(document).on("input change","input[data-frmrange]",handleSliderEvent)},savingDraft:function(object){return savingDraftEntry(object)},goingToPreviousPage:function(object){return goingToPrevPage(object)},hideOrShowFields:function(ids,event){if("pageLoad"===event)clearHideFields();var len=ids.length,repeatArgs={repeatingSection:"",repeatRow:""};for(var i=0,l=len;i<l;i++){hideOrShowFieldById(ids[i],repeatArgs);if(i==l-1)showForm()}},hidePreviouslyHiddenFields:function(){var hiddenFields=getAllHiddenFields(),len=hiddenFields.length;for(var i=0,l=len;i<l;i++){var container=document.getElementById(hiddenFields[i]);if(container==null){container=document.querySelector("#"+hiddenFields[i]);if(container!=null&&hiddenFields[i].includes("frm_final_submit")){hidePreviouslyHiddenSubmitButton(hiddenFields[i]);
continue}}if(container!==null){container.style.display="none";setHiddenProductContainer(container)}}},submitAllowed:function(object){var formElementId=object.getAttribute("id");if(!isSubmitButtonOnPage(formElementId+" .frm_final_submit")||goingToPrevPage(object)||savingDraftEntry(object))return true;var formKey=getFormKeyFromFormElementID(formElementId);return!isOnPageSubmitButtonHidden(formKey)},checkDependentDynamicFields:function(ids){var len=ids.length,repeatArgs={repeatingSection:"",repeatRow:""};
for(var i=0,l=len;i<l;i++)hideOrShowFieldById(ids[i],repeatArgs)},checkDependentLookupFields:function(ids){var fieldId,repeatArgs={repeatingSection:"",repeatRow:""};for(var i=0,l=ids.length;i<l;i++){fieldId=ids[i];updateWatchingFieldById(fieldId,repeatArgs,"value changed")}},loadGoogle:function(){var graphs,packages,i;if(typeof google==="undefined"||!google||!google.load){setTimeout(frmProForm.loadGoogle,30);return}graphs=__FRMTABLES;packages=Object.keys(graphs);for(i=0;i<packages.length;i++)if(packages[i]==="graphs")generateGoogleGraphs(graphs[packages[i]]);else generateGoogleTables(graphs[packages[i]],packages[i])},removeUsedTimes:function(obj,timeField){var $form,form,e,data,success,extraParams;$form=jQuery(obj).parents("form").first();form=$form.get(0);e=$form.find('input[name="id"]');data={action:"frm_fields_ajax_time_options",time_field:timeField,date_field:obj.id,entry_id:e?e.val():"",date:jQuery(obj).val(),nonce:frm_js.nonce};success=function(opts){if(null!==document.getElementById(timeField+
"_H")){frmProForm.removeUsedTimesForMultipleDropdown(opts,timeField);return}var $timeField=jQuery(document.getElementById(timeField));$timeField.find("option").prop("disabled",false);if(opts.length>0)for(var i=0,l=opts.length;i<l;i++)$timeField.get(0).querySelectorAll('option[value="'+opts[i]+'"]').forEach(function(option){option.disabled=true;if(option.selected)option.selected=false})};extraParams={dataType:"json"};postToAjaxUrl(form,data,success,false,extraParams)},removeUsedTimesForMultipleDropdown:function(times,
timeField){const self=this;self.hDropdown=null;self.mDropdown=null;self.ampmDropdown=null;function getTimeDropdownsElements(timeField){return{h:getTimeDropdownsElements.prototype.h[timeField],m:getTimeDropdownsElements.prototype.m[timeField],ampm:getTimeDropdownsElements.prototype.ampm[timeField]}}this.init=function(){if("undefined"===typeof getTimeDropdownsElements.prototype.h){getTimeDropdownsElements.prototype.h=[];getTimeDropdownsElements.prototype.m=[];getTimeDropdownsElements.prototype.ampm=
[]}if("undefined"!==typeof getTimeDropdownsElements.prototype.h[timeField])return;getTimeDropdownsElements.prototype.h[timeField]=document.getElementById(timeField+"_H");getTimeDropdownsElements.prototype.m[timeField]=document.getElementById(timeField+"_m");getTimeDropdownsElements.prototype.ampm[timeField]=document.getElementById(timeField+"_A");if(null===getTimeDropdownsElements(timeField).h)return;getTimeDropdownsElements(timeField).h.addEventListener("change",function(event){self.disableMinutes(event.target.value)});
getTimeDropdownsElements(timeField).m.addEventListener("change",function(event){});getTimeDropdownsElements(timeField).ampm.addEventListener("change",function(){self.disableHours()});self.disableHours();self.disableAmpm()};this.checkIfTimeIsDisabled=time=>times.includes(time);this.getActiveTime=function(){var h=getTimeDropdownsElements(timeField).h.value||"12",m=getTimeDropdownsElements(timeField).m.value||"00",ampm=getTimeDropdownsElements(timeField).ampm.value||"AM";return h+":"+m+" "+ampm};this.getMeridiem=
function(){return getTimeDropdownsElements(timeField).ampm.value||"AM"};this.listPossibleHourTimes=function(hour){const minutes=[];const ampm=[];const minutesElement=getTimeDropdownsElements(timeField).m;const ampmElement=getTimeDropdownsElements(timeField).ampm;for(let i=0;i<ampmElement.options.length;i++)ampm.push(ampmElement.options[i].value);for(let i=0;i<minutesElement.options.length;i++)if(""!==minutesElement.options[i].value)minutes.push(minutesElement.options[i].value);return ampm.reduce((array,
ampm)=>{array[ampm]=minutes.map(minute=>{return hour+":"+minute+" "+ampm});return array},{})};this.hourHasEmptySlots=function(hour){const possibleTimes=this.listPossibleHourTimes(hour);const ampm=this.getMeridiem();const allPossibleTimes=possibleTimes[ampm];return!allPossibleTimes.every(time=>{return times.includes(time)})};this.disableHours=function(){if(null===getTimeDropdownsElements(timeField).h)return;getTimeDropdownsElements(timeField).h.querySelectorAll("option").forEach(function(option){option.disabled=
!self.hourHasEmptySlots(option.value)})};this.disableMinutes=function(hour){if(null===getTimeDropdownsElements(timeField).m)return;getTimeDropdownsElements(timeField).m.querySelectorAll("option").forEach(function(option){const timeString=hour+":"+option.value+" AM";option.disabled=times.includes(timeString)})};this.disableAmpm=function(){if(null===getTimeDropdownsElements(timeField).ampm)return;getTimeDropdownsElements(timeField).ampm.querySelectorAll("option").forEach(function(option){if(times.includes(option.value))option.disabled=
true})};this.init()},changeRte:function(editor){editor.on("change",function(){var content=editor.getBody().innerHTML;jQuery("#"+editor.id).val(content).trigger("change")})},addFormidableClassToDatepicker:function(_,options){if(options.dpDiv){Array.prototype.forEach.call(getAllFormClasses(options.input.get(0)),function(formClass){options.dpDiv.get(0).classList.add(formClass)});options.dpDiv.addClass("frm-datepicker");options.dpDiv.get(0).setAttribute("is-formidable-datepicker",1);options.input.get(0)?.classList.add("active")}return options},
removeFormidableClassFromDatepicker:function(_,options){var dpDiv;if(options.dpDiv){dpDiv=options.dpDiv.get(0);dpDiv.removeAttribute("is-formidable-datepicker");options.input.get(0)?.classList.remove("active");setTimeout(function(){if(dpDiv.hasAttribute("is-formidable-datepicker"))return;Array.prototype.forEach.call(getAllFormClasses(options.input.get(0)),function(formClass){options.dpDiv.get(0).classList.remove(formClass)});jQuery(dpDiv).removeClass("frm-datepicker")},400)}},isIntlPhoneInput:function(field){var pattern=
field.getAttribute("pattern");if("\\+?\\d{1,4}[\\s\\-]?(?:\\(\\d{1,3}\\)[\\s\\-]?)?\\d{1,4}[\\s\\-]?\\d{1,4}[\\s\\-]?\\d{1,4}$"!==pattern)return false;return"undefined"!==typeof intlPhoneInputs&&"undefined"!==typeof intlPhoneInputs[field.id]},validateIntlPhoneInput:function(field){return intlPhoneInputs[field.id].isValidNumber()},frmDatepicker:frmDatepickerPro};function keepFloatingLabelOnDateBlur(event){const input=event.target.closest(".frm_date");if(input?.classList.contains("active"))input.closest(".frm_inside_container")?.classList.add("frm_label_float_top")}}var frmProForm=frmProFormJS();document.addEventListener("frmMaybeDelayFocus",function(event){if("object"!==typeof event.frmData||"undefined"===typeof event.frmData.input)return;const input=event.frmData.input;const form=input.closest("form");if(form){const focusHandler=()=>{input.focus();form.removeEventListener("frmProAfterFormFadeIn",focusHandler)};form.addEventListener("frmProAfterFormFadeIn",focusHandler)}});jQuery(document).ready(function(){frmProForm.init()});
if(!Math.round10)Math.round10=function(value,decimals){return Number(Math.round(value+"e"+decimals)+"e-"+decimals)};
window.frmUpdateField=function(entryId,fieldId,value,message,num){jQuery(document.getElementById("frm_update_field_"+entryId+"_"+fieldId+"_"+num)).html('<span class="frm-loading-img"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_update_field_ajax",entry_id:entryId,field_id:fieldId,value:value,nonce:frm_js.nonce},success:function(){if(message.replace(/^\s+|\s+$/g,"")==="")jQuery(document.getElementById("frm_update_field_"+entryId+"_"+fieldId+"_"+num)).fadeOut("slow");
else jQuery(document.getElementById("frm_update_field_"+entryId+"_"+fieldId+"_"+num)).replaceWith(message)}})};
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).SlimSelect=t()}(this,(function(){"use strict";function e(){return Math.random().toString(36).substring(2,10)}function t(e,t=50,s=!1){let i;return function(...n){const a=self,l=s&&!i;clearTimeout(i),i=setTimeout((()=>{i=null,s||e.apply(a,n)}),t),l&&e.apply(a,n)}}function s(e,t){return JSON.stringify(e)===JSON.stringify(t)}class i{constructor(t){if(this.id=t.id&&""!==t.id?t.id:e(),this.label=t.label||"",this.selectAll=void 0!==t.selectAll&&t.selectAll,this.selectAllText=t.selectAllText||"Select All",this.closable=t.closable||"off",this.options=[],t.options)for(const e of t.options)this.options.push(new n(e))}}class n{constructor(t){this.id=t.id&&""!==t.id?t.id:e(),this.value=void 0===t.value?t.text:t.value,this.text=t.text||"",this.html=t.html||"",this.selected=void 0!==t.selected&&t.selected,this.display=void 0===t.display||t.display,this.disabled=void 0!==t.disabled&&t.disabled,this.mandatory=void 0!==t.mandatory&&t.mandatory,this.placeholder=void 0!==t.placeholder&&t.placeholder,this.class=t.class||"",this.style=t.style||"",this.data=t.data||{}}}class a{constructor(e,t){this.selectType="single",this.data=[],this.selectType=e,this.setData(t)}validateDataArray(e){if(!Array.isArray(e))return new Error("Data must be an array");for(let t of e){if(!(t instanceof i||"label"in t))return t instanceof n||"text"in t?this.validateOption(t):new Error("Data object must be a valid optgroup or option");if(!("label"in t))return new Error("Optgroup must have a label");if("options"in t&&t.options)for(let e of t.options)return this.validateOption(e)}return null}validateOption(e){return"text"in e?null:new Error("Option must have a text")}partialToFullData(e){let t=[];return e.forEach((e=>{if(e instanceof i||"label"in e){let s=[];"options"in e&&e.options&&e.options.forEach((e=>{s.push(new n(e))})),s.length>0&&t.push(new i(e))}(e instanceof n||"text"in e)&&t.push(new n(e))})),t}setData(e){this.data=this.partialToFullData(e),"single"===this.selectType&&this.setSelectedBy("value",this.getSelected())}getData(){return this.filter(null,!0)}getDataOptions(){return this.filter(null,!1)}addOption(e){this.setData(this.getData().concat(new n(e)))}setSelectedBy(e,t){let s=null,a=!1;for(let l of this.data){if(l instanceof i)for(let i of l.options)s||(s=i),i.selected=!a&&t.includes(i[e]),i.selected&&"single"===this.selectType&&(a=!0);l instanceof n&&(s||(s=l),l.selected=!a&&t.includes(l[e]),l.selected&&"single"===this.selectType&&(a=!0))}"single"===this.selectType&&s&&!a&&(s.selected=!0)}getSelected(){let e=this.getSelectedOptions(),t=[];return e.forEach((e=>{t.push(e.value)})),t}getSelectedOptions(){return this.filter((e=>e.selected),!1)}getSelectedIDs(){let e=this.getSelectedOptions(),t=[];return e.forEach((e=>{t.push(e.id)})),t}getOptgroupByID(e){for(let t of this.data)if(t instanceof i&&t.id===e)return t;return null}getOptionByID(e){let t=this.filter((t=>t.id===e),!1);return t.length?t[0]:null}getSelectType(){return this.selectType}getFirstOption(){let e=null;for(let t of this.data)if(t instanceof i?e=t.options[0]:t instanceof n&&(e=t),e)break;return e}search(e,t){return""===(e=e.trim())?this.getData():this.filter((s=>t(s,e)),!0)}filter(e,t){const s=[];return this.data.forEach((a=>{if(a instanceof i){let l=[];if(a.options.forEach((i=>{e&&!e(i)||(t?l.push(new n(i)):s.push(new n(i)))})),l.length>0){let e=new i(a);e.options=l,s.push(e)}}a instanceof n&&(e&&!e(a)||s.push(new n(a)))})),s}}class l{constructor(e,t,s){this.classes={main:"ss-main",placeholder:"ss-placeholder",values:"ss-values",single:"ss-single",max:"ss-max",value:"ss-value",valueText:"ss-value-text",valueDelete:"ss-value-delete",valueOut:"ss-value-out",deselect:"ss-deselect",deselectPath:"M10,10 L90,90 M10,90 L90,10",arrow:"ss-arrow",arrowClose:"M10,30 L50,70 L90,30",arrowOpen:"M10,70 L50,30 L90,70",content:"ss-content",openAbove:"ss-open-above",openBelow:"ss-open-below",search:"ss-search",searchHighlighter:"ss-search-highlight",searching:"ss-searching",addable:"ss-addable",addablePath:"M50,10 L50,90 M10,50 L90,50",list:"ss-list",optgroup:"ss-optgroup",optgroupLabel:"ss-optgroup-label",optgroupLabelText:"ss-optgroup-label-text",optgroupActions:"ss-optgroup-actions",optgroupSelectAll:"ss-selectall",optgroupSelectAllBox:"M60,10 L10,10 L10,90 L90,90 L90,50",optgroupSelectAllCheck:"M30,45 L50,70 L90,10",optgroupClosable:"ss-closable",option:"ss-option",optionDelete:"M10,10 L90,90 M10,90 L90,10",highlighted:"ss-highlighted",open:"ss-open",close:"ss-close",selected:"ss-selected",error:"ss-error",disabled:"ss-disabled",hide:"ss-hide"},this.store=t,this.settings=e,this.callbacks=s,this.main=this.mainDiv(),this.content=this.contentDiv(),this.updateClassStyles(),this.updateAriaAttributes(),this.settings.contentLocation.appendChild(this.content.main)}enable(){this.main.main.classList.remove(this.classes.disabled),this.content.search.input.disabled=!1}disable(){this.main.main.classList.add(this.classes.disabled),this.content.search.input.disabled=!0}open(){this.main.arrow.path.setAttribute("d",this.classes.arrowOpen),this.main.main.classList.add("up"===this.settings.openPosition?this.classes.openAbove:this.classes.openBelow),this.main.main.setAttribute("aria-expanded","true"),this.moveContent();const e=this.store.getSelectedOptions();if(e.length){const t=e[e.length-1].id,s=this.content.list.querySelector('[data-id="'+t+'"]');s&&this.ensureElementInView(this.content.list,s)}}close(){this.main.main.classList.remove(this.classes.openAbove),this.main.main.classList.remove(this.classes.openBelow),this.main.main.setAttribute("aria-expanded","false"),this.content.main.classList.remove(this.classes.openAbove),this.content.main.classList.remove(this.classes.openBelow),this.main.arrow.path.setAttribute("d",this.classes.arrowClose)}updateClassStyles(){if(this.main.main.className="",this.main.main.removeAttribute("style"),this.content.main.className="",this.content.main.removeAttribute("style"),this.main.main.classList.add(this.classes.main),this.content.main.classList.add(this.classes.content),""!==this.settings.style&&(this.main.main.style.cssText=this.settings.style,this.content.main.style.cssText=this.settings.style),this.settings.class.length)for(const e of this.settings.class)""!==e.trim()&&(this.main.main.classList.add(e.trim()),this.content.main.classList.add(e.trim()));"relative"===this.settings.contentPosition&&this.content.main.classList.add("ss-"+this.settings.contentPosition)}updateAriaAttributes(){this.main.main.role="combobox",this.main.main.setAttribute("aria-haspopup","listbox"),this.main.main.setAttribute("aria-controls",this.content.main.id),this.main.main.setAttribute("aria-expanded","false"),this.content.main.setAttribute("role","listbox")}mainDiv(){var e;const t=document.createElement("div");t.dataset.id=this.settings.id,t.setAttribute("aria-label",this.settings.ariaLabel),t.tabIndex=0,t.onkeydown=e=>{switch(e.key){case"ArrowUp":case"ArrowDown":return this.callbacks.open(),"ArrowDown"===e.key?this.highlight("down"):this.highlight("up"),!1;case"Tab":return this.callbacks.close(),!0;case"Enter":case" ":this.callbacks.open();const t=this.content.list.querySelector("."+this.classes.highlighted);return t&&t.click(),!1;case"Escape":return this.callbacks.close(),!1}return!1},t.onclick=e=>{this.settings.disabled||(this.settings.isOpen?this.callbacks.close():this.callbacks.open())};const s=document.createElement("div");s.classList.add(this.classes.values),t.appendChild(s);const i=document.createElement("div");i.classList.add(this.classes.deselect);const n=null===(e=this.store)||void 0===e?void 0:e.getSelectedOptions();!this.settings.allowDeselect||this.settings.isMultiple&&n&&n.length<=0?i.classList.add(this.classes.hide):i.classList.remove(this.classes.hide),i.onclick=e=>{if(e.stopPropagation(),this.settings.disabled)return;let t=!0;const s=this.store.getSelectedOptions(),i=[];if(this.callbacks.beforeChange&&(t=!0===this.callbacks.beforeChange(i,s)),t){if(this.settings.isMultiple)this.callbacks.setSelected([],!1),this.updateDeselectAll();else{const e=this.store.getFirstOption(),t=e?e.value:"";this.callbacks.setSelected(t,!1)}this.settings.closeOnSelect&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(this.store.getSelectedOptions())}};const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox","0 0 100 100");const l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",this.classes.deselectPath),a.appendChild(l),i.appendChild(a),t.appendChild(i);const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.classList.add(this.classes.arrow),o.setAttribute("viewBox","0 0 100 100");const c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",this.classes.arrowClose),this.settings.alwaysOpen&&o.classList.add(this.classes.hide),o.appendChild(c),t.appendChild(o),{main:t,values:s,deselect:{main:i,svg:a,path:l},arrow:{main:o,path:c}}}mainFocus(e){"click"!==e&&this.main.main.focus({preventScroll:!0})}placeholder(){const e=this.store.filter((e=>e.placeholder),!1);let t=this.settings.placeholderText;e.length&&(""!==e[0].html?t=e[0].html:""!==e[0].text&&(t=e[0].text));const s=document.createElement("div");return s.classList.add(this.classes.placeholder),s.innerHTML=t,s}renderValues(){this.settings.isMultiple?(this.renderMultipleValues(),this.updateDeselectAll()):this.renderSingleValue()}renderSingleValue(){const e=this.store.filter((e=>e.selected&&!e.placeholder),!1),t=e.length>0?e[0]:null;if(t){const e=document.createElement("div");e.classList.add(this.classes.single),t.html?e.innerHTML=t.html:e.innerText=t.text,this.main.values.innerHTML=e.outerHTML}else this.main.values.innerHTML=this.placeholder().outerHTML;this.settings.allowDeselect&&e.length?this.main.deselect.main.classList.remove(this.classes.hide):this.main.deselect.main.classList.add(this.classes.hide)}renderMultipleValues(){let e=this.main.values.childNodes,t=this.store.filter((e=>e.selected&&e.display),!1);if(0===t.length)return void(this.main.values.innerHTML=this.placeholder().outerHTML);{const e=this.main.values.querySelector("."+this.classes.placeholder);e&&e.remove()}if(t.length>this.settings.maxValuesShown){const e=document.createElement("div");return e.classList.add(this.classes.max),e.textContent=this.settings.maxValuesMessage.replace("{number}",t.length.toString()),void(this.main.values.innerHTML=e.outerHTML)}{const e=this.main.values.querySelector("."+this.classes.max);e&&e.remove()}let s=[];for(let i=0;i<e.length;i++){const n=e[i],a=n.getAttribute("data-id");if(a){t.filter((e=>e.id===a),!1).length||s.push(n)}}for(const e of s)e.classList.add(this.classes.valueOut),setTimeout((()=>{this.main.values.hasChildNodes()&&this.main.values.contains(e)&&this.main.values.removeChild(e)}),100);e=this.main.values.childNodes;for(let s=0;s<t.length;s++){let i=!0;for(let n=0;n<e.length;n++)t[s].id===String(e[n].dataset.id)&&(i=!1);i&&(this.settings.keepOrder||0===e.length?this.main.values.appendChild(this.multipleValue(t[s])):0===s?this.main.values.insertBefore(this.multipleValue(t[s]),e[s]):e[s-1].insertAdjacentElement("afterend",this.multipleValue(t[s])))}}multipleValue(e){const t=document.createElement("div");t.classList.add(this.classes.value),t.dataset.id=e.id;const s=document.createElement("div");if(s.classList.add(this.classes.valueText),s.innerText=e.text,t.appendChild(s),!e.mandatory){const s=document.createElement("div");s.classList.add(this.classes.valueDelete),s.onclick=t=>{if(t.preventDefault(),t.stopPropagation(),this.settings.disabled)return;let s=!0;const a=this.store.getSelectedOptions(),l=a.filter((t=>t.selected&&t.id!==e.id),!0);if(!(this.settings.minSelected&&l.length<this.settings.minSelected)&&(this.callbacks.beforeChange&&(s=!0===this.callbacks.beforeChange(l,a)),s)){let e=[];for(const t of l){if(t instanceof i)for(const s of t.options)e.push(s.value);t instanceof n&&e.push(t.value)}this.callbacks.setSelected(e,!1),this.settings.closeOnSelect&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(l),this.updateDeselectAll()}};const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox","0 0 100 100");const l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",this.classes.optionDelete),a.appendChild(l),s.appendChild(a),t.appendChild(s)}return t}contentDiv(){const e=document.createElement("div");e.dataset.id=this.settings.id;const t=this.searchDiv();e.appendChild(t.main);const s=this.listDiv();return e.appendChild(s),{main:e,search:t,list:s}}moveContent(){"relative"!==this.settings.contentPosition&&"down"!==this.settings.openPosition?"up"!==this.settings.openPosition?"up"===this.putContent()?this.moveContentAbove():this.moveContentBelow():this.moveContentAbove():this.moveContentBelow()}searchDiv(){const e=document.createElement("div"),s=document.createElement("input"),i=document.createElement("div");e.classList.add(this.classes.search);const a={main:e,input:s};if(this.settings.showSearch||(e.classList.add(this.classes.hide),s.readOnly=!0),s.type="search",s.placeholder=this.settings.searchPlaceholder,s.tabIndex=-1,s.setAttribute("aria-label",this.settings.searchPlaceholder),s.setAttribute("autocapitalize","off"),s.setAttribute("autocomplete","off"),s.setAttribute("autocorrect","off"),s.oninput=t((e=>{this.callbacks.search(e.target.value)}),100),s.onkeydown=e=>{switch(e.key){case"ArrowUp":case"ArrowDown":return"ArrowDown"===e.key?this.highlight("down"):this.highlight("up"),!1;case"Tab":return this.callbacks.close(),!0;case"Escape":return this.callbacks.close(),!1;case"Enter":case" ":if(this.callbacks.addable&&e.ctrlKey)return i.click(),!1;{const e=this.content.list.querySelector("."+this.classes.highlighted);if(e)return e.click(),!1}return!0}return!0},e.appendChild(s),this.callbacks.addable){i.classList.add(this.classes.addable);const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("viewBox","0 0 100 100");const s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",this.classes.addablePath),t.appendChild(s),i.appendChild(t),i.onclick=e=>{if(e.preventDefault(),e.stopPropagation(),!this.callbacks.addable)return;const t=this.content.search.input.value.trim();if(""===t)return void this.content.search.input.focus();const s=e=>{let t=new n(e);if(this.callbacks.addOption(t),this.settings.isMultiple){let e=this.store.getSelected();e.push(t.value),this.callbacks.setSelected(e,!0)}else this.callbacks.setSelected([t.value],!0);this.callbacks.search(""),this.settings.closeOnSelect&&setTimeout((()=>{this.callbacks.close()}),100)},i=this.callbacks.addable(t);!1!==i&&null!=i&&(i instanceof Promise?i.then((e=>{s("string"==typeof e?{text:e,value:e}:e)})):s("string"==typeof i?{text:i,value:i}:i))},e.appendChild(i),a.addable={main:i,svg:t,path:s}}return a}searchFocus(){this.content.search.input.focus()}getOptions(e=!1,t=!1,s=!1){let i="."+this.classes.option;return e&&(i+=":not(."+this.classes.placeholder+")"),t&&(i+=":not(."+this.classes.disabled+")"),s&&(i+=":not(."+this.classes.hide+")"),Array.from(this.content.list.querySelectorAll(i))}highlight(e){const t=this.getOptions(!0,!0,!0);if(0===t.length)return;if(1===t.length&&!t[0].classList.contains(this.classes.highlighted))return void t[0].classList.add(this.classes.highlighted);let s=!1;for(const e of t)e.classList.contains(this.classes.highlighted)&&(s=!0);if(!s)for(const e of t)if(e.classList.contains(this.classes.selected)){e.classList.add(this.classes.highlighted);break}for(let s=0;s<t.length;s++)if(t[s].classList.contains(this.classes.highlighted)){const i=t[s];i.classList.remove(this.classes.highlighted);const n=i.parentElement;if(n&&n.classList.contains(this.classes.open)){const e=n.querySelector("."+this.classes.optgroupLabel);e&&e.click()}let a=t["down"===e?s+1<t.length?s+1:0:s-1>=0?s-1:t.length-1];a.classList.add(this.classes.highlighted),this.ensureElementInView(this.content.list,a);const l=a.parentElement;if(l&&l.classList.contains(this.classes.close)){const e=l.querySelector("."+this.classes.optgroupLabel);e&&e.click()}return}t["down"===e?0:t.length-1].classList.add(this.classes.highlighted),this.ensureElementInView(this.content.list,t["down"===e?0:t.length-1])}listDiv(){const e=document.createElement("div");return e.classList.add(this.classes.list),e}renderError(e){this.content.list.innerHTML="";const t=document.createElement("div");t.classList.add(this.classes.error),t.textContent=e,this.content.list.appendChild(t)}renderSearching(){this.content.list.innerHTML="";const e=document.createElement("div");e.classList.add(this.classes.searching),e.textContent=this.settings.searchingText,this.content.list.appendChild(e)}renderOptions(e){if(this.content.list.innerHTML="",0===e.length){const e=document.createElement("div");return e.classList.add(this.classes.search),e.innerHTML=this.settings.searchText,void this.content.list.appendChild(e)}for(const t of e){if(t instanceof i){const e=document.createElement("div");e.classList.add(this.classes.optgroup);const s=document.createElement("div");s.classList.add(this.classes.optgroupLabel),e.appendChild(s);const i=document.createElement("div");i.classList.add(this.classes.optgroupLabelText),i.textContent=t.label,s.appendChild(i);const n=document.createElement("div");if(n.classList.add(this.classes.optgroupActions),s.appendChild(n),this.settings.isMultiple&&t.selectAll){const e=document.createElement("div");e.classList.add(this.classes.optgroupSelectAll);let s=!0;for(const e of t.options)if(!e.selected){s=!1;break}s&&e.classList.add(this.classes.selected);const i=document.createElement("span");i.textContent=t.selectAllText,e.appendChild(i);const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox","0 0 100 100"),e.appendChild(a);const l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",this.classes.optgroupSelectAllBox),a.appendChild(l);const o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d",this.classes.optgroupSelectAllCheck),a.appendChild(o),e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const i=this.store.getSelected();if(s){const e=i.filter((e=>{for(const s of t.options)if(e===s.value)return!1;return!0}));this.callbacks.setSelected(e,!0)}else{const e=i.concat(t.options.map((e=>e.value)));for(const e of t.options)this.store.getOptionByID(e.id)||this.callbacks.addOption(e);this.callbacks.setSelected(e,!0)}})),n.appendChild(e)}if("off"!==t.closable){const i=document.createElement("div");i.classList.add(this.classes.optgroupClosable);const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox","0 0 100 100"),a.classList.add(this.classes.arrow),i.appendChild(a);const l=document.createElementNS("http://www.w3.org/2000/svg","path");a.appendChild(l),t.options.some((e=>e.selected))||""!==this.content.search.input.value.trim()?(i.classList.add(this.classes.open),l.setAttribute("d",this.classes.arrowOpen)):"open"===t.closable?(e.classList.add(this.classes.open),l.setAttribute("d",this.classes.arrowOpen)):"close"===t.closable&&(e.classList.add(this.classes.close),l.setAttribute("d",this.classes.arrowClose)),s.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),e.classList.contains(this.classes.close)?(e.classList.remove(this.classes.close),e.classList.add(this.classes.open),l.setAttribute("d",this.classes.arrowOpen)):(e.classList.remove(this.classes.open),e.classList.add(this.classes.close),l.setAttribute("d",this.classes.arrowClose))})),n.appendChild(i)}e.appendChild(s);for(const s of t.options)e.appendChild(this.option(s));this.content.list.appendChild(e)}t instanceof n&&this.content.list.appendChild(this.option(t))}}option(e){if(e.placeholder){const e=document.createElement("div");return e.classList.add(this.classes.option),e.classList.add(this.classes.hide),e}const t=document.createElement("div");return t.dataset.id=e.id,t.id=e.id,t.classList.add(this.classes.option),t.setAttribute("role","option"),e.class&&e.class.split(" ").forEach((e=>{t.classList.add(e)})),e.style&&(t.style.cssText=e.style),this.settings.searchHighlight&&""!==this.content.search.input.value.trim()?t.innerHTML=this.highlightText(""!==e.html?e.html:e.text,this.content.search.input.value,this.classes.searchHighlighter):""!==e.html?t.innerHTML=e.html:t.textContent=e.text,this.settings.showOptionTooltips&&t.textContent&&t.setAttribute("title",t.textContent),e.display||t.classList.add(this.classes.hide),e.disabled&&t.classList.add(this.classes.disabled),e.selected&&this.settings.hideSelected&&t.classList.add(this.classes.hide),e.selected?(t.classList.add(this.classes.selected),t.setAttribute("aria-selected","true"),this.main.main.setAttribute("aria-activedescendant",t.id)):(t.classList.remove(this.classes.selected),t.setAttribute("aria-selected","false")),t.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation();const s=this.store.getSelected(),i=t.currentTarget,n=String(i.dataset.id);if(e.disabled||e.selected&&!this.settings.allowDeselect)return;if(this.settings.isMultiple&&this.settings.maxSelected<=s.length&&!e.selected||this.settings.isMultiple&&this.settings.minSelected>=s.length&&e.selected)return;let a=!1;const l=this.store.getSelectedOptions();let o=[];this.settings.isMultiple&&(o=e.selected?l.filter((e=>e.id!==n)):l.concat(e)),this.settings.isMultiple||(o=e.selected?[]:[e]),this.callbacks.beforeChange||(a=!0),this.callbacks.beforeChange&&(a=!1!==this.callbacks.beforeChange(o,l)),a&&(this.store.getOptionByID(n)||this.callbacks.addOption(e),this.callbacks.setSelected(o.map((e=>e.value)),!1),this.settings.closeOnSelect&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(o))})),t}destroy(){this.main.main.remove(),this.content.main.remove()}highlightText(e,t,s){let i=e;const n=new RegExp("("+t.trim()+")(?![^<]*>[^<>]*</)","i");if(!e.match(n))return e;const a=e.match(n).index,l=a+e.match(n)[0].toString().length,o=e.substring(a,l);return i=i.replace(n,`<mark class="${s}">${o}</mark>`),i}moveContentAbove(){const e=this.main.main.offsetHeight,t=this.content.main.offsetHeight;this.main.main.classList.remove(this.classes.openBelow),this.main.main.classList.add(this.classes.openAbove),this.content.main.classList.remove(this.classes.openBelow),this.content.main.classList.add(this.classes.openAbove);const s=this.main.main.getBoundingClientRect();this.content.main.style.margin="-"+(e+t-1)+"px 0px 0px 0px",this.content.main.style.top=s.top+s.height+window.scrollY+"px",this.content.main.style.left=s.left+window.scrollX+"px",this.content.main.style.width=s.width+"px"}moveContentBelow(){this.main.main.classList.remove(this.classes.openAbove),this.main.main.classList.add(this.classes.openBelow),this.content.main.classList.remove(this.classes.openAbove),this.content.main.classList.add(this.classes.openBelow);const e=this.main.main.getBoundingClientRect();this.content.main.style.margin="-1px 0px 0px 0px","relative"!==this.settings.contentPosition&&(this.content.main.style.top=e.top+e.height+window.scrollY+"px",this.content.main.style.left=e.left+window.scrollX+"px",this.content.main.style.width=e.width+"px")}ensureElementInView(e,t){const s=e.scrollTop+e.offsetTop,i=s+e.clientHeight,n=t.offsetTop,a=n+t.clientHeight;n<s?e.scrollTop-=s-n:a>i&&(e.scrollTop+=a-i)}putContent(){const e=this.main.main.offsetHeight,t=this.main.main.getBoundingClientRect(),s=this.content.main.offsetHeight;return window.innerHeight-(t.top+e)<=s&&t.top>s?"up":"down"}updateDeselectAll(){if(!this.store||!this.settings)return;const e=this.store.getSelectedOptions(),t=e&&e.length>0,s=this.settings.isMultiple,i=this.settings.allowDeselect,n=this.main.deselect.main,a=this.classes.hide;!i||s&&!t?n.classList.add(a):n.classList.remove(a)}}class o{constructor(e){this.listen=!1,this.observer=null,this.select=e,this.valueChange=this.valueChange.bind(this),this.select.addEventListener("change",this.valueChange,{passive:!0}),this.observer=new MutationObserver(this.observeCall.bind(this)),this.changeListen(!0)}enable(){this.select.disabled=!1}disable(){this.select.disabled=!0}hideUI(){this.select.tabIndex=-1,this.select.style.display="none",this.select.setAttribute("aria-hidden","true")}showUI(){this.select.removeAttribute("tabindex"),this.select.style.display="",this.select.removeAttribute("aria-hidden")}changeListen(e){this.listen=e,e&&this.observer&&this.observer.observe(this.select,{subtree:!0,childList:!0,attributes:!0}),e||this.observer&&this.observer.disconnect()}valueChange(e){return this.listen&&this.onValueChange&&this.onValueChange(this.getSelectedValues()),!0}observeCall(e){if(!this.listen)return;let t=!1,s=!1,i=!1;for(const n of e)n.target===this.select&&("disabled"===n.attributeName&&(s=!0),"class"===n.attributeName&&(t=!0)),"OPTGROUP"!==n.target.nodeName&&"OPTION"!==n.target.nodeName||(i=!0);t&&this.onClassChange&&this.onClassChange(this.select.className.split(" ")),s&&this.onDisabledChange&&(this.changeListen(!1),this.onDisabledChange(this.select.disabled),this.changeListen(!0)),i&&this.onOptionsChange&&(this.changeListen(!1),this.onOptionsChange(this.getData()),this.changeListen(!0))}getData(){let e=[];const t=this.select.childNodes;for(const s of t)"OPTGROUP"===s.nodeName&&e.push(this.getDataFromOptgroup(s)),"OPTION"===s.nodeName&&e.push(this.getDataFromOption(s));return e}getDataFromOptgroup(e){let t={id:e.id,label:e.label,selectAll:!!e.dataset&&"true"===e.dataset.selectall,selectAllText:e.dataset?e.dataset.selectalltext:"Select all",closable:e.dataset?e.dataset.closable:"off",options:[]};const s=e.childNodes;for(const e of s)"OPTION"===e.nodeName&&t.options.push(this.getDataFromOption(e));return t}getDataFromOption(e){return{id:e.id,value:e.value,text:e.text,html:e.dataset&&e.dataset.html?e.dataset.html:"",selected:e.selected,display:"none"!==e.style.display,disabled:e.disabled,mandatory:!!e.dataset&&"true"===e.dataset.mandatory,placeholder:"true"===e.dataset.placeholder,class:e.className,style:e.style.cssText,data:e.dataset}}getSelectedValues(){let e=[];const t=this.select.childNodes;for(const s of t){if("OPTGROUP"===s.nodeName){const t=s.childNodes;for(const s of t)if("OPTION"===s.nodeName){const t=s;t.selected&&e.push(t.value)}}if("OPTION"===s.nodeName){const t=s;t.selected&&e.push(t.value)}}return e}setSelected(e){this.changeListen(!1);const t=this.select.childNodes;for(const s of t){if("OPTGROUP"===s.nodeName){const t=s.childNodes;for(const s of t)if("OPTION"===s.nodeName){const t=s;t.selected=e.includes(t.value)}}if("OPTION"===s.nodeName){const t=s;t.selected=e.includes(t.value)}}this.changeListen(!0)}updateSelect(e,t,s){this.changeListen(!1),e&&(this.select.dataset.id=e),t&&(this.select.style.cssText=t),s&&(this.select.className="",s.forEach((e=>{""!==e.trim()&&this.select.classList.add(e.trim())}))),this.changeListen(!0)}updateOptions(e){this.changeListen(!1),this.select.innerHTML="";for(const t of e)t instanceof i&&this.select.appendChild(this.createOptgroup(t)),t instanceof n&&this.select.appendChild(this.createOption(t));this.select.dispatchEvent(new Event("change")),this.changeListen(!0)}createOptgroup(e){const t=document.createElement("optgroup");if(t.id=e.id,t.label=e.label,e.selectAll&&(t.dataset.selectAll="true"),"off"!==e.closable&&(t.dataset.closable=e.closable),e.options)for(const s of e.options)t.appendChild(this.createOption(s));return t}createOption(e){const t=document.createElement("option");return t.id=e.id,t.value=e.value,t.innerHTML=e.text,""!==e.html&&t.setAttribute("data-html",e.html),e.selected&&(t.selected=e.selected),e.disabled&&(t.disabled=!0),!1===e.display&&(t.style.display="none"),e.placeholder&&t.setAttribute("data-placeholder","true"),e.mandatory&&t.setAttribute("data-mandatory","true"),e.class&&e.class.split(" ").forEach((e=>{t.classList.add(e)})),e.data&&"object"==typeof e.data&&Object.keys(e.data).forEach((s=>{t.setAttribute("data-"+function(e){const t=e.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(e=>"-"+e.toLowerCase()));return e[0]===e[0].toUpperCase()?t.substring(1):t}(s),e.data[s])})),t}destroy(){this.changeListen(!1),this.select.removeEventListener("change",this.valueChange),this.observer&&(this.observer.disconnect(),this.observer=null),delete this.select.dataset.id,this.showUI()}}class c{constructor(t){this.id="",this.style="",this.class=[],this.isMultiple=!1,this.isOpen=!1,this.isFullOpen=!1,this.intervalMove=null,t||(t={}),this.id="ss-"+e(),this.style=t.style||"",this.class=t.class||[],this.disabled=void 0!==t.disabled&&t.disabled,this.alwaysOpen=void 0!==t.alwaysOpen&&t.alwaysOpen,this.showSearch=void 0===t.showSearch||t.showSearch,this.ariaLabel=t.ariaLabel||"Combobox",this.searchPlaceholder=t.searchPlaceholder||"Search",this.searchText=t.searchText||"No Results",this.searchingText=t.searchingText||"Searching...",this.searchHighlight=void 0!==t.searchHighlight&&t.searchHighlight,this.closeOnSelect=void 0===t.closeOnSelect||t.closeOnSelect,this.contentLocation=t.contentLocation||document.body,this.contentPosition=t.contentPosition||"absolute",this.openPosition=t.openPosition||"auto",this.placeholderText=void 0!==t.placeholderText?t.placeholderText:"Select Value",this.allowDeselect=void 0!==t.allowDeselect&&t.allowDeselect,this.hideSelected=void 0!==t.hideSelected&&t.hideSelected,this.keepOrder=void 0!==t.keepOrder&&t.keepOrder,this.showOptionTooltips=void 0!==t.showOptionTooltips&&t.showOptionTooltips,this.minSelected=t.minSelected||0,this.maxSelected=t.maxSelected||1e3,this.timeoutDelay=t.timeoutDelay||200,this.maxValuesShown=t.maxValuesShown||20,this.maxValuesMessage=t.maxValuesMessage||"{number} selected"}}return class{constructor(e){var s;if(this.events={search:void 0,searchFilter:(e,t)=>-1!==e.text.toLowerCase().indexOf(t.toLowerCase()),addable:void 0,beforeChange:void 0,afterChange:void 0,beforeOpen:void 0,afterOpen:void 0,beforeClose:void 0,afterClose:void 0},this.windowResize=t((()=>{(this.settings.isOpen||this.settings.isFullOpen)&&this.render.moveContent()})),this.windowScroll=t((()=>{(this.settings.isOpen||this.settings.isFullOpen)&&this.render.moveContent()})),this.documentClick=e=>{this.settings.isOpen&&e.target&&!function(e,t){function s(e,s){return s&&e&&e.classList&&e.classList.contains(s)||s&&e&&e.dataset&&e.dataset.id&&e.dataset.id===t?e:null}return s(e,t)||function e(t,i){return t&&t!==document?s(t,i)?t:e(t.parentNode,i):null}(e,t)}(e.target,this.settings.id)&&this.close(e.type)},this.windowVisibilityChange=()=>{document.hidden&&this.close()},this.selectEl="string"==typeof e.select?document.querySelector(e.select):e.select,!this.selectEl)return void(e.events&&e.events.error&&e.events.error(new Error("Could not find select element")));if("SELECT"!==this.selectEl.tagName)return void(e.events&&e.events.error&&e.events.error(new Error("Element isnt of type select")));this.selectEl.dataset.ssid&&this.destroy(),this.settings=new c(e.settings);const i=["afterChange","beforeOpen","afterOpen","beforeClose","afterClose"];for(const s in e.events)e.events.hasOwnProperty(s)&&(-1!==i.indexOf(s)?this.events[s]=t(e.events[s],100):this.events[s]=e.events[s]);this.settings.disabled=(null===(s=e.settings)||void 0===s?void 0:s.disabled)?e.settings.disabled:this.selectEl.disabled,this.settings.isMultiple=this.selectEl.multiple,this.settings.style=this.selectEl.style.cssText,this.settings.class=this.selectEl.className.split(" "),this.select=new o(this.selectEl),this.select.updateSelect(this.settings.id,this.settings.style,this.settings.class),this.select.hideUI(),this.select.onValueChange=e=>{this.setSelected(e)},this.select.onClassChange=e=>{this.settings.class=e,this.render.updateClassStyles()},this.select.onDisabledChange=e=>{e?this.disable():this.enable()},this.select.onOptionsChange=e=>{this.setData(e)},this.store=new a(this.settings.isMultiple?"multiple":"single",e.data?e.data:this.select.getData()),e.data&&this.select.updateOptions(this.store.getData());const n={open:this.open.bind(this),close:this.close.bind(this),addable:this.events.addable?this.events.addable:void 0,setSelected:this.setSelected.bind(this),addOption:this.addOption.bind(this),search:this.search.bind(this),beforeChange:this.events.beforeChange,afterChange:this.events.afterChange};this.render=new l(this.settings,this.store,n),this.render.renderValues(),this.render.renderOptions(this.store.getData());const h=this.selectEl.getAttribute("aria-label"),r=this.selectEl.getAttribute("aria-labelledby");h?this.render.main.main.setAttribute("aria-label",h):r&&this.render.main.main.setAttribute("aria-labelledby",r),this.selectEl.parentNode&&this.selectEl.parentNode.insertBefore(this.render.main.main,this.selectEl.nextSibling),window.addEventListener("resize",this.windowResize,!1),"auto"===this.settings.openPosition&&window.addEventListener("scroll",this.windowScroll,!1),document.addEventListener("visibilitychange",this.windowVisibilityChange),this.settings.disabled&&this.disable(),this.settings.alwaysOpen&&this.open(),this.selectEl.slim=this}enable(){this.settings.disabled=!1,this.select.enable(),this.render.enable()}disable(){this.settings.disabled=!0,this.select.disable(),this.render.disable()}getData(){return this.store.getData()}setData(e){const t=this.store.getSelected(),i=this.store.validateDataArray(e);if(i)return void(this.events.error&&this.events.error(i));this.store.setData(e);const n=this.store.getData();this.select.updateOptions(n),this.render.renderValues(),this.render.renderOptions(n),this.events.afterChange&&!s(t,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}getSelected(){return this.store.getSelected()}setSelected(e,t=!0){const i=this.store.getSelected();this.store.setSelectedBy("value",Array.isArray(e)?e:[e]);const n=this.store.getData();this.select.updateOptions(n),this.render.renderValues(),""!==this.render.content.search.input.value?this.search(this.render.content.search.input.value):this.render.renderOptions(n),t&&this.events.afterChange&&!s(i,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}addOption(e){const t=this.store.getSelected();this.store.getDataOptions().some((t=>{var s;return t.value===(null!==(s=e.value)&&void 0!==s?s:e.text)}))||this.store.addOption(e);const i=this.store.getData();this.select.updateOptions(i),this.render.renderValues(),this.render.renderOptions(i),this.events.afterChange&&!s(t,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}open(){this.settings.disabled||this.settings.isOpen||(this.events.beforeOpen&&this.events.beforeOpen(),this.render.open(),this.settings.showSearch&&this.render.searchFocus(),this.settings.isOpen=!0,setTimeout((()=>{this.events.afterOpen&&this.events.afterOpen(),this.settings.isOpen&&(this.settings.isFullOpen=!0),document.addEventListener("click",this.documentClick)}),this.settings.timeoutDelay),"absolute"===this.settings.contentPosition&&(this.settings.intervalMove&&clearInterval(this.settings.intervalMove),this.settings.intervalMove=setInterval(this.render.moveContent.bind(this.render),500)))}close(e=null){this.settings.isOpen&&!this.settings.alwaysOpen&&(this.events.beforeClose&&this.events.beforeClose(),this.render.close(),""!==this.render.content.search.input.value&&this.search(""),this.render.mainFocus(e),this.settings.isOpen=!1,this.settings.isFullOpen=!1,setTimeout((()=>{this.events.afterClose&&this.events.afterClose(),document.removeEventListener("click",this.documentClick)}),this.settings.timeoutDelay),this.settings.intervalMove&&clearInterval(this.settings.intervalMove))}search(e){if(this.render.content.search.input.value!==e&&(this.render.content.search.input.value=e),!this.events.search)return void this.render.renderOptions(""===e?this.store.getData():this.store.search(e,this.events.searchFilter));this.render.renderSearching();const t=this.events.search(e,this.store.getSelectedOptions());t instanceof Promise?t.then((e=>{this.render.renderOptions(this.store.partialToFullData(e))})).catch((e=>{this.render.renderError("string"==typeof e?e:e.message)})):Array.isArray(t)?this.render.renderOptions(this.store.partialToFullData(t)):this.render.renderError("Search event must return a promise or an array of data")}destroy(){document.removeEventListener("click",this.documentClick),window.removeEventListener("resize",this.windowResize,!1),"auto"===this.settings.openPosition&&window.removeEventListener("scroll",this.windowScroll,!1),document.removeEventListener("visibilitychange",this.windowVisibilityChange),this.store.setData([]),this.render.destroy(),this.select.destroy()}}}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={3099:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6077:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},1223:function(e,t,n){var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),u=Array.prototype;null==u[a]&&o.f(u,a,{configurable:!0,value:i(null)}),e.exports=function(e){u[a][e]=!0}},1530:function(e,t,n){"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:function(e){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},9670:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},4019:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},260:function(e,t,n){"use strict";var r,i=n(4019),o=n(9781),a=n(7854),u=n(111),s=n(6656),l=n(648),c=n(8880),f=n(1320),p=n(3070).f,h=n(9518),d=n(7674),v=n(5112),y=n(9711),g=a.Int8Array,m=g&&g.prototype,b=a.Uint8ClampedArray,x=b&&b.prototype,w=g&&h(g),E=m&&h(m),k=Object.prototype,A=k.isPrototypeOf,S=v("toStringTag"),F=y("TYPED_ARRAY_TAG"),T=i&&!!d&&"Opera"!==l(a.opera),C=!1,L={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R={BigInt64Array:8,BigUint64Array:8},I=function(e){if(!u(e))return!1;var t=l(e);return s(L,t)||s(R,t)};for(r in L)a[r]||(T=!1);if((!T||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},T))for(r in L)a[r]&&d(a[r],w);if((!T||!E||E===k)&&(E=w.prototype,T))for(r in L)a[r]&&d(a[r].prototype,E);if(T&&h(x)!==E&&d(x,E),o&&!s(E,S))for(r in C=!0,p(E,S,{get:function(){return u(this)?this[F]:void 0}}),L)a[r]&&c(a[r],F,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:T,TYPED_ARRAY_TAG:C&&F,aTypedArray:function(e){if(I(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(d){if(A.call(w,e))return e}else for(var t in L)if(s(L,r)){var n=a[t];if(n&&(e===n||A.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(o){if(n)for(var r in L){var i=a[r];i&&s(i.prototype,e)&&delete i.prototype[e]}E[e]&&!n||f(E,e,n?t:T&&m[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(o){if(d){if(n)for(r in L)(i=a[r])&&s(i,e)&&delete i[e];if(w[e]&&!n)return;try{return f(w,e,n?t:T&&g[e]||t)}catch(e){}}for(r in L)!(i=a[r])||i[e]&&!n||f(i,e,t)}},isView:function(e){if(!u(e))return!1;var t=l(e);return"DataView"===t||s(L,t)||s(R,t)},isTypedArray:I,TypedArray:w,TypedArrayPrototype:E}},3331:function(e,t,n){"use strict";var r=n(7854),i=n(9781),o=n(4019),a=n(8880),u=n(2248),s=n(7293),l=n(5787),c=n(9958),f=n(7466),p=n(7067),h=n(1179),d=n(9518),v=n(7674),y=n(8006).f,g=n(3070).f,m=n(1285),b=n(8003),x=n(9909),w=x.get,E=x.set,k="ArrayBuffer",A="DataView",S="Wrong index",F=r.ArrayBuffer,T=F,C=r.DataView,L=C&&C.prototype,R=Object.prototype,I=r.RangeError,U=h.pack,O=h.unpack,_=function(e){return[255&e]},M=function(e){return[255&e,e>>8&255]},z=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},P=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},j=function(e){return U(e,23,4)},D=function(e){return U(e,52,8)},N=function(e,t){g(e.prototype,t,{get:function(){return w(this)[t]}})},B=function(e,t,n,r){var i=p(n),o=w(e);if(i+t>o.byteLength)throw I(S);var a=w(o.buffer).bytes,u=i+o.byteOffset,s=a.slice(u,u+t);return r?s:s.reverse()},q=function(e,t,n,r,i,o){var a=p(n),u=w(e);if(a+t>u.byteLength)throw I(S);for(var s=w(u.buffer).bytes,l=a+u.byteOffset,c=r(+i),f=0;f<t;f++)s[l+f]=c[o?f:t-f-1]};if(o){if(!s((function(){F(1)}))||!s((function(){new F(-1)}))||s((function(){return new F,new F(1.5),new F(NaN),F.name!=k}))){for(var W,H=(T=function(e){return l(this,T),new F(p(e))}).prototype=F.prototype,Y=y(F),G=0;Y.length>G;)(W=Y[G++])in T||a(T,W,F[W]);H.constructor=T}v&&d(L)!==R&&v(L,R);var Q=new C(new T(2)),$=L.setInt8;Q.setInt8(0,2147483648),Q.setInt8(1,2147483649),!Q.getInt8(0)&&Q.getInt8(1)||u(L,{setInt8:function(e,t){$.call(this,e,t<<24>>24)},setUint8:function(e,t){$.call(this,e,t<<24>>24)}},{unsafe:!0})}else T=function(e){l(this,T,k);var t=p(e);E(this,{bytes:m.call(new Array(t),0),byteLength:t}),i||(this.byteLength=t)},C=function(e,t,n){l(this,C,A),l(e,T,A);var r=w(e).byteLength,o=c(t);if(o<0||o>r)throw I("Wrong offset");if(o+(n=void 0===n?r-o:f(n))>r)throw I("Wrong length");E(this,{buffer:e,byteLength:n,byteOffset:o}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)},i&&(N(T,"byteLength"),N(C,"buffer"),N(C,"byteLength"),N(C,"byteOffset")),u(C.prototype,{getInt8:function(e){return B(this,1,e)[0]<<24>>24},getUint8:function(e){return B(this,1,e)[0]},getInt16:function(e){var t=B(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=B(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return P(B(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return P(B(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return O(B(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return O(B(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){q(this,1,e,_,t)},setUint8:function(e,t){q(this,1,e,_,t)},setInt16:function(e,t){q(this,2,e,M,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){q(this,2,e,M,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){q(this,4,e,j,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){q(this,8,e,D,t,arguments.length>2?arguments[2]:void 0)}});b(T,k),b(C,A),e.exports={ArrayBuffer:T,DataView:C}},1048:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),u=o(n.length),s=i(e,u),l=i(t,u),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?u:i(c,u))-l,u-s),p=1;for(l<s&&s<l+f&&(p=-1,l+=f-1,s+=f-1);f-- >0;)l in n?n[s]=n[l]:delete n[s],s+=p,l+=p;return n}},1285:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,u=i(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,l=void 0===s?n:i(s,n);l>u;)t[u++]=e;return t}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,i=n(9341)("forEach");e.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},8457:function(e,t,n){"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),u=n(7466),s=n(6135),l=n(1246);e.exports=function(e){var t,n,c,f,p,h,d=i(e),v="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,m=void 0!==g,b=l(d),x=0;if(m&&(g=r(g,y>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(t=u(d.length));t>x;x++)h=m?g(d[x],x):d[x],s(n,x,h);else for(p=(f=b.call(d)).next,n=new v;!(c=p.call(f)).done;x++)h=m?o(f,g,[c.value,x],!0):c.value,s(n,x,h);return n.length=x,n}},1318:function(e,t,n){var r=n(5656),i=n(7466),o=n(1400),a=function(e){return function(t,n,a){var u,s=r(t),l=i(s.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var r=n(9974),i=n(8361),o=n(7908),a=n(7466),u=n(5417),s=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,f=6==e,p=7==e,h=5==e||f;return function(d,v,y,g){for(var m,b,x=o(d),w=i(x),E=r(v,y,3),k=a(w.length),A=0,S=g||u,F=t?S(d,k):n||p?S(d,0):void 0;k>A;A++)if((h||A in w)&&(b=E(m=w[A],A,x),e))if(t)F[A]=b;else if(b)switch(e){case 3:return!0;case 5:return m;case 6:return A;case 2:s.call(F,m)}else switch(e){case 4:return!1;case 7:s.call(F,m)}return f?-1:l||c?c:F}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterOut:l(7)}},6583:function(e,t,n){"use strict";var r=n(5656),i=n(9958),o=n(7466),a=n(9341),u=Math.min,s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf"),f=l||!c;e.exports=f?function(e){if(l)return s.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=u(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:s},1194:function(e,t,n){var r=n(7293),i=n(5112),o=n(7392),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,n){"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},3671:function(e,t,n){var r=n(3099),i=n(7908),o=n(8361),a=n(7466),u=function(e){return function(t,n,u,s){r(n);var l=i(t),c=o(l),f=a(l.length),p=e?f-1:0,h=e?-1:1;if(u<2)for(;;){if(p in c){s=c[p],p+=h;break}if(p+=h,e?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:f>p;p+=h)p in c&&(s=n(s,c[p],p,l));return s}};e.exports={left:u(!1),right:u(!0)}},5417:function(e,t,n){var r=n(111),i=n(3157),o=n(5112)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},3411:function(e,t,n){var r=n(9670),i=n(9212);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){throw i(e),t}}},7072:function(e,t,n){var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},4326:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:function(e,t,n){var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},9920:function(e,t,n){var r=n(6656),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=i(t),u=a.f,s=o.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||u(e,c,s(t,c))}}},8544:function(e,t,n){var r=n(7293);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4994:function(e,t,n){"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),a=n(8003),u=n(7497),s=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,l,!1,!0),u[l]=s,e}},8880:function(e,t,n){var r=n(9781),i=n(3070),o=n(9114);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9114:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:function(e,t,n){"use strict";var r=n(7593),i=n(3070),o=n(9114);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},654:function(e,t,n){"use strict";var r=n(2109),i=n(4994),o=n(9518),a=n(7674),u=n(8003),s=n(8880),l=n(1320),c=n(5112),f=n(1913),p=n(7497),h=n(3383),d=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,y=c("iterator"),g="keys",m="values",b="entries",x=function(){return this};e.exports=function(e,t,n,c,h,w,E){i(n,t,c);var k,A,S,F=function(e){if(e===h&&I)return I;if(!v&&e in L)return L[e];switch(e){case g:case m:case b:return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",C=!1,L=e.prototype,R=L[y]||L["@@iterator"]||h&&L[h],I=!v&&R||F(h),U="Array"==t&&L.entries||R;if(U&&(k=o(U.call(new e)),d!==Object.prototype&&k.next&&(f||o(k)===d||(a?a(k,d):"function"!=typeof k[y]&&s(k,y,x)),u(k,T,!0,!0),f&&(p[T]=x))),h==m&&R&&R.name!==m&&(C=!0,I=function(){return R.call(this)}),f&&!E||L[y]===I||s(L,y,I),p[t]=I,h)if(A={values:F(m),keys:w?I:F(g),entries:F(b)},E)for(S in A)(v||C||!(S in L))&&l(L,S,A[S]);else r({target:t,proto:!0,forced:v||C},A);return A}},9781:function(e,t,n){var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(e,t,n){var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},8324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(e,t,n){var r=n(5005);e.exports=r("navigator","userAgent")||""},7392:function(e,t,n){var r,i,o=n(7854),a=n(8113),u=o.process,s=u&&u.versions,l=s&&s.v8;l?i=(r=l.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),u=n(3505),s=n(9920),l=n(4705);e.exports=function(e,t){var n,c,f,p,h,d=e.target,v=e.global,y=e.stat;if(n=v?r:y?r[d]||u(d,{}):(r[d]||{}).prototype)for(c in t){if(p=t[c],f=e.noTargetGet?(h=i(n,c))&&h.value:n[c],!l(v?c:d+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;s(p,f)}(e.sham||f&&f.sham)&&o(p,"sham",!0),a(n,c,p,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:function(e,t,n){"use strict";n(4916);var r=n(1320),i=n(7293),o=n(5112),a=n(2261),u=n(8880),s=o("species"),l=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c="$0"==="a".replace(/./,"$0"),f=o("replace"),p=!!/./[f]&&""===/./[f]("a","$0"),h=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var d=o(e),v=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),y=v&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!v||!y||"replace"===e&&(!l||!c||p)||"split"===e&&!h){var g=/./[d],m=n(d,""[e],(function(e,t,n,r,i){return t.exec===a?v&&!i?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=m[0],x=m[1];r(String.prototype,e,b),r(RegExp.prototype,d,2==t?function(e,t){return x.call(e,this,t)}:function(e){return x.call(e,this)})}f&&u(RegExp.prototype[d],"sham",!0)}},9974:function(e,t,n){var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},5005:function(e,t,n){var r=n(857),i=n(7854),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},1246:function(e,t,n){var r=n(648),i=n(7497),o=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},8554:function(e,t,n){var r=n(9670),i=n(1246);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},647:function(e,t,n){var r=n(7908),i=Math.floor,o="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,u=/\$([$&'`]|\d\d?)/g;e.exports=function(e,t,n,s,l,c){var f=n+e.length,p=s.length,h=u;return void 0!==l&&(l=r(l),h=a),o.call(c,h,(function(r,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(f);case"<":a=l[o.slice(1,-1)];break;default:var u=+o;if(0===u)return r;if(u>p){var c=i(u/10);return 0===c?r:c<=p?void 0===s[c-1]?o.charAt(1):s[c-1]+o.charAt(1):r}a=s[u-1]}return void 0===a?"":a}))}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},3501:function(e){e.exports={}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:function(e){var t=Math.abs,n=Math.pow,r=Math.floor,i=Math.log,o=Math.LN2;e.exports={pack:function(e,a,u){var s,l,c,f=new Array(u),p=8*u-a-1,h=(1<<p)-1,d=h>>1,v=23===a?n(2,-24)-n(2,-77):0,y=e<0||0===e&&1/e<0?1:0,g=0;for((e=t(e))!=e||e===1/0?(l=e!=e?1:0,s=h):(s=r(i(e)/o),e*(c=n(2,-s))<1&&(s--,c*=2),(e+=s+d>=1?v/c:v*n(2,1-d))*c>=2&&(s++,c/=2),s+d>=h?(l=0,s=h):s+d>=1?(l=(e*c-1)*n(2,a),s+=d):(l=e*n(2,d-1)*n(2,a),s=0));a>=8;f[g++]=255&l,l/=256,a-=8);for(s=s<<a|l,p+=a;p>0;f[g++]=255&s,s/=256,p-=8);return f[--g]|=128*y,f},unpack:function(e,t){var r,i=e.length,o=8*i-t-1,a=(1<<o)-1,u=a>>1,s=o-7,l=i-1,c=e[l--],f=127&c;for(c>>=7;s>0;f=256*f+e[l],l--,s-=8);for(r=f&(1<<-s)-1,f>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===f)f=1-u;else{if(f===a)return r?NaN:c?-1/0:1/0;r+=n(2,t),f-=u}return(c?-1:1)*r*n(2,f-t)}}},8361:function(e,t,n){var r=n(7293),i=n(4326),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},9587:function(e,t,n){var r=n(111),i=n(7674);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},2788:function(e,t,n){var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},9909:function(e,t,n){var r,i,o,a=n(8536),u=n(7854),s=n(111),l=n(8880),c=n(6656),f=n(5465),p=n(6200),h=n(3501),d=u.WeakMap;if(a){var v=f.state||(f.state=new d),y=v.get,g=v.has,m=v.set;r=function(e,t){return t.facade=e,m.call(v,e,t),t},i=function(e){return y.call(v,e)||{}},o=function(e){return g.call(v,e)}}else{var b=p("state");h[b]=!0,r=function(e,t){return t.facade=e,l(e,b,t),t},i=function(e){return c(e,b)?e[b]:{}},o=function(e){return c(e,b)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7659:function(e,t,n){var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:function(e,t,n){var r=n(7293),i=/#|\.prototype\./,o=function(e,t){var n=u[a(e)];return n==l||n!=s&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=o.data={},s=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},111:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:function(e){e.exports=!1},7850:function(e,t,n){var r=n(111),i=n(4326),o=n(5112)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},9212:function(e,t,n){var r=n(9670);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},3383:function(e,t,n){"use strict";var r,i,o,a=n(7293),u=n(9518),s=n(8880),l=n(6656),c=n(5112),f=n(1913),p=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):h=!0);var d=null==r||a((function(){var e={};return r[p].call(e)!==e}));d&&(r={}),f&&!d||l(r,p)||s(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},7497:function(e){e.exports={}},133:function(e,t,n){var r=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},590:function(e,t,n){var r=n(7293),i=n(5112),o=n(1913),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:function(e,t,n){var r=n(7854),i=n(2788),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},1574:function(e,t,n){"use strict";var r=n(9781),i=n(7293),o=n(1956),a=n(5181),u=n(5296),s=n(7908),l=n(8361),c=Object.assign,f=Object.defineProperty;e.exports=!c||i((function(){if(r&&1!==c({b:1},c(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||o(c({},t)).join("")!=i}))?function(e,t){for(var n=s(e),i=arguments.length,c=1,f=a.f,p=u.f;i>c;)for(var h,d=l(arguments[c++]),v=f?o(d).concat(f(d)):o(d),y=v.length,g=0;y>g;)h=v[g++],r&&!p.call(d,h)||(n[h]=d[h]);return n}:c},30:function(e,t,n){var r,i=n(9670),o=n(6048),a=n(748),u=n(3501),s=n(490),l=n(317),c=n(6200)("IE_PROTO"),f=function(){},p=function(e){return"<script>"+e+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;h=r?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=l("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};u[c]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=i(e),n=new f,f.prototype=null,n[c]=e):n=h(),void 0===t?n:o(n,t)}},6048:function(e,t,n){var r=n(9781),i=n(3070),o=n(9670),a=n(1956);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),u=r.length,s=0;u>s;)i.f(e,n=r[s++],t[n]);return e}},3070:function(e,t,n){var r=n(9781),i=n(4664),o=n(9670),a=n(7593),u=Object.defineProperty;t.f=r?u:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:function(e,t,n){var r=n(9781),i=n(5296),o=n(9114),a=n(5656),u=n(7593),s=n(6656),l=n(4664),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=u(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return o(!i.f.call(e,t),e[t])}},8006:function(e,t,n){var r=n(6324),i=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},9518:function(e,t,n){var r=n(6656),i=n(7908),o=n(6200),a=n(8544),u=o("IE_PROTO"),s=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,u)?e[u]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},6324:function(e,t,n){var r=n(6656),i=n(5656),o=n(1318).indexOf,a=n(3501);e.exports=function(e,t){var n,u=i(e),s=0,l=[];for(n in u)!r(a,n)&&r(u,n)&&l.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~o(l,n)||l.push(n));return l}},1956:function(e,t,n){var r=n(6324),i=n(748);e.exports=Object.keys||function(e){return r(e,i)}},5296:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:function(e,t,n){var r=n(9670),i=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},288:function(e,t,n){"use strict";var r=n(1694),i=n(648);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},3887:function(e,t,n){var r=n(5005),i=n(8006),o=n(5181),a=n(9670);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},857:function(e,t,n){var r=n(7854);e.exports=r},2248:function(e,t,n){var r=n(1320);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},1320:function(e,t,n){var r=n(7854),i=n(8880),o=n(6656),a=n(3505),u=n(2788),s=n(9909),l=s.get,c=s.enforce,f=String(String).split("String");(e.exports=function(e,t,n,u){var s,l=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,h=!!u&&!!u.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),(s=c(n)).source||(s.source=f.join("string"==typeof t?t:""))),e!==r?(l?!h&&e[t]&&(p=!0):delete e[t],p?e[t]=n:i(e,t,n)):p?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||u(this)}))},7651:function(e,t,n){var r=n(4326),i=n(2261);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},2261:function(e,t,n){"use strict";var r,i,o=n(7066),a=n(2999),u=RegExp.prototype.exec,s=String.prototype.replace,l=u,c=(r=/a/,i=/b*/g,u.call(r,"a"),u.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=a.UNSUPPORTED_Y||a.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(c||p||f)&&(l=function(e){var t,n,r,i,a=this,l=f&&a.sticky,h=o.call(a),d=a.source,v=0,y=e;return l&&(-1===(h=h.replace("y","")).indexOf("g")&&(h+="g"),y=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(d="(?: "+d+")",y=" "+y,v++),n=new RegExp("^(?:"+d+")",h)),p&&(n=new RegExp("^"+d+"$(?!\\s)",h)),c&&(t=a.lastIndex),r=u.call(l?n:a,y),l?r?(r.input=r.input.slice(v),r[0]=r[0].slice(v),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:c&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),p&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=l},7066:function(e,t,n){"use strict";var r=n(9670);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},2999:function(e,t,n){"use strict";var r=n(7293);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},4488:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},3505:function(e,t,n){var r=n(7854),i=n(8880);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},6340:function(e,t,n){"use strict";var r=n(5005),i=n(3070),o=n(5112),a=n(9781),u=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[u]&&n(t,u,{configurable:!0,get:function(){return this}})}},8003:function(e,t,n){var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},6200:function(e,t,n){var r=n(2309),i=n(9711),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:function(e,t,n){var r=n(7854),i=n(3505),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},2309:function(e,t,n){var r=n(1913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(e,t,n){var r=n(9670),i=n(3099),o=n(5112)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},8710:function(e,t,n){var r=n(9958),i=n(4488),o=function(e){return function(t,n){var o,a,u=String(i(t)),s=r(n),l=u.length;return s<0||s>=l?e?"":void 0:(o=u.charCodeAt(s))<55296||o>56319||s+1===l||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):o:e?u.slice(s,s+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},3197:function(e){"use strict";var t=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=Math.floor,a=String.fromCharCode,u=function(e){return e+22+75*(e<26)},s=function(e,t,n){var r=0;for(e=n?o(e/700):e>>1,e+=o(e/t);e>455;r+=36)e=o(e/35);return o(r+36*e/(e+38))},l=function(e){var n,r,l=[],c=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,f=128,p=0,h=72;for(n=0;n<e.length;n++)(r=e[n])<128&&l.push(a(r));var d=l.length,v=d;for(d&&l.push("-");v<c;){var y=t;for(n=0;n<e.length;n++)(r=e[n])>=f&&r<y&&(y=r);var g=v+1;if(y-f>o((t-p)/g))throw RangeError(i);for(p+=(y-f)*g,f=y,n=0;n<e.length;n++){if((r=e[n])<f&&++p>t)throw RangeError(i);if(r==f){for(var m=p,b=36;;b+=36){var x=b<=h?1:b>=h+26?26:b-h;if(m<x)break;var w=m-x,E=36-x;l.push(a(u(x+w%E))),m=o(w/E)}l.push(a(u(m))),h=s(p,g,v==d),p=0,++v}}++p,++f}return l.join("")};e.exports=function(e){var t,i,o=[],a=e.toLowerCase().replace(r,".").split(".");for(t=0;t<a.length;t++)i=a[t],o.push(n.test(i)?"xn--"+l(i):i);return o.join(".")}},6091:function(e,t,n){var r=n(7293),i=n(1361);e.exports=function(e){return r((function(){return!!i[e]()||"​᠎"!="​᠎"[e]()||i[e].name!==e}))}},3111:function(e,t,n){var r=n(4488),i="["+n(1361)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),u=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},1400:function(e,t,n){var r=n(9958),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},7067:function(e,t,n){var r=n(9958),i=n(7466);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length or index");return n}},5656:function(e,t,n){var r=n(8361),i=n(4488);e.exports=function(e){return r(i(e))}},9958:function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},7466:function(e,t,n){var r=n(9958),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},7908:function(e,t,n){var r=n(4488);e.exports=function(e){return Object(r(e))}},4590:function(e,t,n){var r=n(3002);e.exports=function(e,t){var n=r(e);if(n%t)throw RangeError("Wrong offset");return n}},3002:function(e,t,n){var r=n(9958);e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},7593:function(e,t,n){var r=n(111);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},1694:function(e,t,n){var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},9843:function(e,t,n){"use strict";var r=n(2109),i=n(7854),o=n(9781),a=n(3832),u=n(260),s=n(3331),l=n(5787),c=n(9114),f=n(8880),p=n(7466),h=n(7067),d=n(4590),v=n(7593),y=n(6656),g=n(648),m=n(111),b=n(30),x=n(7674),w=n(8006).f,E=n(7321),k=n(2092).forEach,A=n(6340),S=n(3070),F=n(1236),T=n(9909),C=n(9587),L=T.get,R=T.set,I=S.f,U=F.f,O=Math.round,_=i.RangeError,M=s.ArrayBuffer,z=s.DataView,P=u.NATIVE_ARRAY_BUFFER_VIEWS,j=u.TYPED_ARRAY_TAG,D=u.TypedArray,N=u.TypedArrayPrototype,B=u.aTypedArrayConstructor,q=u.isTypedArray,W="BYTES_PER_ELEMENT",H="Wrong length",Y=function(e,t){for(var n=0,r=t.length,i=new(B(e))(r);r>n;)i[n]=t[n++];return i},G=function(e,t){I(e,t,{get:function(){return L(this)[t]}})},Q=function(e){var t;return e instanceof M||"ArrayBuffer"==(t=g(e))||"SharedArrayBuffer"==t},$=function(e,t){return q(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},V=function(e,t){return $(e,t=v(t,!0))?c(2,e[t]):U(e,t)},X=function(e,t,n){return!($(e,t=v(t,!0))&&m(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?I(e,t,n):(e[t]=n.value,e)};o?(P||(F.f=V,S.f=X,G(N,"buffer"),G(N,"byteOffset"),G(N,"byteLength"),G(N,"length")),r({target:"Object",stat:!0,forced:!P},{getOwnPropertyDescriptor:V,defineProperty:X}),e.exports=function(e,t,n){var o=e.match(/\d+$/)[0]/8,u=e+(n?"Clamped":"")+"Array",s="get"+e,c="set"+e,v=i[u],y=v,g=y&&y.prototype,S={},F=function(e,t){I(e,t,{get:function(){return function(e,t){var n=L(e);return n.view[s](t*o+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=L(e);n&&(r=(r=O(r))<0?0:r>255?255:255&r),i.view[c](t*o+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};P?a&&(y=t((function(e,t,n,r){return l(e,y,u),C(m(t)?Q(t)?void 0!==r?new v(t,d(n,o),r):void 0!==n?new v(t,d(n,o)):new v(t):q(t)?Y(y,t):E.call(y,t):new v(h(t)),e,y)})),x&&x(y,D),k(w(v),(function(e){e in y||f(y,e,v[e])})),y.prototype=g):(y=t((function(e,t,n,r){l(e,y,u);var i,a,s,c=0,f=0;if(m(t)){if(!Q(t))return q(t)?Y(y,t):E.call(y,t);i=t,f=d(n,o);var v=t.byteLength;if(void 0===r){if(v%o)throw _(H);if((a=v-f)<0)throw _(H)}else if((a=p(r)*o)+f>v)throw _(H);s=a/o}else s=h(t),i=new M(a=s*o);for(R(e,{buffer:i,byteOffset:f,byteLength:a,length:s,view:new z(i)});c<s;)F(e,c++)})),x&&x(y,D),g=y.prototype=b(N)),g.constructor!==y&&f(g,"constructor",y),j&&f(g,j,u),S[u]=y,r({global:!0,forced:y!=v,sham:!P},S),W in y||f(y,W,o),W in g||f(g,W,o),A(u)}):e.exports=function(){}},3832:function(e,t,n){var r=n(7854),i=n(7293),o=n(7072),a=n(260).NATIVE_ARRAY_BUFFER_VIEWS,u=r.ArrayBuffer,s=r.Int8Array;e.exports=!a||!i((function(){s(1)}))||!i((function(){new s(-1)}))||!o((function(e){new s,new s(null),new s(1.5),new s(e)}),!0)||i((function(){return 1!==new s(new u(2),1,void 0).length}))},3074:function(e,t,n){var r=n(260).aTypedArrayConstructor,i=n(6707);e.exports=function(e,t){for(var n=i(e,e.constructor),o=0,a=t.length,u=new(r(n))(a);a>o;)u[o]=t[o++];return u}},7321:function(e,t,n){var r=n(7908),i=n(7466),o=n(1246),a=n(7659),u=n(9974),s=n(260).aTypedArrayConstructor;e.exports=function(e){var t,n,l,c,f,p,h=r(e),d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,g=o(h);if(null!=g&&!a(g))for(p=(f=g.call(h)).next,h=[];!(c=p.call(f)).done;)h.push(c.value);for(y&&d>2&&(v=u(v,arguments[2],2)),n=i(h.length),l=new(s(this))(n),t=0;n>t;t++)l[t]=y?v(h[t],t):h[t];return l}},9711:function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},3307:function(e,t,n){var r=n(133);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:function(e,t,n){var r=n(7854),i=n(2309),o=n(6656),a=n(9711),u=n(133),s=n(3307),l=i("wks"),c=r.Symbol,f=s?c:c&&c.withoutSetter||a;e.exports=function(e){return o(l,e)||(u&&o(c,e)?l[e]=c[e]:l[e]=f("Symbol."+e)),l[e]}},1361:function(e){e.exports="\t\n\v\f\r                　\u2028\u2029\ufeff"},8264:function(e,t,n){"use strict";var r=n(2109),i=n(7854),o=n(3331),a=n(6340),u=o.ArrayBuffer;r({global:!0,forced:i.ArrayBuffer!==u},{ArrayBuffer:u}),a("ArrayBuffer")},2222:function(e,t,n){"use strict";var r=n(2109),i=n(7293),o=n(3157),a=n(111),u=n(7908),s=n(7466),l=n(6135),c=n(5417),f=n(1194),p=n(5112),h=n(7392),d=p("isConcatSpreadable"),v=9007199254740991,y="Maximum allowed index exceeded",g=h>=51||!i((function(){var e=[];return e[d]=!1,e.concat()[0]!==e})),m=f("concat"),b=function(e){if(!a(e))return!1;var t=e[d];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!g||!m},{concat:function(e){var t,n,r,i,o,a=u(this),f=c(a,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(b(o=-1===t?a:arguments[t])){if(p+(i=s(o.length))>v)throw TypeError(y);for(n=0;n<i;n++,p++)n in o&&l(f,p,o[n])}else{if(p>=v)throw TypeError(y);l(f,p++,o)}return f.length=p,f}})},7327:function(e,t,n){"use strict";var r=n(2109),i=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},2772:function(e,t,n){"use strict";var r=n(2109),i=n(1318).indexOf,o=n(9341),a=[].indexOf,u=!!a&&1/[1].indexOf(1,-0)<0,s=o("indexOf");r({target:"Array",proto:!0,forced:u||!s},{indexOf:function(e){return u?a.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},6992:function(e,t,n){"use strict";var r=n(5656),i=n(1223),o=n(7497),a=n(9909),u=n(654),s="Array Iterator",l=a.set,c=a.getterFor(s);e.exports=u(Array,"Array",(function(e,t){l(this,{type:s,target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},1249:function(e,t,n){"use strict";var r=n(2109),i=n(2092).map;r({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},7042:function(e,t,n){"use strict";var r=n(2109),i=n(111),o=n(3157),a=n(1400),u=n(7466),s=n(5656),l=n(6135),c=n(5112),f=n(1194)("slice"),p=c("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,r,c,f=s(this),v=u(f.length),y=a(e,v),g=a(void 0===t?v:t,v);if(o(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[p])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(f,y,g);for(r=new(void 0===n?Array:n)(d(g-y,0)),c=0;y<g;y++,c++)y in f&&l(r,c,f[y]);return r.length=c,r}})},561:function(e,t,n){"use strict";var r=n(2109),i=n(1400),o=n(9958),a=n(7466),u=n(7908),s=n(5417),l=n(6135),c=n(1194)("splice"),f=Math.max,p=Math.min,h=9007199254740991,d="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!c},{splice:function(e,t){var n,r,c,v,y,g,m=u(this),b=a(m.length),x=i(e,b),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=b-x):(n=w-2,r=p(f(o(t),0),b-x)),b+n-r>h)throw TypeError(d);for(c=s(m,r),v=0;v<r;v++)(y=x+v)in m&&l(c,v,m[y]);if(c.length=r,n<r){for(v=x;v<b-r;v++)g=v+n,(y=v+r)in m?m[g]=m[y]:delete m[g];for(v=b;v>b-r+n;v--)delete m[v-1]}else if(n>r)for(v=b-r;v>x;v--)g=v+n-1,(y=v+r-1)in m?m[g]=m[y]:delete m[g];for(v=0;v<n;v++)m[v+x]=arguments[v+2];return m.length=b-r+n,c}})},8309:function(e,t,n){var r=n(9781),i=n(3070).f,o=Function.prototype,a=o.toString,u=/^\s*function ([^ (]*)/,s="name";r&&!(s in o)&&i(o,s,{configurable:!0,get:function(){try{return a.call(this).match(u)[1]}catch(e){return""}}})},489:function(e,t,n){var r=n(2109),i=n(7293),o=n(7908),a=n(9518),u=n(8544);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!u},{getPrototypeOf:function(e){return a(o(e))}})},1539:function(e,t,n){var r=n(1694),i=n(1320),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},4916:function(e,t,n){"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:function(e,t,n){"use strict";var r=n(1320),i=n(9670),o=n(7293),a=n(7066),u="toString",s=RegExp.prototype,l=s.toString,c=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),f=l.name!=u;(c||f)&&r(RegExp.prototype,u,(function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)}),{unsafe:!0})},8783:function(e,t,n){"use strict";var r=n(8710).charAt,i=n(9909),o=n(654),a="String Iterator",u=i.set,s=i.getterFor(a);o(String,"String",(function(e){u(this,{type:a,string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},4723:function(e,t,n){"use strict";var r=n(7007),i=n(9670),o=n(7466),a=n(4488),u=n(1530),s=n(7651);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),l=String(this);if(!a.global)return s(a,l);var c=a.unicode;a.lastIndex=0;for(var f,p=[],h=0;null!==(f=s(a,l));){var d=String(f[0]);p[h]=d,""===d&&(a.lastIndex=u(l,o(a.lastIndex),c)),h++}return 0===h?null:p}]}))},5306:function(e,t,n){"use strict";var r=n(7007),i=n(9670),o=n(7466),a=n(9958),u=n(4488),s=n(1530),l=n(647),c=n(7651),f=Math.max,p=Math.min;r("replace",2,(function(e,t,n,r){var h=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,d=r.REPLACE_KEEPS_$0,v=h?"$":"$0";return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!h&&d||"string"==typeof r&&-1===r.indexOf(v)){var u=n(t,e,this,r);if(u.done)return u.value}var y=i(e),g=String(this),m="function"==typeof r;m||(r=String(r));var b=y.global;if(b){var x=y.unicode;y.lastIndex=0}for(var w=[];;){var E=c(y,g);if(null===E)break;if(w.push(E),!b)break;""===String(E[0])&&(y.lastIndex=s(g,o(y.lastIndex),x))}for(var k,A="",S=0,F=0;F<w.length;F++){E=w[F];for(var T=String(E[0]),C=f(p(a(E.index),g.length),0),L=[],R=1;R<E.length;R++)L.push(void 0===(k=E[R])?k:String(k));var I=E.groups;if(m){var U=[T].concat(L,C,g);void 0!==I&&U.push(I);var O=String(r.apply(void 0,U))}else O=l(T,g,C,L,I,r);C>=S&&(A+=g.slice(S,C)+O,S=C+T.length)}return A+g.slice(S)}]}))},3123:function(e,t,n){"use strict";var r=n(7007),i=n(7850),o=n(9670),a=n(4488),u=n(6707),s=n(1530),l=n(7466),c=n(7651),f=n(2261),p=n(7293),h=[].push,d=Math.min,v=4294967295,y=!p((function(){return!RegExp(v,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?v:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var u,s,l,c=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,y=new RegExp(e.source,p+"g");(u=f.call(y,r))&&!((s=y.lastIndex)>d&&(c.push(r.slice(d,u.index)),u.length>1&&u.index<r.length&&h.apply(c,u.slice(1)),l=u[0].length,d=s,c.length>=o));)y.lastIndex===u.index&&y.lastIndex++;return d===r.length?!l&&y.test("")||c.push(""):c.push(r.slice(d)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),p=String(this),h=u(f,RegExp),g=f.unicode,m=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(y?"y":"g"),b=new h(y?f:"^(?:"+f.source+")",m),x=void 0===i?v:i>>>0;if(0===x)return[];if(0===p.length)return null===c(b,p)?[p]:[];for(var w=0,E=0,k=[];E<p.length;){b.lastIndex=y?E:0;var A,S=c(b,y?p:p.slice(E));if(null===S||(A=d(l(b.lastIndex+(y?0:E)),p.length))===w)E=s(p,E,g);else{if(k.push(p.slice(w,E)),k.length===x)return k;for(var F=1;F<=S.length-1;F++)if(k.push(S[F]),k.length===x)return k;E=w=A}}return k.push(p.slice(w)),k}]}),!y)},3210:function(e,t,n){"use strict";var r=n(2109),i=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return i(this)}})},2990:function(e,t,n){"use strict";var r=n(260),i=n(1048),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return i.call(o(this),e,t,arguments.length>2?arguments[2]:void 0)}))},8927:function(e,t,n){"use strict";var r=n(260),i=n(2092).every,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3105:function(e,t,n){"use strict";var r=n(260),i=n(1285),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(e){return i.apply(o(this),arguments)}))},5035:function(e,t,n){"use strict";var r=n(260),i=n(2092).filter,o=n(3074),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(e){var t=i(a(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},7174:function(e,t,n){"use strict";var r=n(260),i=n(2092).findIndex,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4345:function(e,t,n){"use strict";var r=n(260),i=n(2092).find,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},2846:function(e,t,n){"use strict";var r=n(260),i=n(2092).forEach,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4731:function(e,t,n){"use strict";var r=n(260),i=n(1318).includes,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},7209:function(e,t,n){"use strict";var r=n(260),i=n(1318).indexOf,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},6319:function(e,t,n){"use strict";var r=n(7854),i=n(260),o=n(6992),a=n(5112)("iterator"),u=r.Uint8Array,s=o.values,l=o.keys,c=o.entries,f=i.aTypedArray,p=i.exportTypedArrayMethod,h=u&&u.prototype[a],d=!!h&&("values"==h.name||null==h.name),v=function(){return s.call(f(this))};p("entries",(function(){return c.call(f(this))})),p("keys",(function(){return l.call(f(this))})),p("values",v,!d),p(a,v,!d)},8867:function(e,t,n){"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=[].join;o("join",(function(e){return a.apply(i(this),arguments)}))},7789:function(e,t,n){"use strict";var r=n(260),i=n(6583),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){return i.apply(o(this),arguments)}))},3739:function(e,t,n){"use strict";var r=n(260),i=n(2092).map,o=n(6707),a=r.aTypedArray,u=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(u(o(e,e.constructor)))(t)}))}))},4483:function(e,t,n){"use strict";var r=n(260),i=n(3671).right,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){return i(o(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}))},9368:function(e,t,n){"use strict";var r=n(260),i=n(3671).left,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){return i(o(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}))},2056:function(e,t,n){"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var e,t=this,n=i(t).length,r=a(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t}))},3462:function(e,t,n){"use strict";var r=n(260),i=n(7466),o=n(4590),a=n(7908),u=n(7293),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("set",(function(e){s(this);var t=o(arguments.length>1?arguments[1]:void 0,1),n=this.length,r=a(e),u=i(r.length),l=0;if(u+t>n)throw RangeError("Wrong length");for(;l<u;)this[t+l]=r[l++]}),u((function(){new Int8Array(1).set({})})))},678:function(e,t,n){"use strict";var r=n(260),i=n(6707),o=n(7293),a=r.aTypedArray,u=r.aTypedArrayConstructor,s=r.exportTypedArrayMethod,l=[].slice;s("slice",(function(e,t){for(var n=l.call(a(this),e,t),r=i(this,this.constructor),o=0,s=n.length,c=new(u(r))(s);s>o;)c[o]=n[o++];return c}),o((function(){new Int8Array(1).slice()})))},7462:function(e,t,n){"use strict";var r=n(260),i=n(2092).some,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3824:function(e,t,n){"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=[].sort;o("sort",(function(e){return a.call(i(this),e)}))},5021:function(e,t,n){"use strict";var r=n(260),i=n(7466),o=n(1400),a=n(6707),u=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=u(this),r=n.length,s=o(e,r);return new(a(n,n.constructor))(n.buffer,n.byteOffset+s*n.BYTES_PER_ELEMENT,i((void 0===t?r:o(t,r))-s))}))},2974:function(e,t,n){"use strict";var r=n(7854),i=n(260),o=n(7293),a=r.Int8Array,u=i.aTypedArray,s=i.exportTypedArrayMethod,l=[].toLocaleString,c=[].slice,f=!!a&&o((function(){l.call(new a(1))}));s("toLocaleString",(function(){return l.apply(f?c.call(u(this)):u(this),arguments)}),o((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!o((function(){a.prototype.toLocaleString.call([1,2])})))},5016:function(e,t,n){"use strict";var r=n(260).exportTypedArrayMethod,i=n(7293),o=n(7854).Uint8Array,a=o&&o.prototype||{},u=[].toString,s=[].join;i((function(){u.call({})}))&&(u=function(){return s.call(this)});var l=a.toString!=u;r("toString",u,l)},2472:function(e,t,n){n(9843)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},4747:function(e,t,n){var r=n(7854),i=n(8324),o=n(8533),a=n(8880);for(var u in i){var s=r[u],l=s&&s.prototype;if(l&&l.forEach!==o)try{a(l,"forEach",o)}catch(e){l.forEach=o}}},3948:function(e,t,n){var r=n(7854),i=n(8324),o=n(6992),a=n(8880),u=n(5112),s=u("iterator"),l=u("toStringTag"),c=o.values;for(var f in i){var p=r[f],h=p&&p.prototype;if(h){if(h[s]!==c)try{a(h,s,c)}catch(e){h[s]=c}if(h[l]||a(h,l,f),i[f])for(var d in o)if(h[d]!==o[d])try{a(h,d,o[d])}catch(e){h[d]=o[d]}}}},1637:function(e,t,n){"use strict";n(6992);var r=n(2109),i=n(5005),o=n(590),a=n(1320),u=n(2248),s=n(8003),l=n(4994),c=n(9909),f=n(5787),p=n(6656),h=n(9974),d=n(648),v=n(9670),y=n(111),g=n(30),m=n(9114),b=n(8554),x=n(1246),w=n(5112),E=i("fetch"),k=i("Headers"),A=w("iterator"),S="URLSearchParams",F="URLSearchParamsIterator",T=c.set,C=c.getterFor(S),L=c.getterFor(F),R=/\+/g,I=Array(4),U=function(e){return I[e-1]||(I[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},O=function(e){try{return decodeURIComponent(e)}catch(t){return e}},_=function(e){var t=e.replace(R," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(U(n--),O);return t}},M=/[!'()~]|%20/g,z={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},P=function(e){return z[e]},j=function(e){return encodeURIComponent(e).replace(M,P)},D=function(e,t){if(t)for(var n,r,i=t.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),e.push({key:_(r.shift()),value:_(r.join("="))}))},N=function(e){this.entries.length=0,D(this.entries,e)},B=function(e,t){if(e<t)throw TypeError("Not enough arguments")},q=l((function(e,t){T(this,{type:F,iterator:b(C(e).entries),kind:t})}),"Iterator",(function(){var e=L(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),W=function(){f(this,W,S);var e,t,n,r,i,o,a,u,s,l=arguments.length>0?arguments[0]:void 0,c=this,h=[];if(T(c,{type:S,entries:h,updateURL:function(){},updateSearchParams:N}),void 0!==l)if(y(l))if("function"==typeof(e=x(l)))for(n=(t=e.call(l)).next;!(r=n.call(t)).done;){if((a=(o=(i=b(v(r.value))).next).call(i)).done||(u=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");h.push({key:a.value+"",value:u.value+""})}else for(s in l)p(l,s)&&h.push({key:s,value:l[s]+""});else D(h,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},H=W.prototype;u(H,{append:function(e,t){B(arguments.length,2);var n=C(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){B(arguments.length,1);for(var t=C(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){B(arguments.length,1);for(var t=C(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){B(arguments.length,1);for(var t=C(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){B(arguments.length,1);for(var t=C(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){B(arguments.length,1);for(var n,r=C(this),i=r.entries,o=!1,a=e+"",u=t+"",s=0;s<i.length;s++)(n=i[s]).key===a&&(o?i.splice(s--,1):(o=!0,n.value=u));o||i.push({key:a,value:u}),r.updateURL()},sort:function(){var e,t,n,r=C(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(e=o[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=C(this).entries,r=h(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new q(this,"keys")},values:function(){return new q(this,"values")},entries:function(){return new q(this,"entries")}},{enumerable:!0}),a(H,A,H.entries),a(H,"toString",(function(){for(var e,t=C(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(j(e.key)+"="+j(e.value));return n.join("&")}),{enumerable:!0}),s(W,S),r({global:!0,forced:!o},{URLSearchParams:W}),o||"function"!=typeof E||"function"!=typeof k||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(y(t=arguments[1])&&(n=t.body,d(n)===S&&((r=t.headers?new k(t.headers):new k).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=g(t,{body:m(0,String(n)),headers:m(0,r)}))),i.push(t)),E.apply(this,i)}}),e.exports={URLSearchParams:W,getState:C}},285:function(e,t,n){"use strict";n(8783);var r,i=n(2109),o=n(9781),a=n(590),u=n(7854),s=n(6048),l=n(1320),c=n(5787),f=n(6656),p=n(1574),h=n(8457),d=n(8710).codeAt,v=n(3197),y=n(8003),g=n(1637),m=n(9909),b=u.URL,x=g.URLSearchParams,w=g.getState,E=m.set,k=m.getterFor("URL"),A=Math.floor,S=Math.pow,F="Invalid scheme",T="Invalid host",C="Invalid port",L=/[A-Za-z]/,R=/[\d+-.A-Za-z]/,I=/\d/,U=/^(0x|0X)/,O=/^[0-7]+$/,_=/^\d+$/,M=/^[\dA-Fa-f]+$/,z=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,P=/[\u0000\t\u000A\u000D #/:?@[\\]]/,j=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,D=/[\t\u000A\u000D]/g,N=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return T;if(!(n=q(t.slice(1,-1))))return T;e.host=n}else if(X(e)){if(t=v(t),z.test(t))return T;if(null===(n=B(t)))return T;e.host=n}else{if(P.test(t))return T;for(n="",r=h(t),i=0;i<r.length;i++)n+=$(r[i],H);e.host=n}},B=function(e){var t,n,r,i,o,a,u,s=e.split(".");if(s.length&&""==s[s.length-1]&&s.pop(),(t=s.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=s[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=U.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?_:8==o?O:M).test(i))return e;a=parseInt(i,o)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=S(256,5-t))return null}else if(a>255)return null;for(u=n.pop(),r=0;r<n.length;r++)u+=n[r]*S(256,3-r);return u},q=function(e){var t,n,r,i,o,a,u,s=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,p=function(){return e.charAt(f)};if(":"==p()){if(":"!=e.charAt(1))return;f+=2,c=++l}for(;p();){if(8==l)return;if(":"!=p()){for(t=n=0;n<4&&M.test(p());)t=16*t+parseInt(p(),16),f++,n++;if("."==p()){if(0==n)return;if(f-=n,l>6)return;for(r=0;p();){if(i=null,r>0){if(!("."==p()&&r<4))return;f++}if(!I.test(p()))return;for(;I.test(p());){if(o=parseInt(p(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}s[l]=256*s[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==p()){if(f++,!p())return}else if(p())return;s[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)u=s[l],s[l--]=s[c+a-1],s[c+--a]=u;else if(8!=l)return;return s},W=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=A(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},H={},Y=p({},H,{" ":1,'"':1,"<":1,">":1,"`":1}),G=p({},Y,{"#":1,"?":1,"{":1,"}":1}),Q=p({},G,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),$=function(e,t){var n=d(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},V={ftp:21,file:null,http:80,https:443,ws:80,wss:443},X=function(e){return f(V,e.scheme)},K=function(e){return""!=e.username||""!=e.password},Z=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},J=function(e,t){var n;return 2==e.length&&L.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&J(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&J(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},ie={},oe={},ae={},ue={},se={},le={},ce={},fe={},pe={},he={},de={},ve={},ye={},ge={},me={},be={},xe={},we={},Ee={},ke={},Ae=function(e,t,n,i){var o,a,u,s,l,c=n||re,p=0,d="",v=!1,y=!1,g=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(j,"")),t=t.replace(D,""),o=h(t);p<=o.length;){switch(a=o[p],c){case re:if(!a||!L.test(a)){if(n)return F;c=oe;continue}d+=a.toLowerCase(),c=ie;break;case ie:if(a&&(R.test(a)||"+"==a||"-"==a||"."==a))d+=a.toLowerCase();else{if(":"!=a){if(n)return F;d="",c=oe,p=0;continue}if(n&&(X(e)!=f(V,d)||"file"==d&&(K(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,n)return void(X(e)&&V[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?c=ye:X(e)&&i&&i.scheme==e.scheme?c=ae:X(e)?c=ce:"/"==o[p+1]?(c=ue,p++):(e.cannotBeABaseURL=!0,e.path.push(""),c=we)}break;case oe:if(!i||i.cannotBeABaseURL&&"#"!=a)return F;if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,c=ke;break}c="file"==i.scheme?ye:se;continue;case ae:if("/"!=a||"/"!=o[p+1]){c=se;continue}c=fe,p++;break;case ue:if("/"==a){c=pe;break}c=xe;continue;case se:if(e.scheme=i.scheme,a==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==a||"\\"==a&&X(e))c=le;else if("?"==a)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",c=Ee;else{if("#"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),c=xe;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",c=ke}break;case le:if(!X(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,c=xe;continue}c=pe}else c=fe;break;case ce:if(c=fe,"/"!=a||"/"!=d.charAt(p+1))continue;p++;break;case fe:if("/"!=a&&"\\"!=a){c=pe;continue}break;case pe:if("@"==a){v&&(d="%40"+d),v=!0,u=h(d);for(var m=0;m<u.length;m++){var b=u[m];if(":"!=b||g){var x=$(b,Q);g?e.password+=x:e.username+=x}else g=!0}d=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&X(e)){if(v&&""==d)return"Invalid authority";p-=h(d).length+1,d="",c=he}else d+=a;break;case he:case de:if(n&&"file"==e.scheme){c=me;continue}if(":"!=a||y){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&X(e)){if(X(e)&&""==d)return T;if(n&&""==d&&(K(e)||null!==e.port))return;if(s=N(e,d))return s;if(d="",c=be,n)return;continue}"["==a?y=!0:"]"==a&&(y=!1),d+=a}else{if(""==d)return T;if(s=N(e,d))return s;if(d="",c=ve,n==de)return}break;case ve:if(!I.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&X(e)||n){if(""!=d){var w=parseInt(d,10);if(w>65535)return C;e.port=X(e)&&w===V[e.scheme]?null:w,d=""}if(n)return;c=be;continue}return C}d+=a;break;case ye:if(e.scheme="file","/"==a||"\\"==a)c=ge;else{if(!i||"file"!=i.scheme){c=xe;continue}if(a==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==a)e.host=i.host,e.path=i.path.slice(),e.query="",c=Ee;else{if("#"!=a){ee(o.slice(p).join(""))||(e.host=i.host,e.path=i.path.slice(),te(e)),c=xe;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",c=ke}}break;case ge:if("/"==a||"\\"==a){c=me;break}i&&"file"==i.scheme&&!ee(o.slice(p).join(""))&&(J(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),c=xe;continue;case me:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&J(d))c=xe;else if(""==d){if(e.host="",n)return;c=be}else{if(s=N(e,d))return s;if("localhost"==e.host&&(e.host=""),n)return;d="",c=be}continue}d+=a;break;case be:if(X(e)){if(c=xe,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(c=xe,"/"!=a))continue}else e.fragment="",c=ke;else e.query="",c=Ee;break;case xe:if(a==r||"/"==a||"\\"==a&&X(e)||!n&&("?"==a||"#"==a)){if(".."===(l=(l=d).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(te(e),"/"==a||"\\"==a&&X(e)||e.path.push("")):ne(d)?"/"==a||"\\"==a&&X(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&J(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",c=Ee):"#"==a&&(e.fragment="",c=ke)}else d+=$(a,G);break;case we:"?"==a?(e.query="",c=Ee):"#"==a?(e.fragment="",c=ke):a!=r&&(e.path[0]+=$(a,H));break;case Ee:n||"#"!=a?a!=r&&("'"==a&&X(e)?e.query+="%27":e.query+="#"==a?"%23":$(a,H)):(e.fragment="",c=ke);break;case ke:a!=r&&(e.fragment+=$(a,Y))}p++}},Se=function(e){var t,n,r=c(this,Se,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),u=E(r,{type:"URL"});if(void 0!==i)if(i instanceof Se)t=k(i);else if(n=Ae(t={},String(i)))throw TypeError(n);if(n=Ae(u,a,null,t))throw TypeError(n);var s=u.searchParams=new x,l=w(s);l.updateSearchParams(u.query),l.updateURL=function(){u.query=String(s)||null},o||(r.href=Te.call(r),r.origin=Ce.call(r),r.protocol=Le.call(r),r.username=Re.call(r),r.password=Ie.call(r),r.host=Ue.call(r),r.hostname=Oe.call(r),r.port=_e.call(r),r.pathname=Me.call(r),r.search=ze.call(r),r.searchParams=Pe.call(r),r.hash=je.call(r))},Fe=Se.prototype,Te=function(){var e=k(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,u=e.query,s=e.fragment,l=t+":";return null!==i?(l+="//",K(e)&&(l+=n+(r?":"+r:"")+"@"),l+=W(i),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(l+="?"+u),null!==s&&(l+="#"+s),l},Ce=function(){var e=k(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&X(e)?t+"://"+W(e.host)+(null!==n?":"+n:""):"null"},Le=function(){return k(this).scheme+":"},Re=function(){return k(this).username},Ie=function(){return k(this).password},Ue=function(){var e=k(this),t=e.host,n=e.port;return null===t?"":null===n?W(t):W(t)+":"+n},Oe=function(){var e=k(this).host;return null===e?"":W(e)},_e=function(){var e=k(this).port;return null===e?"":String(e)},Me=function(){var e=k(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},ze=function(){var e=k(this).query;return e?"?"+e:""},Pe=function(){return k(this).searchParams},je=function(){var e=k(this).fragment;return e?"#"+e:""},De=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&s(Fe,{href:De(Te,(function(e){var t=k(this),n=String(e),r=Ae(t,n);if(r)throw TypeError(r);w(t.searchParams).updateSearchParams(t.query)})),origin:De(Ce),protocol:De(Le,(function(e){var t=k(this);Ae(t,String(e)+":",re)})),username:De(Re,(function(e){var t=k(this),n=h(String(e));if(!Z(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=$(n[r],Q)}})),password:De(Ie,(function(e){var t=k(this),n=h(String(e));if(!Z(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=$(n[r],Q)}})),host:De(Ue,(function(e){var t=k(this);t.cannotBeABaseURL||Ae(t,String(e),he)})),hostname:De(Oe,(function(e){var t=k(this);t.cannotBeABaseURL||Ae(t,String(e),de)})),port:De(_e,(function(e){var t=k(this);Z(t)||(""==(e=String(e))?t.port=null:Ae(t,e,ve))})),pathname:De(Me,(function(e){var t=k(this);t.cannotBeABaseURL||(t.path=[],Ae(t,e+"",be))})),search:De(ze,(function(e){var t=k(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",Ae(t,e,Ee)),w(t.searchParams).updateSearchParams(t.query)})),searchParams:De(Pe),hash:De(je,(function(e){var t=k(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",Ae(t,e,ke)):t.fragment=null}))}),l(Fe,"toJSON",(function(){return Te.call(this)}),{enumerable:!0}),l(Fe,"toString",(function(){return Te.call(this)}),{enumerable:!0}),b){var Ne=b.createObjectURL,Be=b.revokeObjectURL;Ne&&l(Se,"createObjectURL",(function(e){return Ne.apply(b,arguments)})),Be&&l(Se,"revokeObjectURL",(function(e){return Be.apply(b,arguments)}))}y(Se,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Se})}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";function e(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return u=e.done,e},e:function(e){s=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw a}}}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(r),n.d(r,{Dropzone:function(){return b},default:function(){return A}}),n(2222),n(7327),n(2772),n(6992),n(1249),n(7042),n(561),n(8264),n(8309),n(489),n(1539),n(4916),n(9714),n(8783),n(4723),n(5306),n(3123),n(3210),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(4747),n(3948),n(285);var o=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,r;return n=t,(r=[{key:"on",value:function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}},{key:"emit",value:function(t){this._callbacks=this._callbacks||{};for(var n=this._callbacks[t],r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(n){var a,u=e(n,!0);try{for(u.s();!(a=u.n()).done;){var s=a.value;s.apply(this,i)}}catch(e){u.e(e)}finally{u.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+t,{args:i})),this}},{key:"makeEvent",value:function(e,t){var n={bubbles:!0,cancelable:!0,detail:t};if("function"==typeof window.CustomEvent)return new CustomEvent(e,n);var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var r=0;r<n.length;r++){var i=n[r];if(i===t){n.splice(r,1);break}}return this}}])&&i(n.prototype,r),t}();function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(e,t,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept:function(e,t){return t()},chunksUploaded:function(e,t){t()},fallback:function(){var e;this.element.className="".concat(this.element.className," dz-browser-not-supported");var t,n=a(this.element.getElementsByTagName("div"),!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(/(^|)dz-message($|)/.test(r.className)){e=r,r.className="dz-message";break}}}catch(e){n.e(e)}finally{n.f()}e||(e=b.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e));var i=e.getElementsByTagName("span")[0];return i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,r){var i={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},o=e.width/e.height;null==t&&null==n?(t=i.srcWidth,n=i.srcHeight):null==t?t=n*o:null==n&&(n=t/o);var a=(t=Math.min(t,i.srcWidth))/(n=Math.min(n,i.srcHeight));if(i.srcWidth>t||i.srcHeight>n)if("crop"===r)o>a?(i.srcHeight=e.height,i.srcWidth=i.srcHeight*a):(i.srcWidth=e.width,i.srcHeight=i.srcWidth/a);else{if("contain"!==r)throw new Error("Unknown resizeMethod '".concat(r,"'"));o>a?n=t/o:t=n*o}return i.srcX=(e.width-i.srcWidth)/2,i.srcY=(e.height-i.srcHeight)/2,i.trgWidth=t,i.trgHeight=n,i},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:'<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path> </g> </g> </svg> </div> </div> ',drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var t=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){e.previewElement=b.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);var n,r=a(e.previewElement.querySelectorAll("[data-dz-name]"),!0);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.textContent=e.name}}catch(e){r.e(e)}finally{r.f()}var o,u=a(e.previewElement.querySelectorAll("[data-dz-size]"),!0);try{for(u.s();!(o=u.n()).done;)(i=o.value).innerHTML=this.filesize(e.size)}catch(e){u.e(e)}finally{u.f()}this.options.addRemoveLinks&&(e._removeLink=b.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),e.previewElement.appendChild(e._removeLink));var s,l=function(n){return n.preventDefault(),n.stopPropagation(),e.status===b.UPLOADING?b.confirm(t.options.dictCancelUploadConfirmation,(function(){return t.removeFile(e)})):t.options.dictRemoveFileConfirmation?b.confirm(t.options.dictRemoveFileConfirmation,(function(){return t.removeFile(e)})):t.removeFile(e)},c=a(e.previewElement.querySelectorAll("[data-dz-remove]"),!0);try{for(c.s();!(s=c.n()).done;)s.value.addEventListener("click",l)}catch(e){c.e(e)}finally{c.f()}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");var n,r=a(e.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.alt=e.name,i.src=t}}catch(e){r.e(e)}finally{r.f()}return setTimeout((function(){return e.previewElement.classList.add("dz-image-preview")}),1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"string"!=typeof t&&t.error&&(t=t.error);var n,r=a(e.previewElement.querySelectorAll("[data-dz-errormessage]"),!0);try{for(r.s();!(n=r.n()).done;)n.value.textContent=t}catch(e){r.e(e)}finally{r.f()}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,n){if(e.previewElement){var r,i=a(e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0);try{for(i.s();!(r=i.n()).done;){var o=r.value;"PROGRESS"===o.nodeName?o.value=t:o.style.width="".concat(t,"%")}}catch(e){i.e(e)}finally{i.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}};function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(i,e);var t,n,r=(t=i,n=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(e){return!1}}(),function(){var e,r=m(t);if(n){var i=m(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return y(this,e)});function i(e,t){var n,o,a;if(p(this,i),(n=r.call(this)).element=e,n.version=i.version,n.clickableElements=[],n.listeners=[],n.files=[],"string"==typeof n.element&&(n.element=document.querySelector(n.element)),!n.element||null==n.element.nodeType)throw new Error("Invalid dropzone element.");if(n.element.dropzone)throw new Error("Dropzone already attached.");i.instances.push(g(n)),n.element.dropzone=g(n);var u=null!=(a=i.optionsForElement(n.element))?a:{};if(n.options=i.extend({},s,u,null!=t?t:{}),n.options.previewTemplate=n.options.previewTemplate.replace(/\n*/g,""),n.options.forceFallback||!i.isBrowserSupported())return y(n,n.options.fallback.call(g(n)));if(null==n.options.url&&(n.options.url=n.element.getAttribute("action")),!n.options.url)throw new Error("No URL provided.");if(n.options.acceptedFiles&&n.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(n.options.uploadMultiple&&n.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return n.options.acceptedMimeTypes&&(n.options.acceptedFiles=n.options.acceptedMimeTypes,delete n.options.acceptedMimeTypes),null!=n.options.renameFilename&&(n.options.renameFile=function(e){return n.options.renameFilename.call(g(n),e.name,e)}),"string"==typeof n.options.method&&(n.options.method=n.options.method.toUpperCase()),(o=n.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),!1!==n.options.previewsContainer&&(n.options.previewsContainer?n.previewsContainer=i.getElement(n.options.previewsContainer,"previewsContainer"):n.previewsContainer=n.element),n.options.clickable&&(!0===n.options.clickable?n.clickableElements=[n.element]:n.clickableElements=i.getElements(n.options.clickable,"clickable")),n.init(),n}return d(i,[{key:"getAcceptedFiles",value:function(){return this.files.filter((function(e){return e.accepted})).map((function(e){return e}))}},{key:"getRejectedFiles",value:function(){return this.files.filter((function(e){return!e.accepted})).map((function(e){return e}))}},{key:"getFilesWithStatus",value:function(e){return this.files.filter((function(t){return t.status===e})).map((function(e){return e}))}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(i.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(i.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(i.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter((function(e){return e.status===i.UPLOADING||e.status===i.QUEUED})).map((function(e){return e}))}},{key:"init",value:function(){var e=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(i.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length&&function t(){e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.setAttribute("tabindex","-1"),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",i.getElement(e.options.hiddenInputContainer,"hiddenInputContainer").appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",(function(){var n=e.hiddenFileInput.files;if(n.length){var r,i=c(n,!0);try{for(i.s();!(r=i.n()).done;){var o=r.value;e.addFile(o)}}catch(e){i.e(e)}finally{i.f()}}e.emit("addedfiles",n),t()}))}(),this.URL=null!==window.URL?window.URL:window.webkitURL;var t,n=c(this.events,!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.on(r,this.options[r])}}catch(e){n.e(e)}finally{n.f()}this.on("uploadprogress",(function(){return e.updateTotalUploadProgress()})),this.on("removedfile",(function(){return e.updateTotalUploadProgress()})),this.on("canceled",(function(t){return e.emit("complete",t)})),this.on("complete",(function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout((function(){return e.emit("queuecomplete")}),0)}));var o=function(e){if(function(e){if(e.dataTransfer.types)for(var t=0;t<e.dataTransfer.types.length;t++)if("Files"===e.dataTransfer.types[t])return!0;return!1}(e))return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return o(t),e.emit("dragenter",t)},dragover:function(t){var n;try{n=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",o(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return o(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}],this.clickableElements.forEach((function(t){return e.listeners.push({element:t,events:{click:function(n){return(t!==e.element||n.target===e.element||i.elementInside(n.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})})),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,i.instances.splice(i.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e,t=0,n=0;if(this.getActiveFiles().length){var r,i=c(this.getActiveFiles(),!0);try{for(i.s();!(r=i.n()).done;){var o=r.value;t+=o.upload.bytesSent,n+=o.upload.total}}catch(e){i.e(e)}finally{i.f()}e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(e,"]"):"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e,t;if(e=this.getExistingFallback())return e;var n='<div class="dz-fallback">';this.options.dictFallbackText&&(n+="<p>".concat(this.options.dictFallbackText,"</p>")),n+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var r=i.createElement(n);return"FORM"!==this.element.tagName?(t=i.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>'))).appendChild(r):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:r}},{key:"getExistingFallback",value:function(){for(var e=function(e){var t,n=c(e,!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(/(^|)fallback($|)/.test(r.className))return r}}catch(e){n.e(e)}finally{n.f()}},t=0,n=["div","form"];t<n.length;t++){var r,i=n[t];if(r=e(this.element.getElementsByTagName(i)))return r}}},{key:"setupEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var n in e.events){var r=e.events[n];t.push(e.element.addEventListener(n,r,!1))}return t}()}))}},{key:"removeEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var n in e.events){var r=e.events[n];t.push(e.element.removeEventListener(n,r,!1))}return t}()}))}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach((function(e){return e.classList.remove("dz-clickable")})),this.removeEventListeners(),this.disabled=!0,this.files.map((function(t){return e.cancelUpload(t)}))}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach((function(e){return e.classList.add("dz-clickable")})),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,n="b";if(e>0){for(var r=["tb","gb","mb","kb","b"],i=0;i<r.length;i++){var o=r[i];if(e>=Math.pow(this.options.filesizeBase,4-i)/10){t=e/Math.pow(this.options.filesizeBase,4-i),n=o;break}}t=Math.round(10*t)/10}return"<strong>".concat(t,"</strong> ").concat(this.options.dictFileSizeUnits[n])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);for(var t=[],n=0;n<e.dataTransfer.files.length;n++)t[n]=e.dataTransfer.files[n];if(t.length){var r=e.dataTransfer.items;r&&r.length&&null!=r[0].webkitGetAsEntry?this._addFilesFromItems(r):this.handleFiles(t)}this.emit("addedfiles",t)}}},{key:"paste",value:function(e){if(null!=(null!=(t=null!=e?e.clipboardData:void 0)?function(e){return e.items}(t):void 0)){var t;this.emit("paste",e);var n=e.clipboardData.items;return n.length?this._addFilesFromItems(n):void 0}}},{key:"handleFiles",value:function(e){var t,n=c(e,!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.addFile(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"_addFilesFromItems",value:function(e){var t=this;return function(){var n,r=[],i=c(e,!0);try{for(i.s();!(n=i.n()).done;){var o,a=n.value;null!=a.webkitGetAsEntry&&(o=a.webkitGetAsEntry())?o.isFile?r.push(t.addFile(a.getAsFile())):o.isDirectory?r.push(t._addFilesFromDirectory(o,o.name)):r.push(void 0):null==a.getAsFile||null!=a.kind&&"file"!==a.kind?r.push(void 0):r.push(t.addFile(a.getAsFile()))}}catch(e){i.e(e)}finally{i.f()}return r}()}},{key:"_addFilesFromDirectory",value:function(e,t){var n=this,r=e.createReader(),i=function(e){return"log",n=function(t){return t.log(e)},null!=(t=console)&&"function"==typeof t.log?n(t):void 0;var t,n};return function e(){return r.readEntries((function(r){if(r.length>0){var i,o=c(r,!0);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.isFile?a.file((function(e){if(!n.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath="".concat(t,"/").concat(e.name),n.addFile(e)})):a.isDirectory&&n._addFilesFromDirectory(a,"".concat(t,"/").concat(a.name))}}catch(e){o.e(e)}finally{o.f()}e()}return null}),i)}()}},{key:"accept",value:function(e,t){this.options.maxFilesize&&e.size>1024*this.options.maxFilesize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):i.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var t=this;e.upload={uuid:i.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=i.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,(function(n){n?(e.accepted=!1,t._errorProcessing([e],n)):(e.accepted=!0,t.options.autoQueue&&t.enqueueFile(e)),t._updateMaxFilesReachedClass()}))}},{key:"enqueueFiles",value:function(e){var t,n=c(e,!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.enqueueFile(r)}}catch(e){n.e(e)}finally{n.f()}return null}},{key:"enqueueFile",value:function(e){var t=this;if(e.status!==i.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=i.QUEUED,this.options.autoProcessQueue)return setTimeout((function(){return t.processQueue()}),0)}},{key:"_enqueueThumbnail",value:function(e){var t=this;if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout((function(){return t._processThumbnailQueue()}),0)}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(function(n){return e.emit("thumbnail",t,n),e._processingThumbnail=!1,e._processThumbnailQueue()}))}}},{key:"removeFile",value:function(e){if(e.status===i.UPLOADING&&this.cancelUpload(e),this.files=x(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);var t,n=c(this.files.slice(),!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.status!==i.UPLOADING||e)&&this.removeFile(r)}}catch(e){n.e(e)}finally{n.f()}return null}},{key:"resizeImage",value:function(e,t,n,r,o){var a=this;return this.createThumbnail(e,t,n,r,!0,(function(t,n){if(null==n)return o(e);var r=a.options.resizeMimeType;null==r&&(r=e.type);var u=n.toDataURL(r,a.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(u=k.restore(e.dataURL,u)),o(i.dataURItoBlob(u))}))}},{key:"createThumbnail",value:function(e,t,n,r,i,o){var a=this,u=new FileReader;u.onload=function(){e.dataURL=u.result,"image/svg+xml"!==e.type?a.createThumbnailFromUrl(e,t,n,r,i,o):null!=o&&o(u.result)},u.readAsDataURL(e)}},{key:"displayExistingFile",value:function(e,t,n,r){var i=this,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.emit("addedfile",e),this.emit("complete",e),o){var a=function(t){i.emit("thumbnail",e,t),n&&n()};e.dataURL=t,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,a,r)}else this.emit("thumbnail",e,t),n&&n()}},{key:"createThumbnailFromUrl",value:function(e,t,n,r,i,o,a){var u=this,s=document.createElement("img");return a&&(s.crossOrigin=a),i="from-image"!=getComputedStyle(document.body).imageOrientation&&i,s.onload=function(){var a=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&i&&(a=function(e){return EXIF.getData(s,(function(){return e(EXIF.getTag(this,"Orientation"))}))}),a((function(i){e.width=s.width,e.height=s.height;var a=u.options.resize.call(u,e,t,n,r),l=document.createElement("canvas"),c=l.getContext("2d");switch(l.width=a.trgWidth,l.height=a.trgHeight,i>4&&(l.width=a.trgHeight,l.height=a.trgWidth),i){case 2:c.translate(l.width,0),c.scale(-1,1);break;case 3:c.translate(l.width,l.height),c.rotate(Math.PI);break;case 4:c.translate(0,l.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-l.width);break;case 7:c.rotate(.5*Math.PI),c.translate(l.height,-l.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-l.height,0)}E(c,s,null!=a.srcX?a.srcX:0,null!=a.srcY?a.srcY:0,a.srcWidth,a.srcHeight,null!=a.trgX?a.trgX:0,null!=a.trgY?a.trgY:0,a.trgWidth,a.trgHeight);var f=l.toDataURL("image/png");if(null!=o)return o(f,l)}))},null!=o&&(s.onerror=o),s.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,n=t;if(!(t>=e)){var r=this.getQueuedFiles();if(r.length>0){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,e-t));for(;n<e;){if(!r.length)return;this.processFile(r.shift()),n++}}}}},{key:"processFile",value:function(e){return this.processFiles([e])}},{key:"processFiles",value:function(e){var t,n=c(e,!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.processing=!0,r.status=i.UPLOADING,this.emit("processing",r)}}catch(e){n.e(e)}finally{n.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(e){return this.files.filter((function(t){return t.xhr===e})).map((function(e){return e}))}},{key:"cancelUpload",value:function(e){if(e.status===i.UPLOADING){var t,n=this._getFilesWithXhr(e.xhr),r=c(n,!0);try{for(r.s();!(t=r.n()).done;)t.value.status=i.CANCELED}catch(e){r.e(e)}finally{r.f()}void 0!==e.xhr&&e.xhr.abort();var o,a=c(n,!0);try{for(a.s();!(o=a.n()).done;){var u=o.value;this.emit("canceled",u)}}catch(e){a.e(e)}finally{a.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else e.status!==i.ADDED&&e.status!==i.QUEUED||(e.status=i.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(this,n)}return e}},{key:"uploadFile",value:function(e){return this.uploadFiles([e])}},{key:"uploadFiles",value:function(e){var t=this;this._transformFiles(e,(function(n){if(t.options.chunking){var r=n[0];e[0].upload.chunked=t.options.chunking&&(t.options.forceChunking||r.size>t.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(r.size/t.options.chunkSize)}if(e[0].upload.chunked){var o=e[0],a=n[0];o.upload.chunks=[];var u=function(){for(var n=0;void 0!==o.upload.chunks[n];)n++;if(!(n>=o.upload.totalChunkCount)){var r=n*t.options.chunkSize,u=Math.min(r+t.options.chunkSize,a.size),s={name:t._getParamName(0),data:a.webkitSlice?a.webkitSlice(r,u):a.slice(r,u),filename:o.upload.filename,chunkIndex:n};o.upload.chunks[n]={file:o,index:n,dataBlock:s,status:i.UPLOADING,progress:0,retries:0},t._uploadData(e,[s])}};if(o.upload.finishedChunkUpload=function(n,r){var a=!0;n.status=i.SUCCESS,n.dataBlock=null,n.xhr=null;for(var s=0;s<o.upload.totalChunkCount;s++){if(void 0===o.upload.chunks[s])return u();o.upload.chunks[s].status!==i.SUCCESS&&(a=!1)}a&&t.options.chunksUploaded(o,(function(){t._finished(e,r,null)}))},t.options.parallelChunkUploads)for(var s=0;s<o.upload.totalChunkCount;s++)u();else u()}else{for(var l=[],c=0;c<e.length;c++)l[c]={name:t._getParamName(c),data:n[c],filename:e[c].upload.filename};t._uploadData(e,l)}}))}},{key:"_getChunk",value:function(e,t){for(var n=0;n<e.upload.totalChunkCount;n++)if(void 0!==e.upload.chunks[n]&&e.upload.chunks[n].xhr===t)return e.upload.chunks[n]}},{key:"_uploadData",value:function(e,t){var n,r=this,o=new XMLHttpRequest,a=c(e,!0);try{for(a.s();!(n=a.n()).done;)n.value.xhr=o}catch(e){a.e(e)}finally{a.f()}e[0].upload.chunked&&(e[0].upload.chunks[t[0].chunkIndex].xhr=o);var u=this.resolveOption(this.options.method,e),s=this.resolveOption(this.options.url,e);o.open(u,s,!0),this.resolveOption(this.options.timeout,e)&&(o.timeout=this.resolveOption(this.options.timeout,e)),o.withCredentials=!!this.options.withCredentials,o.onload=function(t){r._finishedUploading(e,o,t)},o.ontimeout=function(){r._handleUploadError(e,o,"Request timedout after ".concat(r.options.timeout/1e3," seconds"))},o.onerror=function(){r._handleUploadError(e,o)},(null!=o.upload?o.upload:o).onprogress=function(t){return r._updateFilesUploadProgress(e,o,t)};var l={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var f in this.options.headers&&i.extend(l,this.options.headers),l){var p=l[f];p&&o.setRequestHeader(f,p)}var h=new FormData;if(this.options.params){var d=this.options.params;for(var v in"function"==typeof d&&(d=d.call(this,e,o,e[0].upload.chunked?this._getChunk(e[0],o):null)),d){var y=d[v];if(Array.isArray(y))for(var g=0;g<y.length;g++)h.append(v,y[g]);else h.append(v,y)}}var m,b=c(e,!0);try{for(b.s();!(m=b.n()).done;){var x=m.value;this.emit("sending",x,o,h)}}catch(e){b.e(e)}finally{b.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",e,o,h),this._addFormElementData(h);for(var w=0;w<t.length;w++){var E=t[w];h.append(E.name,E.data,E.filename)}this.submitRequest(o,h,e)}},{key:"_transformFiles",value:function(e,t){for(var n=this,r=[],i=0,o=function(o){n.options.transformFile.call(n,e[o],(function(n){r[o]=n,++i===e.length&&t(r)}))},a=0;a<e.length;a++)o(a)}},{key:"_addFormElementData",value:function(e){if("FORM"===this.element.tagName){var t,n=c(this.element.querySelectorAll("input, textarea, select, button"),!0);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.getAttribute("name"),o=r.getAttribute("type");if(o&&(o=o.toLowerCase()),null!=i)if("SELECT"===r.tagName&&r.hasAttribute("multiple")){var a,u=c(r.options,!0);try{for(u.s();!(a=u.n()).done;){var s=a.value;s.selected&&e.append(i,s.value)}}catch(e){u.e(e)}finally{u.f()}}else(!o||"checkbox"!==o&&"radio"!==o||r.checked)&&e.append(i,r.value)}}catch(e){n.e(e)}finally{n.f()}}}},{key:"_updateFilesUploadProgress",value:function(e,t,n){if(e[0].upload.chunked){var r=e[0],i=this._getChunk(r,t);n?(i.progress=100*n.loaded/n.total,i.total=n.total,i.bytesSent=n.loaded):(i.progress=100,i.bytesSent=i.total),r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var o=0;o<r.upload.totalChunkCount;o++)r.upload.chunks[o]&&void 0!==r.upload.chunks[o].progress&&(r.upload.progress+=r.upload.chunks[o].progress,r.upload.total+=r.upload.chunks[o].total,r.upload.bytesSent+=r.upload.chunks[o].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount,this.emit("uploadprogress",r,r.upload.progress,r.upload.bytesSent)}else{var a,u=c(e,!0);try{for(u.s();!(a=u.n()).done;){var s=a.value;s.upload.total&&s.upload.bytesSent&&s.upload.bytesSent==s.upload.total||(n?(s.upload.progress=100*n.loaded/n.total,s.upload.total=n.total,s.upload.bytesSent=n.loaded):(s.upload.progress=100,s.upload.bytesSent=s.upload.total),this.emit("uploadprogress",s,s.upload.progress,s.upload.bytesSent))}}catch(e){u.e(e)}finally{u.f()}}}},{key:"_finishedUploading",value:function(e,t,n){var r;if(e[0].status!==i.CANCELED&&4===t.readyState){if("arraybuffer"!==t.responseType&&"blob"!==t.responseType&&(r=t.responseText,t.getResponseHeader("content-type")&&~t.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(e){n=e,r="Invalid JSON response from server."}this._updateFilesUploadProgress(e,t),200<=t.status&&t.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],t),r):this._finished(e,r,n):this._handleUploadError(e,t,r)}}},{key:"_handleUploadError",value:function(e,t,n){if(e[0].status!==i.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(e[0],t);if(r.retries++<this.options.retryChunksLimit)return void this._uploadData(e,[r.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(e,n||this.options.dictResponseError.replace("{{statusCode}}",t.status),t)}}},{key:"submitRequest",value:function(e,t,n){1==e.readyState?e.send(t):console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.")}},{key:"_finished",value:function(e,t,n){var r,o=c(e,!0);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.status=i.SUCCESS,this.emit("success",a,t,n),this.emit("complete",a)}}catch(e){o.e(e)}finally{o.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,t,n),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,t,n){var r,o=c(e,!0);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.status=i.ERROR,this.emit("error",a,t,n),this.emit("complete",a)}}catch(e){o.e(e)}finally{o.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,t,n),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=o,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var u in a){var s=a[u];e[u]=s}}return e}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}}]),i}(o);b.initClass(),b.version="5.9.3",b.options={},b.optionsForElement=function(e){return e.getAttribute("id")?b.options[w(e.getAttribute("id"))]:void 0},b.instances=[],b.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},b.autoDiscover=!0,b.discover=function(){var e;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];var t=function(t){return function(){var n,r=[],i=c(t,!0);try{for(i.s();!(n=i.n()).done;){var o=n.value;/(^|)dropzone($|)/.test(o.className)?r.push(e.push(o)):r.push(void 0)}}catch(e){i.e(e)}finally{i.f()}return r}()};t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return function(){var t,n=[],r=c(e,!0);try{for(r.s();!(t=r.n()).done;){var i=t.value;!1!==b.optionsForElement(i)?n.push(new b(i)):n.push(void 0)}}catch(e){r.e(e)}finally{r.f()}return n}()},b.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],b.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){void 0!==b.blacklistedBrowsers&&(b.blockedBrowsers=b.blacklistedBrowsers);var t,n=c(b.blockedBrowsers,!0);try{for(n.s();!(t=n.n()).done;)t.value.test(navigator.userAgent)&&(e=!1)}catch(e){n.e(e)}finally{n.f()}}else e=!1;else e=!1;return e},b.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(t.length),i=new Uint8Array(r),o=0,a=t.length,u=0<=a;u?o<=a:o>=a;u?o++:o--)i[o]=t.charCodeAt(o);return new Blob([r],{type:n})};var x=function(e,t){return e.filter((function(e){return e!==t})).map((function(e){return e}))},w=function(e){return e.replace(/[\-_](\w)/g,(function(e){return e.charAt(1).toUpperCase()}))};b.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},b.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},b.getElement=function(e,t){var n;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector or a plain HTML element."));return n},b.getElements=function(e,t){var n,r;if(e instanceof Array){r=[];try{var i,o=c(e,!0);try{for(o.s();!(i=o.n()).done;)n=i.value,r.push(this.getElement(n,t))}catch(e){o.e(e)}finally{o.f()}}catch(e){r=null}}else if("string"==typeof e){r=[];var a,u=c(document.querySelectorAll(e),!0);try{for(u.s();!(a=u.n()).done;)n=a.value,r.push(n)}catch(e){u.e(e)}finally{u.f()}}else null!=e.nodeType&&(r=[e]);if(null==r||!r.length)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return r},b.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},b.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");var n,r=e.type,i=r.replace(/\/.*$/,""),o=c(t,!0);try{for(o.s();!(n=o.n()).done;){var a=n.value;if("."===(a=a.trim()).charAt(0)){if(-1!==e.name.toLowerCase().indexOf(a.toLowerCase(),e.name.length-a.length))return!0}else if(/\/\*$/.test(a)){if(i===a.replace(/\/.*$/,""))return!0}else if(r===a)return!0}}catch(e){o.e(e)}finally{o.f()}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each((function(){return new b(this,e)}))}),b.ADDED="added",b.QUEUED="queued",b.ACCEPTED=b.QUEUED,b.UPLOADING="uploading",b.PROCESSING=b.UPLOADING,b.CANCELED="canceled",b.ERROR="error",b.SUCCESS="success";var E=function(e,t,n,r,i,o,a,u,s,l){var c=function(e){e.naturalWidth;var t=e.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=t;var r=n.getContext("2d");r.drawImage(e,0,0);for(var i=r.getImageData(1,0,1,t).data,o=0,a=t,u=t;u>o;)0===i[4*(u-1)+3]?a=u:o=u,u=a+o>>1;var s=u/t;return 0===s?1:s}(t);return e.drawImage(t,n,r,i,o,a,u,s,l/c)},k=function(){function e(){p(this,e)}return d(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",n=void 0,r=void 0,i="",o=void 0,a=void 0,u=void 0,s="",l=0;o=(n=e[l++])>>2,a=(3&n)<<4|(r=e[l++])>>4,u=(15&r)<<2|(i=e[l++])>>6,s=63&i,isNaN(r)?u=s=64:isNaN(i)&&(s=64),t=t+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(u)+this.KEY_STR.charAt(s),n=r=i="",o=a=u=s="",l<e.length;);return t}},{key:"restore",value:function(e,t){if(!e.match("data:image/jpeg;base64,"))return t;var n=this.decode64(e.replace("data:image/jpeg;base64,","")),r=this.slice2Segments(n),i=this.exifManipulation(t,r);return"data:image/jpeg;base64,".concat(this.encode64(i))}},{key:"exifManipulation",value:function(e,t){var n=this.getExifArray(t),r=this.insertExif(e,n);return new Uint8Array(r)}},{key:"getExifArray",value:function(e){for(var t=void 0,n=0;n<e.length;){if(255===(t=e[n])[0]&225===t[1])return t;n++}return[]}},{key:"insertExif",value:function(e,t){var n=e.replace("data:image/jpeg;base64,",""),r=this.decode64(n),i=r.indexOf(255,3),o=r.slice(0,i),a=r.slice(i),u=o;return(u=u.concat(t)).concat(a)}},{key:"slice2Segments",value:function(e){for(var t=0,n=[];!(255===e[t]&218===e[t+1]);){if(255===e[t]&216===e[t+1])t+=2;else{var r=t+(256*e[t+2]+e[t+3])+2,i=e.slice(t,r);n.push(i),t=r}if(t>e.length)break}return n}},{key:"decode64",value:function(e){var t=void 0,n=void 0,r="",i=void 0,o=void 0,a="",u=0,s=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");t=this.KEY_STR.indexOf(e.charAt(u++))<<2|(i=this.KEY_STR.indexOf(e.charAt(u++)))>>4,n=(15&i)<<4|(o=this.KEY_STR.indexOf(e.charAt(u++)))>>2,r=(3&o)<<6|(a=this.KEY_STR.indexOf(e.charAt(u++))),s.push(t),64!==o&&s.push(n),64!==a&&s.push(r),t=n=r="",i=o=a="",u<e.length;);return s}}]),e}();k.initClass(),b._autoDiscoverFunction=function(){if(b.autoDiscover)return b.discover()},function(e,t){var n=!1,r=!0,i=e.document,o=i.documentElement,a=i.addEventListener?"addEventListener":"attachEvent",u=i.addEventListener?"removeEventListener":"detachEvent",s=i.addEventListener?"":"on",l=function r(o){if("readystatechange"!==o.type||"complete"===i.readyState)return("load"===o.type?e:i)[u](s+o.type,r,!1),!n&&(n=!0)?t.call(e,o.type||o):void 0};if("complete"!==i.readyState){if(i.createEventObject&&o.doScroll){try{r=!e.frameElement}catch(e){}r&&function e(){try{o.doScroll("left")}catch(t){return void setTimeout(e,50)}return l("poll")}()}i[a](s+"DOMContentLoaded",l,!1),i[a](s+"readystatechange",l,!1),e[a](s+"load",l,!1)}}(window,b._autoDiscoverFunction),window.Dropzone=b;var A=b}(),r}()}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).IMask={})}(this,(function(t){"use strict";function e(t){return"string"==typeof t||t instanceof String}function s(t){var e;return"object"==typeof t&&null!=t&&"Object"===(null==t||null==(e=t.constructor)?void 0:e.name)}function i(t,e){return Array.isArray(e)?i(t,((t,s)=>e.includes(s))):Object.entries(t).reduce(((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t}),{})}const a={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function u(t){switch(t){case a.LEFT:return a.FORCE_LEFT;case a.RIGHT:return a.FORCE_RIGHT;default:return t}}function n(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function r(t,e){if(e===t)return!0;const s=Array.isArray(e),i=Array.isArray(t);let a;if(s&&i){if(e.length!=t.length)return!1;for(a=0;a<e.length;a++)if(!r(e[a],t[a]))return!1;return!0}if(s!=i)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){const s=e instanceof Date,i=t instanceof Date;if(s&&i)return e.getTime()==t.getTime();if(s!=i)return!1;const u=e instanceof RegExp,n=t instanceof RegExp;if(u&&n)return e.toString()==t.toString();if(u!=n)return!1;const h=Object.keys(e);for(a=0;a<h.length;a++)if(!Object.prototype.hasOwnProperty.call(t,h[a]))return!1;for(a=0;a<h.length;a++)if(!r(t[h[a]],e[h[a]]))return!1;return!0}return!(!e||!t||"function"!=typeof e||"function"!=typeof t)&&e.toString()===t.toString()}class h{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?a.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?a.LEFT:a.RIGHT}}function o(t,e){return new o.InputMask(t,e)}function l(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?o.MaskedRegExp:e(t)?o.MaskedPattern:t===Date?o.MaskedDate:t===Number?o.MaskedNumber:Array.isArray(t)||t===Array?o.MaskedDynamic:o.Masked&&t.prototype instanceof o.Masked?t:o.Masked&&t instanceof o.Masked?t.constructor:t instanceof Function?o.MaskedFunction:(console.warn("Mask not found for mask",t),o.Masked)}function p(t){if(!t)throw new Error("Options in not defined");if(o.Masked){if(t.prototype instanceof o.Masked)return{mask:t};const{mask:e,...a}=t instanceof o.Masked?{mask:t}:s(t)&&t.mask instanceof o.Masked?t:{};if(e){const t=e.mask;return{...i(e,((t,e)=>!e.startsWith("_"))),mask:e.constructor,_mask:t,...a}}}return s(t)?{...t}:{mask:t}}function d(t){if(o.Masked&&t instanceof o.Masked)return t;const e=p(t),s=l(e.mask);if(!s)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}o.createMask=d;class c{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return null!=t?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return null!=t?t:this.value.length}select(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch{}}get isActive(){return!1}}o.MaskElement=c;class g extends c{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,e,s;return null!=(t=null==(e=(s=this.input).getRootNode)?void 0:e.call(s))?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){return this._handlers.redo&&(90===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)||89===t.keyCode&&t.ctrlKey)?(t.preventDefault(),this._handlers.redo(t)):this._handlers.undo&&90===t.keyCode&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),this._handlers.undo(t)):void(t.isComposing||this._handlers.selectionChange(t))}_onBeforeinput(t){return"historyUndo"===t.inputType&&this._handlers.undo?(t.preventDefault(),this._handlers.undo(t)):"historyRedo"===t.inputType&&this._handlers.redo?(t.preventDefault(),this._handlers.redo(t)):void 0}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}o.HTMLMaskElement=g;class k extends g{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}}o.HTMLMaskElement=g;class m extends g{get _unsafeSelectionStart(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,t),s.setEnd(this.input.lastChild||this.input,e);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}o.HTMLContenteditableMaskElement=m;class _{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>_.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}_.MAX_LENGTH=100;class f{constructor(t,e){this.el=t instanceof c?t:t.isContentEditable&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName?new m(t):new k(t),this.masked=d(e),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new _,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var e;return null==t||(null==(e=this.masked)?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof o.Masked)&&this.masked.constructor===l(t))return void this.masked.updateOptions({mask:t});const e=t instanceof o.Masked?t:d({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,e){const s=this._listeners[t];s&&s.forEach((t=>t(e)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const e=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,u=this.unmaskedValue!==e||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=e,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),"auto"===t?this.alignCursor():null!=t&&(this.cursorPos=t),u&&this._fireChangeEvents(),this._historyChanging||!u&&!this.history.isEmpty||this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:e,...s}=t,i=!this.maskEquals(e),a=this.masked.optionsIsChanged(s);i&&(this.mask=e),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,a.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}off(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;const s=this._listeners[t].indexOf(e);return s>=0&&this._listeners[t].splice(s,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const e=new h({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:!0,raw:!0}).offset,u=s===this.masked.rawInputValue?e.removeDirection:a.NONE;let n=this.masked.nearestInputPos(e.startChangePos+i,u);u!==a.NONE&&(n=this.masked.nearestInputPos(n,a.NONE)),this.updateControl(n),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}o.InputMask=f;class v{static normalize(t){return Array.isArray(t)?t:[t,new v]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}o.ChangeDetails=v;class E{constructor(t,e,s){void 0===t&&(t=""),void 0===e&&(e=0),this.value=t,this.from=e,this.stop=s}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||null!=t&&this.from>=t)return"";const e=this.value[0];return this.value=this.value.slice(1),e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class C{constructor(t){this._value="",this._update({...C.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,e){void 0===e&&(e={input:!0}),this.reset(),this.append(t,e,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),Math.min(this.displayValue.length,e-t)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this.displayValue.slice(t,e)}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new E(this.extractInput(t,e),t)}appendTail(t){return e(t)&&(t=new E(String(t))),t.appendTo(this)}_appendCharRaw(t,e){return t?(this._value+=t,new v({inserted:t,rawInserted:t})):new v}_appendChar(t,e,s){void 0===e&&(e={});const i=this.state;let a;if([t,a]=this.doPrepareChar(t,e),t&&(a=a.aggregate(this._appendCharRaw(t,e)),!a.rawInserted&&"pad"===this.autofix)){const s=this.state;this.state=i;let u=this.pad(e);const n=this._appendCharRaw(t,e);u=u.aggregate(n),n.rawInserted||u.equals(a)?a=u:this.state=s}if(a.inserted){let t,u=!1!==this.doValidate(e);if(u&&null!=s){const e=this.state;if(!0===this.overwrite){t=s.state;for(let t=0;t<a.rawInserted.length;++t)s.unshift(this.displayValue.length-a.tailShift)}let i=this.appendTail(s);if(u=i.rawInserted.length===s.toString().length,!(u&&i.inserted||"shift"!==this.overwrite)){this.state=e,t=s.state;for(let t=0;t<a.rawInserted.length;++t)s.shift();i=this.appendTail(s),u=i.rawInserted.length===s.toString().length}u&&i.inserted&&(this.state=e)}u||(a=new v,this.state=i,s&&t&&(s.state=t))}return a}_appendPlaceholder(){return new v}_appendEager(){return new v}append(t,s,i){if(!e(t))throw new Error("value should be string");const a=e(i)?new E(String(i)):i;let u;null!=s&&s.tail&&(s._beforeTailState=this.state),[t,u]=this.doPrepare(t,s);for(let e=0;e<t.length;++e){const i=this._appendChar(t[e],s,a);if(!i.rawInserted&&!this.doSkipInvalid(t[e],s,a))break;u.aggregate(i)}return(!0===this.eager||"append"===this.eager)&&null!=s&&s.input&&t&&u.aggregate(this._appendEager()),null!=a&&(u.tailShift+=this.appendTail(a).tailShift),u}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e),new v}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const e=this.rawInputValue,s=this.value,i=t();return this.rawInputValue=e,this.value&&this.value!==s&&0===s.indexOf(this.value)&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const e=this.state,s=t(this);return this.state=e,delete this._isolated,s}doSkipInvalid(t,e,s){return Boolean(this.skipInvalid)}doPrepare(t,e){return void 0===e&&(e={}),v.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){return void 0===e&&(e={}),v.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,e,s,i,n){void 0===s&&(s=""),void 0===i&&(i=a.NONE),void 0===n&&(n={input:!0});const r=t+e,h=this.extractTail(r),o=!0===this.eager||"remove"===this.eager;let l;o&&(i=u(i),l=this.extractInput(0,r,{raw:!0}));let p=t;const d=new v;if(i!==a.NONE&&(p=this.nearestInputPos(t,e>1&&0!==t&&!o?a.NONE:i),d.tailShift=p-t),d.aggregate(this.remove(p)),o&&i!==a.NONE&&l===this.rawInputValue)if(i===a.FORCE_LEFT){let t;for(;l===this.rawInputValue&&(t=this.displayValue.length);)d.aggregate(new v({tailShift:-1})).aggregate(this.remove(t-1))}else i===a.FORCE_RIGHT&&h.unshift();return d.aggregate(this.append(s,n,h))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!r(this,t)}typedValueEquals(t){const e=this.typedValue;return t===e||C.EMPTY_VALUES.includes(t)&&C.EMPTY_VALUES.includes(e)||!!this.format&&this.format(t,this)===this.format(this.typedValue,this)}pad(t){return new v}}C.DEFAULTS={skipInvalid:!0},C.EMPTY_VALUES=[void 0,null,""],o.Masked=C;class A{constructor(t,e){void 0===t&&(t=[]),void 0===e&&(e=0),this.chunks=t,this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=e(t)?new E(String(t)):t;const s=this.chunks[this.chunks.length-1],i=s&&(s.stop===t.stop||null==t.stop)&&t.from===s.from+s.toString().length;if(t instanceof E)i?s.extend(t.toString()):this.chunks.push(t);else if(t instanceof A){if(null==t.stop){let e;for(;t.chunks.length&&null==t.chunks[0].stop;)e=t.chunks.shift(),e.from+=t.from,this.extend(e)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof o.MaskedPattern)){return new E(this.toString()).appendTo(t)}const e=new v;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=t._mapPosToBlock(t.displayValue.length),u=i.stop;let n;if(null!=u&&(!a||a.index<=u)&&((i instanceof A||t._stops.indexOf(u)>=0)&&e.aggregate(t._appendPlaceholder(u)),n=i instanceof A&&t._blocks[u]),n){const s=n.appendTail(i);e.aggregate(s);const a=i.toString().slice(s.rawInserted.length);a&&e.aggregate(t.append(a,{tail:!0}))}else e.aggregate(t.append(i.toString(),{tail:!0}))}return e}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...s}=t;Object.assign(this,s),this.chunks=e.map((t=>{const e="chunks"in t?new A:new E;return e.state=t,e}))}unshift(t){if(!this.chunks.length||null!=t&&this.from>=t)return"";const e=null!=t?t-this.from:t;let s=0;for(;s<this.chunks.length;){const t=this.chunks[s],i=t.unshift(e);if(t.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const e=this.chunks[t],s=e.shift();if(e.toString()){if(!s)break;--t}else this.chunks.splice(t,1);if(s)return s}return""}}class F{constructor(t,e){this.masked=t,this._log=[];const{offset:s,index:i}=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(e=this.block)?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,a.FORCE_LEFT),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,a.LEFT),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,a.LEFT),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,a.FORCE_RIGHT),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,a.NONE),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,a.NONE),!0}))}}class x{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new v}nearestInputPos(t,e){void 0===e&&(e=a.NONE);const s=this._value.length;switch(e){case a.LEFT:case a.FORCE_LEFT:return 0;default:return s}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._isRawInput?e-t:0}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),void 0===s&&(s={}),s.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new v;const s=!0===this.eager||"append"===this.eager,i=this.char===t&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!s)&&!e.tail,a=new v({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(e.raw||e.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new v;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new E("")}appendTail(t){return e(t)&&(t=new E(String(t))),t.appendTo(this)}append(t,e,s){const i=this._appendChar(t[0],e);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class S{constructor(t){const{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:u,eager:n,...r}=t;this.masked=d(r),Object.assign(this,{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:u,eager:n})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),0===t&&e>=1?(this.isFilled=!1,this.masked.remove(t,e)):new v}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new v;const s=this.masked.state;let i=this.masked._appendChar(t,this.currentMaskFlags(e));return i.inserted&&!1===this.doValidate(e)&&(i=new v,this.masked.state=s),i.inserted||this.isOptional||this.lazy||e.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(t,e,s){return this.masked.append(t,this.currentMaskFlags(e),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new v:(this.isFilled=!0,new v({inserted:this.placeholderChar}))}_appendEager(){return new v}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.masked.extractInput(t,e,s)}nearestInputPos(t,e){void 0===e&&(e=a.NONE);const s=this.value.length,i=Math.min(Math.max(t,0),s);switch(e){case a.LEFT:case a.FORCE_LEFT:return this.isComplete?i:0;case a.RIGHT:case a.FORCE_RIGHT:return this.isComplete?i:s;default:return i}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(null==t||null==(e=t._beforeTailState)?void 0:e.masked)||(null==t?void 0:t._beforeTailState)}}pad(t){return new v}}S.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class B extends C{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;e&&(t.validate=t=>t.search(e)>=0),super._update(t)}}o.MaskedRegExp=B;class b extends C{constructor(t){super({...b.DEFAULTS,...t,definitions:Object.assign({},S.DEFAULT_DEFINITIONS,null==t?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let s=!1,i=!1;for(let a=0;a<e.length;++a){if(this.blocks){const t=e.slice(a),s=Object.keys(this.blocks).filter((e=>0===t.indexOf(e)));s.sort(((t,e)=>e.length-t.length));const i=s[0];if(i){const{expose:t,repeat:e,...s}=p(this.blocks[i]),u={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...s,repeat:e,parent:this},n=null!=e?new o.RepeatBlock(u):d(u);n&&(this._blocks.push(n),t&&(this.exposeBlock=n),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),a+=i.length-1;continue}}let u=e[a],n=u in t;if(u===b.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===u||"}"===u){s=!s;continue}if("["===u||"]"===u){i=!i;continue}if(u===b.ESCAPE_CHAR){if(++a,u=e[a],!u)break;n=!1}const r=n?new S({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...p(t[u]),parent:this}):new x({char:u,eager:this.eager,isUnmasking:s});this._blocks.push(r)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t)return void this.reset();const{_blocks:e,...s}=t;this._blocks.forEach(((t,s)=>t.state=e[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,e)=>t+e.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(e),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,e)=>t+e.value),"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(e),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(e),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,e)=>t+e.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new v;let s=null==(t=this._mapPosToBlock(this.displayValue.length))?void 0:t.index;if(null==s)return e;this._blocks[s].isFilled&&++s;for(let t=s;t<this._blocks.length;++t){const s=this._blocks[t]._appendEager();if(!s.inserted)break;e.aggregate(s)}return e}_appendCharRaw(t,e){void 0===e&&(e={});const s=this._mapPosToBlock(this.displayValue.length),i=new v;if(!s)return i;for(let u,n=s.index;u=this._blocks[n];++n){var a;const s=u._appendChar(t,{...e,_beforeTailState:null==(a=e._beforeTailState)||null==(a=a._blocks)?void 0:a[n]});if(i.aggregate(s),s.consumed)break}return i}extractTail(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=new A;return t===e||this._forEachBlocksInRange(t,e,((t,e,i,a)=>{const u=t.extractTail(i,a);u.stop=this._findStopBefore(e),u.from=this._blockStartPos(e),u instanceof A&&(u.blockIndex=e),s.extend(u)})),s}extractInput(t,e,s){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),void 0===s&&(s={}),t===e)return"";let i="";return this._forEachBlocksInRange(t,e,((t,e,a,u)=>{i+=t.extractInput(a,u,s)})),i}_findStopBefore(t){let e;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=t))break;e=i}return e}_appendPlaceholder(t){const e=new v;if(this.lazy&&null==t)return e;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return e;const i=s.index,a=null!=t?t:this._blocks.length;return this._blocks.slice(i,a).forEach((s=>{var i;s.lazy&&null==t||e.aggregate(s._appendPlaceholder(null==(i=s._blocks)?void 0:i.length))})),e}_mapPosToBlock(t){let e="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=e.length;if(e+=i.displayValue,t<=e.length)return{index:s,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,e)=>t+e.displayValue.length),0)}_forEachBlocksInRange(t,e,s){void 0===e&&(e=this.displayValue.length);const i=this._mapPosToBlock(t);if(i){const t=this._mapPosToBlock(e),a=t&&i.index===t.index,u=i.offset,n=t&&a?t.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,u,n),t&&!a){for(let e=i.index+1;e<t.index;++e)s(this._blocks[e],e,0,this._blocks[e].displayValue.length);s(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=super.remove(t,e);return this._forEachBlocksInRange(t,e,((t,e,i,a)=>{s.aggregate(t.remove(i,a))})),s}nearestInputPos(t,e){if(void 0===e&&(e=a.NONE),!this._blocks.length)return 0;const s=new F(this,t);if(e===a.NONE)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(e===a.LEFT||e===a.FORCE_LEFT){if(e===a.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===t)return t;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),e===a.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=t)return s.pos;if(s.popState(),s.ok&&s.pos<=t)return s.pos;s.popState()}return s.ok?s.pos:e===a.FORCE_LEFT?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return e===a.RIGHT||e===a.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:e===a.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(t,a.LEFT)))):t}totalInputPositions(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);let s=0;return this._forEachBlocksInRange(t,e,((t,e,i,a)=>{s+=t.totalInputPositions(i,a)})),s}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];return e?e.map((t=>this._blocks[t])):[]}pad(t){const e=new v;return this._forEachBlocksInRange(0,this.displayValue.length,(s=>e.aggregate(s.pad(t)))),e}}b.DEFAULTS={...C.DEFAULTS,lazy:!0,placeholderChar:"_"},b.STOP_CHAR="`",b.ESCAPE_CHAR="\\",b.InputDefinition=S,b.FixedDefinition=x,o.MaskedPattern=b;class D extends b{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...u}=t;this.to=e,this.from=s,this.maxLength=Math.max(String(e).length,i),this.autofix=a;const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<r.length&&r[h]===n[h];)++h;u.mask=r.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(u)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let e="",s="";const[,i,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(e="0".repeat(i.length)+a,s="9".repeat(i.length)+a),e=e.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[e,s]}doPrepareChar(t,e){let s;return void 0===e&&(e={}),[t,s]=super.doPrepareChar(t.replace(/\D/g,""),e),t||(s.skip=!this.isComplete),[t,s]}_appendCharRaw(t,e){if(void 0===e&&(e={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,e);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,u]=this.boundaries(this.value+t);return Number(u)<this.from?super._appendCharRaw(s[this.value.length],e):Number(a)>this.to?!e.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],e).aggregate(this._appendCharRaw(t,e)):super._appendCharRaw(i[this.value.length],e):super._appendCharRaw(t,e)}doValidate(t){const e=this.value;if(-1===e.search(/[^0]/)&&e.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(e);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(t)}pad(t){const e=new v;if(this.value.length===this.maxLength)return e;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let s=0;s<i;++s)e.aggregate(super._appendCharRaw("0",t));s.split("").forEach((t=>this._appendCharRaw(t)))}return e}}o.MaskedRange=D;class y extends b{static extractPatternOptions(t){const{mask:s,pattern:i,...a}=t;return{...a,mask:e(s)?s:i}}constructor(t){super(y.extractPatternOptions({...y.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:s,pattern:i,blocks:a,...u}={...y.DEFAULTS,...t},n=Object.assign({},y.GET_DEFAULT_BLOCKS());t.min&&(n.Y.from=t.min.getFullYear()),t.max&&(n.Y.to=t.max.getFullYear()),t.min&&t.max&&n.Y.from===n.Y.to&&(n.m.from=t.min.getMonth()+1,n.m.to=t.max.getMonth()+1,n.m.from===n.m.to&&(n.d.from=t.min.getDate(),n.d.to=t.max.getDate())),Object.assign(n,this.blocks,a),super._update({...u,mask:e(s)?s:i,blocks:n})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(y.extractPatternOptions(t))}}y.GET_DEFAULT_BLOCKS=()=>({d:{mask:D,from:1,to:31,maxLength:2},m:{mask:D,from:1,to:12,maxLength:2},Y:{mask:D,from:1900,to:9999}}),y.DEFAULTS={...b.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";return[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join(".")},parse:(t,e)=>{const[s,i,a]=t.split(".").map(Number);return new Date(a,i-1,s)}},o.MaskedDate=y;class M extends C{constructor(t){super({...M.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:e,...s}=p(t),i=d({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return e&&(this.exposeMask=i),i})):[])}_appendCharRaw(t,e){void 0===e&&(e={});const s=this._applyDispatch(t,e);return this.currentMask&&s.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e))),s}_applyDispatch(t,e,s){void 0===t&&(t=""),void 0===e&&(e={}),void 0===s&&(s="");const i=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,a=this.rawInputValue,u=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:a,n=a.slice(u.length),r=this.currentMask,h=new v,o=null==r?void 0:r.state;return this.currentMask=this.doDispatch(t,{...e},s),this.currentMask&&(this.currentMask!==r?(this.currentMask.reset(),u&&(this.currentMask.append(u,{raw:!0}),h.tailShift=this.currentMask.value.length-i.length),n&&(h.tailShift+=this.currentMask.append(n,{raw:!0,tail:!0}).tailShift)):o&&(this.currentMask.state=o)),h}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const e=new v;return t&&e.aggregate(this._applyDispatch("",{},t)),e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,s;return{...t,_beforeTailState:(null==(e=t._beforeTailState)?void 0:e.currentMaskRef)===this.currentMask&&(null==(s=t._beforeTailState)?void 0:s.currentMask)||t._beforeTailState}}doDispatch(t,e,s){return void 0===e&&(e={}),void 0===s&&(s=""),this.dispatch(t,this,e,s)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){void 0===e&&(e={});let[s,i]=super.doPrepare(t,e);if(this.currentMask){let t;[s,t]=super.doPrepare(s,this.currentMaskFlags(e)),i=i.aggregate(t)}return[s,i]}doPrepareChar(t,e){void 0===e&&(e={});let[s,i]=super.doPrepareChar(t,e);if(this.currentMask){let t;[s,t]=super.doPrepareChar(s,this.currentMaskFlags(e)),i=i.aggregate(t)}return[s,i]}reset(){var t;null==(t=this.currentMask)||t.reset(),this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask)return this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,void this._applyDispatch();let e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isComplete)}get isFilled(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isFilled)}remove(t,e){const s=new v;return this.currentMask&&s.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch()),s}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:null==(t=this.currentMask)?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:s,currentMask:i,...a}=t;e&&this.compiledMasks.forEach(((t,s)=>t.state=e[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(t,e,s){return this.currentMask?this.currentMask.extractInput(t,e,s):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((e,s)=>{if(!t[s])return;const{mask:i,...a}=t[s];return r(e,a)&&e.maskEquals(i)})):super.maskEquals(t)}typedValueEquals(t){var e;return Boolean(null==(e=this.currentMask)?void 0:e.typedValueEquals(t))}}M.DEFAULTS={...C.DEFAULTS,dispatch:(t,e,s,i)=>{if(!e.compiledMasks.length)return;const u=e.rawInputValue,n=e.compiledMasks.map(((n,r)=>{const h=e.currentMask===n,o=h?n.displayValue.length:n.nearestInputPos(n.displayValue.length,a.FORCE_LEFT);return n.rawInputValue!==u?(n.reset(),n.append(u,{raw:!0})):h||n.remove(o),n.append(t,e.currentMaskFlags(s)),n.appendTail(i),{index:r,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(o,n.nearestInputPos(n.displayValue.length,a.FORCE_LEFT)))}}));return n.sort(((t,e)=>e.weight-t.weight||e.totalInputPositions-t.totalInputPositions)),e.compiledMasks[n[0].index]}},o.MaskedDynamic=M;class I extends b{constructor(t){super({...I.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...s}=t;if(e){const t=e.map((t=>t.length)),i=Math.min(...t),a=Math.max(...t)-i;s.mask="*".repeat(i),a&&(s.mask+="["+"*".repeat(a)+"]"),this.enum=e}super._update(s)}_appendCharRaw(t,e){void 0===e&&(e={});const s=Math.min(this.nearestInputPos(0,a.FORCE_RIGHT),this.value.length),i=this.enum.filter((e=>this.matchValue(e,this.unmaskedValue+t,s)));if(i.length){1===i.length&&this._forEachBlocksInRange(0,this.value.length,((t,s)=>{const a=i[0][s];s>=this.value.length||a===t.value||(t.reset(),t._appendChar(a,e))}));const t=super._appendCharRaw(i[0][this.value.length],e);return 1===i.length&&i[0].slice(this.unmaskedValue.length).split("").forEach((e=>t.aggregate(super._appendCharRaw(e)))),t}return new v({skip:!this.isComplete})}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new E("",t)}remove(t,e){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),t===e)return new v;const s=Math.min(super.nearestInputPos(0,a.FORCE_RIGHT),this.value.length);let i;for(i=t;i>=0;--i){if(this.enum.filter((t=>this.matchValue(t,this.value.slice(s,i),s))).length>1)break}const u=super.remove(i,e);return u.tailShift+=i-t,u}get isComplete(){return this.enum.indexOf(this.value)>=0}}I.DEFAULTS={...b.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s},o.MaskedEnum=I;class V extends C{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}var T;o.MaskedFunction=V;class w extends C{constructor(t){super({...w.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+n(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(n).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(n(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}doPrepareChar(t,e){void 0===e&&(e={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);return t&&!s&&(i.skip=!0),!s||this.allowPositive||this.value||"-"===s||i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(t,e){void 0===e&&(e=!1);let s=0;for(let i=0;i<t;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,e&&(t+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(t){return void 0===t&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e),this._removeThousandsSeparators(super.extractInput(t,e,s))}_appendCharRaw(t,e){void 0===e&&(e={});const s=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=t;const u=this.number;let n,r=!isNaN(u),h=!1;if(r){let t;null!=this.min&&this.min<0&&this.number<this.min&&(t=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(t=this.max),null!=t&&(this.autofix?(this._value=this.format(t,this).replace(w.UNMASKED_RADIX,this.radix),h||(h=a===this._value&&!e.tail)):r=!1),r&&(r=Boolean(this._value.match(this._numberRegExp)))}r?n=new v({inserted:this._value.slice(a.length),rawInserted:h?"":t,skip:h}):(this._value=a,n=new v),this._value=this._insertThousandsSeparators(this._value);const o=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(o);return n.tailShift+=(l-i)*this.thousandsSeparator.length,n}_findSeparatorAround(t){if(this.thousandsSeparator){const e=t-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,e);if(s<=t)return s}return-1}_adjustRangeWithSeparators(t,e){const s=this._findSeparatorAround(t);s>=0&&(t=s);const i=this._findSeparatorAround(e);return i>=0&&(e=i+this.thousandsSeparator.length),[t,e]}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e);const s=this.value.slice(0,t),i=this.value.slice(e),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const u=this._separatorsCountFromSlice(s);return new v({tailShift:(u-a)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case a.NONE:case a.LEFT:case a.FORCE_LEFT:{const s=this._findSeparatorAround(t-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(t<i||this.value.length<=i||e===a.FORCE_LEFT)return s}break}case a.RIGHT:case a.FORCE_RIGHT:{const e=this._findSeparatorAround(t);if(e>=0)return e+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=this.format(e,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(t){const e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,((t,e,s,i)=>e+i)),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}doSkipInvalid(t,e,s){void 0===e&&(e={});const i=0===this.scale&&t!==this.thousandsSeparator&&(t===this.radix||t===w.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,w.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(w.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||w.EMPTY_VALUES.includes(t)&&w.EMPTY_VALUES.includes(this.typedValue))&&!(0===t&&""===this.value)}}T=w,w.UNMASKED_RADIX=".",w.EMPTY_VALUES=[...C.EMPTY_VALUES,0],w.DEFAULTS={...C.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[T.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},o.MaskedNumber=w;const R={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function P(t,e,s){void 0===e&&(e=R.MASKED),void 0===s&&(s=R.MASKED);const i=d(t);return t=>i.runIsolated((i=>(i[e]=t,i[s])))}function O(t,e,s,i){return P(e,s,i)(t)}o.PIPE_TYPE=R,o.createPipe=P,o.pipe=O;class L extends b{get repeatFrom(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?t:0}get repeatTo(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var e,s,i;const{repeat:a,...u}=p(t);this._blockOpts=Object.assign({},this._blockOpts,u);const n=d(this._blockOpts);this.repeat=null!=(e=null!=(s=null!=a?a:n.repeat)?s:this.repeat)?e:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(i=this._blocks)?void 0:i.length)||0,this.repeatFrom)),blocks:{m:n},eager:n.eager,overwrite:n.overwrite,skipInvalid:n.skipInvalid,lazy:n.lazy,placeholderChar:n.placeholderChar,displayChar:n.displayChar})}_allocateBlock(t){return t<this._blocks.length?this._blocks[t]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(d(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(t,e){void 0===e&&(e={});const s=new v;for(let r,h,o=null!=(i=null==(a=this._mapPosToBlock(this.displayValue.length))?void 0:a.index)?i:Math.max(this._blocks.length-1,0);r=null!=(u=this._blocks[o])?u:h=!h&&this._allocateBlock(o);++o){var i,a,u,n;const l=r._appendChar(t,{...e,_beforeTailState:null==(n=e._beforeTailState)||null==(n=n._blocks)?void 0:n[o]});if(l.skip&&h){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(l),l.consumed)break}return s}_trimEmptyTail(t,e){var s,i;void 0===t&&(t=0);const a=Math.max((null==(s=this._mapPosToBlock(t))?void 0:s.index)||0,this.repeatFrom,0);let u;null!=e&&(u=null==(i=this._mapPosToBlock(e))?void 0:i.index),null==u&&(u=this._blocks.length-1);let n=0;for(let t=u;a<=t&&!this._blocks[t].unmaskedValue;--t,++n);n&&(this._blocks.splice(u-n+1,n),this.mask=this.mask.slice(n))}reset(){super.reset(),this._trimEmptyTail()}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=super.remove(t,e);return this._trimEmptyTail(t,e),s}totalInputPositions(t,e){return void 0===t&&(t=0),null==e&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,e)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}o.RepeatBlock=L;try{globalThis.IMask=o}catch{}t.ChangeDetails=v,t.ChunksTailDetails=A,t.DIRECTION=a,t.HTMLContenteditableMaskElement=m,t.HTMLInputMaskElement=k,t.HTMLMaskElement=g,t.InputMask=f,t.MaskElement=c,t.Masked=C,t.MaskedDate=y,t.MaskedDynamic=M,t.MaskedEnum=I,t.MaskedFunction=V,t.MaskedNumber=w,t.MaskedPattern=b,t.MaskedRange=D,t.MaskedRegExp=B,t.PIPE_TYPE=R,t.PatternFixedDefinition=x,t.PatternInputDefinition=S,t.RepeatBlock=L,t.createMask=d,t.createPipe=P,t.default=o,t.forceDirection=u,t.normalizeOpts=p,t.pipe=O,Object.defineProperty(t,"__esModule",{value:!0})}));
(function(factory){
if(typeof module==='object'&&module.exports){
module.exports=factory();
}else{
window.intlTelInput=factory();
}}(()=> {
var factoryOutput=(()=>{var U=Object.defineProperty;var ht=Object.getOwnPropertyDescriptor;var pt=Object.getOwnPropertyNames;var Ct=Object.prototype.hasOwnProperty;var mt=(r,t)=>{for(var e in t)U(r,e,{get:t[e],enumerable:!0})},yt=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of pt(t))!Ct.call(r,n)&&n!==e&&U(r,n,{get:()=>t[n],enumerable:!(i=ht(t,n))||i.enumerable});return r};var ft=r=>yt(U({},"__esModule",{value:!0}),r);var At={};mt(At,{Iti:()=>k,default:()=>wt});var gt=[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]],j=[];for(let r of gt)j.push({name:"",iso2:r[0],dialCode:r[1],priority:r[2]||0,areaCodes:r[3]||null,nodeById:{},nationalPrefix:r[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var L=j;var It={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"\xC5land Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barth\xE9lemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"C\xF4te d\u2019Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Cura\xE7ao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"R\xE9union",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"S\xE3o Tom\xE9 & Pr\xEDncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe"},Y=It;var bt={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},q=bt;var vt={...Y,...q},B=vt;var w={OPEN_COUNTRY_DROPDOWN:"open:countrydropdown",CLOSE_COUNTRY_DROPDOWN:"close:countrydropdown",COUNTRY_CHANGE:"countrychange",INPUT:"input"},h={HIDE:"iti__hide",V_HIDE:"iti__v-hide",ARROW_UP:"iti__arrow--up",GLOBE:"iti__globe",FLAG:"iti__flag",COUNTRY_ITEM:"iti__country",HIGHLIGHT:"iti__highlight"},y={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},W={PASTE:"insertFromPaste",DELETE_FWD:"deleteContentForward"},N={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},X={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},F={UNKNOWN_NUMBER_TYPE:-99,UNKNOWN_VALIDATION_ERROR:-99},P={SANE_SELECTED_WITH_DIAL_WIDTH:78,SANE_SELECTED_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6},M={PLUS:"+",NANP:"1"},O={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},J={ISO2:"us",DIAL_CODE:"1"},A={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},x={AUTO:"auto"},$={COUNTRY_CODE:"countryCode",DIAL_CODE:"dialCode"},p={EXPANDED:"aria-expanded",LABEL:"aria-label",SELECTED:"aria-selected",ACTIVE_DESCENDANT:"aria-activedescendant",HASPOPUP:"aria-haspopup",CONTROLS:"aria-controls",HIDDEN:"aria-hidden",AUTOCOMPLETE:"aria-autocomplete",MODAL:"aria-modal"};var G=r=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(r).matches,Et=()=>{if(typeof navigator<"u"&&typeof window<"u"){let r=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=G("(max-width: 500px)"),e=G("(max-height: 600px)"),i=G("(pointer: coarse)");return r||t||i&&e}return!1},K={allowPhonewords:!1,allowDropdown:!0,autoPlaceholder:A.POLITE,containerClass:"",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:!0,separateDialCode:!1,strictMode:!1,useFullscreenPopup:Et(),validationNumberTypes:["MOBILE"]},Q=(r,t)=>{r.useFullscreenPopup&&(r.fixDropdownWidth=!1),r.onlyCountries.length===1&&(r.initialCountry=r.onlyCountries[0]),r.separateDialCode&&(r.nationalMode=!1),r.allowDropdown&&!r.showFlags&&!r.separateDialCode&&(r.nationalMode=!1),r.useFullscreenPopup&&!r.dropdownContainer&&(r.dropdownContainer=document.body),r.i18n={...t,...r.i18n}};var D=r=>r.replace(/\D/g,""),R=(r="")=>r.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var Z=(r,t)=>{let e=R(t),i=[],n=[],s=[],o=[],a=[],u=[];for(let c of r)c.iso2===e?i.push(c):c.normalisedName.startsWith(e)?n.push(c):c.normalisedName.includes(e)?s.push(c):e===c.dialCode||e===c.dialCodePlus?o.push(c):c.dialCodePlus.includes(e)?a.push(c):c.initials.includes(e)&&u.push(c);let d=(c,m)=>c.priority-m.priority;return[...i.sort(d),...n.sort(d),...s.sort(d),...o.sort(d),...a.sort(d),...u.sort(d)]},tt=(r,t)=>{let e=t.toLowerCase();for(let i of r)if(i.name.toLowerCase().startsWith(e))return i;return null};var H=r=>Object.keys(r).filter(t=>!!r[t]).join(" "),C=(r,t,e)=>{let i=document.createElement(r);return t&&Object.entries(t).forEach(([n,s])=>i.setAttribute(n,s)),e&&e.appendChild(i),i};var et=()=>`
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${p.HIDDEN}="true">
<circle cx="11" cy="11" r="7" />
<line x1="21" y1="21" x2="16.65" y2="16.65" />
</svg>`,it=r=>{let t=`iti-${r}-clear-mask`;return`
<svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${p.HIDDEN}="true" focusable="false">
<mask id="${t}" maskUnits="userSpaceOnUse">
<rect width="16" height="16" fill="white" />
<path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
</mask>
<circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />
</svg>`};var T=class{constructor(t,e,i){this.highlightedItem=null;t.dataset.intlTelInputId=i.toString(),this.telInput=t,this.options=e,this.id=i,this.a=!!t.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.o=this.telInput.style.paddingLeft)}generateMarkup(t){this.countries=t,this._at();let e=this._au();this._av(e),e.appendChild(this.telInput),this._ay(),this._az(e)}_at(){this.telInput.classList.add("iti__tel-input"),!this.telInput.hasAttribute("autocomplete")&&!this.telInput.form?.hasAttribute("autocomplete")&&this.telInput.setAttribute("autocomplete","off")}_au(){let{allowDropdown:t,showFlags:e,containerClass:i,useFullscreenPopup:n}=this.options,s=H({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":e,"iti--inline-dropdown":!n,[i]:!!i}),o=C("div",{class:s});return this.isRTL&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}_av(t){let{allowDropdown:e,separateDialCode:i,showFlags:n}=this.options;if(e||n||i){this.countryContainer=C("div",{class:`iti__country-container ${h.V_HIDE}`},t),e?(this.selectedCountry=C("button",{type:"button",class:"iti__selected-country",[p.EXPANDED]:"false",[p.LABEL]:this.options.i18n.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=C("div",{class:"iti__selected-country"},this.countryContainer);let s=C("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=C("div",{class:h.FLAG},s),e&&(this.dropdownArrow=C("div",{class:"iti__arrow",[p.HIDDEN]:"true"},s)),i&&(this.selectedDialCode=C("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e&&this._aw()}}_aw(){let{fixDropdownWidth:t,useFullscreenPopup:e,countrySearch:i,i18n:n,dropdownContainer:s,containerClass:o}=this.options,a=t?"":"iti--flexible-dropdown-width";if(this.dropdownContent=C("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${h.HIDE} ${a}`,role:"dialog",[p.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),i&&this._ax(),this.countryList=C("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[p.LABEL]:n.countryListAriaLabel},this.dropdownContent),this._ba(),i&&this.updateSearchResultsA11yText(),s){let u=H({iti:!0,"iti--container":!0,"iti--fullscreen-popup":e,"iti--inline-dropdown":!e,[o]:!!o});this.dropdown=C("div",{class:u}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_ax(){let{i18n:t}=this.options,e=C("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=C("span",{class:"iti__search-icon",[p.HIDDEN]:"true"},e),this.searchIcon.innerHTML=et(),this.searchInput=C("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:t.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:t.searchPlaceholder,[p.CONTROLS]:`iti-${this.id}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},e),this.k=C("button",{type:"button",class:`iti__search-clear ${h.HIDE}`,[p.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},e),this.k.innerHTML=it(this.id),this.l=C("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=C("div",{class:`iti__no-results ${h.HIDE}`,[p.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=t.zeroSearchResults}_ay(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(h.V_HIDE))}_az(t){let{hiddenInput:e}=this.options;if(e){let i=this.telInput.getAttribute("name")||"",n=e(i);if(n.phone){let s=this.telInput.form?.querySelector(`input[name="${n.phone}"]`);s?this.hiddenInput=s:(this.hiddenInput=C("input",{type:"hidden",name:n.phone}),t.appendChild(this.hiddenInput))}if(n.country){let s=this.telInput.form?.querySelector(`input[name="${n.country}"]`);s?this.m=s:(this.m=C("input",{type:"hidden",name:n.country}),t.appendChild(this.m))}}}_ba(){let t=document.createDocumentFragment();for(let e=0;e<this.countries.length;e++){let i=this.countries[e],n=H({[h.COUNTRY_ITEM]:!0,[h.HIGHLIGHT]:e===0}),s=C("li",{id:`iti-${this.id}__item-${i.iso2}`,class:n,tabindex:"-1",role:"option",[p.SELECTED]:"false"});s.dataset.dialCode=i.dialCode,s.dataset.countryCode=i.iso2,i.nodeById[this.id]=s,this.options.showFlags&&C("div",{class:`${h.FLAG} iti__${i.iso2}`},s);let o=C("span",{class:"iti__country-name"},s);o.textContent=i.name;let a=C("span",{class:"iti__dial-code"},s);this.isRTL&&a.setAttribute("dir","ltr"),a.textContent=`+${i.dialCode}`,t.appendChild(s)}this.countryList.appendChild(t)}updateInputPadding(){if(this.selectedCountry){let t=this.options.separateDialCode?P.SANE_SELECTED_WITH_DIAL_WIDTH:P.SANE_SELECTED_NO_DIAL_WIDTH,i=(this.selectedCountry.offsetWidth||this._bb()||t)+P.INPUT_PADDING_EXTRA_LEFT;this.telInput.style.paddingLeft=`${i}px`}}_bb(){if(this.telInput.parentNode){let t;try{t=window.top.document.body}catch{t=document.body}let e=this.telInput.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.countryContainer.cloneNode();e.appendChild(i);let n=this.selectedCountry.cloneNode(!0);i.appendChild(n);let s=n.offsetWidth;return t.removeChild(e),s}return 0}updateSearchResultsA11yText(){let{i18n:t}=this.options,e=this.countryList.childElementCount,i;e===0?i=t.zeroSearchResults:t.searchResultsText?i=t.searchResultsText(e):e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.l.textContent=i}scrollTo(t){let e=this.countryList,i=document.documentElement.scrollTop,n=e.offsetHeight,s=e.getBoundingClientRect().top+i,o=s+n,a=t.offsetHeight,u=t.getBoundingClientRect().top+i,d=u+a,c=u-s+e.scrollTop;if(u<s)e.scrollTop=c;else if(d>o){let m=n-a;e.scrollTop=c-m}}highlightListItem(t,e){let i=this.highlightedItem;if(i&&(i.classList.remove(h.HIGHLIGHT),i.setAttribute(p.SELECTED,"false")),this.highlightedItem=t,this.highlightedItem&&(this.highlightedItem.classList.add(h.HIGHLIGHT),this.highlightedItem.setAttribute(p.SELECTED,"true"),this.options.countrySearch)){let n=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(p.ACTIVE_DESCENDANT,n)}e&&this.highlightedItem.focus()}filterCountries(t){this.countryList.innerHTML="";let e=!0;for(let i of t){let n=i.nodeById[this.id];n&&(this.countryList.appendChild(n),e&&(this.highlightListItem(n,!1),e=!1))}e?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(h.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(h.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.o);let t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.k=null,this.searchNoResults=null,this.l=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.m=null,this.highlightedItem=null;for(let e of this.countries)delete e.nodeById[this.id];this.countries=null}};var nt=r=>{let{onlyCountries:t,excludeCountries:e}=r;if(t.length){let i=t.map(n=>n.toLowerCase());return L.filter(n=>i.includes(n.iso2))}else if(e.length){let i=e.map(n=>n.toLowerCase());return L.filter(n=>!i.includes(n.iso2))}return L},st=(r,t)=>{for(let e of r){let i=e.iso2.toLowerCase();t.i18n[i]&&(e.name=t.i18n[i])}},ot=(r,t)=>{let e=new Set,i=0,n={},s=(o,a,u)=>{if(!o||!a)return;a.length>i&&(i=a.length),n.hasOwnProperty(a)||(n[a]=[]);let d=n[a];if(d.includes(o))return;let c=u!==void 0?u:d.length;d[c]=o};for(let o of r){e.has(o.dialCode)||e.add(o.dialCode);for(let a=1;a<o.dialCode.length;a++){let u=o.dialCode.substring(0,a);s(o.iso2,u)}s(o.iso2,o.dialCode,o.priority)}(t.onlyCountries.length||t.excludeCountries.length)&&e.forEach(o=>{n[o]=n[o].filter(Boolean)});for(let o of r)if(o.areaCodes){let a=n[o.dialCode][0];for(let u of o.areaCodes){for(let d=1;d<u.length;d++){let c=u.substring(0,d),m=o.dialCode+c;s(a,m),s(o.iso2,m)}s(o.iso2,o.dialCode+u)}}return{dialCodes:e,dialCodeMaxLen:i,dialCodeToIso2Map:n}},rt=(r,t)=>{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),r.sort((e,i)=>{let{countryOrder:n}=t;if(n){let s=n.indexOf(e.iso2),o=n.indexOf(i.iso2),a=s>-1,u=o>-1;if(a||u)return a&&u?s-o:a?-1:1}return e.name.localeCompare(i.name)})},at=r=>{for(let t of r)t.normalisedName=R(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`};var lt=(r,t,e,i)=>{let n=r;if(e&&t){t=`+${i.dialCode}`;let s=n[t.length]===" "||n[t.length]==="-"?t.length+1:t.length;n=n.substring(s)}return n},ut=(r,t,e,i,n)=>{let s=e?e.formatNumberAsYouType(r,i.iso2):r,{dialCode:o}=i;return n&&t.charAt(0)!=="+"&&s.includes(`+${o}`)?(s.split(`+${o}`)[1]||"").trim():s};var dt=(r,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let s=0;s<t.length;s++){if(/[+0-9]/.test(t[s])&&n++,n===r&&!i)return s+1;if(i&&n===r+1)return s}return t.length};var _t=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],z=r=>{let t=D(r);if(t.startsWith(M.NANP)&&t.length>=4){let e=t.substring(1,4);return _t.includes(e)}return!1};for(let r of L)r.name=B[r.iso2];var Lt=0,Nt=new Set(L.map(r=>r.iso2)),V=r=>Nt.has(r),k=class r{constructor(t,e={}){this.id=Lt++,this.options={...K,...e},Q(this.options,B),this.ui=new T(t,this.options,this.id),this.i=r._b(),this.promise=this._c(),this.countries=nt(this.options);let{dialCodes:i,dialCodeMaxLen:n,dialCodeToIso2Map:s}=ot(this.countries,this.options);this.dialCodes=i,this.dialCodeMaxLen=n,this.dialCodeToIso2Map=s,this.j=new Map(this.countries.map(o=>[o.iso2,o])),this._init()}static _b(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_c(){let t=new Promise((i,n)=>{this.b=i,this.c=n}),e=new Promise((i,n)=>{this.d=i,this.e=n});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.g=new AbortController,this._a(),this.ui.generateMarkup(this.countries),this._d(),this._e(),this._h()}_a(){st(this.countries,this.options),rt(this.countries,this.options),at(this.countries)}_d(t=!1){let e=this.ui.telInput.getAttribute("value"),i=this.ui.telInput.value,s=e&&e.startsWith("+")&&(!i||!i.startsWith("+"))?e:i,o=this._ao(s),a=z(s),{initialCountry:u,geoIpLookup:d}=this.options,c=u===x.AUTO&&d;if(o&&!a)this._ai(s);else if(!c||t){let m=u?u.toLowerCase():"";V(m)?this._aj(m):o&&a?this._aj(J.ISO2):this._aj("")}s&&this._ah(s)}_e(){this._j(),this.options.allowDropdown&&this._g(),(this.ui.hiddenInput||this.ui.m)&&this.ui.telInput.form&&this._f()}_f(){let t=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.m&&(this.ui.m.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",t,{signal:this.g.signal})}_g(){let t=this.g.signal,e=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)?this.ui.telInput.focus():o.preventDefault()},i=this.ui.telInput.closest("label");i&&i.addEventListener("click",e,{signal:t});let n=()=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._l()};this.ui.selectedCountry.addEventListener("click",n,{signal:t});let s=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&[y.ARROW_UP,y.ARROW_DOWN,y.SPACE,y.ENTER].includes(o.key)&&(o.preventDefault(),o.stopPropagation(),this._l()),o.key===y.TAB&&this._am()};this.ui.countryContainer.addEventListener("keydown",s,{signal:t})}_h(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!l.utils){let s=()=>{l.attachUtils(t)?.catch(()=>{})};if(l.documentReady())s();else{let o=()=>{s()};window.addEventListener("load",o,{signal:this.g.signal})}}else this.d();e===x.AUTO&&i&&!this.selectedCountryData.iso2?this._i():this.b()}_i(){l.autoCountry?this.handleAutoCountry():l.startedLoadingAutoCountry||(l.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();V(e)?(l.autoCountry=e,setTimeout(()=>S("handleAutoCountry"))):(this._d(!0),S("rejectAutoCountryPromise"))},()=>{this._d(!0),S("rejectAutoCountryPromise")}))}_m(){this._l(),this.ui.searchInput.value="+",this._ae("")}_j(){this._p(),this._n(),this._o()}_p(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:n,countrySearch:s}=this.options,o=!1;N.ALPHA_UNICODE.test(this.ui.telInput.value)&&(o=!0);let a=u=>{if(this.i&&u?.data==="+"&&i&&n&&s){let g=this.ui.telInput.selectionStart||0,E=this.ui.telInput.value.substring(0,g-1),b=this.ui.telInput.value.substring(g);this.ui.telInput.value=E+b,this._m();return}this._ai(this.ui.telInput.value)&&this._ar();let d=u?.data&&N.NON_PLUS_NUMERIC.test(u.data),c=u?.inputType===W.PASTE&&this.ui.telInput.value;d||c&&!t?o=!0:N.NON_PLUS_NUMERIC.test(this.ui.telInput.value)||(o=!1);let m=u?.detail&&u.detail.isSetNumber;if(e&&!o&&!m){let g=this.ui.telInput.selectionStart||0,b=this.ui.telInput.value.substring(0,g).replace(N.NON_PLUS_NUMERIC_GLOBAL,"").length,_=u?.inputType===W.DELETE_FWD,f=this._ap(),I=ut(f,this.ui.telInput.value,l.utils,this.selectedCountryData,this.options.separateDialCode),v=dt(b,I,g,_);this.ui.telInput.value=I,this.ui.telInput.setSelectionRange(v,v)}};this.ui.telInput.addEventListener("input",a,{signal:this.g.signal})}_n(){let{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:n}=this.options;if(t||e){let s=o=>{if(o.key&&o.key.length===1&&!o.altKey&&!o.ctrlKey&&!o.metaKey){if(e&&i&&n&&o.key==="+"){o.preventDefault(),this._m();return}if(t){let a=this.ui.telInput.value,d=!a.startsWith("+")&&this.ui.telInput.selectionStart===0&&o.key==="+",c=/^[0-9]$/.test(o.key),m=e?c:d||c,g=a.slice(0,this.ui.telInput.selectionStart)+o.key+a.slice(this.ui.telInput.selectionEnd),E=this._ap(g),b=l.utils.getCoreNumber(E,this.selectedCountryData.iso2),_=this.n&&b.length>this.n,I=this._s(E)!==null;(!m||_&&!I&&!d)&&o.preventDefault()}}};this.ui.telInput.addEventListener("keydown",s,{signal:this.g.signal})}}_o(){if(this.options.strictMode){let t=e=>{e.preventDefault();let i=this.ui.telInput,n=i.selectionStart,s=i.selectionEnd,o=i.value.slice(0,n),a=i.value.slice(s),u=this.selectedCountryData.iso2,d=e.clipboardData.getData("text"),c=n===0&&s>0,m=!i.value.startsWith("+")||c,g=d.replace(N.NON_PLUS_NUMERIC_GLOBAL,""),E=g.startsWith("+"),b=g.replace(/\+/g,""),_=E&&m?`+${b}`:b,f=o+_+a,I=l.utils.getCoreNumber(f,u);for(;I.length===0&&f.length>0;)f=f.slice(0,-1),I=l.utils.getCoreNumber(f,u);if(!I)return;if(this.n&&I.length>this.n)if(i.selectionEnd===i.value.length){let ct=I.length-this.n;f=f.slice(0,f.length-ct)}else return;i.value=f;let v=n+_.length;i.setSelectionRange(v,v),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.g.signal})}}_k(t){let e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_as(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_l(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.h=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"true"),this._x(),e){let i=this.ui.countryList.firstElementChild;i&&(this.ui.highlightListItem(i,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._y(),this.ui.dropdownArrow.classList.add(h.ARROW_UP),this._as(w.OPEN_COUNTRY_DROPDOWN)}_x(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){let t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;let i=()=>this._am();window.addEventListener("scroll",i,{signal:this.h.signal})}}}_y(){let t=this.h.signal;this._z(t),this._aa(t),this._ab(t),this._ac(t),this.options.countrySearch&&this._ad(t)}_z(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this.ui.highlightListItem(n,!1)};this.ui.countryList.addEventListener("mouseover",e,{signal:t})}_aa(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this._al(n)};this.ui.countryList.addEventListener("click",e,{signal:t})}_ab(t){let e=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._am()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_ac(t){let e="",i=null,n=s=>{[y.ARROW_UP,y.ARROW_DOWN,y.ENTER,y.ESC].includes(s.key)&&(s.preventDefault(),s.stopPropagation(),s.key===y.ARROW_UP||s.key===y.ARROW_DOWN?this._af(s.key):s.key===y.ENTER?this._ag():s.key===y.ESC&&this._am()),!this.options.countrySearch&&N.HIDDEN_SEARCH_CHAR.test(s.key)&&(s.stopPropagation(),i&&clearTimeout(i),e+=s.key.toLowerCase(),this._q(e),i=setTimeout(()=>{e=""},X.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",n,{signal:t})}_ad(t){let e=()=>{let o=this.ui.searchInput.value.trim();this._ae(o),this.ui.searchInput.value?this.ui.k.classList.remove(h.HIDE):this.ui.k.classList.add(h.HIDE)},i=null,n=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)};this.ui.searchInput.addEventListener("input",n,{signal:t});let s=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()};this.ui.k.addEventListener("click",s,{signal:t})}_q(t){let e=tt(this.countries,t);if(e){let i=e.nodeById[this.id];this.ui.highlightListItem(i,!1),this.ui.scrollTo(i)}}_ae(t){let e;t===""?e=this.countries:e=Z(this.countries,t),this.ui.filterCountries(e)}_af(t){let e=t===y.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===y.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_ag(){this.ui.highlightedItem&&this._al(this.ui.highlightedItem)}_ah(t){let e=t;if(this.options.formatOnDisplay&&l.utils&&this.selectedCountryData){let i=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:n,INTERNATIONAL:s}=l.utils.numberFormat,o=i?n:s;e=l.utils.formatNumber(e,this.selectedCountryData.iso2,o)}e=this._aq(e),this.ui.telInput.value=e}_ai(t){let e=this._s(t);return e!==null?this._aj(e):!1}_r(t){let{dialCode:e,nationalPrefix:i}=this.selectedCountryData;if(t.startsWith("+")||!e)return t;let o=i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${o}`}_s(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.selectedCountryData.iso2,s=this.selectedCountryData.dialCode;i=this._r(i);let o=this._ao(i,!0),a=D(i);if(o){let u=D(o),d=this.dialCodeToIso2Map[u];if(d.length===1)return d[0]===n?null:d[0];if(!n&&this.f&&d.includes(this.f))return this.f;if(s===M.NANP&&z(a))return null;let{areaCodes:m,priority:g}=this.selectedCountryData;if(m){let I=m.map(v=>`${s}${v}`);for(let v of I)if(a.startsWith(v))return null}let b=m&&!(g===0)&&a.length>u.length,_=n&&d.includes(n)&&!b,f=n===d[0];if(!_&&!f)return d[0]}else{if(i.startsWith("+")&&a.length)return"";if((!i||i==="+")&&!n)return this.f}return null}_aj(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.options,s=this.selectedCountryData.iso2||"";if(this.selectedCountryData=t?this.j.get(t):{},this.selectedCountryData.iso2&&(this.f=this.selectedCountryData.iso2),this.ui.selectedCountry){let o=t&&i?`${h.FLAG} iti__${t}`:`${h.FLAG} ${h.GLOBE}`,a,u;if(t){let{name:d,dialCode:c}=this.selectedCountryData;u=d,a=n.selectedCountryAriaLabel.replace("${countryName}",d).replace("${dialCode}",`+${c}`)}else u=n.noCountrySelected,a=n.noCountrySelected;this.ui.selectedCountryInner.className=o,this.ui.selectedCountry.setAttribute("title",u),this.ui.selectedCountry.setAttribute(p.LABEL,a)}if(e){let o=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=o,this.ui.updateInputPadding()}return this._ak(),this._t(),s!==t}_t(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:n}=this.selectedCountryData;if(t&&l.utils)if(n){let s=l.utils.numberType[e],o=l.utils.getExampleNumber(n,!1,s,!0),a=o;for(;l.utils.isPossibleNumber(o,n,i);)a=o,o+="0";let u=l.utils.getCoreNumber(a,n);this.n=u.length,n==="by"&&(this.n=u.length+1)}else this.n=null}_ak(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.options,s=t===A.AGGRESSIVE||!this.ui.a&&t===A.POLITE;if(l.utils&&s){let o=l.utils.numberType[e],a=this.selectedCountryData.iso2?l.utils.getExampleNumber(this.selectedCountryData.iso2,i,o):"";a=this._aq(a),typeof n=="function"&&(a=n(a,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",a)}}_al(t){let e=t.dataset[$.COUNTRY_CODE],i=this._aj(e);this._am();let n=t.dataset[$.DIAL_CODE];this._an(n),this.options.formatOnDisplay&&this._ah(this.ui.telInput.value),this.ui.telInput.focus(),i&&this._ar()}_am(){this.ui.dropdownContent.classList.contains(h.HIDE)||(this.ui.dropdownContent.classList.add(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"false"),this.ui.highlightedItem&&this.ui.highlightedItem.setAttribute(p.SELECTED,"false"),this.options.countrySearch&&this.ui.searchInput.removeAttribute(p.ACTIVE_DESCENDANT),this.ui.dropdownArrow.classList.remove(h.ARROW_UP),this.h.abort(),this.h=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._as(w.CLOSE_COUNTRY_DROPDOWN))}_an(t){let e=this.ui.telInput.value,i=`+${t}`,n;if(e.startsWith("+")){let s=this._ao(e);s?n=e.replace(s,i):n=i,this.ui.telInput.value=n}}_ao(t,e){let i="";if(t.startsWith("+")){let n="";for(let s=0;s<t.length;s++){let o=t.charAt(s);if(/[0-9]/.test(o)){if(n+=o,!!!this.dialCodeToIso2Map[n])break;if(e)i=t.substring(0,s+1);else if(this.dialCodes.has(n)){i=t.substring(0,s+1);break}if(n.length===this.dialCodeMaxLen)break}}}return i}_ap(t){let e=t||this.ui.telInput.value.trim(),{dialCode:i}=this.selectedCountryData,n,s=D(e);return this.options.separateDialCode&&!e.startsWith("+")&&i&&s?n=`+${i}`:n="",n+e}_aq(t){let e=this._ao(t),i=lt(t,e,this.options.separateDialCode,this.selectedCountryData);return this._k(i)}_ar(){this._as(w.COUNTRY_CHANGE)}handleAutoCountry(){this.options.initialCountry===x.AUTO&&l.autoCountry&&(this.f=l.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(h.GLOBE)||this.setCountry(this.f),this.b())}handleUtils(){l.utils&&(this.ui.telInput.value&&this._ah(this.ui.telInput.value),this.selectedCountryData.iso2&&(this._ak(),this._t())),this.d()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._am(),this.g.abort(),this.g=null,this.ui.destroy(),l.instances instanceof Map?l.instances.delete(this.id):delete l.instances[this.id])}getExtension(){return l.utils?l.utils.getExtension(this._ap(),this.selectedCountryData.iso2):""}getNumber(t){if(l.utils){let{iso2:e}=this.selectedCountryData;return l.utils.formatNumber(this._ap(),e,t)}return""}getNumberType(){return l.utils?l.utils.getNumberType(this._ap(),this.selectedCountryData.iso2):F.UNKNOWN_NUMBER_TYPE}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(l.utils){let{iso2:t}=this.selectedCountryData;return l.utils.getValidationError(this._ap(),t)}return F.UNKNOWN_VALIDATION_ERROR}isValidNumber(){let{dialCode:t,iso2:e}=this.selectedCountryData;if(t===O.DIAL_CODE&&l.utils){let i=this._ap(),n=l.utils.getCoreNumber(i,e);if(n[0]===O.MOBILE_PREFIX&&n.length!==O.MOBILE_CORE_LENGTH)return!1}return this._v(!1)}isValidNumberPrecise(){return this._v(!0)}_u(t){return l.utils?l.utils.isPossibleNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}_v(t){if(!l.utils)return null;if(!this.selectedCountryData.iso2)return!1;let e=o=>t?this._w(o):this._u(o),i=this._ap(),n=i.search(N.ALPHA_UNICODE);if(n>-1&&!this.options.allowPhonewords){let o=i.substring(0,n),a=e(o),u=e(i);return a&&u}return e(i)}_w(t){return l.utils?l.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase();if(!V(e))throw new Error(`Invalid country code: '${e}'`);let i=this.selectedCountryData.iso2;(t&&e!==i||!t&&i)&&(this._aj(e),this._an(this.selectedCountryData.dialCode),this.options.formatOnDisplay&&this._ah(this.ui.telInput.value),this._ar())}setNumber(t){let e=this._ai(t);this._ah(t),e&&this._ar(),this._as(w.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._ak()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},Dt=r=>{if(!l.utils&&!l.startedLoadingUtilsScript){let t;if(typeof r=="function")try{t=Promise.resolve(r())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof r}`));return l.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return l.utils=i,S("handleUtils"),!0}).catch(e=>{throw S("rejectUtilsScriptPromise",e),e})}return null},S=(r,...t)=>{Object.values(l.instances).forEach(e=>{let i=e[r];typeof i=="function"&&i.apply(e,t)})},l=Object.assign((r,t)=>{let e=new k(r,t);return l.instances[e.id]=e,r.iti=e,e},{defaults:K,documentReady:()=>document.readyState==="complete",getCountryData:()=>L,getInstance:r=>{let t=r.dataset.intlTelInputId;return t?l.instances[t]:null},instances:{},attachUtils:Dt,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.11.3"}),wt=l;return ft(At);})();
return factoryOutput.default;
}));