-->*/
/** leaflet-simple-map-screenshoter.v0.4.5.custom.min.js (custom) (c) 2021 @grinat | MIT License */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e["leaflet-simple-map-screenshoter"]=e["leaflet-simple-map-screenshoter"]||{})}(this,function(e){"use strict";function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o=t(function(e,t){!function(t){function n(e,t){function n(e){return t.bgcolor&&(e.style.backgroundColor=t.bgcolor),t.width&&(e.style.width=t.width+"px"),t.height&&(e.style.height=t.height+"px"),t.style&&Object.keys(t.style).forEach(function(n){e.style[n]=t.style[n]}),e}return t=t||{},c(t),Promise.resolve(e).then(function(e){return u(e,t.filter,!0)}).then(h).then(f).then(n).then(function(n){return d(n,t.width||p.width(e),t.height||p.height(e))})}function o(e,t){return l(e,t||{}).then(function(t){return t.getContext("2d").getImageData(0,0,p.width(e),p.height(e)).data})}function r(e,t){return l(e,t||{}).then(function(e){return e.toDataURL()})}function i(e,t){return t=t||{},l(e,t).then(function(e){return e.toDataURL("image/jpeg",t.quality||1)})}function a(e,t){return l(e,t||{}).then(p.canvasToBlob)}function s(e,t){return l(e,t||{})}function c(e){void 0===e.imagePlaceholder?v.impl.options.imagePlaceholder=M.imagePlaceholder:v.impl.options.imagePlaceholder=e.imagePlaceholder,void 0===e.cacheBust?v.impl.options.cacheBust=M.cacheBust:v.impl.options.cacheBust=e.cacheBust,void 0===e.useCredentials?v.impl.options.useCredentials=M.useCredentials:v.impl.options.useCredentials=e.useCredentials}function l(e,t){function o(e,n){var o=document.createElement("canvas");if(o.width=(t.width||p.width(e))*n,o.height=(t.height||p.height(e))*n,t.bgcolor){var r=o.getContext("2d");r.fillStyle=t.bgcolor,r.fillRect(0,0,o.width,o.height)}return o}return n(e,t).then(p.makeImage).then(p.delay(100)).then(function(n){var r="number"!=typeof t.scale?1:t.scale,i=o(e,r),a=i.getContext("2d");return n&&(a.scale(r,r),a.drawImage(n,0,0)),i})}function u(e,t,n){function o(e){return e instanceof HTMLCanvasElement?p.makeImage(e.toDataURL()):e.cloneNode(!1)}function r(e,t,n){var o=e.childNodes;return 0===o.length?Promise.resolve(t):function(e,t,n){var o=Promise.resolve();return t.forEach(function(t){o=o.then(function(){return u(t,n)}).then(function(t){t&&e.appendChild(t)})}),o}(t,p.asArray(o),n).then(function(){return t})}function i(e,t){function n(){!function(e,t){e.cssText?(t.cssText=e.cssText,t.font=e.font):function(e,t){p.asArray(e).forEach(function(n){t.setProperty(n,e.getPropertyValue(n),e.getPropertyPriority(n))})}(e,t)}(window.getComputedStyle(e),t.style)}function o(){function n(n){var o=window.getComputedStyle(e,n),r=o.getPropertyValue("content");if(""!==r&&"none"!==r){var i=p.uid(),a=t.getAttribute("class");a&&t.setAttribute("class",a+" "+i);var s=document.createElement("style");s.appendChild(function(e,t,n){var o="."+e+":"+t,r=n.cssText?function(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}(n):function(e){function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}return p.asArray(e).map(t).join("; ")+";"}(n);return document.createTextNode(o+"{"+r+"}")}(i,n,o)),t.appendChild(s)}}[":before",":after"].forEach(function(e){n(e)})}function r(){e instanceof HTMLTextAreaElement&&(t.innerHTML=e.value),e instanceof HTMLInputElement&&t.setAttribute("value",e.value)}function i(){t instanceof SVGElement&&(t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t instanceof SVGRectElement&&["width","height"].forEach(function(e){var n=t.getAttribute(e);n&&t.style.setProperty(e,n)}))}return t instanceof Element?Promise.resolve().then(n).then(o).then(r).then(i).then(function(){return t}):t}return n||!t||t(e)?Promise.resolve(e).then(o).then(function(n){return r(e,n,t)}).then(function(t){return i(e,t)}):Promise.resolve()}function h(e){return g.resolveAll().then(function(t){var n=document.createElement("style");return e.appendChild(n),n.appendChild(document.createTextNode(t)),e})}function f(e){return w.inlineAll(e).then(function(){return e})}function d(e,t,n){return Promise.resolve(e).then(function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)}).then(p.escapeXhtml).then(function(e){return''+e+" "}).then(function(e){return''+e+" "}).then(function(e){return"data:image/svg+xml;charset=utf-8,"+e})}var p=function(){function e(){var e="application/font-woff";return{woff:e,woff2:e,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function t(e){var t=/\.([^\.\/]*?)(\?|$)/g.exec(e);return t?t[1]:""}function n(n){var o=t(n).toLowerCase();return e()[o]||""}function o(e){return-1!==e.search(/^(data:)/)}function r(e){return new Promise(function(t){for(var n=window.atob(e.toDataURL().split(",")[1]),o=n.length,r=new Uint8Array(o),i=0;i=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,s=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var s=a.URL||a.webkitURL,c=document.createElement("a");t=t||e.name||"download",c.download=t,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?i(c):r(c.href)?o(e,t,n):i(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),n);else if(r(e))o(e,n,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout(function(){i(s)})}}:function(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,n);var i="application/octet-stream"===e.type,s=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&s)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},l.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,h=u.createObjectURL(e);r?r.location=h:location.href=h,r=null,setTimeout(function(){u.revokeObjectURL(h)},4e4)}});a.saveAs=s.saveAs=s,e.exports=s})}),i=L.Control.extend({options:{cropImageByInnerWH:!0,hidden:!1,domtoimageOptions:{},position:"topleft",screenName:"screen",iconUrl:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDMyIDMyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMiAzMjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxnIGlkPSJjYW1lcmEiPjxwYXRoIHN0eWxlPSJmaWxsOiMwMTAwMDI7IiBkPSJNMTYsOS41MDFjLTQuNDE5LDAtOCwzLjU4MS04LDhjMCw0LjQxOCwzLjU4MSw4LDgsOGM0LjQxOCwwLDgtMy41ODIsOC04UzIwLjQxOCw5LjUwMSwxNiw5LjUwMXogTTIwLjU1NSwyMS40MDZjLTIuMTU2LDIuNTE2LTUuOTQzLDIuODA3LTguNDU5LDAuNjVjLTIuNTE3LTIuMTU2LTIuODA3LTUuOTQ0LTAuNjUtOC40NTljMi4xNTUtMi41MTcsNS45NDMtMi44MDcsOC40NTktMC42NUMyMi40MiwxNS4xMDIsMjIuNzExLDE4Ljg5MSwyMC41NTUsMjEuNDA2eiIvPjxwYXRoIHN0eWxlPSJmaWxsOiMwMTAwMDI7IiBkPSJNMTYsMTMuNTAxYy0yLjIwOSwwLTMuOTk5LDEuNzkxLTQsMy45OTl2MC4wMDJjMCwwLjI3NSwwLjIyNCwwLjUsMC41LDAuNXMwLjUtMC4yMjUsMC41LTAuNVYxNy41YzAuMDAxLTEuNjU2LDEuMzQzLTIuOTk5LDMtMi45OTljMC4yNzYsMCwwLjUtMC4yMjQsMC41LTAuNVMxNi4yNzYsMTMuNTAxLDE2LDEzLjUwMXoiLz48cGF0aCBzdHlsZT0iZmlsbDojMDEwMDAyOyIgZD0iTTI5LjQ5Miw4LjU0MmwtNC4zMzQtMC43MjNsLTEuMzczLTMuNDM0QzIzLjMyNiwzLjI0LDIyLjIzMiwyLjUsMjEsMi41SDExYy0xLjIzMiwwLTIuMzI2LDAuNzQtMi43ODYsMS44ODZMNi44NDIsNy44MTlMMi41MDksOC41NDJDMS4wNTUsOC43ODMsMCwxMC4wMjcsMCwxMS41djE1YzAsMS42NTQsMS4zNDYsMywzLDNoMjZjMS42NTQsMCwzLTEuMzQ2LDMtM3YtMTVDMzIsMTAuMDI3LDMwLjk0NSw4Ljc4MywyOS40OTIsOC41NDJ6IE0zMCwyNi41YzAsMC41NTMtMC40NDcsMS0xLDFIM2MtMC41NTMsMC0xLTAuNDQ3LTEtMXYtMTVjMC0wLjQ4OSwwLjM1NC0wLjkwNiwwLjgzNi0wLjk4Nkw4LjI4LDkuNjA3bDEuNzkxLTQuNDc4QzEwLjIyNCw0Ljc1LDEwLjU5MSw0LjUsMTEsNC41aDEwYzAuNDA4LDAsMC43NzUsMC4yNDksMC45MjgsMC42MjlsMS43OTEsNC40NzhsNS40NDUsMC45MDdDMjkuNjQ2LDEwLjU5NCwzMCwxMS4wMTEsMzAsMTEuNVYyNi41eiIvPjwvZz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+",hideElementsWithSelectors:[".leaflet-control:not(.screenshot-visible)"],onCropBorderSize:2,caption:null,captionFontSize:15,captionFont:"Arial",captionColor:"black",captionBgColor:"white",captionOffset:5,mimeType:"image/png",debugMode:!1,preventDownload:!1,onPixelDataFail:function(e){var t=e.node,n=e.error;return console.warn("Map node is very big "+t.scrollWidth+"x"+t.scrollHeight),console.warn("Add function: SimpleMapScreenshoter({\n onPixelDataFail: function({ node, plugin, error, mapPane, domtoimageOptions }) {\n // Solutions:\n // decrease size of map\n // or decrease zoom level\n // or remove elements with big distanses\n // and after that return image in Promise - plugin._getPixelDataOfNormalMap\n return plugin._getPixelDataOfNormalMap(domtoimageOptions)\n }\n })"),Promise.reject(n)}},onAdd:function(){return this._container=L.DomUtil.create("div","leaflet-control-simpleMapScreenshoter"),this._link=null,this._screenState={status:1,promise:null},!1===this.options.hidden&&this._addScreenBtn(),this._onUserStartInteractWithMap=this._onUserStartInteractWithMap.bind(this),this._onUserEndInteractWithMap=this._onUserEndInteractWithMap.bind(this),this._map.on("zoomstart",this._onUserStartInteractWithMap),this._map.on("move",this._onUserStartInteractWithMap),this._map.on("zoomend",this._onUserEndInteractWithMap),this._map.on("moveend",this._onUserEndInteractWithMap),this._container},takeScreen:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"blob",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o={};for(var r in this.options)n.hasOwnProperty(r)?o[r]=n[r]:o[r]=this.options[r];return 2===this._screenState.status?this._screenState.promise:(this._map.fire("simpleMapScreenshoter.takeScreen"),this._screenState.status=2,this._setElementsVisible(!1),this._screenState.promise=this._waitEndOfInteractions().then(function(){return e._getPixelData(o)}).then(function(t){return e._setElementsVisible(!0),e._toCanvas(t,o)}).then(function(n){return"image"===t?e._canvasToImage(n,o):"canvas"===t?n:e._canvasToBlob(n,o)}).then(function(t){return e._screenState.status=1,e._map.fire("simpleMapScreenshoter.done"),t}).catch(function(t){return e._setElementsVisible(!0),e._screenState.status=1,e._map.fire("simpleMapScreenshoter.error",{e:t}),Promise.reject(t)}),this._screenState.promise)},_setElementsVisible:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.options.hideElementsWithSelectors.forEach(function(n){var o=e._map._container.querySelectorAll(n),r=!0,i=!1,a=void 0;try{for(var s,c=o[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){s.value.style.opacity=!1===t?0:1}}catch(e){i=!0,a=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}})},_canvasToImage:function(e,t){var n=t.mimeType,o=e.toDataURL(n);return-1===o.indexOf("base64")?Promise.reject(new Error("Base64 image generation error")):Promise.resolve(o)},_canvasToBlob:function(e,t){var n=t.mimeType;return new Promise(function(t,o){e.toBlob(function(e){t(e)},n)})},_toCanvas:function(e,t){var n=t.captionOffset,o=t.caption,r=t.captionFontSize,i=t.captionFont,a=t.captionColor,s=t.captionBgColor,c=this._node,l=c.screenHeight,u=c.screenWidth,h=document.createElement("canvas");h.width=u,h.height=l;for(var f=h.getContext("2d"),d=f.createImageData(u,l),p=0;p1?(t=0,n=e[0]):!1===o&&(t=e[e.length-1]||0,n=null),{min:t,max:n}},_getPixelData:function(e){var t=this,n=e.domtoimageOptions,o=void 0===n?{}:n;return this._getPixelDataOfNormalMap(o).catch(function(e){return console.warn("May be map size very big on that zoom level, we have error:",e.toString()),console.warn("You can manually hide map elements with large distances between them for fix that warn"),t._getPixelDataOfBigMap(o)})},_getPixelDataOfNormalMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._map.getContainer();return this._node={node:t,screenHeight:t.scrollHeight,screenWidth:t.scrollWidth},o.toPixelData(t,e)},_getPixelDataOfBigMap:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this._map.getContainer(),r=this._map.getPane("mapPane");r.style.width=2*n.clientWidth+"px",r.style.height=2*n.clientHeight+"px",r.style.overflow="hidden";var i=function(){r.style.width="initial",r.style.height="initial",r.style.overflow="initial"};return this._node={node:n,screenHeight:n.scrollHeight,screenWidth:n.scrollWidth},o.toPixelData(n,t).then(function(e){return i(),e}).catch(function(o){return i(),n.scrollHeight>=4e3||n.scrollWidth>=4e3?e.options.onPixelDataFail({plugin:e,node:n,mapPane:r,error:o,domtoimageOptions:t}):Promise.reject(o)})},_addScreenBtn:function(){this._link=L.DomUtil.create("a","leaflet-control-simpleMapScreenshoter-btn",this._container),this._addCss(),L.DomEvent.addListener(this._link,"click",this._onScreenBtn,this),L.DomEvent.disableClickPropagation(this._link)},_addCss:function(){var e="\n .leaflet-control-simpleMapScreenshoter{\n border: 2px solid rgba(0,0,0,0.2);\n background-clip: padding-box;\n }\n .leaflet-control-simpleMapScreenshoter a{\n background-color: #fff;\n border-bottom: 1px solid #ccc;\n width: 30px;\n height: 30px;\n line-height: 30px;\n display: block;\n text-align: center;\n text-decoration: none;\n color: black;\n overflow: hidden;\n border-radius: 2px;\n background-image: url('"+this.options.iconUrl+"');\n background-position: 46% 41%;\n background-repeat: no-repeat;\n background-size: 63%;\n }\n .leaflet-control-simpleMapScreenshoter a:hover{\n cursor: pointer;\n }\n ",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.appendChild(document.createTextNode(e)),t.appendChild(n)},_onScreenBtn:function(){var e=this;this._map.fire("simpleMapScreenshoter.click"),this.options.preventDownload||this.takeScreen().then(function(t){var n="function"==typeof e.options.screenName?e.options.screenName.call(e):e.options.screenName;r.saveAs(t,n+".png")}).catch(function(t){e._map.fire("simpleMapScreenshoter.error",{e:t})})},_onUserStartInteractWithMap:function(){this._interaction=!0},_onUserEndInteractWithMap:function(){this._interaction=!1},_waitEndOfInteractions:function(){var e=this;return new Promise(function(t){var n=setInterval(function(){e._interaction||(t(),clearInterval(n))},100)})}}),a=function(){return L.Control.SimpleMapScreenshoter=i,L.simpleMapScreenshoter=function(e){return new L.Control.SimpleMapScreenshoter(e)},i}();e.default=a,e.SimpleMapScreenshoter=i,Object.defineProperty(e,"__esModule",{value:!0})});
/*! rangeslider.js - v2.3.0 | (c) 2016 @andreruffert | MIT license */
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";function b(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}function c(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function d(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function e(a){return a&&(0===a.offsetWidth||0===a.offsetHeight||a.open===!1)}function f(a){for(var b=[],c=a.parentNode;e(c);)b.push(c),c=c.parentNode;return b}function g(a,b){function c(a){"undefined"!=typeof a.open&&(a.open=!a.open)}var d=f(a),e=d.length,g=[],h=a[b];if(e){for(var i=0;i '),this.$handle=a('
'),this.$range=a('
').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var f=this;this.$window.on("resize."+this.identifier,d(function(){c(function(){f.update(!1,!1)},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(a,b){if(!b||b.origin!==f.identifier){var c=a.target.value,d=f.getPositionFromValue(c);f.setPosition(d)}})}Number.isNaN=Number.isNaN||function(a){return"number"==typeof a&&a!==a};var k="rangeslider",l=0,m=b(),n={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},o={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return j.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},j.prototype.update=function(a,b){a=a||!1,a&&(this.min=h(this.$element[0].getAttribute("min"),0),this.max=h(this.$element[0].getAttribute("max"),100),this.value=h(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=h(this.$element[0].getAttribute("step"),1)),this.handleDimension=g(this.$handle[0],"offset"+i(this.DIMENSION)),this.rangeDimension=g(this.$range[0],"offset"+i(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,b)},j.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(a),c=this.$range[0].getBoundingClientRect()[this.DIRECTION],d=this.getPositionFromNode(this.$handle[0])-c,e="vertical"===this.orientation?this.maxHandlePos-(b-this.grabPos):b-this.grabPos;this.setPosition(e),b>=d&&bc?c:a},j.prototype.setPosition=function(a,b){var c,d;void 0===b&&(b=!0),c=this.getValueFromPosition(this.cap(a,0,this.maxHandlePos)),d=this.getPositionFromValue(c),this.$fill[0].style[this.DIMENSION]=d+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=d+"px",this.setValue(c),this.position=d,this.value=c,b&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(d,c)},j.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},j.prototype.getRelativePosition=function(a){var b=i(this.COORDINATE),c=this.$range[0].getBoundingClientRect()[this.DIRECTION],d=0;return"undefined"!=typeof a.originalEvent["client"+b]?d=a.originalEvent["client"+b]:a.originalEvent.touches&&a.originalEvent.touches[0]&&"undefined"!=typeof a.originalEvent.touches[0]["client"+b]?d=a.originalEvent.touches[0]["client"+b]:a.currentPoint&&"undefined"!=typeof a.currentPoint[this.COORDINATE]&&(d=a.currentPoint[this.COORDINATE]),d-c},j.prototype.getPositionFromValue=function(a){var b,c;return b=(a-this.min)/(this.max-this.min),c=Number.isNaN(b)?0:b*this.maxHandlePos},j.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandlePos||1),c=this.step*Math.round(b*(this.max-this.min)/this.step)+this.min,Number(c.toFixed(this.toFixed))},j.prototype.setValue=function(a){a===this.value&&""!==this.$element[0].value||this.$element.val(a).trigger("input",{origin:this.identifier})},j.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+k),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},a.fn[k]=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),e=d.data("plugin_"+k);e||d.data("plugin_"+k,e=new j(this,b)),"string"==typeof b&&e[b].apply(e,c)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"});
/*! js-cookie v2.2.0 | MIT */
!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(r+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(n+"")).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u=0&&this.indexOf(e)===this.length-e.length}),Array.isArray||(Array.isArray=function(e){return void 0!==e&&"[object Array]"===Object.prototype.toString.call(e)});var getFirstKey=function(e){for(key in e)return key;return""},getFirstSortedKey=function(e,t){return getSortedKeys(e,t)[0]},getSortedKeys=function(e,t){var r=[];for(key in e)r.push(key);return r.sort(t),r},getSortedKeysByOrderObj=function(e){var t=[];for(key in e){t[parseInt(e[key])]=key}var r=[];for(let e=0;e0){let t="?"==location.search.charAt(0)?location.search.substring(1):location.search,r=t.split("&"),n=[];for(let e=0;e2&&"_="!=r[e].substring(0,2)&&n.push(r[e]);0==n.length?e+="_=":(t=n.join("&"),e+=t+"&_=")}else e+="_=";e+=parseInt((new Date).getTime()/1e3),location.replace?location.replace(e):location.href=e}else location.reload?location.reload():location.href=url}
// jquery.utils.v5.3.1.js //
!function(n){n&&n.info||(n={info:function(n){console.log(n)},warn:function(n){console.warn(n)},error:function(n){console.error(n)}}),Element.prototype.ancestor||(Element.prototype.ancestor=function(n){if(!n||""===n)return this.parentElement||this.parentNode;var match=function(n,e){return n.tagName.toLowerCase()===e},e=n.substring(0,1);"."===e?(n=n.substring(1),match=function(n,e){return n.classList.contains(e)}):"#"===e&&(n=n.substring(1),match=function(n,e){return n.id===e}),n=n.toLowerCase();var t=this.parentElement||this.parentNode;do{if(match(t,n))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType)}),$.fn.extend({check:function(){return this.each((function(){this.checked=!0}))},uncheck:function(){return this.each((function(){this.checked=!1}))},enable:function(){return $(this).prop("disabled",!1)},disable:function(){return $(this).prop("disabled",!0)},visible:function(){return $(this).css({visibility:"visible"})},hidden:function(){return $(this).css({visibility:"hidden"})},ancestor:function(n){var e=$(this).get(0).ancestor(n);return null===e?null:$(e)}});var e={};$.each(["Quad","Cubic","Quart","Quint","Expo"],(function(n,t){e[t]=function(e){return Math.pow(e,n+2)}})),$.extend(e,{Sine:function(n){return 1-Math.cos(n*Math.PI/2)},Circ:function(n){return 1-Math.sqrt(1-n*n)},Elastic:function(n){return 0===n||1===n?n:-Math.pow(2,8*(n-1))*Math.sin((80*(n-1)-7.5)*Math.PI/15)},Back:function(n){return n*n*(3*n-2)},Bounce:function(n){for(var e,t=4;n<((e=Math.pow(2,--t))-1)/11;);return 1/Math.pow(4,3-t)-7.5625*Math.pow((3*e-2)/22-n,2)}}),$.each(e,(function(n,e){$.easing["easeIn"+n]=e,$.easing["easeOut"+n]=function(n){return 1-e(1-n)},$.easing["easeInOut"+n]=function(n){return n<.5?e(2*n)/2:1-e(-2*n+2)/2}})),$.extend({in_array:function(n,e){return e.indexOf(n)>=0},loadImages:function(e,t,r){if(!(e.length<1)){r="function"==typeof r?r:function(){},t="function"==typeof t?t:function(){};var o=0,i=e.length;!function _loadAllImages(r){var next=function(e){if(++o>1e4)n.error("ERROR. too many images: "+o+". Aborting...");else{var t=o+" / "+i;e&&(n.error("ERROR. image error on index: "+t)),o>=i?r():_loadAllImages(r)}},s=new Image,u=$(s);e[o]&&"string"==typeof e[o]?(u.one("load error",(function(n){n.preventDefault(),n.stopImmediatePropagation();var e="error"===n.type;t(e?-1:o),u=null,s=null,next(e)})),u.prop({src:e[o]}),(s.complete||4===s.readyState)&&(t(o),next())):next(!0)}(r)}}}),$.fn.extend({loadImages:function(e,t,r){if(Array.isArray(e)&&!(e.length<1)){r="function"==typeof r?r:function(){},t="function"==typeof t?t:function(){},$images=$(this),$images.length1e4&&(e=e.slice(0,1e4));var inArrayNodes=function(n,e){if(!Array.isArray(n)||n.length<1)return!1;for(let t=0;t=e.length&&!o&&(o=!0,i=null,r()))})),u.on("load",(function(){var n=$(this).get(0);inArrayNodes(i,n)||(i.push(n),s++,t(s),$(this).off("error"),$(this).off("load"),s>=e.length&&!o&&(o=!0,i=null,r()))})),u.get(0).src=e[a]}}}},disableSelection:function(n){return this.each((function(){var e=$(this);e.prop("unselectable","on"),e.css({"-moz-user-select":"none","-webkit-user-select":"none","-ms-user-select":"none","-khtml-user-select":"none","-o-user-select":"none","user-select":"none","-webkit-touch-callout":"none","-webkit-user-select":"none"});var t=e.get(0);t.onselectstart&&(t.onselectstart=function(n){return n.preventDefault(),!1}),n&&t.ondragstart&&(t.ondragstart=function(n){return n.preventDefault(),!1})}))},newWindow:function(){return this.each((function(){var n=$(this),e=[];if(n.is("a"))e=n;else e=n.find("a");0!==e.length&&e.each((function(){$(this).click((function(n){return n.preventDefault(),window.open(this.href?this.href:$(this).prop("href")),!1}))}))}))}})}(Log);
// data.js //
const IS_APP=!1,SHOW_MENU=!0,SHOW_FULLSCREEN_BUTTON=!1,CENTER_LAT_DEFAULT=32.007,CENTER_LNG_DEFAULT=34.81456004,ZOOM_DEFAULT=8.5,AUTO_RELOAD=!0,RELOAD_EVERY=3e5,RADAR_TYPES={NORMAL:10,NEW:30},SEARCH_PARAMS=new URLSearchParams(window.location.search),SESS_ID=SEARCH_PARAMS&&null!=SEARCH_PARAMS.get("token")?SEARCH_PARAMS.get("token"):"",ONLINE_LIMIT=10800,CHANGE_IMAGE_MODE_VISIBILITY=10001,CHANGE_IMAGE_MODE_POSITION=10002,CHANGE_IMAGE_MODE_HEIGHT=10003,CHANGE_IMAGE_MODE_DISPLAY=10004,CHANGE_IMAGE_MODE_OPACITY=10005;var CHANGE_IMAGE_MODE=10005;const speedRadiosPremiumValues=["0.1","0.08","0.05"],tilesRadiosPremiumValues=["satellite","darkgray"],mapLayersTranslucencyPctDefault=30,defaultRadarAnimInterval=.4,defaultFadeSlowAnimations=!0,defaultMapTiles="topo",SCALE_DATA={NORMAL:{colors:[[0,233,255],[0,150,255],[0,17,255],[0,0,255],[8,236,0],[1,195,23],[0,189,26],[255,255,0],[255,138,0],[255,129,0],[252,3,0],[205,49,0],[201,53,0],[245,0,166],[202,59,255],[255,252,255]],labels:[.1,.2,.7,1.2,2,4,6,9,13,18,24,30,40,50,100,200],units:"מ"מ/ שעה",is_gradient:!0},NEW:{colors:[[1,101,239],[0,195,201],[0,160,155],[0,140,77],[0,176,44],[1,211,28],[18,242,24],[124,255,33],[254,253,25],[255,207,0],[255,168,0],[255,125,1],[251,63,0],[225,10,18],[208,0,120],[255,0,254]],labels:[.1,.2,.7,1.2,2,4,6,9,13,18,24,30,40,50,100,200],units:"מ"מ/ שעה",is_gradient:!0},COMPOSITE:{colors:[[21,224,238],[12,147,255],[22,0,205],[16,242,10],[6,196,0],[9,141,4],[245,253,9],[230,191,2],[255,142,4],[255,1,1],[202,1,7],[170,11,16],[255,51,158],[176,0,176],[0,0,0]],labels:[.3,.6,3,4.8,6,9,12,18,24,30,60,72,90,120,150],units:"מ"מ/ שעה",is_gradient:!1}},Lang={"Enter an address or place":"הקלד כתובת, ישוב או מקום",get:function(E,e){if("get"!=E&&E in Lang){e||(e="full");let A=Lang[E];if("string"==typeof A)return A;if(e in A)return A[e];if(A.full)return A.full}return E}};
// menu.js v3.2 //
const Menu={init:function(){var e=$("#bt-menu"),t=e.find("a.bt-menu-trigger"),n=e.find("li a"),resetMenu=function(){e.removeClass("bt-menu-open"),e.addClass("bt-menu-close")},close=function(){resetMenu(),o.off("touchstart click",close)},o=$("
");o.addClass("bt-overlay"),e.append(o),t.on("touchstart mousedown",(function(t){t.stopImmediatePropagation(),t.preventDefault(),e.hasClass("bt-menu-open")?resetMenu():(e.removeClass("bt-menu-close"),e.addClass("bt-menu-open"),o.on(t.type,close))}));let a="";if(window.location.search&&window.location.search.length>0){let e=new URLSearchParams(window.location.search);null!=e.get("_")&&e.delete("_"),e.size>0&&(a="?"+e.toString())}let i=new RegExp("^https://(.+?).weather1.live/?$");n.each((function(){let e=$(this),t=e.prop("origin");if(!t)return;if(!i.test(t))return;let n=e.attr("href");e.attr("href",n+a)})),n.click((function(){e.hasClass("bt-menu-open")&&resetMenu()}))}};
// progressbar.js //
function ProgressBar(t,s){var e=t===s?1:s,n=t===s?0:t,r=null;this.setProgress=function(t){te&&(t=e);var s=(t-n)/(e-n)*100;null!==r&&(r.style.width=s+"%")},this.setProgressFillId=function(t){r=document.getElementById(t)}};
// ImageAnimation.v5.4.js //
function ImageAnimation(n){var t=this,i=!1,e="stopped",s=0,u=!1,o=.6,r=0,a=0,p=.05,f=5.05,c=0,_changeCallback=function(){},_showImg=function(n){let t=c;c=n,_changeCallback(n,t)};this.resetAll=function(n){n&&(_changeCallback=function(){}),t.stop(!0),t.setInterval(.6)},this.setInitIndex=function(n){t.isRunning()&&t.pause(),a=n,t.stop()},this.getInitIndex=function(){return a},this.getState=function(){return e},this.onChange=function(n){n&&"function"==typeof n&&(_changeCallback=n,t.stop())},this.run=function(n){i&&(t.isRunning()||(arguments.length>0&&t.setInterval(n),0===s&&"playing"!==e&&(s=window.setInterval(showNextImg,parseInt(1e3*o)),e="playing")))},this.runOnce=function(n){u=!0,t.run(n)},this.stop=function(n){if(i){t.isRunning()&&t.pause();var s=_changeCallback;n&&(_changeCallback=function(){}),_showImg(a),n&&(_changeCallback=s),u=!1,e="stopped"}},this.pause=function(){i&&(t.isPaused()||(window.clearInterval(s),s=0,e="paused"))},this.jumpBy=function(n,e){!i||arguments.length<1||(n=parseInt(n),t.jumpTo(c+n))},this.jumpTo=function(n,e){!i||arguments.length<1||t.isRunning()&&!e||(n=parseInt(n))<0||n>t.getLastIndex()||(n!==c||e)&&_showImg(n)},this.jumpToFirst=function(n){t.jumpTo(0,n)},this.jumpToLast=function(n){t.jumpTo(t.getLastIndex(),n)},this.jumpToInit=function(n){t.jumpTo(a,n)},this.isRunning=function(){return!!i&&(s>0&&"playing"===e)},this.isPlaying=function(){return t.isRunning()},this.isPaused=function(){return!t.isRunning()&&"paused"===e},this.isStopped=function(){return!!i&&(!t.isRunning()&&"stopped"===e)},this.getImageCount=function(){return r},this.getLastIndex=function(){return r-1},this.getCurrentImageIndex=function(){return c},this.setInterval=function(n){n=parseFloat(n),isNaN(n)||(n>f&&(n=f),nLeaflet',buttonClass:"",buttonTextClass:"icomoon icon-info",buttonText:""},initialize:function(t){L.Util.setOptions(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=L.DomUtil.create("div","leaflet-control-compactAttribution hide-when-fullscreen"),this.btn=L.DomUtil.create("a","button leaflet-bar-part",this._container),this._addClasses(this.btn,this.options.buttonClass),this._btnText=L.DomUtil.create("span","button-text",this.btn),this._addClasses(this._btnText,this.options.buttonTextClass),this.options.buttonText.length&&this._btnText.appendChild(document.createTextNode(this.options.buttonText)),this._attribNode=L.DomUtil.create("span","attribution-text",this._container),L.DomEvent.on(this.btn,"click",this._click,this),L.DomEvent.disableClickPropagation(this.btn);for(let e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},_addClasses:function(t,e){e.length&&(Array.isArray(e)||(e=e.split(/[ ,]+/)),t.classList.add(...e))},_update:function(){if(this._map){var t=[];for(let e in this._attributions)this._attributions[e]&&t.push(e);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._attribNode.innerHTML=e.join(" | ")}},onRemove:function(t){L.DomEvent.off(this.btn,"click",this._click,this)},_click:function(t){L.DomEvent.stopPropagation(t),L.DomEvent.preventDefault(t),this._container.classList.contains("show-attribution")?this._container.classList.remove("show-attribution"):this._container.classList.add("show-attribution")}}),L.control.compactAttribution=function(t){return new L.Control.CompactAttribution(t)},L.LatlonGrid=L.GeoJSON.extend({options:{style:{color:"#333",weight:1},futureMap:null,bounds:null,interval:20,labelClass:"latlonGrid-label",latLabelClass:"lat",lngLabelClass:"lng"},initialize:function(t){L.Util.setOptions(this,t),this._layers={},this.options.sphere?this.addData(this._getFrame()):this.addData(this.getGraticuleFeatures());var e=[],i=this.getBoundsAsJson();for(let t=0;t'+o+"°",className:this.options.labelClass+" "+this.options.latLabelClass});e.push(L.marker([o,t+.5],{icon:n}))}else for(let t=i.lat.min;t'+o+"°",className:this.options.labelClass+" "+this.options.lngLabelClass});e.push(L.marker([t+.5,o],{icon:n}))}}this._graticuleLabels=e,this.futureMap=this.options.futureMap},_graticuleLabels:[],_graticuleFeatures:null,getGraticuleFeatures:function(){return null==this._graticuleFeatures&&(this._graticuleFeatures=this._getGraticule()),this._graticuleFeatures},_boundsAsJson:null,getBoundsAsJson:function(){if(this._boundsAsJson)return this._boundsAsJson;var t={lat:{min:-90,max:90},lng:{min:-180,max:180}};if(this.options.bounds){var e=null;Array.isArray(this.options.bounds)?e=L.latLngBounds(this.options.bounds):this.options.bounds instanceof L.LatLngBounds&&(e=this.options.bounds),null!==e&&(t={lat:{min:e.getSouth(),max:e.getNorth()},lng:{min:e.getWest(),max:e.getEast()}})}return this._boundsAsJson=t,t},onAdd:function(t){for(let e=0;e0?"E":"W"):"Prime meridian",type:"meridian",value:s}));for(var o=i.lat.min;o<=i.lat.max;o+=e)t.push(this._getFeature(this._getParallel(o),{name:0!==o?o.toString()+"° "+(o>0?"N":"S"):"Equator",type:"parallel",value:o}));return{type:"FeatureCollection",features:t}},_getMeridian:function(t){var e=this.getBoundsAsJson();t=this._lngFix(t);for(var i=[],s=e.lat.min;s<=e.lat.max;s++)i.push([t,s]);return i},_getParallel:function(t){for(var e=this.getBoundsAsJson(),i=[],s=e.lng.min;s<=e.lng.max;s++)i.push([this._lngFix(s),t]);return i},_getFeature:function(t,e){return{type:"Feature",geometry:{type:"LineString",coordinates:t},properties:e}},_lngFix:function(t){return t>=180?179.999999:t<=-180?-179.999999:t}}),L.latlonGrid=function(t){return new L.LatlonGrid(t)},L.Control.Settings=L.Control.extend({options:{position:"topleft",title:"הגדרות",description:"הגדרות"},initialize:function(t){L.setOptions(this,t),this.click=t.onclick?t.onclick:function(){}},onAdd:function(t){var e=L.DomUtil.create("div","leaflet-control-settings leaflet-bar leaflet-control clickable");this.btn=L.DomUtil.create("a","leaflet-control-settings-button leaflet-bar-part",e);var i=L.DomUtil.create("span","icomoon icon-cog",this.btn);return this.btn.title=this.options.title,this.btn.href="#",i.title=this.options.title,L.DomEvent.on(this.btn,"click",this._click,this),e},onRemove:function(t){L.DomEvent.off(this.btn,"click",this._click,this)},_click:function(t){L.DomEvent.stopPropagation(t),L.DomEvent.preventDefault(t),this.click()}}),L.control.settings=function(t){return new L.Control.Settings(t)},L.Control.Fullscreen=L.Control.extend({options:{position:"topright",title:"מסך מלא",alt:"מסך מלא",description:"הגדל את שטח המפה"},initialize:function(t){L.setOptions(this,t),t.onclick=t.onclick?t.onclick:function(){},this.click=t.onclick},onAdd:function(t){var e=L.DomUtil.create("div","leaflet-control-fullscreen leaflet-bar leaflet-control clickable");this.btn=L.DomUtil.create("a","leaflet-control-fullscreen-button leaflet-bar-part",e);var i=L.DomUtil.create("span","icomoon icon-enlarge2",this.btn);this.btn.title=this.options.title,this.btn.alt=this.options.alt,this.btn.href="#",i.title=this.options.title,i.alt=this.options.alt;var s=this.click;return $(this.btn).on("touchstart click",(function(t){"touchstart"==t.type?$(this).off("click"):"click"==t.type&&$(this).off("touchstart"),t.stopPropagation(),t.preventDefault(),s()})),e},onRemove:function(t){$(this.btn).off("touchstart click")},_click:function(t){L.DomEvent.stopPropagation(t),L.DomEvent.preventDefault(t),this.click()}}),L.control.fullscreen=function(t){return new L.Control.Fullscreen(t)},L.Control.RadarSwitch=L.Control.extend({options:{position:"topright",title:"החלף סוג מכם",alt:"",description:"החלף בין מכם 5-דקתי לבין מכם משולב מדידות מהשטח"},initialize:function(t){if(L.setOptions(this,t),!t.radars)throw new Error("Must specify at least one radar.");this.click=t.onclick?t.onclick:function(){}},onAdd:function(t){var e=L.DomUtil.create("div","leaflet-control-radarSwitch leaflet-bar leaflet-control");this.btns={};for(let t=0;t-1?this.options.supportsSuggest=!0:this.options.supportsSuggest=!1,this.options.customParam=e.singleLineAddressField.name)}),this)}});var l=t.Evented.extend({options:{zoomToResult:!0,useMapBounds:12,searchBounds:null},initialize:function(e,i){if(t.Util.setOptions(this,i),this._control=e,!i||!i.providers||!i.providers.length)throw new Error("You must specify at least one provider");this._providers=i.providers},_geocode:function(e,i,s){var o,n=0,a=[],r=t.Util.bind((function(t,i){n--,t||(i&&(a=a.concat(i)),n<=0&&(o=this._boundsFromResults(a),this.fire("results",{results:a,bounds:o,latlng:o?o.getCenter():void 0,text:e},!0),this.options.zoomToResult&&o&&this._control._map.fitBounds(o),this.fire("load")))}),this);if(i)n++,s.results(e,i,this._searchBounds(),r);else for(var l=0;l=0;n--){var a=e[n];o.push(a.latlng),a.bounds&&a.bounds.isValid()&&!a.bounds.equals(i)&&s.push(a.bounds)}for(var r=t.latLngBounds(o),l=0;l0&&(this._suggestions.style.display="block");for(var n=[],a=0;a1&&i!==r.provider.options.label&&((o=t.DomUtil.create("div","geocoder-control-header",r.provider._contentsElement)).textContent=r.provider.options.label,o.innerText=r.provider.options.label,i=r.provider.options.label),s||(s=t.DomUtil.create("ul","geocoder-control-list",r.provider._contentsElement)),-1===n.indexOf(r.text)){var l=t.DomUtil.create("li","geocoder-control-suggestion",s);l.innerHTML=r.text,l.provider=r.provider,l["data-magic-key"]=r.magicKey,l.unformattedText=r.unformattedText}else for(var h=0;h-1&&(this._suggestions.style.maxHeight=this._map.getSize().y-this._suggestions.offsetTop-this._wrapper.offsetTop-10+"px"),this.getPosition().indexOf("bottom")>-1&&this._setSuggestionsBottomPosition()},_setSuggestionsBottomPosition:function(){this._suggestions.style.maxHeight=this._map.getSize().y-this._map._controlCorners[this.getPosition()].offsetHeight-this._wrapper.offsetHeight+"px",this._suggestions.style.top=-this._suggestions.offsetHeight-this._wrapper.offsetHeight+20+"px"},_boundsFromResults:function(e){if(e.length){for(var i=t.latLngBounds([0,0],[0,0]),s=[],o=[],n=e.length-1;n>=0;n--){var a=e[n];o.push(a.latlng),a.bounds&&a.bounds.isValid()&&!a.bounds.equals(i)&&s.push(a.bounds)}for(var r=t.latLngBounds(o),l=0;l-1&&this._setSuggestionsBottomPosition(),i||this._clearAllSuggestions())},_setupClick:function(){t.DomUtil.addClass(this._wrapper,"geocoder-control-expanded"),this._input.focus()},disable:function(){this._input.disabled=!0,t.DomUtil.addClass(this._input,"geocoder-control-input-disabled"),t.DomEvent.removeListener(this._wrapper,"click",this._setupClick,this)},enable:function(){this._input.disabled=!1,t.DomUtil.removeClass(this._input,"geocoder-control-input-disabled"),t.DomEvent.addListener(this._wrapper,"click",this._setupClick,this)},getAttribution:function(){for(var t=[],e=0;e=2?(this._geosearchCore._geocode(this._input.value,void 0),this.clear()):1===o.length?(t.DomUtil.addClass(o[0],"geocoder-control-selected"),this._geosearchCore._geocode(o[0].innerHTML,o[0]["data-magic-key"],o[0].provider)):(this.clear(),this._input.blur()),t.DomEvent.preventDefault(e);break;case 38:n&&t.DomUtil.removeClass(n,"geocoder-control-selected");var r=o[s-1];n&&r?t.DomUtil.addClass(r,"geocoder-control-selected"):t.DomUtil.addClass(o[o.length-1],"geocoder-control-selected"),t.DomEvent.preventDefault(e);break;case 40:n&&t.DomUtil.removeClass(n,"geocoder-control-selected");var l=o[s+1];n&&l?t.DomUtil.addClass(l,"geocoder-control-selected"):t.DomUtil.addClass(o[0],"geocoder-control-selected"),t.DomEvent.preventDefault(e);break;default:for(var h=0;h=0;n--){var a=e.features[n];o.push({text:this.options.formatSuggestion.call(this,a),unformattedText:a.properties[this.options.searchFields[0]],magicKey:a.id})}i(t,o.slice(0,this.options.maxResults))}}),this)},results:function(e,i,s,o){var n=this._resultsQuery;return i?(delete n.params.where,n.featureIds([i])):n.where(this._buildQuery(e)),s&&n.within(s),n.run(t.Util.bind((function(t,e){for(var i=[],s=0;s=0;i--){var s='upper("'+this.options.searchFields[i]+'")';if("contain"===this.options.searchMode)e.push(s+" LIKE upper('%"+t+"%')");else if("startWith"===this.options.searchMode)e.push(s+" LIKE upper('"+t+"%')");else if("endWith"===this.options.searchMode)e.push(s+" LIKE upper('%"+t+"')");else{if("strict"!==this.options.searchMode)throw new Error('L.esri.Geocoding.featureLayerProvider: Invalid parameter for "searchMode". Use one of "contain", "startWith", "endWith", or "strict"');e.push(s+" LIKE upper('"+t+"')")}}return this.options.where?this.options.where+" AND ("+e.join(" OR ")+")":e.join(" OR ")},_featureBounds:function(e){var i=t.geoJson(e);if("Point"===e.geometry.type){var s=i.getBounds().getCenter(),o=this.options.bufferRadius/40075017*360/Math.cos(180/Math.PI*s.lat),n=this.options.bufferRadius/40075017*360;return t.latLngBounds([s.lat-n,s.lng-o],[s.lat+n,s.lng+o])}return i.getBounds()}});e.MapService.extend({options:{layers:[0],label:"Map Service",bufferRadius:1e3,maxResults:5,formatSuggestion:function(t){return t.properties[t.displayFieldName]+" "+t.layerName+" "}},initialize:function(t){e.MapService.prototype.initialize.call(this,t),this._getIdFields()},suggestions:function(t,e,i){return this.find().text(t).fields(this.options.searchFields).returnGeometry(!1).layers(this.options.layers).run((function(t,e,s){var o=[];if(!t){var n=Math.min(this.options.maxResults,e.features.length);s.results=s.results.reverse();for(var a=0;a0&&!t.latlng.equals(this._clickedPoints[this._clickedPoints.length-2])){this._movingLatLong&&L.polyline([this._clickedPoints[this._clickCount-1],this._movingLatLong],this.options.lineStyle).addTo(this._polylineLayer),this._totalLength+=this._result.Distance;var e="";if(this._clickCount>1?e+=''+this.options.lengthUnit.label+' '+this._totalLength.toFixed(this.options.lengthUnit.decimal)+''+this.options.lengthUnit.display+" ":e+=''+this.options.lengthUnit.label+' '+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+''+this.options.lengthUnit.display+" ",e+=''+this.options.angleUnit.label+' '+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+''+this.options.angleUnit.display+" ",L.circleMarker(this._clickedLatLong,this.options.circleMarker).bindTooltip(e,{permanent:!0,className:"result-tooltip"}).addTo(this._pointLayer).openTooltip(),!this.options.isPolyline)return this._clickCount++,void this._closePath()}this._clickCount++},_moving:function(t){var e;this._clickedLatLong&&(L.DomEvent.off(this._container,"click",this._toggleMeasure,this),this._movingLatLong=t.latlng,this._tempLine&&(this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint)),this._addedLength=0,this._tempLine=L.featureGroup(),this._tempPoint=L.featureGroup(),this._tempLine.addTo(this._map),this._tempPoint.addTo(this._map),this._calculateBearingAndDistance(),this._addedLength=this._result.Distance+this._totalLength,L.polyline([this._clickedLatLong,this._movingLatLong],this.options.lineStyle).addTo(this._tempLine),e=this._clickCount>1?''+this.options.lengthUnit.label+' '+this._addedLength.toFixed(this.options.lengthUnit.decimal)+''+this.options.lengthUnit.display+' '+this.options.angleUnit.label+' '+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+''+this.options.angleUnit.display+' (+'+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+")
":''+this.options.lengthUnit.label+' '+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+''+this.options.lengthUnit.display+' '+this.options.angleUnit.label+' '+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+''+this.options.angleUnit.display+" ",L.circleMarker(this._movingLatLong,this.options.circleMarker).bindTooltip(e,{sticky:!0,offset:L.point(0,-40),className:"moving-tooltip"}).addTo(this._tempPoint).openTooltip())},_escape:function(t){27===t.keyCode&&(this._clickCount>0?this._closePath():(this._choice=!0,this._toggleMeasure()))},_calculateBearingAndDistance:function(){var t=this._clickedLatLong.lat,e=this._clickedLatLong.lng,i=this._movingLatLong.lat,s=this._movingLatLong.lng,o=Math.PI/180,n=Math.sin((s-e)*o)*Math.cos(i*o),a=Math.cos(t*o)*Math.sin(i*o)-Math.sin(t*o)*Math.cos(i*o)*Math.cos((s-e)*o),r=Math.atan2(n,a)*((this.options.angleUnit.factor?this.options.angleUnit.factor/2:180)/Math.PI);r+=r<0?this.options.angleUnit.factor?this.options.angleUnit.factor:360:0;var l=this.options.lengthUnit.factor?6371*this.options.lengthUnit.factor:6371,h=(i-t)*o,c=(s-e)*o,u=Math.sin(h/2)*Math.sin(h/2)+Math.cos(t*o)*Math.cos(i*o)*Math.sin(c/2)*Math.sin(c/2),p=l*(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)));this._result={Bearing:r,Distance:p}},_closePath:function(){this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint),this._clickCount<=1&&this._map.removeLayer(this._pointLayer),this._choice=!1,L.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._toggleMeasure()}}),L.control.ruler=function(t){return new L.Control.Ruler(t)},L.RainImagesOverlay=L.Layer.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:"",bounds:[[29,31],[34,37]],emptyImg:"/res/img/empty_16.png",onEachImageLoaded:function(){},onAllImagesLoaded:function(){}},initialize:function(t,e,i){i=i||{},this._imagesUrls=t,i.bounds=i.bounds?i.bounds:e,i.bounds=Array.isArray(i.bounds)?i.bounds:void 0,"function"!=typeof i.onEachImageLoaded&&(i.onEachImageLoaded=function(){}),"function"!=typeof i.onAllImagesLoaded&&(i.onAllImagesLoaded=function(){}),L.setOptions(this,i),this._bounds=L.latLngBounds(this.options.bounds)},onAdd:function(){this._imagesCont||(this._initImages(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(L.DomUtil.addClass(this._imagesCont,"leaflet-interactive"),this.addInteractiveTarget(this._imagesCont)),this.getPane().appendChild(this._imagesCont),this._reset()},onRemove:function(){this.getPane().removeChild(this._imagesCont),this.options.interactive&&this.removeInteractiveTarget(this._imagesCont)},setOnEachImageLoaded:function(t){return"function"==typeof t&&(this.options.onEachImageLoaded=t),this},setOnAllImagesLoaded:function(t){return"function"==typeof t&&(this.options.onAllImagesLoaded=t),this},setOpacity:function(t){return null==t||null==t||parseFloat(t)!=t||(this.options.opacity=t,this._updateOpacity()),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&L.DomUtil.toFront(this._imagesCont),this},bringToBack:function(){return this._map&&L.DomUtil.toBack(this._imagesCont),this},setUrl:function(t){if(t&&Array.isArray(t))for(this._imagesUrls=t,i=0;i=s&&_callOnceGlobalCallback()},loadCallback=function(t){o++;var i=t.target?t.target:t.srcElement;parseInt(i.getAttribute("data-index"));hideImage(i),removeListeners(i),e.onEachImageLoaded(o-1),o>=s&&_callOnceGlobalCallback()};for(let o=0;oONLINE_LIMIT}}var e={};RADAR_TYPES.NORMAL&&(e.NORMAL=new Radar("NORMAL","מכם רגיל",[[29.43,31.92],[34.49894896665839,37.746]])),RADAR_TYPES.NEW&&(e.NEW=new Radar("NEW","מכם ברמת דיוק גבוהה",[[29.4,31.92],[34.56,37.746]])),RADAR_TYPES.COMPOSITE&&(e.COMPOSITE=new Radar("COMPOSITE","מכם משולב",[[34.5078463729,37.8574239563],[29.4373462909,31.9347389087]]));var t=TEMP.GET_IMAGES_TOKEN,a=TEMP.GET_IMAGES_TOKEN_ENDTIME;TEMP="",delete TEMP;var s=!1;if(SEARCH_PARAMS){let e=SEARCH_PARAMS.get("old");null!=e&&"1"==e&&(s=!0)}parseInt("0");var n=Cookies.get("radar_type"),o=n=void 0!==n&&n in e?n:"NORMAL",r=!1,l=!1,d=e[o].getImages(),c=e[o].getTimestamps(),isAllRadarsClosed=function(){for(type in e)if(!e[type].isClosed())return!1;return!0};async function getImagesJson(i){var s=-1,n=-1,o=-1;if(i){let e=i.get("days");null!=e&&(s=parseInt(e));let t=i.get("hours");null!=t&&(n=parseInt(t));let a=i.get("n");null!=a&&(o=parseInt(a))}let r={};for(type in e){r[type]={};let t=e[type].getTimestamps();r[type].last_ts=t&&t.length>1?t[t.length-1]:0}var l={action:"get-new-images",data:r,token:t,expires:a};s>0&&(l.days=s),n>0&&(l.hours=n),o>0&&(l.n=o);return await fetch("/api/get-radar.php",{method:"POST",mode:"same-origin",cache:"no-store",credentials:"same-origin",headers:{Accept:"application/json, text/plain","Content-Type":"application/json; charset=utf-8"},redirect:"follow",referrerPolicy:"same-origin",body:JSON.stringify(l)}).then((e=>{if(!e.ok)throw new Error(""+e.status);return e.json()}),(e=>{throw Log.error("reason:"),Log.error(e),new Error("0")}))}var m=parseFloat(Cookies.get("radar_center_lat"));m=isNaN(m)?CENTER_LAT_DEFAULT:m;var p=parseFloat(Cookies.get("radar_center_lng"));p=isNaN(p)?CENTER_LNG_DEFAULT:p;var g=parseInt(Cookies.get("radar_zoom"));g=isNaN(g)?ZOOM_DEFAULT:g;var u=parseInt(Cookies.get("map_layers_translucency_pct"));u=(u=isNaN(u)?30:u)>0&&u<=100?u:30;var h=Cookies.get("map_show_graticules"),f=L.latLngBounds(L.latLng(22,25),L.latLng(42,45));var v=parseFloat(Cookies.get("radar_anim_interval"));v=isNaN(v)?.4:v,Log.info(v);var y=Cookies.get("radar_anim_fade_anim");y=void 0===y||1==parseInt(y);var C=Cookies.get("radar_map_tiles");C=void 0===C?"WorldTopoMap":C;var I,E=$(window),_=(E.width(),E.height(),null),b=v,T=$("#header"),A=$("#main"),M=($("#footer"),$("#anim-controls"),$(".md-modal-close,.md-content .x,.md-modal-background")),S=$("#anim-controls button"),k=$("#anim-controls .play").disable(),N=$("#anim-controls .plus").disable(),O=$("#anim-controls .minus").disable(),w=$("#anim-controls .settings").disable(),G=$("#anim-controls .reload").disable(),x=N.add(O).add(G),D=$("#anim-controls .image-slider-cont"),R=$("#anim-controls .image-slider"),H=$("#image-slider-handle"),P=$(".map-cont .loading-layer"),B=$(".map-cont .updating-layer"),W=$(".settings-layer"),Z=$("#settings-box"),F=$("#main .map-cont"),U=($(".map-cont .overlay"),$(".map-cont .error-layer")),Y=$("#image-time"),z=null,j=L.map("map",{center:[m,p],tapHold:!1,zoom:g,zoomControl:!1,fadeAnimation:!1,zoomAnimation:!0,zoomSnap:0,zoomDelta:.5,wheelPxPerZoomLevel:120,minZoom:5,maxBoundsViscosity:1,bounceAtZoomLimits:!1,preferCanvas:!0});j.setMaxBounds(f);var V=$("#map"),J=($("#map .time"),{WorldTopoMap:L.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",{updateWhenIdle:!0,updateWhenZooming:!1,updateInterval:400,minZoom:5,maxZoom:19}),satellite:[L.esri.basemapLayer("Imagery",{updateWhenIdle:!0,updateWhenZooming:!1,updateInterval:400,minZoom:5,maxZoom:17}),L.esri.basemapLayer("ImageryLabels",{updateWhenIdle:!0,updateWhenZooming:!1,updateInterval:400,minZoom:5,maxZoom:17})],darkgray:[L.esri.basemapLayer("DarkGray",{updateWhenIdle:!0,updateWhenZooming:!1,updateInterval:400,minZoom:5,maxZoom:16}),L.esri.basemapLayer("DarkGrayLabels",{updateWhenIdle:!0,updateWhenZooming:!1,updateInterval:400,minZoom:5,maxZoom:16})]});const K={WorldTopoMap:"רגילה",satellite:"לווין",darkgray:"כהה"},q={WorldTopoMap:!1,satellite:!0,darkgray:!0};var Q=C in J?C:"WorldTopoMap",X=J[Q];if(Array.isArray(X))for(let e=0;e'),t=$(' ');t.prop({id:"set-tiles-"+te,value:tilesName});let a=$(''+K[tilesName]+" ");e.append(t,a),ee.append(e)}q[Q]&&F.addClass("dark-mode");var ae=L.control.compactAttribution();ae.addTo(j),ae.addAttribution('Tiles: Esri, HERE, Garmin, USGS, Intermap, Increment P, GEBCO, FAO, NPS, NRCan, METI, GeoBase, IGN, Kadaster NL, Ordnance Survey, NGCC, OpenStreetMap contributors, GIS User Community | התחזית ישראל © 2022 '),L.control.watermark().addTo(j);var ie=L.control.dataScale().addTo(j);j.on("contextmenu",(function(e){})),j.on("zoomend",(function(){var e=j.getZoom();Cookies.set("radar_zoom",""+e,{expires:365,secure:!0,sameSite:"lax"})})),j.on("moveend",(function(){var e=j.getCenter();Cookies.set("radar_center_lat",""+e.lat,{expires:365,secure:!0,sameSite:"lax"}),Cookies.set("radar_center_lng",""+e.lng,{expires:365,secure:!0,sameSite:"lax"})})),$(".current-year").text((new Date).getFullYear());var se=Z.find(".speed-cont input[type=radio]"),ne=Z.find(".tiles-cont input[type=radio]"),oe=Z.find("#set-graticules"),re=$("#layers-opacity-val"),le=Z.find("#layers-opacity").rangeslider({polyfill:!1,onInit:function(){re.text(this.value+"%")}}).on("input",(function(e){re.text(this.value+"%")})),de=!1,_closeSettingsBox=function(e){w.removeClass("active"),T.add(A).removeClass("blur"),W.css({visibility:"hidden",opacity:"0"}),e&&_saveSettings(),enableButtons(!0,w),de=!1},toggleSettingsBox=function(){de?_closeSettingsBox():(animStop(),enableButtons(!1,w),w.addClass("active"),T.add(A).addClass("blur"),_loadSettings(),W.css({visibility:"visible",opacity:"1"}),de=!0)};Z.find(".x").click((function(){_closeSettingsBox()})),$("#save-settings").click((function(){_closeSettingsBox(!0)})),W.find(".bg").click((function(){_closeSettingsBox()}));var _saveSettings=function(){var e=se.filter(":checked");if(e.length>0){var t=parseFloat(e.val());t&&!isNaN(t)&&(I.setInterval(t),b=t,Cookies.set("radar_anim_interval",""+r,{expires:365,secure:!0,sameSite:"lax"}))}var a=ne.filter(":checked");if(a.length>0){var s=a.val();if(Q!==s){var n=J[Q];if(Array.isArray(n))for(i=0;i0){let t=e[o].getBounds();_.setBounds(t);var s="",n=e[o].getTimeStrings();s=a>=0&&a=d.length)return!1;var t={};return t=CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_VISIBILITY?{visibility:"visible"}:CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_POSITION?{top:"0px"}:CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_HEIGHT?{height:""}:CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_DISPLAY?{display:""}:CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_OPACITY?{opacity:""}:{visibility:"visible"},$("#map .rain-img-"+e).css(t),!0},_hideImg=function(e){if(isNaN(e))return!0;if(e<0||e>=d.length)return!1;var t={};return t=CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_VISIBILITY?{visibility:"hidden"}:CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_POSITION?{top:"-10000px"}:CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_HEIGHT?{height:"0px"}:CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_DISPLAY?{display:"none"}:CHANGE_IMAGE_MODE==CHANGE_IMAGE_MODE_OPACITY?{opacity:"0"}:{visibility:"hidden"},$("#map .rain-img-"+e).css(t),!0};function hideCurrentImg(){if(l)return!1;l=!0;var e=_hideImg(I.getCurrentImageIndex());return l=!1,e}function showInitImage(){!function showImg(e){if(l)return!1;l=!0;var t=_showImg(e);return l=!1,t}(I.getInitIndex())}var ue=new function ScreenshotPopup(){var e=$("#screenshot-popup"),t=$("#screenshot-image"),a=$("#screenshot-popup .loader-cont"),i=$("#screenshot-popup .viewport"),s=$("#screenshot-popup .error-cont"),n=$("#screenshot-popup .save"),o=this;this.init=function(){n.click((e=>{o.save()}))},this.beforeTakeScreen=function(){$(".screenshot-only").addClass("visible");var e=Y.html();$(".screenshot-time").html(e)},this.afterTakeScreen=function(){$(".screenshot-only").removeClass("visible")},this.open=function(){o.removeImage(),n.disable(),n.addClass("disabled"),i.addClass("hidden"),s.addClass("hidden"),a.removeClass("hidden"),e.addClass("md-show"),M.one("click",(function(){o.close(),M.off("click")}))},this.close=function(){e.removeClass("md-show"),i.addClass("hidden"),s.addClass("hidden"),a.addClass("hidden")},this.save=function(){n.disable(),n.addClass("disabled"),setTimeout((function(){n.removeClass("disabled"),n.enable()}),3e3)},this.setImage=function(e){if(e){t.prop({src:e});var a=n.get(0);if(e.startsWith("data:")){var i=e.indexOf(";");e="data:text/octet-stream"+e.substring(i)}a.href=e,a.download="radar-"+screenshotTimestampToTime(c[I.getCurrentImageIndex()])+".png"}},this.removeImage=function(){t.prop({src:""})},this.showImage=function(){a.addClass("hidden"),s.addClass("hidden"),i.removeClass("hidden"),n.removeClass("disabled"),n.enable()},this.error=function(e){e||(e="Screenshot failed!"),console.error(e),a.addClass("hidden"),i.addClass("hidden"),s.removeClass("hidden")},this.init()},loadMap=function(e){if(e||isAllRadarsClosed()){d=[],c=[],console.error("error: no images / radar closed.");var t='מכם השירות המטאורולוגי אינו זמין כעת. המכם שלנו יפעל אוטומטית ברגע שמכם השמט יחזור לפעילות. ';return e&&e.errorMsgHeb&&(t=e.errorMsgHeb),$("#error-msg").html(t),P.fadeTo(350,0,(function(){$(this).css({visibility:"hidden"})})),U.css({visibility:"visible"}).fadeTo(350,1),void(I=new ImageAnimation(0))}$(_.getElement()).css({opacity:""+(100-u)/100}),setChangeImageFadeTime(0),$(".disable-selection").disableSelection(),$(".new-window").newWindow(),P.fadeTo(350,0,(function(){$(this).css({display:"none"})})),V.css({visibility:"visible"}).fadeTo(350,1,(function(){initAnim(),D.css({visibility:"visible",opacity:"1"}),enableButtons(!0)}))},mapReload=function(){if(!r){r=!0,animStop(),hideCurrentImg(),enableButtons(!1);var t=G.children().first();t.addClass("spin");var _afterImagesLoaded=function(e){I.jumpToInit(!0),B.fadeTo(170,0,(function(){$(this).css({visibility:"hidden"}),t.removeClass("spin"),enableButtons(!0),r=!1,e&&e.errorMsgHeb&&Log.error(e.errorMsgHeb)}))};B.css({visibility:"visible"}).fadeTo(170,1,(function(){getImagesJson(SEARCH_PARAMS).then((t=>{var a=!1;for(type in t)if("access_level"!=type){if(t[type].images&&t[type].images.length>0&&t[type].timestamps.length>0){a=!0;var i=t[type].images,s=t[type].timestamps,n=t[type].folder;for(let e=0;e{if(Log.error(e),"403"===e.message)window.location.reload(!0);else _afterImagesLoaded({errorMsgHeb:"חלה שגיאת שרת בניסיון לטעון את תמונות המכם. רענן את הדף או נסה שוב מאוחר יותר."})}))}))}};G.click(mapReload);!s&&AUTO_RELOAD&&window.setInterval(mapReload,RELOAD_EVERY);var animStop=function(){I&&!I.isStopped()&&(setChangeImageFadeTime(0),I.stop(),k.find(".icomoon").removeClass("icon-pause2").addClass("icon-play3"),x.enable())},animPause=function(){I&&I.isPlaying()&&(setChangeImageFadeTime(0),I.pause(),k.find(".icomoon").removeClass("icon-pause2").addClass("icon-play3"),x.enable())},animPlayPauseToggle=function(){I&&(I.isPlaying()?animPause():I&&!I.isPlaying()&&(Log.info("animInterval is "+b),I.run(),k.find(".icomoon").removeClass("icon-play3").addClass("icon-pause2"),x.disable()))},initAnim=function(){(I=new ImageAnimation(d.length)).setInterval(b);var t=I.getInitIndex(),a="",i=e[o].getTimeStrings();a=t>=0&&t=100?H.addClass("large-number"):H.removeClass("large-number")},slide:function(e,t){animPause(),I.jumpTo(t.value)},change:function(e,t){}}),I.onChange((function(t,a){!function changeImage(e,t){return!l&&(l=!0,Log.info(`changing from ${t} to ${e}`),_showImg(e),t!==e&&_hideImg(t),l=!1,!0)}(t,a),R.slider("value",t);var i="",s=I.getImageCount();0==s?i="לא פעיל":(t>=s&&(t=s-1),i=e[o].getTimeString(t)),Y.html(i),H.text(t+1),t+1>=100?H.addClass("large-number"):H.removeClass("large-number")})),document.addEventListener("keydown",(function(e){"d"!==e.key&&"D"!==e.key?"a"!==e.key&&"A"!==e.key?" "!==e.key||k.click():O.click():N.click()}))},he=L.latlonGrid({futureMap:j,interval:1,bounds:f,style:{color:"#666",weight:1,opacity:.6,dashArray:[4,12],fill:!1},labelClass:"latlonGrid-label",latLabelClass:"lat",lngLabelClass:"lng"});"1"!==h&&"true"!==h||he.show(),getImagesJson(SEARCH_PARAMS).then((t=>{for(type in t)if("access_level"!=type){if(t[type].images&&t[type].images.length>0&&t[type].timestamps.length>0){!0;var a=t[type].images,i=t[type].timestamps,s=t[type].folder;for(let e=0;e=0;t--){let a=L.divIcon({html:'
',className:"geosearch-marker"}),i=L.marker(e.results[t].latlng,{icon:a}),s=L.popup({closeOnClick:!1,content:e.results[t].text,className:"geosearch-popup"});if(p.addLayer(i),i.bindPopup(s).openPopup(),0==t){let e=[i.getLatLng()];j.flyToBounds(L.latLngBounds(e),{maxZoom:10})}}})),L.control.settings({position:"topleft",onclick:function(){toggleSettingsBox()}}).addTo(j),L.control.locate({locateOptions:{enableHighAccuracy:!0,maxZoom:11},position:"topleft",strings:{title:"מיקום",description:"מצא את מיקומך הנוכחי",metersUnit:"מטר",feetUnit:"רגל",popup:"אתה נמצא במרחק {distance} {unit} מנקודה זו לכל היותר",outsideMapBoundsMsg:"נראה שאתה ממוקם מחוץ לגבולות המפה בתצוגה זו"},keepCurrentZoomLevel:!0,flyTo:!0,cacheLocation:!0,drawCircle:!1,markerStyle:{weight:2,color:"#ddeeff",fill:!0,fillColor:"#2A93EE",fillOpacity:1},icon:"icomoon icon-target",iconLoading:"locate-loading",onLocationError:function(e,t){alert("הדפדפן שלך אינו תומך במציאת מיקומך, או שביטלת אפשרות זו.\nאם הינך גולש מאייפון או דפדפן סאפארי, יש לבצע את הפעולות הבאות:\nהגדרות > פרטיות > שירותי מיקום > סאפארי\nולשנות הגדרה זו לפעיל.\nלאחר שינוי ההגדרה יש לרענן את הדף.")}}).addTo(j),V.find(".leaflet-control-locate").get(0).classList.add("clickable","hide-when-fullscreen");var g=L.simpleMapScreenshoter({hidden:!1,preventDownload:!0,title:"שמור תמונה",position:"topleft",mimeType:"image/png"}).addTo(j);$("#map .leaflet-control-simpleMapScreenshoter").addClass("leaflet-bar clickable");var doScreenshot=function(){ue.open();var e={mimeType:"image/png",domtoimageOptions:{cacheBust:!0},screenName:"radar-"+screenshotTimestampToTime(c[I.getCurrentImageIndex()])};ue.beforeTakeScreen(),g.takeScreen("image",e).then((e=>{ue.afterTakeScreen(),ue.setImage(e),ue.showImage()})).catch((e=>{ue.afterTakeScreen(),ue.error(e)}))},u=!1,h=!1;window.addEventListener("keydown",(function(e){"Control"===e.key&&("ControlLeft"===e.code?u=!0:"ControlRight"===e.code&&(h=!0)),(u||h)&&"s"===e.key&&(e.preventDefault(),e.stopPropagation(),doScreenshot())})),window.addEventListener("keyup",(function(e){"Control"===e.key&&("ControlLeft"===e.code?u=!1:"ControlRight"===e.code&&(h=!1))})),j.on("simpleMapScreenshoter.click",doScreenshot);L.control.ruler({position:"topleft",lengthUnit:{factor:null,display:"קמ",decimal:2,label:"מרחק: "},angleUnit:{display:"°",decimal:0,factor:null,label:"כיוון: "}}).addTo(j)})).catch((e=>{if(Log.error(e),"403"===e.message)window.location.reload(!0);else loadMap({errorMsgHeb:"חלה שגיאת שרת בניסיון לטעון את תמונות המכם. רענן את הדף או נסה שוב מאוחר יותר."})}))}));
מהירות אנימציה
1 ×
2 ×
4 ×
6 ×
8 ×
10 ×
16 ×
מפת רקע
שכבות הגשם
שקיפות
30%
הגדרות נוספות
הצג קווי אורך ורוחב
החל
שעה: לא ידוע
מעדכן...
טוען מפה, אנא המתן...
חלה שגיאה. יש לרענן את הדף.