1/*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 2"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.1";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]},n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)}}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&h.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(g,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window}
2,"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&u("jsonp-promotion","JSON-to-JSONP auto-promotion is deprecated")}));var j=s.fn.removeAttr,b=s.fn.toggleClass,w=/\S+/g;function x(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}i(s.fn,"removeAttr",function(e){var r=this,n=!1;return s.each(e.match(w),function(e,t){s.expr.match.bool.test(t)&&r.each(function(){if(!1!==s(this).prop(t))return!(n=!0)}),n&&(u("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),j.apply(this,arguments)},"removeAttr-bool"),i(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?b.apply(this,arguments):(u("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))},"toggleClass-bool");var Q,A,R=!1,C=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return R=!0,e=r.apply(this,arguments),R=!1,e})}),i(s,"swap",function(e,t,r,n){var o,a,i={};for(a in R||u("swap","jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("cssProps","jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),e("4.0.0")?(A={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},"undefined"!=typeof Proxy?s.cssNumber=new Proxy(A,{get:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}}):s.cssNumber=A):A=s.cssNumber,Q=s.fn.css,i(s.fn,"css",function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=x(e),n=r,C.test(n)&&N.test(n[0].toUpperCase()+n.slice(1))||A[r]||u("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))},"css-number");var S,P,k,H,E=s.data;i(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&E.call(this,e),o={},t)a!==x(a)?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return E.call(this,e,o),t}return t&&"string"==typeof t&&t!==x(t)&&(n=s.hasData(e)&&E.call(this,e))&&t in n?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):E.apply(this,arguments)},"data-camelCase"),s.fx&&(k=s.Tween.prototype.run,H=function(e){return e},i(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(u("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=H),k.apply(this,arguments)},"easing-one-arg"),S=s.fx.interval,P="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u("fx-interval",P),s.migrateIsPatchEnabled("fx-interval")&&void 0===S?13:S},set:function(e){u("fx-interval",P),S=e}}));var M=s.fn.load,q=s.event.add,O=s.event.fix;s.event.props=[],s.event.fixHooks={}
2,r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),i(s.event,"fix",function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("event-old-patch","jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=O.call(this,e),n&&n.filter?n.filter(t,e):t},"event-old-patch"),i(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("load-after-event","jQuery(window).on('load'...) called after load event occurred"),q.apply(this,arguments)},"load-after-event"),s.each(["load","unload","error"],function(e,t){i(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?M.apply(this,e):(u("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3")}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){c(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated")}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("ready-event","'ready' event is deprecated")}},c(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),c(s.fn,"unbind",function(e,t){return this.off(e,null,t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),c(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),c(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),c(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated");function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}var F=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1></$2>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s});/* @preserve 3 * Leaflet 1.9.4
vendor: 147,487 bytes, lines 3-6
3, a JS library for interactive maps. https://leafletjs.com 4 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade 5 */ 6!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).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n<o;n++)for(e in i=arguments[n])t[e]=i[e];return t}var R=Object.create||function(t){return N.prototype=t,new N};function N(){}function a(t,e){var i,n=Array.prototype.slice;return t.bind?t.bind.apply(t,n.call(arguments,1)):(i=n.call(arguments,2),function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)})}var D=0;function h(t){return"_leaflet_id"in t||(t._leaflet_id=++D),t._leaflet_id}function j(t,e,i){var n,o,s=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(s,e),n=!0)};return r}function H(t,e,i){var n=e[1],e=e[0],o=n-e;return t===n&&i?t:((t-e)%o+o)%o+e}function u(){return!1}function i(t,e){return!1===e?t:(e=Math.pow(10,void 0===e?6:e),Math.round(t*e)/e)}function W(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function F(t){return W(t).split(/\s+/)}function c(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?R(t.options):{}),e)t.options[i]=e[i];return t.options}function U(t,e,i){var n,o=[];for(n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var V=/\{ *([\w_ -]+) *\}/g;function q(t,i){return t.replace(V,function(t,e){e=i[e];if(void 0===e)throw new Error("No value provided for variable "+t);return e="function"==typeof e?e(i):e})}var d=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function G(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var K="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var X=0;function J(t){var e=+new Date,i=Math.max(0,16-(e-X));return X=e+i,window.setTimeout(t,i)}var $=window.requestAnimationFrame||Y("RequestAnimationFrame")||J,Q=window.cancelAnimationFrame||Y("CancelAnimationFrame")||Y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function x(t,e,i){if(!i||$!==J)return $.call(window,a(t,e));t.call(e)}function r(t){t&&Q.call(window,t)}var tt={__proto__:null,extend:l,create:R,bind:a,get lastId(){return D},stamp:h,throttle:j,wrapNum:H,falseFn:u,formatNum:i,trim:W,splitWords:F,setOptions:c,getParamString:U,template:q,isArray:d,indexOf:G,emptyImageUrl:K,requestFn:$,cancelFn:Q,requestAnimFrame:x,cancelAnimFrame:r};function et(){}et.extend=function(t){function e(){c(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var i,n=e.__super__=this.prototype,o=R(n);for(i in(o.constructor=e).prototype=o,this)Object.prototype.hasOwnProperty.call(this,i)&&"prototype"!==i&&"__super__"!==i&&(e[i]=this[i]);if(t.statics&&l(e,t.statics),t.includes){var s=t.includes;if("undefined"!=typeof L&&L&&L.Mixin){s=d(s)?s:[s];for(var r=0;r<s.length;r++)s[r]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}l.apply(null,[o].concat(t.includes))}return l(o,t),delete o.statics,delete o.includes,o.options&&(o.options=n.options?R(n.options):{},l(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},et.include=function(t){var e=this.prototype.options;return l(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},et.mergeOptions=function(t){return l(this.prototype.options,t),this},et.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var e={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=F(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=F(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,i,n){"function"!=typeof e?console.warn("wrong listener type: "+typeof e):!1===this._listens(t,e,i)&&(e={fn:e,ctx:i=i===this?void 0:i},n&&(e.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e))},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(1===arguments.length){if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=u;delete this._events[t]}else"function"!=typeof e?console.warn("wrong listener type: "+typeof e):!1!==(e=this._listens(t,e,i))&&(i=n[e],this._firingCount&&(i.fn=u,this._events[t]=n=n.slice()),n.splice(e,1))},fire:function(t,e,i){if(this.listens(t,i)){var n=l({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){var a=o[s],h=a.fn;a.once&&this.off(t,h,a.ctx),h.call(a.ctx||this,n)}this._firingCount--}}i&&this._propagateEvent(n)}return this},listens:function(t,e,i,n){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e,s=("function"!=typeof e&&(n=!!e,i=o=void 0),this._events&&this._events[t]);if(s&&s.length&&!1!==this._listens(t,o,i))return!0;if(n)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,i,n))return!0;return!1},_listens:function(t,e,i){if(this._events){var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var o=0,s=n.length;o<s;o++)if(n[o].fn===e&&n[o].ctx===i)return o}return!1},once:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e,!0);else for(var o=0,s=(t=F(t)).length;o<s;o++)this._on(t[o],e,i,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[h(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[h(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,l({layer:t.target,propagatedFrom:t.target},t),!0)}},it=(e.addEventListener=e.on,e.removeEventListener=e.clearAllEventListeners=e.off,e.addOneTimeEventListener=e.once,e.fireEvent=e.fire,e.hasEventListeners=e.listens,et.extend(e));function p(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var nt=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function m(t,e,i){return t instanceof p?t:d(t)?new p(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new p(t.x,t.y):new p(t,e,i)}function f(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function _(t,e){return!t||t instanceof f?t:new f(t,e)}function s(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function g(t,e){return t instanceof s?t:new s(t,e)}function v(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function w(t,e,i){return t instanceof v?t:d(t)&&"object"!=typeof t[0]?3===t.length?new v(t[0],t[1],t[2]):2===t.length?new v(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new v(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new v(t,e,i)}p.prototype={clone:function(){return new p(this.x,this.y)},add:function(t){return this.clone()._add(m(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(m(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new p(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new p(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=nt(this.x),this.y=nt(this.y),this},distanceTo:function(t){var e=(t=m(t)).x-this.x,t=t.y-this.y;return Math.sqrt(e*e+t*t)},equals:function(t){return(t=m(t)).x===this.x&&t.y===this.y},contains:function(t){return t=m(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+i(this.x)+", "+i(this.y)+")"}},f.prototype={extend:function(t){var e,i;if(t){if(t instanceof p||"number"==typeof t[0]||"x"in t)e=i=m(t);else if(e=(t=_(t)).min,i=t.max,!e||!i)return this;this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone())}return this},getCenter:function(t){return m((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return m(this.min.x,this.max.y)},getTopRight:function(){return m(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t=("number"==typeof t[0]||t instanceof p?m:_)(t))instanceof f?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>=e.x&&n.x<=i.x,t=t.y>=e.y&&n.y<=i.y;return o&&t},overlaps:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>e.x&&n.x<i.x,t=t.y>e.y&&n.y<i.y;return o&&t},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,t=Math.abs(e.y-i.y)*t;return _(m(e.x-n,e.y-t),m(i.x+n,i.y+t))},equals:function(t){return!!t&&(t=_(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},s.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof v)i=e=t;else{if(!(t instanceof s))return t?this.extend(w(t)||g(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new v(e.lat,e.lng),this._northEast=new v(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,t=Math.abs(e.lng-i.lng)*t;return new s(new v(e.lat-n,e.lng-t),new v(i.lat+n,i.lng+t))},getCenter:function(){return new v((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new v(this.getNorth(),this.getWest())},getSouthEast:function(){return new v(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=("number"==typeof t[0]||t instanceof v||"lat"in t?w:g)(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof s?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>=e.lat&&n.lat<=i.lat,t=t.lng>=e.lng&&n.lng<=i.lng;return o&&t},overlaps:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>e.lat&&n.lat<i.lat,t=t.lng>e.lng&&n.lng<i.lng;return o&&t},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=g(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var ot={latLngToPoint:function(t,e){t=this.projection.project(t),e=this.scale(e);return this.transformation._transform(t,e)},pointToLatLng:function(t,e){e=this.scale(e),t=this.transformation.untransform(t,e);return this.projection.unproject(t)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){var e;return this.infinite?null:(e=this.projection.bounds,t=this.scale(t),new f(this.transformation.transform(e.min,t),this.transformation.transform(e.max,t)))},infinite:!(v.prototype={equals:function(t,e){return!!t&&(t=w(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+i(this.lat,t)+", "+i(this.lng,t)+")"},distanceTo:function(t){return st.distance(this,w(t))},wrap:function(){return st.wrapLatLng(this)},toBounds:function(t){var t=180*t/40075017,e=t/Math.cos(Math.PI/180*this.lat);return g([this.lat-t,this.lng-e],[this.lat+t,this.lng+e])},clone:function(){return new v(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var e=this.wrapLng?H(t.lng,this.wrapLng,!0):t.lng;return new v(this.wrapLat?H(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,e=e.lng-i.lng;return 0==n&&0==e?t:(i=t.getSouthWest(),t=t.getNorthEast(),new s(new v(i.lat-n,i.lng-e),new v(t.lat-n,t.lng-e)))}},st=l({},ot,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),e=Math.sin((e.lng-t.lng)*i/2),t=s*s+Math.cos(n)*Math.cos(o)*e*e,i=2*Math.atan2(Math.sqrt(t),Math.sqrt(1-t));return this.R*i}}),rt=6378137,rt={R:rt,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,i=Math.max(Math.min(i,t.lat),-i),i=Math.sin(i*e);return new p(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(t){var e=180/Math.PI;return new v((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:new f([-(rt=rt*Math.PI),-rt],[rt,rt])};function at(t,e,i,n){d(t)?(this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3]):(this._a=t,this._b=e,this._c=i,this._d=n)}function ht(t,e,i,n){return new at(t,e,i,n)}at.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new p((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var lt=l({},st,{code:"EPSG:3857",projection:rt,transformation:ht(lt=.5/(Math.PI*rt.R),.5,-lt,.5)}),ut=l({},lt,{code:"EPSG:900913"});function ct(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function dt(t,e){for(var i,n,o,s,r="",a=0,h=t.length;a<h;a++){for(i=0,n=(o=t[a]).length;i<n;i++)r+=(i?"L":"M")+(s=o[i]).x+" "+s.y;r+=e?b.svg?"z":"x":""}return r||"M0 0"}var _t=document.documentElement.style,pt="ActiveXObject"in window,mt=pt&&!document.addEventListener,n="msLaunchUri"in navigator&&!("documentMode"in document),ft=y("webkit"),gt=y("android"),vt=y("android 2")||y("android 3"),yt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),yt=gt&&y("Google")&&yt<537&&!("AudioNode"in window),xt=!!window.opera,wt=!n&&y("chrome"),bt=y("gecko")&&!ft&&!xt&&!pt,Pt=!wt&&y("safari"),Lt=y("phantom"),o="OTransition"in _t,Tt=0===navigator.platform.indexOf("Win"),Mt=pt&&"transition"in _t,zt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!vt,_t="MozPerspective"in _t,Ct=!window.L_DISABLE_3D&&(Mt||zt||_t)&&!o&&!Lt,Zt="undefined"!=typeof orientation||y("mobile"),St=Zt&&ft,Et=Zt&&zt,kt=!window.PointerEvent&&window.MSPointerEvent,Ot=!(!window.PointerEvent&&!kt),At="ontouchstart"in window||!!window.TouchEvent,Bt=!window.L_NO_TOUCH&&(At||Ot),It=Zt&&xt,Rt=Zt&&bt,Nt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Dt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),jt=!!document.createElement("canvas").getContext,Ht=!(!document.createElementNS||!ct("svg").createSVGRect),Wt=!!Ht&&((Wt=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Wt.firstChild&&Wt.firstChild.namespaceURI));function y(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var b={ie:pt,ielt9:mt,edge:n,webkit:ft,android:gt,android23:vt,androidStock:yt,opera:xt,chrome:wt,gecko:bt,safari:Pt,phantom:Lt,opera12:o,win:Tt,ie3d:Mt,webkit3d:zt,gecko3d:_t,any3d:Ct,mobile:Zt,mobileWebkit:St,mobileWebkit3d:Et,msPointer:kt,pointer:Ot,touch:Bt,touchNative:At,mobileOpera:It,mobileGecko:Rt,retina:Nt,passiveEvents:Dt,canvas:jt,svg:Ht,vml:!Ht&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='<v:shape adj="1"/>',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Wt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Ft=b.msPointer?"MSPointerDown":"pointerdown",Ut=b.msPointer?"MSPointerMove":"pointermove",Vt=b.msPointer?"MSPointerUp":"pointerup",qt=b.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Ft,touchmove:Ut,touchend:Vt,touchcancel:qt},Kt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&O(e);ee(t,e)},touchmove:ee,touchend:ee,touchcancel:ee},Yt={},Xt=!1;function Jt(t,e,i){return"touchstart"!==e||Xt||(document.addEventListener(Ft,$t,!0),document.addEventListener(Ut,Qt,!0),document.addEventListener(Vt,te,!0),document.addEventListener(qt,te,!0),Xt=!0),Kt[e]?(i=Kt[e].bind(this,i),t.addEventListener(Gt[e],i,!1),i):(console.warn("wrong event specified:",e),u)}function $t(t){Yt[t.pointerId]=t}function Qt(t){Yt[t.pointerId]&&(Yt[t.pointerId]=t)}function te(t){delete Yt[t.pointerId]}function ee(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Yt)e.touches.push(Yt[i]);e.changedTouches=[e],t(e)}}var ie=200;function ne(t,i){t.addEventListener("dblclick",i);var n,o=0;function e(t){var e;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((e=Ne(t)).some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})&&!e.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})||((e=Date.now())-o<=ie?2===++n&&i(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):n=1,o=e))}return t.addEventListener("click",e),{dblclick:i,simDblclick:e}}var oe,se,re,ae,he,le,ue=we(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ce=we(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ce||"OTransition"===ce?ce+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function P(t,e,i){t=document.createElement(t);return t.className=e||"",i&&i.appendChild(t),t}function T(t){var e=t.parentNode;e&&e.removeChild(t)}function me(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ve(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=xe(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function M(t,e){var i;if(void 0!==t.classList)for(var n=F(e),o=0,s=n.length;o<s;o++)t.classList.add(n[o]);else ve(t,e)||ye(t,((i=xe(t))?i+" ":"")+e)}function z(t,e){void 0!==t.classList?t.classList.remove(e):ye(t,W((" "+xe(t)+" ").replace(" "+e+" "," ")))}function ye(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function xe(t){return void 0===(t=t.correspondingElement?t.correspondingElement:t).className.baseVal?t.className:t.className.baseVal}function C(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}}function we(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function be(t,e,i){e=e||new p(0,0);t.style[ue]=(b.ie3d?"translate("+e.x+"px,"+e.y+"px)":"translate3d("+e.x+"px,"+e.y+"px,0)")+(i?" scale("+i+")":"")}function Z(t,e){t._leaflet_pos=e,b.any3d?be(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Pe(t){return t._leaflet_pos||new p(0,0)}function Le(){S(window,"dragstart",O)}function Te(){k(window,"dragstart",O)}function Me(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(ze(),le=(he=t).style.outlineStyle,t.style.outlineStyle="none",S(window,"keydown",ze))}function ze(){he&&(he.style.outlineStyle=le,le=he=void 0,k(window,"keydown",ze))}function Ce(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function Ze(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}ae="onselectstart"in document?(re=function(){S(window,"selectstart",O)},function(){k(window,"selectstart",O)}):(se=we(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),re=function(){var t;se&&(t=document.documentElement.style,oe=t[se],t[se]="none")},function(){se&&(document.documentElement.style[se]=oe,oe=void 0)});pt={__proto__:null,TRANSFORM:ue,TRANSITION:ce,TRANSITION_END:de,get:_e,getStyle:pe,create:P,remove:T,empty:me,toFront:fe,toBack:ge,hasClass:ve,addClass:M,removeClass:z,setClass:ye,getClass:xe,setOpacity:C,testProp:we,setTransform:be,setPosition:Z,getPosition:Pe,get disableTextSelection(){return re},get enableTextSelection(){return ae},disableImageDrag:Le,enableImageDrag:Te,preventOutline:Me,restoreOutline:ze,getSizedParentNode:Ce,getScale:Ze};function S(t,e,i,n){if(e&&"object"==typeof e)for(var o in e)ke(t,o,e[o],i);else for(var s=0,r=(e=F(e)).length;s<r;s++)ke(t,e[s],i,n);return this}var E="_leaflet_events";function k(t,e,i,n){if(1===arguments.length)Se(t),delete t[E];else if(e&&"object"==typeof e)for(var o in e)Oe(t,o,e[o],i);else if(e=F(e),2===arguments.length)Se(t,function(t){return-1!==G(e,t)});else for(var s=0,r=e.length;s<r;s++)Oe(t,e[s],i,n);return this}function Se(t,e){for(var i in t[E]){var n=i.split(/\d/)[0];e&&!e(n)||Oe(t,n,null,null,i)}}var Ee={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function ke(e,t,i,n){var o,s,r=t+h(i)+(n?"_"+h(n):"");e[E]&&e[E][r]||(s=o=function(t){return i.call(n||e,t||window.event)},!b.touchNative&&b.pointer&&0===t.indexOf("touch")?o=Jt(e,t,o):b.touch&&"dblclick"===t?o=ne(e,o):"addEventListener"in e?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?e.addEventListener(Ee[t]||t,o,!!b.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?e.addEventListener(Ee[t],o=function(t){t=t||window.event,We(e,t)&&s(t)},!1):e.addEventListener(t,s,!1):e.attachEvent("on"+t,o),e[E]=e[E]||{},e[E][r]=o)}function Oe(t,e,i,n,o){o=o||e+h(i)+(n?"_"+h(n):"");var s,r,i=t[E]&&t[E][o];i&&(!b.touchNative&&b.pointer&&0===e.indexOf("touch")?(n=t,r=i,Gt[s=e]?n.removeEventListener(Gt[s],r,!1):console.warn("wrong event specified:",s)):b.touch&&"dblclick"===e?(n=i,(r=t).removeEventListener("dblclick",n.dblclick),r.removeEventListener("click",n.simDblclick)):"removeEventListener"in t?t.removeEventListener(Ee[e]||e,i,!1):t.detachEvent("on"+e,i),t[E][o]=null)}function Ae(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Be(t){return ke(t,"wheel",Ae),this}function Ie(t){return S(t,"mousedown touchstart dblclick contextmenu",Ae),t._leaflet_disable_click=!0,this}function O(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Re(t){return O(t),Ae(t),this}function Ne(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function De(t,e){var i,n;return e?(n=(i=Ze(e)).boundingClientRect,new p((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)):new p(t.clientX,t.clientY)}var je=b.linux&&b.chrome?window.devicePixelRatio:b.mac?3*window.devicePixelRatio:0<window.devicePixelRatio?2*window.devicePixelRatio:1;function He(t){return b.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/je:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function We(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var mt={__proto__:null,on:S,off:k,stopPropagation:Ae,disableScrollPropagation:Be,disableClickPropagation:Ie,preventDefault:O,stop:Re,getPropagationPath:Ne,getMousePosition:De,getWheelDelta:He,isExternalTarget:We,addListener:S,removeListener:k},Fe=it.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Pe(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=x(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){t=this._startPos.add(this._offset.multiplyBy(t));e&&t._round(),Z(this._el,t),this.fire("step")},_complete:function(){r(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),A=it.extend({options:{crs:lt,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=c(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(w(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ce&&b.any3d&&!b.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),S(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){if((e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(w(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i)&&(void 0!==i.animate&&(i.zoom=l({animate:i.animate},i.zoom),i.pan=l({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,e,i.pan&&i.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(b.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(b.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),t=(t instanceof p?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),n=this.containerPointToLatLng(o.add(t));return this.setView(n,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():g(t);var i=m(e.paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));return(o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0?{center:t.getCenter(),zoom:o}:(e=n.subtract(i).divideBy(2),n=this.project(t.getSouthWest(),o),i=this.project(t.getNorthEast(),o),{center:this.unproject(n.add(i).divideBy(2).add(e),o),zoom:o})},fitBounds:function(t,e){if((t=g(t)).isValid())return t=this._getBoundsCenterZoom(t,e),this.setView(t.center,t.zoom,e);throw new Error("Bounds are not valid.")},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){var i;return e=e||{},(t=m(t).round()).x||t.y?(!0===e.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new Fe,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate?(M(this._mapPane,"leaflet-pan-anim"),i=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend")},flyTo:function(n,o,t){if(!1===(t=t||{}).animate||!b.any3d)return this.setView(n,o,t);this._stop();var s=this.project(this.getCenter()),r=this.project(n),e=this.getSize(),a=this._zoom,h=(n=w(n),o=void 0===o?a:o,Math.max(e.x,e.y)),i=h*this.getZoomScale(a,o),l=r.distanceTo(s)||1,u=1.42,c=u*u;function d(t){t=(i*i-h*h+(t?-1:1)*c*c*l*l)/(2*(t?i:h)*c*l),t=Math.sqrt(t*t+1)-t;return t<1e-9?-18:Math.log(t)}function _(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=d(0);function f(t){return h*(p(m)*(_(t=m+u*t)/p(t))-_(m))/c}var g=Date.now(),v=(d(1)-m)/u,y=t.duration?1e3*t.duration:1e3*v*.8;return this._moveStart(!0,t.noMoveStart),function t(){var e=(Date.now()-g)/y,i=(1-Math.pow(1-e,1.5))*v;e<=1?(this._flyToFrame=x(t,this),this._move(this.unproject(s.add(r.subtract(s).multiplyBy(f(i)/l)),a),this.getScaleZoom(h/(e=i,h*(p(m)/p(m+u*e))),a),{flyTo:!0})):this._move(n,o)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){t=this._getBoundsCenterZoom(t,e);return this.flyTo(t.center,t.zoom,e)},setMaxBounds:function(t){return t=g(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,g(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=m((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),t=this.project(t),s=this.getPixelBounds(),i=_([s.min.add(i),s.max.subtract(n)]),s=i.getSize();return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(s),o.x+=n.x<0?-i.x:i.x,o.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),n=e.divideBy(2).round(),o=i.divideBy(2).round(),n=n.subtract(o);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){var e,i;return t=this._locateOptions=l({timeout:1e4,watch:!1},t),"geolocation"in navigator?(e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this),t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new v(t.coords.latitude,t.coords.longitude),o=n.toBounds(2*t.coords.accuracy),s=this._locateOptions,r=(s.setView&&(e=this.getBoundsZoom(o),this.setView(n,s.maxZoom?Math.min(e,s.maxZoom):e)),{latlng:n,bounds:o,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(r[i]=t.coords[i]);this.fire("locationfound",r)}},addHandler:function(t,e){return e&&(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),T(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(r(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)T(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){e=P("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new s(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=g(t),i=m(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),t=t.getSouthEast(),i=this.getSize().subtract(i),t=_(this.project(t,n),this.project(r,n)).getSize(),r=b.any3d?this.options.zoomSnap:1,a=i.x/t.x,i=i.y/t.y,t=e?Math.max(a,i):Math.min(a,i),n=this.getScaleZoom(t,n);return r&&(n=Math.round(n/(r/100))*(r/100),n=e?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){t=this._getTopLeftPoint(t,e);return new f(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs,t=(e=void 0===e?this._zoom:e,i.zoom(t*i.scale(e)));return isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(w(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(m(t),e)},layerPointToLatLng:function(t){t=m(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(w(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(w(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(g(t))},distance:function(t,e){return this.options.crs.distance(w(t),w(e))},containerPointToLayerPoint:function(t){return m(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return m(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(m(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(w(t)))},mouseEventToContainerPoint:function(t){return De(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=_e(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");S(t,"scroll",this._onScroll,this),this._containerId=h(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&b.any3d,M(t,"leaflet-container"+(b.touch?" leaflet-touch":"")+(b.retina?" leaflet-retina":"")+(b.ielt9?" leaflet-oldie":"")+(b.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),pe(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Z(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(M(t.markerPane,"leaflet-zoom-hide"),M(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Z(this._mapPane,new p(0,0));var n=!this._loaded,o=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return r(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Z(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?k:S;e((this._targets[h(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),b.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){r(this._resizeRequest),this._resizeRequest=x(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[h(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!We(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n=n.length||r||o||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&Me(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){"click"===t.type&&((a=l({},t)).type="preclick",this._fireDOMEvent(a,a.type,i));var n=this._findEventTargets(t,e);if(i){for(var o=[],s=0;s<i.length;s++)i[s].listens(e,!0)&&o.push(i[s]);n=o.concat(n)}if(n.length){"contextmenu"===e&&O(t);var r,a=n[0],h={originalEvent:t};for("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(r=a.getLatLng&&(!a._radius||a._radius<=10),h.containerPoint=r?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=r?a.getLatLng():this.layerPointToLatLng(h.layerPoint)),s=0;s<n.length;s++)if(n[s].fire(e,h,!0),h.originalEvent._stopped||!1===n[s].options.bubblingMouseEvents&&-1!==G(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Pe(this._mapPane)||new p(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){i=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,i){i=this._getNewPixelOrigin(i,e);return _([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){var n,o;return!i||(n=this.project(t,e),o=this.getSize().divideBy(2),o=new f(n.subtract(o),n.add(o)),o=this._getBoundsOffset(o,i,e),Math.abs(o.x)<=1&&Math.abs(o.y)<=1)?t:this.unproject(n.add(o),e)},_limitOffset:function(t,e){var i;return e?(i=new f((i=this.getPixelBounds()).min.add(t),i.max.add(t)),t.add(this._getBoundsOffset(i,e))):t},_getBoundsOffset:function(t,e,i){e=_(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),i=e.min.subtract(t.min),e=e.max.subtract(t.max);return new p(this._rebound(i.x,-e.x),this._rebound(i.y,-e.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=b.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){z(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){t=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(t))&&(this.panBy(t,e),!0)},_createAnimProxy:function(){var t=this._proxy=P("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=ue,i=this._proxy.style[e];be(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){T(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();be(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(!this._animatingZoom){if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/n);if(!0!==i.animate&&!this.getSize().contains(n))return!1;x(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this)}return!0},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,M(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ue(t){return new B(t)}var B=et.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),t=t._controlCorners[i];return M(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(T(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}}),Ve=(A.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var i=this._controlCorners={},n="leaflet-",o=this._controlContainer=P("div",n+"control-container",this._container);function t(t,e){i[t+e]=P("div",n+t+" "+n+e,o)}t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)T(this._controlCorners[t]);T(this._controlContainer),delete this._controlCorners,delete this._controlContainer}}),B.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in c(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return B.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);t=this._getLayer(h(t));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){M(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(M(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):z(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return z(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=P("div",t),i=this.options.collapsed,n=(e.setAttribute("aria-haspopup",!0),Ie(e),Be(e),this._section=P("section",t+"-list")),o=(i&&(this._map.on("click",this.collapse,this),S(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this)),this._layersLink=P("a",t+"-toggle",e));o.href="#",o.title="Layers",o.setAttribute("role","button"),S(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){O(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=P("div",t+"-base",n),this._separator=P("div",t+"-separator",n),this._overlaysList=P("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&h(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(a(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(this._container){me(this._baseLayersList),me(this._overlaysList),this._layerControlInputs=[];for(var t,e,i,n=0,o=0;o<this._layers.length;o++)i=this._layers[o],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,n+=i.overlay?0:1;this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&1<n)?"":"none"),this._separator.style.display=e&&t?"":"none"}return this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(h(t.target)),t=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;t&&this._map.fire(t,e)},_createRadioElement:function(t,e){t='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",e=document.createElement("div");return e.innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),n=(t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+h(this),n),this._layerControlInputs.push(e),e.layerId=h(t.layer),S(e,"click",this._onInputClick,this),document.createElement("span")),o=(n.innerHTML=" "+t.name,document.createElement("span"));return i.appendChild(o),o.appendChild(e),o.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;0<=o;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section,e=(this._preventClick=!0,S(t,"click",O),this.expand(),this);setTimeout(function(){k(t,"click",O),e._preventClick=!1})}})),qe=B.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=P("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){i=P("a",i,n);return i.innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Ie(i),S(i,"click",Re),S(i,"click",o,this),S(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";z(this._zoomInButton,e),z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(M(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(M(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Ge=(A.mergeOptions({zoomControl:!0}),A.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new qe,this.addControl(this.zoomControl))}),B.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=P("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=P("div",e,i)),t.imperial&&(this._iScale=P("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,t=3.2808399*t;5280<t?(i=this._getRoundNum(e=t/5280),this._updateScale(this._iScale,i+" mi",i/e)):(i=this._getRoundNum(t),this._updateScale(this._iScale,i+" ft",i/t))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),t=t/e;return e*(t=10<=t?10:5<=t?5:3<=t?3:2<=t?2:1)}})),Ke=B.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(b.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=P("div","leaflet-control-attribution"),Ie(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}}),n=(A.mergeOptions({attributionControl:!0}),A.addInitHook(function(){this.options.attributionControl&&(new Ke).addTo(this)}),B.Layers=Ve,B.Zoom=qe,B.Scale=Ge,B.Attribution=Ke,Ue.layers=function(t,e,i){return new Ve(t,e,i)},Ue.zoom=function(t){return new qe(t)},Ue.scale=function(t){return new Ge(t)},Ue.attribution=function(t){return new Ke(t)},et.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})),ft=(n.addTo=function(t,e){return t.addHandler(e,this),this},{Events:e}),Ye=b.touch?"touchstart mousedown":"mousedown",Xe=it.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){c(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(S(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Xe._dragging===this&&this.finishDrag(!0),k(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,ve(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Xe._dragging===this&&this.finishDrag():Xe._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Xe._dragging=this)._preventOutline&&Me(this._element),Le(),re(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=Ce(this._element),this._startPoint=new p(i.clientX,i.clientY),this._startPos=Pe(this._element),this._parentScale=Ze(e),i="mousedown"===t.type,S(document,i?"mousemove":"touchmove",this._onMove,this),S(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:!(e=new p((e=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,e.clientY)._subtract(this._startPoint)).x&&!e.y||Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,O(t),this._moved||(this.fire("dragstart"),this._moved=!0,M(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),M(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition()))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Z(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){z(document.body,"leaflet-dragging"),this._lastTarget&&(z(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),k(document,"mousemove touchmove",this._onMove,this),k(document,"mouseup touchend touchcancel",this._onUp,this),Te(),ae();var e=this._moved&&this._moving;this._moving=!1,Xe._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function Je(t,e,i){for(var n,o,s,r,a,h,l,u=[1,4,2,8],c=0,d=t.length;c<d;c++)t[c]._code=si(t[c],e);for(s=0;s<4;s++){for(h=u[s],n=[],c=0,o=(d=t.length)-1;c<d;o=c++)r=t[c],a=t[o],r._code&h?a._code&h||((l=oi(a,r,h,e,i))._code=si(l,e),n.push(l)):(a._code&h&&((l=oi(a,r,h,e,i))._code=si(l,e),n.push(l)),n.push(r));t=n}return t}function $e(t,e){var i,n,o,s,r,a,h;if(!t||0===t.length)throw new Error("latlngs not passed");I(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);for(var l=w([0,0]),u=g(t),c=(u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(l=Qe(t)),t.length),d=[],_=0;_<c;_++){var p=w(t[_]);d.push(e.project(w([p.lat-l.lat,p.lng-l.lng])))}for(_=r=a=h=0,i=c-1;_<c;i=_++)n=d[_],o=d[i],s=n.y*o.x-o.y*n.x,a+=(n.x+o.x)*s,h+=(n.y+o.y)*s,r+=3*s;u=0===r?d[0]:[a/r,h/r],u=e.unproject(m(u));return w([u.lat+l.lat,u.lng+l.lng])}function Qe(t){for(var e=0,i=0,n=0,o=0;o<t.length;o++){var s=w(t[o]);e+=s.lat,i+=s.lng,n++}return w([e/n,i/n])}var ti,gt={__proto__:null,clipPolygon:Je,polygonCenter:$e,centroid:Qe};function ei(t,e){if(e&&t.length){var i=t=function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;n<s;n++)(function(t,e){var i=e.x-t.x,e=e.y-t.y;return i*i+e*e})(t[n],t[o])>e&&(i.push(t[n]),o=n);o<s-1&&i.push(t[s-1]);return i}(t,e=e*e),n=i.length,o=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);o[0]=o[n-1]=1,function t(e,i,n,o,s){var r,a,h,l=0;for(a=o+1;a<=s-1;a++)h=ri(e[a],e[o],e[s],!0),l<h&&(r=a,l=h);n<l&&(i[r]=1,t(e,i,n,o,r),t(e,i,n,r,s))}(i,o,e,0,n-1);var s,r=[];for(s=0;s<n;s++)o[s]&&r.push(i[s]);return r}return t.slice()}function ii(t,e,i){return Math.sqrt(ri(t,e,i,!0))}function ni(t,e,i,n,o){var s,r,a,h=n?ti:si(t,i),l=si(e,i);for(ti=l;;){if(!(h|l))return[t,e];if(h&l)return!1;a=si(r=oi(t,e,s=h||l,i,o),i),s===h?(t=r,h=a):(e=r,l=a)}}function oi(t,e,i,n,o){var s,r,a=e.x-t.x,e=e.y-t.y,h=n.min,n=n.max;return 8&i?(s=t.x+a*(n.y-t.y)/e,r=n.y):4&i?(s=t.x+a*(h.y-t.y)/e,r=h.y):2&i?(s=n.x,r=t.y+e*(n.x-t.x)/a):1&i&&(s=h.x,r=t.y+e*(h.x-t.x)/a),new p(s,r,o)}function si(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function ri(t,e,i,n){var o=e.x,e=e.y,s=i.x-o,r=i.y-e,a=s*s+r*r;return 0<a&&(1<(a=((t.x-o)*s+(t.y-e)*r)/a)?(o=i.x,e=i.y):0<a&&(o+=s*a,e+=r*a)),s=t.x-o,r=t.y-e,n?s*s+r*r:new p(o,e)}function I(t){return!d(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ai(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),I(t)}function hi(t,e){var i,n,o,s,r,a;if(!t||0===t.length)throw new Error("latlngs not passed");I(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);for(var h=w([0,0]),l=g(t),u=(l.getNorthWest().distanceTo(l.getSouthWest())*l.getNorthEast().distanceTo(l.getNorthWest())<1700&&(h=Qe(t)),t.length),c=[],d=0;d<u;d++){var _=w(t[d]);c.push(e.project(w([_.lat-h.lat,_.lng-h.lng])))}for(i=d=0;d<u-1;d++)i+=c[d].distanceTo(c[d+1])/2;if(0===i)a=c[0];else for(n=d=0;d<u-1;d++)if(o=c[d],s=c[d+1],i<(n+=r=o.distanceTo(s))){a=[s.x-(r=(n-i)/r)*(s.x-o.x),s.y-r*(s.y-o.y)];break}l=e.unproject(m(a));return w([l.lat+h.lat,l.lng+h.lng])}var vt={__proto__:null,simplify:ei,pointToSegmentDistance:ii,closestPointOnSegment:function(t,e,i){return ri(t,e,i)},clipSegment:ni,_getEdgeIntersection:oi,_getBitCode:si,_sqClosestPointOnSegment:ri,isFlat:I,_flat:ai,polylineCenter:hi},yt={project:function(t){return new p(t.lng,t.lat)},unproject:function(t){return new v(t.y,t.x)},bounds:new f([-180,-90],[180,90])},xt={R:6378137,R_MINOR:6356752.314245179,bounds:new f([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,o=Math.sqrt(1-o*o),s=o*Math.sin(n),s=Math.tan(Math.PI/4-n/2)/Math.pow((1-s)/(1+s),o/2),n=-i*Math.log(Math.max(s,1e-10));return new p(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,l=.1;h<15&&1e-7<Math.abs(l);h++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=l=Math.PI/2-2*Math.atan(r*e)-a;return new v(a*i,t.x*i/n)}},wt={__proto__:null,LonLat:yt,Mercator:xt,SphericalMercator:rt},Pt=l({},st,{code:"EPSG:3395",projection:xt,transformation:ht(bt=.5/(Math.PI*xt.R),.5,-bt,.5)}),li=l({},st,{code:"EPSG:4326",projection:yt,transformation:ht(1/180,1,-1/180,.5)}),Lt=l({},ot,{projection:yt,transformation:ht(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,e=e.lat-t.lat;return Math.sqrt(i*i+e*e)},infinite:!0}),o=(ot.Earth=st,ot.EPSG3395=Pt,ot.EPSG3857=lt,ot.EPSG900913=ut,ot.EPSG4326=li,ot.Simple=Lt,it.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[h(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[h(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e,i=t.target;i.hasLayer(this)&&(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents&&(e=this.getEvents(),i.on(e,this),this.once("remove",function(){i.off(e,this)},this)),this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this}))}})),ui=(A.include({addLayer:function(t){var e;if(t._layerAdd)return e=h(t),this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this;throw new Error("The provided object is not a Layer.")},removeLayer:function(t){var e=h(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return h(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?d(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[h(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){t=h(t);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var t,e=1/0,i=-1/0,n=this._getZoomSpan();for(t in this._zoomBoundLayers)var o=this._zoomBoundLayers[t].options,e=void 0===o.minZoom?e:Math.min(e,o.minZoom),i=void 0===o.maxZoom?i:Math.max(i,o.maxZoom);this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}}),o.extend({initialize:function(t,e){var i,n;if(c(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){t=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:h})),ci=ui.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ui.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?((t=t in this._layers?this._layers[t]:t).removeEventParent(this),ui.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t,e=new s;for(t in this._layers){var i=this._layers[t];e.extend(i.getBounds?i.getBounds():i.getLatLng())}return e}}),di=et.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){c(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(i)return i=this._createImg(i,e&&"IMG"===e.tagName?e:null),this._setIconStyles(i,t),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i;if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"],n=m(n="number"==typeof n?[n,n]:n),o=m("shadow"===e&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return b.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});var _i=di.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof _i.imagePath&&(_i.imagePath=this._detectIconPath()),(this.options.imagePath||_i.imagePath)+di.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){function e(t,e,i){return(e=e.exec(t))&&e[i]}return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=P("div","leaflet-default-icon-path",document.body),e=pe(t,"background-image")||pe(t,"backgroundImage");return document.body.removeChild(t),(e=this._stripUrl(e))?e:(t=document.querySelector('link[href$="leaflet.css"]'))?t.href.substring(0,t.href.length-"leaflet.css".length-1):""}}),pi=n.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Xe(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),M(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&z(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=Pe(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),a=_(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));a.contains(s)||(o=m((Math.max(a.max.x,s.x)-a.max.x)/(r.max.x-a.max.x)-(Math.min(a.min.x,s.x)-a.min.x)/(r.min.x-a.min.x),(Math.max(a.max.y,s.y)-a.max.y)/(r.max.y-a.max.y)-(Math.min(a.min.y,s.y)-a.min.y)/(r.min.y-a.min.y)).multiplyBy(n),i.panBy(o,{animate:!1}),this._draggable._newPos._add(o),this._draggable._startPos._add(o),Z(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=x(this._adjustPan.bind(this,t)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(r(this._panRequest),this._panRequest=x(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Pe(e._icon),o=e._map.layerPointToLatLng(n);i&&Z(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){r(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),mi=o.extend({options:{icon:new _i,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){c(this,e),this._latlng=w(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=w(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1,i=(i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),M(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&S(i,"focus",this._panOnFocus,this),t.icon.createShadow(this._shadow)),o=!1;i!==this._shadow&&(this._removeShadow(),o=!0),i&&(M(i,e),i.alt=""),this._shadow=i,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&k(this._icon,"focus",this._panOnFocus,this),T(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&T(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Z(this._icon,t),this._shadow&&Z(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(t)},_initInteraction:function(){var t;this.options.interactive&&(M(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),pi&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new pi(this),t&&this.dragging.enable()))},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&C(this._icon,t),this._shadow&&C(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t,e,i=this._map;i&&(t=(e=this.options.icon.options).iconSize?m(e.iconSize):m(0,0),e=e.iconAnchor?m(e.iconAnchor):m(0,0),i.panInside(this._latlng,{paddingTopLeft:e,paddingBottomRight:t.subtract(e)}))},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var fi=o.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return c(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),gi=fi.extend({options:{fill:!0,radius:10},initialize:function(t,e){c(this,e),this._latlng=w(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=w(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return fi.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),t=[t+i,e+i];this._pxBounds=new f(this._point.subtract(t),this._point.add(t))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var vi=gi.extend({initialize:function(t,e,i){if(c(this,e="number"==typeof e?l({},i,{radius:e}):e),this._latlng=w(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new s(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:fi.prototype.setStyle,_project:function(){var t,e,i,n,o,s=this._latlng.lng,r=this._latlng.lat,a=this._map,h=a.options.crs;h.distance===st.distance?(n=Math.PI/180,o=this._mRadius/st.R/n,t=a.project([r+o,s]),e=a.project([r-o,s]),e=t.add(e).divideBy(2),i=a.unproject(e).lat,n=Math.acos((Math.cos(o*n)-Math.sin(r*n)*Math.sin(i*n))/(Math.cos(r*n)*Math.cos(i*n)))/n,!isNaN(n)&&0!==n||(n=o/Math.cos(Math.PI/180*r)),this._point=e.subtract(a.getPixelOrigin()),this._radius=isNaN(n)?0:e.x-a.project([i,s-n]).x,this._radiusY=e.y-t.y):(o=h.unproject(h.project(this._latlng).subtract([this._mRadius,0])),this._point=a.latLngToLayerPoint(this._latlng),this._radius=this._point.x-a.latLngToLayerPoint(o).x),this._updateBounds()}});var yi=fi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){c(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,i=null,n=ri,o=0,s=this._parts.length;o<s;o++)for(var r=this._parts[o],a=1,h=r.length;a<h;a++){var l,u,c=n(t,l=r[a-1],u=r[a],!0);c<e&&(e=c,i=n(t,l,u))}return i&&(i.distance=Math.sqrt(e)),i},getCenter:function(){if(this._map)return hi(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=w(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new s,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return I(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=I(t),n=0,o=t.length;n<o;n++)i?(e[n]=w(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new f;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),t=new p(t,t);this._rawPxBounds&&(this._pxBounds=new f([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(t,e,i){var n,o,s=t[0]instanceof v,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,i,n,o,s=this._parts,r=0,a=0,h=this._rings.length;r<h;r++)for(e=0,i=(o=this._rings[r]).length;e<i-1;e++)(n=ni(o[e],o[e+1],t,e,!0))&&(s[a]=s[a]||[],s[a].push(n[0]),n[1]===o[e+1]&&e!==i-2||(s[a].push(n[1]),a++))},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=ei(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,s,r,a,h=this._clickTolerance();if(this._pxBounds&&this._pxBounds.contains(t))for(i=0,s=this._parts.length;i<s;i++)for(n=0,o=(r=(a=this._parts[i]).length)-1;n<r;o=n++)if((e||0!==n)&&ii(t,a[o],a[n])<=h)return!0;return!1}});yi._flat=ai;var xi=yi.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(this._map)return $e(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")},_convertLatLngs:function(t){var t=yi.prototype._convertLatLngs.call(this,t),e=t.length;return 2<=e&&t[0]instanceof v&&t[0].equals(t[e-1])&&t.pop(),t},_setLatLngs:function(t){yi.prototype._setLatLngs.call(this,t),I(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(I(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,e=new p(e,e),t=new f(t.min.subtract(e),t.max.add(e));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,n=0,o=this._rings.length;n<o;n++)(i=Je(this._rings[n],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,s,r,a,h,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(h=(e=this._parts[o]).length)-1;s<h;r=s++)i=e[s],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||yi.prototype._containsPoint.call(this,t,!0)}});var wi=ci.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=d(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s,r=this.options;return(!r.filter||r.filter(t))&&(s=bi(t,r))?(s.feature=Zi(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=l({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function bi(t,e){var i,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],l=e&&e.pointToLayer,u=e&&e.coordsToLatLng||Li;if(!a&&!r)return null;switch(r.type){case"Point":return Pi(l,t,i=u(a),e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)i=u(a[o]),h.push(Pi(l,t,i,e));return new ci(h);case"LineString":case"MultiLineString":return n=Ti(a,"LineString"===r.type?0:1,u),new yi(n,e);case"Polygon":case"MultiPolygon":return n=Ti(a,"Polygon"===r.type?1:2,u),new xi(n,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=bi({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);c&&h.push(c)}return new ci(h);case"FeatureCollection":for(o=0,s=r.features.length;o<s;o++){var d=bi(r.features[o],e);d&&h.push(d)}return new ci(h);default:throw new Error("Invalid GeoJSON object.")}}function Pi(t,e,i,n){return t?t(e,i):new mi(i,n&&n.markersInheritOptions&&n)}function Li(t){return new v(t[1],t[0],t[2])}function Ti(t,e,i){for(var n,o=[],s=0,r=t.length;s<r;s++)n=e?Ti(t[s],e-1,i):(i||Li)(t[s]),o.push(n);return o}function Mi(t,e){return void 0!==(t=w(t)).alt?[i(t.lng,e),i(t.lat,e),i(t.alt,e)]:[i(t.lng,e),i(t.lat,e)]}function zi(t,e,i,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?zi(t[s],I(t[s])?0:e-1,i,n):Mi(t[s],n));return!e&&i&&0<o.length&&o.push(o[0].slice()),o}function Ci(t,e){return t.feature?l({},t.feature,{geometry:e}):Zi(e)}function Zi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}Tt={toGeoJSON:function(t){return Ci(this,{type:"Point",coordinates:Mi(this.getLatLng(),t)})}};function Si(t,e){return new wi(t,e)}mi.include(Tt),vi.include(Tt),gi.include(Tt),yi.include({toGeoJSON:function(t){var e=!I(this._latlngs);return Ci(this,{type:(e?"Multi":"")+"LineString",coordinates:zi(this._latlngs,e?1:0,!1,t)})}}),xi.include({toGeoJSON:function(t){var e=!I(this._latlngs),i=e&&!I(this._latlngs[0]),t=zi(this._latlngs,i?2:e?1:0,!0,t);return Ci(this,{type:(i?"Multi":"")+"Polygon",coordinates:t=e?t:[t]})}}),ui.include({toMultiPoint:function(e){var i=[];return this.eachLayer(function(t){i.push(t.toGeoJSON(e).geometry.coordinates)}),Ci(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(e){var i,n,t=this.feature&&this.feature.geometry&&this.feature.geometry.type;return"MultiPoint"===t?this.toMultiPoint(e):(i="GeometryCollection"===t,n=[],this.eachLayer(function(t){t.toGeoJSON&&(t=t.toGeoJSON(e),i?n.push(t.geometry):"FeatureCollection"===(t=Zi(t)).type?n.push.apply(n,t.features):n.push(t))}),i?Ci(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n})}});var Mt=Si,Ei=o.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=g(e),c(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(M(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){T(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&fe(this._image),this},bringToBack:function(){return this._map&&ge(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=g(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:P("img");M(e,"leaflet-image-layer"),this._zoomAnimated&&M(e,"leaflet-zoom-animated"),this.options.className&&M(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=a(this.fire,this,"load"),e.onerror=a(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),t=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;be(this._image,t,e)},_reset:function(){var t=this._image,e=new f(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Z(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){C(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),ki=Ei.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:P("video");if(M(e,"leaflet-image-layer"),this._zoomAnimated&&M(e,"leaflet-zoom-animated"),this.options.className&&M(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=a(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=0<i.length?n:[e.src]}else{d(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;s<this._url.length;s++){var r=P("source");r.src=this._url[s],e.appendChild(r)}}}});var Oi=Ei.extend({_initImage:function(){var t=this._image=this._url;M(t,"leaflet-image-layer"),this._zoomAnimated&&M(t,"leaflet-zoom-animated"),this.options.className&&M(t,this.options.className),t.onselectstart=u,t.onmousemove=u}});var Ai=o.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof v||d(t))?(this._latlng=w(t),c(this,e)):(c(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&C(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&C(this._container,1),this.bringToFront(),this.options.interactive&&(M(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(C(this._container,0),this._removeTimeout=setTimeout(a(T,void 0,this._container),200)):T(this._container),this.options.interactive&&(z(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=w(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&fe(this._container),this},bringToBack:function(){return this._map&&ge(this._container),this},_prepareOpen:function(t){if(!(i=this._source)._map)return!1;if(i instanceof ci){var e,i=null,n=this._source._layers;for(e in n)if(n[e]._map){i=n[e];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){var t,e,i;this._map&&(e=this._map.latLngToLayerPoint(this._latlng),t=m(this.options.offset),i=this._getAnchor(),this._zoomAnimated?Z(this._container,e.add(i)):t=t.add(e).add(i),e=this._containerBottom=-t.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+t.x,this._container.style.bottom=e+"px",this._container.style.left=i+"px")},_getAnchor:function(){return[0,0]}}),Bi=(A.include({_initOverlay:function(t,e,i,n){var o=e;return o instanceof t||(o=new t(n).setContent(e)),i&&o.setLatLng(i),o}}),o.include({_initOverlay:function(t,e,i,n){var o=i;return o instanceof t?(c(o,n),o._source=this):(o=e&&!n?e:new t(n,this)).setContent(i),o}}),Ai.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ai.prototype.openOn.call(this,t)},onAdd:function(t){Ai.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof fi||this._source.on("preclick",Ae))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof fi||this._source.off("preclick",Ae))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=P("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=P("div",t+"-content-wrapper",e);this._contentNode=P("div",t+"-content",i),Ie(e),Be(this._contentNode),S(e,"contextmenu",Ae),this._tipContainer=P("div",t+"-tip-container",e),this._tip=P("div",t+"-tip",this._tipContainer),this.options.closeButton&&((i=this._closeButton=P("a",t+"-close-button",e)).setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',S(i,"click",function(t){O(t),this.close()},this))},_updateLayout:function(){var t=this._contentNode,e=t.style,i=(e.width="",e.whiteSpace="nowrap",t.offsetWidth),i=Math.min(i,this.options.maxWidth),i=(i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="",t.offsetHeight),n=this.options.maxHeight,o="leaflet-popup-scrolled";(n&&n<i?(e.height=n+"px",M):z)(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();Z(this._container,t.add(e))},_adjustPan:function(){var t,e,i,n,o,s,r,a;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning?this._autopanning=!1:(t=this._map,e=parseInt(pe(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+e,a=this._containerWidth,(i=new p(this._containerLeft,-e-this._containerBottom))._add(Pe(this._container)),i=t.layerPointToContainerPoint(i),o=m(this.options.autoPanPadding),n=m(this.options.autoPanPaddingTopLeft||o),o=m(this.options.autoPanPaddingBottomRight||o),s=t.getSize(),r=0,i.x+a+o.x>s.x&&(r=i.x+a-s.x+o.x),i.x-r-n.x<(a=0)&&(r=i.x-n.x),i.y+e+o.y>s.y&&(a=i.y+e-s.y+o.y),i.y-a-n.y<0&&(a=i.y-n.y),(r||a)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([r,a]))))},_getAnchor:function(){return m(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ii=(A.mergeOptions({closePopupOnClick:!0}),A.include({openPopup:function(t,e,i){return this._initOverlay(Bi,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),o.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Bi,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof ci||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Re(t),e=t.layer||t.target,this._popup._source!==e||e instanceof fi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=P("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),i=i.layerPointToContainerPoint(t),s=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,h=m(this.options.offset),l=this._getAnchor(),i="top"===s?(e=r/2,a):"bottom"===s?(e=r/2,0):(e="center"===s?r/2:"right"===s?0:"left"===s?r:i.x<o.x?(s="right",0):(s="left",r+2*(h.x+l.x)),a/2);t=t.subtract(m(e,i,!0)).add(h).add(l),z(n,"leaflet-tooltip-right"),z(n,"leaflet-tooltip-left"),z(n,"leaflet-tooltip-top"),z(n,"leaflet-tooltip-bottom"),M(n,"leaflet-tooltip-"+s),Z(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&C(this._container,t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(t)},_getAnchor:function(){return m(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}})),Ri=(A.include({openTooltip:function(t,e,i){return this._initOverlay(Ii,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),o.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ii,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){var e,i;!t&&this._tooltipHandlersAdded||(e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t)},openTooltip:function(t){return this._tooltip&&(this instanceof ci||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(S(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),S(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){t="function"==typeof t.getElement&&t.getElement();t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){var e;this._tooltip&&this._map&&(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag?(this._openOnceFlag=!0,(e=this)._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)})):(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)))},_moveTooltip:function(t){var e=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(t=this._map.mouseEventToContainerPoint(t.originalEvent),t=this._map.containerPointToLayerPoint(t),e=this._map.layerPointToLatLng(t)),this._tooltip.setLatLng(e)}}),di.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var t=t&&"DIV"===t.tagName?t:document.createElement("div"),e=this.options;return e.html instanceof Element?(me(t),t.appendChild(e.html)):t.innerHTML=!1!==e.html?e.html:"",e.bgPos&&(e=m(e.bgPos),t.style.backgroundPosition=-e.x+"px "+-e.y+"px"),this._setIconStyles(t,"icon"),t},createShadow:function(){return null}}));di.Default=_i;var Ni=o.extend({options:{tileSize:256,opacity:1,updateWhenIdle:b.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){c(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),T(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ge(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){var t;return this._map&&(this._removeAllTiles(),(t=this._clampZoom(this._map.getZoom()))!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=j(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof p?t:new p(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!b.ielt9){C(this._container,this.options.opacity);var t,e=+new Date,i=!1,n=!1;for(t in this._tiles){var o,s=this._tiles[t];s.current&&s.loaded&&(o=Math.min(1,(e-s.loaded)/200),C(s.el,o),o<1?i=!0:(s.active?n=!0:this._onOpaqueTile(s),s.active=!0))}n&&!this._noPrune&&this._pruneTiles(),i&&(r(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=P("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(T(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=P("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),u(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,i,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)(i=this._tiles[t]).current&&!i.active&&(e=i.coords,this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)T(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var t=Math.floor(t/2),e=Math.floor(e/2),i=i-1,o=new p(+t,+e),o=(o.z=i,this._tileCoordsToKey(o)),o=this._tiles[o];return o&&o.active?o.retain=!0:(o&&o.loaded&&(o.retain=!0),n<i&&this._retainParent(t,e,i,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new p(o,s),r=(r.z=i+1,this._tileCoordsToKey(r)),r=this._tiles[r];r&&r.active?r.retain=!0:(r&&r.loaded&&(r.retain=!0),i+1<n&&this._retainChildren(o,s,i+1,n))}},_resetView:function(t){t=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=Math.round(e),o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),e=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();b.any3d?be(t.el,e,n):Z(t.el,e)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(i,this._tileZoom),t=e.project(t,this._tileZoom).floor(),e=e.getSize().divideBy(2*i);return new f(t.subtract(e),t.add(e))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n,e=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(e),s=o.getCenter(),r=[],e=this.options.keepBuffer,a=new f(o.getBottomLeft().subtract([e,-e]),o.getTopRight().add([e,-e]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(n in this._tiles){var h=this._tiles[n].coords;h.z===this._tileZoom&&a.contains(new p(h.x,h.y))||(this._tiles[n].current=!1)}if(1<Math.abs(i-this._tileZoom))this._setView(t,i);else{for(var l=o.min.y;l<=o.max.y;l++)for(var u=o.min.x;u<=o.max.x;u++){var c,d=new p(u,l);d.z=this._tileZoom,this._isValidTile(d)&&((c=this._tiles[this._tileCoordsToKey(d)])?c.current=!0:r.push(d))}if(r.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));for(var _=document.createDocumentFragment(),u=0;u<r.length;u++)this._addTile(r[u],_);this._level.el.appendChild(_)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),g(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new s(t[0],t[1]);return t=this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var t=t.split(":"),e=new p(+t[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(T(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){M(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,b.ielt9&&this.options.opacity<1&&C(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&x(a(this._tileReady,this,t,null,o)),Z(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(C(i.el,0),r(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(M(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),b.ielt9||!this._map._fadeAnimated?x(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(this._wrapX?H(t.x,this._wrapX):t.x,this._wrapY?H(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new f(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var Di=Ni.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&b.retina&&0<e.maxZoom?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return S(i,"load",a(this._tileOnLoad,this,e,i)),S(i,"error",a(this._tileOnError,this,e,i)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:b.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(t=this._globalTileRange.max.y-t.y,this.options.tms&&(e.y=t),e["-y"]=t),q(this._url,l(e,this.options))},_tileOnLoad:function(t,e){b.ielt9?setTimeout(a(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return(t=this.options.zoomReverse?e-t:t)+this.options.zoomOffset},_getSubdomain:function(t){t=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var t,e,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=u,i.onerror=u,i.complete||(i.src=K,e=this._tiles[t].coords,T(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})))},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",K),Ni.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==K))return Ni.prototype._tileReady.call(this,t,e,i)}});function ji(t,e){return new Di(t,e)}var Hi=Di.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i,n=l({},this.defaultWmsParams);for(i in e)i in this.options||(n[i]=e[i]);var t=(e=c(this,e)).detectRetina&&b.retina?2:1,o=this.getTileSize();n.width=o.x*t,n.height=o.y*t,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,Di.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,i=_(i.project(e[0]),i.project(e[1])),e=i.min,i=i.max,e=(1.3<=this._wmsVersion&&this._crs===li?[e.y,e.x,i.y,i.x]:[e.x,e.y,i.x,i.y]).join(","),i=Di.prototype.getTileUrl.call(this,t);return i+U(this.wmsParams,i,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+e},setParams:function(t,e){return l(this.wmsParams,t),e||this.redraw(),this}});Di.WMS=Hi,ji.wms=function(t,e){return new Hi(t,e)};var Wi=o.extend({options:{padding:.1},initialize:function(t){c(this,t),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),M(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),n=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));b.any3d?be(this._container,n,i):Z(this._container,n)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new f(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Fi=Wi.extend({options:{tolerance:0},getEvents:function(){var t=Wi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Wi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");S(t,"mousemove",this._onMouseMove,this),S(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),S(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){r(this._redrawRequest),delete this._ctx,T(this._container),k(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){var t,e,i,n;this._map._animatingZoom&&this._bounds||(Wi.prototype._update.call(this),t=this._bounds,e=this._container,i=t.getSize(),n=b.retina?2:1,Z(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",b.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){Wi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);t=(this._layers[h(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,e=e.prev;i?i.prev=e:this._drawLast=e,e?e.next=i:this._drawFirst=i,delete t._order,delete this._layers[h(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){for(var e,i=t.options.dashArray.split(/[, ]+/),n=[],o=0;o<i.length;o++){if(e=Number(i[o]),isNaN(e))return;n.push(e)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||x(this._redraw,this))},_extendRedrawBounds:function(t){var e;t._pxBounds&&(e=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new f,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,e=this._redrawBounds;e?(t=e.getSize(),this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var t,e,i=this._redrawBounds;this._ctx.save(),i&&(e=i.getSize(),this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()),this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(h.beginPath(),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],h[n?"lineTo":"moveTo"](s.x,s.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){var e,i,n,o;this._drawing&&!t._empty()&&(e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),1!=(o=(Math.max(Math.round(t._radiusY),1)||n)/n)&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!=o&&i.restore(),this._fillStroke(i,t))},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&(("click"===t.type||"preclick"===t.type)&&this._map._draggableMoved(e)||(i=e));this._fireEvent(!!i&&[i],t)},_onMouseMove:function(t){var e;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(e=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,e))},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(z(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(M(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e,i,n=t._order;n&&(e=n.next,i=n.prev,e&&((e.prev=i)?i.next=e:e&&(this._drawFirst=e),n.prev=this._drawLast,(this._drawLast.next=n).next=null,this._drawLast=n,this._requestRedraw(t)))},_bringToBack:function(t){var e,i,n=t._order;n&&(e=n.next,(i=n.prev)&&((i.next=e)?e.prev=i:i&&(this._drawLast=i),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)))}});function Ui(t){return b.canvas?new Fi(t):null}var Vi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zt={_initContainer:function(){this._container=P("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vi("shape");M(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;T(e),t.removeInteractiveTarget(e),delete this._layers[h(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Vi("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=d(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Vi("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){fe(t._container)},_bringToBack:function(t){ge(t._container)}},qi=b.vml?Vi:ct,Gi=Wi.extend({_initContainer:function(){this._container=qi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){T(this._container),k(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Wi.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Z(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=qi("path");t.options.className&&M(e,t.options.className),t.options.interactive&&M(e,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){T(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,dt(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){fe(t._path)},_bringToBack:function(t){ge(t._path)}});function Ki(t){return b.svg||b.vml?new Gi(t):null}b.vml&&Gi.include(zt),A.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){var e;return"overlayPane"!==t&&void 0!==t&&(void 0===(e=this._paneRenderers[t])&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e)},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Ki(t)}});var Yi=xi.extend({initialize:function(t,e){xi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=g(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Gi.create=qi,Gi.pointsToPath=dt,wi.geometryToLayer=bi,wi.coordsToLatLng=Li,wi.coordsToLatLngs=Ti,wi.latLngToCoords=Mi,wi.latLngsToCoords=zi,wi.getFeature=Ci,wi.asFeature=Zi,A.mergeOptions({boxZoom:!0});var _t=n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){S(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){k(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){T(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),re(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),S(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=P("div","leaflet-zoom-box",this._container),M(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var t=new f(this._point,this._startPoint),e=t.getSize();Z(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(T(this._box),z(this._container,"leaflet-crosshair")),ae(),Te(),k(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0),t=new s(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ct=(A.addInitHook("addHandler","boxZoom",_t),A.mergeOptions({doubleClickZoom:!0}),n.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,i=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}})),Zt=(A.addInitHook("addHandler","doubleClickZoom",Ct),A.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),n.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Xe(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),M(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){z(this._map._container,"leaflet-grab"),z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=g(this._map.options.maxBounds),this._offsetLimit=_(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){var t,e;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit,t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,n=(n+e+i)%t-e-i,t=Math.abs(o+i)<Math.abs(n+i)?o:n;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=t},_onDragEnd:function(t){var e,i,n,o,s=this._map,r=s.options,a=!r.inertia||t.noInertia||this._times.length<2;s.fire("dragend",t),!a&&(this._prunePositions(+new Date),t=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,e=r.easeLinearity,a=(t=t.multiplyBy(e/a)).distanceTo([0,0]),i=Math.min(r.inertiaMaxSpeed,a),t=t.multiplyBy(i/a),n=i/(r.inertiaDeceleration*e),(o=t.multiplyBy(-n/2).round()).x||o.y)?(o=s._limitOffset(o,s.options.maxBounds),x(function(){s.panBy(o,{duration:n,easeLinearity:e,noMoveStart:!0,animate:!0})})):s.fire("moveend")}})),St=(A.addInitHook("addHandler","dragging",Zt),A.mergeOptions({keyboard:!0,keyboardPanDelta:80}),n.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),S(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),k(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var t,e,i;this._focused||(i=document.body,t=document.documentElement,e=i.scrollTop||t.scrollTop,i=i.scrollLeft||t.scrollLeft,this._map._container.focus(),window.scrollTo(i,e))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var e=this._panKeys={},i=this.keyCodes,n=0,o=i.left.length;n<o;n++)e[i.left[n]]=[-1*t,0];for(n=0,o=i.right.length;n<o;n++)e[i.right[n]]=[t,0];for(n=0,o=i.down.length;n<o;n++)e[i.down[n]]=[0,t];for(n=0,o=i.up.length;n<o;n++)e[i.up[n]]=[0,-1*t]},_setZoomDelta:function(t){for(var e=this._zoomKeys={},i=this.keyCodes,n=0,o=i.zoomIn.length;n<o;n++)e[i.zoomIn[n]]=t;for(n=0,o=i.zoomOut.length;n<o;n++)e[i.zoomOut[n]]=-t},_addHooks:function(){S(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){k(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i,n=t.keyCode,o=this._map;if(n in this._panKeys)o._panAnim&&o._panAnim._inProgress||(i=this._panKeys[n],t.shiftKey&&(i=m(i).multiplyBy(3)),o.options.maxBounds&&(i=o._limitOffset(m(i),o.options.maxBounds)),o.options.worldCopyJump?(e=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(i))),o.panTo(e)):o.panBy(i));else if(n in this._zoomKeys)o.setZoom(o.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!o._popup||!o._popup.options.closeOnEscapeKey)return;o.closePopup()}Re(t)}}})),Et=(A.addInitHook("addHandler","keyboard",St),A.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),n.extend({addHooks:function(){S(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){k(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=He(t),i=this._map.options.wheelDebounceTime,e=(this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date),Math.max(i-(+new Date-this._startTime),0));clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),e),Re(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0,n=(t._stop(),this._delta/(4*this._map.options.wheelPxPerZoomLevel)),n=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,i=i?Math.ceil(n/i)*i:n,n=t._limitZoom(e+(0<this._delta?i:-i))-e;this._delta=0,this._startTime=null,n&&("center"===t.options.scrollWheelZoom?t.setZoom(e+n):t.setZoomAround(this._lastMousePos,e+n))}})),kt=(A.addInitHook("addHandler","scrollWheelZoom",Et),A.mergeOptions({tapHold:b.touchNative&&b.safari&&b.mobile,tapTolerance:15}),n.extend({addHooks:function(){S(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){k(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){var e;clearTimeout(this._holdTimeout),1===t.touches.length&&(e=t.touches[0],this._startPos=this._newPos=new p(e.clientX,e.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(S(document,"touchend",O),S(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),600),S(document,"touchend touchcancel contextmenu",this._cancel,this),S(document,"touchmove",this._onMove,this))},_cancelClickPrevent:function t(){k(document,"touchend",O),k(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),k(document,"touchend touchcancel contextmenu",this._cancel,this),k(document,"touchmove",this._onMove,this)},_onMove:function(t){t=t.touches[0];this._newPos=new p(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){t=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});t._simulated=!0,e.target.dispatchEvent(t)}})),Ot=(A.addInitHook("addHandler","tapHold",kt),A.mergeOptions({touchZoom:b.touch,bounceAtZoomLimits:!0}),n.extend({addHooks:function(){M(this._map._container,"leaflet-touch-zoom"),S(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){z(this._map._container,"leaflet-touch-zoom"),k(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e,i,n=this._map;!t.touches||2!==t.touches.length||n._animatingZoom||this._zooming||(e=n.mouseEventToContainerPoint(t.touches[0]),i=n.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),"center"!==n.options.touchZoom&&(this._pinchStartLatLng=n.containerPointToLatLng(e.add(i)._divideBy(2))),this._startDist=e.distanceTo(i),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),S(document,"touchmove",this._onTouchMove,this),S(document,"touchend touchcancel",this._onTouchEnd,this),O(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&1<o)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{i=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===i.x&&0===i.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(i),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),r(this._animRequest);n=a(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=x(n,this,!0),O(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,r(this._animRequest),k(document,"touchmove",this._onTouchMove,this),k(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}})),Xi=(A.addInitHook("addHandler","touchZoom",Ot),A.BoxZoom=_t,A.DoubleClickZoom=Ct,A.Drag=Zt,A.Keyboard=St,A.ScrollWheelZoom=Et,A.TapHold=kt,A.TouchZoom=Ot,t.Bounds=f,t.Browser=b,t.CRS=ot,t.Canvas=Fi,t.Circle=vi,t.CircleMarker=gi,t.Class=et,t.Control=B,t.DivIcon=Ri,t.DivOverlay=Ai,t.DomEvent=mt,t.DomUtil=pt,t.Draggable=Xe,t.Evented=it,t.FeatureGroup=ci,t.GeoJSON=wi,t.GridLayer=Ni,t.Handler=n,t.Icon=di,t.ImageOverlay=Ei,t.LatLng=v,t.LatLngBounds=s,t.Layer=o,t.LayerGroup=ui,t.LineUtil=vt,t.Map=A,t.Marker=mi,t.Mixin=ft,t.Path=fi,t.Point=p,t.PolyUtil=gt,t.Polygon=xi,t.Polyline=yi,t.Popup=Bi,t.PosAnimation=Fe,t.Projection=wt,t.Rectangle=Yi,t.Renderer=Wi,t.SVG=Gi,t.SVGOverlay=Oi,t.TileLayer=Di,t.Tooltip=Ii,t.Transformation=at,t.Util=tt,t.VideoOverlay=ki,t.bind=a,t.bounds=_,t.canvas=Ui,t.circle=function(t,e,i){return new vi(t,e,i)},t.circleMarker=function(t,e){return new gi(t,e)},t.control=Ue,t.divIcon=function(t){return new Ri(t)},t.extend=l,t.featureGroup=function(t,e){return new ci(t,e)},t.geoJSON=Si,t.geoJson=Mt,t.gridLayer=function(t){return new Ni(t)},t.icon=function(t){return new di(t)},t.imageOverlay=function(t,e,i){return new Ei(t,e,i)},t.latLng=w,t.latLngBounds=g,t.layerGroup=function(t,e){return new ui(t,e)},t.map=function(t,e){return new A(t,e)},t.marker=function(t,e){return new mi(t,e)},t.point=m,t.polygon=function(t,e){return new xi(t,e)},t.polyline=function(t,e){return new yi(t,e)},t.popup=function(t,e){return new Bi(t,e)},t.rectangle=function(t,e){return new Yi(t,e)},t.setOptions=c,t.stamp=h,t.svg=Ki,t.svgOverlay=function(t,e,i){return new Oi(t,e,i)},t.tileLayer=ji,t.tooltip=function(t,e){return new Ii(t,e)},t.transformation=ht,t.version="1.9.4",t.videoOverlay=function(t,e,i){return new ki(t,e,i)},window.L);t.noConflict=function(){return window.L=Xi,this},window.L=t});
6document.addEventListener('splideReady',function(e){e.detail.defaults={arrowPath:'M31.1923 23.6715L17.9473 37.294L17.8795 37.3637L17.9473 37.4334L21.4828 41.0697L21.5545 41.1435L21.6262 41.0697L41.0717 21.0699L41.1395 21.0002L41.0717 20.9304L21.6262 0.93029L21.5545 0.856547L21.4828 0.930291L17.9473 4.56665L17.8795 4.63636L17.9473 4.70607L31.1923 18.3289H1H0.9V18.4289V23.5715V23.6715H1H31.1923Z',}});document.addEventListener('DOMContentLoaded',()=>{const default_vars={"sm":["576px","1px"],"md":["992px","2px"],"lg":["1200px","3px"],"xl":["1621px","4px"],} 7const regex_breakpoints=new RegExp('(min-width|max-width):\\s('+default_vars.sm.join('|')+'|'+default_vars.md.join('|')+'|'+default_vars.lg.join('|')+'|'+default_vars.xl.join('|')+')','g');const prefix_breakpoints='--wp--custom--greyd--grid--breakpoint--';var all_vars={"sm":default_vars.sm[0],"md":default_vars.md[0],"lg":default_vars.lg[0],"xl":default_vars.xl[0],};var found={};var styleSheets=document.styleSheets;const foundAll=()=>{return found.sm&&found.md&&found.lg};const searchRules=(rules)=>{if(typeof rules==='undefined'||(element&&element.sheet.cssRules.length==0))return;for(var i=0;i<rules.length;i++){if(typeof rules[i].style==='undefined'||rules[i].style.length==0)continue;for(var j=0;j<rules[i].style.length;j++){if(!rules[i].style[j].startsWith(prefix_breakpoints))continue;var key=rules[i].style[j];all_vars[key.replace(prefix_breakpoints,'')]=rules[i].style.getPropertyValue(key);found[key.replace(prefix_breakpoints,'')]=!0;if(foundAll())break} 8if(foundAll())break}};const injectRules=(rules)=>{if(typeof rules==='undefined'||rules.length==0)return;for(var i=0;i<rules.length;i++){if(typeof rules[i].media==='undefined')continue;var media_text=rules[i].media.mediaText;var media=regex_breakpoints.exec(media_text);while(media!=null){var[match,rule,value]=media;var breakpoint=value;if(default_vars.sm.indexOf(value)>-1)breakpoint=all_vars.sm;else if(default_vars.md.indexOf(value)>-1)breakpoint=all_vars.md;else if(default_vars.lg.indexOf(value)>-1)breakpoint=all_vars.lg;else if(default_vars.xl.indexOf(value)>-1)breakpoint=all_vars.xl;if(rule=="max-width"){breakpoint=(parseInt(breakpoint)-0.02)+"px"} 9media_text=media_text.replace(match,rule+': '+breakpoint);media=regex_breakpoints.exec(media_text)} 10if(rules[i].media.mediaText!=media_text){rules[i].media.mediaText=media_text}}};var element=document.getElementById('global-styles-inline-css');if(element?.sheet?.cssRules&&element.sheet.cssRules.length>0){searchRules(element.sheet.cssRules)}else{for(var i=0;i<styleSheets.length;i++){if(styleSheets[i].href!=null)continue;searchRules(styleSheets[i].cssRules);if(foundAll())break}} 11for(var i=0;i<styleSheets.length;i++){if(styleSheets[i].href==null)continue;if(styleSheets[i].href.indexOf(location.origin)!==0)continue;injectRules(styleSheets[i].cssRules)}});'use strict';var aria=aria||{};aria.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,SHIFT:16,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,};document.addEventListener("DOMContentLoaded",function(){greyd.popover.init()}) 12var greyd=greyd||{} 13greyd.popover=new function(){this.resizeObserver=!1;this.setVwUnit=function(){var vw=document.body.clientWidth/100;document.body.style.setProperty('--vw-unit',vw+'px')} 14this.init=function(){this.resizeObserver=new ResizeObserver((entries)=>{for(var entry of entries){var popover=entry.target;if(typeof popover.onupdatevars==='function')popover.onupdatevars()}});window.addEventListener('resize',greyd.popover.setVwUnit);this.setVwUnit();window.addEventListener('click',()=>{window.dispatchEvent(new Event('closePopovers'))});this.initPopover()} 15this.initPopover=function(){const popovers=[].slice.call(document.querySelectorAll(".wp-block-greyd-popover"));if(popovers.length===0)return;popovers.forEach(function(popover){if(popover.dataset.initialized)return;popover.dataset.initialized=!0;const dialog=popover.querySelector(".wp-block-greyd-popover-popup > [role=dialog]");if(!dialog)return;const dialogId=dialog.getAttribute("id");const buttons=[].slice.call(popover.querySelectorAll("[role=button][aria-expanded][aria-controls='"+dialogId+"']"));const backdrop=popover.querySelector(".dialog-backdrop");if(buttons.length===0)return;const openPopover=(elem)=>{window.dispatchEvent(new Event('closePopovers'));buttons.forEach(function(button){button.setAttribute("aria-expanded","true");if(button.classList.contains("greyd-burger-btn")){button.childNodes[0].classList?.add('is-active')}});elem=elem?elem:buttons[0];openDialog(elem.getAttribute('aria-controls'),elem);popover.onupdatevars=()=>
15{if(dialog.hasAttribute("open"))computeVars(elem)} 16greyd.popover.resizeObserver.observe(popover)} 17const closePopover=(elem)=>{if(!dialog.hasAttribute("open"))return;buttons.forEach(function(button){button.setAttribute("aria-expanded","false");if(button.classList.contains("greyd-burger-btn")){button.childNodes[0].classList?.remove('is-active')}});closeDialog(elem);popover.onupdatevars=undefined;greyd.popover.resizeObserver.unobserve(popover);if(dialog.classList.contains('is-variation-offcanvas')){document.body.onupdatevars=undefined;greyd.popover.resizeObserver.unobserve(document.body);document.body.classList.remove('is-position-default');document.body.classList.remove('is-position-left');document.body.classList.remove('is-position-top');document.body.classList.remove('is-position-bottom');setTimeout(()=>{document.body.classList.remove('is-offcanvas');document.body.style.removeProperty('--offcanvas-delta')},300)}} 18const initVars=(button)=>{if(button.classList.contains('popover-close-button'))return;if(dialog.classList.contains('is-variation-dropdown')){var margin=button.classList.contains('aligncenter')?'0 auto':'0';if(button.classList.contains('alignright'))margin='0 0 0 auto';popover.style.setProperty('--button-width',button.offsetWidth+'px');popover.style.setProperty('--button-height',button.offsetHeight+'px');popover.style.setProperty('--button-align',margin)}} 19const computeVars=(button)=>{if(button.classList.contains('popover-close-button'))return;greyd.popover.setVwUnit();if(dialog.classList.contains('is-variation-offcanvas')){if(!document.body.classList.contains('is-offcanvas')){document.body.classList.add('is-offcanvas');if(dialog.classList.contains('is-position-default')){document.body.classList.add('is-position-default')} 20if(dialog.classList.contains('is-position-left')){document.body.classList.add('is-position-left')} 21if(dialog.classList.contains('is-position-top')){document.body.classList.add('is-position-top')} 22if(dialog.classList.contains('is-position-bottom')){document.body.classList.add('is-position-bottom')} 23popover.onupdatevars=undefined;greyd.popover.resizeObserver.unobserve(popover);document.body.onupdatevars=()=>{if(dialog.hasAttribute("open"))computeVars(button)} 24greyd.popover.resizeObserver.observe(document.body)} 25var comp=getComputedStyle(dialog);var width=comp.getPropertyValue('width');var height=comp.getPropertyValue('height');var marginX='calc('+(comp.getPropertyValue('margin')??'0px')+' * 2)';var marginY='calc('+(comp.getPropertyValue('margin')??'0px')+' * 2)';if(comp.getPropertyValue('margin').trim().indexOf(' ')>-1){var m=comp.getPropertyValue('margin').trim().split(' ',4);if(m.length==1){marginX=m[0];marginY=m[0]}else if(m.length==2){marginX=m[1];marginY=m[0]}else if(m.length==3){marginX=m[1];marginY='calc('+m[0]+' + '+m[2]+')'}else if(m.length==4){marginX='calc('+m[1]+' + '+m[3]+')';marginY='calc('+m[0]+' + '+m[2]+')'}} 26if(document.body.classList.contains('is-position-default')){document.body.style.setProperty('--offcanvas-delta','calc(0px - ('+width+' + '+marginX+'))')} 27if(document.body.classList.contains('is-position-left')){document.body.style.setProperty('--offcanvas-delta','calc('+width+' + '+marginX+')')} 28if(document.body.classList.contains('is-position-top')){document.body.style.setProperty('--offcanvas-delta','calc('+height+' + '+marginY+')')} 29if(document.body.classList.contains('is-position-bottom')){document.body.style.setProperty('--offcanvas-delta','calc(0px - ('+height+' + '+marginY+'))')}} 30if(dialog.classList.contains('is-variation-dropdown')){var marginL='var(--dialog-margin)';var marginR='var(--dialog-margin)';var marginX='calc(var(--dialog-margin) * 2)';var marginY='calc(var(--dialog-margin) * 2)';var comp=getComputedStyle(dialog);if(comp.getPropertyValue('--dialog-margin').trim().indexOf(' ')>-1){var m=comp.getPropertyValue('--dialog-margin').trim().split(' ',4);if(m.length==1){marginL=m[0];marginR=m[0];marginX=m[0];marginY=m[0]}else if(m.length==2){marginL=m[1];marginR=m[1];marginX=m[1];marginY=m[0]}else if(m.length==3){marginL=m[1];marginR=m[1];marginX=m[1];marginY='calc('+m[0]+' + '+m[2]+')'}else if(m.length==4){marginL=m[3];marginR=m[1];marginX='calc('+m[1]+' + '+m[3]+')';marginY='calc('+m[0]+' + '+m[2]+')'}} 31var div=document.createElement('div');div.style.display='none';div.style.height=marginL;div.style.width=marginR;dialog.appendChild(div);marginL=parseFloat(getComputedStyle(div).getPropertyValue('height'));marginR=parseFloat(getComputedStyle(div).getPropertyValue('width'));div.remove();var delta=0.5*(button.offsetWidth-dialog.offsetWidth);var buttonBounds=button.getBoundingClientRect();var clientWidth=document.body.clientWidth;if(buttonBounds.x+delta-marginL<=0){delta=0-buttonBounds.x+marginL} 32if(buttonBounds.x+buttonBounds.width-delta+marginR>
32=clientWidth){delta=clientWidth-dialog.offsetWidth-buttonBounds.x-marginR} 33popover.style.setProperty('--button-left',Math.round(buttonBounds.x)+'px');popover.style.setProperty('--button-right',Math.round(clientWidth-buttonBounds.width-buttonBounds.x)+'px');popover.style.setProperty('--button-delta',delta+'px');popover.style.setProperty('--dialog-margin-x',marginX);popover.style.setProperty('--dialog-margin-y',marginY);popover.style.setProperty('--button-width',Math.round(buttonBounds.width)+'px');popover.style.setProperty('--button-height',Math.round(buttonBounds.height)+'px')}} 34buttons.forEach((button)=>{button.addEventListener('click',()=>{if(dialog.hasAttribute("open")){closePopover(button)}else{openPopover(button)}});initVars(button)});backdrop.addEventListener('click',function(){closePopover(this)});window.addEventListener('closePopovers',()=>{closePopover(dialog)});popover.addEventListener('click',function(event){event.stopPropagation()})})}} 35aria.Utils=aria.Utils||{};(function(){aria.Utils.dialogOpenClass='has-dialog';aria.Utils.IgnoreUtilFocusChanges=!1;aria.Utils.matches=function(element,selector){if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(s){var matches=element.parentNode.querySelectorAll(s);var i=matches.length;while(--i>=0&&matches.item(i)!==this){} 36return i>-1}} 37return element.matches(selector)};aria.Utils.isFocusable=function(element){if(element.tabIndex<0){return!1} 38if(element.disabled){return!1} 39switch(element.nodeName){case 'A':return!!element.href&&element.rel!='ignore';case 'INPUT':return element.type!='hidden';case 'BUTTON':case 'SELECT':case 'TEXTAREA':return!0;default:return!1}};aria.Utils.remove=function(item){if(item.remove&&typeof item.remove==='function'){return item.remove()} 40if(item.parentNode&&item.parentNode.removeChild&&typeof item.parentNode.removeChild==='function'){return item.parentNode.removeChild(item)} 41return!1};aria.Utils.focusFirstDescendant=function(element){for(var i=0;i<element.childNodes.length;i++){var child=element.childNodes[i];if(aria.Utils.attemptFocus(child)||aria.Utils.focusFirstDescendant(child)){return!0}} 42return!1};aria.Utils.focusLastDescendant=function(element){for(var i=element.childNodes.length-1;i>=0;i--){var child=element.childNodes[i];if(aria.Utils.attemptFocus(child)||aria.Utils.focusLastDescendant(child)){return!0}} 43return!1};aria.Utils.attemptFocus=function(element){if(!aria.Utils.isFocusable(element)){return!1} 44aria.Utils.IgnoreUtilFocusChanges=!0;try{element.focus()}catch(e){} 45aria.Utils.IgnoreUtilFocusChanges=!1;return document.activeElement===element};aria.OpenDialogList=aria.OpenDialogList||new Array(0);aria.getCurrentDialog=function(){if(aria.OpenDialogList&&aria.OpenDialogList.length){return aria.OpenDialogList[aria.OpenDialogList.length-1]}};aria.closeCurrentDialog=function(){var currentDialog=aria.getCurrentDialog();if(currentDialog){window.dispatchEvent(new Event('closePopovers'));return!0} 46return!1};aria.handleEscape=function(event){var key=event.which||event.keyCode;if(key===27&&aria.closeCurrentDialog()){event.stopPropagation()}};document.addEventListener('keyup',aria.handleEscape);aria.Dialog=function(dialogId,focusAfterClosed,focusFirst){this.dialogNode=document.getElementById(dialogId);if(this.dialogNode===null){throw new Error('No element found with id="'+dialogId+'".')} 47var validRoles=['dialog','alertdialog'];var isDialog=(this.dialogNode.getAttribute('role')||'').trim().split(/\s+/g).some(function(token){return validRoles.some(function(role){return token===role})});if(!isDialog){throw new Error('Dialog() requires a DOM element with ARIA role of dialog or alertdialog.')} 48const backdropClass='dialog-backdrop';if(this.dialogNode.nextSibling?.classList?.contains(backdropClass)){this.backdropNode=this.dialogNode.nextSibling}else{this.backdropNode=document.createElement('div');this.backdropNode.className=backdropClass;this.backdropNode.setAttribute('onclick','closeDialog(this)');this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNode.nextSibling)} 49if(!this.dialogNode.classList.contains('is-variation-dropdown')){document.body.classList.add(aria.Utils.dialogOpenClass)} 50if(typeof focusAfterClosed==='string'){this.focusAfterClosed=document.getElementById(focusAfterClosed)}else if(typeof focusAfterClosed==='object'){this.focusAfterClosed=focusAfterClosed}else{throw new Error('the focusAfterClosed parameter is required for the aria.Dialog constructor.')} 51if(typeof focusFirst==='string'){this.focusFirst=document.getElementById(focusFirst)}else if(typeof focusFirst==='object'){this.focusFirst=focusFirst}else{this.focusFirst=null} 52var preDiv=document.createElement('div');this.preNode=this.dialogNode.parentNode.insertBefore(preDiv,this.dialogNode);this.preNode.tabIndex=0;var postDiv=document.createElement('div');this.postNode=this.dialogNode.parentNode.insertBefore(postDiv,this.dialogNode.nextSibling);this.postNode.tabIndex=0;if(aria.OpenDialogList.length>0){aria.getCurrentDialog().removeListeners()} 53this.addListeners();aria.OpenDialogList.push(this);this.dialogNode.setAttribute('open',!0);setTimeout(()=>{if(this.focusFirst){this.focusFirst.focus()}else{aria.Utils.focusFirstDescendant(this.dialogNode)}},100);this.lastFocus=document.activeElement};aria.Dialog.prototype.close=function(){aria.OpenDialogList.pop();this.removeListeners();aria.Utils.remove(this.preNode);aria.Utils.remove(this.postNode);this.dialogNode.removeAttribute('open');this.focusAfterClosed.focus();const videos=this.dialogNode.querySelectorAll(".wp-block-video video, .wp-block-embed iframe");
53if(NodeList.prototype.isPrototypeOf(videos)){videos.forEach(video=>{if(video.tagName=="VIDEO")video.pause();if(video.tagName=="IFRAME"){const src=video.src;video.src=src}})} 54if(aria.OpenDialogList.length>0){aria.getCurrentDialog().addListeners()}else{document.body.classList.remove(aria.Utils.dialogOpenClass)}};aria.Dialog.prototype.addListeners=function(){document.addEventListener('focus',this.trapFocus,!0)};aria.Dialog.prototype.removeListeners=function(){document.removeEventListener('focus',this.trapFocus,!0)};aria.Dialog.prototype.trapFocus=function(event){if(aria.Utils.IgnoreUtilFocusChanges){return} 55var currentDialog=aria.getCurrentDialog();if(currentDialog.dialogNode.contains(event.target)){currentDialog.lastFocus=event.target}else{aria.Utils.focusFirstDescendant(currentDialog.dialogNode);if(currentDialog.lastFocus==document.activeElement){aria.Utils.focusLastDescendant(currentDialog.dialogNode)} 56currentDialog.lastFocus=document.activeElement}};window.openDialog=function(dialogId,focusAfterClosed,focusFirst){new aria.Dialog(dialogId,focusAfterClosed,focusFirst)};window.closeDialog=function(closeButton){aria.getCurrentDialog()?.close()}})();document.addEventListener("DOMContentLoaded",function(){let popoverAnchorLinks=document.querySelectorAll('.wp-block-greyd-popover-popup a[href*="#"]');if(popoverAnchorLinks.length==0)return;popoverAnchorLinks.forEach((link)=>{link.addEventListener('click',()=>{window.dispatchEvent(new Event('closePopovers'))})})});const custom_select2=typeof custom_select2_translation!=="undefined"?custom_select2_translation:{};jQuery(document).ready((function($){const $adminSelect=$(".oo-poststuff .custom-input-field .oo-custom-select2");const $multiSelectAdminSorting=$("#viewrecordssorting .oo-custom-select2.oo-custom-select2--multiple");const $singleSelectAdminSorting=$("#viewrecordssorting .oo-custom-select2.oo-custom-select2--single");$(".custom-multiple-select, .custom-single-select").select2({width:"100%"});if($adminSelect.length>0){$adminSelect.select2({width:"50%"})}if($multiSelectAdminSorting.length){$multiSelectAdminSorting.select2({placeholder:custom_select2.multipleSelectOptions,width:"50%"})}if($singleSelectAdminSorting.length){$singleSelectAdminSorting.select2({placeholder:custom_select2.singleSelectOption,width:"50%"})}}));var onOffice=onOffice||{};(function(){var checkboxCounter=checkboxCounter||0;function multiselect(element,options,preselected,settings={}){this._element=typeof element==="string"?document.getElementById(element):element;this._options=options||{};this._name=this._element.getAttribute("data-name");this._settings=settings;this._load(preselected)}multiselect.prototype._load=function(preselected){var divPopup=document.createElement("div");divPopup.hidden=!0;divPopup.className="onoffice-multiselect-popup";this._element.appendChild(divPopup);this.reloadWithOptions(this._options,preselected);this._displaySpan=document.createElement("span");this._element.appendChild(this._displaySpan);this.refreshlabel()};multiselect.prototype.show=function(){this._getChildDiv("onoffice-multiselect-popup").hidden=!1;this.hideLabel()};multiselect.prototype.hide=function(){this._getChildDiv("onoffice-multiselect-popup").hidden=!0;this.refreshlabel()};multiselect.prototype._getChildDiv=function(className){var childnodes=[].slice.call(this._element.childNodes);var divs=childnodes.filter((function(element){return element.nodeName.toLowerCase()==="div"&&element.className===className}));if(divs.length>0){return divs[0]}throw new Error("child div not found")};multiselect.prototype.refreshlabel=function(){var selection=this._getSelection();var labels=[];for(var i in selection){var key=selection[i];if(this._options[key]!==undefined){labels.push(this._options[key])}}this._displaySpan.textContent=" "+labels.join(", ");this.showLabel()};multiselect.prototype.reloadWithOptions=function(options,preselected){this._options=options;var parent=this;var output="";preselected=preselected||[];for(var key in this._options){checkboxCounter++;var value=this._options[key];var checked=preselected.indexOf(key)>=0?" checked":"";var nameSuffix=this._settings.name_is_array||!1?"[]":"";var className=this._settings.cb_class||"";output+="<label for=cb"+checkboxCounter+">"+'<input type="checkbox" name='+this._name+nameSuffix+' value="'+key+'" '+checked+' id="cb'+checkboxCounter+'" class="'+className+'">'+value+"</label>"}var divPopup=this._element.querySelector("div.onoffice-multiselect-popup");divPopup.innerHTML=output;var button=document.createElement("input");button.type="button";button.value="OK";button.onclick=function(){parent.hide();const event=new CustomEvent("onoffice-multiselect-change",{detail:{name:parent._name,selection:parent._getSelection()}});parent._element.dispatchEvent(event)};divPopup.appendChild(button)};multiselect.prototype.hideLabel=function(){this._displaySpan.hidden=!0};multiselect.prototype.showLabel=function(){this._displaySpan.hidden=!1};multiselect.prototype._getSelection=function(){var childNodes=this._getChildDiv("onoffice-multiselect-popup").childNodes;var elements=[].slice.call(childNodes);var inputs=elements.filter((function(element){return element.nodeName==="LABEL"&&element.childNodes[0].type==="checkbox"&&element.childNodes[0].checked}));
56return inputs.map((function(element){return element.childNodes[0].value}))};onOffice.multiselect=multiselect})();(function(){var divs=document.getElementsByClassName("multiselect");var divsArray=[].slice.call(divs);for(var i in divsArray){var element=divsArray[i];var values={};var presetValues=[];try{valuesString=element.getAttribute("data-values");values=JSON.parse(valuesString);presetString=element.getAttribute("data-selected");if(presetString!==null){presetValues=JSON.parse(presetString)}}catch(Error){}var instance=new onOffice.multiselect(element,values,presetValues);var subElements=[].slice.call(element.children);var editButtonArray=subElements.filter((function(element){return element.className==="onoffice-multiselect-edit"}));var button=editButtonArray.pop();button.onclick=function(instance){return function(){instance.show()}}(instance);element.onoffice_multiselect=instance}})();(()=>{let forms=document.querySelectorAll("form");const fetch_possible_types=()=>fetch("/onoffice-estate-types.json",{method:"GET"}).then((response=>response.json())).catch((()=>({})));const mergeEstateTypesOfKinds=(possibleTypesValues,estateKinds)=>{let target=[];estateKinds.forEach((e=>target=target.concat(possibleTypesValues[e])));return target};const controlMultiSelectEstateKindType=(elementKind,elementType,possibleTypes)=>{elementType.allOptions=elementType.onoffice_multiselect._options;const multiSelectChangeFn=e=>{if(e.detail.name==="objektart[]"){const selection=e.detail.selection;let newTypes={};Object.assign(newTypes,elementType.allOptions);const allowedTypes=mergeEstateTypesOfKinds(possibleTypes,selection);for(const k in newTypes){if(allowedTypes.indexOf(k)<0){delete newTypes[k]}}const oldSelection=elementType.onoffice_multiselect._getSelection();const newSelection=allowedTypes.filter((value=>oldSelection.includes(value)));elementType.onoffice_multiselect.reloadWithOptions(newTypes,newSelection);elementType.onoffice_multiselect.refreshlabel();elementType.setAttribute("data-values",JSON.stringify(newTypes));elementType.dispatchEvent(new Event("onoffice-multiselect-modified"))}};elementKind.addEventListener("onoffice-multiselect-change",multiSelectChangeFn,!1);const e=new CustomEvent("ready",{detail:{name:"objektart[]",selection:elementKind.onoffice_multiselect._getSelection()}});multiSelectChangeFn(e)};const controlSingleSelectEstateKindType=(elementKind,elementType,possibleTypes)=>{if(!elementType.allOptions){let newTypes={};Object.assign(newTypes,[...elementType.options]);elementType.allOptions=newTypes}elementType.allOptions=elementType.allOptions||elementType.options;const singleSelectChangeFn=()=>{const selection=elementKind.selectedOptions[0].value;let newTypes={};Object.assign(newTypes,elementType.allOptions);const allowedTypes=mergeEstateTypesOfKinds(possibleTypes,[selection]);for(const k in newTypes){if(allowedTypes.indexOf(newTypes[k].value)<0&&newTypes[k].value!==""){delete newTypes[k]}}elementType.options;for(const[key,value]of Object.entries(elementType.options)){elementType.remove(value.index)}for(const[key,value]of Object.entries(newTypes)){elementType.add(value)}elementType.options.selectedIndex=0};elementKind.addEventListener("change",singleSelectChangeFn,!1);singleSelectChangeFn(new Event("ready"))};fetch_possible_types().then((possibleTypes=>{forms.forEach((function(element){let elementMultiType=element.querySelector("div[data-name^=objekttyp].multiselect");let elementMultiKind=element.querySelector("div[data-name^=objektart].multiselect");let elementSingleType=element.querySelector("select[name=objekttyp]");let elementSingleKind=element.querySelector("select[name=objektart]");if(elementMultiType&&elementMultiKind){controlMultiSelectEstateKindType(elementMultiKind,elementMultiType,possibleTypes)}else if(elementSingleType&&elementSingleKind){controlSingleSelectEstateKindType(elementSingleKind,elementSingleType,possibleTypes)}}))}))})();jQuery(document).ready(($=>{const thousandSeparatorFormat=onoffice_apply_thousand_separator.thousand_separator_format||"";const getSeparators=separatorFormat=>({thousandSeparator:separatorFormat==="comma-separator"?",":"."});const cleanInputValue=value=>value.replace(/[^0-9]/g,"");const processSeparator=(value,thousandSeparator)=>{value=value.replace(/[,.]/g,"");return value.replace(/\B(?=(\d{3}
56)+(?!\d))/g,thousandSeparator)};const formatForThousandSeparator=(fieldKey,fieldValue,separatorFormat)=>{const{thousandSeparator:thousandSeparator}=getSeparators(separatorFormat);let value=processSeparator(fieldValue,thousandSeparator);$(`input[name="${fieldKey}"]`).val(value)};const applyThousandSeparatorFormat=element=>{let inputName=$(element).attr("name");let inputValue=cleanInputValue($(element).val());formatForThousandSeparator(inputName,inputValue,thousandSeparatorFormat)};if($(".apply-thousand-separator-format").length){$(".apply-thousand-separator-format").on("input",(function(){applyThousandSeparatorFormat(this)})).each((function(){applyThousandSeparatorFormat(this)}))}}));jQuery(document).ready((function($){$(".onofficeSortListSelector").change((function(){let listviewID=$(this).data("sort-listviewid");var selectedvalue=$(this).val();var sortUrlParameter=[];if(selectedvalue!=""){sortUrlParameter[`sortby_id_${listviewID}`]=selectedvalue.split("#")[0];sortUrlParameter[`sortorder_id_${listviewID}`]=selectedvalue.split("#")[1]}var searchparams=new URLSearchParams(window.location.search);for(key in sortUrlParameter){if(searchparams.has(key)){if(sortUrlParameter[key]==""){searchparams.delete(key)}else{searchparams.set(key,sortUrlParameter[key])}}else{if(sortUrlParameter[key]!=""){searchparams.append(key,sortUrlParameter[key])}}}var newLocationParameters=searchparams.toString();var loc=window.location.href;var locWithoutParams=loc.split("?");if(newLocationParameters!=""){locWithoutParams[1]=newLocationParameters}else{if(locWithoutParams.length>1){locWithoutParams.pop()}}window.location.href=locWithoutParams.join("?")}))}));(()=>{const $=jQuery;const estate_refresh_preview=(element,name)=>{let formData=new FormData(element);formData.append("preview_name",name);formData.append("nonce",onoffice_form_preview_strings.nonce_estate);let spinner=element.querySelector("#spinner");const config={url:"/onoffice-estate-preview/",formData:formData,spinner:spinner};refresh_preview(element,config)};const form_refresh_preview=(element,name)=>{let formData=new FormData(element);formData.append("preview_name",name);formData.append("nonce",onoffice_form_preview_strings.nonce_applicant_search);let spinner=element.querySelector("#spinner");const config={url:"/onoffice-applicant-search-preview/",formData:formData,spinner:spinner};refresh_preview(element,config)};const refresh_preview=(element,config)=>{if(element.fetchAbortController){element.fetchAbortController.abort()}element.fetchAbortController=new AbortController;const signal=element.fetchAbortController.signal;if(config.spinner){config.spinner.classList.add("thinking")}fetch(config.url,{method:"POST",body:config.formData,signal:signal}).then((response=>response.json())).then((result=>create_preview(element,result,config.spinner))).catch((err=>err))};const create_preview_text=amount=>{if(amount===0){return onoffice_form_preview_strings.amount_none}else if(amount===1){return onoffice_form_preview_strings.amount_one}return onoffice_form_preview_strings.amount_other.replace("%s",amount)};const create_preview=(formElement,amount,spinner)=>{const preview_text=create_preview_text(amount);let submitElement=formElement.querySelector("input[type=submit]");submitElement.value=preview_text;if(spinner){spinner.classList.remove("thinking")}submitElement.classList.remove("match");if(amount>0){submitElement.classList.add("match")}};document.querySelectorAll("form[data-estate-search-name]").forEach((element=>{const name=element.getAttribute("data-estate-search-name");estate_refresh_preview(element,name);for(let formControl of element.elements){formControl.addEventListener("change",(()=>estate_refresh_preview(element,name)))}for(let multiSelect of element.querySelectorAll("div.multiselect")){multiSelect.addEventListener("onoffice-multiselect-modified",(e=>{estate_refresh_preview(element,name);for(let formControlMS of e.target.getElementsByTagName("*")){formControlMS.addEventListener("change",(()=>estate_refresh_preview(element,name)))}}))}}));document.querySelectorAll("form[data-estate-search-name]").forEach((element=>
56{const name=element.getAttribute("data-estate-search-name");estate_refresh_preview(element,name);for(let formControl of element.elements){let $event=$(".custom-multiple-select");$event.on("change",(function(e){estate_refresh_preview(element,name)}))}}));document.querySelectorAll("form[data-applicant-form-id]").forEach((element=>{const id=element.getAttribute("data-applicant-form-id");form_refresh_preview(element,id);for(let formControl of element.elements){formControl.addEventListener("change",(()=>form_refresh_preview(element,id)))}}));document.querySelectorAll("form[data-applicant-form-id]").forEach((element=>{const id=element.getAttribute("data-applicant-form-id");form_refresh_preview(element,id);for(let formControl of element.elements){let $eventSelect=$("."+formControl.getAttribute("class"));$eventSelect.on("change",(function(e){form_refresh_preview(element,id)}))}}));let spinner=document.querySelector("#spinner");if(spinner){let i=256,cir,a;for(;i--;){a=i*Math.PI/128;cir=document.createElementNS("http://www.w3.org/2000/svg","circle");cir.setAttribute("cx",""+(15-Math.sin(a)*8));cir.setAttribute("cy",""+(15-Math.cos(a)*8));cir.setAttribute("r","1.5");cir.setAttribute("fill","rgb("+i+", "+i+", "+i+")");cir.setAttribute("shape-rendering","geometricPrecision");spinner.appendChild(cir)}}})();(function(){var skipLinkTarget=document.querySelector('main'),sibling,skipLinkTargetID,skipLink;if(!skipLinkTarget){return} 57sibling=document.querySelector('.wp-site-blocks');if(!sibling){return} 58skipLinkTargetID=skipLinkTarget.id;if(!skipLinkTargetID){skipLinkTargetID='wp--skip-link--target';skipLinkTarget.id=skipLinkTargetID} 59skipLink=document.createElement('a');skipLink.classList.add('skip-link','screen-reader-text');skipLink.id='wp-skip-link';skipLink.href='#'+skipLinkTargetID;skipLink.innerText='Zum Inhalt springen';sibling.parentElement.insertBefore(skipLink,sibling)}());/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 60!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;u-=1){if(r=n.slice(0,u).join("/"),h)for(d=h.length;0<d;d-=1)if(i=(i=f[h.slice(0,d).join("/")])&&i[r]){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(w(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!w(m,e)&&!w(_,e))throw new Error("No "+e);return m[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?c(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},i=Object.prototype.hasOwnProperty,a=[].slice,b=/\.js$/,f=function(e,t){var n,r=c(e),i=r[0],o=t[1];return e=r[1],i&&(n=D(i=l(i,o))),i?e=n&&n.normalize?n.normalize(e,function(t){return function(e){return l(e,t)}}(o)):l(e,o):(i=(r=c(e=l(e,o)))[0],e=r[1],i&&(n=D(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:function(e){return function(){return y&&y.config&&y.config[e]||{}}}(e)}}},o=function(e,t,n,r){var i,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(r=r||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)i=d[l]=g.module(e);else if(w(m,o)||w(v,o)||w(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(r,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(i&&i.exports!==h&&i.exports!==m[e]?m[e]=i.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,r,i){if("string"==typeof e)return g[e]?g[e](t):D(f(e,
60S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=r,r=i),r?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=r),e.define("almond",function(){}),e.define("jquery",[],function(){var e=u||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(o){var i={};function u(e){var t=e.prototype,n=[];for(var r in t){"function"==typeof t[r]&&"constructor"!==r&&n.push(r)}return n}i.Extend=function(e,t){var n={}.hasOwnProperty;function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i.Decorate=function(r,i){var e=u(i),t=u(r);function o(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=r.prototype.constructor;0<t&&(e.call(arguments,r.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=r.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=r.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},i.Observable=e,i.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},i.bind=function(e,t){return function(){e.apply(t,arguments)}},i._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in r||(r[o]={}),i==n.length-1&&(r[o]=e[t]),r=r[o]}delete e[t]}}return e},i.hasScroll=function(e,t){var n=o(t),r=t.style.overflowX,i=t.style.overflowY;return(r!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===r||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},i.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],i=this.option(r);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},r.prototype.position=function(e,t){t.find(".select2-results").append(e)},r.prototype.sort=function(e){return this.options.get("sorter")(e)},r.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},r.prototype.setClasses=function(){var t=this;this.data.current(function(e){var r=h.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.i
60d;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,r)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},r.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},r.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},r.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"option","aria-selected":"false"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var i in(null!=e.element&&r.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var s=h(t),a=document.createElement("strong");a.className="select2-results__group";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):i<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,r=0<e.deltaY&&t-e.deltaY<=0,i=e.deltaY<0&&n<=l.$results.height();r?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=h(this),n=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:h(this)})})},r.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},r.prototype.destroy=function(){this.$results.remove()},r.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,r=e.offset().top,i=this.$results.scrollTop()+(r-n),o=r-n;i-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","fal
60se"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.selectionContainer(),o=this.display(r,i);i.append(o);var s=r.title||r.text;
vendor: 10,087 bytes, line 60
60s&&i.attr("title",s),l.StoreData(i[0],"data",r),t.push(i)}var a=this.$selection.find(".select2-selection__rendered");l.appendMany(a,t)}},n}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},t}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,r,a){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var r=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};if(this.trigger("clear",o),o.prevented)this.$element.val(i);else{for(var s=0;s<r.length;s++)if(o={data:r[s]},this.trigger("unselect",o),o.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=r.DELETE&&t.which!=r.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.options.get("translations").get("removeAllItems"),r=i('<span class="select2-selection__clear" title="'+n()+'">×</span>');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=a.GetData(t[0],"data");r.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){r.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)r.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&r.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var r=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,i)){t=t||{};var n=s.Event("select2:"+e,{params:t});r.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function r(e){this.dict=e||{}}return r.prototype.all=function(){return this.dict},r.prototype.get=function(e){return this.dict[e]},r.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},r._cache={},r.loadPath=function(e){if(!(e in r._cache)){var t=n(e);r._cache[e]=t}return new r(r._cache[e])},r}),e.define("select2/diacritics",[],function(){return{"â¶":"A","A":"A","Ã":"A","Ã":"A","Ã":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ä":"A","Ä":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ã":"A","Ç":"A","Ả":"A","Ã
":"A","Ǻ":"A","Ç":"A","È":"A","È":"A","Ạ":"A","Ậ":"A","Ặ":"A","á¸":"A","Ä":"A","Ⱥ":"A","Ɐ":"A","ê²":"AA","Ã":"AE","Ǽ":"AE","Ç¢":"AE","ê´":"AO","ê¶":"AU","ê¸":"AV","êº":"AV","ê¼":"AY","â·":"B","ï¼¢":"B","á¸":"B","á¸":"B","á¸":"B","É":"B","Æ":"B","Æ":"B","â¸":"C","ï¼£":"C","Ä":"C","Ä":"C","Ä":"C","Ä":"C","Ã":"C","á¸":"C","Æ":"C","È»":"C","ê¾":"C","â¹":"D","D":"D","á¸":"D","Ä":"D","á¸":"D","á¸":"D","á¸":"D","á¸":"D","Ä":"D","Æ":"D","Æ":"D","Æ":"D","ê¹":"D","DZ":"DZ","Ç":"DZ","Dz":"Dz","Ç
":"Dz","âº":"E","ï¼¥":"E","Ã":"E","Ã":"E","Ã":"E","á»":"E","Ế":"E","á»":"E","á»":"E","Ẽ":"E","Ä":"E","á¸":"E","á¸":"E","Ä":"E","Ä":"E","Ã":"E","Ẻ":"E","Ä":"E","È":"E","È":"E","Ẹ":"E","á»":"E","Ȩ":"E","á¸":"E","Ä":"E","á¸":"E","á¸":"E","Æ":"E","Æ":"E","â»":"F","F":"F","á¸":"F","Æ":"F","ê»":"F","â¼":"G","ï¼§":"G","Ç´":"G","Ä":"G","Ḡ":"G","Ä":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Æ":"G","ê ":"G","ê½":"G","ê¾":"G","â½":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","È":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","â±§":"H","â±µ":"H","ê":"H","â¾":"I","I":"I","Ã":"I","Ã":"I","Ã":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ã":"I","Ḯ":"I","á»":"I","Ç":"I","È":"I","È":"I","á»":"I","Ä®":"I","Ḭ":"I","Æ":"I","â¿":"J","J":"J","Ä´":"J","É":"J","â":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Æ":"K","Ⱪ":"K","ê":"K","ê":"K","ê":"K","ê¢":"K","â":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Å":"L","Ƚ":"L","â±¢":"L","â± ":"L","ê":"L","ê":"L","ê":"L","Ç":"LJ","Ç":"Lj","â":"M","ï¼":"M","Ḿ":"M","á¹":"M","á¹":"M","â±®":"M","Æ":"M","â":"N","ï¼®":"N","Ǹ":"N","Å":"N","Ã":"N","á¹":"N","Å":"N","á¹":"N","Å
":"N","á¹":"N","á¹":"N","È ":"N","Æ":"N","ê":"N","ê¤":"N","Ç":"NJ","Ç":"Nj","â":"O","O":"O","Ã":"O","Ã":"O","Ã":"O","á»":"O","á»":"O","á»":"O","á»":"O","Ã":"O","á¹":"O","Ȭ":"O","á¹":"O","Å":"O","á¹":"O","á¹":"O","Å":"O","È®":"O","Ȱ":"O","Ã":"O","Ȫ":"O","á»":"O","Å":"O","Ç":"O","È":"O","È":"O","Æ ":"O","á»":"O","á»":"O","á» ":"O","á»":"O","Ợ":"O","á»":"O","á»":"O","Ǫ":"O","Ǭ":"O","Ã":"O","Ǿ":"O","Æ":"O","Æ":"O","ê":"O","ê":"O","Å":"OE","Æ¢":"OI","ê":"OO","È¢":"OU","â
":"P","ï¼°":"P","á¹":"P","á¹":"P","Ƥ":"P","â±£":"P","ê":"P","ê":"P","ê":"P","â":"Q","ï¼±":"Q","ê":"Q","ê":"Q","É":"Q","â":"R","ï¼²":"R","Å":"R","á¹":"R","Å":"R","È":"R","È":"R","á¹":"R","á¹":"R","Å":"R","á¹":"R","É":"R","Ɽ":"R","ê":"R","ê¦":"R","ê":"R","â":"S","ï¼³":"S","áº":"S","Å":"S","Ṥ":"S","Å":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","È":"S","Å":"S","â±¾":"S","ê¨":"S","ê":"S","â":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","È":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","ê":"T","ê¨":"TZ","â":"U","ï¼µ":"U","Ã":"U","Ã":"U","Ã":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ã":"U","Ç":"U","Ç":"U","Ç":"U","Ç":"U","Ủ":"U","Å®":"U","Ű":"U","Ç":"U","È":"U","È":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","á¹¶":"U","á¹´":"U","É":"U","â":"V","ï¼¶":"V","á¹¼":"V","á¹¾":"V","Ʋ":"
60V","ê":"V","É
":"V","ê ":"VY","â":"W","ï¼·":"W","áº":"W","áº":"W","Å´":"W","áº":"W","áº":"W","áº":"W","â±²":"W","â":"X","X":"X","áº":"X","áº":"X","â":"Y","ï¼¹":"Y","Ỳ":"Y","Ã":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","áº":"Y","Ÿ":"Y","á»¶":"Y","á»´":"Y","Ƴ":"Y","É":"Y","Ỿ":"Y","â":"Z","Z":"Z","Ź":"Z","áº":"Z","Å»":"Z","Ž":"Z","áº":"Z","áº":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","ê¢":"Z","â":"a","ï½":"a","áº":"a","à ":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","Ä":"a","Ä":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","Ç":"a","ả":"a","Ã¥":"a","Ç»":"a","Ç":"a","È":"a","È":"a","ạ":"a","áº":"a","ặ":"a","á¸":"a","Ä
":"a","â±¥":"a","É":"a","ê³":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","êµ":"ao","ê·":"au","ê¹":"av","ê»":"av","ê½":"ay","â":"b","ï½":"b","á¸":"b","á¸
":"b","á¸":"b","Æ":"b","Æ":"b","É":"b","â":"c","ï½":"c","Ä":"c","Ä":"c","Ä":"c","Ä":"c","ç":"c","á¸":"c","Æ":"c","ȼ":"c","ê¿":"c","â":"c","â":"d","ï½":"d","á¸":"d","Ä":"d","á¸":"d","á¸":"d","á¸":"d","á¸":"d","Ä":"d","Æ":"d","É":"d","É":"d","êº":"d","dz":"dz","Ç":"dz","â":"e","ï½
":"e","è":"e","é":"e","ê":"e","á»":"e","ế":"e","á»
":"e","á»":"e","ẽ":"e","Ä":"e","á¸":"e","á¸":"e","Ä":"e","Ä":"e","ë":"e","ẻ":"e","Ä":"e","È
":"e","È":"e","ẹ":"e","á»":"e","È©":"e","á¸":"e","Ä":"e","á¸":"e","á¸":"e","É":"e","É":"e","Ç":"e","â":"f","ï½":"f","á¸":"f","Æ":"f","ê¼":"f","â":"g","ï½":"g","ǵ":"g","Ä":"g","ḡ":"g","Ä":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","ê¡":"g","áµ¹":"g","ê¿":"g","â":"h","ï½":"h","Ä¥":"h","ḣ":"h","ḧ":"h","È":"h","ḥ":"h","ḩ":"h","ḫ":"h","áº":"h","ħ":"h","ⱨ":"h","â±¶":"h","É¥":"h","Æ":"hv","â":"i","ï½":"i","ì":"i","Ã":"i","î":"i","Ä©":"i","Ä«":"i","Ä":"i","ï":"i","ḯ":"i","á»":"i","Ç":"i","È":"i","È":"i","á»":"i","į":"i","á¸":"i","ɨ":"i","ı":"i","â":"j","ï½":"j","ĵ":"j","ǰ":"j","É":"j","â":"k","ï½":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","Æ":"k","ⱪ":"k","ê":"k","ê":"k","ê
":"k","ê£":"k","â":"l","ï½":"l","Å":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","Å":"l","Æ":"l","É«":"l","ⱡ":"l","ê":"l","ê":"l","ê":"l","Ç":"lj","â":"m","ï½":"m","ḿ":"m","á¹":"m","á¹":"m","ɱ":"m","ɯ":"m","â":"n","ï½":"n","ǹ":"n","Å":"n","ñ":"n","á¹
":"n","Å":"n","á¹":"n","Å":"n","á¹":"n","á¹":"n","Æ":"n","ɲ":"n","Å":"n","ê":"n","ê¥":"n","Ç":"nj","â":"o","ï½":"o","ò":"o","ó":"o","ô":"o","á»":"o","á»":"o","á»":"o","á»":"o","õ":"o","á¹":"o","È":"o","á¹":"o","Å":"o","á¹":"o","á¹":"o","Å":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","á»":"o","Å":"o","Ç":"o","È":"o","È":"o","Æ¡":"o","á»":"o","á»":"o","ỡ":"o","á»":"o","ợ":"o","á»":"o","á»":"o","Ç«":"o","Ç":"o","ø":"o","Ç¿":"o","É":"o","ê":"o","ê":"o","ɵ":"o","Å":"oe","Æ£":"oi","È£":"ou","ê":"oo","â":"p","ï½":"p","á¹":"p","á¹":"p","Æ¥":"p","áµ½":"p","ê":"p","ê":"p","ê":"p","â ":"q","ï½":"q","É":"q","ê":"q","ê":"q","â¡":"r","ï½":"r","Å":"r","á¹":"r","Å":"r","È":"r","È":"r","á¹":"r","á¹":"r","Å":"r","á¹":"r","É":"r","ɽ":"r","ê":"r","ê§":"r","ê":"r","â¢":"s","ï½":"s","Ã":"s","Å":"s","á¹¥":"s","Å":"s","ṡ":"s","Å¡":"s","á¹§":"s","á¹£":"s","ṩ":"s","È":"s","Å":"s","È¿":"s","ê©":"s","ê
":"s","áº":"s","â£":"t","ï½":"t","ṫ":"t","áº":"t","Å¥":"t","á¹":"t","È":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ":"t","Ê":"t","ⱦ":"t","ê":"t","ê©":"tz","â¤":"u","ï½":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å":"u","ü":"u","Ç":"u","Ç":"u","Ç":"u","Ç":"u","á»§":"u","ů":"u","ű":"u","Ç":"u","È":"u","È":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","á»":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","Ê":"u","â¥":"v","ï½":"v","á¹½":"v","ṿ":"v","Ê":"v","ê":"v","Ê":"v","ê¡":"vy","â¦":"w","ï½":"w","áº":"w","áº":"w","ŵ":"w","áº":"w","áº
":"w","áº":"w","áº":"w","â±³":"w","â§":"x","ï½":"x","áº":"x","áº":"x","â¨":"y","ï½":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","áº":"y","ÿ":"y","á»·":"y","áº":"y","ỵ":"y","Æ´":"y","É":"y","ỿ":"y","â©":"z","ï½":"z","ź":"z","áº":"z","ż":"z","ž":"z","áº":"z","áº":"z","ƶ":"z","È¥":"z","É":"z","ⱬ":"z","ê£":"z","Î":"Î","Î":"Î","Î":"Î","Î":"Î","Ϊ":"Î","Î":"Î","Î":"Î¥","Ϋ":"Î¥","Î":"Ω","ά":"α","Î":"ε","ή":"η","ί":"ι","Ï":"ι","Î":"ι","Ï":"ο","Ï":"Ï
","Ï":"Ï
","ΰ":"Ï
","Ï":"Ï","Ï":"Ï","â":"'"}}),e.define("select2/data/base",["../utils"],function(r){function n(e,t){n.__super__.constructor.call(this)}return r.Extend(n,r.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=r.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+r.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],r=this;this.$element.find(":selected").each(function(){var e=l(this),t=r.item(e);n.push(t)}),e(n)},n.prototype.select=function(i){var o=this;if(i.selected=!0,l(i.element).is("option"))return i.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var r=i[n].id;-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")});else{var e=i.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(i){var o=this;if(this.$element.prop("multiple")){if(i.selected=!1,l(i.element).is("option"))return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].id;r!==i.id&&-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(r,e){var i=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(r,t);null!==n&&i.push(n)}}),e({results:i})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),r=this._normalizeItem(e);return r.element=t,a.StoreData(t,"data",r),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),r=[],i=0;i<n.length;i++){var o=l(n[i]),s=this.item(o);r.push(s)}t.children=r}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function r(e,t){this._dataToConvert=t.get("data")||[],r.__super__.constructor.call(this,e,t)}return f.Extend(r,e),r.prototype.bind=function(e,t){r.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),r.__super__.select.call(this,n)},r.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),r=n.map(function(){return t.item(g(this)).id}).get(),i=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,r)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}i.push(p)}}return i},r}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var r=o.ajax(e);return r.then(t),r.fail(n),r}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,r){var i=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=i.processResults(e,n);i.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),r(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||i.trigger("results:message",{message:"errorLoading"})});i._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var r=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(r))for(var s=0;s<r.length;
vendor: 9,064 bytes, line 60
60s++){var a=r[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var r=t.results,i=0;i<r.length;i++){var o=r[i],s=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||s)return!n&&(t.data=r,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(r,a)}t.results=r,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var r=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return d(this).val()===t.id}).length){var n=r.option(t);n.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([n])}!function(e){r.trigger("select",{data:e})}(t)});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.trigger("focus")),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,r){for(var i=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,i)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(r(u),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.
60select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-s,u=l>i.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r<t.length;r++){var i=t[r];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(e){r._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var i=o.GetData(r[0],"data");null!=i.element&&i.element.selected||null==i.element&&i.selected||this.trigger("select",{data:i})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more resultsâ¦"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searchingâ¦"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,u,d,p,h,f,g,m,v,y,s,t,_,$,b,w,A,x,D,S,E,C,O,T,q,L,I,j,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=b:null!=e.data?e.dataAdapter=$:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,w)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=E;else{var r=y.Decorate(E,C);e.dropdownAdapter=r}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,L)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var i=u(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,i)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptC
60ontainerCssClass){var o=u(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var r=c.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&r.children.splice(i,1);return 0<r.children.length?r:e(t,r)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,r=this.defaults.language,i=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],r=0;r<t.length;r++)if(n.push(t[r]),"string"==typeof t[r]&&0<t[r].indexOf("-")){var i=t[r].split("-")[0];n.push(i)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,r=0;r<e.length;r++){var i=new s,o=e[r];if("string"==typeof o)try{i=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,i=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else i=c.isPlainObject(o)?new s(o):o;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var r=y._convertData(n);c.extend(!0,this.defaults,r)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(r,d,i,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=i.applyFromElement(this.options,t)),this.options=i.apply(this.options),t&&t.is("input")){var n=r(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function r(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var o=e[0].attributes[i].name,s="data-";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,r)]=l}}
60d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,u,r){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var i=this.render();this._placeContainer(i);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,i);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,i);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,r=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,r)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===r.ESC||t===r.TAB||t===r.UP&&e.altKey?(n.close(e),e.preventDefault()):t===r.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===r.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===r.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===r.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===r.ENTER||t===r.SPACE||t===r.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){t.addedNodes[i].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(r._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),r=this;n&&this.dataAdapter.current(function(e){r.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in r){var i=r[e],o={prevented:!1,name:e,args:t};if(n.call(this,i,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")}
60,d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",u.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1<i.inArray(t,a)?this:n}}return null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return u.fn.select2.amd=e,t});var greyd=greyd||{};greyd.scrollObserver=new function(){class observedElement{constructor(target,callback,type){this.target=target;this.callback=callback;this.type=typeof type==='undefined'?'once':type}} 61this.allObservedElements=[];this.allViewportElements=[];this.intersectionObserver;this.intersectionObserverConfig={root:null,rootMargin:'0px',threshold:0};this.init=function(){if("IntersectionObserver" in window){this.intersectionObserver=new IntersectionObserver((entries)=>{entries.forEach((entry)=>{if(entry.intersectionRatio>=0){this.entersViewport(entry.target)}else{this.leavesViewport(entry.target)}})},this.intersectionObserverConfig)}else{} 62document.addEventListener('scroll',this.onScroll)};this.observeElement=function(target,callback,type){if(!this.intersectionObserver){this.init()} 63this.intersectionObserver.observe(target);this.allObservedElements.push(new observedElement(target,callback,type))};this.unobserveElement=function(target){this.intersectionObserver.unobserve(target);let index=this.allObservedElements.indexOf(target);if(index>-1){this.allObservedElements.splice(index,1)} 64index=this.allViewportElements.indexOf(target);if(index>-1){this.allViewportElements.splice(index,1)}};this.entersViewport=function(target){var elements=this.getObservedElements(target);
64if(elements)elements.forEach((element)=>{const{callback,type}=element;if(type==='always'){this.allViewportElements.push(target)}else if(type==='once'){this.unobserveElement(target)} 65callback(target,null,!0)})};this.leavesViewport=function(target){const index=this.allViewportElements.indexOf(target);if(index>-1){this.allViewportElements.splice(index,1)} 66var elements=this.getObservedElements(target);if(elements)elements.forEach((element)=>{const{callback,type}=element;if(type==='change'){callback(target,null,!1)}})};this.whileInViewport=function(target,e){var elements=this.getObservedElements(target);if(elements)elements.forEach((element)=>{const{callback}=element;callback(target,e,!0)})};this.onScroll=function(e){if(this.allViewportElements.length===0)return;this.allViewportElements.forEach(target=>this.whileInViewport(target,e))};this.getObservedElements=function(target){const result=this.allObservedElements.filter(obj=>{return obj.target===target});return result.length?result:null};this.init=this.init.bind(this);this.observeElement=this.observeElement.bind(this);this.unobserveElement=this.unobserveElement.bind(this);this.entersViewport=this.entersViewport.bind(this);this.leavesViewport=this.leavesViewport.bind(this);this.onScroll=this.onScroll.bind(this);this.whileInViewport=this.whileInViewport.bind(this);this.getObservedElements=this.getObservedElements.bind(this)};var greyd=greyd||{};greyd.animations=new function(){this.usesReducedMotion=!1;this.init=function(){let animTargets=document.querySelectorAll("[data-anim-action]:not([data-anim-init='1'])");if(animTargets.length===0)return;const mediaQuery=window.matchMedia("prefers-reduced-motion: reduce");this.usesReducedMotion=!mediaQuery||mediaQuery.matches;animTargets.forEach(target=>{greyd.animations.setAnimationEvents(target)})};this.setAnimationEvents=function(target){const animEvent=target.dataset.animEvent;switch(animEvent){case "hover":case "parentHover":case "parentSticky":break;case "click":target.addEventListener('click',(e)=>{target.dataset.animTriggered=target.dataset.animTriggered==="true"?"false":"true"});break;case "parentClick":const parentSelector=target.dataset.animParent;const closestParent=greyd.animations.getClosest(target,parentSelector);if(closestParent){closestParent.addEventListener('click',(e)=>{target.dataset.animTriggered=target.dataset.animTriggered==="true"?"false":"true"})} 67break;case "whileScroll":case "onScroll":greyd.scrollObserver.observeElement(target,greyd.animations.whileInViewport,'always') 68break;case "isSticky":greyd.scrollObserver.observeElement(target,greyd.animations.whenSticky,'always') 69break;case "load":target.dataset.animTriggered="true";if(target.dataset.animReverse==="true"){setInterval(()=>{target.dataset.animTriggered=target.dataset.animTriggered==="true"?"false":"true"},parseInt(target.dataset.animTime))} 70break} 71target.dataset.animInit="1"};this.whileInViewport=function(target,e,inViewport){const animEvent=target.dataset.animEvent;if(animEvent==='onScroll'){greyd.animations.animateElementOnScroll(target)}else if(animEvent==='whileScroll'){greyd.animations.animateElementWhileScroll(target)}};this.whenSticky=function(target){if(target.className.indexOf('is-position-sticky')<0){greyd.scrollObserver.unobserveElement(target)} 72if(typeof target.dataset.offsetTop==="undefined"){target.dataset.offsetTop=parseInt(window.getComputedStyle(target).getPropertyValue('top'))+1}else{const boundingClientRect=target.getBoundingClientRect();if(boundingClientRect.y<=target.dataset.offsetTop){target.dataset.animTriggered="true"}else{target.dataset.animTriggered="false"}}};this.animateElementOnScroll=function(target){const animStart=target.dataset.animStart?parseInt(target.dataset.animStart):50;if(isNaN(animStart)){console.error('Invalid data-anim-start attribute:',target);return} 73if(typeof target.dataset.animStart=='string'&&target.dataset.animStart.indexOf('px')>-1){const scrollTop=window.pageYOffset||document.documentElement.scrollTop;if(target.dataset.animReverse==="true"){if(animStart>scrollTop){target.dataset.animTriggered="false"}else{target.dataset.animTriggered="true"}}else{if(animStart<=scrollTop){target.dataset.animTriggered="true";greyd.scrollObserver.unobserveElement(target)}}}else{const startLine=(window.innerHeight/100)*animStart;if(target.dataset.animReverse==="true"){const boundingClientRect=target.getBoundingClientRect();const targetCenter=boundingClientRect.y+(boundingClientRect.height/2);if(targetCenter<=startLine&&target.dataset.animTriggered==="false"){target.dataset.animTriggered="true"}else if(targetCenter>startLine&&target.dataset.animTriggered==="true"){target.dataset.animTriggered="false"}}else if(target.getBoundingClientRect().y<=startLine){target.dataset.animTriggered="true";greyd.scrollObserver.unobserveElement(target)}}};this.animateElementWhileScroll=function(target){const animStart=target.dataset.animStart?parseInt(target.dataset.animStart):50;const animEnd=target.dataset.animEnd?parseInt(target.dataset.animEnd):50;if(isNaN(animStart)){console.error('Invalid data-anim-start attribute:',target);return}else if(isNaN(animEnd)){console.error('Invalid data-anim-end attribute:',animEnd);return} 74const boundingClientRect=target.getBoundingClientRect();const targetCenter=boundingClientRect.y+(boundingClientRect.height/2);const endLine=(window.innerHeight/100)*animEnd;let startLine=(window.innerHeight/100)*animStart;if(targetCenter>startLine||targetCenter<endLine){target.dataset.animOffset=0;if(target.dataset.animTriggered==="true"){const progress=targetCenter>startLine?0:1;const styles=greyd.animations.getAnimatedStyles(target,progress);for(let property in styles){target.style[property]=styles[property]} 75target.dataset.animTriggered="false"} 76return} 77if(!target.hasAttribute('data-anim-offset')){const offset=parseInt(startLine-targetCenter);target.dataset.animOffset=offset;return} 78const offset=target.dataset.animOffset?parseInt(target.dataset.animOffset):0;if(offset>0){startLine=startLine-offset;if(targetCenter>startLine||targetCenter<endLine){return}} 79const progress=(targetCenter-startLine)/(endLine-startLine);const styles=greyd.animations.getAnimatedStyles(target,progress);for(let property in styles){target.style[property]=styles[property]} 80if(target.dataset.animTriggered==="false"){target.dataset.animTriggered="true"}};this.getAnimatedStyles=function(target,progress){if(greyd.animations.usesReducedMotion){return greyd.animations.cssStringToObject(target.dataset.animTo)} 81const styles={};const fromProperties=greyd.animations.cssStringToObject(target.dataset.animFrom);const toProperties=greyd.animations.cssStringToObject(target.dataset.animTo);const properties=Object.keys({...fromProperties,...toProperties});
81properties.forEach(property=>{const fromValue=property in fromProperties?fromProperties[property]:null;const toValue=property in toProperties?toProperties[property]:null;if(fromValue&&toValue){const fromPieces=fromValue.match(/(\w+\()|([+-]?\d*\.\d+|[+-]?\d+)|(\))|([\%\w]+)|(\s+)|(,)/g);const toPieces=toValue.match(/(\w+\()|([+-]?\d*\.\d+|[+-]?\d+)|(\))|([\%\w]+)|(\s+)|(,)/g);const pieces=fromPieces.map((from,i)=>{const to=toPieces[i];if(greyd.animations.isNumeric(from)&&greyd.animations.isNumeric(to)){return Math.round(greyd.animations.mapProgress(progress,0,1,from,to)*1000)/1000} 82return to}) 83styles[property]=pieces.join('')}});return styles} 84this.cssStringToObject=function(cssString){let cssObject={};let cssProperties=cssString.split(';');cssProperties.forEach(property=>{let keyValue=property.split(':');if(keyValue.length===2){cssObject[keyValue[0].trim()]=keyValue[1].trim()}});return cssObject} 85this.objectToCssString=function(cssObject){let cssString="";for(let key in cssObject){cssString+=key+": "+cssObject[key]+"; "} 86return cssString} 87this.mapProgress=function(value,inMin,inMax,outMin,outMax){if(outMin<outMax){return(value-inMin)*(outMax-outMin)/(inMax-inMin)+Math.min(outMin,outMax)}else{return(value-inMin)*(outMax-outMin)/(inMax-inMin)+Math.max(outMin,outMax)}};this.isNumeric=function(value){return!isNaN(parseFloat(value))&&isFinite(value)} 88this.getClosest=function(elem,selector){if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(s){var matches=(this.document||this.ownerDocument).querySelectorAll(s),i=matches.length;while(--i>=0&&matches.item(i)!==this){} 89return i>-1}} 90for(;elem&&elem!==document;elem=elem.parentNode){if(elem.matches(selector))return elem} 91return null}};addEventListener('DOMContentLoaded',function(){greyd.animations.init()});window.addEventListener('load',(event)=>{var conditionElements=document.querySelectorAll(".wp-block-greyd-conditional-content[data-harden-conditions]");var fieldElements=document.querySelectorAll("form [data-harden-field]");var liveFieldElements=document.querySelectorAll("form [data-live-field]");if((!conditionElements||conditionElements.length==0)&&(!fieldElements||fieldElements.length==0)&&(!liveFieldElements||liveFieldElements.length==0)){return} 92const matchCondition=function(is,should,condition='is'){is=!is?"":(""+is+"").trim();should=!should?"":(""+should+"").trim();if(condition==='is'){return should===is}else if(condition==='is_not'){return should!==is}else if(condition==='has'){return is.indexOf(should)>-1}else if(condition==='has_not'){return is.indexOf(should)==-1}else if(condition==='empty'){return is===""}else if(condition==='not_empty'){return is!==""} 93return!1};const checkConditions=function(conditions,data){if(!conditions||conditions.length==0){return} 94conditions.forEach(condition=>{if(!condition||condition.length==0){return} 95condition=condition[0];var key=condition.detail;var values={};if(condition.type=='localStorage'){values=localStorage}else if(condition.type=='urlparam'||condition.type=='cookie'){values=condition.type=='urlparam'?data.url_values:data.cookie_values;if(key=='custom'){key=condition.custom;values=condition.type=='urlparam'?data.all_url_values:data.all_cookie_values}} 96var is=values[key]?values[key]:null;var match=matchCondition(is,condition.value,condition.operator);if(match){var element=document.getElementById(condition.id);if(element)element.style.display='block'}else{var element=document.getElementById(condition.id);if(element)element.remove()}})};const checkHiddenFields=function(fields,data){if(!fields||fields.length==0){return} 97fields.forEach(field=>{var value='';if(field.type=='url'){value=window.location.origin+window.location.pathname}else if(field.type=='live_url'){value=window.location.href}else{var key=field.name;var values=field.type=='cookie'?data.all_cookie_values:data.all_url_values;value=values[key]?values[key]:field.default} 98var element=document.getElementById(field.id);if(element){element.value=value;element.dispatchEvent(new Event('change'))}})};const getValues=async function(){var urlparams=new URLSearchParams(window.location.search);
98urlparams=Object.fromEntries(urlparams.entries());return fetch(greyd.rest_api.root+'greyd/v1/get_url_and_cookie_values',{method:'POST',headers:{'Content-Type':'application/json',},body:JSON.stringify({urlparams:urlparams,}),}).then((res)=>{return res.json()}).then((data)=>{if(data&&data.url_values&&data.all_url_values&&data.cookie_values&&data.all_cookie_values){return data} 99return Promise.reject('response not valid')}).catch((err)=>{console.error("fetch error: ",err)})};const getData=function(elements,attribute){if(!elements||elements.length==0||attribute==""){return!1} 100var result=[];if(elements&&elements.length>0){elements.forEach(element=>{try{var value=element.getAttribute(attribute);var json=JSON.parse(value);result.push(json)}catch{} 101element.removeAttribute(attribute)});result=result.filter(item=>item)} 102if(!result||result.length==0){return!1} 103return result} 104var conditions=getData(conditionElements,"data-harden-conditions");var hiddenFields=getData(fieldElements,"data-harden-field");if(conditions||hiddenFields){getValues().then((data)=>{if(data){checkConditions(conditions,data);checkHiddenFields(hiddenFields,data)}})} 105var liveFields=getData(liveFieldElements,"data-live-field");if(liveFields){checkHiddenFields(liveFields,{});window.addEventListener("hashchange",function(){checkHiddenFields(liveFields,{})})}});var greyd=greyd||{};greyd.rest_api={"root":"https:\/\/kaveh-immobilien.de\/?rest_route=\/","routes":{"livequeries":"greyd\/v1\/livequeries\/","livequery":"greyd\/v1\/livequery\/","livesearch":"greyd\/v1\/livesearch\/","autosearch":"wp\/v2\/search\/"},"lang":"de","posts_per_page":"9","is_greyd_blocks":!0,"is_vc":!1};var greyd=greyd||{};(function(){jQuery(function(){if(typeof $==='undefined')$=jQuery;greyd.query.init();console.log("Query Scripts: loaded")})})(jQuery);greyd.query=greyd.query||{};greyd.query.init=function(){greyd.query.slider.init();greyd.query.sorting.init();greyd.query.table.init()} 106greyd.query.slider=new function(){this.loaded=!1;this.init=function(){this.addEvents()} 107this.addEvents=function(){var wrapper=$(".greyd-posts-slider.js:not([data-init])");if(wrapper.length>0){const observer=new IntersectionObserver((entries)=>{entries.forEach(entry=>{if(entry.isIntersecting){entry.target.dataset.inViewport=!0}else{entry.target.dataset.inViewport=!1}})},{threshold:0});wrapper.each(function(){if($(this).hasClass('autoplay')){var time=$(this).data('interval')*1000;var that=this;$(this).timer=setInterval(function(){if(!$(that).hasClass('pause')&&!$(that).hasClass('forcePause')){greyd.query.slider.paginateNext($(that))}},time)} 108$(this).off('next').on('next',function(){greyd.query.slider.paginateNext(this)});$(this).off('prev').on('prev',function(){greyd.query.slider.paginatePrevious(this)});$(this).off('first').on('first',function(){greyd.query.slider.paginate(this,1)});$(this).off('last').on('last',function(){var pages=$(this).children('.query-pages-wrapper').children('.query-page');greyd.query.slider.paginate(this,pages.length)});$(this).off('stop').on('stop',function(){$(this).addClass('forcePause pause')});$(this).off('start').on('start',function(){$(this).removeClass('forcePause pause')});$(this).closest('.wp-block-query').find('.wp-block-query-pagination').each(function(){greyd.query.slider.addCorePagination(this)});$(this).off('touchstart').on('touchstart',function(e){greyd.query.slider.touchStart(this,e);$(this).trigger('stop')});$(this).off('touchmove').on('touchmove',function(e){greyd.query.slider.touchMove(this,e);$(this).trigger('stop')});$(this).find('img').each(function(){$(this).off('load').on('load',function(e){if(greyd.query.slider.loaded)greyd.query.slider.calc()})});$(this).attr('data-init','true');observer.observe(wrapper[0])});window.addEventListener("resize",function(){greyd.query.slider.calc()});setTimeout(function(){greyd.query.slider.calc()},100);$(document).keydown(function(e){if(e.keyCode==37){var wrapper=$(".greyd-posts-slider.js:hover");if(wrapper.length>0){wrapper.trigger('prev');wrapper.trigger('stop')} 109return!1} 110if(e.keyCode==39){var wrapper=$(".greyd-posts-slider.js:hover");if(wrapper.length>0){wrapper.trigger('next');wrapper.trigger('stop')} 111return!1}})}} 112this.calc=function(){$('.greyd-posts-slider.js > .query-pages-wrapper').each(function(e){var pages=$(this).children('.query-page');var wrapper=$(this).closest('.greyd-posts-slider');var current=wrapper.data('currentpage');var height=$(this)[0].offsetHeight;var newHeight=null;if(wrapper.data('height')=='auto'){}else if(wrapper.data('height')==='max'){newHeight=pages.length>1?pages[current-1].offsetHeight+"px":null}else{newHeight=wrapper.data('height');
112if(screen.width<=767&&typeof wrapper.data('height_mobile')!='undefined'&&wrapper.data('height_mobile')!='max'){newHeight=wrapper.data('height_mobile')}} 113if(newHeight&&newHeight!=height){$(this).css('height',newHeight)}});greyd.query.slider.loaded=!0} 114this.onPaginateClick=function(e,el,pagelink){var wrapper=$(el).closest('.greyd-posts-slider');greyd.query.slider.paginate(wrapper,pagelink);wrapper.trigger('stop')} 115this.paginateNext=function(wrapper){var newpage=parseInt($(wrapper).data('currentpage'))+1;this.paginate($(wrapper),newpage)} 116this.paginatePrevious=function(wrapper){var newpage=parseInt($(wrapper).data('currentpage'))-1;this.paginate($(wrapper),newpage)} 117this.paginate=function(wrapper,newpage){const isNumeric=(str)=>{if(typeof str!="string")return!1;return!isNaN(str)&&!isNaN(parseFloat(str))} 118if(isNumeric(newpage)){newpage=parseInt(newpage)}else{if(newpage=='next'){newpage=parseInt($(wrapper).data('currentpage'))+1}else if(newpage=='prev'){newpage=parseInt($(wrapper).data('currentpage'))-1}else if(newpage=='first'){newpage=1}else if(newpage=='last'){newpage=$(wrapper).children('.query-pages-wrapper').children('.query-page').length}} 119var current=$(wrapper).data('currentpage');var pages=$(wrapper).children('.query-pages-wrapper').children('.query-page');if(current==newpage)return;if($(wrapper).hasClass('loop')){if(newpage<1)newpage=pages.length;if(newpage>pages.length)newpage=1}else{if(newpage<1)return;if(newpage>pages.length)return} 120const resultsWrapper=$(wrapper).children('.query-pages-wrapper');const activeStep=pages[newpage-1];const prev=$(wrapper).find('.pgn_previous');const next=$(wrapper).find('.pgn_next');const config={animation:$(wrapper).data('animation'),height:$(wrapper).data('height'),heightMobile:$(wrapper).data('height_mobile'),offsetLeft:activeStep.offsetLeft,scrollToTop:$(wrapper).hasClass('slider_scroll_top'),speed:$(wrapper).data('duration')??(typeof greydSliderSpeed!=="undefined"?greydSliderSpeed:200)};if(config.animation=='none'){config.speed=0} 121$(wrapper).data('currentpage',newpage);pages.removeClass('is-current is-prev is-next');$(pages[newpage-2]).addClass('is-prev');$(activeStep).addClass('is-current');$(pages[newpage]).addClass('is-next');let newHeight;if(config.height=='auto'){}else if(config.height==='max'){newHeight=activeStep.offsetHeight}else{newHeight=config.height;if(screen.width<=767&&typeof config.heightMobile!='undefined'&&config.heightMobile!='max'){newHeight=config.heightMobile}} 122if(config.animation=='fade'){$(resultsWrapper).finish().animate({opacity:0}
122,config.speed);setTimeout(()=>{if(config.scrollToTop&&newHeight){resultsWrapper.css('height',newHeight)} 123$(resultsWrapper).finish().animate({scrollLeft:config.offsetLeft},0);$(resultsWrapper).finish().animate({opacity:1,...(!config.scrollToTop)&&newHeight?{height:newHeight}:{}},config.speed)},config.speed)}else if(config.animation=='cover'){if(config.scrollToTop&&newHeight){resultsWrapper.css('height',newHeight)}else if(newHeight){$(resultsWrapper).finish().animate({height:newHeight},config.speed,'swing')}}else{if(config.scrollToTop&&newHeight){resultsWrapper.css('height',newHeight)} 124console.log(config,newHeight);$(resultsWrapper).finish().animate({scrollLeft:config.offsetLeft,...(!config.scrollToTop)&&newHeight?{height:newHeight}:{}},config.speed,'swing')} 125if(config.scrollToTop&&wrapper[0].dataset.inViewport==="true"){const offsetTop=$(wrapper).offset().top-100;if($(document).scrollTop()>offsetTop){if(typeof nav!=='undefined'){console.log("scroll to top with nav",nav);nav.scrollTo(offsetTop)}else{window.scrollTo({top:offsetTop,behavior:'auto'})}}} 126var pg_wrapper=$(wrapper).find('.pagination');if(pg_wrapper.length){var pg_pages=$(pg_wrapper).find('.pgn_numbers').children();var iconnormal=$(pg_wrapper).data('iconnormal')??$(pg_wrapper).find('.pgn_numbers').data('iconnormal');var iconactive=$(pg_wrapper).data('iconactive')??$(pg_wrapper).find('.pgn_numbers').data('iconactive');var imgnormal=$(pg_wrapper).data('imgnormal')??$(pg_wrapper).find('.pgn_numbers').data('imgnormal');var imgactive=$(pg_wrapper).data('imgactive')??$(pg_wrapper).find('.pgn_numbers').data('imgactive');for(var i=0;i<pg_pages.length;i++){var p=$(pg_pages[i]);if(!$(p).hasClass('pgn_number'))p=$(p).find('.pgn_number');if($(pg_pages[i]).data('pagelink')==current){$(p).removeClass('pgn_current');if(typeof iconactive!=='undefined')$(p).removeClass(iconactive);if(typeof iconnormal!=='undefined')$(p).addClass(iconnormal);if(typeof imgnormal!=='undefined')$(p).children().attr('src',imgnormal)} 127if($(pg_pages[i]).data('pagelink')==newpage){$(p).addClass('pgn_current');if(typeof iconnormal!=='undefined')$(p).removeClass(iconnormal);if(typeof iconactive!=='undefined')$(p).addClass(iconactive);if(typeof imgactive!=='undefined')$(p).children().attr('src',imgactive)}}} 128$(prev).removeClass('pgn_current');if(newpage==1)$(prev).addClass('pgn_current');$(next).removeClass('pgn_current');if(newpage==pages.length)$(next).addClass('pgn_current');$(wrapper).trigger("greyd_slider_paginate",[newpage])} 129this.xDown=null;this.touchStart=function(el,evt){greyd.query.slider.xDown=evt.originalEvent.touches[0].clientX} 130this.touchMove=function(el,evt){if(!greyd.query.slider.xDown){return} 131var xUp=evt.originalEvent.touches[0].clientX;var xDiff=greyd.query.slider.xDown-xUp;if(xDiff>50){$(el).trigger('next');$(el).trigger('stop');greyd.query.slider.xDown=null}else if(xDiff<-50){$(el).trigger('prev');$(el).trigger('stop');greyd.query.slider.xDown=null}} 132this.triggerNext=function(el){$(el).closest('.wp-block-query').children('.greyd-posts-slider.js').trigger('next')} 133this.triggerPrevious=function(el){$(el).closest('.wp-block-query').children('.greyd-posts-slider.js').trigger('prev')} 134this.triggerIndex=function(el,index){$(el).closest('.wp-block-query').children('.greyd-posts-slider.js').each(function(){greyd.query.slider.paginate(this,index)})} 135this.addCorePagination=function(el){let allPages=$(el).closest('.wp-block-query').children('.greyd-posts-slider.js').find('.query-page');if(!allPages||allPages.length<2)return;const trigger=(mode,element,index=!1)=>{var wrapper=$(el).closest('.wp-block-query').children('.greyd-posts-slider.js');var current=$(wrapper).data('currentpage');var pages=$(wrapper).find('.query-page');var isLoop=$(wrapper).hasClass('loop');if(mode=='previous'){current--;greyd.query.slider.triggerPrevious(element);if(current<1){if(isLoop)current=pages.length;else return}} 136if(mode=='next'){current++;greyd.query.slider.triggerNext(element);if(current>pages.length){if(isLoop)current=1;else return}} 137if(mode=='index'){current=index;greyd.query.slider.triggerIndex(element,index)} 138$(el).find('.wp-block-query-pagination-numbers .page-numbers:not
138(.dots)').each((j,number)=>{$(number).removeClass('current');$(number).removeAttr('aria-current');if($(number).data('page')==current){$(number).addClass('current');$(number).attr('aria-current','page')}})};var previous=$(el).find('.wp-block-query-pagination-previous');previous.removeAttr("href");previous.off('click').on('click',function(e){trigger('previous',this)});var next=$(el).find('.wp-block-query-pagination-next');next.removeAttr("href");next.off('click').on('click',function(e){trigger('next',this)});var numbers=$(el).find('.wp-block-query-pagination-numbers .page-numbers:not(.dots)');numbers.each((i,num)=>{var attrs={};$.each($(num)[0].attributes,function(idx,attr){attrs[attr.nodeName]=attr.nodeValue});let index=i+1;if(attrs.href){delete attrs.href} 139attrs['data-page']=index;attrs.onclick="greyd.query.slider.triggerIndex(this, "+index+")";$(num).replaceWith(function(){const text=$(this).contents();return $("<a />",attrs).append(text)})})}} 140greyd.query.sorting=new function(){this.init=function(){if($(".greyd-posts-slider").length===0)return!1;if(!($(".greyd-posts-slider.js").length===0)){this.addEvents()}else{if($('.greyd-posts-slider').attr("live-search")=="true"){return!1}else{this.startQuery()}}} 141this.addEvents=function(){const sortingDropdown=$('.greyd-posts-slider').find('.sorting');sortingDropdown.each(function(){var wrapper=$(this);var select=wrapper.find("select");var slider=wrapper.parent();var results=slider.find($(".query-post"));select.off("change").on("change",function(){console.log(slider);console.log(results);var sorted_elements=greyd.query.sorting.sortElements($(this).val(),results);greyd.query.sorting.distributeElements(sorted_elements,slider)})});$('[id^="filter_"]').each(function(){var results=$(this).siblings('[id^="slider_"]').find($(".query-post"));if(results){var select=$(this).find("select");var filter=select.val();$(results).each(function(){greyd.query.sorting.filterElements(this,filter)});select.off("change").on("change",function(){var filter=$(this).val();$(results).each(function(){greyd.query.sorting.filterElements(this,filter)})})}})} 142this.filterElements=function(el,filter){var vals=JSON.parse(decodeURIComponent($(el).data('filter')));filter=parseInt(filter);if(filter==null||filter==-1||vals.indexOf(filter)!=-1) 143$(el).css('display','block');else $(el).css('display','none')} 144this.sortElements=function(mode,search_results){search_results.sort(function(a,b){if(~mode.indexOf("title")){var compA=a.dataset.title;var compB=b.dataset.title}else if(~mode.indexOf("date")){var compA=a.dataset.date;var compB=b.dataset.date}else if(~mode.indexOf("views")){var compA=parseInt(a.dataset.postviews);var compB=parseInt(b.dataset.postviews)} 145if(~mode.indexOf("ASC")){return((compA<compB)?-1:((compA>compB)?1:0))}else if(~mode.indexOf("DESC")){return((compA>compB)?-1:((compA<compB)?1:0))}});return search_results} 146this.distributeElements=function(sorted_elements,parent){var posts_per_page=$(".query-pages-wrapper").data("ppp");var pages=$(".query-page").length;var i=0;for(var x=1;x<=pages;x++){var limit_per_page=1;for(;i<sorted_elements.length;){parent.find($('.query-page[data-page="'+x+'"]')).append(sorted_elements[i]);i++;if(limit_per_page==posts_per_page){break} 147limit_per_page++}}} 148this.startQuery=function(){const sortingDropdown=$('.greyd-posts-slider').find('.sorting');sortingDropdown.find("select").off("change").on('change',function(){var url=$(this).val();if(url){window.location=url} 149return!1})}} 150greyd.query.table=new function(){this.init=function(){if(typeof tablesort!=='undefined')return;if($(".posts_table").length===0)return!1;this.config={styles:{'sort':'sortable','asc':'ascending','desc':'descending','unsort':'unsorted'},defaultColumn:0,defaultOrder:'asc',selector:function(tbody,column){var groups=[];$.each($(tbody).find('tr'),function(index,tr){var td=$(tr).find('td')[column];groups.push({'elem':[tr],'text':$(td).text()})});return groups},comparator:function(a,b){function convertToNum(x){return parseFloat(x.replace(',','.'))} 151var regex=/^[0-9\s.,]+$/;a=a.text,b=b.text;if(a.match(regex)&&b.match(regex))return convertToNum(b)-convertToNum(a);return a.localeCompare(b)}};$(".posts_table").each(function(i,wrapper){$.each(greyd.query.table.getSortableTableHeaders(wrapper),function(j,th){$(th).off("click").on("click",function(event){var clickColumn=$.inArray(event.currentTarget,greyd.query.table.getAllTableHeaders($(this).closest("table")));greyd.query.table.changeOrder(wrapper,clickColumn)})})})} 152this.getAllTableHeaders=function(wrapper){return $(wrapper).find('thead > tr > th')} 153this.getNthTableHeaders=function(wrapper,n){return $(wrapper).find('thead > tr > th:nth-child('+(n+1)+')')} 154this.getSortableTableHeaders=function(wrapper){return greyd.query.table.getAllTableHeaders(wrapper).filter(function(index){return $(this).hasClass(greyd.query.table.config.styles.sort)})} 155this.changeOrder=function(wrapper,column){var th=greyd.query.table.getNthTableHeaders(wrapper,column);var sortOrder=greyd.query.table.config.defaultOrder;if(th.hasClass(greyd.query.table.config.styles.asc)){sortOrder='desc'} 156if(th.hasClass(greyd.query.table.config.styles.desc)){sortOrder='asc'} 157var headers=greyd.query.table.getSortableTableHeaders(wrapper);headers.removeClass(greyd.query.table.config.styles.asc+" "+greyd.query.table.config.styles.desc);headers.addClass(greyd.query.table.config.styles.unsort);th.removeClass(greyd.query.table.config.styles.unsort);th.addClass(greyd.query.table.config.styles[sortOrder]);var tbody=$(wrapper).find('tbody');var groups=greyd.query.table.config.selector(tbody,column);groups.sort(function(a,b){var res=greyd.query.table.config.comparator(a,b);return sortOrder=='asc'?res:-1*res});var rows=parseInt($(wrapper).data('rows')),i=0,k=0;$.each(groups,function(i,trList){if(i===rows*(k+1))k++;$.each(trList.elem,function(j,tr){tbody[k].append(tr)});i++})}};document.addEventListener("DOMContentLoaded",function(){if(!greyd?.scrollObserver)return;function initNavigations(){var navBlocks=document.querySelectorAll('.wp-block-navigation.is-anchor-active-style');if(navBlocks.length==0)return;navBlocks.forEach((wrapper,key)=>{const setup=wrapper.dataset.anchoractive?JSON.parse(wrapper.dataset.anchoractive):{};if(!setup.enable)return;const activeLinks=wrapper.querySelectorAll('a.wp-block-navigation-item__content[href*="#"]');if(activeLinks.length==0)return;let start=setup.start?parseInt(setup.start):0;let end=setup.end?parseInt(setup.end):100;if(end<start){let tmp=start;start=end;end=tmp} 158const multiple=setup.multiple?setup.multiple:'';const none=setup.none?setup.none:'';let items=[];activeLinks.forEach((link,key)=>{const item=link.parentElement;const href=link.href;const id=href.split('#')[1];
158const anchor=document.getElementById(id);if(anchor){items.push({item:item,anchor:anchor});var simple=start==0&&end==100&&multiple==''&&none=='';if(simple){greyd.scrollObserver.observeElement(anchor,(target,event,inViewport)=>{if(inViewport){item.classList.add('current-menu-item')}else{item.classList.remove('current-menu-item')}},'change')}else{greyd.scrollObserver.observeElement(anchor,(target,event,inViewport)=>{var boundingClientRect=target.getBoundingClientRect();var targetTop=boundingClientRect.y;var targetBottom=targetTop+boundingClientRect.height;var endLine=(window.innerHeight/100)*end;var startLine=(window.innerHeight/100)*start;const getDistance=(element)=>{var bounds=element.getBoundingClientRect();var top=bounds.y;var bottom=top+bounds.height;var center=(endLine+startLine)/2;var distance=0;if(bottom<center&&top<center){distance=center-bottom} 159if(bottom>center&&top>center){distance=top-center} 160return distance};var inside=targetBottom>startLine&&targetTop<endLine;if(inside&&multiple=='closest'){var distance=getDistance(target);items.forEach((other)=>{if(other.item===item||!other.item.classList.contains('current-menu-item'))return;if(getDistance(other.anchor)<distance){inside=!1}})} 161if(inside&&!item.classList.contains('current-menu-item')&&multiple=='latest'){items.forEach((other)=>{if(other.item===item||!other.item.classList.contains('current-menu-item'))return;other.item.classList.remove('current-menu-item')})} 162if(inside){item.classList.add('current-menu-item')}else{item.wasActive=item.classList.contains('current-menu-item');if(item.wasActive)items.forEach((other)=>{if(other.item===item)return;other.item.wasActive=!1});item.classList.remove('current-menu-item')} 163if(none!=''){var anyActive=!1;var distances=[];items.forEach((other,index)=>{if(other.item.classList.contains('keep-anchor-active')){other.item.classList.remove('current-menu-item','keep-anchor-active')} 164if(other.item.classList.contains('current-menu-item')){anyActive=!0}else{distances.push({index:index,distance:getDistance(other.anchor)})}});if(!anyActive){if(none=='keep'){items.forEach((other,index)=>{if(other.item.wasActive){other.item.classList.add('current-menu-item','keep-anchor-active');anyActive=!0}})} 165if(!anyActive){distances.sort((a,b)=>a.distance-b.distance);items[distances[0].index].item.classList.add('current-menu-item','keep-anchor-active')}}}},'always');item.classList.remove('current-menu-item')}}})});console.log("navigation scripts loaded.")} 166initNavigations()});var greyd=greyd||{};(function(){jQuery(function(){if(typeof $==='undefined')$=jQuery;if(typeof theme!=='undefined')return;greyd.input.init();console.log("Input Scripts: loaded")})})(jQuery);greyd.input=greyd.input||{};greyd.input.init=function(){greyd.input.multiselects.init();greyd.input.selects.init();greyd.input.boxes.init()} 167greyd.input.closeAll=function(current){greyd.input.multiselects.closeAll();greyd.input.selects.closeAll(current)} 168greyd.input.multiselects=new function(){this.init=function(){if(typeof $==='undefined')$=jQuery;$(".greyd_form select[multiple]").each(function(){greyd.input.multiselects.render(this)});$(".greyd_multiselect").each(function(){var wrap=$(this);var input=wrap.find(".input");input.off("click").on("click",function(e){e.stopPropagation();var open=wrap.hasClass("open")?!1:!0;$(".greyd_multiselect").each(function(){$(this).removeClass("open")});greyd.input.closeAll(null);if(open){wrap.addClass("open");$(document).one("click",function(){wrap.removeClass("open")})}});var option=wrap.find(".option");option.off("click").on("click",function(e){greyd.input.multiselects.toggleValue(this,e)})});document.addEventListener("keydown",e=>{const multiselectWrapper=e.target?.closest(".greyd_multiselect");if(multiselectWrapper&&multiselectWrapper?.querySelector("input")){if(multiselectWrapper?.classList?.contains("open")){if(e.key=="ArrowUp"||e.key=="ArrowDown"){e.preventDefault();greyd.input.multiselects.focusNextItem(e)}else if(e.key==" "&&e.target.classList.contains("option")){const option=e.target;e.preventDefault();greyd.input.multiselects.toggleValue(option,e)}else if(e.key=="Escape"||e.key==" "&&e.target.classList.contains("input")){e.preventDefault();greyd.input.closeAll(null)}else if(e.key=="Tab"){const activeElement=document.activeElement;if((e.shiftKey&&e.target.classList.contains("input"))||(!e.shiftKey&&!activeElement.nextElementSibling)){greyd.input.closeAll(null)}}}else{if(e.key=="Enter"||e.key==" "&&e.target.classList.contains("input")){e.preventDefault();multiselectWrapper.classList.add("open")}}}else if(e.target?.closest(".greyd_multiradio")){if(e.key=="ArrowUp"||e.key=="ArrowDown"){e.preventDefault();const activeElement=document.activeElement;if(activeElement.nextElementSibling&&e.key=="ArrowDown"){activeElement.nextElementSibling.focus()}else if(activeElement.previousElementSibling&&e.key=="ArrowUp"){activeElement.previousElementSibling.focus()}}else if(e.key==" "&&e.target.classList.contains("option")){e.preventDefault();e.target.onclick()}}})};
168this.toggleValue=function(elem,e){e.stopPropagation();elem=$(elem);if(elem.hasClass('selected')) 169this.removeValue(elem,e);else this.addValue(elem,e)};this.removeValue=function(elem,e){e.stopPropagation();elem=$(elem);var val=elem.data('value');var wrap=elem.closest('.greyd_multiselect');wrap.find('.dropdown .option[data-value="'+val+'"]').removeClass('selected');wrap.find('.input .tag[data-value="'+val+'"]').remove();var field=wrap.find('input');var values=field.val().split(',');values=values.filter(function(v,i){if(v!=""&&v!=val&&values.indexOf(v)==i)return!0});greyd.input.multiselects.setValue(field,values.join(','))};this.addValue=function(elem,e){e.stopPropagation();elem=$(elem);var val=elem.data('value');var name=elem.text();var wrap=elem.closest('.greyd_multiselect');var input=wrap.find('.input');wrap.find('.dropdown .option[data-value="'+val+'"]').addClass('selected');var tag=decodeURIComponent(input.data('tag'));tag=tag.replace("{value}",val).replace("{name}",name);input.find('.tags').append(tag);var field=wrap.find('input');var values=field.val().split(',');values.push(val);values=values.filter(function(v,i){if(v!=""&&values.indexOf(v)==i)return!0});greyd.input.multiselects.setValue(field,values.join(','))};this.setValue=function(field,value){field.val(value);field.trigger("change")};this.render=function(select){var placeholder='';var options={};var values=[];var name=select.getAttribute('name');var className=select.getAttribute('class');var required=select.hasAttribute('required');var tag_code="<span class=\"tag\" data-value=\"{value}\" onclick=\"greyd.input.multiselects.removeValue(this, event);\">{name}<span class=\"icon_close\"></span></span>";$(select).children('option').each(function(){var txt=this.textContent;var val=this.hasAttribute('value')?this.getAttribute('value'):'';if(val==''&&placeholder==''){placeholder=txt}else{val=val==''?txt:val;options[val]=txt;if(this.hasAttribute('selected')) 170values.push(val)}});var wrap=document.createElement("div");wrap.setAttribute("class","greyd_multiselect");select.after(wrap);select.parentNode.removeChild(select);var input=document.createElement("input");input.setAttribute("type","text");input.setAttribute("name",name);input.setAttribute("id",name);input.setAttribute("value",values.join(','));input.setAttribute("tabindex",-1);if(required)input.setAttribute("required","required");wrap.appendChild(input);var div=document.createElement("div");div.setAttribute("class","input"+(className?' '+className:''));div.setAttribute("role","listbox");div.setAttribute("tabindex",0);div.setAttribute("aria-multiselectable","true");div.setAttribute("data-tag",encodeURIComponent(tag_code));wrap.appendChild(div);var tags=document.createElement("span");tags.setAttribute("class","tags");tags.setAttribute("data-placeholder",placeholder);div.appendChild(tags);if(values.length>0){values.forEach(function(value,i){var tag=$.parseHTML(tag_code.replace(/{value}/,value).replace(/{name}/,options[value]));$(tags).append(tag)})} 171var dropdown=document.createElement("div");dropdown.setAttribute("class","dropdown");wrap.appendChild(dropdown);for(var val in options){var option=document.createElement("div");option.setAttribute("class","option"+(values.indexOf(val)>=0?" selected":""));option.setAttribute("data-value",val);option.setAttribute("role","option");option.setAttribute("tabindex",0);dropdown.appendChild(option);var icon=document.createElement("span");icon.setAttribute("class","icn");option.appendChild(icon);option.innerHTML+=options[val]}};this.focusNextItem=(e)=>{const key=e.key;const target=e.target;const activeElement=document.activeElement;const selectWrapper=target.closest(".greyd_multiselect");const selectGroup=selectWrapper.querySelector(".dropdown");const items=selectGroup.children;if(activeElement.classList.contains("input")&&selectWrapper.classList.contains("open")&&key=="ArrowDown"){items[0].focus()}else if(activeElement.nextSibling&&key=="ArrowDown"){activeElement.nextSibling.focus()}else if(activeElement.previousSibling&&key=="ArrowUp"){activeElement.previousSibling.focus()}else return};this.closeAll=function(){var elements=document.getElementsByClassName("greyd_multiselect");for(var i=0;i<elements.length;i++){elements[i].classList.remove("open")}}};greyd.input.selects=new function(){this.init=function(){var x,i,j,selElmnt,a,b,c;x=document.getElementsByClassName("custom-select");for(i=0;i<x.length;i++){selElmnt=x[i].getElementsByTagName("select")[0];if(typeof selElmnt==='undefined')continue;var t=x[i].getElementsByClassName("select-selected")[0];if(typeof t!=='undefined')continue;a=document.createElement("DIV");a.setAttribute("class","select-selected");if(selElmnt.hasAttribute("style"))a.setAttribute("style",selElmnt.getAttribute("style"));if(selElmnt.hasAttribute("title"))a.setAttribute("title",selElmnt.getAttribute("title"));a.setAttribute("onmouseover",selElmnt.getAttribute("onmouseover"));a.setAttribute("onmouseout",selElmnt.getAttribute("onmouseout"));a.innerHTML="<span>"+selElmnt.options[selElmnt.selectedIndex].innerHTML+"</span>";selElmnt.parentNode.insertBefore(a,selElmnt.nextSibling);a.innerHTML+="<span class=\"select-icon\" aria-hidden=\"true\"></span>";b=document.createElement("DIV");b.setAttribute("class","select-items select-hide");b.style.marginTop='-'+selElmnt.style.marginBottom;b.style.fontSize=selElmnt.style.fontSize;b.style.fontWeight=selElmnt.style.fontWeight;b.style.color=selElmnt.style.color;b.style.background=selElmnt.style.background;b.style.borderRadius=selElmnt.style.borderRadius;b.style.borderColor=selElmnt.style.borderColor;b.style.borderWidth=selElmnt.style.borderWidth;b.style.borderLeftStyle=selElmnt.style.borderLeftStyle;b.style.borderRightStyle=selElmnt.style.borderRightStyle;b.style.borderTopStyle=selElmnt.style.borderTopStyle;b.style.borderBottomStyle=selElmnt.style.borderBottomStyle;for(j=0;j<selElmnt.length;j++){c=document.createElement("DIV");c.innerHTML=selElmnt.options[j].innerHTML;c.dataset.value=selElmnt.options[j].getAttribute('value');
171if(selElmnt.getAttribute("onmouseover")&&selElmnt.getAttribute("onmouseout")){c.style.color=selElmnt.style.color;c.style.background=selElmnt.style.background;c.style.paddingLeft=selElmnt.style.paddingLeft;c.style.paddingRight=selElmnt.style.paddingRight;c.style.paddingTop="5px";c.style.paddingBottom="5px";var t=selElmnt.getAttribute("onmouseover");t=t.split(' !important').join('');if(t.indexOf('color: ')>-1){t=t.split('color: ');var color=t[1].split(';');var jscolor="$(this).css('color','"+color[0]+"');";t=t[1]} 172if(t.indexOf('background: ')>-1){t=t.split('background: ');var background=t[1].split(';');var jsbackground="$(this).css('background','"+background[0]+"');"} 173c.setAttribute("onmouseover",jscolor+jsbackground);var t=selElmnt.getAttribute("onmouseout");t=t.split(' !important').join('');if(t.indexOf('color: ')>-1){t=t.split('color: ');var color=t[1].split(';');var jscolor="$(this).css('color','"+color[0]+"');";t=t[1]} 174if(t.indexOf('background: ')>-1){t=t.split('background: ');var background=t[1].split(';');var jsbackground="$(this).css('background','"+background[0]+"');"} 175c.setAttribute("onmouseout",jscolor+jsbackground)} 176c.addEventListener("click",function(e){const select=this.parentNode.parentNode.getElementsByTagName("select")[0];const index=[...this.parentElement.children].indexOf(this);select.selectedIndex=index;select.dispatchEvent(new Event('change'));this.parentNode.classList.add("select-hide");this.parentNode.previousSibling.classList.remove("select-arrow-active")});b.appendChild(c)} 177selElmnt.parentNode.insertBefore(b,a.nextSibling);a.addEventListener("click",function(e){e.stopPropagation();greyd.input.closeAll(this);this.classList.toggle("select-arrow-active");$(this.nextSibling).toggleClass("select-hide")});selElmnt.addEventListener("change",function(e){const select=this;const fakeSelect=select.parentNode.getElementsByClassName('select-selected')[0];fakeSelect.innerHTML="<span>"+select.options[select.selectedIndex].innerHTML+"</span>";fakeSelect.innerHTML+="<span class=\"select-icon\" aria-hidden=\"true\"></span>";const fakeOptions=select.parentNode.getElementsByClassName('select-items')[0];const selectedOptions=fakeOptions.getElementsByClassName("same-as-selected");selectedOptions.length&&selectedOptions[0].classList.remove("same-as-selected");fakeOptions.children[select.selectedIndex].classList.add("same-as-selected")})} 178document.addEventListener("click",greyd.input.closeAll)} 179this.closeAll=function(current){var except=[];var elements=document.getElementsByClassName("select-items");var selected=document.getElementsByClassName("select-selected");for(var i=0;i<selected.length;i++){if(selected[i]==current){except.push(i)}else{selected[i].classList.remove("select-arrow-active")}} 180for(var i=0;i<elements.length;i++){if(except.indexOf(i)){elements[i].classList.add("select-hide")}}}};greyd.input.boxes=new function(){this.init=function(){let inputs=document.getElementsByTagName("input");for(var i=0;i<inputs.length;i++){const input=inputs[i];const nextSibling=input.nextSibling;if(nextSibling&&nextSibling.tagName=="SPAN")continue;const isCustomCheckbox=input.type=="checkbox"&&input.closest('form.greyd_form')!==null;const isCustomRadio=input.type=="radio"&&(input.closest('form.greyd_form')!==null||input.closest('form.greyd-search-form ')!==null);if(isCustomCheckbox||isCustomRadio){var lbl=document.createElement("span");if(input.hasAttribute("title")){lbl.setAttribute("title",input.getAttribute("title"))} 181input.parentNode.insertBefore(lbl,input.nextSibling)}}}};var greyd=greyd||{};greyd.forms=greyd.forms||{};greyd.forms.conditions=new function(){this.listeners=[];this.id_pre='___id';this.types={text:['text','email','tel','url','number','time','date','datetime-local','week','month'],};this.init=function(form){if(typeof $==='undefined')$=jQuery;class Greyd_Conditional_Form{constructor(form){if(!form||form.length===0)return;var listeners=[];const conditionBlocks=form.find('.condition_block');if(!conditionBlocks||conditionBlocks.length===0)return;conditionBlocks.each(function(){const conditionData=greyd.forms.conditions.getConditionData($(this));if(conditionData&&conditionData.conditions){conditionData.conditions.forEach(function(condition){const input=greyd.forms.tools.getFieldByName(condition.name,form);if(input.length>0&&!greyd.forms.conditions.arrayContainsInput(input,listeners)){listeners.push(input)}})}});if(!listeners.length)return;$.each(listeners,function(){const name=$(this).attr('name');$(this).on("change input",function(){greyd.forms.conditions.inputChanged(name,form)});greyd.forms.conditions.inputChanged(name,form)});form.on("reset",function(e){greyd.forms.conditions.onFormReset($(this))});form.find('.condition_wrapper').each(function(){const $wrapper=$(this);$wrapper.on('nextStep prevStep exactStep',function(){var $container=$wrapper.find('.condition_block');if($container.hasClass('show')){setTimeout(function(){greyd.forms.conditions.showOrHideCondition($container,!0)},50)}})})}} 182new Greyd_Conditional_Form(form)};this.inputChanged=function(name,form){if(greydFormSettings.wp_debug)console.log('Input "'+name+'" changed');name=greyd.forms.tools.getCleanName(name);form.find('.condition_block[data-condition*="%'+name+'%"]').each(function(){greyd.forms.conditions.checkConditionInputs($(this),form)})};this.checkConditionInputs=function(container,form){var conditionData=greyd.forms.conditions.getConditionData(container);if(!conditionData)return;var isMatching=conditionData.operator==='and'?!0:!1;conditionData.conditions.forEach(function(condition){var currentValue=greyd.forms.tools.getVal(greyd.forms.tools.getFieldByName(condition.name,form));var conditionIsMatching=greyd.forms.conditions.matchCondition(conditionData.operator,currentValue,condition.operator,condition.value);if(greydFormSettings.wp_debug){} 183if(conditionData.operator==='and'){if(conditionIsMatching){}else{isMatching=!1;return!1}}else{if(conditionIsMatching){isMatching=!0;return!1}else{}}});this.showOrHideCondition(container,isMatching)};this.showOrHideCondition=function(container,show){if(typeof show==='undefined')show=!0;var wrapper=container.parent('.condition_wrapper');var animate=wrapper.hasClass('slide');if(animate){var oldHeight=container.height();wrapper.css('height',oldHeight)} 184if(show)greyd.forms.conditions.showConditionField(container);else greyd.forms.conditions.hideConditionField(container);if(animate){var newHeight=show?container.height():0;let parentWrapper=wrapper.parents(".condition_wrapper");if(parentWrapper.length&&show){parentWrapper.css({height:"auto"})} 185var heightDiff=newHeight-oldHeight;if(heightDiff!==0){wrapper.removeClass('open');wrapper.css({height:newHeight});setTimeout(function(){container.parent().addClass('open')},400);wrapper.closest('form').trigger('heightChange',[wrapper,heightDiff])}}};this.showConditionField=function(field){field.removeClass('hide').addClass('show');setTimeout(function(){field.css('opacity',1)},0);field.find('input, select, textarea').each(function(){$(this).attr('novalue',!1);if($(this).data('required')==='required'){$(this).prop('required',!0)} 186greyd.forms.tools.changeDependingFormTags(this)})};this.hideConditionField=function(field){field.removeClass('show').addClass('hide').css('opacity',0);field.find('input, select, textarea').each(function(){$(this).attr('novalue',!0);if($(this).prop('required'))$(this).prop('required',!1)})};this.onFormReset=function(form){var containers=form.find('.condition_wrapper:not([data-after="hold"]) .condition_block');containers.each(function(){greyd.forms.conditions.checkConditionInputs($(this),form)})};this.matchCondition=function(operator,value,type,needed){operator=operator&&operator.length?operator:'or';value=typeof value==='undefined'?'':value;type=type&&type.length?type:'is';needed=typeof needed==='undefined'?'':needed;if(typeof value==="string"){value=value.replace(/\s|_/g,"").toLowerCase()} 187if(typeof needed==="string"){needed=needed.replace(/\s|_/g,"").toLowerCase()} 188if(greydFormSettings.wp_debug){} 189if(operator==='or'){switch(type){case "is":if(value==needed)return!0;break;case "has":if(String(value).indexOf(needed)>=0)return!0;break;case "empty":if(!String(value).length||value==='off')return!0;break;case "not_empty":if(String(value).length&&value!=='off')return!0;break;case "is_not":if(value!==needed)return!0;break;case "greater":if(parseFloat(value)>parseFloat(needed))return!0;break;case "greater_equal":if(parseFloat(value)>=parseFloat(needed))return!0;break;case "smaller":if(parseFloat(value)<parseFloat(needed))return!0;break;case "smaller_equal":if(parseFloat(value)<=parseFloat(needed))return!0;break} 190return!1}else if(operator==='and'){switch(type){case "is":if(value!=needed)return!1;break;case "has":if(String(value).indexOf(needed)===-1)return!1;break;case "empty":if(String(value).length&&value!=='off')return!1;break;case "not_empty":if(!String(value).length||value==='off')return!1;break;case "is_not":if(value===needed)return!1;break;case "greater":if(parseFloat(value)<=parseFloat(needed))return!1;break;case "greater_equal":if(parseFloat(value)<parseFloat(needed))return!1;break;case "smaller":if(parseFloat(value)>=parseFloat(needed))return!1;break;case "smaller_equal":if(parseFloat(value)>parseFloat(needed))return!1;break} 191return!0} 192return!1};this.arrayContainsInput=function(obj,array){var i;for(i=0;i<array.length;i++){if(array[i][0]===obj[0]&&array[i].context===obj.context){return!0}} 193return!1};this.getConditionData=function(container){var conditionData=container.data('condition');if(!conditionData||conditionData.length===0)return!1;var conditions=[],operator='';if(conditionData.indexOf('||')>-1){operator='or';conditions=conditionData.split('||')}else if(conditionData.indexOf('&&')>-1){operator='and';conditions=conditionData.split('&&')}else{conditions=[conditionData]} 194conditions.forEach(function(condition){var fieldname=[0]});return{operator:operator,conditions:conditions.map(function(condition){var split=condition.replace(/(^%|%$)/g,'').split('%%');return{name:split[0],operator:split[1],value:split[2]??''}})}}};var greyd=greyd||{};greyd.forms=greyd.forms||{};greyd.forms.multistep=new function(){this.elements=[];this.lastHash='';this.init=function(form){if(typeof $==='undefined')$=jQuery;if(form.find('.multistep_wrapper').length==0)return;class Greyd_Multistep{constructor(wrapper){this.wrapper=$(wrapper);this.form=this.wrapper.closest('.greyd_form');this.id=this.wrapper.attr('id')??this.form.attr('id');this.progressBar=this.wrapper.next('.progress_wrapper')?.children();this.steps=this.wrapper.find('.step');this.currentStepIndex=0;
194this.config={autoStep:this.wrapper.hasClass('auto_step'),transition:this.wrapper.data('transition'),};this.quizMode=this.wrapper[0].getAttribute('data-quiz')=="true";this.correctAnswersField=this.form[0].querySelector('input[data-correct-answers-field=true]');if(this.correctAnswersField)this.correctAnswersField.value=0;this.wait=!1;this.currentCorrectAnswer=null;this.selectedAnswer=null;this.isResetting=!1;for(let i=0;i<this.steps.length;i++){const step=this.steps[i];const stepNumber=step.querySelectorAll('.step_number');if(stepNumber.length>0){stepNumber[0].innerHTML=stepNumber[0].innerHTML.replace('X',i+1).replace('Y',this.steps.length)}} 195this.updateStep.bind(this);this.animateToStep.bind(this);this.currentStepInputsValid.bind(this);this.updateProgress.bind(this);this.scrollIntoViewport.bind(this);this.wrapper.on('nextStep',this.nextStep.bind(this));this.wrapper.on('prevStep',this.prevStep.bind(this));this.wrapper.find('.next_step').on('click',()=>this.wrapper.trigger('nextStep'));this.wrapper.find('.prev_step').on('click',()=>this.wrapper.trigger('prevStep'));this.wrapper.find('.exact_step').on('click',(e)=>{const step=parseInt($(e.currentTarget).data('step'),10);this.updateStep(step-1)});this.steps.eq(this.currentStepIndex).addClass('active');this.updateProgress(0);if(this.config.autoStep||this.quizMode){this.setupAutoStepEvents.bind(this);this.setupAutoStepEvents()} 196this.wrapper.on('keypress',function(e){var code=e.keyCode||e.which;if(code!=13||$(':focus').is("textarea"))return;if(this.currentStepIndex===this.steps.length-1){return} 197e.preventDefault();$(':focus').blur();this.wrapper.trigger('nextStep')});this.form.on("reset",()=>{this.updateProgress(this.steps.length)})} 198nextStep(){if(this.quizMode){this.wait=!this.wait;if(!this.wait){this.resetMessagebox();this.currentCorrectAnswer=null;this.selectedAnswer.value=''} 199var isAnswerCorrect=!1;if(this.selectedAnswer){isAnswerCorrect=this.checkForCorrectAnswer()}} 200if(!this.currentStepInputsValid()){this.form.find('button[type="submit"]').trigger("click");return} 201if(!this.wait)this.updateStep(this.currentStepIndex+1);if(this.quizMode&this.wait)this.showQuizResults(isAnswerCorrect)} 202resetStepInputs(){const inputs=this.steps.eq(this.currentStepIndex).find('input[type="radio"], input[type="checkbox"]');inputs.prop('checked',!1);this.isResetting=!0;inputs.trigger('change');this.isResetting=!1} 203prevStep(){this.updateStep(this.currentStepIndex-1);this.resetStepInputs()} 204updateStep(index){if(index<0||index>this.steps.length-1||index===this.currentStepIndex){return} 205this.steps.removeClass('active');this.steps.eq(index).addClass('active');this.animateToStep(index);this.updateProgress(index);this.currentStepIndex=index;this.scrollIntoViewport();this.wrapper[0].querySelector('.step.active .step_number').focus();window.location.hash=this.id+'-step-'+(index+1)} 206currentStepInputsValid(){var isValid=!0;const currentStep=this.steps.eq(this.currentStepIndex);currentStep.find('input[required], select[required], textarea[required]').each(function(){var inputElement=this;var isInputValid=inputElement.checkValidity();if(!isInputValid){isValid=!1;return!1}});return isValid} 207animateToStep(index){if(this.config.transition!=='swipe')return;this.wrapper.animate({now:index},{duration:300,step:function(now){$(this).css({"-webkit-transform":'translateX('+(-now*100)+'%)',"-ms-transform":'translateX('+(-now*100)+'%)',"transform":'translateX('+(-now*100)+'%)',})}})} 208updateProgress(index){if(this.progressBar.hasClass('multistep_progress')){var bar=this.progressBar.children();if(bar.length>0){var x=(index+.5)/this.steps.length;bar.css({"width":x*100+"%"})}}else if(this.progressBar.hasClass('multistep_pagination')){this.progressBar.find("span:nth-child(n+"+(index+2)+")").removeClass('active');this.progressBar.find("span:nth-child(-n+"+(index+1)+")").addClass('active')}} 209scrollIntoViewport(){var elementTop=this.wrapper[0].getBoundingClientRect().top;var isOutOfViewport=elementTop<0||elementTop>window.innerHeight;if(isOutOfViewport){console.log('scroll',elementTop,window.innerHeight);this.wrapper[0].scrollIntoView()}} 210setupAutoStepEvents(){this.wrapper.on('change','input, select, textarea',(e)=>{if(this.isResetting)return;if(this.quizMode){this.selectedAnswer=e.target}else if(this.config.autoStep){if(this.currentStepIndex<this.steps.length-1&&this.currentStepInputsValid()){this.wrapper.trigger('nextStep')}}})} 211showQuizResults(isAnswerCorrect){if(!this.quizMode)return!1;const formsWrapper=this.form[0]?.parentNode;const messageWrapper=formsWrapper?.querySelector(".after-message");const message=messageWrapper?.querySelector(".message");const correctAnswerMessage=this.wrapper[0]?.getAttribute("data-correct-answer-text");const wrongAnswerMessage=this.wrapper[0]?.getAttribute("data-wrong-answer-text");const correctAnswer=this.currentCorrectAnswer.getAttribute("data-correct-answer")=="true"?this.currentCorrectAnswer.value:this.currentCorrectAnswer.getAttribute("data-correct-answer");if(isAnswerCorrect){this.selectedAnswer?.parentNode.classList.add("answer-correct");message.innerHTML=correctAnswerMessage+" "+correctAnswer;message.classList.add('success');if(this.correctAnswersField){const correctAnswersCount=parseInt(this.correctAnswersField.value);this.correctAnswersField.value=correctAnswersCount+1;this.correctAnswersField.dispatchEvent(new Event('change'))}}else{this.selectedAnswer.parentNode.classList.add("answer-false");this.currentCorrectAnswer?.parentNode.classList.add("answer-correct");message.innerHTML=wrongAnswerMessage+" "+correctAnswer;message.classList.add('danger')} 212const height=message.offsetHeight+parseInt(window.getComputedStyle(message).marginTop)+parseInt(window.getComputedStyle(message).marginBottom);messageWrapper.style.height=`${ height }px`;messageWrapper.style.opacity=1} 213checkForCorrectAnswer(){this.currentCorrectAnswer=this.form[0].querySelector('.step.active [data-correct-answer=true]');let textAnswer='';if(!this.currentCorrectAnswer){this.currentCorrectAnswer=this.form[0].querySelector('.step.active [data-correct-answer]');textAnswer=this.currentCorrectAnswer.getAttribute('data-correct-answer')} 214if(this.selectedAnswer.value==="")return!1;return(/true/).test(this.selectedAnswer.getAttribute('data-correct-answer'))||textAnswer===this.selectedAnswer.value.toLowerCase()} 215resetMessagebox(){const formsWrapper=this.form[0]?.parentNode;const messageWrapper=formsWrapper?.querySelector(".after-message");const message=messageWrapper?.querySelector(".message");message.classList.remove('success');message.classList.remove('danger');message.innerHTML="";messageWrapper.style.height="0";messageWrapper.style.opacity="0"}} 216form.find('.multistep_wrapper').each(function(){const id=this.getAttribute('id')??this.closest('.greyd_form').getAttribute('id');greyd.forms.multistep.elements[id]=new Greyd_Multistep(this)});$(window).on('hashchange',function(e){let hash=window.location.hash.split('-step-');if(hash.length===2){const id=hash[0].replace('#','');const step=parseInt(hash[1],10);if(greyd.forms.multistep.elements[id]){const form=greyd.forms.multistep.elements[id];form.updateStep(step-1);form.resetStepInputs()}}else if(hash.length<2&&greyd.forms.multistep.lastHash!==''){hash=greyd.forms.multistep.lastHash.split('-step-');console.log('lastHash',hash);if(hash.length===2){const id=hash[0].replace('#','');if(greyd.forms.multistep.elements[id]){const form=greyd.forms.multistep.elements[id];form.updateStep(0);form.resetStepInputs()}}} 217greyd.forms.multistep.lastHash=window.location.hash})}};var greyd=greyd||{};greyd.forms=greyd.forms||{};document.addEventListener('DOMContentLoaded',function(){greyd.forms.captcha.init();greyd.forms.tooltips.init();greyd.forms.tooltips.initTooltips();greyd.forms.initForms();window.onload=function(){window.addEventListener("beforeunload",function(e){if(greyd.forms.formHasBeenSubmitted){return undefined}})}});var forms=forms||{};if(typeof forms.onMultiRadioClick==='undefined'){forms.onMultiRadioClick=(elem)=>{greyd?.forms?.tools?.onMultiRadioClick(elem)}} 218if(typeof forms.initFormTooltips==='undefined'){forms.initFormTooltips=()=>{greyd?.forms?.tooltips?.init()}};var greyd=greyd||{};greyd.forms=greyd.forms||{};greyd.forms.formHasBeenSubmitted=!1;greyd.forms.initForms=function(){if(typeof $==='undefined')$=jQuery;if($('form.greyd_form').length==0)return;class Greyd_Form{constructor(form){this.form=form;if(this.form.length==0)return;if(this.form.data('initialized'))return;this.addEvents();this.form.data('initialized',!0)} 219addEvents(){this.initValidations();this.initTooltips();this.initUploadFields();this.initRangeSlider();this.initMathFields();this.initConfirmPasswordField();this.initFormTags();this.initLocalStorageFields();this.form.on("submit",(e)=>{e.preventDefault();greyd.forms.captcha.maybeExecute(this.submit,[this.form])});this.form.on("reset",()=>{this.onReset()});this.form.on("error",(e,atts)=>{var html=typeof atts.html!=='undefined'?atts.html:'';var log=typeof atts.log!=='undefined'?atts.log:'';this.onError(html,log)});if(typeof greyd.forms.multistep!=='undefined'){greyd.forms.multistep.init(this.form)} 220if(typeof greyd.forms.conditions!=='undefined'){greyd.forms.conditions.init(this.form)}} 221initValidations(){this.form.find('input, textarea').each(function(){$(this).on('focusin focus',function(){$(this).addClass('input-focus').removeClass('input-unfocus invalid')});$(this).on('focusout',function(){$(this).removeClass('input-focus');if($(this).hasClass('validation')){if($(this).val()!==''||$(this).prop('required')){$(this).addClass('input-unfocus')}}else if($(this).prop('required')){if($(this).val()===''){$(this).addClass('input-unfocus invalid')}else{$(this).removeClass('input-unfocus invalid')}}})});this.form.find('.submitbutton').on('click',()=>{this.form.addClass('validate')});this.form.find('.input-inner-wrapper .input-field-icon').on("click",function(){$(this).siblings().removeClass('input-unfocus invalid')})} 222initTooltips(){if(this.form.find('.forms-tooltip').length==0)return;if(typeof custom_inputs!=='undefined'&&typeof custom_inputs.initTooltips!=='undefined')return;this.form.find(".forms-tooltip .forms-tooltip-toggle").on("click",(e)=>{let tooltip=$(e.target).parent();if(tooltip.hasClass('on')){greyd.forms.tooltips.hideTooltip(tooltip)}else{greyd.forms.tooltips.hideTooltip();greyd.forms.tooltips.showTooltip(tooltip)} 223e.stopPropagation()})};initUploadFields(){this.form.find('input[type="file"].custom-file-upload').each(function(){let input=$(this);let label=input.next();let labeltext;label.on('click',function(){if(!input.attr('id'))$(this).prev().trigger("click");labeltext=$(this).find('.input span[style="flex:1"]');$(this).prev().removeClass('input-unfocus valid invalid').addClass('input-focus')});input.on('keyup',function(){labeltext=$(this).siblings('label').find('.input span[style="flex:1"]')});input.on('change',function(e){var filename=$(this).val().replace(/C:\\fakepath\\/i,'');if(filename){if(labeltext)labeltext.text(filename);$(this).removeClass('input-focus').addClass('input-unfocus');var maxsize=$(this).data('max');if(maxsize!='none') 224maxsize=parseFloat(maxsize.toString().replace(',','.'))*1000*1000;if(maxsize=='none'||this.files[0].size<=maxsize) 225$(this).removeClass('invalid').addClass('valid');else $(this).removeClass('valid').addClass('invalid')}else{label.find('.input span[style="flex:1"]').text(label.data('text'));input.removeClass('valid invalid input-focus input-unfocus')}});input.on('focus',function(){$(this).addClass('has-focus')});input.on('blur',function(){$(this).removeClass('has-focus')})})};initRangeSlider=function(){var timeout;this.form.find('.range_control_wrapper').each(function(){var input=$(this).children("input[type='range']");
225function onChange(e){input=typeof e==="undefined"?input:$(this);var wrapper=input.parent();var track=wrapper.find(".track");var thumb=wrapper.find(".thumb_wrapper");var ttip=wrapper.find(".tooltip");var label=wrapper.siblings(".label_wrap").find(".range_value");var min=parseFloat(input.attr("min"));var max=parseFloat(input.attr("max"));var val=parseFloat(input.val());var offset=100/((max-min)/(val-min));var isRequired=input[0].hasAttribute('required');if(isRequired){if(input.val()=='0'||input.val()==''){input[0].setCustomValidity('Cannot be zero')}else if(input.val()>max){input[0].setCustomValidity('Cannot be greater than '+max)}else if(input.val()<min){input[0].setCustomValidity('Cannot be less than '+min)}else{input[0].setCustomValidity('')}} 226label.text(val);ttip.text(val);track.css("width","calc(10px + "+offset+"%)");thumb.css("left",offset+"%");if(typeof e!=="undefined"&&($("html").hasClass("safari")||$(window).width()<=1000)){$(".range_control_wrapper input[type='range']").removeClass("input-focus");input.addClass("input-focus");clearTimeout(timeout);timeout=setTimeout(function(){input.removeClass("input-focus")},1200)}} 227input.on("input change",onChange);onChange()})};initMathFields=function(){this.form.find('.math_field').each(function(){greyd.forms.tools.updateMathField($(this))})};initConfirmPasswordField=function(){const confirmPasswordFields=this.form[0].querySelectorAll('input[type="password"].confirm-password');confirmPasswordFields.forEach(confirmField=>{const form=confirmField.closest("form.greyd_form");const submit=form.querySelector("button[name='submit']");const confirmPasswordMessage=confirmField.closest('.input-wrapper').querySelector('span.confirm-password-message');const passwordField=confirmField.closest(".input-outer-wrapper").querySelector('input[type="password"]:not(.confirm-password)');const labelMatching=confirmPasswordMessage.getAttribute('data-label-matching');const labelNotMatching=confirmPasswordMessage.getAttribute('data-label-notmatching');confirmField.addEventListener("keyup",function(){if(this.value.length>0){if(this.value==passwordField.value){confirmPasswordMessage.style.color="green";confirmPasswordMessage.innerHTML=labelMatching;"matching";submit.disabled=!1;confirmField.setCustomValidity("")}else{confirmPasswordMessage.style.color="red";confirmPasswordMessage.innerHTML=labelNotMatching;submit.disabled=!0;confirmField.setCustomValidity("Invalid field.")}}})})};initFormTags=function(){$("form.greyd_form input, form.greyd_form textarea, form.greyd_form select").each(function(){$(this).on("change input",function(){greyd.forms.tools.changeDependingFormTags(this)})});setTimeout(function(){$("form.greyd_form input, form.greyd_form textarea, form.greyd_form select").each(function(){greyd.forms.tools.changeDependingFormTags(this)})},100)};initLocalStorageFields=function(){this.form.find('input[type="hidden"][data-localstorage-key]').each(function(){const key=$(this).attr('data-localstorage-key');const value=localStorage.getItem(key);console.log('Local storage key: '+key+' - Value: '+value);$(this).val(value)})};submit=function(form){if(typeof form==='undefined'){form=this.form} 228if(form.data('send')=="prevent"){return!1} 229const messageWrapper=form.siblings(".after-message");const message=messageWrapper.children(".message");const popup=form.siblings(".after-popup");const spinner=form.find('.greyd_upload_progress .spinner');const progressBar=form.find('.greyd_upload_progress .bar');const button=form.find(".submitbutton");messageWrapper.css({'height':0,"opacity":0},300);messageWrapper.siblings('pre').remove();button.prop('disabled',!0);button.children('span:not(.greyd_upload_progress)').css('opacity',0);spinner.css('opacity',1);let formData=new FormData();formData.append('action','handle_form_data');formData.append('data',greyd.forms.tools.getFormValues(form));formData.append('post_id',form.data('id'));formData.append('nonce',form.data('nonce'));formData.append('form_mode',form.data('form-mode'));let hasFiles=!1;form.find('input[type=file]').each(function(){hasFiles=!0;const inputName=greyd.forms.tools.getCleanName($(this).attr("name"));const fileToUpload=$(this)[0].files[0];formData.append(inputName,fileToUpload)});
229$.ajax({type:'POST',url:greyd.forms.tools.getAjaxUrl(),data:formData,processData:!1,contentType:!1,cache:!1,xhr:function(){var xhr=new window.XMLHttpRequest();xhr.upload.addEventListener("progress",function(event){if(event.lengthComputable&&hasFiles){const percentComplete=parseInt((event.loaded/event.total)*100);progressBar.show();progressBar.width(percentComplete+'%');if(percentComplete===100){setTimeout(function(){progressBar.hide();progressBar.width('0px')},400)}}},!1);xhr.addEventListener("error",function(event){form.trigger("error",{log:"Invalid Ajax Call to: "+greydFormSettings.ajaxurl})},!1);xhr.addEventListener("load",function(event){if(greydFormSettings.wp_debug){console.log(event);console.log(event.target.response)} 230if(event?.target?.status!==200){form.trigger("error",{log:"Error in handle.php"});return!1} 231if(!event?.target?.response){form.trigger("error",{log:"No response set"});return!1} 232let response;try{response=JSON.parse(event.target.response.split("greyd_form_response::")[1])}catch(e){console.error(e);console.log(event.target.response);form.trigger("error",{log:"Error parsing JSON response"});return!1} 233if(response.response=='ERROR'){let html=response.errors?response.errors:"";let errors=Array.isArray(html)?(html.length>1?"<ul><li>"+html.join("</li><li>")+"</li></ul>":html.join("")):html;if(Array.isArray(html)){html=response.message+"<br>"+errors}else{html=errors} 234let log=typeof response.errors==='object'?response.errors:response;log=response.errors&&typeof response.errors.body!=="undefined"?response.errors.body:log;form.trigger("error",{html:html,log:log});return!1}else if(response.response!='SUCCESS'){form.trigger("error",{log:"Error in handle.php. Activate WP_DEBUG and see console for details."});return!1} 235greyd.forms.formHasBeenSubmitted=!0;message.html('').removeClass('danger').addClass('success');if(response.message=='popup'||response.message=='fullscreen'){popup.addClass('in');if(response.message=='fullscreen')$('body').addClass('no-scroll');popup.animate({opacity:1},300)}else if(response.message.indexOf('page')!==-1){window.location.href=response.message.substr(response.message.indexOf("=")+1)}else{message.html(response.message)} 236console.log(response,form);form.trigger("reset",response)},!1);return xhr}})};onError=function(html,log){var messageWrapper=this.form.siblings(".after-message");if(typeof log!=='undefined'){log=typeof log==='object'||Array.isArray(log)?JSON.stringify(log,null,4):log;if(log.length>0){console.log(log)}} 237var message=messageWrapper.children(".message");var content=greydFormSettings.default_error;if(typeof html==='object'){content=JSON.stringify(html,null,4)}else if(Array.isArray(html)){if(html.length>1){content="<p style='margin-top:0;'>"+greydFormSettings.errors+"</p>";content+="<ul>";$.each(html,function(key,val){content+="<li>"+val+"</li>"});content+="</ul>"}else{content=html[0]}}else if(typeof html!=='undefined'&&html.length>0){content=html} 238message.html(content).removeClass('success').addClass('danger');this.resetFormElements()};onReset=function(){this.resetFormElements();this.form.removeClass('validate');this.form.find('input, textarea, select').each(function(){$(this).removeClass('input-focus input-unfocus valid invalid');if($(this).attr('type')=='file'){}else if($(this).parent().hasClass('greyd_multiselect')){$(this).parent().find('.input .tag').each(function(){$(this).trigger("click")})}else if($(this).parent().hasClass('greyd_multiradio')){$(this).parent().find('.option.selected').removeClass('selected')}});greyd?.input?.closeAll(null)};resetFormElements=function(){const messageWrapper=this.form.siblings(".after-message");const message=messageWrapper.children(".message");const spinner=this.form.find('.greyd_upload_progress .spinner');const progressBar=this.form.find('.greyd_upload_progress .bar');const button=this.form.find(".submitbutton");if(message.html()!==""){var height=message.outerHeight()+parseInt(message.css("margin-top"))+parseInt(message.css("margin-bottom"));messageWrapper.css({'height':height,"opacity":1},300)}else{messageWrapper.css({'height':0,"opacity":0},300)} 239greyd.forms.captcha.clear();greyd.forms.formHasBeenSubmitted=!0;setTimeout(function(){button.children('span:not(.greyd_upload_progress)').css('opacity',1);button.prop('disabled',!1);spinner.css('opacity',0);progressBar.hide();progressBar.width('0px')},150)}} 240$('form.greyd_form').each(function(){new Greyd_Form($(this))})};greyd.forms.captcha=new function(){this.isValid=!1;this.timeout=null;this.clear=function(){greyd.forms.captcha.isValid=!1;clearTimeout(greyd.forms.captcha.timeout)};this.init=function(){if(document.querySelectorAll('form.greyd_form #captcha.hide').length!==0){document.body.classList.add('hideCaptcha')} 241greyd.forms.captcha.maybeExecute()};this.maybeExecute=function(callback,args){let sitekey=typeof recaptchaSitekey!=='undefined'?recaptchaSitekey:null;if(sitekey&&!greyd.forms.captcha.isValid){grecaptcha.ready(function(){gre
241captcha.execute(sitekey,{action:'homepage'}).then(function(token){greyd.forms.captcha.isValid=!0;jQuery("input.recaptcha_input").each(function(){jQuery(this).val(token)});console.log('reCAPTCHA token set: '+token);clearTimeout(greyd.forms.captcha.timeout);greyd.forms.captcha.timeout=setTimeout(function(){greyd.forms.captcha.clear()},1000*60*1.9);if(typeof callback==="function"){callback.apply(null,args)}})})}else if(typeof callback==="function"){callback.apply(null,args)}}};greyd.forms.tooltips=new function(){let lastFocusedElement=null;let usingKeyboard=!1;this.initTooltips=function(){const tooltipButtons=document.querySelectorAll('.greyd-forms-tooltip-toggle');tooltipButtons.forEach(btn=>{greyd.forms.tooltips.initializeTooltip(btn)});document.addEventListener('keydown',function(){usingKeyboard=!0;greyd.forms.tooltips.addKeyboardFocusClass()});document.addEventListener('mousedown',function(){usingKeyboard=!1;greyd.forms.tooltips.removeKeyboardFocusClass()})} 242this.initializeTooltip=function(btn){const tooltipId=btn.getAttribute('aria-controls');const tooltip=document.getElementById(tooltipId);const closeBtn=tooltip.querySelector('.greyd-forms-tooltip-close');btn.addEventListener('click',function(e){e.preventDefault();greyd.forms.tooltips.toggleTooltip(btn,tooltip)});closeBtn.addEventListener('click',function(e){greyd.forms.tooltips.closeTooltip(btn,tooltip);e.preventDefault()});btn.addEventListener('keydown',function(e){greyd.forms.tooltips.handleTooltipKeydown(e,btn,tooltip)});tooltip.addEventListener('keydown',function(e){greyd.forms.tooltips.handleTooltipKeydown(e,btn,tooltip)});document.addEventListener('click',function(e){if(!tooltip.contains(e.target)&&e.target!==btn&&tooltip.classList.contains('active')){greyd.forms.tooltips.closeTooltip(btn,tooltip)}})} 243this.toggleTooltip=function(btn,tooltip){if(tooltip.classList.contains('active')){greyd.forms.tooltips.closeTooltip(btn,tooltip)}else{greyd.forms.tooltips.showNewTooltip(btn,tooltip)}} 244this.showNewTooltip=function(btn,tooltip){lastFocusedElement=document.activeElement;const allTooltips=document.querySelectorAll('.greyd-forms-tooltip-popup');allTooltips.forEach(t=>{if(t!==tooltip&&t.classList.contains('active')){const relatedBtn=document.querySelector(`[aria-controls="${t.id}"]`);greyd.forms.tooltips.closeTooltip(relatedBtn,t)}});tooltip.classList.add('active');btn.setAttribute('aria-expanded','true');const closeButton=tooltip.querySelector('.greyd-forms-tooltip-close');setTimeout(()=>{closeButton.focus()},10);const liveRegion=document.createElement('div');liveRegion.setAttribute('aria-live','polite');liveRegion.innerHTML='Tooltip opened';document.body.appendChild(liveRegion);setTimeout(()=>{document.body.removeChild(liveRegion)},1000)} 245this.closeTooltip=function(btn,tooltip){tooltip.classList.remove('active');btn.setAttribute('aria-expanded','false');if(lastFocusedElement){lastFocusedElement.focus()}} 246this.handleTooltipKeydown=function(e,btn,tooltip){switch(e.key){case 'Escape':if(tooltip.classList.contains('active')){e.preventDefault();greyd.forms.tooltips.closeTooltip(btn,tooltip)} 247break;case 'Enter':case ' ':if(e.target===btn){e.preventDefault();greyd.forms.tooltips.toggleTooltip(btn,tooltip)} 248break}} 249this.addKeyboardFocusClass=function(){const focusableElements=document.querySelectorAll('button, input, a, [tabindex="0"]');focusableElements.forEach(el=>{el.classList.add('keyboard-focus')})} 250this.removeKeyboardFocusClass=function(){const focusableElements=document.querySelectorAll('.keyboard-focus');focusableElements.forEach(el=>{el.classList.remove('keyboard-focus')})} 251this.activeElement=null;this.init=function(){jQuery(document).off("click",greyd.forms.tooltips.hideTooltip).on("click",greyd.forms.tooltips.hideTooltip)} 252this.showTooltip=function(elem){var rect=jQuery(elem).find('.forms-tooltip-popup')[0].getBoundingClientRect();if(rect.left<10){jQuery(elem).css('--horizontal-offset',((rect.left-10)*-1)+'px')}else if(rect.right>(window.innerWidth-10)){jQuery(elem).css('--horizontal-offset',(window.innerWidth-rect.right-10)+'px')} 253jQuery(elem).addClass('on');greyd.forms.tooltips.activeElement=jQuery(elem)} 254this.hideTooltip=function(elem){if(typeof elem!=='undefined'){jQuery(elem).removeClass('on')} 255if(greyd.forms.tooltips.activeElement){greyd.forms.tooltips.activeElement.removeClass('on');greyd.forms.tooltips.activeElement=null}}};var greyd=greyd||{};greyd.forms=greyd.forms||{};console.log("Greyd Forms: Public Tools loaded");greyd.forms.tools=new function(){this.isFloat=function(n){return n===+n&&n!==(n|0)};this.isInt=function(n){return n===+n&&n===(n|0)};this.getFieldByName=function(name,form){return form.find("[name='"+name+"'], [name^='"+name+"___id']")};this.getCleanName=function(string){var pos=typeof string==="string"?string.indexOf('___id'):-1;if(pos!==-1){string=string.substring(0,pos)} 256return string};this.getVal=function(input){var value;if(typeof input!=="object"){value=input}else if(input.length>0){var type=input.attr('type');if(input.hasClass('checkbox_placeholder_value')){type='checkbox'} 257if(type==='radio'){value=input.filter(':checked').val()}else if(type==='checkbox'){value=input.filter(':not(.checkbox_placeholder_value)').first().prop("checked")?'on':'off'}else{if(input.length>1){input=input.filter(':not([novalue="true"])').first()}
258value=input.length?input.val():null}} 259return greyd.forms.tools.getCleanName(value)};this.getDisplayVal=function(input){let value=greyd.forms.tools.getVal(input);if(typeof value==="string"&&value.match(/^[.,0-9]+$/)){value=parseFloat(value)} 260const decimals=input.data("decimals");if(decimals!==undefined&&decimals){value=isNaN(value)?"":parseFloat(value).toFixed(decimals)}else if(value===undefined||value===null){value=''}else{value=String(value)} 261const decimalSeparator=input.data("decimal-separator");if(decimalSeparator!==undefined&&decimalSeparator&&decimalSeparator.length&&decimalSeparator!=='|.'){const separators=decimalSeparator.split('|');const thousand=separators[0];const decimal=separators[1];if(value.indexOf(".")===-1){value=value.replace(/\B(?=(\d{3})+(?!\d))/g,thousand)}else{value=value.split(".");value=value[0].replace(/\B(?=(\d{3})+(?!\d))/g,thousand)+decimal+value[1]}} 262const suffix=input.data("suffix");if(suffix!==undefined&&suffix){value+=suffix} 263const prefix=input.data("prefix");if(prefix!==undefined&&prefix){value=prefix+value} 264return value};this.getFormValues=function(form,encoded){if(typeof form==="undefined")return!1;if(typeof encoded==="undefined")encoded=!0;var cleanFormValues=[];var rawFormValues=form.serializeArray();[...rawFormValues].forEach(function(item){const inputVal=String(greyd.forms.tools.getVal(form.find('*[name="'+item.name+'"]')));if(inputVal!=item.value){item.value=inputVal} 265item.name=greyd.forms.tools.getCleanName(item.name);item.value=greyd.forms.tools.getCleanName(item.value);cleanFormValues.push(item)});var encodedFormValues=$.param(Object.values(cleanFormValues));if(greydFormSettings.wp_debug){console.log('original form values:',rawFormValues,'clean form values:',cleanFormValues,'encoded form values:',encodedFormValues)} 266return encoded?encodedFormValues:cleanFormValues};this.ajaxUrl=null;this.getAjaxUrl=function(){if(greyd.forms.tools.ajaxUrl&&greyd.forms.tools.ajaxUrl.length>0){return greyd.forms.tools.ajaxUrl} 267function getUrlEnding(url){var match=url.match(/(\.)([a-z]*?)(\/)/);if(match)return match[2];else return!1} 268function replaceUrlEnding(url,end){return url.replace(/(\.)([a-z]*?)(\/)/,'.'+end+'/')} 269let ajaxUrl=greydFormSettings.ajaxurl;if(greydFormSettings.wp_debug){console.log("WPML Setup = "+{0:"Off",1:"Directory",2:"Different Domains",3:"URL-Parameter"}[greydFormSettings.wpml_setup])} 270if(greydFormSettings.wpml_setup==='2'){var url=window.location.href;var tld=getUrlEnding(url);var ajax_tld=getUrlEnding(ajaxUrl);if(tld&&tld!==ajax_tld){ajaxUrl=replaceUrlEnding(ajaxUrl,tld)}} 271greyd.forms.tools.ajaxUrl=ajaxUrl;return ajaxUrl};this.onMultiRadioClick=function(elem){$(elem).toggleClass('selected');var input=$(elem).closest('.greyd_multiradio').find('input');greyd.forms.tools.toggleMultiRadioValue(input,$(elem).data('value'))};this.toggleMultiRadioValue=function(input,value=""){var oldval=input.val();var values=oldval?oldval.split(","):[];if(values.includes(value)){values=values.filter(v=>v!==value)}else{values.push(value)} 272var newval=values.join(",");newval=newval.replace(/,+/g,",").replace(/^,|,$/g,"");input.val(newval);input.trigger("change");if(greydFormSettings.wp_debug)console.log("New multiradio value: "+newval)};this.getFormulaValue=function(formula,form){if(!formula)return!1;var fields=String(formula).match(/{([A-Za-z0-9\-\_\[\]]+?)}/g);if(fields){fields.forEach(function(field_name){field_name=field_name.replace(/[{}]/g,"");var field=greyd.forms.tools.getFieldByName(field_name,form);var val=0;if(field.length){val=greyd.forms.tools.getVal(field);if(typeof val==="string"&&val.match(/^[.,0-9]+$/)){val=parseFloat(val)}} 273if(!greyd.forms.tools.isFloat(val)&&!greyd.forms.tools.isInt(val)){val=parseFloat(String(val).replaceAll(/[^-,0-9]/g,''))} 274val=isNaN(val)?0:val;formula=formula.replace("{"+field_name+"}",String(val))})} 275result=greyd.forms.tools.calculateFormula(formula);return result};this.calculateFormula=function(formula){if(typeof formula!=="string"||formula.length===0)return formula;var regex="";formula=formula.replace(/\s+/g,"").replace(/\,/,".");formula=formula.replace(/[^\(\d\.\-\+\*\/\^\âlog\)]/g,"");regex=/([\d.]+|\([^\(\)]+?\))\^(\d+|\([^\(\)]+?\))+?/g;formula=formula.replace(regex,function(match,base,power){return"Math.pow("+base+", "+power+")"});regex=/log\(/g;formula=formula.replace(regex,"Math.log(");regex=/\â\(/g;formula=formula.replace(regex,"Math.sqrt(");var value=0;try{value=eval(formula)}catch(e){console.error(e);return NaN} 276return value};this.updateMathField=function(math_field){var formula=math_field.length?math_field.data("formula"):!1;var form=math_field.closest("form.greyd_form");var cond_num=-1;const rounding=math_field.length?math_field[0].getAttribute("data-rounding"):!1;if(greydFormSettings.wp_debug)var name=greyd.forms.tools.getCleanName(math_field.attr("name"));if(math_field.hasClass("has_conditions")){var i=0;math_field.siblings(".math_conditions").children().each(function(){var value1=greyd.forms.tools.getFormulaValue($(this).data("field1"),form);if(isNaN(value1))return;var value2=greyd.forms.tools.getFormulaValue($(this).data("field2"),form);if(isNaN(value2))return;var operator=$(this).data("operator");if(greydFormSettings.wp_debug)console.log(String(value1)+" "+operator+" "+String(value2));if(typeof greyd.forms.conditions!=="undefined"&&typeof greyd.forms.conditions.matchCondition==="function"&&greyd.forms.conditions.matchCondition('or',value1,operator,value2)){cond_num=i;formula=$(this).data("value");return!1} 277i++});if(greydFormSettings.wp_debug){if(cond_num===-1){console.log("No condition hit for math field '"+name+"'")}else{console.log("Condition number "+cond_num+" hit for math field '"+name+"' with formula '"+formula+"'")}}} 278var value=greyd.forms.tools.getFormulaValue(formula,form);if(isNaN(value)){math_field.addClass("error");return}else if(math_field.hasClass("error")){math_field.removeClass("error")} 279var decimals=math_field.data("decimals")??"0";switch(rounding){case "ceil":value=+(Math.ceil(value+"e+"+decimals)+"e-"+decimals);case "floor":value=+(Math.floor(value+"e+"+decimals)+"e-"+decimals);case "auto":value=+(Math.round(value+"e+"+decimals)+"e-"+decimals)} 280value=value.toFixed(decimals);math_field.val(value);math_field.trigger("change");var display=math_field.siblings(".display");if(display.length){display.attr("data-condition",String(cond_num))}};this.changeDependingFormTags=function(elem){if($(elem).attr("novalue")==="true")return;var name=greyd.forms.tools.getCleanName($(elem).attr("name"));var value=greyd.forms.tools.getDisplayVal($(elem));var tags=$("form.greyd_form .form_tag[data-name='"+name+"']");if(tags.length){tags.each(function(){$(this).text(value);if($(this).parent("span").hasClass("formula")||$(this).parent().parent("span").hasClass("formula")){greyd.forms.tools.updateMathField($(this).closest(".math_operation").find(".math_field"))}})}
281var cond_wrapper=$(elem).closest("form.greyd_form").find(".math_conditions");if(cond_wrapper.length){cond_wrapper.each(function(){var cond_items=$(this).find("span[data-field1*='{"+name+"}'], span[data-field2*='{"+name+"}'], span[data-value*='{"+name+"}']");if(cond_items.length){greyd.forms.tools.updateMathField($(this).siblings(".math_field"))}})}}};document.addEventListener('DOMContentLoaded',function(){Interactions.init()});var Interactions=new function(){this.firstInteractionComplete=!1;this.completedInteractions=[];this.currentForm=null;this.areSent=!1;this.debug=!1;this.init=function(){if(typeof document.getElementsByClassName("greyd_form")==='undefined'&&document.getElementById("greyd_form")==='undefined'){return} 282this.addEvents()};this.addEvents=function(){if(!Interactions.areSent){document.addEventListener('mousedown',Interactions.checkForFirstInteraction)}};this.checkForFirstInteraction=function(e){Interactions.areSent=!1;const form=e.target.closest(".greyd_form");if(typeof form=="undefined"||!form)return;Interactions.currentForm=form;let targetElement=e.target;let targetElementName=targetElement.tagName.toLowerCase();if(targetElementName=="span"){let el=targetElement.parentNode.querySelector('input');if(typeof el==="undefined"||!el){const label=targetElement.closest('label');if(typeof label!=="undefined"&&label){el=label.querySelector("input[type='checkbox']")}} 283if(typeof el!=="undefined"&&el){targetElement=el;targetElementName=targetElement.tagName.toLowerCase()}} 284if(targetElementName=="div"&&targetElement.classList.contains('select-selected')){let el=targetElement.parentNode.querySelector('select');if(typeof el!=="undefined"&&el){targetElement=el;targetElementName=targetElement.tagName.toLowerCase()}} 285if(targetElementName=="input"||targetElementName=="textarea"||targetElementName=="select"){if(Interactions.debug)console.log("User started interacting");document.removeEventListener('mousedown',Interactions.checkForFirstInteraction);['focusin','focusout','mousedown','keyup','ontouchstart'].forEach(evt=>form.addEventListener(evt,Interactions.trackInteractions,!1));window.addEventListener('beforeunload',(event)=>{Interactions.sendInteractions(form);return undefined})}};this.trackInteractions=function(e){const form=this;if(typeof form=="undefined"||!form)return;const key=e.keyCode||e.charCode;let field={ref:e.target,tagName:e.target.tagName.toLowerCase(),type:e.target.getAttribute("type"),microInteraction:{click:null,char:null,delete:null},};if(field.tagName=="span"){let el=field.ref.parentNode.querySelector('input');if(typeof el=="undefined"||!el){const label=field.ref.closest('label');if(typeof label!=="undefined"&&label){el=label.querySelector("input[type='checkbox']")}} 286if(typeof el!=="undefined"&&el){field.ref=el;field.tagName=field.ref.tagName.toLowerCase()}} 287if(field.tagName=="div"&&field.ref.parentNode.classList.contains('select-items')){let el=field.ref.parentNode.parentNode.querySelector('select');if(typeof el!=="undefined"&&el){field.ref=el;field.tagName=field.ref.tagName.toLowerCase()}} 288if(e.type=="focusin"){if(Interactions.debug)console.log("User beginns interacting with field: "+field.ref.getAttribute("name"))} 289if(field.tagName=="input"||field.tagName=="textarea"){if(e.type=="keyup"&&(key==8||key==46)){if(Interactions.debug)console.log("User deletes Chars in Field: "+field.ref.getAttribute("name"))}else if(e.type=="keyup"){if(Interactions.debug)console.log("User types in Field: "+field.ref.getAttribute("name"))}}else if(field.tagName=="select"){if(Interactions.debug)console.log("User interacts with dropdown: "+field.ref.getAttribute("name"));Interactions.saveInteraction(field.ref)}else if(field.tagName=="button"&&field.ref.getAttribute('type')=="submit"){Interactions.saveInteraction(field.ref);Interactions.sendInteractions(form)}else{if(Interactions.debug)console.log("User clicked in the form, but no form field")} 290if(e.type=="focusout"&&!Interactions.areSent){if(Interactions.debug)console.log("User stops interacting with field: "+field.ref.getAttribute("name"));if(Interactions.debug)console.log("Saving Data");Interactions.saveInteraction(field.ref)}else if(e.type=="focusout"&&Interactions.areSent){if(Interactions.debug)console.log("Interactions sent...")}};this.saveInteraction=function(el){if(Interactions.areSent)return;const interaction={id:el.getAttribute('id'),type:el.getAttribute('type'),name:el.getAttribute('name'),required:el.hasAttribute('required'),timestamp:Date.now(),};
290if(interaction.type=="hidden")return;Interactions.completedInteractions.push(interaction);if(Interactions.debug)console.log("Saved Interaction");if(Interactions.debug)console.log("____________________________________________")};this.sendInteractions=function(form){if(Interactions.areSent)return;const formID=form.getAttribute("data-id");const nonce=form.getAttribute("data-nonce");const uid=form.getAttribute("id");if(Interactions.debug)console.log("Sending Interaction for Form: "+formID+" to backend");const body=new FormData();const data={form_id:formID,uid:uid,interactions:Interactions.getCompletedInteractions()};body.append('action','receive_interactions');body.append('nonce',nonce);body.append('data',JSON.stringify(data));fetch(greyd.forms.tools.getAjaxUrl(),{method:'POST',credentials:'same-origin',body:body,}).then((response)=>response.json()).then((data)=>{if(data){if(Interactions.debug)console.log(data)}}).catch((error)=>{if(Interactions.debug)console.error(error)});Interactions.areSent=!0;return};this.getCompletedInteractions=function(){return Interactions.completedInteractions}};(function(){if(typeof $==='undefined')$=jQuery;$(function(){popups.init()})})(jQuery);var popups=new function(){this.lastFocus=null;this.on_init=[];this.on_scroll=[];this.on_idle=[];this.on_exit=[];this.focusableSelectors=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"]):checked','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])',] 291this.init=function(){var item='count';if(typeof theme==='undefined'){item='greyd-session-count';var count=sessionStorage.getItem(item);if(!count)count=0;count++;sessionStorage.setItem(item,count)} 292$('.popups .popup').each(function(){var show_popup=!0;var conditions=$(this).data('conditions');if(show_popup&&conditions.delay!='off'){show_popup=!1;var count=sessionStorage.getItem(item);if(!count)count=0;if(parseInt(count)>parseInt(conditions.delay))show_popup=!0} 293if(show_popup&&conditions.referer!='off'){show_popup=!1;var is=document.referrer;var should=conditions.referer.value;if(conditions.referer.condition==="is"){if(should===is)show_popup=!0}else if(conditions.referer.condition==="is_not"){if(should!==is)show_popup=!0}else if(conditions.referer.condition==="has"){if(is.indexOf(should)>-1)show_popup=!0}else if(conditions.referer.condition==="has_hot"){if(is.indexOf(should)==-1)show_popup=!0}} 294if(conditions.device!='off'||conditions.browser!='off'){var device=popups.checkBrowser();if(show_popup&&conditions.device!='off'){show_popup=!1;if(conditions.device.indexOf(device.system)>-1)show_popup=!0} 295if(show_popup&&conditions.browser!='off'){show_popup=!1;if(conditions.browser.indexOf(device.browser)>-1)show_popup=!0}} 296if(show_popup){var trigger=$(this).data('trigger');if(trigger.on_init!='off'){popups.on_init.push(this);var that=this;setTimeout(function(){popups.maybe_open(that)},trigger.on_init*1000)} 297if(trigger.on_scroll!='off'){popups.on_scroll.push(this)} 298if(trigger.on_idle!='off'){popups.on_idle.push(this)} 299if(trigger.on_exit!='off'){popups.on_exit.push(this)}}else $(this).remove()});if($('.popups .popup .popup_overlay[data-effect]').length>0){$('body .navigation .header_wrapper').css('will-change','filter')} 300var lastScroll=$(document).scrollTop();$(window).on('scroll',function(event){var scroll_pos=$(document).scrollTop();var scroll_max=$(document).height()-$(window).height();var dir='down';if(scroll_pos<lastScroll)dir='up';$.each(popups.on_scroll,function(){var trigger=$(this).data('trigger');var scroll_trigger=trigger.on_scroll.replace('px','');if(scroll_trigger.indexOf('%')>-1) 301scroll_trigger=scroll_max*(scroll_trigger.replace('%','')/100.0);if((scroll_pos>scroll_trigger&&lastScroll<scroll_trigger&&dir=='down')) 302popups.open(this)});lastScroll=scroll_pos});var timer=[] 303$(window).on('mousemove',function(event){$.each(timer,function(){clearTimeout(this)});$.each(popups.on_idle,function(){var trigger=$(this).data('trigger');var that=this;var timeout=setTimeout(function(){popups.open(that)},trigger.on_idle*1000);var index=timer.indexOf(timeout);if(index>-1)timer[index]=timeout;else timer.push(timeout)})});$(window).on('mouseout',function(event){event=event?event:window.event;var from=event.relatedTarget||event.toElement;
303if((!from||from.nodeName=="HTML")&&event.clientY<=100){$.each(popups.on_exit,function(){popups.open(this)})}});$('[href*="open-popup="]').on('click keyup',function(e){e.preventDefault();var match=$(this).attr('href').match(/open-popup=[^#&?]+/);if(match){var slugOrID=match[0].replace('open-popup=','');openGreydPopup(slugOrID)}});$(window).on('keyup',function(event){if(event.key=="Escape"){$('.popups .popup').each(function(){if(!$(this).hasClass('hidden'))popups.close(this)})}});$('[onclick*="popups.close"]').each(function(){if(!$(this).hasClass("popup_overlay")){$(this).attr('tabindex',0);$(this).attr('role','button')} 304$(this).on('keydown',function(event){if(event.key==" "||event.key=="Enter"){event.preventDefault();popups.close(this)}})})} 305this.maybe_open=function(el){var popup=$(el);index=-1;$.each(popups.on_init,function(){if($(this).attr('id')==popup.attr('id')) 306index=popups.on_init.indexOf(this)});if(index>-1)popups.open(el)} 307this.open=function(el){if($('html').hasClass('not_compatible'))return;var popup=$(el);var overlay=popup.find('.popup_overlay');var wrapper=popup.find('.popup_content .popup_wrapper');const content=popup.find('.popup_content');if(popup.hasClass('hidden')){popup.removeClass('hidden');popups.lastFocus=document.activeElement;let inputs=popup.find('input, textarea, select, .popup_close_button');if(inputs[0])inputs[0].focus();document.addEventListener("keydown",(e)=>{if(e.key==='Tab')popups.trapTabKey(popup,e)}) 308if(typeof nav!=='undefined'&&typeof nav.closeMenus==='function')nav.closeMenus();window.dispatchEvent(new Event('closePopovers'));var busy=popup.data('busy');if(typeof busy!=='undefined'&&busy=='yes')return;popup.data('busy','yes');setTimeout(function(){var anim=popup.data('anim_type');var time=0;if(typeof anim!=='undefined'){time=popup.data('anim_time');var opacity=overlay.data('opacity');if(anim=='fade'){popup.css({"opacity":'1'})}else if(anim.indexOf('slide_')==0){overlay.css({"top":'0',"left":'0',"opacity":opacity});popup.css({"top":'0',"left":'0'})}else{var dur_old=wrapper.css('transition-duration');var dur=(time/1000.0);if(anim=='scale') 309wrapper.css('transform','scale(1)');else if(anim=='flip_vertical') 310wrapper.css('transform','rotateY(0deg)');else if(anim=='flip_horizontal') 311wrapper.css('transform','rotateX(0deg)');else if(anim=='flip_3d') 312wrapper.css('transform','rotate3d(1,1,1,0) scale(1)');overlay.css({"opacity":opacity})}} 313var effect=overlay.data('effect');if(typeof effect!=='undefined'){popups.addFilter(effect,time)} 314var transform=popup.data('transform');if(typeof transform!=='undefined'){var origin=popup.data('origin');if(typeof origin==='undefined')origin='center';popups.setTransform(transform,origin,time)} 315var noscroll=overlay.data('noscroll');if(typeof noscroll!=='undefined'&&noscroll===!0){popups.blockScroll(popup.attr('id'))} 316var highest=popup.data('highest');if(typeof highest!=='undefined'&&highest===!0){var current=popup;while(current.prev().length>0){current=current.prev();popups.close(current)}} 317var hashtag=popup.data('hashtag');if(typeof hashtag!=='undefined'&&hashtag===!0){window.location.hash=popup.attr('name')} 318setTimeout(function(){popup.data('busy','no')},time)},0);popup.trigger('open',[(event&&event?.target?event.target:null)])}} 319this.btnClose=function(el){if(typeof nav!=='undefined'&&typeof nav.checkKey==='function'&&nav.checkKey(event))return!0;this.close(el)} 320this.close=function(el){var popup=$(el).closest('.popup');var overlay=popup.find('.popup_overlay');var wrapper=popup.find('.popup_content .popup_wrapper');if(!popup.hasClass('hidden')){if(popups.lastFocus.closest('.is-position-fixed')){popups.lastFocus.focus({preventScroll:!0})}else{popups.lastFocus.focus()} 321var busy=popup.data('busy');if(typeof busy!=='undefined'&&busy=='yes')return;popup.data('busy','yes');var anim=popup.data('anim_type');var time=0;if(typeof anim!=='undefined'){time=popup.data('anim_time');if(anim=='fade'){popup.css({"opacity":'0'})}else if(anim.indexOf('slide_')==0){if(anim=='slide_top'){overlay.css({"top":'100%',"opacity":'0'});popup.css({"top":'-100%'})}else if(anim=='slide_bottom'){overlay.css({"top":'-100%',"opacity":'0'});popup.css({"top":'100%'})}else if(anim=='slide_left'){overlay.css({"left":'100%',"opacity":'0'});popup.css({"left":'-100%'})}else if(anim=='slide_right'){overlay.css({"left":'-100%',"opacity":'0'});popup.css({"left":'100%'})}}else{var dur_old=wrapper.css('transition-duration');var dur=(time/1000.0);if(anim=='scale') 322wrapper.css('transform','scale(0)');else if(anim=='flip_vertical') 323wrapper.css('transform','rotateY(-90deg)');else if(anim=='flip_horizontal') 324wrapper.css('transform','rotateX(-90deg)');else if(anim=='flip_3d') 325wrapper.css('transform','rotate3d(1,1,1,240deg) scale(0)');overlay.css({"opacity":'0'})} 326setTimeout(function(){popup.addClass('hidden')},time)}else{popup.addClass('hidden')} 327var effect=overlay.data('effect');if(typeof effect!=='undefined'){popups.removeFilter(effect,time)}
327 328var transform=popup.data('transform');if(typeof transform!=='undefined'){popups.setTransform('none','',time)} 329var noscroll=overlay.data('noscroll');if(typeof noscroll!=='undefined'&&noscroll===!0){popups.unblockScroll(popup.attr('id'))} 330var once=popup.data('once');if(typeof once!=='undefined'&&once===!0){setTimeout(function(){var cookiename=popup.data('cookie');if(cookiename&&cookiename.length>0){document.cookie=cookiename+"=true;"+($("html").hasClass("ie")?"":" expires=0;")+" path=/"} 331popups.remove(popup)},time)} 332const videos=popup[0].querySelectorAll(".wp-block-video video, .wp-block-embed iframe");if(NodeList.prototype.isPrototypeOf(videos)){videos.forEach(video=>{if(video.tagName=="VIDEO")video.pause();if(video.tagName=="IFRAME"){const src=video.src;video.src=src}})} 333setTimeout(function(){popup.data('busy','no')},time)}} 334this.btnToggle=function(el){if(typeof nav!=='undefined'&&typeof nav.checkKey==='function'&&nav.checkKey(event))return!0;this.toggle(el)} 335this.toggle=function(el){if($(el).hasClass('hidden')) 336popups.open(el);else popups.close($(el).children()[0])} 337this.remove=function(popup){var id=popup.attr('id');var index=-1;$.each(popups.on_scroll,function(){if($(this).attr('id')==id)index=popups.on_scroll.indexOf(this)});if(index>-1)popups.on_scroll.splice(index,1);index=-1;$.each(popups.on_idle,function(){if($(this).attr('id')==id)index=popups.on_idle.indexOf(this)});if(index>-1)popups.on_idle.splice(index,1);index=-1;$.each(popups.on_exit,function(){if($(this).attr('id')==id)index=popups.on_exit.indexOf(this)});if(index>-1)popups.on_exit.splice(index,1);index=-1;$.each(popups.on_init,function(){if($(this).attr('id')==id)index=popups.on_init.indexOf(this)});if(index>-1)popups.on_init.splice(index,1);popup.remove()} 338this.addFilter=function(effect,time){var filters=$('section.popups').data('filter');if(typeof filters==='undefined')filters=[];filters.push(effect);var index=filters.indexOf('none');if(index>-1)filters.splice(index,1);$('section.popups').data('filter',filters);popups.setFilter(filters.join(' '),time)} 339this.removeFilter=function(effect,time){var filters=$('section.popups').data('filter');if(typeof filters==='undefined')filters=[];var index=filters.indexOf(effect);if(index>-1)filters.splice(index,1);$('section.popups').data('filter',filters);if(filters.length==0)filters='none';else filters=filters.join(' ');popups.setFilter(filters,time)} 340this.setFilter=function(filters,time){var dur_old=$('body main').css('transition-duration')||$('body .wp-site-blocks').css('transition-duration');var dur=(time/1000.0);var selector='body header, body main, body footer';if($('body .wp-site-blocks').length)selector='body .wp-site-blocks';$(selector).animate({"transition-duration":dur+'s'},0,function(){$(selector).css('filter',filters);setTimeout(function(){$(selector).css('transition-duration',dur_old)},time+1)})} 341this.setTransform=function(transform,origin,time){var dur_old=$('body main').css('transition-duration')||$('body .wp-site-blocks').css('transition-duration');var dur=(time/1000.0);var selector='body header > div:not(.offmenu_wrapper), body main, body footer';if($('body .wp-site-blocks').length)selector='body .wp-site-blocks';$(selector).animate({"transition-duration":dur+'s'},0,function(){$(selector).css('transform',transform);$(selector).css('transform-origin',origin);setTimeout(function(){$(selector).css('transition-duration',dur_old)},time+1)})} 342this.blockScroll=function(id){var blocker=$('section.popups').data('noscroll');if(typeof blocker==='undefined')blocker=[];blocker.push(id);$('section.popups').data('noscroll',blocker);$('html').css('overflow','hidden')} 343this.unblockScroll=function(id){var blocker=$('section.popups').data('noscroll');if(typeof blocker==='undefined')blocker=[];var index=blocker.indexOf(id);if(index>-1)blocker.splice(index,1);$('section.popups').data('noscroll',blocker);if(blocker.length==0)$('html').css('overflow','');else $('html').css('overflow','hidden')} 344this.checkBrowser=function(){var getVersion=function(name){if(name=="MSIE"){if(navigator.userAgent.
344search("Trident")>=0){var tmp=navigator.userAgent.split("Trident/");var tmp1=tmp[1].split("; ");if(tmp1[0].indexOf("6.")>-1)return"10.0";else if(tmp1[0].indexOf("7.")>-1)return"11.0"}else{var tmp=navigator.userAgent.split(MSIE+" ");var tmp1=tmp[1].split("; ");return tmp1[0]}}else{var tmp=navigator.userAgent.split(name+"/");var tmp1=tmp[1].split(" ");return tmp1[0]}} 345var dataset={'system':'','browser':'','version':0,};var deviceAgent=navigator.userAgent.toLowerCase();if(deviceAgent.match(/(iphone|ipod|ipad)/)){dataset.system="ios"}else if(navigator.userAgent.search("Android")>=0){dataset.system="android"}else if(navigator.userAgent.search("Windows NT")>=0){dataset.system="win"}else if(navigator.userAgent.search("Macintosh")>=0){dataset.system="osx"}else{dataset.system="unknown"} 346if(navigator.userAgent.search("MSIE")>=0||navigator.userAgent.search("Trident")>=0){dataset.browser="ie";dataset.version=getVersion("MSIE")}else if(navigator.userAgent.search("Edge")>=0){dataset.browser="edge";dataset.version=getVersion("Edge")}
346else if(navigator.userAgent.search("OPR")>=0){dataset.browser="opera";dataset.version=getVersion("OPR")}else if(navigator.userAgent.search("Opera")>=0){dataset.browser="opera";dataset.version=getVersion("Opera")}else if(navigator.userAgent.search("Firefox")>=0){dataset.browser="firefox";dataset.version=getVersion("Firefox")}else if(navigator.userAgent.search("Chrome")>=0){dataset.browser="chrome";dataset.version=getVersion("Chrome")}else if(navigator.userAgent.search("Safari")>=0){dataset.browser="safari";dataset.version=getVersion("Version")}else{dataset.browser="unknown"} 347return dataset} 348this.trapTabKey=function(node,e){const focusableChildren=popups.getFocusableChildren(node) 349const focusedItemIndex=focusableChildren.indexOf(document.activeElement) 350const lastIndex=focusableChildren.length-1 351const withShift=e.shiftKey 352if(withShift&&focusedItemIndex===0){focusableChildren[lastIndex].focus() 353e.preventDefault()}else if(!withShift&&focusedItemIndex===lastIndex){focusableChildren[0].focus() 354e.preventDefault()}} 355this.isVisible=function(element){return element=>element.offsetWidth||element.offsetHeight||element.getClientRects().length} 356this.getFocusableChildren=function(root){const elements=[...root[0].querySelectorAll(popups.focusableSelectors.join(','))] 357return elements.filter(popups.isVisible)}} 358function openGreydPopup(popup){if(typeof popup==='object'&&popup.length){popups.open(popup)}else{var el=$('#popup_'+popup);if(!el.length){el=$('.popup[name='+popup+']')} 359if(!el.length){el=$('.popup[name='+popup.toLowerCase()+']')} 360if(el.length)popups.open(el)}};var greyd=greyd||{};if(typeof greyd.setup==="undefined")greyd.setup={};greyd.setup={lazyload:"true",...greyd.setup};(function(){jQuery(function(){if(typeof $==='undefined')$=jQuery;greyd.backgrounds.init();greyd.lazyload.init();greyd.cssAnims.init()})})(jQuery);function onYouTubeIframeAPIReady(){greyd.backgrounds.initYoutubeVideos();if(typeof icons!=='undefined'&&typeof icons.initYoutubeVideos==='function'){icons.initYoutubeVideos()}} 361greyd.backgrounds=new function(){this.bgs={};this.init=function(){if($('.greyd-background').length==0){return} 362var youtubefound=!1;$('.greyd-background').each(function(){var id=$(this).attr('id');var that=$(this);while(typeof id==='undefined'){that=that.parent();if(that.length==0)id="";else id=that.attr('id')} 363if(id=="")return;var resize=!1;if($(this).hasClass('bg_full')||$(this).hasClass('bg_window')) 364resize=!0;var scroll=[];$('#'+id+' .bg_vparallax').each(function(){scroll.push({container:this,scroll:'vparallax',speed:$(this).data('bg_parallax_speed'),enable_mobile:$(this).data('bg_parallax_enable_mobile')})});$('#'+id+' .bg_hparallax').each(function(){scroll.push({container:this,scroll:'hparallax',speed:$(this).data('bg_parallax_speed'),enable_mobile:$(this).data('bg_parallax_enable_mobile')})});var video=!1;$('#'+id+' .bg_video').each(function(){video={src:$(this).children(0).data('bg_video_src'),video_id:$(this).children(0).data('bg_video_id'),video_aspect:$(this).children(0).data('bg_video_ar'),container_id:$(this).children(0).children(0).attr('id'),};if(video.src=="youtube")youtubefound=!0});if(!greyd.backgrounds.bgs[id]){greyd.backgrounds.bgs[id]={container:this,resize:resize,scroll:scroll,video:video}}});if(youtubefound){if(typeof YT==='undefined'){var tag=document.createElement('script');tag.src="https://www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}else this.initYoutubeVideos()} 365this.addEvents()} 366this.initYoutubeVideos=function(){for(var id in greyd.backgrounds.bgs){var bg=greyd.backgrounds.bgs[id];if(bg.video&&bg.video.src=="youtube"){bg.video.player=new YT.Player(bg.video.container_id,{height:'100%',width:'100%',videoId:bg.video.video_id,playerVars:{autoplay:'1',loop:'1',controls:'0',modestbranding:'1',disablekb:'1'},events:{'onReady':greyd.backgrounds.onPlayerReady,'onStateChange':greyd.backgrounds.onPlayerStateChange}})}}} 367this.onPlayerReady=function(event){event.target.mute();event.target.playVideo();greyd.backgrounds.resize()} 368this.onPlayerStateChange=function(event){if(event.data==YT.PlayerState.ENDED){event.target.seekTo(0);event.target.playVideo()}} 369this.addEvents=function(){$(window).scroll(this.scroll);$(window).resize(this.resize);this.resize()} 370this.resize=function(){for(var id in greyd.backgrounds.bgs){var bg=greyd.backgrounds.bgs[id];
370if(bg.resize){greyd.backgrounds.resizeBackground(bg)} 371if(bg.video){greyd.backgrounds.resizeVideo(bg)}} 372greyd.backgrounds.scroll()} 373this.resizeBackground=function(bg){var margin=-($(bg.container).parent()[0].getBoundingClientRect().left);margin+=$('body')[0].getBoundingClientRect().left;if(Math.abs(parseInt(margin))*2<=window.innerWidth){if(Math.abs(parseInt(margin))!==0){$(bg.container).css('left',margin);$(bg.container).css('right',margin)}}} 374this.resizeVideo=function(bg){var pheight=$(bg.container).css('height').replace("px","");var pwidth=$(bg.container).css('width').replace("px","");var ar=bg.video.video_aspect.split("/");ar=ar[0]/ar[1];var height=pheight;var width=height*(ar);var margin_left=margin_top=0;if(width>=pwidth){margin_left=(pwidth-width)/2}else{width=pwidth;height=width/(ar);margin_top=(pheight-height)/2} 375var iframe=typeof bg.video.container_id==='undefined'?$(bg.container).find('iframe'):$("#"+bg.video.container_id);console.log(iframe);if(iframe&&iframe.length){iframe.css('height',height+"px");iframe.css('width',width+"px");iframe.css('margin-left',margin_left+"px");iframe.css('margin-top',margin_top+"px")}else{setTimeout(function(){iframe=$(bg.container).find('iframe');bg.video.container_id=iframe.attr('id');iframe.css('height',height+"px");iframe.css('width',width+"px");iframe.css('margin-left',margin_left+"px");iframe.css('margin-top',margin_top+"px")},100)}} 376this.scroll=function(){var is_mobile=($('html').hasClass('ios')||$('html').hasClass('android'));var viewportTop=$(window).scrollTop();var viewportHeight=$(window).height();var viewportBottom=viewportTop+viewportHeight;for(var id in greyd.backgrounds.bgs){if(greyd.backgrounds.bgs[id].scroll.length>0){var background=greyd.backgrounds.bgs[id];for(var i=0;i<background.scroll.length;i++){var bg=background.scroll[i].container;var scroll=background.scroll[i].scroll;var speed=background.scroll[i].speed;var enable_mobile=background.scroll[i].enable_mobile;if(!is_mobile||(is_mobile&&enable_mobile)){var elementTop=$(bg).offset().top;var elementHeight=$(bg).outerHeight();if(viewportBottom-elementTop>0&&viewportTop-elementTop<elementHeight){var delta=(viewportHeight-elementHeight)/2;var pos=((viewportBottom-elementTop-elementHeight-delta)*(speed/100.0));if(scroll=="vparallax"){if($(bg).hasClass('div_parallax')) 377$(bg).children(0).css('transform','translateY('+pos.toFixed(2)+'px)');else $(bg).css('background-position-y',pos.toFixed(2)+'px')} 378if(scroll=="hparallax"){if($(bg).hasClass('div_parallax')) 379$(bg).children(0).css('transform','translateX('+pos.toFixed(2)+'px)');else $(bg).css('background-position-x',pos.toFixed(2)+'px')}}}}}}}} 380greyd.lazyload=new function(){this.setup={lazyload:'false',};this.observer=!1;this.init=function(){if(typeof greyd.setup.lazyload!=='undefined'){this.setup.lazyload=greyd.setup.lazyload} 381if(this.setup.lazyload=='false'&&document.querySelectorAll('video[data-src]:not([src])')===0)return;var elements=document.querySelectorAll('.bg_image:not(.visible), video[data-src]:not([src])');if(elements.length===0){return} 382if(!greyd.lazyload.observer){greyd.lazyload.observer=new IntersectionObserver(function onIntersection(entries,opts){entries.forEach(entry=>{if(entry.isIntersecting){if(entry.target.classList.contains('bg_image')){var bg=entry.target;if(typeof bg.dataset.srcset!=='undefined'){var srcset=JSON.parse(bg.dataset.srcset);var newset={src:getComputedStyle(bg,!1).backgroundImage.replace('url("','').replace('")',''),newsrc:''};var width=window.screen.width*window.devicePixelRatio;for(var i in srcset){if(i>width&&newset.src!=srcset[i]){newset.newsrc=srcset[i];break}} 383if(newset.newsrc==''&&newset.src!=srcset.full){newset.newsrc=srcset.full} 384if(typeof newset.newsrc!=='undefined'&&newset.newsrc!=''){bg.style.backgroundImage='url('+newset.newsrc+')';elements.forEach((element)=>{if(!element.classList.contains('visible')){var src=getComputedStyle(element,!1).backgroundImage.replace('url("','').replace('")','');if(src==newset.src){element.style.backgroundImage='url('+newset.newsrc+')';element.classList.add('visible');greyd.lazyload.observer.unobserve(element)}}})}} 385bg.classList.add('visible');greyd.lazyload.observer.unobserve(bg)} 386if(entry.target.tagName.toLowerCase()=="video"){entry.target.src=entry.target.dataset.src;entry.target.load();delete entry.target.dataset.src;greyd.lazyload.observer.unobserve(entry.target)}}})},{threshold:0,})}
387elements.forEach((element)=>{greyd.lazyload.observer.observe(element)})}} 388greyd.cssAnims=new function(){this.observer=!1;this.init=function(){var objs=document.querySelectorAll('.animate-when-almost-visible');if(objs.length===0){return} 389if(!greyd.cssAnims.observer){greyd.cssAnims.observer=new IntersectionObserver(function onIntersection(entries,opts){entries.forEach(entry=>{var triggerClass="start-animation";if(entry.isIntersecting&&!entry.target.classList.contains(triggerClass)){entry.target.classList.add(triggerClass);entry.target.classList.add("animated");greyd.cssAnims.observer.unobserve(entry.target)}})},{threshold:0,})} 390objs.forEach((element)=>{greyd.cssAnims.observer.observe(element)})}};var greyd=greyd||{};(function(){jQuery(function(){if(typeof $==='undefined')$=jQuery;greyd.trigger.init()})})(jQuery);greyd.trigger=new function(){this.init=function(){$('.hidden-trigger-link').each(function(){var elem=this;$(elem).on('click',function(e,prevEvent){var cmdClicked=e.metaKey||e.ctrlKey;var cmdClickedPrev=typeof prevEvent!=='undefined'&&(prevEvent.metaKey||prevEvent.ctrlKey);if(cmdClicked||cmdClickedPrev){e.preventDefault();window.open($(this).attr('href'),'_blank')}else if(typeof prevEvent!=='undefined'){this.click()}});$(elem).siblings(':not([href])').on('click',function(e){$(elem).trigger('click',e)})});if($("[data-greyd-trigger]").length===0){return} 391$('[data-greyd-trigger][data-onload="hide"]').each(function(){if($(this).hasClass('is-layout-flex')||$(this).hasClass('wp-block-group-is-layout-flex')){$(this).css('display','flex');$(this).hide()}});$("body").off("greyd-trigger",greyd.trigger.onTrigger);$("body").on("greyd-trigger",greyd.trigger.onTrigger)} 392this.onTrigger=function(e,event,trigger,isGlobal){if(isGlobal){var targets=$("[data-greyd-trigger*='"+trigger+"|']")}else{var targets=$(event.target).closest(".dynamic, .main, .navigation, body").find("[data-greyd-trigger*='"+trigger+"|']")} 393if(targets.length===0)return;targets.each(function(i,elem){var target=$(elem);var regex=new RegExp(trigger+"[A-Za-z\|]+","g");var data=target.data("greyd-trigger");var setup=data?data.match(regex).slice(-1).pop():"";var action=setup?setup.split("|")[1]:'show';if(typeof target[action]==='function'){if(target.data("siblings")=="hide")target.siblings("[data-greyd-trigger]").stop().hide();target.stop();target.css({transition:'none'});target[action]()}})} 394this.trigger=function(event,string,isGlobal){$("body").trigger("greyd-trigger",[event,string,isGlobal]);window.dispatchEvent(new Event('resize'))}}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.