/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){n&&!(i=F.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length));for(a in r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)};function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||be(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=we(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s<o.length)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,I,i),a(o,n,W,i)):(o++,l.call(e,a(o,n,I,i),a(o,n,W,i),a(o,n,I,n.notifyWith))):(r!==I&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},X=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(X,"ms-").replace(U,V)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=w.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(M)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var J=new Q,K=new Q,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}K.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return K.hasData(e)||J.hasData(e)},data:function(e,t,n){return K.access(e,t,n)},removeData:function(e,t){K.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=K.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){K.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=K.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){K.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},se=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ae(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){s=w.event.handlers.call(this,t,l),n=0;while((o=s[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((a=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(a.namespace)||(t.handleObj=a,t.data=a.data,void 0!==(i=((w.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return De(this,e,t,n,r)},one:function(e,t,n,r){return De(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each(function(){w.event.remove(this,e,n,t)})}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}K.hasData(e)&&(s=K.access(e),u=w.extend({},s),K.set(t,u))}}function Me(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,y=t[0],v=g(y);if(v||p>1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,Oe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!J.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(qe,""),c,l))}return e}function Ie(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Me(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=ye(s,"script")).length>0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),$e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Be=new RegExp(oe.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Fe(e,t,n){var r,i,o,a,s=e.style;return(n=n||$e(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&We.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","Moz","ms"],Ye=r.createElement("div").style;function Qe(e){if(e in Ye)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ge.length;while(n--)if((e=Ge[n]+t)in Ye)return e}function Je(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Qe(e)||e),t}function Ke(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=w.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[a]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[a]+"Width",!0,i):s+=w.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=J.get(e,"fxshow");n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=J.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(y?"hidden"in y&&(g=y.hidden):y=J.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),J.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(ft(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=pt(this,w.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,at())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Yt=[],Qt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||w.expando+"_"+Et++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qt,"$1"+i):!1!==t.jsonp&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Yt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=A.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=xe([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=w.css(e,"position"),f=w(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=w.css(e,"top"),u=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||be})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return z(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),We.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return z(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)},t,a?i:void 0,a)}})}),w.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,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=g,w.isWindow=y,w.camelCase=G,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Jt=e.jQuery,Kt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Kt),t&&e.jQuery===w&&(e.jQuery=Jt),w},t||(e.jQuery=e.$=w),w});
;;
/*!
 * JavaScript Cookie v2.1.4
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
(function(factory){var registeredInModuleLoader=false;if(typeof define==='function'&&define.amd){define(factory);registeredInModuleLoader=true;}
if(typeof exports==='object'){module.exports=factory();registeredInModuleLoader=true;}
if(!registeredInModuleLoader){var OldCookies=window.Cookies;var api=window.Cookies=factory();api.noConflict=function(){window.Cookies=OldCookies;return api;};}}(function(){function extend(){var i=0;var result={};for(;i<arguments.length;i++){var attributes=arguments[i];for(var key in attributes){result[key]=attributes[key];}}
return result;}
function init(converter){function api(key,value,attributes){var result;if(typeof document==='undefined'){return;}
if(arguments.length>1){attributes=extend({path:'/'},api.defaults,attributes);if(typeof attributes.expires==='number'){var expires=new Date();expires.setMilliseconds(expires.getMilliseconds()+attributes.expires*864e+5);attributes.expires=expires;}
attributes.expires=attributes.expires?attributes.expires.toUTCString():'';try{result=JSON.stringify(value);if(/^[\{\[]/.test(result)){value=result;}}catch(e){}
if(!converter.write){value=encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);}else{value=converter.write(value,key);}
key=encodeURIComponent(String(key));key=key.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);key=key.replace(/[\(\)]/g,escape);var stringifiedAttributes='';for(var attributeName in attributes){if(!attributes[attributeName]){continue;}
stringifiedAttributes+='; '+attributeName;if(attributes[attributeName]===true){continue;}
stringifiedAttributes+='='+attributes[attributeName];}
return(document.cookie=key+'='+value+stringifiedAttributes);}
if(!key){result={};}
var cookies=document.cookie?document.cookie.split('; '):[];var rdecode=/(%[0-9A-Z]{2})+/g;var i=0;for(;i<cookies.length;i++){var parts=cookies[i].split('=');var cookie=parts.slice(1).join('=');if(cookie.charAt(0)==='"'){cookie=cookie.slice(1,-1);}
try{var name=parts[0].replace(rdecode,decodeURIComponent);cookie=converter.read?converter.read(cookie,name):converter(cookie,name)||cookie.replace(rdecode,decodeURIComponent);if(this.json){try{cookie=JSON.parse(cookie);}catch(e){}}
if(key===name){result=cookie;break;}
if(!key){result[name]=cookie;}}catch(e){}}
return result;}
api.set=api;api.get=function(key){return api.call(api,key);};api.getJSON=function(){return api.apply({json:true},[].slice.call(arguments));};api.defaults={};api.remove=function(key,attributes){api(key,'',extend(attributes,{expires:-1}));};api.withConverter=init;return api;}
return init(function(){});}));;var scripts=document.getElementsByTagName('script'),tarteaucitronPath=(document.currentScript||scripts[scripts.length-1]).src.split('?')[0],tarteaucitronForceCDN=(tarteaucitronForceCDN===undefined)?'':tarteaucitronForceCDN,tarteaucitronUseMin=(tarteaucitronUseMin===undefined)?'':tarteaucitronUseMin,cdn=(tarteaucitronForceCDN==='')?tarteaucitronPath.split('/').slice(0,-1).join('/')+'/':tarteaucitronForceCDN,alreadyLaunch=(alreadyLaunch===undefined)?0:alreadyLaunch,tarteaucitronForceLanguage=(tarteaucitronForceLanguage===undefined)?'':tarteaucitronForceLanguage,tarteaucitronForceExpire=(tarteaucitronForceExpire===undefined)?'':tarteaucitronForceExpire,tarteaucitronCustomText=(tarteaucitronCustomText===undefined)?'':tarteaucitronCustomText,tarteaucitronExpireInDay=(tarteaucitronExpireInDay===undefined||typeof tarteaucitronExpireInDay!=="boolean")?true:tarteaucitronExpireInDay,timeExpire=31536000000,tarteaucitronProLoadServices,tarteaucitronNoAdBlocker=false,tarteaucitronIsLoaded=false;var tarteaucitron={"version":1.17,"cdn":cdn,"user":{},"lang":{},"services":{},"added":[],"idprocessed":[],"state":{},"launch":[],"parameters":{},"isAjax":false,"reloadThePage":false,"events":{"init":function(){},"load":function(){},},"init":function(params){"use strict";var origOpen;tarteaucitron.parameters=params;if(alreadyLaunch===0){alreadyLaunch=1;if(window.addEventListener){window.addEventListener("load",function(){tarteaucitron.initEvents.loadEvent(false);},false);window.addEventListener("scroll",function(){tarteaucitron.initEvents.scrollEvent();},false);window.addEventListener("keydown",function(evt){tarteaucitron.initEvents.keydownEvent(false,evt);},false);window.addEventListener("hashchange",function(){tarteaucitron.initEvents.hashchangeEvent();},false);window.addEventListener("resize",function(){tarteaucitron.initEvents.resizeEvent();},false);}else{window.attachEvent("onload",function(){tarteaucitron.initEvents.loadEvent(true);});window.attachEvent("onscroll",function(){tarteaucitron.initEvents.scrollEvent();});window.attachEvent("onkeydown",function(evt){tarteaucitron.initEvents.keydownEvent(true,evt);});window.attachEvent("onhashchange",function(){tarteaucitron.initEvents.hashchangeEvent();});window.attachEvent("onresize",function(){tarteaucitron.initEvents.resizeEvent();});}
if(typeof XMLHttpRequest!=='undefined'){origOpen=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){if(window.addEventListener){this.addEventListener("load",function(){if(typeof tarteaucitronProLoadServices==='function'){tarteaucitronProLoadServices();}},false);}else if(typeof this.attachEvent!=='undefined'){this.attachEvent("onload",function(){if(typeof tarteaucitronProLoadServices==='function'){tarteaucitronProLoadServices();}});}else{if(typeof tarteaucitronProLoadServices==='function'){setTimeout(tarteaucitronProLoadServices,1000);}}
try{origOpen.apply(this,arguments);}catch(err){}};}}
if(tarteaucitron.events.init){tarteaucitron.events.init();}},"initEvents":{"loadEvent":function(isOldBrowser){tarteaucitron.load();tarteaucitron.fallback(['tarteaucitronOpenPanel'],function(elem){if(isOldBrowser){elem.attachEvent("onclick",function(event){tarteaucitron.userInterface.openPanel();event.preventDefault();});}else{elem.addEventListener("click",function(event){tarteaucitron.userInterface.openPanel();event.preventDefault();},false);}},true);},"keydownEvent":function(isOldBrowser,evt){if(evt.keyCode===27){tarteaucitron.userInterface.closePanel();}
if(isOldBrowser){if(evt.keyCode===9&&focusableEls.indexOf(evt.target)>=0){if(evt.shiftKey){if(document.activeElement===firstFocusableEl){lastFocusableEl.focus();evt.preventDefault();}}else{if(document.activeElement===lastFocusableEl){firstFocusableEl.focus();evt.preventDefault();}}}}},"hashchangeEvent":function(){if(document.location.hash===tarteaucitron.hashtag&&tarteaucitron.hashtag!==''){tarteaucitron.userInterface.openPanel();}},"resizeEvent":function(){var tacElem=document.getElementById('tarteaucitron');var tacCookieContainer=document.getElementById('tarteaucitronCookiesListContainer');if(tacElem&&tacElem.style.display==='block'){tarteaucitron.userInterface.jsSizing('main');}
if(tacCookieContainer&&tacCookieContainer.style.display==='block'){tarteaucitron.userInterface.jsSizing('cookie');}},"scrollEvent":function(){var scrollPos=window.pageYOffset||document.documentElement.scrollTop;var heightPosition;var tacPercentage=document.getElementById('tarteaucitronPercentage');var tacAlertBig=document.getElementById('tarteaucitronAlertBig');if(tacAlertBig&&!tarteaucitron.highPrivacy){if(tacAlertBig.style.display==='block'){heightPosition=tacAlertBig.offsetHeight+'px';if(scrollPos>(screen.height*2)){tarteaucitron.userInterface.respondAll(true);}else if(scrollPos>(screen.height/2)){document.getElementById('tarteaucitronDisclaimerAlert').innerHTML='<strong>'+tarteaucitron.lang.alertBigScroll+'</strong> '+tarteaucitron.lang.alertBig;}
if(tacPercentage){if(tarteaucitron.orientation==='top'){tacPercentage.style.top=heightPosition;}else{tacPercentage.style.bottom=heightPosition;}
tacPercentage.style.width=((100/(screen.height*2))*scrollPos)+'%';}}}},},"load":function(){"use strict";if(tarteaucitronIsLoaded===true){return;}
var cdn=tarteaucitron.cdn,language=tarteaucitron.getLanguage(),useMinifiedJS=((cdn.indexOf('cdn.jsdelivr.net')>=0)||(tarteaucitronPath.indexOf('.min.')>=0)||(tarteaucitronUseMin!=='')),pathToLang=cdn+'lang/tarteaucitron.'+language+(useMinifiedJS?'.min':'')+'.js',pathToServices=cdn+'tarteaucitron.services'+(useMinifiedJS?'.min':'')+'.js',linkElement=document.createElement('link'),defaults={"adblocker":false,"hashtag":'#tarteaucitron',"cookieName":'tarteaucitron',"highPrivacy":true,"orientation":"middle","bodyPosition":"bottom","removeCredit":false,"showAlertSmall":false,"showDetailsOnClick":true,"showIcon":true,"iconPosition":"BottomRight","cookieslist":false,"handleBrowserDNTRequest":false,"DenyAllCta":true,"AcceptAllCta":true,"moreInfoLink":true,"privacyUrl":"","useExternalCss":false,"useExternalJs":false,"mandatory":true,"mandatoryCta":true,"closePopup":false,"groupServices":false,"serviceDefaultState":'wait',"googleConsentMode":true,"partnersList":false},params=tarteaucitron.parameters;tarteaucitronIsLoaded=true;if(((tarteaucitron.parameters.readmoreLink!==undefined&&window.location.href==tarteaucitron.parameters.readmoreLink)||window.location.href==tarteaucitron.parameters.privacyUrl)&&tarteaucitron.parameters.orientation=="middle"){tarteaucitron.parameters.orientation="bottom";}
if(typeof tarteaucitronCustomPremium!=='undefined'){tarteaucitronCustomPremium();}
if(params!==undefined){for(var k in defaults){if(!tarteaucitron.parameters.hasOwnProperty(k)){tarteaucitron.parameters[k]=defaults[k];}}}
tarteaucitron.orientation=tarteaucitron.parameters.orientation;tarteaucitron.hashtag=tarteaucitron.parameters.hashtag;tarteaucitron.highPrivacy=tarteaucitron.parameters.highPrivacy;tarteaucitron.handleBrowserDNTRequest=tarteaucitron.parameters.handleBrowserDNTRequest;tarteaucitron.customCloserId=tarteaucitron.parameters.customCloserId;if(tarteaucitron.parameters.googleConsentMode===true){window.dataLayer=window.dataLayer||[];window.tac_gtag=function tac_gtag(){dataLayer.push(arguments);};window.tac_gtag('consent','default',{ad_storage:'denied',analytics_storage:'denied',ad_user_data:'denied',ad_personalization:'denied',wait_for_update:800});document.addEventListener('googleads_added',function(){if(tarteaucitron.added["gcmads"]===true){return;}
tarteaucitron.services.gcmads={"key":"gcmads","type":"ads","name":"Google Ads (personalized ads)","uri":"https://support.google.com/analytics/answer/9976101","needConsent":true,"cookies":[],"js":function(){},"fallback":function(){}};tarteaucitron.job.push('gcmads');var i,allowBtns=document.getElementsByClassName("tarteaucitronAllow"),denyBtns=document.getElementsByClassName("tarteaucitronDeny");for(i=0;i<allowBtns.length;i++){tarteaucitron.addClickEventToElement(allowBtns[i],function(){tarteaucitron.userInterface.respond(this,true);});}
for(i=0;i<denyBtns.length;i++){tarteaucitron.addClickEventToElement(denyBtns[i],function(){tarteaucitron.userInterface.respond(this,false);});}});document.addEventListener('gcmads_allowed',function(){tarteaucitron.setConsent('googleads',true);});document.addEventListener('gcmads_loaded',function(){window.tac_gtag('consent','update',{ad_user_data:'granted',ad_personalization:'granted'});});document.addEventListener('gcmads_allowed',function(){window.tac_gtag('consent','update',{ad_user_data:'granted',ad_personalization:'granted'});});document.addEventListener('gcmads_disallowed',function(){window.tac_gtag('consent','update',{ad_user_data:'denied',ad_personalization:'denied'});});document.addEventListener('googleads_loaded',function(){window.tac_gtag('consent','update',{ad_storage:'granted'});});document.addEventListener('googleads_allowed',function(){window.tac_gtag('consent','update',{ad_storage:'granted'});});document.addEventListener('googleads_disallowed',function(){tarteaucitron.setConsent('gcmads',false);window.tac_gtag('consent','update',{ad_storage:'denied'});});document.addEventListener('gtag_loaded',function(){window.tac_gtag('consent','update',{analytics_storage:'granted'});});document.addEventListener('gtag_allowed',function(){window.tac_gtag('consent','update',{analytics_storage:'granted'});});document.addEventListener('gtag_disallowed',function(){window.tac_gtag('consent','update',{analytics_storage:'denied'});});window.addEventListener('tac.root_available',function(){if(typeof tarteaucitron_block!=='undefined'){tarteaucitron_block.unblock(/www\.googletagmanager\.com\/gtag\/js/);tarteaucitron_block.unblock(/www\.googleadservices\.com\/pagead\/conversion/);tarteaucitron_block.unblock(/AW-/);tarteaucitron_block.unblock(/google-analytics\.com\/analytics\.js/);tarteaucitron_block.unblock(/google-analytics\.com\/ga\.js/);}});}
if(!tarteaucitron.parameters.useExternalCss){linkElement.rel='stylesheet';linkElement.type='text/css';linkElement.href=cdn+'css/tarteaucitron'+(useMinifiedJS?'.min':'')+'.css';document.getElementsByTagName('head')[0].appendChild(linkElement);}
tarteaucitron.addInternalScript(pathToLang,'',function(){if(tarteaucitronCustomText!==''){tarteaucitron.lang=tarteaucitron.AddOrUpdate(tarteaucitron.lang,tarteaucitronCustomText);}
tarteaucitron.addInternalScript(pathToServices,'',function(){if(tarteaucitron.orientation==='middle'){var customThemeMiddle=document.createElement('style'),cssRuleMiddle='div#tarteaucitronRoot.tarteaucitronBeforeVisible:before {content: \'\';position: fixed;width: 100%;height: 100%;background: white;top: 0;left: 0;z-index: 999;opacity: 0.5;}div#tarteaucitronAlertBig:before {content: \''+tarteaucitron.lang.middleBarHead+'\';font-size: 35px;}body #tarteaucitronRoot div#tarteaucitronAlertBig {width: 60%;min-width: 285px;height: auto;margin: auto;left: 50%;top: 50%;transform: translate(-50%, -50%);box-shadow: 0 0 9000px #000;border-radius: 20px;padding: 35px 25px;}span#tarteaucitronDisclaimerAlert {padding: 0 30px;}#tarteaucitronRoot span#tarteaucitronDisclaimerAlert {margin: 10px 0 30px;display: block;text-align: center;font-size: 21px;}@media screen and (max-width: 900px) {div#tarteaucitronAlertBig button {margin: 0 auto 10px!important;display: block!important;}}';customThemeMiddle.type='text/css';if(customThemeMiddle.styleSheet){customThemeMiddle.styleSheet.cssText=cssRuleMiddle;}else{customThemeMiddle.appendChild(document.createTextNode(cssRuleMiddle));}
document.getElementsByTagName('head')[0].appendChild(customThemeMiddle);}
if(tarteaucitron.parameters.groupServices==true){tarteaucitron.parameters.showDetailsOnClick=true;}
if(tarteaucitron.orientation==='popup'){var customThemePopup=document.createElement('style'),cssRulePopup='div#tarteaucitronAlertBig:before {content: \''+tarteaucitron.lang.middleBarHead+'\';font-size: 22px;}body #tarteaucitronRoot div#tarteaucitronAlertBig {bottom: 0;top: auto!important;left: 8px!important;right: auto!important;transform: initial!important;border-radius: 5px 5px 0 0!important;max-width: 250px!important;width: calc(100% - 16px)!important;min-width: 0!important;padding: 25px 0;}span#tarteaucitronDisclaimerAlert {padding: 0 30px;font-size: 15px!important;}#tarteaucitronRoot span#tarteaucitronDisclaimerAlert {margin: 10px 0 30px;display: block;text-align: center;font-size: 21px;}div#tarteaucitronAlertBig button {margin: 0 auto 10px!important;display: block!important;width: calc(100% - 60px);box-sizing: border-box;}';customThemePopup.type='text/css';if(customThemePopup.styleSheet){customThemePopup.styleSheet.cssText=cssRulePopup;}else{customThemePopup.appendChild(document.createTextNode(cssRulePopup));}
document.getElementsByTagName('head')[0].appendChild(customThemePopup);}
var body=document.body,div=document.createElement('div'),html='',index,orientation='Top',modalAttrs='',cat=['ads','analytic','api','comment','social','support','video','other','google'],i;cat=cat.sort(function(a,b){if(tarteaucitron.lang[a].title>tarteaucitron.lang[b].title){return 1;}
if(tarteaucitron.lang[a].title<tarteaucitron.lang[b].title){return-1;}
return 0;});html+='<div role="heading" aria-level="1" id="tac_title" class="tac_visually-hidden">'+tarteaucitron.lang.title+'</div>';html+='<div id="tarteaucitronPremium"></div>';if(tarteaucitron.reloadThePage){html+='<button type="button" id="tarteaucitronBack" aria-label="'+tarteaucitron.lang.close+' ('+tarteaucitron.lang.reload+')" title="'+tarteaucitron.lang.close+' ('+tarteaucitron.lang.reload+')"></button>';}else{html+='<button type="button" id="tarteaucitronBack" aria-label="'+tarteaucitron.lang.close+'" title="'+tarteaucitron.lang.close+'"></button>';}
html+='<div id="tarteaucitron" role="dialog" aria-modal="true" aria-labelledby="dialogTitle" tabindex="-1">';if(tarteaucitron.reloadThePage){html+='   <button type="button" id="tarteaucitronClosePanel" aria-label="'+tarteaucitron.lang.close+' ('+tarteaucitron.lang.reload+')" title="'+tarteaucitron.lang.close+' ('+tarteaucitron.lang.reload+')">';}else{html+='   <button type="button" id="tarteaucitronClosePanel">';}
html+='       '+tarteaucitron.lang.close;html+='   </button>';html+='   <div id="tarteaucitronServices">';html+='      <div class="tarteaucitronLine tarteaucitronMainLine" id="tarteaucitronMainLineOffset">';html+='         <span class="tarteaucitronH1" role="heading" aria-level="1" id="dialogTitle">'+tarteaucitron.lang.title+'</span>';html+='         <div id="tarteaucitronInfo">';html+='         '+tarteaucitron.lang.disclaimer;if(tarteaucitron.parameters.privacyUrl!==""){html+='   <br/><br/>';html+='   <button type="button" id="tarteaucitronPrivacyUrlDialog" role="link">';html+='       '+tarteaucitron.lang.privacyUrl;html+='   </button>';}
html+='         </div>';html+='         <div class="tarteaucitronName">';html+='            <span class="tarteaucitronH2" role="heading" aria-level="2">'+tarteaucitron.lang.all+'</span>';html+='         </div>';html+='         <div class="tarteaucitronAsk" id="tarteaucitronScrollbarAdjust">';html+='            <button type="button" id="tarteaucitronAllAllowed" class="tarteaucitronAllow">';html+='               <span class="tarteaucitronCheck" aria-hidden="true"></span> '+tarteaucitron.lang.allowAll;html+='            </button> ';html+='            <button type="button" id="tarteaucitronAllDenied" class="tarteaucitronDeny">';html+='               <span class="tarteaucitronCross" aria-hidden="true"></span> '+tarteaucitron.lang.denyAll;html+='            </button>';html+='         </div>';html+='      </div>';html+='      <div class="tarteaucitronBorder">';html+='         <div class="clear"></div><ul>';if(tarteaucitron.parameters.mandatory==true){html+='<li id="tarteaucitronServicesTitle_mandatory">';html+='<div class="tarteaucitronTitle">';if(tarteaucitron.parameters.showDetailsOnClick){html+='   <button type="button" tabindex="-1"><span class="tarteaucitronPlus" aria-hidden="true"></span> '+tarteaucitron.lang.mandatoryTitle+'</button>';}else{html+='   <span class="asCatToggleBtn">'+tarteaucitron.lang.mandatoryTitle+'</span>';}
html+='</div>';html+='<ul id="tarteaucitronServices_mandatory">';html+='<li class="tarteaucitronLine">';html+='   <div class="tarteaucitronName">';html+='       <span class="tarteaucitronH3" role="heading" aria-level="3">'+tarteaucitron.lang.mandatoryText+'</span>';html+='       <span class="tarteaucitronListCookies" aria-hidden="true"></span><br/>';html+='   </div>';if(tarteaucitron.parameters.mandatoryCta==true){html+='   <div class="tarteaucitronAsk">';html+='       <button type="button" class="tarteaucitronAllow" tabindex="-1" disabled>';html+='           <span class="tarteaucitronCheck" aria-hidden="true"></span> '+tarteaucitron.lang.allow;html+='       </button> ';html+='       <button type="button" class="tarteaucitronDeny" style="visibility:hidden" tabindex="-1">';html+='           <span class="tarteaucitronCross" aria-hidden="true"></span> '+tarteaucitron.lang.deny;html+='       </button> ';html+='   </div>';}
html+='</li>';html+='</ul></li>';}
for(i=0;i<cat.length;i+=1){html+='         <li id="tarteaucitronServicesTitle_'+cat[i]+'" class="tarteaucitronHidden">';html+='            <div class="tarteaucitronTitle" role="heading" aria-level="2">';if(tarteaucitron.parameters.showDetailsOnClick)
{html+='               <button type="button" class="catToggleBtn" aria-expanded="false" data-cat="tarteaucitronDetails'+cat[i]+'"><span class="tarteaucitronPlus" aria-hidden="true"></span> '+tarteaucitron.lang[cat[i]].title+'</button>';}else{html+='               <span class="asCatToggleBtn" data-cat="tarteaucitronInlineDetails'+cat[i]+'">'+tarteaucitron.lang[cat[i]].title+'</span>';}
html+='            </div>';html+='            <div id="tarteaucitronDetails'+cat[i]+'" class="tarteaucitronDetails '+(tarteaucitron.parameters.showDetailsOnClick?'tarteaucitronInfoBox':'tarteaucitronDetailsInline')+'">';html+='               '+tarteaucitron.lang[cat[i]].details;html+='            </div>';html+='         <ul id="tarteaucitronServices_'+cat[i]+'"></ul></li>';}
html+='             <li id="tarteaucitronNoServicesTitle" class="tarteaucitronLine">'+tarteaucitron.lang.noServices+'</li>';html+='         </ul>';html+='         <div class="tarteaucitronHidden tarteaucitron-spacer-20" id="tarteaucitronScrollbarChild"></div>';if(tarteaucitron.parameters.removeCredit===false){html+='     <a class="tarteaucitronSelfLink" href="https://tarteaucitron.io/" rel="nofollow noreferrer noopener" target="_blank" title="tarteaucitron '+tarteaucitron.lang.newWindow+'"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAAAeCAYAAAAWwoEYAAADl0lEQVRoge1Y0W3bQAx9CjKARlC+9GVUmqDJBHEmiDyB6wkcTxBngtgTxJ0gzgQW4C/9aYOmE6g4lTQo+k6y3Rb94QOERNQd+cjj8XiGwWAwGAwGg8FgMBgMBoPB8F8RNRXe+whEKe7c36ZCAeCRxC9Rig2PUd8kPgAsoxSfQ3YAzAA8D/HwYYCb05kBKKO0teFkmbC1jlKsAnq/Abjn+QBqAIsoRS30ttwG/HNz1wH/XIxWTicLdvtW7xTAGEAMtP685CNsBTe2d/BLydfXAG57SEnMAST0zgYZSUCPk02bCvkJduIzuJzDLfPolbY+tLKmar+/8+IRePy4qdpE03qHuH8fipFb4N2+XdA3AJ/0vaQxt7s9FvkIS2XvtqnwM0rxpOQfbnE5G2LhTCmUO2fHIngOmcv+KG3HafDchB6ntwjYqenR2PqC7sOZ3E7FXHB0vqxoFyUyLh7OEH7LOGouvhhN3eIBeKXv0n5MsufdHqXcwYR5U2EbpV35lSspVPJmQj4TcgRK7jTg5IzmPUhhwM5a2WHUFCx+NgiDucmgh7idikLovHFlL0pxQ9xzX+IIP9Y6FrJsqhjlQpZRAkFVDCjZfcCHt6bqJDmuh5ylCWx0RVnk3oumaknqTH5sqrY0fBWyULaHUIgAgxb46MxV3DbieAhxOxUxjSuljig9lMQ/Bcfoi9BTEv9aLORSndVxYOH525sUDC6u2gWxcNzBNRxPanyh3ktKinOgy3WoxPbtUM0t6RkbQnzBnFPgi9GCOEubY9UffIryz9iKRe8s/FUfEWosJJGxagp85bpUO3VywQ46lOtAWfNxKwa4JXQ+628+bpxYGXXMzp5rXH401VEyXwIdowXFaKWSMFHvMTVmGnc+P3oXV2QOiBCfgex8QtcQCbcQE/H+eoHzrkFo1KM7zVO4jVVj5s6lRiWF7zyXyfRMc97J3tzj87mYqZ7E2YjzUct9GUi4tjHLR8dVkBLjQcuHFleWvQfRNEhFR7uX7pkctOwvZXsft7sAtyldEUIN2UTeLxnEfxKYswzdi88BdbZ8hifUoSMftQvP+muRwN6+Q3DeqqRExP9QmTtcheiHh0Ot1x2i2km1bP9pbufw5zZdyWsOrh7vQae5OZWbsMv30pi7cd/CKj3coPEVaCP4Zhx4eQWhOZ1Y9MTXGyP8/iGjEyfa1T4fO/4Lea9vBoPBYDAYDAaDwWAwGAwGwz8GgF8siXCCbrSRhgAAAABJRU5ErkJggg==" alt="tarteaucitron.io" /></a>';}
html+='       </div>';html+='   </div>';html+='</div>';if(tarteaucitron.parameters.orientation==='bottom'){orientation='Bottom';}
if(tarteaucitron.parameters.orientation==='middle'||tarteaucitron.parameters.orientation==='popup'){modalAttrs=' role="dialog" aria-modal="true" aria-labelledby="tac_title"';}
if(tarteaucitron.parameters.highPrivacy&&!tarteaucitron.parameters.AcceptAllCta){html+='<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig'+orientation+'"'+modalAttrs+'>';html+='   <span id="tarteaucitronDisclaimerAlert" role="paragraph">';html+='       '+tarteaucitron.lang.alertBigPrivacy;html+='   </span>';html+='   <button type="button" id="tarteaucitronPersonalize" aria-label="'+tarteaucitron.lang.personalize+' '+tarteaucitron.lang.modalWindow+'" title="'+tarteaucitron.lang.personalize+' '+tarteaucitron.lang.modalWindow+'">';html+='       '+tarteaucitron.lang.personalize;html+='   </button>';if(tarteaucitron.parameters.privacyUrl!==""){html+='   <button role="link" type="button" id="tarteaucitronPrivacyUrl">';html+='       '+tarteaucitron.lang.privacyUrl;html+='   </button>';}
html+='</div>';}else{html+='<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig'+orientation+'"'+modalAttrs+'>';html+='   <span id="tarteaucitronDisclaimerAlert" role="paragraph">';if(tarteaucitron.parameters.highPrivacy){html+='       '+tarteaucitron.lang.alertBigPrivacy;}else{html+='       '+tarteaucitron.lang.alertBigClick+' '+tarteaucitron.lang.alertBig;}
html+='   </span>';html+='   <button type="button" class="tarteaucitronCTAButton tarteaucitronAllow" id="tarteaucitronPersonalize2">';html+='       <span class="tarteaucitronCheck" aria-hidden="true"></span> '+tarteaucitron.lang.acceptAll;html+='   </button>';if(tarteaucitron.parameters.DenyAllCta){if(tarteaucitron.reloadThePage){html+='   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny" id="tarteaucitronAllDenied2" aria-label="'+tarteaucitron.lang.denyAll+' ('+tarteaucitron.lang.reload+')" title="'+tarteaucitron.lang.denyAll+' ('+tarteaucitron.lang.reload+')">';}else{html+='   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny" id="tarteaucitronAllDenied2">';}
html+='       <span class="tarteaucitronCross" aria-hidden="true"></span> '+tarteaucitron.lang.denyAll;html+='   </button>';}
html+='   <button type="button" id="tarteaucitronCloseAlert" aria-label="'+tarteaucitron.lang.personalize+' '+tarteaucitron.lang.modalWindow+'" title="'+tarteaucitron.lang.personalize+' '+tarteaucitron.lang.modalWindow+'">';html+='       '+tarteaucitron.lang.personalize;html+='   </button>';if(tarteaucitron.parameters.privacyUrl!==""){html+='   <button type="button" id="tarteaucitronPrivacyUrl" role="link">';html+='       '+tarteaucitron.lang.privacyUrl;html+='   </button>';}
html+='</div>';html+='<div id="tarteaucitronPercentage"></div>';}
if(tarteaucitron.parameters.showIcon===true){html+='<div id="tarteaucitronIcon" class="tarteaucitronIcon'+tarteaucitron.parameters.iconPosition+'" style="display: block">';html+='   <button type="button" id="tarteaucitronManager" aria-label="'+tarteaucitron.lang.icon+' '+tarteaucitron.lang.modalWindow+'" title="'+tarteaucitron.lang.icon+' '+tarteaucitron.lang.modalWindow+'">';html+='       <img src="'+(tarteaucitron.parameters.iconSrc?tarteaucitron.parameters.iconSrc:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAGA0lEQVRoge1a207bWBRdBtJwLYZhKDMVmlSK1LxNkPo+ZH6g8B6p5AuALwC+APoFoVLeoT8whPeRSt+CZKmZVu3AiIsRlEtCktGyjy8xzuXYhvahS0JJHJ/4rLP3XnuffcAPfGdQ7mM6jRLSAF4BxqsbewB2lRS2o35mpEQaJcwCyANIdLi1DGBNSWEzqmdHRqRRwjqAJclhtExOSUEP+/xIiDRKhhUWfL7ShTtBuJnqcw+/z4Ql0xNmMEwSSz4kuNIzSgpjSsqYJP/GeE185wYJroedRyiLNEpGLLzzrHSuk+83SgbxvOcyyRaDziWsRVZkSRDinpzPbwVGWIucuohsKynMS47fAQyls/BMSRmKJo3AFhG5wm2N1wF+Zs3zebbFfR0RxrXcJHQlgH+LMW616pR/WiIMEXfW3mtzXyeEGWsjKot8c4TOI98L+iKaR5PS6IUk88RLAO9F8UjrbYoYMOosNavpfmODIiwRXRR/G3ohaWVo1RU/c30jV8ab2mV8qVGzHWBOLyTLZiWs5Rolg/C3ySOi0tXP/k4aEwOwSBKPJs7Rp16ABJTe+p1xVX0It/owqqdDEMRoqd3RFxqDPh20Ig6VEPVC0i5RSCD+6wl6HlW7GksSlUMV11/GrUs5NasFLusDE9ELSVphXemtJwaT/8JyIRvxNNCfBmIiNdR04LII3DSrbe0yjqvyJF/ppptqVlt+MCLCEh/oOkPPP6N38Mb5cnQBGFsEqmXg5j3QMwoMzwGnr4HYbybBq13gZAOom/FO63zdf2qQArCsZrUN2TlJy69eSDKYV+6Q4MpP75ivHzPA53ngaBW4eGuSOt0A/lsGPmXMz0+3TFJcTfFbPfFbfnwlhON+iQhlWmA82CQ4ocQ7c6KcfL3DHuls0yT6Sx4YnLXJDCQOIRRv5yGIJBgP8Sdisj2qubpc5UGJmo+W49ifVmzL8HcpGhQPvZCUKiCliIhEN0tr2OCqHuSA8gwQ/92MkU7gxEmeVqGrTTgpxPXbUrtGWYus0I9thRIraagRQUIDf7Qn4yZhKRiFQIyhfMfUr3yblokVWSJ6k8xSnc7eNN/RjowfCYiFoDUFer1S3gW6JiJ8Nt30EMbEhU+vzSIztuRYjRLsR8IHLjlf7HZ+MrWWEXxNmbvapt4jGSqZRYSkGUetSNTPzHsui5YMQ2ajJUNks6mw4wT54Ok2ShnzzIPCUGshzawCRKy5FqvrTZe0RWzQGvw79m67XZjKmxJrLsICjtZa55gxXy+6F4sYsEtxTqhXdRTLC8ulSDaWoCLsolfN+8YUhOsJV709H7Cudr0LlVEtzqBcN+shEyThdR941OnAbF8pirKJqXyupTRTtQSReiVmXW1j7oBErB0d9xM2WEd5J9ZKYtuR4WKwwBSoORbpGrJ5ZI9lt71irJmGX1px0JYE26uNErawr2zfIcP4OHEKXm66PA3wjpCNEfpJunI4muifPjKvsFCkGjExTq63yxMJsZNMYF/J4HmDC5A3Yq36jy0ClePHVhwuu/b1HSFlEfHD5ZtD1bEK44Qu1mWys6tbWmZyPWckzlPTGiRw/XHCuk+q4Rek+mVrVL/UppwrdDEGNV2kpyuhccgc5Oxm9vWnn+19vJrVpLor0kTUrGacMplb1CfOFyTD4o9uNrHqr2Z+ZMSp1c2XcVSORnh9Q81q3k599ETgkNnjg0nGzi10K7rX+bZpHbrblPcY5A4Zxk2xcjzCvTpd9027Aa0QtouyyrKFRR6D/04DwkFGvHPXM3Qda/Jb4nPgI7hQLVM1q5HIBt2MzQNa57Z1DiiLAGa5Mi+O4Sz3Mpp6laPHO6InII3ITnX1QtI+EOX+m9ZxleOZ/j9PiuKoLi3aqXPuEoSye/Vhkm+LalbLtHhMS0R6zu7aZ3vP2jOjL7QVv4McxhcDnZIelAQibGIbULOapf3PuE1Vs9qeaOTdkVKr00gCQiw4NlBzDvf1Lxx+uP5r3Dgv5KQZRzWn+GRwz8jmDS8itUg7iB6vLuJCF5Uty4A9mVKkFR6MiJDachST/oHvHgD+B4SoUIitpF05AAAAAElFTkSuQmCC')+'" alt="'+tarteaucitron.lang.icon+' '+tarteaucitron.lang.modalWindow+'" title="'+tarteaucitron.lang.icon+' '+tarteaucitron.lang.modalWindow+'">';html+='   </button>';html+='</div>';}
if(tarteaucitron.parameters.showAlertSmall===true){html+='<div id="tarteaucitronAlertSmall" class="tarteaucitronAlertSmall'+orientation+'">';html+='   <button type="button" id="tarteaucitronManager" aria-label="'+tarteaucitron.lang.alertSmall+' '+tarteaucitron.lang.modalWindow+'" title="'+tarteaucitron.lang.alertSmall+' '+tarteaucitron.lang.modalWindow+'">';html+='       '+tarteaucitron.lang.alertSmall;html+='       <span id="tarteaucitronDot">';html+='           <span id="tarteaucitronDotGreen"></span>';html+='           <span id="tarteaucitronDotYellow"></span>';html+='           <span id="tarteaucitronDotRed"></span>';html+='       </span>';if(tarteaucitron.parameters.cookieslist===true){html+='   </button><!-- @whitespace';html+='   --><button type="button" id="tarteaucitronCookiesNumber" aria-expanded="false" aria-controls="tarteaucitronCookiesListContainer">0</button>';html+='   <div id="tarteaucitronCookiesListContainer">';if(tarteaucitron.reloadThePage){html+='       <button type="button" id="tarteaucitronClosePanelCookie" aria-label="'+tarteaucitron.lang.close+' ('+tarteaucitron.lang.reload+')" title="'+tarteaucitron.lang.close+' ('+tarteaucitron.lang.reload+')">';}else{html+='       <button type="button" id="tarteaucitronClosePanelCookie">';}
html+='           '+tarteaucitron.lang.close;html+='       </button>';html+='       <div class="tarteaucitronCookiesListMain" id="tarteaucitronCookiesTitle">';html+='            <span class="tarteaucitronH2" role="heading" aria-level="2" id="tarteaucitronCookiesNumberBis">0 cookie</span>';html+='       </div>';html+='       <div id="tarteaucitronCookiesList"></div>';html+='    </div>';}else{html+='   </div>';}
html+='</div>';}
tarteaucitron.addInternalScript(tarteaucitron.cdn+'advertising'+(useMinifiedJS?'.min':'')+'.js','',function(){if(tarteaucitronNoAdBlocker===true||tarteaucitron.parameters.adblocker===false){div.id='tarteaucitronRoot';if(tarteaucitron.parameters.bodyPosition==='top'){var bodyFirstChild=body.firstChild;body.insertBefore(div,bodyFirstChild);}
else{body.appendChild(div,body);}
div.setAttribute('data-nosnippet','true');div.setAttribute('lang',language);div.setAttribute('role','region');div.setAttribute('aria-labelledby','tac_title');div.innerHTML=html;var tacRootAvailableEvent;if(typeof(Event)==='function'){tacRootAvailableEvent=new Event("tac.root_available");}else if(typeof(document.createEvent)==='function'){tacRootAvailableEvent=document.createEvent('Event');tacRootAvailableEvent.initEvent("tac.root_available",true,true);}
if(typeof(window.dispatchEvent)==='function'){window.dispatchEvent(tacRootAvailableEvent);}
if(tarteaucitron.job!==undefined){tarteaucitron.job=tarteaucitron.cleanArray(tarteaucitron.job);for(index=0;index<tarteaucitron.job.length;index+=1){tarteaucitron.addService(tarteaucitron.job[index]);}}else{tarteaucitron.job=[];}
if(tarteaucitron.job.length===0){tarteaucitron.userInterface.closeAlert();}
tarteaucitron.isAjax=true;tarteaucitron.job.push=function(id){if(typeof tarteaucitron.job.indexOf==='undefined'){tarteaucitron.job.indexOf=function(obj,start){var i,j=this.length;for(i=(start||0);i<j;i+=1){if(this[i]===obj){return i;}}
return-1;};}
if(tarteaucitron.job.indexOf(id)===-1){Array.prototype.push.call(this,id);}
tarteaucitron.launch[id]=false;tarteaucitron.addService(id);};if(document.location.hash===tarteaucitron.hashtag&&tarteaucitron.hashtag!==''){tarteaucitron.userInterface.openPanel();}
tarteaucitron.cookie.number();setInterval(tarteaucitron.cookie.number,60000);}},tarteaucitron.parameters.adblocker);if(tarteaucitron.parameters.adblocker===true){setTimeout(function(){if(tarteaucitronNoAdBlocker===false){html='<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig'+orientation+' tarteaucitron-display-block" role="alert" aria-live="polite">';html+='   <p id="tarteaucitronDisclaimerAlert">';html+='       '+tarteaucitron.lang.adblock+'<br/>';html+='       <strong>'+tarteaucitron.lang.adblock_call+'</strong>';html+='   </p>';html+='   <button type="button" class="tarteaucitronCTAButton" id="tarteaucitronCTAButton">';html+='       '+tarteaucitron.lang.reload;html+='   </button>';html+='</div>';html+='<div role="heading" aria-level="1" id="tac_title" class="tac_visually-hidden">'+tarteaucitron.lang.title+'</div>';html+='<div id="tarteaucitronPremium"></div>';div.id='tarteaucitronRoot';if(tarteaucitron.parameters.bodyPosition==='top'){var bodyFirstChild=body.firstChild;body.insertBefore(div,bodyFirstChild);}
else{body.appendChild(div,body);}
div.setAttribute('data-nosnippet','true');div.setAttribute('lang',language);div.setAttribute('role','region');div.setAttribute('aria-labelledby','tac_title');div.innerHTML=html;}},1500);}
if(tarteaucitron.parameters.closePopup===true){setTimeout(function(){var closeElement=document.getElementById('tarteaucitronAlertBig'),closeSpan=document.createElement('span');if(closeElement){closeSpan.textContent='X';closeSpan.setAttribute('id',"tarteaucitronCloseCross");closeElement.insertBefore(closeSpan,closeElement.firstElementChild);}},100);}
if(tarteaucitron.parameters.groupServices===true){var tac_group_style=document.createElement('style');tac_group_style.innerHTML='.tarteaucitronTitle{display:none}';document.head.appendChild(tac_group_style);var cats=document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]')
Array.prototype.forEach.call(cats,function(item){var cat=item.getAttribute('id').replace(/^(tarteaucitronServicesTitle_)/,"");if(cat!=="mandatory"){var html='';html+='<li  class="tarteaucitronLine">';html+='   <div class="tarteaucitronName">';html+='       <span class="tarteaucitronH3" role="heading" aria-level="2">'+tarteaucitron.lang[cat].title+'</span>';html+='       <span>'+tarteaucitron.lang[cat].details+'</span>';html+='   <button type="button" aria-expanded="false" class="tarteaucitron-toggle-group" id="tarteaucitron-toggle-group-'+cat+'">'+tarteaucitron.lang.alertSmall+' ('+document.getElementById("tarteaucitronServices_"+cat).childElementCount+')</button>';html+='   </div>';html+='   <div class="tarteaucitronAsk" id="tarteaucitron-group-'+cat+'">';html+='       <button type="button" aria-label="'+tarteaucitron.lang.allow+' '+tarteaucitron.lang[cat].title+'" class="tarteaucitronAllow" id="tarteaucitron-accept-group-'+cat+'">';html+='           <span class="tarteaucitronCheck" aria-hidden="true"></span> '+tarteaucitron.lang.allow;html+='       </button> ';html+='       <button type="button" aria-label="'+tarteaucitron.lang.deny+' '+tarteaucitron.lang[cat].title+'" class="tarteaucitronDeny" id="tarteaucitron-reject-group-'+cat+'">';html+='           <span class="tarteaucitronCross" aria-hidden="true"></span> '+tarteaucitron.lang.deny;html+='       </button>';html+='   </div>';html+='</li>';var ul=document.createElement('ul');ul.innerHTML=html;item.insertBefore(ul,item.querySelector('#tarteaucitronServices_'+cat+''));document.querySelector('#tarteaucitronServices_'+cat).style.display='none';tarteaucitron.addClickEventToId("tarteaucitron-toggle-group-"+cat,function(){tarteaucitron.userInterface.toggle('tarteaucitronServices_'+cat);if(document.getElementById('tarteaucitronServices_'+cat).style.display=='block'){tarteaucitron.userInterface.addClass('tarteaucitronServicesTitle_'+cat,'tarteaucitronIsExpanded');document.getElementById('tarteaucitron-toggle-group-'+cat).setAttribute('aria-expanded','true');}else{tarteaucitron.userInterface.removeClass('tarteaucitronServicesTitle_'+cat,'tarteaucitronIsExpanded');document.getElementById('tarteaucitron-toggle-group-'+cat).setAttribute('aria-expanded','false');}});tarteaucitron.addClickEventToId("tarteaucitron-accept-group-"+cat,function(){tarteaucitron.userInterface.respondAll(true,cat);});tarteaucitron.addClickEventToId("tarteaucitron-reject-group-"+cat,function(){tarteaucitron.userInterface.respondAll(false,cat);});}});}
if(tarteaucitron.parameters.partnersList===true&&(tarteaucitron.parameters.orientation==="middle"||tarteaucitron.parameters.orientation==="popup")){setTimeout(function(){var liPartners="";var tarteaucitronPartnersCat=[];tarteaucitron.job.forEach(function(id){if(tarteaucitronPartnersCat[tarteaucitron.services[id].type]===undefined){tarteaucitronPartnersCat[tarteaucitron.services[id].type]=true;liPartners+="<li>"+tarteaucitron.lang[tarteaucitron.services[id].type].title+"</li>";}});var tacPartnersInfoParent=document.getElementById('tarteaucitronDisclaimerAlert');if(tacPartnersInfoParent!==null){tacPartnersInfoParent.insertAdjacentHTML('beforeend','<div class="tarteaucitronPartnersList"><b>'+tarteaucitron.lang.ourpartners+' ('+tarteaucitron.job.length+')</b> <ul>'+liPartners+'</ul></div>');}},100);}
setTimeout(function(){var tacSaveButtonParent=document.getElementById('tarteaucitronServices');if(tacSaveButtonParent!==null){tacSaveButtonParent.insertAdjacentHTML('beforeend','<div id="tarteaucitronSave"><button class="tarteaucitronAllow" id="tarteaucitronSaveButton">'+tarteaucitron.lang.save+'</button></div>');}},100);tarteaucitron.userInterface.color("",true);setTimeout(function(){tarteaucitron.addClickEventToId("tarteaucitronCloseCross",function(){tarteaucitron.userInterface.closeAlert();});tarteaucitron.addClickEventToId("tarteaucitronPersonalize",function(){tarteaucitron.userInterface.openPanel();});tarteaucitron.addClickEventToId("tarteaucitronPersonalize2",function(){tarteaucitron.userInterface.respondAll(true);});tarteaucitron.addClickEventToId("tarteaucitronManager",function(){tarteaucitron.userInterface.openPanel();});tarteaucitron.addClickEventToId("tarteaucitronBack",function(){tarteaucitron.userInterface.closePanel();});tarteaucitron.addClickEventToId("tarteaucitronClosePanel",function(){tarteaucitron.userInterface.closePanel();});tarteaucitron.addClickEventToId("tarteaucitronClosePanelCookie",function(){tarteaucitron.userInterface.closePanel();});tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrl",function(){document.location=tarteaucitron.parameters.privacyUrl;});tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrlDialog",function(){document.location=tarteaucitron.parameters.privacyUrl;});tarteaucitron.addClickEventToId("tarteaucitronCookiesNumber",function(){tarteaucitron.userInterface.toggleCookiesList();});tarteaucitron.addClickEventToId("tarteaucitronAllAllowed",function(){tarteaucitron.userInterface.respondAll(true);});tarteaucitron.addClickEventToId("tarteaucitronAllDenied",function(){tarteaucitron.userInterface.respondAll(false);});tarteaucitron.addClickEventToId("tarteaucitronAllDenied2",function(){tarteaucitron.userInterface.respondAll(false,'',true);if(tarteaucitron.reloadThePage===true){window.location.reload();}});tarteaucitron.addClickEventToId("tarteaucitronCloseAlert",function(){tarteaucitron.userInterface.openPanel();});tarteaucitron.addClickEventToId("tarteaucitronCTAButton",function(){location.reload();});tarteaucitron.addClickEventToId("tarteaucitronSaveButton",function(){var timeoutSaveButton=0;tarteaucitron.job.forEach(function(id){if(tarteaucitron.state[id]!==true&&tarteaucitron.state[id]!==false){timeoutSaveButton=500;tarteaucitron.setConsent(id,false);}});setTimeout(tarteaucitron.userInterface.closePanel,timeoutSaveButton);});var toggleBtns=document.getElementsByClassName("catToggleBtn"),i;for(i=0;i<toggleBtns.length;i++){toggleBtns[i].dataset.index=i;tarteaucitron.addClickEventToElement(toggleBtns[i],function(){if(!tarteaucitron.parameters.showDetailsOnClick)return false;tarteaucitron.userInterface.toggle('tarteaucitronDetails'+cat[this.dataset.index],'tarteaucitronInfoBox');if(document.getElementById('tarteaucitronDetails'+cat[this.dataset.index]).style.display==='block'){this.setAttribute('aria-expanded','true');}else{this.setAttribute('aria-expanded','false');}
return false;});}
var allowBtnsInSite=document.querySelectorAll(".tac_activate .tarteaucitronAllow");for(i=0;i<allowBtnsInSite.length;i++){tarteaucitron.addClickEventToElement(allowBtnsInSite[i],function(){if(this.closest('.tac_activate')!==null&&this.closest('.tac_activate').parentNode!==null){this.closest('.tac_activate').parentNode.setAttribute("tabindex","-1");this.closest('.tac_activate').parentNode.focus();}});}
var allowBtns=document.getElementsByClassName("tarteaucitronAllow");for(i=0;i<allowBtns.length;i++){tarteaucitron.addClickEventToElement(allowBtns[i],function(){tarteaucitron.userInterface.respond(this,true);});}
var denyBtns=document.getElementsByClassName("tarteaucitronDeny");for(i=0;i<denyBtns.length;i++){tarteaucitron.addClickEventToElement(denyBtns[i],function(){tarteaucitron.userInterface.respond(this,false);});}
if(tarteaucitron.events.load){tarteaucitron.events.load();}},500);});});},"addService":function(serviceId){"use strict";var html='',s=tarteaucitron.services,service=s[serviceId],cookie=tarteaucitron.cookie.read(),hostname=document.location.hostname,hostRef=document.referrer.split('/')[2],isNavigating=(hostRef===hostname&&window.location.href!==tarteaucitron.parameters.privacyUrl),isAutostart=(!service.needConsent),isWaiting=(cookie.indexOf(service.key+'=wait')>=0),isDenied=(cookie.indexOf(service.key+'=false')>=0),isAllowed=((cookie.indexOf(service.key+'=true')>=0)||(!service.needConsent&&cookie.indexOf(service.key+'=false')<0)),isResponded=(cookie.indexOf(service.key+'=false')>=0||cookie.indexOf(service.key+'=true')>=0),isDNTRequested=(navigator.doNotTrack==="1"||navigator.doNotTrack==="yes"||navigator.msDoNotTrack==="1"||window.doNotTrack==="1"),currentStatus=(isAllowed)?tarteaucitron.lang.allowed:tarteaucitron.lang.disallowed,state=(undefined!==service.defaultState)?service.defaultState:(undefined!==tarteaucitron.parameters.serviceDefaultState?tarteaucitron.parameters.serviceDefaultState:'wait');if(tarteaucitron.added[service.key]!==true){tarteaucitron.added[service.key]=true;html+='<li id="'+service.key+'Line" class="tarteaucitronLine">';html+='   <div class="tarteaucitronName">';html+='       <span class="tarteaucitronH3" role="heading" aria-level="3">'+service.name+'</span>';html+='       <div class="tarteaucitronStatusInfo">';html+='          <span class="tacCurrentStatus" id="tacCurrentStatus'+service.key+'">'+currentStatus+'</span>';html+='          <span class="tarteaucitronReadmoreSeparator"> - </span>';html+='          <span id="tacCL'+service.key+'" class="tarteaucitronListCookies"></span>';html+='       </div>';if(tarteaucitron.parameters.moreInfoLink==true){var link='https://tarteaucitron.io/service/'+service.key+'/';if(service.readmoreLink!==undefined&&service.readmoreLink!==''){link=service.readmoreLink;}
if(tarteaucitron.parameters.readmoreLink!==undefined&&tarteaucitron.parameters.readmoreLink!==''){link=tarteaucitron.parameters.readmoreLink;}
html+='       <a href="'+link+'" target="_blank" rel="noreferrer noopener nofollow" title="'+tarteaucitron.lang.more+' : '+tarteaucitron.lang.cookieDetail+' '+service.name+' '+tarteaucitron.lang.ourSite+' '+tarteaucitron.lang.newWindow+'" class="tarteaucitronReadmoreInfo">'+tarteaucitron.lang.more+'</a>';html+='       <span class="tarteaucitronReadmoreSeparator"> - </span>';html+='       <a href="'+service.uri+'" target="_blank" rel="noreferrer noopener" title="'+tarteaucitron.lang.source+' '+service.name+' '+tarteaucitron.lang.newWindow+'" class="tarteaucitronReadmoreOfficial">'+tarteaucitron.lang.source+'</a>';}
html+='   </div>';html+='   <div class="tarteaucitronAsk">';html+='       <button type="button" aria-label="'+tarteaucitron.lang.allow+' '+service.name+'" id="'+service.key+'Allowed" class="tarteaucitronAllow">';html+='           <span class="tarteaucitronCheck" aria-hidden="true"></span> '+tarteaucitron.lang.allow;html+='       </button> ';html+='       <button type="button" aria-label="'+tarteaucitron.lang.deny+' '+service.name+'" id="'+service.key+'Denied" class="tarteaucitronDeny">';html+='           <span class="tarteaucitronCross" aria-hidden="true"></span> '+tarteaucitron.lang.deny;html+='       </button>';html+='   </div>';html+='</li>';tarteaucitron.userInterface.css('tarteaucitronServicesTitle_'+service.type,'display','block');if(document.getElementById('tarteaucitronServices_'+service.type)!==null){document.getElementById('tarteaucitronServices_'+service.type).innerHTML+=html;}
tarteaucitron.userInterface.css('tarteaucitronNoServicesTitle','display','none');tarteaucitron.userInterface.order(service.type);tarteaucitron.addClickEventToId(service.key+'Allowed',function(){tarteaucitron.userInterface.respond(this,true);});tarteaucitron.addClickEventToId(service.key+'Denied',function(){tarteaucitron.userInterface.respond(this,false);});}
tarteaucitron.pro('!'+service.key+'='+isAllowed);if(isResponded===false&&tarteaucitron.user.bypass===true){isAllowed=true;tarteaucitron.cookie.create(service.key,true);}
if((!isResponded&&(isAutostart||(isNavigating&&isWaiting))&&!tarteaucitron.highPrivacy)||isAllowed){if(!isAllowed||(!service.needConsent&&cookie.indexOf(service.key+'=false')<0)){tarteaucitron.cookie.create(service.key,true);}
if(tarteaucitron.launch[service.key]!==true){tarteaucitron.launch[service.key]=true;if(typeof tarteaucitronMagic==='undefined'||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){service.js();}
tarteaucitron.sendEvent(service.key+'_loaded');}
tarteaucitron.state[service.key]=true;tarteaucitron.userInterface.color(service.key,true);}else if(isDenied){if(typeof service.fallback==='function'){if(typeof tarteaucitronMagic==='undefined'||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){service.fallback();}}
tarteaucitron.state[service.key]=false;tarteaucitron.userInterface.color(service.key,false);}else if(!isResponded&&isDNTRequested&&tarteaucitron.handleBrowserDNTRequest){tarteaucitron.cookie.create(service.key,'false');if(typeof service.fallback==='function'){if(typeof tarteaucitronMagic==='undefined'||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){service.fallback();}}
tarteaucitron.state[service.key]=false;tarteaucitron.userInterface.color(service.key,false);}else if(!isResponded){tarteaucitron.cookie.create(service.key,state);if(typeof tarteaucitronMagic==='undefined'||tarteaucitronMagic.indexOf("_"+service.key+"_")<0){if(true===state&&typeof service.js==='function'){service.js();tarteaucitron.sendEvent(key+'_loaded');}else if(typeof service.fallback==='function'){service.fallback();}}
tarteaucitron.userInterface.color(service.key,state);if('wait'===state){tarteaucitron.userInterface.openAlert();}}
tarteaucitron.cookie.checkCount(service.key);tarteaucitron.sendEvent(service.key+'_added');},"sendEvent":function(event_key){if(event_key!==undefined){var send_event_item;if(typeof(Event)==='function'){send_event_item=new Event(event_key);}else if(typeof(document.createEvent)==='function'){send_event_item=document.createEvent('Event');send_event_item.initEvent(event_key,true,true);}
document.dispatchEvent(send_event_item);}},"cleanArray":function cleanArray(arr){"use strict";var i,len=arr.length,out=[],obj={},s=tarteaucitron.services;for(i=0;i<len;i+=1){if(!obj[arr[i]]){obj[arr[i]]={};if(tarteaucitron.services[arr[i]]!==undefined){out.push(arr[i]);}}}
out=out.sort(function(a,b){if(s[a].type+s[a].key>s[b].type+s[b].key){return 1;}
if(s[a].type+s[a].key<s[b].type+s[b].key){return-1;}
return 0;});return out;},"setConsent":function(id,status){if(status===true){tarteaucitron.userInterface.respond(document.getElementById(id+'Allowed'),true);}else if(status===false){tarteaucitron.userInterface.respond(document.getElementById(id+'Denied'),false);}},"userInterface":{"css":function(id,property,value){"use strict";if(document.getElementById(id)!==null){if(property=="display"&&value=="none"&&(id=="tarteaucitron"||id=="tarteaucitronBack"||id=="tarteaucitronAlertBig")){document.getElementById(id).style["opacity"]="0";document.getElementById(id).style[property]=value;}else{document.getElementById(id).style[property]=value;if(property=="display"&&value=="block"&&(id=="tarteaucitron"||id=="tarteaucitronAlertBig")){document.getElementById(id).style["opacity"]="1";}
if(property=="display"&&value=="block"&&id=="tarteaucitronBack"){document.getElementById(id).style["opacity"]="0.7";}
if(property=="display"&&value=="block"&&id=="tarteaucitronAlertBig"&&(tarteaucitron.parameters.orientation=="middle"||tarteaucitron.parameters.orientation=="popup")){tarteaucitron.userInterface.focusTrap('tarteaucitronAlertBig');}}}},"addClass":function(id,className){"use strict";if(document.getElementById(id)!==null&&document.getElementById(id).classList!==undefined){document.getElementById(id).classList.add(className);}},"removeClass":function(id,className){"use strict";if(document.getElementById(id)!==null&&document.getElementById(id).classList!==undefined){document.getElementById(id).classList.remove(className);}},"respondAll":function(status,type,allowSafeAnalytics){"use strict";var s=tarteaucitron.services,service,key,index=0;for(index=0;index<tarteaucitron.job.length;index+=1){if(typeof type!=='undefined'&&type!==''&&s[tarteaucitron.job[index]].type!==type){continue;}
if(allowSafeAnalytics&&typeof s[tarteaucitron.job[index]].safeanalytic!=="undefined"&&s[tarteaucitron.job[index]].safeanalytic===true){continue;}
service=s[tarteaucitron.job[index]];key=service.key;if(tarteaucitron.state[key]!==status){if(status===false&&tarteaucitron.launch[key]===true){tarteaucitron.reloadThePage=true;if(tarteaucitron.checkIfExist('tarteaucitronClosePanel')){var ariaCloseValue=document.getElementById('tarteaucitronClosePanel').textContent.trim()+' ('+tarteaucitron.lang.reload+')';document.getElementById('tarteaucitronClosePanel').setAttribute("aria-label",ariaCloseValue);document.getElementById('tarteaucitronClosePanel').setAttribute("title",ariaCloseValue);}}
if(tarteaucitron.launch[key]!==true&&status===true){tarteaucitron.pro('!'+key+'=engage');tarteaucitron.launch[key]=true;if(typeof tarteaucitronMagic==='undefined'||tarteaucitronMagic.indexOf("_"+key+"_")<0){tarteaucitron.services[key].js();}
tarteaucitron.sendEvent(key+'_loaded');}
var itemStatusElem=document.getElementById('tacCurrentStatus'+key);tarteaucitron.state[key]=status;tarteaucitron.cookie.create(key,status);tarteaucitron.userInterface.color(key,status);if(status==true){itemStatusElem.innerHTML=tarteaucitron.lang.allowed;tarteaucitron.sendEvent(key+'_allowed');}else{itemStatusElem.innerHTML=tarteaucitron.lang.disallowed;tarteaucitron.sendEvent(key+'_disallowed');}}}},"respond":function(el,status){"use strict";if(el.id===''){return;}
var key=el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed","g"),'');if(key.substring(0,13)==='tarteaucitron'||key===''){return;}
if(tarteaucitron.state[key]===status){return;}
if(status===false&&tarteaucitron.launch[key]===true){tarteaucitron.reloadThePage=true;if(tarteaucitron.checkIfExist('tarteaucitronClosePanel')){var ariaCloseValue=document.getElementById('tarteaucitronClosePanel').textContent.trim()+' ('+tarteaucitron.lang.reload+')';document.getElementById('tarteaucitronClosePanel').setAttribute("aria-label",ariaCloseValue);document.getElementById('tarteaucitronClosePanel').setAttribute("title",ariaCloseValue);}}
if(status===true){if(tarteaucitron.launch[key]!==true){tarteaucitron.pro('!'+key+'=engage');tarteaucitron.launch[key]=true;if(typeof tarteaucitronMagic==='undefined'||tarteaucitronMagic.indexOf("_"+key+"_")<0){tarteaucitron.services[key].js();}
tarteaucitron.sendEvent(key+'_loaded');}}
var itemStatusElem=document.getElementById('tacCurrentStatus'+key);tarteaucitron.state[key]=status;tarteaucitron.cookie.create(key,status);tarteaucitron.userInterface.color(key,status);if(status==true){itemStatusElem.innerHTML=tarteaucitron.lang.allowed;tarteaucitron.sendEvent(key+'_allowed');}else{itemStatusElem.innerHTML=tarteaucitron.lang.disallowed;tarteaucitron.sendEvent(key+'_disallowed');}},"color":function(key,status){"use strict";var c='tarteaucitron',nbDenied=0,nbPending=0,nbAllowed=0,sum=tarteaucitron.job.length,index,s=tarteaucitron.services;if(key!==""){if(status===true){tarteaucitron.userInterface.addClass(key+'Line','tarteaucitronIsAllowed');tarteaucitron.userInterface.removeClass(key+'Line','tarteaucitronIsDenied');document.getElementById(key+'Allowed').setAttribute('aria-pressed','true');document.getElementById(key+'Denied').setAttribute('aria-pressed','false');}else if(status===false){tarteaucitron.userInterface.removeClass(key+'Line','tarteaucitronIsAllowed');tarteaucitron.userInterface.addClass(key+'Line','tarteaucitronIsDenied');document.getElementById(key+'Allowed').setAttribute('aria-pressed','false');document.getElementById(key+'Denied').setAttribute('aria-pressed','true');}else{document.getElementById(key+'Allowed').setAttribute('aria-pressed','false');document.getElementById(key+'Denied').setAttribute('aria-pressed','false');}
var sumToRemove=0;for(index=0;index<sum;index+=1){if(typeof s[tarteaucitron.job[index]].safeanalytic!=="undefined"&&s[tarteaucitron.job[index]].safeanalytic===true){sumToRemove+=1;continue;}
if(tarteaucitron.state[tarteaucitron.job[index]]===false){nbDenied+=1;}else if(tarteaucitron.state[tarteaucitron.job[index]]===undefined){nbPending+=1;}else if(tarteaucitron.state[tarteaucitron.job[index]]===true){nbAllowed+=1;}}
sum-=sumToRemove;tarteaucitron.userInterface.css(c+'DotGreen','width',((100/sum)*nbAllowed)+'%');tarteaucitron.userInterface.css(c+'DotYellow','width',((100/sum)*nbPending)+'%');tarteaucitron.userInterface.css(c+'DotRed','width',((100/sum)*nbDenied)+'%');if(nbDenied===0&&nbPending===0){tarteaucitron.userInterface.removeClass(c+'AllDenied',c+'IsSelected');tarteaucitron.userInterface.addClass(c+'AllAllowed',c+'IsSelected');tarteaucitron.userInterface.addClass(c+'MainLineOffset',c+'IsAllowed');tarteaucitron.userInterface.removeClass(c+'MainLineOffset',c+'IsDenied');document.getElementById(c+'AllDenied').setAttribute('aria-pressed','false');document.getElementById(c+'AllAllowed').setAttribute('aria-pressed','true');}else if(nbAllowed===0&&nbPending===0){tarteaucitron.userInterface.removeClass(c+'AllAllowed',c+'IsSelected');tarteaucitron.userInterface.addClass(c+'AllDenied',c+'IsSelected');tarteaucitron.userInterface.removeClass(c+'MainLineOffset',c+'IsAllowed');tarteaucitron.userInterface.addClass(c+'MainLineOffset',c+'IsDenied');document.getElementById(c+'AllDenied').setAttribute('aria-pressed','true');document.getElementById(c+'AllAllowed').setAttribute('aria-pressed','false');}else{tarteaucitron.userInterface.removeClass(c+'AllAllowed',c+'IsSelected');tarteaucitron.userInterface.removeClass(c+'AllDenied',c+'IsSelected');tarteaucitron.userInterface.removeClass(c+'MainLineOffset',c+'IsAllowed');tarteaucitron.userInterface.removeClass(c+'MainLineOffset',c+'IsDenied');document.getElementById(c+'AllDenied').setAttribute('aria-pressed','false');document.getElementById(c+'AllAllowed').setAttribute('aria-pressed','false');}
if(nbPending===0){tarteaucitron.userInterface.closeAlert();}
if(tarteaucitron.services[key].cookies.length>0&&status===false){tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies);}
if(status===true){if(document.getElementById('tacCL'+key)!==null){document.getElementById('tacCL'+key).innerHTML='...';}
setTimeout(function(){tarteaucitron.cookie.checkCount(key);},2500);}else{tarteaucitron.cookie.checkCount(key);}}
var cats=document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]')
Array.prototype.forEach.call(cats,function(item){var cat=item.getAttribute('id').replace(/^(tarteaucitronServicesTitle_)/,""),total=document.getElementById("tarteaucitronServices_"+cat).childElementCount;var doc=document.getElementById("tarteaucitronServices_"+cat),groupdenied=0,groupallowed=0;for(var ii=0;ii<doc.children.length;ii++){if(doc.children[ii].className=="tarteaucitronLine tarteaucitronIsDenied"){groupdenied++;}
if(doc.children[ii].className=="tarteaucitronLine tarteaucitronIsAllowed"){groupallowed++;}}
if(total===groupallowed){tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat,'tarteaucitronIsDenied');tarteaucitron.userInterface.addClass('tarteaucitron-group-'+cat,'tarteaucitronIsAllowed');if(document.getElementById('tarteaucitron-reject-group-'+cat)){document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed','false');document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed','true');}}
if(total===groupdenied){tarteaucitron.userInterface.addClass('tarteaucitron-group-'+cat,'tarteaucitronIsDenied');tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat,'tarteaucitronIsAllowed');if(document.getElementById('tarteaucitron-reject-group-'+cat)){document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed','true');document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed','false');}}
if(total!==groupdenied&&total!==groupallowed){tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat,'tarteaucitronIsDenied');tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat,'tarteaucitronIsAllowed');if(document.getElementById('tarteaucitron-reject-group-'+cat)){document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed','false');document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed','false');}}
groupdenied=0;groupallowed=0;});},"openPanel":function(){"use strict";tarteaucitron.userInterface.css('tarteaucitron','display','block');tarteaucitron.userInterface.css('tarteaucitronBack','display','block');tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer','display','none');document.getElementById('tarteaucitronClosePanel').focus();if(document.getElementsByTagName('body')[0].classList!==undefined){document.getElementsByTagName('body')[0].classList.add('tarteaucitron-modal-open');}
tarteaucitron.userInterface.focusTrap('tarteaucitron');tarteaucitron.userInterface.jsSizing('main');var tacOpenPanelEvent;if(typeof(Event)==='function'){tacOpenPanelEvent=new Event("tac.open_panel");}else if(typeof(document.createEvent)==='function'){tacOpenPanelEvent=document.createEvent('Event');tacOpenPanelEvent.initEvent("tac.open_panel",true,true);}
if(typeof(window.dispatchEvent)==='function'){window.dispatchEvent(tacOpenPanelEvent);}},"closePanel":function(){"use strict";if(document.location.hash===tarteaucitron.hashtag){if(window.history){window.history.replaceState('',document.title,window.location.pathname+window.location.search);}else{document.location.hash='';}}
if(tarteaucitron.checkIfExist('tarteaucitron')){if(tarteaucitron.checkIfExist('tarteaucitronCloseAlert')){document.getElementById('tarteaucitronCloseAlert').focus();}else if(tarteaucitron.checkIfExist('tarteaucitronManager')){document.getElementById('tarteaucitronManager').focus();}else if(tarteaucitron.customCloserId&&tarteaucitron.checkIfExist(tarteaucitron.customCloserId)){document.getElementById(tarteaucitron.customCloserId).focus();}
tarteaucitron.userInterface.css('tarteaucitron','display','none');}
if(tarteaucitron.checkIfExist('tarteaucitronCookiesListContainer')&&tarteaucitron.checkIfExist('tarteaucitronCookiesNumber')){document.getElementById('tarteaucitronCookiesNumber').focus();document.getElementById('tarteaucitronCookiesNumber').setAttribute("aria-expanded","false");tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer','display','none');}
tarteaucitron.fallback(['tarteaucitronInfoBox'],function(elem){elem.style.display='none';},true);if(tarteaucitron.reloadThePage===true){window.location.reload();}else{tarteaucitron.userInterface.css('tarteaucitronBack','display','none');}
if(document.getElementsByTagName('body')[0].classList!==undefined){document.getElementsByTagName('body')[0].classList.remove('tarteaucitron-modal-open');}
var tacClosePanelEvent;if(typeof(Event)==='function'){tacClosePanelEvent=new Event("tac.close_panel");}else if(typeof(document.createEvent)==='function'){tacClosePanelEvent=document.createEvent('Event');tacClosePanelEvent.initEvent("tac.close_panel",true,true);}
if(typeof(window.dispatchEvent)==='function'){window.dispatchEvent(tacClosePanelEvent);}},"focusTrap":function(parentElement){"use strict";var focusableEls,firstFocusableEl,lastFocusableEl,filtered;focusableEls=document.getElementById(parentElement).querySelectorAll('a[href], button');filtered=[];for(var i=0,max=focusableEls.length;i<max;i++){if(focusableEls[i].offsetHeight>0){filtered.push(focusableEls[i]);}}
firstFocusableEl=filtered[0];lastFocusableEl=filtered[filtered.length-1];document.getElementById(parentElement).addEventListener("keydown",function(evt){if(evt.key==='Tab'||evt.keyCode===9){if(evt.shiftKey){if(document.activeElement===firstFocusableEl){lastFocusableEl.focus();evt.preventDefault();}}else{if(document.activeElement===lastFocusableEl){firstFocusableEl.focus();evt.preventDefault();}}}})},"openAlert":function(){"use strict";var c='tarteaucitron';tarteaucitron.userInterface.css(c+'Percentage','display','block');tarteaucitron.userInterface.css(c+'AlertSmall','display','none');tarteaucitron.userInterface.css(c+'Icon','display','none');tarteaucitron.userInterface.css(c+'AlertBig','display','block');tarteaucitron.userInterface.addClass(c+'Root','tarteaucitronBeforeVisible');var tacOpenAlertEvent;if(typeof(Event)==='function'){tacOpenAlertEvent=new Event("tac.open_alert");}else if(typeof(document.createEvent)==='function'){tacOpenAlertEvent=document.createEvent('Event');tacOpenAlertEvent.initEvent("tac.open_alert",true,true);}
if(document.getElementById('tarteaucitronAlertBig')!==null&&tarteaucitron.parameters.orientation==='middle'){document.getElementById('tarteaucitronAlertBig').focus();}
if(typeof(window.dispatchEvent)==='function'){window.dispatchEvent(tacOpenAlertEvent);}},"closeAlert":function(){"use strict";var c='tarteaucitron';tarteaucitron.userInterface.css(c+'Percentage','display','none');tarteaucitron.userInterface.css(c+'AlertSmall','display','block');tarteaucitron.userInterface.css(c+'Icon','display','block');tarteaucitron.userInterface.css(c+'AlertBig','display','none');tarteaucitron.userInterface.removeClass(c+'Root','tarteaucitronBeforeVisible');tarteaucitron.userInterface.jsSizing('box');var tacCloseAlertEvent;if(typeof(Event)==='function'){tacCloseAlertEvent=new Event("tac.close_alert");}else if(typeof(document.createEvent)==='function'){tacCloseAlertEvent=document.createEvent('Event');tacCloseAlertEvent.initEvent("tac.close_alert",true,true);}
if(typeof(window.dispatchEvent)==='function'){window.dispatchEvent(tacCloseAlertEvent);}},"toggleCookiesList":function(){"use strict";var div=document.getElementById('tarteaucitronCookiesListContainer'),togglediv=document.getElementById('tarteaucitronCookiesNumber');if(div===null){return;}
if(div.style.display!=='block'){tarteaucitron.cookie.number();div.style.display='block';togglediv.setAttribute("aria-expanded","true");tarteaucitron.userInterface.jsSizing('cookie');tarteaucitron.userInterface.css('tarteaucitron','display','none');tarteaucitron.userInterface.css('tarteaucitronBack','display','block');tarteaucitron.fallback(['tarteaucitronInfoBox'],function(elem){elem.style.display='none';},true);}else{div.style.display='none';togglediv.setAttribute("aria-expanded","false");tarteaucitron.userInterface.css('tarteaucitron','display','none');tarteaucitron.userInterface.css('tarteaucitronBack','display','none');}},"toggle":function(id,closeClass){"use strict";var div=document.getElementById(id);if(div===null){return;}
if(closeClass!==undefined){tarteaucitron.fallback([closeClass],function(elem){if(elem.id!==id){elem.style.display='none';}},true);}
if(div.style.display!=='block'){div.style.display='block';}else{div.style.display='none';}},"order":function(id){"use strict";var main=document.getElementById('tarteaucitronServices_'+id),allDivs,store=[],i;if(main===null){return;}
allDivs=main.childNodes;if(typeof Array.prototype.map==='function'&&typeof Enumerable==='undefined'){Array.prototype.map.call(main.children,Object).sort(function(a,b){if(tarteaucitron.services[a.id.replace(/Line/g,'')].name>tarteaucitron.services[b.id.replace(/Line/g,'')].name){return 1;}
if(tarteaucitron.services[a.id.replace(/Line/g,'')].name<tarteaucitron.services[b.id.replace(/Line/g,'')].name){return-1;}
return 0;}).forEach(function(element){main.appendChild(element);});}},"jsSizing":function(type){"use strict";var scrollbarMarginRight=10,scrollbarWidthParent,scrollbarWidthChild,servicesHeight,e=window,a='inner',windowInnerHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,mainTop,mainHeight,closeButtonHeight,headerHeight,cookiesListHeight,cookiesCloseHeight,cookiesTitleHeight,paddingBox,alertSmallHeight,cookiesNumberHeight;if(type==='box'){if(document.getElementById('tarteaucitronAlertSmall')!==null&&document.getElementById('tarteaucitronCookiesNumber')!==null){tarteaucitron.userInterface.css('tarteaucitronCookiesNumber','padding','0px 10px');alertSmallHeight=document.getElementById('tarteaucitronAlertSmall').offsetHeight;cookiesNumberHeight=document.getElementById('tarteaucitronCookiesNumber').offsetHeight;paddingBox=(alertSmallHeight-cookiesNumberHeight)/2;tarteaucitron.userInterface.css('tarteaucitronCookiesNumber','padding',paddingBox+'px 10px');}}else if(type==='main'){if(window.innerWidth===undefined){a='client';e=document.documentElement||document.body;}
if(document.getElementById('tarteaucitron')!==null&&document.getElementById('tarteaucitronClosePanel')!==null&&document.getElementById('tarteaucitronMainLineOffset')!==null){tarteaucitron.userInterface.css('tarteaucitronServices','height','auto');mainHeight=document.getElementById('tarteaucitron').offsetHeight;closeButtonHeight=document.getElementById('tarteaucitronClosePanel').offsetHeight;servicesHeight=(mainHeight-closeButtonHeight+2);tarteaucitron.userInterface.css('tarteaucitronServices','height',servicesHeight+'px');tarteaucitron.userInterface.css('tarteaucitronServices','overflow-x','auto');}
if(document.getElementById('tarteaucitronServices')!==null&&document.getElementById('tarteaucitronScrollbarChild')!==null){if(e[a+'Width']<=479){}else if(e[a+'Width']<=767){scrollbarMarginRight=12;}
scrollbarWidthParent=document.getElementById('tarteaucitronServices').offsetWidth;scrollbarWidthChild=document.getElementById('tarteaucitronScrollbarChild').offsetWidth;}
if(document.getElementById('tarteaucitron')!==null){if(e[a+'Width']<=767){mainTop=0;}else{mainTop=((windowInnerHeight-document.getElementById('tarteaucitron').offsetHeight)/2)-21;}
if(document.getElementById('tarteaucitronMainLineOffset')!==null){if(document.getElementById('tarteaucitron').offsetHeight<(windowInnerHeight/2)){mainTop-=document.getElementById('tarteaucitronMainLineOffset').offsetHeight;}}
if(mainTop<0){mainTop=0;}
tarteaucitron.userInterface.css('tarteaucitron','top',mainTop+'px');}}else if(type==='cookie'){if(document.getElementById('tarteaucitronAlertSmall')!==null){tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer','bottom',(document.getElementById('tarteaucitronAlertSmall').offsetHeight)+'px');}
if(document.getElementById('tarteaucitronCookiesListContainer')!==null){tarteaucitron.userInterface.css('tarteaucitronCookiesList','height','auto');cookiesListHeight=document.getElementById('tarteaucitronCookiesListContainer').offsetHeight;cookiesCloseHeight=document.getElementById('tarteaucitronClosePanelCookie').offsetHeight;cookiesTitleHeight=document.getElementById('tarteaucitronCookiesTitle').offsetHeight;tarteaucitron.userInterface.css('tarteaucitronCookiesList','height',(cookiesListHeight-cookiesCloseHeight-cookiesTitleHeight-2)+'px');}}}},"cookie":{"owner":{},"create":function(key,status){"use strict";if(tarteaucitronForceExpire!==''){if((tarteaucitronExpireInDay&&tarteaucitronForceExpire<365)||(!tarteaucitronExpireInDay&&tarteaucitronForceExpire<8760)){if(tarteaucitronExpireInDay){timeExpire=tarteaucitronForceExpire*86400000;}else{timeExpire=tarteaucitronForceExpire*3600000;}}}
var d=new Date(),time=d.getTime(),expireTime=time+timeExpire,regex=new RegExp("!"+key+"=(wait|true|false)","g"),cookie=tarteaucitron.cookie.read().replace(regex,""),value=tarteaucitron.parameters.cookieName+'='+cookie+'!'+key+'='+status,domain=(tarteaucitron.parameters.cookieDomain!==undefined&&tarteaucitron.parameters.cookieDomain!=='')?'; domain='+tarteaucitron.parameters.cookieDomain:'',secure=location.protocol==='https:'?'; Secure':'';d.setTime(expireTime);document.cookie=value+'; expires='+d.toGMTString()+'; path=/'+domain+secure+'; samesite=lax';tarteaucitron.sendEvent('tac.consent_updated');},"read":function(){"use strict";var nameEQ=tarteaucitron.parameters.cookieName+"=",ca=document.cookie.split(';'),i,c;for(i=0;i<ca.length;i+=1){c=ca[i];while(c.charAt(0)===' '){c=c.substring(1,c.length);}
if(c.indexOf(nameEQ)===0){return c.substring(nameEQ.length,c.length);}}
return'';},"purge":function(arr){"use strict";var i;for(i=0;i<arr.length;i+=1){var rgxpCookie=new RegExp("^(.*;)?\\s*"+arr[i]+"\\s*=\\s*[^;]+(.*)?$");if(document.cookie.match(rgxpCookie)){document.cookie=arr[i]+'=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';document.cookie=arr[i]+'=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.'+location.hostname+';';document.cookie=arr[i]+'=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.'+location.hostname.split('.').slice(-2).join('.')+';';}}},"checkCount":function(key){"use strict";var arr=tarteaucitron.services[key].cookies,nb=arr.length,nbCurrent=0,html='',i,status=document.cookie.indexOf(key+'=true');if(status>=0&&nb===0){html+=tarteaucitron.lang.useNoCookie;}else if(status>=0){for(i=0;i<nb;i+=1){if(document.cookie.indexOf(arr[i]+'=')!==-1){nbCurrent+=1;if(tarteaucitron.cookie.owner[arr[i]]===undefined){tarteaucitron.cookie.owner[arr[i]]=[];}
if(tarteaucitron.cookie.crossIndexOf(tarteaucitron.cookie.owner[arr[i]],tarteaucitron.services[key].name)===false){tarteaucitron.cookie.owner[arr[i]].push(tarteaucitron.services[key].name);}}}
if(nbCurrent>0){html+=tarteaucitron.lang.useCookieCurrent+' '+nbCurrent+' cookie';if(nbCurrent>1){html+='s';}
html+='.';}else{html+=tarteaucitron.lang.useNoCookie;}}else if(nb===0){html=tarteaucitron.lang.noCookie;}else{html+=tarteaucitron.lang.useCookie+' '+nb+' cookie';if(nb>1){html+='s';}
html+='.';}
if(document.getElementById('tacCL'+key)!==null){document.getElementById('tacCL'+key).innerHTML=html;}},"crossIndexOf":function(arr,match){"use strict";var i;for(i=0;i<arr.length;i+=1){if(arr[i]===match){return true;}}
return false;},"number":function(){"use strict";var cookies=document.cookie.split(';'),nb=(document.cookie!=='')?cookies.length:0,html='',i,name,namea,nameb,c,d,s=(nb>1)?'s':'',savedname,regex=/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i,regexedDomain=(tarteaucitron.cdn.match(regex)!==null)?tarteaucitron.cdn.match(regex)[1]:tarteaucitron.cdn,host=(tarteaucitron.domain!==undefined)?tarteaucitron.domain:regexedDomain;cookies=cookies.sort(function(a,b){namea=a.split('=',1).toString().replace(/ /g,'');nameb=b.split('=',1).toString().replace(/ /g,'');c=(tarteaucitron.cookie.owner[namea]!==undefined)?tarteaucitron.cookie.owner[namea]:'0';d=(tarteaucitron.cookie.owner[nameb]!==undefined)?tarteaucitron.cookie.owner[nameb]:'0';if(c+a>d+b){return 1;}
if(c+a<d+b){return-1;}
return 0;});if(document.cookie!==''){for(i=0;i<nb;i+=1){name=cookies[i].split('=',1).toString().replace(/ /g,'');if(tarteaucitron.cookie.owner[name]!==undefined&&tarteaucitron.cookie.owner[name].join(' // ')!==savedname){savedname=tarteaucitron.cookie.owner[name].join(' // ');html+='<div class="tarteaucitronHidden">';html+='     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';html+='        '+tarteaucitron.cookie.owner[name].join(' // ');html+='    </span>';html+='</div><ul class="cookie-list">';}else if(tarteaucitron.cookie.owner[name]===undefined&&host!==savedname){savedname=host;html+='<div class="tarteaucitronHidden">';html+='     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';html+='        '+host;html+='    </span>';html+='</div><ul class="cookie-list">';}
html+='<li class="tarteaucitronCookiesListMain">';html+='    <div class="tarteaucitronCookiesListLeft"><button type="button" class="purgeBtn" data-cookie="'+tarteaucitron.fixSelfXSS(cookies[i].split('=',1))+'"><strong>&times;</strong></button> <strong>'+tarteaucitron.fixSelfXSS(name)+'</strong>';html+='    </div>';html+='    <div class="tarteaucitronCookiesListRight">'+tarteaucitron.fixSelfXSS(cookies[i].split('=').slice(1).join('='))+'</div>';html+='</li>';}
html+='</ul>';}else{html+='<div class="tarteaucitronCookiesListMain">';html+='    <div class="tarteaucitronCookiesListLeft"><strong>-</strong></div>';html+='    <div class="tarteaucitronCookiesListRight"></div>';html+='</div>';}
html+='<div class="tarteaucitronHidden tarteaucitron-spacer-20"></div>';if(document.getElementById('tarteaucitronCookiesList')!==null){document.getElementById('tarteaucitronCookiesList').innerHTML=html;}
if(document.getElementById('tarteaucitronCookiesNumber')!==null){document.getElementById('tarteaucitronCookiesNumber').innerHTML=nb;document.getElementById('tarteaucitronCookiesNumber').setAttribute("aria-label",nb+' cookie'+s+" - "+tarteaucitron.lang.toggleInfoBox);document.getElementById('tarteaucitronCookiesNumber').setAttribute("title",nb+' cookie'+s+" - "+tarteaucitron.lang.toggleInfoBox);}
if(document.getElementById('tarteaucitronCookiesNumberBis')!==null){document.getElementById('tarteaucitronCookiesNumberBis').innerHTML=nb+' cookie'+s;}
var purgeBtns=document.getElementsByClassName("purgeBtn");for(i=0;i<purgeBtns.length;i++){tarteaucitron.addClickEventToElement(purgeBtns[i],function(){tarteaucitron.cookie.purge([this.dataset.cookie]);tarteaucitron.cookie.number();tarteaucitron.userInterface.jsSizing('cookie');return false;});}
for(i=0;i<tarteaucitron.job.length;i+=1){tarteaucitron.cookie.checkCount(tarteaucitron.job[i]);}}},"fixSelfXSS":function(html){return html.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");},"getLanguage":function(){"use strict";var availableLanguages='ar,bg,ca,cn,cs,da,de,et,el,en,es,fi,fr,hu,it,ja,lb,lt,lv,nl,no,oc,pl,pt,ro,ru,se,sk,sv,tr,uk,vi,zh',defaultLanguage='en';if(tarteaucitronForceLanguage!==''){if(availableLanguages.indexOf(tarteaucitronForceLanguage)!==-1){return tarteaucitronForceLanguage;}}
if(availableLanguages.indexOf(document.documentElement.getAttribute("lang").substr(0,2))!==-1){return document.documentElement.getAttribute("lang").substr(0,2);}
if(!navigator){return defaultLanguage;}
var lang=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null,userLanguage=lang?lang.substr(0,2):null;if(availableLanguages.indexOf(userLanguage)!==-1){return userLanguage;}
return defaultLanguage;},"getLocale":function(){"use strict";if(!navigator){return'en_US';}
var lang=navigator.language||navigator.browserLanguage||navigator.systemLanguage||navigator.userLang||null,userLanguage=lang?lang.substr(0,2):null;if(userLanguage==='fr'){return'fr_FR';}else if(userLanguage==='en'){return'en_US';}else if(userLanguage==='de'){return'de_DE';}else if(userLanguage==='es'){return'es_ES';}else if(userLanguage==='it'){return'it_IT';}else if(userLanguage==='pt'){return'pt_PT';}else if(userLanguage==='nl'){return'nl_NL';}else if(userLanguage==='el'){return'el_EL';}else{return'en_US';}},"addScript":function(url,id,callback,execute,attrName,attrVal,internal){"use strict";var script,done=false;if(execute===false){if(typeof callback==='function'){callback();}}else{script=document.createElement('script');if(id!==undefined){script.id=id;}
script.async=true;script.src=url;if(attrName!==undefined&&attrVal!==undefined){script.setAttribute(attrName,attrVal);}
if(typeof callback==='function'){if(!tarteaucitron.parameters.useExternalJs||!internal){script.onreadystatechange=script.onload=function(){var state=script.readyState;if(!done&&(!state||/loaded|complete/.test(state))){done=true;callback();}};}else{callback();}}
if(!tarteaucitron.parameters.useExternalJs||!internal){document.getElementsByTagName('head')[0].appendChild(script);}}},"addInternalScript":function(url,id,callback,execute,attrName,attrVal){tarteaucitron.addScript(url,id,callback,execute,attrName,attrVal,true);},"checkIfExist":function(elemId){"use strict";return document.getElementById(elemId)!==null&&document.getElementById(elemId).offsetWidth!==0&&document.getElementById(elemId).offsetHeight!==0;},"makeAsync":{"antiGhost":0,"buffer":'',"init":function(url,id){"use strict";var savedWrite=document.write,savedWriteln=document.writeln;document.write=function(content){tarteaucitron.makeAsync.buffer+=content;};document.writeln=function(content){tarteaucitron.makeAsync.buffer+=content.concat("\n");};setTimeout(function(){document.write=savedWrite;document.writeln=savedWriteln;},20000);tarteaucitron.makeAsync.getAndParse(url,id);},"getAndParse":function(url,id){"use strict";if(tarteaucitron.makeAsync.antiGhost>9){tarteaucitron.makeAsync.antiGhost=0;return;}
tarteaucitron.makeAsync.antiGhost+=1;tarteaucitron.addInternalScript(url,'',function(){if(document.getElementById(id)!==null){document.getElementById(id).innerHTML+="<span class='tarteaucitron-display-none'>&nbsp;</span>"+tarteaucitron.makeAsync.buffer;tarteaucitron.makeAsync.buffer='';tarteaucitron.makeAsync.execJS(id);}});},"execJS":function(id){var i,scripts,childId,type;if(document.getElementById(id)===null){return;}
scripts=document.getElementById(id).getElementsByTagName('script');for(i=0;i<scripts.length;i+=1){type=(scripts[i].getAttribute('type')!==null)?scripts[i].getAttribute('type'):'';if(type===''){type=(scripts[i].getAttribute('language')!==null)?scripts[i].getAttribute('language'):'';}
if(scripts[i].getAttribute('src')!==null&&scripts[i].getAttribute('src')!==''){childId=id+Math.floor(Math.random()*99999999999);document.getElementById(id).innerHTML+='<div id="'+childId+'"></div>';tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute('src'),childId);}else if(type.indexOf('javascript')!==-1||type===''){eval(scripts[i].innerHTML);}}}},"fallback":function(matchClass,content,noInner){"use strict";var elems=document.getElementsByTagName('*'),i,index=0;for(i in elems){if(elems[i]!==undefined){for(index=0;index<matchClass.length;index+=1){if((' '+elems[i].className+' ').indexOf(' '+matchClass[index]+' ')>-1){if(typeof content==='function'){if(noInner===true){content(elems[i]);}else{elems[i].innerHTML=content(elems[i]);}}else{elems[i].innerHTML=content;}}}}}},"engage":function(id){"use strict";var html='',r=Math.floor(Math.random()*100000),engage=tarteaucitron.services[id].name+' '+tarteaucitron.lang.fallback;if(tarteaucitron.lang['engage-'+id]!==undefined){engage=tarteaucitron.lang['engage-'+id];}
html+='<div class="tac_activate tac_activate_'+id+'">';html+='   <div class="tac_float">';html+='      '+engage;html+='      <button type="button" class="tarteaucitronAllow" id="Eng'+r+'ed'+id+'">';html+='          <span class="tarteaucitronCheck" aria-hidden="true"></span> '+tarteaucitron.lang.allow;html+='       </button>';html+='   </div>';html+='</div>';return html;},"extend":function(a,b){"use strict";var prop;for(prop in b){if(b.hasOwnProperty(prop)){a[prop]=b[prop];}}},"proTemp":'',"proTimer":function(){"use strict";setTimeout(tarteaucitron.proPing,(Math.floor(Math.random()*(1200-500+1))+500));},"pro":function(list){"use strict";tarteaucitron.proTemp+=list;clearTimeout(tarteaucitron.proTimer);tarteaucitron.proTimer=setTimeout(tarteaucitron.proPing,(Math.floor(Math.random()*(1200-500+1))+500));},"proPing":function(){"use strict";if(tarteaucitron.uuid!==''&&tarteaucitron.uuid!==undefined&&tarteaucitron.proTemp!==''&&tarteaucitronStatsEnabled){var div=document.getElementById('tarteaucitronPremium'),timestamp=new Date().getTime(),url='https://tarteaucitron.io/log/?';if(div===null){return;}
url+='account='+tarteaucitron.uuid+'&';url+='domain='+tarteaucitron.domain+'&';url+='status='+encodeURIComponent(tarteaucitron.proTemp)+'&';url+='_time='+timestamp;div.innerHTML='<img src="'+url+'" class="tarteaucitron-display-none" alt="" />';tarteaucitron.proTemp='';}
tarteaucitron.cookie.number();},"AddOrUpdate":function(source,custom){for(var key in custom){if(custom[key]instanceof Object){source[key]=tarteaucitron.AddOrUpdate(source[key],custom[key]);}else{source[key]=custom[key];}}
return source;},"getElemWidth":function(elem){return tarteaucitron.getElemAttr(elem,'width')||elem.clientWidth;},"getElemHeight":function(elem){return tarteaucitron.getElemAttr(elem,'height')||elem.clientHeight;},"getElemAttr":function(elem,attr){var attribute=elem.getAttribute('data-'+attr)||elem.getAttribute(attr);if(typeof attribute==='string'){return tarteaucitron.fixSelfXSS(attribute);}
return"";},"addClickEventToId":function(elemId,func){tarteaucitron.addClickEventToElement(document.getElementById(elemId),func);},"addClickEventToElement":function(e,func){if(e){if(e.addEventListener){e.addEventListener("click",func);}else{e.attachEvent("onclick",func);}}},"triggerJobsAfterAjaxCall":function(){tarteaucitron.job.forEach(function(e){tarteaucitron.job.push(e)});var i;var allowBtns=document.getElementsByClassName("tarteaucitronAllow");for(i=0;i<allowBtns.length;i++){tarteaucitron.addClickEventToElement(allowBtns[i],function(){tarteaucitron.userInterface.respond(this,true);});}
var denyBtns=document.getElementsByClassName("tarteaucitronDeny");for(i=0;i<denyBtns.length;i++){tarteaucitron.addClickEventToElement(denyBtns[i],function(){tarteaucitron.userInterface.respond(this,false);});}}};;tarteaucitron.services.rodanalytics={"key":"rodanalytics","type":"analytic","name":"Google Analytics","uri":"https://support.google.com/analytics/answer/6004245","readmoreLink":"https://tarteaucitron.io/service/analytics/","needConsent":true,"cookies":(function(){var cookies=['_ga','_gat','_gid','__utma','__utmb','__utmc','__utmt','__utmz'];if(tarteaucitron.user.multiplegtagUa!==undefined){tarteaucitron.user.multiplegtagUa.forEach(function(ua){cookies.push('_gat_gtag_'+ua.replace(/-/g,'_'));cookies.push('_ga_'+ua.replace(/G-/g,''));});}
return cookies;})(),"js":function(){"use strict";if(tarteaucitron.user.multiplegtagUa===undefined){return;}
window.GoogleAnalyticsObject='ga';window.ga=window.ga||function(){window.ga.q=window.ga.q||[];window.ga.q.push(arguments);};window.ga.l=new Date();tarteaucitron.addScript('https://www.google-analytics.com/analytics.js','',function(){var uaCreate={'cookieExpires':34128000};tarteaucitron.extend(uaCreate,tarteaucitron.user.analyticsUaCreate||{});tarteaucitron.user.multiplegtagUa.forEach(function(ua){ga('create',ua,uaCreate);});if(tarteaucitron.user.analyticsAnonymizeIp){ga('set','anonymizeIp',true);}
if(typeof tarteaucitron.user.analyticsPrepare==='function'){tarteaucitron.user.analyticsPrepare();}
if(tarteaucitron.user.analyticsPageView){ga('send','pageview',tarteaucitron.user.analyticsPageView);}else{ga('send','pageview');}
if(typeof tarteaucitron.user.analyticsMore==='function'){tarteaucitron.user.analyticsMore();}});}};tarteaucitron.services.geooffre={"key":"geooffre","type":"other","name":"Géolocalisation","uri":"/mentions-legales.html","readmoreLink":"/mentions-legales.html#info-cookie","needConsent":true,"cookies":['last_localisation'],"js":function(){"use strict";tarteaucitron.addScript('/static/js/geolocalisation.js');}};tarteaucitron.init({"privacyUrl":"/mentions-legales.html#info-cookie","hashtag":"#tarteaucitron","cookieName":"tarteaucitron","orientation":"middle","showAlertSmall":false,"cookieslist":false,"closePopup":false,"showIcon":false,"iconPosition":"BottomRight","adblocker":false,"DenyAllCta":false,"AcceptAllCta":true,"highPrivacy":true,"handleBrowserDNTRequest":false,"removeCredit":true,"moreInfoLink":true,"useExternalCss":true,"useExternalJs":false,"readmoreLink":"","mandatory":true,"googleConsentMode":true});(tarteaucitron.job=tarteaucitron.job||[]).push('gcmadstorage');(tarteaucitron.job=tarteaucitron.job||[]).push('gcmanalyticsstorage');(tarteaucitron.job=tarteaucitron.job||[]).push('gcmfunctionality');(tarteaucitron.job=tarteaucitron.job||[]).push('gcmpersonalization');(tarteaucitron.job=tarteaucitron.job||[]).push('gcmadsuserdata');(tarteaucitron.job=tarteaucitron.job||[]).push('gcmsecurity');(tarteaucitron.job=tarteaucitron.job||[]).push('facebook');(tarteaucitron.job=tarteaucitron.job||[]).push('facebooklikebox');(tarteaucitron.job=tarteaucitron.job||[]).push('twitter');if(typeof TC_GEOOFFRE!=="undefined"){(tarteaucitron.job=tarteaucitron.job||[]).push('geooffre');}
if(typeof TC_GTM_KEY!=="undefined"){tarteaucitron.user.googletagmanagerId=TC_GTM_KEY;(tarteaucitron.job=tarteaucitron.job||[]).push('googletagmanager');}
if(typeof TC_GA_KEYS!=="undefined"&&TC_GA_KEYS.length>0){tarteaucitron.user.multiplegtagUa=TC_GA_KEYS;(tarteaucitron.job=tarteaucitron.job||[]).push('rodanalytics');};$(document).ready(function(){var lazyImages,lazySliders,lazyBackgrounds;var active=false;var getContainers=function(){lazyImages=[].slice.call(document.getElementsByClassName("lazy"));lazySliders=[].slice.call(document.getElementsByClassName("lazy-slider"));lazyBackgrounds=[].slice.call(document.getElementsByClassName("lazy-background"));}
var lazyLoad=function(){if(active===false){active=true;setTimeout(function(){if(lazyImages.length!==0){lazyImages.forEach(function(lazyImage){if((lazyImage.getBoundingClientRect().top<=window.innerHeight&&lazyImage.getBoundingClientRect().bottom>=0)&&getComputedStyle(lazyImage).display!=="none"){lazyImage.src=lazyImage.dataset.src;lazyImage.classList.remove("lazy");}});}
if(lazySliders.length!==0){lazySliders.forEach(function(lazySlide){if((lazySlide.getBoundingClientRect().top<=window.innerHeight&&lazySlide.getBoundingClientRect().bottom>=0)&&getComputedStyle(lazySlide).display!=="none"){lazySlide.src=lazySlide.dataset.src;lazySlide.classList.remove("lazy-slider");}});}
if(lazyBackgrounds.length!==0){lazyBackgrounds.forEach(function(lazyBackground){if((lazyBackground.getBoundingClientRect().top<=window.innerHeight&&lazyBackground.getBoundingClientRect().bottom>=0)&&getComputedStyle(lazyBackground).display!=="none"){lazyBackground.classList.remove("lazy-background");lazyBackground.classList.add("visible");}});}
getContainers()
if(lazySliders.length===0&&lazyBackgrounds.length===0&&lazyImages.length===0){window.removeEventListener("load",lazyLoad);document.removeEventListener("scroll",lazyLoad);window.removeEventListener("resize",lazyLoad);window.removeEventListener("orientationchange",lazyLoad);}
active=false;},200);}};getContainers()
document.addEventListener("scroll",lazyLoad);window.addEventListener("resize",lazyLoad);window.addEventListener("orientationchange",lazyLoad);document.addEventListener("lazy-load",function(){getContainers()
lazyLoad();});lazyLoad();});;(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.Swiper=factory());}(this,(function(){'use strict';function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}
return target;};return _extends.apply(this,arguments);}
function isObject(obj){return obj!==null&&typeof obj==='object'&&'constructor'in obj&&obj.constructor===Object;}
function extend(target,src){if(target===void 0){target={};}
if(src===void 0){src={};}
Object.keys(src).forEach(function(key){if(typeof target[key]==='undefined')target[key]=src[key];else if(isObject(src[key])&&isObject(target[key])&&Object.keys(src[key]).length>0){extend(target[key],src[key]);}});}
var ssrDocument={body:{},addEventListener:function addEventListener(){},removeEventListener:function removeEventListener(){},activeElement:{blur:function blur(){},nodeName:''},querySelector:function querySelector(){return null;},querySelectorAll:function querySelectorAll(){return[];},getElementById:function getElementById(){return null;},createEvent:function createEvent(){return{initEvent:function initEvent(){}};},createElement:function createElement(){return{children:[],childNodes:[],style:{},setAttribute:function setAttribute(){},getElementsByTagName:function getElementsByTagName(){return[];}};},createElementNS:function createElementNS(){return{};},importNode:function importNode(){return null;},location:{hash:'',host:'',hostname:'',href:'',origin:'',pathname:'',protocol:'',search:''}};function getDocument(){var doc=typeof document!=='undefined'?document:{};extend(doc,ssrDocument);return doc;}
var ssrWindow={document:ssrDocument,navigator:{userAgent:''},location:{hash:'',host:'',hostname:'',href:'',origin:'',pathname:'',protocol:'',search:''},history:{replaceState:function replaceState(){},pushState:function pushState(){},go:function go(){},back:function back(){}},CustomEvent:function CustomEvent(){return this;},addEventListener:function addEventListener(){},removeEventListener:function removeEventListener(){},getComputedStyle:function getComputedStyle(){return{getPropertyValue:function getPropertyValue(){return'';}};},Image:function Image(){},Date:function Date(){},screen:{},setTimeout:function setTimeout(){},clearTimeout:function clearTimeout(){},matchMedia:function matchMedia(){return{};},requestAnimationFrame:function requestAnimationFrame(callback){if(typeof setTimeout==='undefined'){callback();return null;}
return setTimeout(callback,0);},cancelAnimationFrame:function cancelAnimationFrame(id){if(typeof setTimeout==='undefined'){return;}
clearTimeout(id);}};function getWindow(){var win=typeof window!=='undefined'?window:{};extend(win,ssrWindow);return win;}
function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;}
function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}
function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}
function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}
function _construct(Parent,args,Class){if(_isNativeReflectConstruct()){_construct=Reflect.construct;}else{_construct=function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var Constructor=Function.bind.apply(Parent,a);var instance=new Constructor();if(Class)_setPrototypeOf(instance,Class.prototype);return instance;};}
return _construct.apply(null,arguments);}
function _isNativeFunction(fn){return Function.toString.call(fn).indexOf("[native code]")!==-1;}
function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map():undefined;_wrapNativeSuper=function _wrapNativeSuper(Class){if(Class===null||!_isNativeFunction(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function");}
if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper);}
function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor);}
Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,Class);};return _wrapNativeSuper(Class);}
function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}
return self;}
function makeReactive(obj){var proto=obj.__proto__;Object.defineProperty(obj,'__proto__',{get:function get(){return proto;},set:function set(value){proto.__proto__=value;}});}
var Dom7=function(_Array){_inheritsLoose(Dom7,_Array);function Dom7(items){var _this;_this=_Array.call.apply(_Array,[this].concat(items))||this;makeReactive(_assertThisInitialized(_this));return _this;}
return Dom7;}(_wrapNativeSuper(Array));function arrayFlat(arr){if(arr===void 0){arr=[];}
var res=[];arr.forEach(function(el){if(Array.isArray(el)){res.push.apply(res,arrayFlat(el));}else{res.push(el);}});return res;}
function arrayFilter(arr,callback){return Array.prototype.filter.call(arr,callback);}
function arrayUnique(arr){var uniqueArray=[];for(var i=0;i<arr.length;i+=1){if(uniqueArray.indexOf(arr[i])===-1)uniqueArray.push(arr[i]);}
return uniqueArray;}
function qsa(selector,context){if(typeof selector!=='string'){return[selector];}
var a=[];var res=context.querySelectorAll(selector);for(var i=0;i<res.length;i+=1){a.push(res[i]);}
return a;}
function $(selector,context){var window=getWindow();var document=getDocument();var arr=[];if(!context&&selector instanceof Dom7){return selector;}
if(!selector){return new Dom7(arr);}
if(typeof selector==='string'){var html=selector.trim();if(html.indexOf('<')>=0&&html.indexOf('>')>=0){var toCreate='div';if(html.indexOf('<li')===0)toCreate='ul';if(html.indexOf('<tr')===0)toCreate='tbody';if(html.indexOf('<td')===0||html.indexOf('<th')===0)toCreate='tr';if(html.indexOf('<tbody')===0)toCreate='table';if(html.indexOf('<option')===0)toCreate='select';var tempParent=document.createElement(toCreate);tempParent.innerHTML=html;for(var i=0;i<tempParent.childNodes.length;i+=1){arr.push(tempParent.childNodes[i]);}}else{arr=qsa(selector.trim(),context||document);}}else if(selector.nodeType||selector===window||selector===document){arr.push(selector);}else if(Array.isArray(selector)){if(selector instanceof Dom7)return selector;arr=selector;}
return new Dom7(arrayUnique(arr));}
$.fn=Dom7.prototype;function addClass(){for(var _len=arguments.length,classes=new Array(_len),_key=0;_key<_len;_key++){classes[_key]=arguments[_key];}
var classNames=arrayFlat(classes.map(function(c){return c.split(' ');}));this.forEach(function(el){var _el$classList;(_el$classList=el.classList).add.apply(_el$classList,classNames);});return this;}
function removeClass(){for(var _len2=arguments.length,classes=new Array(_len2),_key2=0;_key2<_len2;_key2++){classes[_key2]=arguments[_key2];}
var classNames=arrayFlat(classes.map(function(c){return c.split(' ');}));this.forEach(function(el){var _el$classList2;(_el$classList2=el.classList).remove.apply(_el$classList2,classNames);});return this;}
function toggleClass(){for(var _len3=arguments.length,classes=new Array(_len3),_key3=0;_key3<_len3;_key3++){classes[_key3]=arguments[_key3];}
var classNames=arrayFlat(classes.map(function(c){return c.split(' ');}));this.forEach(function(el){classNames.forEach(function(className){el.classList.toggle(className);});});}
function hasClass(){for(var _len4=arguments.length,classes=new Array(_len4),_key4=0;_key4<_len4;_key4++){classes[_key4]=arguments[_key4];}
var classNames=arrayFlat(classes.map(function(c){return c.split(' ');}));return arrayFilter(this,function(el){return classNames.filter(function(className){return el.classList.contains(className);}).length>0;}).length>0;}
function attr(attrs,value){if(arguments.length===1&&typeof attrs==='string'){if(this[0])return this[0].getAttribute(attrs);return undefined;}
for(var i=0;i<this.length;i+=1){if(arguments.length===2){this[i].setAttribute(attrs,value);}else{for(var attrName in attrs){this[i][attrName]=attrs[attrName];this[i].setAttribute(attrName,attrs[attrName]);}}}
return this;}
function removeAttr(attr){for(var i=0;i<this.length;i+=1){this[i].removeAttribute(attr);}
return this;}
function transform(transform){for(var i=0;i<this.length;i+=1){this[i].style.transform=transform;}
return this;}
function transition(duration){for(var i=0;i<this.length;i+=1){this[i].style.transitionDuration=typeof duration!=='string'?duration+"ms":duration;}
return this;}
function on(){for(var _len5=arguments.length,args=new Array(_len5),_key5=0;_key5<_len5;_key5++){args[_key5]=arguments[_key5];}
var eventType=args[0],targetSelector=args[1],listener=args[2],capture=args[3];if(typeof args[1]==='function'){eventType=args[0];listener=args[1];capture=args[2];targetSelector=undefined;}
if(!capture)capture=false;function handleLiveEvent(e){var target=e.target;if(!target)return;var eventData=e.target.dom7EventData||[];if(eventData.indexOf(e)<0){eventData.unshift(e);}
if($(target).is(targetSelector))listener.apply(target,eventData);else{var _parents=$(target).parents();for(var k=0;k<_parents.length;k+=1){if($(_parents[k]).is(targetSelector))listener.apply(_parents[k],eventData);}}}
function handleEvent(e){var eventData=e&&e.target?e.target.dom7EventData||[]:[];if(eventData.indexOf(e)<0){eventData.unshift(e);}
listener.apply(this,eventData);}
var events=eventType.split(' ');var j;for(var i=0;i<this.length;i+=1){var el=this[i];if(!targetSelector){for(j=0;j<events.length;j+=1){var event=events[j];if(!el.dom7Listeners)el.dom7Listeners={};if(!el.dom7Listeners[event])el.dom7Listeners[event]=[];el.dom7Listeners[event].push({listener:listener,proxyListener:handleEvent});el.addEventListener(event,handleEvent,capture);}}else{for(j=0;j<events.length;j+=1){var _event=events[j];if(!el.dom7LiveListeners)el.dom7LiveListeners={};if(!el.dom7LiveListeners[_event])el.dom7LiveListeners[_event]=[];el.dom7LiveListeners[_event].push({listener:listener,proxyListener:handleLiveEvent});el.addEventListener(_event,handleLiveEvent,capture);}}}
return this;}
function off(){for(var _len6=arguments.length,args=new Array(_len6),_key6=0;_key6<_len6;_key6++){args[_key6]=arguments[_key6];}
var eventType=args[0],targetSelector=args[1],listener=args[2],capture=args[3];if(typeof args[1]==='function'){eventType=args[0];listener=args[1];capture=args[2];targetSelector=undefined;}
if(!capture)capture=false;var events=eventType.split(' ');for(var i=0;i<events.length;i+=1){var event=events[i];for(var j=0;j<this.length;j+=1){var el=this[j];var handlers=void 0;if(!targetSelector&&el.dom7Listeners){handlers=el.dom7Listeners[event];}else if(targetSelector&&el.dom7LiveListeners){handlers=el.dom7LiveListeners[event];}
if(handlers&&handlers.length){for(var k=handlers.length-1;k>=0;k-=1){var handler=handlers[k];if(listener&&handler.listener===listener){el.removeEventListener(event,handler.proxyListener,capture);handlers.splice(k,1);}else if(listener&&handler.listener&&handler.listener.dom7proxy&&handler.listener.dom7proxy===listener){el.removeEventListener(event,handler.proxyListener,capture);handlers.splice(k,1);}else if(!listener){el.removeEventListener(event,handler.proxyListener,capture);handlers.splice(k,1);}}}}}
return this;}
function trigger(){var window=getWindow();for(var _len9=arguments.length,args=new Array(_len9),_key9=0;_key9<_len9;_key9++){args[_key9]=arguments[_key9];}
var events=args[0].split(' ');var eventData=args[1];for(var i=0;i<events.length;i+=1){var event=events[i];for(var j=0;j<this.length;j+=1){var el=this[j];if(window.CustomEvent){var evt=new window.CustomEvent(event,{detail:eventData,bubbles:true,cancelable:true});el.dom7EventData=args.filter(function(data,dataIndex){return dataIndex>0;});el.dispatchEvent(evt);el.dom7EventData=[];delete el.dom7EventData;}}}
return this;}
function transitionEnd(callback){var dom=this;function fireCallBack(e){if(e.target!==this)return;callback.call(this,e);dom.off('transitionend',fireCallBack);}
if(callback){dom.on('transitionend',fireCallBack);}
return this;}
function outerWidth(includeMargins){if(this.length>0){if(includeMargins){var _styles=this.styles();return this[0].offsetWidth+parseFloat(_styles.getPropertyValue('margin-right'))+parseFloat(_styles.getPropertyValue('margin-left'));}
return this[0].offsetWidth;}
return null;}
function outerHeight(includeMargins){if(this.length>0){if(includeMargins){var _styles2=this.styles();return this[0].offsetHeight+parseFloat(_styles2.getPropertyValue('margin-top'))+parseFloat(_styles2.getPropertyValue('margin-bottom'));}
return this[0].offsetHeight;}
return null;}
function offset(){if(this.length>0){var window=getWindow();var document=getDocument();var el=this[0];var box=el.getBoundingClientRect();var body=document.body;var clientTop=el.clientTop||body.clientTop||0;var clientLeft=el.clientLeft||body.clientLeft||0;var scrollTop=el===window?window.scrollY:el.scrollTop;var scrollLeft=el===window?window.scrollX:el.scrollLeft;return{top:box.top+scrollTop-clientTop,left:box.left+scrollLeft-clientLeft};}
return null;}
function styles(){var window=getWindow();if(this[0])return window.getComputedStyle(this[0],null);return{};}
function css(props,value){var window=getWindow();var i;if(arguments.length===1){if(typeof props==='string'){if(this[0])return window.getComputedStyle(this[0],null).getPropertyValue(props);}else{for(i=0;i<this.length;i+=1){for(var _prop in props){this[i].style[_prop]=props[_prop];}}
return this;}}
if(arguments.length===2&&typeof props==='string'){for(i=0;i<this.length;i+=1){this[i].style[props]=value;}
return this;}
return this;}
function each(callback){if(!callback)return this;this.forEach(function(el,index){callback.apply(el,[el,index]);});return this;}
function filter(callback){var result=arrayFilter(this,callback);return $(result);}
function html(html){if(typeof html==='undefined'){return this[0]?this[0].innerHTML:null;}
for(var i=0;i<this.length;i+=1){this[i].innerHTML=html;}
return this;}
function text(text){if(typeof text==='undefined'){return this[0]?this[0].textContent.trim():null;}
for(var i=0;i<this.length;i+=1){this[i].textContent=text;}
return this;}
function is(selector){var window=getWindow();var document=getDocument();var el=this[0];var compareWith;var i;if(!el||typeof selector==='undefined')return false;if(typeof selector==='string'){if(el.matches)return el.matches(selector);if(el.webkitMatchesSelector)return el.webkitMatchesSelector(selector);if(el.msMatchesSelector)return el.msMatchesSelector(selector);compareWith=$(selector);for(i=0;i<compareWith.length;i+=1){if(compareWith[i]===el)return true;}
return false;}
if(selector===document){return el===document;}
if(selector===window){return el===window;}
if(selector.nodeType||selector instanceof Dom7){compareWith=selector.nodeType?[selector]:selector;for(i=0;i<compareWith.length;i+=1){if(compareWith[i]===el)return true;}
return false;}
return false;}
function index(){var child=this[0];var i;if(child){i=0;while((child=child.previousSibling)!==null){if(child.nodeType===1)i+=1;}
return i;}
return undefined;}
function eq(index){if(typeof index==='undefined')return this;var length=this.length;if(index>length-1){return $([]);}
if(index<0){var returnIndex=length+index;if(returnIndex<0)return $([]);return $([this[returnIndex]]);}
return $([this[index]]);}
function append(){var newChild;var document=getDocument();for(var k=0;k<arguments.length;k+=1){newChild=k<0||arguments.length<=k?undefined:arguments[k];for(var i=0;i<this.length;i+=1){if(typeof newChild==='string'){var tempDiv=document.createElement('div');tempDiv.innerHTML=newChild;while(tempDiv.firstChild){this[i].appendChild(tempDiv.firstChild);}}else if(newChild instanceof Dom7){for(var j=0;j<newChild.length;j+=1){this[i].appendChild(newChild[j]);}}else{this[i].appendChild(newChild);}}}
return this;}
function prepend(newChild){var document=getDocument();var i;var j;for(i=0;i<this.length;i+=1){if(typeof newChild==='string'){var tempDiv=document.createElement('div');tempDiv.innerHTML=newChild;for(j=tempDiv.childNodes.length-1;j>=0;j-=1){this[i].insertBefore(tempDiv.childNodes[j],this[i].childNodes[0]);}}else if(newChild instanceof Dom7){for(j=0;j<newChild.length;j+=1){this[i].insertBefore(newChild[j],this[i].childNodes[0]);}}else{this[i].insertBefore(newChild,this[i].childNodes[0]);}}
return this;}
function next(selector){if(this.length>0){if(selector){if(this[0].nextElementSibling&&$(this[0].nextElementSibling).is(selector)){return $([this[0].nextElementSibling]);}
return $([]);}
if(this[0].nextElementSibling)return $([this[0].nextElementSibling]);return $([]);}
return $([]);}
function nextAll(selector){var nextEls=[];var el=this[0];if(!el)return $([]);while(el.nextElementSibling){var _next=el.nextElementSibling;if(selector){if($(_next).is(selector))nextEls.push(_next);}else nextEls.push(_next);el=_next;}
return $(nextEls);}
function prev(selector){if(this.length>0){var el=this[0];if(selector){if(el.previousElementSibling&&$(el.previousElementSibling).is(selector)){return $([el.previousElementSibling]);}
return $([]);}
if(el.previousElementSibling)return $([el.previousElementSibling]);return $([]);}
return $([]);}
function prevAll(selector){var prevEls=[];var el=this[0];if(!el)return $([]);while(el.previousElementSibling){var _prev=el.previousElementSibling;if(selector){if($(_prev).is(selector))prevEls.push(_prev);}else prevEls.push(_prev);el=_prev;}
return $(prevEls);}
function parent(selector){var parents=[];for(var i=0;i<this.length;i+=1){if(this[i].parentNode!==null){if(selector){if($(this[i].parentNode).is(selector))parents.push(this[i].parentNode);}else{parents.push(this[i].parentNode);}}}
return $(parents);}
function parents(selector){var parents=[];for(var i=0;i<this.length;i+=1){var _parent=this[i].parentNode;while(_parent){if(selector){if($(_parent).is(selector))parents.push(_parent);}else{parents.push(_parent);}
_parent=_parent.parentNode;}}
return $(parents);}
function closest(selector){var closest=this;if(typeof selector==='undefined'){return $([]);}
if(!closest.is(selector)){closest=closest.parents(selector).eq(0);}
return closest;}
function find(selector){var foundElements=[];for(var i=0;i<this.length;i+=1){var found=this[i].querySelectorAll(selector);for(var j=0;j<found.length;j+=1){foundElements.push(found[j]);}}
return $(foundElements);}
function children(selector){var children=[];for(var i=0;i<this.length;i+=1){var childNodes=this[i].children;for(var j=0;j<childNodes.length;j+=1){if(!selector||$(childNodes[j]).is(selector)){children.push(childNodes[j]);}}}
return $(children);}
function remove(){for(var i=0;i<this.length;i+=1){if(this[i].parentNode)this[i].parentNode.removeChild(this[i]);}
return this;}
var Methods={addClass:addClass,removeClass:removeClass,hasClass:hasClass,toggleClass:toggleClass,attr:attr,removeAttr:removeAttr,transform:transform,transition:transition,on:on,off:off,trigger:trigger,transitionEnd:transitionEnd,outerWidth:outerWidth,outerHeight:outerHeight,styles:styles,offset:offset,css:css,each:each,html:html,text:text,is:is,index:index,eq:eq,append:append,prepend:prepend,next:next,nextAll:nextAll,prev:prev,prevAll:prevAll,parent:parent,parents:parents,closest:closest,find:find,children:children,filter:filter,remove:remove};Object.keys(Methods).forEach(function(methodName){$.fn[methodName]=Methods[methodName];});function deleteProps(obj){var object=obj;Object.keys(object).forEach(function(key){try{object[key]=null;}catch(e){}
try{delete object[key];}catch(e){}});}
function nextTick(callback,delay){if(delay===void 0){delay=0;}
return setTimeout(callback,delay);}
function now(){return Date.now();}
function getTranslate(el,axis){if(axis===void 0){axis='x';}
var window=getWindow();var matrix;var curTransform;var transformMatrix;var curStyle=window.getComputedStyle(el,null);if(window.WebKitCSSMatrix){curTransform=curStyle.transform||curStyle.webkitTransform;if(curTransform.split(',').length>6){curTransform=curTransform.split(', ').map(function(a){return a.replace(',','.');}).join(', ');}
transformMatrix=new window.WebKitCSSMatrix(curTransform==='none'?'':curTransform);}else{transformMatrix=curStyle.MozTransform||curStyle.OTransform||curStyle.MsTransform||curStyle.msTransform||curStyle.transform||curStyle.getPropertyValue('transform').replace('translate(','matrix(1, 0, 0, 1,');matrix=transformMatrix.toString().split(',');}
if(axis==='x'){if(window.WebKitCSSMatrix)curTransform=transformMatrix.m41;else if(matrix.length===16)curTransform=parseFloat(matrix[12]);else curTransform=parseFloat(matrix[4]);}
if(axis==='y'){if(window.WebKitCSSMatrix)curTransform=transformMatrix.m42;else if(matrix.length===16)curTransform=parseFloat(matrix[13]);else curTransform=parseFloat(matrix[5]);}
return curTransform||0;}
function isObject$1(o){return typeof o==='object'&&o!==null&&o.constructor&&o.constructor===Object;}
function extend$1(){var to=Object(arguments.length<=0?undefined:arguments[0]);for(var i=1;i<arguments.length;i+=1){var nextSource=i<0||arguments.length<=i?undefined:arguments[i];if(nextSource!==undefined&&nextSource!==null){var keysArray=Object.keys(Object(nextSource));for(var nextIndex=0,len=keysArray.length;nextIndex<len;nextIndex+=1){var nextKey=keysArray[nextIndex];var desc=Object.getOwnPropertyDescriptor(nextSource,nextKey);if(desc!==undefined&&desc.enumerable){if(isObject$1(to[nextKey])&&isObject$1(nextSource[nextKey])){extend$1(to[nextKey],nextSource[nextKey]);}else if(!isObject$1(to[nextKey])&&isObject$1(nextSource[nextKey])){to[nextKey]={};extend$1(to[nextKey],nextSource[nextKey]);}else{to[nextKey]=nextSource[nextKey];}}}}}
return to;}
function bindModuleMethods(instance,obj){Object.keys(obj).forEach(function(key){if(isObject$1(obj[key])){Object.keys(obj[key]).forEach(function(subKey){if(typeof obj[key][subKey]==='function'){obj[key][subKey]=obj[key][subKey].bind(instance);}});}
instance[key]=obj[key];});}
var support;function calcSupport(){var window=getWindow();var document=getDocument();return{touch:!!('ontouchstart'in window||window.DocumentTouch&&document instanceof window.DocumentTouch),pointerEvents:!!window.PointerEvent&&'maxTouchPoints'in window.navigator&&window.navigator.maxTouchPoints>=0,observer:function checkObserver(){return'MutationObserver'in window||'WebkitMutationObserver'in window;}(),passiveListener:function checkPassiveListener(){var supportsPassive=false;try{var opts=Object.defineProperty({},'passive',{get:function get(){supportsPassive=true;}});window.addEventListener('testPassiveListener',null,opts);}catch(e){}
return supportsPassive;}(),gestures:function checkGestures(){return'ongesturestart'in window;}()};}
function getSupport(){if(!support){support=calcSupport();}
return support;}
var device;function calcDevice(_temp){var _ref=_temp===void 0?{}:_temp,userAgent=_ref.userAgent;var support=getSupport();var window=getWindow();var platform=window.navigator.platform;var ua=userAgent||window.navigator.userAgent;var device={ios:false,android:false};var screenWidth=window.screen.width;var screenHeight=window.screen.height;var android=ua.match(/(Android);?[\s\/]+([\d.]+)?/);var ipad=ua.match(/(iPad).*OS\s([\d_]+)/);var ipod=ua.match(/(iPod)(.*OS\s([\d_]+))?/);var iphone=!ipad&&ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);var windows=platform==='Win32';var macos=platform==='MacIntel';var iPadScreens=['1024x1366','1366x1024','834x1194','1194x834','834x1112','1112x834','768x1024','1024x768','820x1180','1180x820','810x1080','1080x810'];if(!ipad&&macos&&support.touch&&iPadScreens.indexOf(screenWidth+"x"+screenHeight)>=0){ipad=ua.match(/(Version)\/([\d.]+)/);if(!ipad)ipad=[0,1,'13_0_0'];macos=false;}
if(android&&!windows){device.os='android';device.android=true;}
if(ipad||iphone||ipod){device.os='ios';device.ios=true;}
return device;}
function getDevice(overrides){if(overrides===void 0){overrides={};}
if(!device){device=calcDevice(overrides);}
return device;}
var browser;function calcBrowser(){var window=getWindow();function isSafari(){var ua=window.navigator.userAgent.toLowerCase();return ua.indexOf('safari')>=0&&ua.indexOf('chrome')<0&&ua.indexOf('android')<0;}
return{isEdge:!!window.navigator.userAgent.match(/Edge/g),isSafari:isSafari(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)};}
function getBrowser(){if(!browser){browser=calcBrowser();}
return browser;}
var Resize={name:'resize',create:function create(){var swiper=this;extend$1(swiper,{resize:{resizeHandler:function resizeHandler(){if(!swiper||swiper.destroyed||!swiper.initialized)return;swiper.emit('beforeResize');swiper.emit('resize');},orientationChangeHandler:function orientationChangeHandler(){if(!swiper||swiper.destroyed||!swiper.initialized)return;swiper.emit('orientationchange');}}});},on:{init:function init(swiper){var window=getWindow();window.addEventListener('resize',swiper.resize.resizeHandler);window.addEventListener('orientationchange',swiper.resize.orientationChangeHandler);},destroy:function destroy(swiper){var window=getWindow();window.removeEventListener('resize',swiper.resize.resizeHandler);window.removeEventListener('orientationchange',swiper.resize.orientationChangeHandler);}}};var Observer={attach:function attach(target,options){if(options===void 0){options={};}
var window=getWindow();var swiper=this;var ObserverFunc=window.MutationObserver||window.WebkitMutationObserver;var observer=new ObserverFunc(function(mutations){if(mutations.length===1){swiper.emit('observerUpdate',mutations[0]);return;}
var observerUpdate=function observerUpdate(){swiper.emit('observerUpdate',mutations[0]);};if(window.requestAnimationFrame){window.requestAnimationFrame(observerUpdate);}else{window.setTimeout(observerUpdate,0);}});observer.observe(target,{attributes:typeof options.attributes==='undefined'?true:options.attributes,childList:typeof options.childList==='undefined'?true:options.childList,characterData:typeof options.characterData==='undefined'?true:options.characterData});swiper.observer.observers.push(observer);},init:function init(){var swiper=this;if(!swiper.support.observer||!swiper.params.observer)return;if(swiper.params.observeParents){var containerParents=swiper.$el.parents();for(var i=0;i<containerParents.length;i+=1){swiper.observer.attach(containerParents[i]);}}
swiper.observer.attach(swiper.$el[0],{childList:swiper.params.observeSlideChildren});swiper.observer.attach(swiper.$wrapperEl[0],{attributes:false});},destroy:function destroy(){var swiper=this;swiper.observer.observers.forEach(function(observer){observer.disconnect();});swiper.observer.observers=[];}};var Observer$1={name:'observer',params:{observer:false,observeParents:false,observeSlideChildren:false},create:function create(){var swiper=this;bindModuleMethods(swiper,{observer:_extends({},Observer,{observers:[]})});},on:{init:function init(swiper){swiper.observer.init();},destroy:function destroy(swiper){swiper.observer.destroy();}}};var modular={useParams:function useParams(instanceParams){var instance=this;if(!instance.modules)return;Object.keys(instance.modules).forEach(function(moduleName){var module=instance.modules[moduleName];if(module.params){extend$1(instanceParams,module.params);}});},useModules:function useModules(modulesParams){if(modulesParams===void 0){modulesParams={};}
var instance=this;if(!instance.modules)return;Object.keys(instance.modules).forEach(function(moduleName){var module=instance.modules[moduleName];var moduleParams=modulesParams[moduleName]||{};if(module.on&&instance.on){Object.keys(module.on).forEach(function(moduleEventName){instance.on(moduleEventName,module.on[moduleEventName]);});}
if(module.create){module.create.bind(instance)(moduleParams);}});}};var eventsEmitter={on:function on(events,handler,priority){var self=this;if(typeof handler!=='function')return self;var method=priority?'unshift':'push';events.split(' ').forEach(function(event){if(!self.eventsListeners[event])self.eventsListeners[event]=[];self.eventsListeners[event][method](handler);});return self;},once:function once(events,handler,priority){var self=this;if(typeof handler!=='function')return self;function onceHandler(){self.off(events,onceHandler);if(onceHandler.__emitterProxy){delete onceHandler.__emitterProxy;}
for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}
handler.apply(self,args);}
onceHandler.__emitterProxy=handler;return self.on(events,onceHandler,priority);},onAny:function onAny(handler,priority){var self=this;if(typeof handler!=='function')return self;var method=priority?'unshift':'push';if(self.eventsAnyListeners.indexOf(handler)<0){self.eventsAnyListeners[method](handler);}
return self;},offAny:function offAny(handler){var self=this;if(!self.eventsAnyListeners)return self;var index=self.eventsAnyListeners.indexOf(handler);if(index>=0){self.eventsAnyListeners.splice(index,1);}
return self;},off:function off(events,handler){var self=this;if(!self.eventsListeners)return self;events.split(' ').forEach(function(event){if(typeof handler==='undefined'){self.eventsListeners[event]=[];}else if(self.eventsListeners[event]){self.eventsListeners[event].forEach(function(eventHandler,index){if(eventHandler===handler||eventHandler.__emitterProxy&&eventHandler.__emitterProxy===handler){self.eventsListeners[event].splice(index,1);}});}});return self;},emit:function emit(){var self=this;if(!self.eventsListeners)return self;var events;var data;var context;for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}
if(typeof args[0]==='string'||Array.isArray(args[0])){events=args[0];data=args.slice(1,args.length);context=self;}else{events=args[0].events;data=args[0].data;context=args[0].context||self;}
data.unshift(context);var eventsArray=Array.isArray(events)?events:events.split(' ');eventsArray.forEach(function(event){if(self.eventsAnyListeners&&self.eventsAnyListeners.length){self.eventsAnyListeners.forEach(function(eventHandler){eventHandler.apply(context,[event].concat(data));});}
if(self.eventsListeners&&self.eventsListeners[event]){self.eventsListeners[event].forEach(function(eventHandler){eventHandler.apply(context,data);});}});return self;}};function updateSize(){var swiper=this;var width;var height;var $el=swiper.$el;if(typeof swiper.params.width!=='undefined'&&swiper.params.width!==null){width=swiper.params.width;}else{width=$el[0].clientWidth;}
if(typeof swiper.params.height!=='undefined'&&swiper.params.height!==null){height=swiper.params.height;}else{height=$el[0].clientHeight;}
if(width===0&&swiper.isHorizontal()||height===0&&swiper.isVertical()){return;}
width=width-parseInt($el.css('padding-left')||0,10)-parseInt($el.css('padding-right')||0,10);height=height-parseInt($el.css('padding-top')||0,10)-parseInt($el.css('padding-bottom')||0,10);if(Number.isNaN(width))width=0;if(Number.isNaN(height))height=0;extend$1(swiper,{width:width,height:height,size:swiper.isHorizontal()?width:height});}
function updateSlides(){var swiper=this;var window=getWindow();var params=swiper.params;var $wrapperEl=swiper.$wrapperEl,swiperSize=swiper.size,rtl=swiper.rtlTranslate,wrongRTL=swiper.wrongRTL;var isVirtual=swiper.virtual&&params.virtual.enabled;var previousSlidesLength=isVirtual?swiper.virtual.slides.length:swiper.slides.length;var slides=$wrapperEl.children("."+swiper.params.slideClass);var slidesLength=isVirtual?swiper.virtual.slides.length:slides.length;var snapGrid=[];var slidesGrid=[];var slidesSizesGrid=[];function slidesForMargin(slideEl,slideIndex){if(!params.cssMode)return true;if(slideIndex===slides.length-1){return false;}
return true;}
var offsetBefore=params.slidesOffsetBefore;if(typeof offsetBefore==='function'){offsetBefore=params.slidesOffsetBefore.call(swiper);}
var offsetAfter=params.slidesOffsetAfter;if(typeof offsetAfter==='function'){offsetAfter=params.slidesOffsetAfter.call(swiper);}
var previousSnapGridLength=swiper.snapGrid.length;var previousSlidesGridLength=swiper.slidesGrid.length;var spaceBetween=params.spaceBetween;var slidePosition=-offsetBefore;var prevSlideSize=0;var index=0;if(typeof swiperSize==='undefined'){return;}
if(typeof spaceBetween==='string'&&spaceBetween.indexOf('%')>=0){spaceBetween=parseFloat(spaceBetween.replace('%',''))/100*swiperSize;}
swiper.virtualSize=-spaceBetween;if(rtl)slides.css({marginLeft:'',marginTop:''});else slides.css({marginRight:'',marginBottom:''});var slidesNumberEvenToRows;if(params.slidesPerColumn>1){if(Math.floor(slidesLength/params.slidesPerColumn)===slidesLength/swiper.params.slidesPerColumn){slidesNumberEvenToRows=slidesLength;}else{slidesNumberEvenToRows=Math.ceil(slidesLength/params.slidesPerColumn)*params.slidesPerColumn;}
if(params.slidesPerView!=='auto'&&params.slidesPerColumnFill==='row'){slidesNumberEvenToRows=Math.max(slidesNumberEvenToRows,params.slidesPerView*params.slidesPerColumn);}}
var slideSize;var slidesPerColumn=params.slidesPerColumn;var slidesPerRow=slidesNumberEvenToRows/slidesPerColumn;var numFullColumns=Math.floor(slidesLength/params.slidesPerColumn);for(var i=0;i<slidesLength;i+=1){slideSize=0;var slide=slides.eq(i);if(params.slidesPerColumn>1){var newSlideOrderIndex=void 0;var column=void 0;var row=void 0;if(params.slidesPerColumnFill==='row'&&params.slidesPerGroup>1){var groupIndex=Math.floor(i/(params.slidesPerGroup*params.slidesPerColumn));var slideIndexInGroup=i-params.slidesPerColumn*params.slidesPerGroup*groupIndex;var columnsInGroup=groupIndex===0?params.slidesPerGroup:Math.min(Math.ceil((slidesLength-groupIndex*slidesPerColumn*params.slidesPerGroup)/slidesPerColumn),params.slidesPerGroup);row=Math.floor(slideIndexInGroup/columnsInGroup);column=slideIndexInGroup-row*columnsInGroup+groupIndex*params.slidesPerGroup;newSlideOrderIndex=column+row*slidesNumberEvenToRows/slidesPerColumn;slide.css({'-webkit-box-ordinal-group':newSlideOrderIndex,'-moz-box-ordinal-group':newSlideOrderIndex,'-ms-flex-order':newSlideOrderIndex,'-webkit-order':newSlideOrderIndex,order:newSlideOrderIndex});}else if(params.slidesPerColumnFill==='column'){column=Math.floor(i/slidesPerColumn);row=i-column*slidesPerColumn;if(column>numFullColumns||column===numFullColumns&&row===slidesPerColumn-1){row+=1;if(row>=slidesPerColumn){row=0;column+=1;}}}else{row=Math.floor(i/slidesPerRow);column=i-row*slidesPerRow;}
slide.css("margin-"+(swiper.isHorizontal()?'top':'left'),row!==0&&params.spaceBetween&&params.spaceBetween+"px");}
if(slide.css('display')==='none')continue;if(params.slidesPerView==='auto'){var slideStyles=window.getComputedStyle(slide[0],null);var currentTransform=slide[0].style.transform;var currentWebKitTransform=slide[0].style.webkitTransform;if(currentTransform){slide[0].style.transform='none';}
if(currentWebKitTransform){slide[0].style.webkitTransform='none';}
if(params.roundLengths){slideSize=swiper.isHorizontal()?slide.outerWidth(true):slide.outerHeight(true);}else{if(swiper.isHorizontal()){var width=parseFloat(slideStyles.getPropertyValue('width')||0);var paddingLeft=parseFloat(slideStyles.getPropertyValue('padding-left')||0);var paddingRight=parseFloat(slideStyles.getPropertyValue('padding-right')||0);var marginLeft=parseFloat(slideStyles.getPropertyValue('margin-left')||0);var marginRight=parseFloat(slideStyles.getPropertyValue('margin-right')||0);var boxSizing=slideStyles.getPropertyValue('box-sizing');if(boxSizing&&boxSizing==='border-box'){slideSize=width+marginLeft+marginRight;}else{var _slide$=slide[0],clientWidth=_slide$.clientWidth,offsetWidth=_slide$.offsetWidth;slideSize=width+paddingLeft+paddingRight+marginLeft+marginRight+(offsetWidth-clientWidth);}}else{var height=parseFloat(slideStyles.getPropertyValue('height')||0);var paddingTop=parseFloat(slideStyles.getPropertyValue('padding-top')||0);var paddingBottom=parseFloat(slideStyles.getPropertyValue('padding-bottom')||0);var marginTop=parseFloat(slideStyles.getPropertyValue('margin-top')||0);var marginBottom=parseFloat(slideStyles.getPropertyValue('margin-bottom')||0);var _boxSizing=slideStyles.getPropertyValue('box-sizing');if(_boxSizing&&_boxSizing==='border-box'){slideSize=height+marginTop+marginBottom;}else{var _slide$2=slide[0],clientHeight=_slide$2.clientHeight,offsetHeight=_slide$2.offsetHeight;slideSize=height+paddingTop+paddingBottom+marginTop+marginBottom+(offsetHeight-clientHeight);}}}
if(currentTransform){slide[0].style.transform=currentTransform;}
if(currentWebKitTransform){slide[0].style.webkitTransform=currentWebKitTransform;}
if(params.roundLengths)slideSize=Math.floor(slideSize);}else{slideSize=(swiperSize-(params.slidesPerView-1)*spaceBetween)/params.slidesPerView;if(params.roundLengths)slideSize=Math.floor(slideSize);if(slides[i]){if(swiper.isHorizontal()){slides[i].style.width=slideSize+"px";}else{slides[i].style.height=slideSize+"px";}}}
if(slides[i]){slides[i].swiperSlideSize=slideSize;}
slidesSizesGrid.push(slideSize);if(params.centeredSlides){slidePosition=slidePosition+slideSize/2+prevSlideSize/2+spaceBetween;if(prevSlideSize===0&&i!==0)slidePosition=slidePosition-swiperSize/2-spaceBetween;if(i===0)slidePosition=slidePosition-swiperSize/2-spaceBetween;if(Math.abs(slidePosition)<1/1000)slidePosition=0;if(params.roundLengths)slidePosition=Math.floor(slidePosition);if(index%params.slidesPerGroup===0)snapGrid.push(slidePosition);slidesGrid.push(slidePosition);}else{if(params.roundLengths)slidePosition=Math.floor(slidePosition);if((index-Math.min(swiper.params.slidesPerGroupSkip,index))%swiper.params.slidesPerGroup===0)snapGrid.push(slidePosition);slidesGrid.push(slidePosition);slidePosition=slidePosition+slideSize+spaceBetween;}
swiper.virtualSize+=slideSize+spaceBetween;prevSlideSize=slideSize;index+=1;}
swiper.virtualSize=Math.max(swiper.virtualSize,swiperSize)+offsetAfter;var newSlidesGrid;if(rtl&&wrongRTL&&(params.effect==='slide'||params.effect==='coverflow')){$wrapperEl.css({width:swiper.virtualSize+params.spaceBetween+"px"});}
if(params.setWrapperSize){if(swiper.isHorizontal())$wrapperEl.css({width:swiper.virtualSize+params.spaceBetween+"px"});else $wrapperEl.css({height:swiper.virtualSize+params.spaceBetween+"px"});}
if(params.slidesPerColumn>1){swiper.virtualSize=(slideSize+params.spaceBetween)*slidesNumberEvenToRows;swiper.virtualSize=Math.ceil(swiper.virtualSize/params.slidesPerColumn)-params.spaceBetween;if(swiper.isHorizontal())$wrapperEl.css({width:swiper.virtualSize+params.spaceBetween+"px"});else $wrapperEl.css({height:swiper.virtualSize+params.spaceBetween+"px"});if(params.centeredSlides){newSlidesGrid=[];for(var _i=0;_i<snapGrid.length;_i+=1){var slidesGridItem=snapGrid[_i];if(params.roundLengths)slidesGridItem=Math.floor(slidesGridItem);if(snapGrid[_i]<swiper.virtualSize+snapGrid[0])newSlidesGrid.push(slidesGridItem);}
snapGrid=newSlidesGrid;}}
if(!params.centeredSlides){newSlidesGrid=[];for(var _i2=0;_i2<snapGrid.length;_i2+=1){var _slidesGridItem=snapGrid[_i2];if(params.roundLengths)_slidesGridItem=Math.floor(_slidesGridItem);if(snapGrid[_i2]<=swiper.virtualSize-swiperSize){newSlidesGrid.push(_slidesGridItem);}}
snapGrid=newSlidesGrid;if(Math.floor(swiper.virtualSize-swiperSize)-Math.floor(snapGrid[snapGrid.length-1])>1){snapGrid.push(swiper.virtualSize-swiperSize);}}
if(snapGrid.length===0)snapGrid=[0];if(params.spaceBetween!==0){if(swiper.isHorizontal()){if(rtl)slides.filter(slidesForMargin).css({marginLeft:spaceBetween+"px"});else slides.filter(slidesForMargin).css({marginRight:spaceBetween+"px"});}else slides.filter(slidesForMargin).css({marginBottom:spaceBetween+"px"});}
if(params.centeredSlides&&params.centeredSlidesBounds){var allSlidesSize=0;slidesSizesGrid.forEach(function(slideSizeValue){allSlidesSize+=slideSizeValue+(params.spaceBetween?params.spaceBetween:0);});allSlidesSize-=params.spaceBetween;var maxSnap=allSlidesSize-swiperSize;snapGrid=snapGrid.map(function(snap){if(snap<0)return-offsetBefore;if(snap>maxSnap)return maxSnap+offsetAfter;return snap;});}
if(params.centerInsufficientSlides){var _allSlidesSize=0;slidesSizesGrid.forEach(function(slideSizeValue){_allSlidesSize+=slideSizeValue+(params.spaceBetween?params.spaceBetween:0);});_allSlidesSize-=params.spaceBetween;if(_allSlidesSize<swiperSize){var allSlidesOffset=(swiperSize-_allSlidesSize)/2;snapGrid.forEach(function(snap,snapIndex){snapGrid[snapIndex]=snap-allSlidesOffset;});slidesGrid.forEach(function(snap,snapIndex){slidesGrid[snapIndex]=snap+allSlidesOffset;});}}
extend$1(swiper,{slides:slides,snapGrid:snapGrid,slidesGrid:slidesGrid,slidesSizesGrid:slidesSizesGrid});if(slidesLength!==previousSlidesLength){swiper.emit('slidesLengthChange');}
if(snapGrid.length!==previousSnapGridLength){if(swiper.params.watchOverflow)swiper.checkOverflow();swiper.emit('snapGridLengthChange');}
if(slidesGrid.length!==previousSlidesGridLength){swiper.emit('slidesGridLengthChange');}
if(params.watchSlidesProgress||params.watchSlidesVisibility){swiper.updateSlidesOffset();}}
function updateAutoHeight(speed){var swiper=this;var activeSlides=[];var newHeight=0;var i;if(typeof speed==='number'){swiper.setTransition(speed);}else if(speed===true){swiper.setTransition(swiper.params.speed);}
if(swiper.params.slidesPerView!=='auto'&&swiper.params.slidesPerView>1){if(swiper.params.centeredSlides){swiper.visibleSlides.each(function(slide){activeSlides.push(slide);});}else{for(i=0;i<Math.ceil(swiper.params.slidesPerView);i+=1){var index=swiper.activeIndex+i;if(index>swiper.slides.length)break;activeSlides.push(swiper.slides.eq(index)[0]);}}}else{activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);}
for(i=0;i<activeSlides.length;i+=1){if(typeof activeSlides[i]!=='undefined'){var height=activeSlides[i].offsetHeight;newHeight=height>newHeight?height:newHeight;}}
if(newHeight)swiper.$wrapperEl.css('height',newHeight+"px");}
function updateSlidesOffset(){var swiper=this;var slides=swiper.slides;for(var i=0;i<slides.length;i+=1){slides[i].swiperSlideOffset=swiper.isHorizontal()?slides[i].offsetLeft:slides[i].offsetTop;}}
function updateSlidesProgress(translate){if(translate===void 0){translate=this&&this.translate||0;}
var swiper=this;var params=swiper.params;var slides=swiper.slides,rtl=swiper.rtlTranslate;if(slides.length===0)return;if(typeof slides[0].swiperSlideOffset==='undefined')swiper.updateSlidesOffset();var offsetCenter=-translate;if(rtl)offsetCenter=translate;slides.removeClass(params.slideVisibleClass);swiper.visibleSlidesIndexes=[];swiper.visibleSlides=[];for(var i=0;i<slides.length;i+=1){var slide=slides[i];var slideProgress=(offsetCenter+(params.centeredSlides?swiper.minTranslate():0)-slide.swiperSlideOffset)/(slide.swiperSlideSize+params.spaceBetween);if(params.watchSlidesVisibility||params.centeredSlides&&params.autoHeight){var slideBefore=-(offsetCenter-slide.swiperSlideOffset);var slideAfter=slideBefore+swiper.slidesSizesGrid[i];var isVisible=slideBefore>=0&&slideBefore<swiper.size-1||slideAfter>1&&slideAfter<=swiper.size||slideBefore<=0&&slideAfter>=swiper.size;if(isVisible){swiper.visibleSlides.push(slide);swiper.visibleSlidesIndexes.push(i);slides.eq(i).addClass(params.slideVisibleClass);}}
slide.progress=rtl?-slideProgress:slideProgress;}
swiper.visibleSlides=$(swiper.visibleSlides);}
function updateProgress(translate){var swiper=this;if(typeof translate==='undefined'){var multiplier=swiper.rtlTranslate?-1:1;translate=swiper&&swiper.translate&&swiper.translate*multiplier||0;}
var params=swiper.params;var translatesDiff=swiper.maxTranslate()-swiper.minTranslate();var progress=swiper.progress,isBeginning=swiper.isBeginning,isEnd=swiper.isEnd;var wasBeginning=isBeginning;var wasEnd=isEnd;if(translatesDiff===0){progress=0;isBeginning=true;isEnd=true;}else{progress=(translate-swiper.minTranslate())/translatesDiff;isBeginning=progress<=0;isEnd=progress>=1;}
extend$1(swiper,{progress:progress,isBeginning:isBeginning,isEnd:isEnd});if(params.watchSlidesProgress||params.watchSlidesVisibility||params.centeredSlides&&params.autoHeight)swiper.updateSlidesProgress(translate);if(isBeginning&&!wasBeginning){swiper.emit('reachBeginning toEdge');}
if(isEnd&&!wasEnd){swiper.emit('reachEnd toEdge');}
if(wasBeginning&&!isBeginning||wasEnd&&!isEnd){swiper.emit('fromEdge');}
swiper.emit('progress',progress);}
function updateSlidesClasses(){var swiper=this;var slides=swiper.slides,params=swiper.params,$wrapperEl=swiper.$wrapperEl,activeIndex=swiper.activeIndex,realIndex=swiper.realIndex;var isVirtual=swiper.virtual&&params.virtual.enabled;slides.removeClass(params.slideActiveClass+" "+params.slideNextClass+" "+params.slidePrevClass+" "+params.slideDuplicateActiveClass+" "+params.slideDuplicateNextClass+" "+params.slideDuplicatePrevClass);var activeSlide;if(isVirtual){activeSlide=swiper.$wrapperEl.find("."+params.slideClass+"[data-swiper-slide-index=\""+activeIndex+"\"]");}else{activeSlide=slides.eq(activeIndex);}
activeSlide.addClass(params.slideActiveClass);if(params.loop){if(activeSlide.hasClass(params.slideDuplicateClass)){$wrapperEl.children("."+params.slideClass+":not(."+params.slideDuplicateClass+")[data-swiper-slide-index=\""+realIndex+"\"]").addClass(params.slideDuplicateActiveClass);}else{$wrapperEl.children("."+params.slideClass+"."+params.slideDuplicateClass+"[data-swiper-slide-index=\""+realIndex+"\"]").addClass(params.slideDuplicateActiveClass);}}
var nextSlide=activeSlide.nextAll("."+params.slideClass).eq(0).addClass(params.slideNextClass);if(params.loop&&nextSlide.length===0){nextSlide=slides.eq(0);nextSlide.addClass(params.slideNextClass);}
var prevSlide=activeSlide.prevAll("."+params.slideClass).eq(0).addClass(params.slidePrevClass);if(params.loop&&prevSlide.length===0){prevSlide=slides.eq(-1);prevSlide.addClass(params.slidePrevClass);}
if(params.loop){if(nextSlide.hasClass(params.slideDuplicateClass)){$wrapperEl.children("."+params.slideClass+":not(."+params.slideDuplicateClass+")[data-swiper-slide-index=\""+nextSlide.attr('data-swiper-slide-index')+"\"]").addClass(params.slideDuplicateNextClass);}else{$wrapperEl.children("."+params.slideClass+"."+params.slideDuplicateClass+"[data-swiper-slide-index=\""+nextSlide.attr('data-swiper-slide-index')+"\"]").addClass(params.slideDuplicateNextClass);}
if(prevSlide.hasClass(params.slideDuplicateClass)){$wrapperEl.children("."+params.slideClass+":not(."+params.slideDuplicateClass+")[data-swiper-slide-index=\""+prevSlide.attr('data-swiper-slide-index')+"\"]").addClass(params.slideDuplicatePrevClass);}else{$wrapperEl.children("."+params.slideClass+"."+params.slideDuplicateClass+"[data-swiper-slide-index=\""+prevSlide.attr('data-swiper-slide-index')+"\"]").addClass(params.slideDuplicatePrevClass);}}
swiper.emitSlidesClasses();}
function updateActiveIndex(newActiveIndex){var swiper=this;var translate=swiper.rtlTranslate?swiper.translate:-swiper.translate;var slidesGrid=swiper.slidesGrid,snapGrid=swiper.snapGrid,params=swiper.params,previousIndex=swiper.activeIndex,previousRealIndex=swiper.realIndex,previousSnapIndex=swiper.snapIndex;var activeIndex=newActiveIndex;var snapIndex;if(typeof activeIndex==='undefined'){for(var i=0;i<slidesGrid.length;i+=1){if(typeof slidesGrid[i+1]!=='undefined'){if(translate>=slidesGrid[i]&&translate<slidesGrid[i+1]-(slidesGrid[i+1]-slidesGrid[i])/2){activeIndex=i;}else if(translate>=slidesGrid[i]&&translate<slidesGrid[i+1]){activeIndex=i+1;}}else if(translate>=slidesGrid[i]){activeIndex=i;}}
if(params.normalizeSlideIndex){if(activeIndex<0||typeof activeIndex==='undefined')activeIndex=0;}}
if(snapGrid.indexOf(translate)>=0){snapIndex=snapGrid.indexOf(translate);}else{var skip=Math.min(params.slidesPerGroupSkip,activeIndex);snapIndex=skip+Math.floor((activeIndex-skip)/params.slidesPerGroup);}
if(snapIndex>=snapGrid.length)snapIndex=snapGrid.length-1;if(activeIndex===previousIndex){if(snapIndex!==previousSnapIndex){swiper.snapIndex=snapIndex;swiper.emit('snapIndexChange');}
return;}
var realIndex=parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index')||activeIndex,10);extend$1(swiper,{snapIndex:snapIndex,realIndex:realIndex,previousIndex:previousIndex,activeIndex:activeIndex});swiper.emit('activeIndexChange');swiper.emit('snapIndexChange');if(previousRealIndex!==realIndex){swiper.emit('realIndexChange');}
if(swiper.initialized||swiper.params.runCallbacksOnInit){swiper.emit('slideChange');}}
function updateClickedSlide(e){var swiper=this;var params=swiper.params;var slide=$(e.target).closest("."+params.slideClass)[0];var slideFound=false;if(slide){for(var i=0;i<swiper.slides.length;i+=1){if(swiper.slides[i]===slide)slideFound=true;}}
if(slide&&slideFound){swiper.clickedSlide=slide;if(swiper.virtual&&swiper.params.virtual.enabled){swiper.clickedIndex=parseInt($(slide).attr('data-swiper-slide-index'),10);}else{swiper.clickedIndex=$(slide).index();}}else{swiper.clickedSlide=undefined;swiper.clickedIndex=undefined;return;}
if(params.slideToClickedSlide&&swiper.clickedIndex!==undefined&&swiper.clickedIndex!==swiper.activeIndex){swiper.slideToClickedSlide();}}
var update={updateSize:updateSize,updateSlides:updateSlides,updateAutoHeight:updateAutoHeight,updateSlidesOffset:updateSlidesOffset,updateSlidesProgress:updateSlidesProgress,updateProgress:updateProgress,updateSlidesClasses:updateSlidesClasses,updateActiveIndex:updateActiveIndex,updateClickedSlide:updateClickedSlide};function getSwiperTranslate(axis){if(axis===void 0){axis=this.isHorizontal()?'x':'y';}
var swiper=this;var params=swiper.params,rtl=swiper.rtlTranslate,translate=swiper.translate,$wrapperEl=swiper.$wrapperEl;if(params.virtualTranslate){return rtl?-translate:translate;}
if(params.cssMode){return translate;}
var currentTranslate=getTranslate($wrapperEl[0],axis);if(rtl)currentTranslate=-currentTranslate;return currentTranslate||0;}
function setTranslate(translate,byController){var swiper=this;var rtl=swiper.rtlTranslate,params=swiper.params,$wrapperEl=swiper.$wrapperEl,wrapperEl=swiper.wrapperEl,progress=swiper.progress;var x=0;var y=0;var z=0;if(swiper.isHorizontal()){x=rtl?-translate:translate;}else{y=translate;}
if(params.roundLengths){x=Math.floor(x);y=Math.floor(y);}
if(params.cssMode){wrapperEl[swiper.isHorizontal()?'scrollLeft':'scrollTop']=swiper.isHorizontal()?-x:-y;}else if(!params.virtualTranslate){$wrapperEl.transform("translate3d("+x+"px, "+y+"px, "+z+"px)");}
swiper.previousTranslate=swiper.translate;swiper.translate=swiper.isHorizontal()?x:y;var newProgress;var translatesDiff=swiper.maxTranslate()-swiper.minTranslate();if(translatesDiff===0){newProgress=0;}else{newProgress=(translate-swiper.minTranslate())/translatesDiff;}
if(newProgress!==progress){swiper.updateProgress(translate);}
swiper.emit('setTranslate',swiper.translate,byController);}
function minTranslate(){return-this.snapGrid[0];}
function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1];}
function translateTo(translate,speed,runCallbacks,translateBounds,internal){if(translate===void 0){translate=0;}
if(speed===void 0){speed=this.params.speed;}
if(runCallbacks===void 0){runCallbacks=true;}
if(translateBounds===void 0){translateBounds=true;}
var swiper=this;var params=swiper.params,wrapperEl=swiper.wrapperEl;if(swiper.animating&&params.preventInteractionOnTransition){return false;}
var minTranslate=swiper.minTranslate();var maxTranslate=swiper.maxTranslate();var newTranslate;if(translateBounds&&translate>minTranslate)newTranslate=minTranslate;else if(translateBounds&&translate<maxTranslate)newTranslate=maxTranslate;else newTranslate=translate;swiper.updateProgress(newTranslate);if(params.cssMode){var isH=swiper.isHorizontal();if(speed===0){wrapperEl[isH?'scrollLeft':'scrollTop']=-newTranslate;}else{if(wrapperEl.scrollTo){var _wrapperEl$scrollTo;wrapperEl.scrollTo((_wrapperEl$scrollTo={},_wrapperEl$scrollTo[isH?'left':'top']=-newTranslate,_wrapperEl$scrollTo.behavior='smooth',_wrapperEl$scrollTo));}else{wrapperEl[isH?'scrollLeft':'scrollTop']=-newTranslate;}}
return true;}
if(speed===0){swiper.setTransition(0);swiper.setTranslate(newTranslate);if(runCallbacks){swiper.emit('beforeTransitionStart',speed,internal);swiper.emit('transitionEnd');}}else{swiper.setTransition(speed);swiper.setTranslate(newTranslate);if(runCallbacks){swiper.emit('beforeTransitionStart',speed,internal);swiper.emit('transitionStart');}
if(!swiper.animating){swiper.animating=true;if(!swiper.onTranslateToWrapperTransitionEnd){swiper.onTranslateToWrapperTransitionEnd=function transitionEnd(e){if(!swiper||swiper.destroyed)return;if(e.target!==this)return;swiper.$wrapperEl[0].removeEventListener('transitionend',swiper.onTranslateToWrapperTransitionEnd);swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd',swiper.onTranslateToWrapperTransitionEnd);swiper.onTranslateToWrapperTransitionEnd=null;delete swiper.onTranslateToWrapperTransitionEnd;if(runCallbacks){swiper.emit('transitionEnd');}};}
swiper.$wrapperEl[0].addEventListener('transitionend',swiper.onTranslateToWrapperTransitionEnd);swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd',swiper.onTranslateToWrapperTransitionEnd);}}
return true;}
var translate={getTranslate:getSwiperTranslate,setTranslate:setTranslate,minTranslate:minTranslate,maxTranslate:maxTranslate,translateTo:translateTo};function setTransition(duration,byController){var swiper=this;if(!swiper.params.cssMode){swiper.$wrapperEl.transition(duration);}
swiper.emit('setTransition',duration,byController);}
function transitionStart(runCallbacks,direction){if(runCallbacks===void 0){runCallbacks=true;}
var swiper=this;var activeIndex=swiper.activeIndex,params=swiper.params,previousIndex=swiper.previousIndex;if(params.cssMode)return;if(params.autoHeight){swiper.updateAutoHeight();}
var dir=direction;if(!dir){if(activeIndex>previousIndex)dir='next';else if(activeIndex<previousIndex)dir='prev';else dir='reset';}
swiper.emit('transitionStart');if(runCallbacks&&activeIndex!==previousIndex){if(dir==='reset'){swiper.emit('slideResetTransitionStart');return;}
swiper.emit('slideChangeTransitionStart');if(dir==='next'){swiper.emit('slideNextTransitionStart');}else{swiper.emit('slidePrevTransitionStart');}}}
function transitionEnd$1(runCallbacks,direction){if(runCallbacks===void 0){runCallbacks=true;}
var swiper=this;var activeIndex=swiper.activeIndex,previousIndex=swiper.previousIndex,params=swiper.params;swiper.animating=false;if(params.cssMode)return;swiper.setTransition(0);var dir=direction;if(!dir){if(activeIndex>previousIndex)dir='next';else if(activeIndex<previousIndex)dir='prev';else dir='reset';}
swiper.emit('transitionEnd');if(runCallbacks&&activeIndex!==previousIndex){if(dir==='reset'){swiper.emit('slideResetTransitionEnd');return;}
swiper.emit('slideChangeTransitionEnd');if(dir==='next'){swiper.emit('slideNextTransitionEnd');}else{swiper.emit('slidePrevTransitionEnd');}}}
var transition$1={setTransition:setTransition,transitionStart:transitionStart,transitionEnd:transitionEnd$1};function slideTo(index,speed,runCallbacks,internal){if(index===void 0){index=0;}
if(speed===void 0){speed=this.params.speed;}
if(runCallbacks===void 0){runCallbacks=true;}
if(typeof index!=='number'&&typeof index!=='string'){throw new Error("The 'index' argument cannot have type other than 'number' or 'string'. ["+typeof index+"] given.");}
if(typeof index==='string'){var indexAsNumber=parseInt(index,10);var isValidNumber=isFinite(indexAsNumber);if(!isValidNumber){throw new Error("The passed-in 'index' (string) couldn't be converted to 'number'. ["+index+"] given.");}
index=indexAsNumber;}
var swiper=this;var slideIndex=index;if(slideIndex<0)slideIndex=0;var params=swiper.params,snapGrid=swiper.snapGrid,slidesGrid=swiper.slidesGrid,previousIndex=swiper.previousIndex,activeIndex=swiper.activeIndex,rtl=swiper.rtlTranslate,wrapperEl=swiper.wrapperEl;if(swiper.animating&&params.preventInteractionOnTransition){return false;}
var skip=Math.min(swiper.params.slidesPerGroupSkip,slideIndex);var snapIndex=skip+Math.floor((slideIndex-skip)/swiper.params.slidesPerGroup);if(snapIndex>=snapGrid.length)snapIndex=snapGrid.length-1;if((activeIndex||params.initialSlide||0)===(previousIndex||0)&&runCallbacks){swiper.emit('beforeSlideChangeStart');}
var translate=-snapGrid[snapIndex];swiper.updateProgress(translate);if(params.normalizeSlideIndex){for(var i=0;i<slidesGrid.length;i+=1){var normalizedTranslate=-Math.floor(translate*100);var normalizedGird=Math.floor(slidesGrid[i]*100);var normalizedGridNext=Math.floor(slidesGrid[i+1]*100);if(typeof slidesGrid[i+1]!=='undefined'){if(normalizedTranslate>=normalizedGird&&normalizedTranslate<normalizedGridNext-(normalizedGridNext-normalizedGird)/2){slideIndex=i;}else if(normalizedTranslate>=normalizedGird&&normalizedTranslate<normalizedGridNext){slideIndex=i+1;}}else if(normalizedTranslate>=normalizedGird){slideIndex=i;}}}
if(swiper.initialized&&slideIndex!==activeIndex){if(!swiper.allowSlideNext&&translate<swiper.translate&&translate<swiper.minTranslate()){return false;}
if(!swiper.allowSlidePrev&&translate>swiper.translate&&translate>swiper.maxTranslate()){if((activeIndex||0)!==slideIndex)return false;}}
var direction;if(slideIndex>activeIndex)direction='next';else if(slideIndex<activeIndex)direction='prev';else direction='reset';if(rtl&&-translate===swiper.translate||!rtl&&translate===swiper.translate){swiper.updateActiveIndex(slideIndex);if(params.autoHeight){swiper.updateAutoHeight();}
swiper.updateSlidesClasses();if(params.effect!=='slide'){swiper.setTranslate(translate);}
if(direction!=='reset'){swiper.transitionStart(runCallbacks,direction);swiper.transitionEnd(runCallbacks,direction);}
return false;}
if(params.cssMode){var isH=swiper.isHorizontal();var t=-translate;if(rtl){t=wrapperEl.scrollWidth-wrapperEl.offsetWidth-t;}
if(speed===0){wrapperEl[isH?'scrollLeft':'scrollTop']=t;}else{if(wrapperEl.scrollTo){var _wrapperEl$scrollTo;wrapperEl.scrollTo((_wrapperEl$scrollTo={},_wrapperEl$scrollTo[isH?'left':'top']=t,_wrapperEl$scrollTo.behavior='smooth',_wrapperEl$scrollTo));}else{wrapperEl[isH?'scrollLeft':'scrollTop']=t;}}
return true;}
if(speed===0){swiper.setTransition(0);swiper.setTranslate(translate);swiper.updateActiveIndex(slideIndex);swiper.updateSlidesClasses();swiper.emit('beforeTransitionStart',speed,internal);swiper.transitionStart(runCallbacks,direction);swiper.transitionEnd(runCallbacks,direction);}else{swiper.setTransition(speed);swiper.setTranslate(translate);swiper.updateActiveIndex(slideIndex);swiper.updateSlidesClasses();swiper.emit('beforeTransitionStart',speed,internal);swiper.transitionStart(runCallbacks,direction);if(!swiper.animating){swiper.animating=true;if(!swiper.onSlideToWrapperTransitionEnd){swiper.onSlideToWrapperTransitionEnd=function transitionEnd(e){if(!swiper||swiper.destroyed)return;if(e.target!==this)return;swiper.$wrapperEl[0].removeEventListener('transitionend',swiper.onSlideToWrapperTransitionEnd);swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd',swiper.onSlideToWrapperTransitionEnd);swiper.onSlideToWrapperTransitionEnd=null;delete swiper.onSlideToWrapperTransitionEnd;swiper.transitionEnd(runCallbacks,direction);};}
swiper.$wrapperEl[0].addEventListener('transitionend',swiper.onSlideToWrapperTransitionEnd);swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd',swiper.onSlideToWrapperTransitionEnd);}}
return true;}
function slideToLoop(index,speed,runCallbacks,internal){if(index===void 0){index=0;}
if(speed===void 0){speed=this.params.speed;}
if(runCallbacks===void 0){runCallbacks=true;}
var swiper=this;var newIndex=index;if(swiper.params.loop){newIndex+=swiper.loopedSlides;}
return swiper.slideTo(newIndex,speed,runCallbacks,internal);}
function slideNext(speed,runCallbacks,internal){if(speed===void 0){speed=this.params.speed;}
if(runCallbacks===void 0){runCallbacks=true;}
var swiper=this;var params=swiper.params,animating=swiper.animating;var increment=swiper.activeIndex<params.slidesPerGroupSkip?1:params.slidesPerGroup;if(params.loop){if(animating&&params.loopPreventsSlide)return false;swiper.loopFix();swiper._clientLeft=swiper.$wrapperEl[0].clientLeft;}
return swiper.slideTo(swiper.activeIndex+increment,speed,runCallbacks,internal);}
function slidePrev(speed,runCallbacks,internal){if(speed===void 0){speed=this.params.speed;}
if(runCallbacks===void 0){runCallbacks=true;}
var swiper=this;var params=swiper.params,animating=swiper.animating,snapGrid=swiper.snapGrid,slidesGrid=swiper.slidesGrid,rtlTranslate=swiper.rtlTranslate;if(params.loop){if(animating&&params.loopPreventsSlide)return false;swiper.loopFix();swiper._clientLeft=swiper.$wrapperEl[0].clientLeft;}
var translate=rtlTranslate?swiper.translate:-swiper.translate;function normalize(val){if(val<0)return-Math.floor(Math.abs(val));return Math.floor(val);}
var normalizedTranslate=normalize(translate);var normalizedSnapGrid=snapGrid.map(function(val){return normalize(val);});var currentSnap=snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];var prevSnap=snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)-1];if(typeof prevSnap==='undefined'&&params.cssMode){snapGrid.forEach(function(snap){if(!prevSnap&&normalizedTranslate>=snap)prevSnap=snap;});}
var prevIndex;if(typeof prevSnap!=='undefined'){prevIndex=slidesGrid.indexOf(prevSnap);if(prevIndex<0)prevIndex=swiper.activeIndex-1;}
return swiper.slideTo(prevIndex,speed,runCallbacks,internal);}
function slideReset(speed,runCallbacks,internal){if(speed===void 0){speed=this.params.speed;}
if(runCallbacks===void 0){runCallbacks=true;}
var swiper=this;return swiper.slideTo(swiper.activeIndex,speed,runCallbacks,internal);}
function slideToClosest(speed,runCallbacks,internal,threshold){if(speed===void 0){speed=this.params.speed;}
if(runCallbacks===void 0){runCallbacks=true;}
if(threshold===void 0){threshold=0.5;}
var swiper=this;var index=swiper.activeIndex;var skip=Math.min(swiper.params.slidesPerGroupSkip,index);var snapIndex=skip+Math.floor((index-skip)/swiper.params.slidesPerGroup);var translate=swiper.rtlTranslate?swiper.translate:-swiper.translate;if(translate>=swiper.snapGrid[snapIndex]){var currentSnap=swiper.snapGrid[snapIndex];var nextSnap=swiper.snapGrid[snapIndex+1];if(translate-currentSnap>(nextSnap-currentSnap)*threshold){index+=swiper.params.slidesPerGroup;}}else{var prevSnap=swiper.snapGrid[snapIndex-1];var _currentSnap=swiper.snapGrid[snapIndex];if(translate-prevSnap<=(_currentSnap-prevSnap)*threshold){index-=swiper.params.slidesPerGroup;}}
index=Math.max(index,0);index=Math.min(index,swiper.slidesGrid.length-1);return swiper.slideTo(index,speed,runCallbacks,internal);}
function slideToClickedSlide(){var swiper=this;var params=swiper.params,$wrapperEl=swiper.$wrapperEl;var slidesPerView=params.slidesPerView==='auto'?swiper.slidesPerViewDynamic():params.slidesPerView;var slideToIndex=swiper.clickedIndex;var realIndex;if(params.loop){if(swiper.animating)return;realIndex=parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'),10);if(params.centeredSlides){if(slideToIndex<swiper.loopedSlides-slidesPerView/2||slideToIndex>swiper.slides.length-swiper.loopedSlides+slidesPerView/2){swiper.loopFix();slideToIndex=$wrapperEl.children("."+params.slideClass+"[data-swiper-slide-index=\""+realIndex+"\"]:not(."+params.slideDuplicateClass+")").eq(0).index();nextTick(function(){swiper.slideTo(slideToIndex);});}else{swiper.slideTo(slideToIndex);}}else if(slideToIndex>swiper.slides.length-slidesPerView){swiper.loopFix();slideToIndex=$wrapperEl.children("."+params.slideClass+"[data-swiper-slide-index=\""+realIndex+"\"]:not(."+params.slideDuplicateClass+")").eq(0).index();nextTick(function(){swiper.slideTo(slideToIndex);});}else{swiper.slideTo(slideToIndex);}}else{swiper.slideTo(slideToIndex);}}
var slide={slideTo:slideTo,slideToLoop:slideToLoop,slideNext:slideNext,slidePrev:slidePrev,slideReset:slideReset,slideToClosest:slideToClosest,slideToClickedSlide:slideToClickedSlide};function loopCreate(){var swiper=this;var document=getDocument();var params=swiper.params,$wrapperEl=swiper.$wrapperEl;$wrapperEl.children("."+params.slideClass+"."+params.slideDuplicateClass).remove();var slides=$wrapperEl.children("."+params.slideClass);if(params.loopFillGroupWithBlank){var blankSlidesNum=params.slidesPerGroup-slides.length%params.slidesPerGroup;if(blankSlidesNum!==params.slidesPerGroup){for(var i=0;i<blankSlidesNum;i+=1){var blankNode=$(document.createElement('div')).addClass(params.slideClass+" "+params.slideBlankClass);$wrapperEl.append(blankNode);}
slides=$wrapperEl.children("."+params.slideClass);}}
if(params.slidesPerView==='auto'&&!params.loopedSlides)params.loopedSlides=slides.length;swiper.loopedSlides=Math.ceil(parseFloat(params.loopedSlides||params.slidesPerView,10));swiper.loopedSlides+=params.loopAdditionalSlides;if(swiper.loopedSlides>slides.length){swiper.loopedSlides=slides.length;}
var prependSlides=[];var appendSlides=[];slides.each(function(el,index){var slide=$(el);if(index<swiper.loopedSlides){appendSlides.push(el);}
if(index<slides.length&&index>=slides.length-swiper.loopedSlides){prependSlides.push(el);}
slide.attr('data-swiper-slide-index',index);});for(var _i=0;_i<appendSlides.length;_i+=1){$wrapperEl.append($(appendSlides[_i].cloneNode(true)).addClass(params.slideDuplicateClass));}
for(var _i2=prependSlides.length-1;_i2>=0;_i2-=1){$wrapperEl.prepend($(prependSlides[_i2].cloneNode(true)).addClass(params.slideDuplicateClass));}}
function loopFix(){var swiper=this;swiper.emit('beforeLoopFix');var activeIndex=swiper.activeIndex,slides=swiper.slides,loopedSlides=swiper.loopedSlides,allowSlidePrev=swiper.allowSlidePrev,allowSlideNext=swiper.allowSlideNext,snapGrid=swiper.snapGrid,rtl=swiper.rtlTranslate;var newIndex;swiper.allowSlidePrev=true;swiper.allowSlideNext=true;var snapTranslate=-snapGrid[activeIndex];var diff=snapTranslate-swiper.getTranslate();if(activeIndex<loopedSlides){newIndex=slides.length-loopedSlides*3+activeIndex;newIndex+=loopedSlides;var slideChanged=swiper.slideTo(newIndex,0,false,true);if(slideChanged&&diff!==0){swiper.setTranslate((rtl?-swiper.translate:swiper.translate)-diff);}}else if(activeIndex>=slides.length-loopedSlides){newIndex=-slides.length+activeIndex+loopedSlides;newIndex+=loopedSlides;var _slideChanged=swiper.slideTo(newIndex,0,false,true);if(_slideChanged&&diff!==0){swiper.setTranslate((rtl?-swiper.translate:swiper.translate)-diff);}}
swiper.allowSlidePrev=allowSlidePrev;swiper.allowSlideNext=allowSlideNext;swiper.emit('loopFix');}
function loopDestroy(){var swiper=this;var $wrapperEl=swiper.$wrapperEl,params=swiper.params,slides=swiper.slides;$wrapperEl.children("."+params.slideClass+"."+params.slideDuplicateClass+",."+params.slideClass+"."+params.slideBlankClass).remove();slides.removeAttr('data-swiper-slide-index');}
var loop={loopCreate:loopCreate,loopFix:loopFix,loopDestroy:loopDestroy};function setGrabCursor(moving){var swiper=this;if(swiper.support.touch||!swiper.params.simulateTouch||swiper.params.watchOverflow&&swiper.isLocked||swiper.params.cssMode)return;var el=swiper.el;el.style.cursor='move';el.style.cursor=moving?'-webkit-grabbing':'-webkit-grab';el.style.cursor=moving?'-moz-grabbin':'-moz-grab';el.style.cursor=moving?'grabbing':'grab';}
function unsetGrabCursor(){var swiper=this;if(swiper.support.touch||swiper.params.watchOverflow&&swiper.isLocked||swiper.params.cssMode){return;}
swiper.el.style.cursor='';}
var grabCursor={setGrabCursor:setGrabCursor,unsetGrabCursor:unsetGrabCursor};function appendSlide(slides){var swiper=this;var $wrapperEl=swiper.$wrapperEl,params=swiper.params;if(params.loop){swiper.loopDestroy();}
if(typeof slides==='object'&&'length'in slides){for(var i=0;i<slides.length;i+=1){if(slides[i])$wrapperEl.append(slides[i]);}}else{$wrapperEl.append(slides);}
if(params.loop){swiper.loopCreate();}
if(!(params.observer&&swiper.support.observer)){swiper.update();}}
function prependSlide(slides){var swiper=this;var params=swiper.params,$wrapperEl=swiper.$wrapperEl,activeIndex=swiper.activeIndex;if(params.loop){swiper.loopDestroy();}
var newActiveIndex=activeIndex+1;if(typeof slides==='object'&&'length'in slides){for(var i=0;i<slides.length;i+=1){if(slides[i])$wrapperEl.prepend(slides[i]);}
newActiveIndex=activeIndex+slides.length;}else{$wrapperEl.prepend(slides);}
if(params.loop){swiper.loopCreate();}
if(!(params.observer&&swiper.support.observer)){swiper.update();}
swiper.slideTo(newActiveIndex,0,false);}
function addSlide(index,slides){var swiper=this;var $wrapperEl=swiper.$wrapperEl,params=swiper.params,activeIndex=swiper.activeIndex;var activeIndexBuffer=activeIndex;if(params.loop){activeIndexBuffer-=swiper.loopedSlides;swiper.loopDestroy();swiper.slides=$wrapperEl.children("."+params.slideClass);}
var baseLength=swiper.slides.length;if(index<=0){swiper.prependSlide(slides);return;}
if(index>=baseLength){swiper.appendSlide(slides);return;}
var newActiveIndex=activeIndexBuffer>index?activeIndexBuffer+1:activeIndexBuffer;var slidesBuffer=[];for(var i=baseLength-1;i>=index;i-=1){var currentSlide=swiper.slides.eq(i);currentSlide.remove();slidesBuffer.unshift(currentSlide);}
if(typeof slides==='object'&&'length'in slides){for(var _i=0;_i<slides.length;_i+=1){if(slides[_i])$wrapperEl.append(slides[_i]);}
newActiveIndex=activeIndexBuffer>index?activeIndexBuffer+slides.length:activeIndexBuffer;}else{$wrapperEl.append(slides);}
for(var _i2=0;_i2<slidesBuffer.length;_i2+=1){$wrapperEl.append(slidesBuffer[_i2]);}
if(params.loop){swiper.loopCreate();}
if(!(params.observer&&swiper.support.observer)){swiper.update();}
if(params.loop){swiper.slideTo(newActiveIndex+swiper.loopedSlides,0,false);}else{swiper.slideTo(newActiveIndex,0,false);}}
function removeSlide(slidesIndexes){var swiper=this;var params=swiper.params,$wrapperEl=swiper.$wrapperEl,activeIndex=swiper.activeIndex;var activeIndexBuffer=activeIndex;if(params.loop){activeIndexBuffer-=swiper.loopedSlides;swiper.loopDestroy();swiper.slides=$wrapperEl.children("."+params.slideClass);}
var newActiveIndex=activeIndexBuffer;var indexToRemove;if(typeof slidesIndexes==='object'&&'length'in slidesIndexes){for(var i=0;i<slidesIndexes.length;i+=1){indexToRemove=slidesIndexes[i];if(swiper.slides[indexToRemove])swiper.slides.eq(indexToRemove).remove();if(indexToRemove<newActiveIndex)newActiveIndex-=1;}
newActiveIndex=Math.max(newActiveIndex,0);}else{indexToRemove=slidesIndexes;if(swiper.slides[indexToRemove])swiper.slides.eq(indexToRemove).remove();if(indexToRemove<newActiveIndex)newActiveIndex-=1;newActiveIndex=Math.max(newActiveIndex,0);}
if(params.loop){swiper.loopCreate();}
if(!(params.observer&&swiper.support.observer)){swiper.update();}
if(params.loop){swiper.slideTo(newActiveIndex+swiper.loopedSlides,0,false);}else{swiper.slideTo(newActiveIndex,0,false);}}
function removeAllSlides(){var swiper=this;var slidesIndexes=[];for(var i=0;i<swiper.slides.length;i+=1){slidesIndexes.push(i);}
swiper.removeSlide(slidesIndexes);}
var manipulation={appendSlide:appendSlide,prependSlide:prependSlide,addSlide:addSlide,removeSlide:removeSlide,removeAllSlides:removeAllSlides};function onTouchStart(event){var swiper=this;var document=getDocument();var window=getWindow();var data=swiper.touchEventsData;var params=swiper.params,touches=swiper.touches;if(swiper.animating&&params.preventInteractionOnTransition){return;}
var e=event;if(e.originalEvent)e=e.originalEvent;var $targetEl=$(e.target);if(params.touchEventsTarget==='wrapper'){if(!$targetEl.closest(swiper.wrapperEl).length)return;}
data.isTouchEvent=e.type==='touchstart';if(!data.isTouchEvent&&'which'in e&&e.which===3)return;if(!data.isTouchEvent&&'button'in e&&e.button>0)return;if(data.isTouched&&data.isMoved)return;var swipingClassHasValue=!!params.noSwipingClass&&params.noSwipingClass!=='';if(swipingClassHasValue&&e.target&&e.target.shadowRoot&&event.path&&event.path[0]){$targetEl=$(event.path[0]);}
if(params.noSwiping&&$targetEl.closest(params.noSwipingSelector?params.noSwipingSelector:"."+params.noSwipingClass)[0]){swiper.allowClick=true;return;}
if(params.swipeHandler){if(!$targetEl.closest(params.swipeHandler)[0])return;}
touches.currentX=e.type==='touchstart'?e.targetTouches[0].pageX:e.pageX;touches.currentY=e.type==='touchstart'?e.targetTouches[0].pageY:e.pageY;var startX=touches.currentX;var startY=touches.currentY;var edgeSwipeDetection=params.edgeSwipeDetection||params.iOSEdgeSwipeDetection;var edgeSwipeThreshold=params.edgeSwipeThreshold||params.iOSEdgeSwipeThreshold;if(edgeSwipeDetection&&(startX<=edgeSwipeThreshold||startX>=window.innerWidth-edgeSwipeThreshold)){if(edgeSwipeDetection==='prevent'){event.preventDefault();}else{return;}}
extend$1(data,{isTouched:true,isMoved:false,allowTouchCallbacks:true,isScrolling:undefined,startMoving:undefined});touches.startX=startX;touches.startY=startY;data.touchStartTime=now();swiper.allowClick=true;swiper.updateSize();swiper.swipeDirection=undefined;if(params.threshold>0)data.allowThresholdMove=false;if(e.type!=='touchstart'){var preventDefault=true;if($targetEl.is(data.formElements))preventDefault=false;if(document.activeElement&&$(document.activeElement).is(data.formElements)&&document.activeElement!==$targetEl[0]){document.activeElement.blur();}
var shouldPreventDefault=preventDefault&&swiper.allowTouchMove&&params.touchStartPreventDefault;if((params.touchStartForcePreventDefault||shouldPreventDefault)&&!$targetEl[0].isContentEditable){e.preventDefault();}}
swiper.emit('touchStart',e);}
function onTouchMove(event){var document=getDocument();var swiper=this;var data=swiper.touchEventsData;var params=swiper.params,touches=swiper.touches,rtl=swiper.rtlTranslate;var e=event;if(e.originalEvent)e=e.originalEvent;if(!data.isTouched){if(data.startMoving&&data.isScrolling){swiper.emit('touchMoveOpposite',e);}
return;}
if(data.isTouchEvent&&e.type!=='touchmove')return;var targetTouch=e.type==='touchmove'&&e.targetTouches&&(e.targetTouches[0]||e.changedTouches[0]);var pageX=e.type==='touchmove'?targetTouch.pageX:e.pageX;var pageY=e.type==='touchmove'?targetTouch.pageY:e.pageY;if(e.preventedByNestedSwiper){touches.startX=pageX;touches.startY=pageY;return;}
if(!swiper.allowTouchMove){swiper.allowClick=false;if(data.isTouched){extend$1(touches,{startX:pageX,startY:pageY,currentX:pageX,currentY:pageY});data.touchStartTime=now();}
return;}
if(data.isTouchEvent&&params.touchReleaseOnEdges&&!params.loop){if(swiper.isVertical()){if(pageY<touches.startY&&swiper.translate<=swiper.maxTranslate()||pageY>touches.startY&&swiper.translate>=swiper.minTranslate()){data.isTouched=false;data.isMoved=false;return;}}else if(pageX<touches.startX&&swiper.translate<=swiper.maxTranslate()||pageX>touches.startX&&swiper.translate>=swiper.minTranslate()){return;}}
if(data.isTouchEvent&&document.activeElement){if(e.target===document.activeElement&&$(e.target).is(data.formElements)){data.isMoved=true;swiper.allowClick=false;return;}}
if(data.allowTouchCallbacks){swiper.emit('touchMove',e);}
if(e.targetTouches&&e.targetTouches.length>1)return;touches.currentX=pageX;touches.currentY=pageY;var diffX=touches.currentX-touches.startX;var diffY=touches.currentY-touches.startY;if(swiper.params.threshold&&Math.sqrt(Math.pow(diffX,2)+Math.pow(diffY,2))<swiper.params.threshold)return;if(typeof data.isScrolling==='undefined'){var touchAngle;if(swiper.isHorizontal()&&touches.currentY===touches.startY||swiper.isVertical()&&touches.currentX===touches.startX){data.isScrolling=false;}else{if(diffX*diffX+diffY*diffY>=25){touchAngle=Math.atan2(Math.abs(diffY),Math.abs(diffX))*180/Math.PI;data.isScrolling=swiper.isHorizontal()?touchAngle>params.touchAngle:90-touchAngle>params.touchAngle;}}}
if(data.isScrolling){swiper.emit('touchMoveOpposite',e);}
if(typeof data.startMoving==='undefined'){if(touches.currentX!==touches.startX||touches.currentY!==touches.startY){data.startMoving=true;}}
if(data.isScrolling){data.isTouched=false;return;}
if(!data.startMoving){return;}
swiper.allowClick=false;if(!params.cssMode&&e.cancelable){e.preventDefault();}
if(params.touchMoveStopPropagation&&!params.nested){e.stopPropagation();}
if(!data.isMoved){if(params.loop){swiper.loopFix();}
data.startTranslate=swiper.getTranslate();swiper.setTransition(0);if(swiper.animating){swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');}
data.allowMomentumBounce=false;if(params.grabCursor&&(swiper.allowSlideNext===true||swiper.allowSlidePrev===true)){swiper.setGrabCursor(true);}
swiper.emit('sliderFirstMove',e);}
swiper.emit('sliderMove',e);data.isMoved=true;var diff=swiper.isHorizontal()?diffX:diffY;touches.diff=diff;diff*=params.touchRatio;if(rtl)diff=-diff;swiper.swipeDirection=diff>0?'prev':'next';data.currentTranslate=diff+data.startTranslate;var disableParentSwiper=true;var resistanceRatio=params.resistanceRatio;if(params.touchReleaseOnEdges){resistanceRatio=0;}
if(diff>0&&data.currentTranslate>swiper.minTranslate()){disableParentSwiper=false;if(params.resistance)data.currentTranslate=swiper.minTranslate()-1+Math.pow(-swiper.minTranslate()+data.startTranslate+diff,resistanceRatio);}else if(diff<0&&data.currentTranslate<swiper.maxTranslate()){disableParentSwiper=false;if(params.resistance)data.currentTranslate=swiper.maxTranslate()+1-Math.pow(swiper.maxTranslate()-data.startTranslate-diff,resistanceRatio);}
if(disableParentSwiper){e.preventedByNestedSwiper=true;}
if(!swiper.allowSlideNext&&swiper.swipeDirection==='next'&&data.currentTranslate<data.startTranslate){data.currentTranslate=data.startTranslate;}
if(!swiper.allowSlidePrev&&swiper.swipeDirection==='prev'&&data.currentTranslate>data.startTranslate){data.currentTranslate=data.startTranslate;}
if(params.threshold>0){if(Math.abs(diff)>params.threshold||data.allowThresholdMove){if(!data.allowThresholdMove){data.allowThresholdMove=true;touches.startX=touches.currentX;touches.startY=touches.currentY;data.currentTranslate=data.startTranslate;touches.diff=swiper.isHorizontal()?touches.currentX-touches.startX:touches.currentY-touches.startY;return;}}else{data.currentTranslate=data.startTranslate;return;}}
if(!params.followFinger||params.cssMode)return;if(params.freeMode||params.watchSlidesProgress||params.watchSlidesVisibility){swiper.updateActiveIndex();swiper.updateSlidesClasses();}
if(params.freeMode){if(data.velocities.length===0){data.velocities.push({position:touches[swiper.isHorizontal()?'startX':'startY'],time:data.touchStartTime});}
data.velocities.push({position:touches[swiper.isHorizontal()?'currentX':'currentY'],time:now()});}
swiper.updateProgress(data.currentTranslate);swiper.setTranslate(data.currentTranslate);}
function onTouchEnd(event){var swiper=this;var data=swiper.touchEventsData;var params=swiper.params,touches=swiper.touches,rtl=swiper.rtlTranslate,$wrapperEl=swiper.$wrapperEl,slidesGrid=swiper.slidesGrid,snapGrid=swiper.snapGrid;var e=event;if(e.originalEvent)e=e.originalEvent;if(data.allowTouchCallbacks){swiper.emit('touchEnd',e);}
data.allowTouchCallbacks=false;if(!data.isTouched){if(data.isMoved&&params.grabCursor){swiper.setGrabCursor(false);}
data.isMoved=false;data.startMoving=false;return;}
if(params.grabCursor&&data.isMoved&&data.isTouched&&(swiper.allowSlideNext===true||swiper.allowSlidePrev===true)){swiper.setGrabCursor(false);}
var touchEndTime=now();var timeDiff=touchEndTime-data.touchStartTime;if(swiper.allowClick){swiper.updateClickedSlide(e);swiper.emit('tap click',e);if(timeDiff<300&&touchEndTime-data.lastClickTime<300){swiper.emit('doubleTap doubleClick',e);}}
data.lastClickTime=now();nextTick(function(){if(!swiper.destroyed)swiper.allowClick=true;});if(!data.isTouched||!data.isMoved||!swiper.swipeDirection||touches.diff===0||data.currentTranslate===data.startTranslate){data.isTouched=false;data.isMoved=false;data.startMoving=false;return;}
data.isTouched=false;data.isMoved=false;data.startMoving=false;var currentPos;if(params.followFinger){currentPos=rtl?swiper.translate:-swiper.translate;}else{currentPos=-data.currentTranslate;}
if(params.cssMode){return;}
if(params.freeMode){if(currentPos<-swiper.minTranslate()){swiper.slideTo(swiper.activeIndex);return;}
if(currentPos>-swiper.maxTranslate()){if(swiper.slides.length<snapGrid.length){swiper.slideTo(snapGrid.length-1);}else{swiper.slideTo(swiper.slides.length-1);}
return;}
if(params.freeModeMomentum){if(data.velocities.length>1){var lastMoveEvent=data.velocities.pop();var velocityEvent=data.velocities.pop();var distance=lastMoveEvent.position-velocityEvent.position;var time=lastMoveEvent.time-velocityEvent.time;swiper.velocity=distance/time;swiper.velocity/=2;if(Math.abs(swiper.velocity)<params.freeModeMinimumVelocity){swiper.velocity=0;}
if(time>150||now()-lastMoveEvent.time>300){swiper.velocity=0;}}else{swiper.velocity=0;}
swiper.velocity*=params.freeModeMomentumVelocityRatio;data.velocities.length=0;var momentumDuration=1000*params.freeModeMomentumRatio;var momentumDistance=swiper.velocity*momentumDuration;var newPosition=swiper.translate+momentumDistance;if(rtl)newPosition=-newPosition;var doBounce=false;var afterBouncePosition;var bounceAmount=Math.abs(swiper.velocity)*20*params.freeModeMomentumBounceRatio;var needsLoopFix;if(newPosition<swiper.maxTranslate()){if(params.freeModeMomentumBounce){if(newPosition+swiper.maxTranslate()<-bounceAmount){newPosition=swiper.maxTranslate()-bounceAmount;}
afterBouncePosition=swiper.maxTranslate();doBounce=true;data.allowMomentumBounce=true;}else{newPosition=swiper.maxTranslate();}
if(params.loop&&params.centeredSlides)needsLoopFix=true;}else if(newPosition>swiper.minTranslate()){if(params.freeModeMomentumBounce){if(newPosition-swiper.minTranslate()>bounceAmount){newPosition=swiper.minTranslate()+bounceAmount;}
afterBouncePosition=swiper.minTranslate();doBounce=true;data.allowMomentumBounce=true;}else{newPosition=swiper.minTranslate();}
if(params.loop&&params.centeredSlides)needsLoopFix=true;}else if(params.freeModeSticky){var nextSlide;for(var j=0;j<snapGrid.length;j+=1){if(snapGrid[j]>-newPosition){nextSlide=j;break;}}
if(Math.abs(snapGrid[nextSlide]-newPosition)<Math.abs(snapGrid[nextSlide-1]-newPosition)||swiper.swipeDirection==='next'){newPosition=snapGrid[nextSlide];}else{newPosition=snapGrid[nextSlide-1];}
newPosition=-newPosition;}
if(needsLoopFix){swiper.once('transitionEnd',function(){swiper.loopFix();});}
if(swiper.velocity!==0){if(rtl){momentumDuration=Math.abs((-newPosition-swiper.translate)/swiper.velocity);}else{momentumDuration=Math.abs((newPosition-swiper.translate)/swiper.velocity);}
if(params.freeModeSticky){var moveDistance=Math.abs((rtl?-newPosition:newPosition)-swiper.translate);var currentSlideSize=swiper.slidesSizesGrid[swiper.activeIndex];if(moveDistance<currentSlideSize){momentumDuration=params.speed;}else if(moveDistance<2*currentSlideSize){momentumDuration=params.speed*1.5;}else{momentumDuration=params.speed*2.5;}}}else if(params.freeModeSticky){swiper.slideToClosest();return;}
if(params.freeModeMomentumBounce&&doBounce){swiper.updateProgress(afterBouncePosition);swiper.setTransition(momentumDuration);swiper.setTranslate(newPosition);swiper.transitionStart(true,swiper.swipeDirection);swiper.animating=true;$wrapperEl.transitionEnd(function(){if(!swiper||swiper.destroyed||!data.allowMomentumBounce)return;swiper.emit('momentumBounce');swiper.setTransition(params.speed);setTimeout(function(){swiper.setTranslate(afterBouncePosition);$wrapperEl.transitionEnd(function(){if(!swiper||swiper.destroyed)return;swiper.transitionEnd();});},0);});}else if(swiper.velocity){swiper.updateProgress(newPosition);swiper.setTransition(momentumDuration);swiper.setTranslate(newPosition);swiper.transitionStart(true,swiper.swipeDirection);if(!swiper.animating){swiper.animating=true;$wrapperEl.transitionEnd(function(){if(!swiper||swiper.destroyed)return;swiper.transitionEnd();});}}else{swiper.updateProgress(newPosition);}
swiper.updateActiveIndex();swiper.updateSlidesClasses();}else if(params.freeModeSticky){swiper.slideToClosest();return;}
if(!params.freeModeMomentum||timeDiff>=params.longSwipesMs){swiper.updateProgress();swiper.updateActiveIndex();swiper.updateSlidesClasses();}
return;}
var stopIndex=0;var groupSize=swiper.slidesSizesGrid[0];for(var i=0;i<slidesGrid.length;i+=i<params.slidesPerGroupSkip?1:params.slidesPerGroup){var _increment=i<params.slidesPerGroupSkip-1?1:params.slidesPerGroup;if(typeof slidesGrid[i+_increment]!=='undefined'){if(currentPos>=slidesGrid[i]&&currentPos<slidesGrid[i+_increment]){stopIndex=i;groupSize=slidesGrid[i+_increment]-slidesGrid[i];}}else if(currentPos>=slidesGrid[i]){stopIndex=i;groupSize=slidesGrid[slidesGrid.length-1]-slidesGrid[slidesGrid.length-2];}}
var ratio=(currentPos-slidesGrid[stopIndex])/groupSize;var increment=stopIndex<params.slidesPerGroupSkip-1?1:params.slidesPerGroup;if(timeDiff>params.longSwipesMs){if(!params.longSwipes){swiper.slideTo(swiper.activeIndex);return;}
if(swiper.swipeDirection==='next'){if(ratio>=params.longSwipesRatio)swiper.slideTo(stopIndex+increment);else swiper.slideTo(stopIndex);}
if(swiper.swipeDirection==='prev'){if(ratio>1-params.longSwipesRatio)swiper.slideTo(stopIndex+increment);else swiper.slideTo(stopIndex);}}else{if(!params.shortSwipes){swiper.slideTo(swiper.activeIndex);return;}
var isNavButtonTarget=swiper.navigation&&(e.target===swiper.navigation.nextEl||e.target===swiper.navigation.prevEl);if(!isNavButtonTarget){if(swiper.swipeDirection==='next'){swiper.slideTo(stopIndex+increment);}
if(swiper.swipeDirection==='prev'){swiper.slideTo(stopIndex);}}else if(e.target===swiper.navigation.nextEl){swiper.slideTo(stopIndex+increment);}else{swiper.slideTo(stopIndex);}}}
function onResize(){var swiper=this;var params=swiper.params,el=swiper.el;if(el&&el.offsetWidth===0)return;if(params.breakpoints){swiper.setBreakpoint();}
var allowSlideNext=swiper.allowSlideNext,allowSlidePrev=swiper.allowSlidePrev,snapGrid=swiper.snapGrid;swiper.allowSlideNext=true;swiper.allowSlidePrev=true;swiper.updateSize();swiper.updateSlides();swiper.updateSlidesClasses();if((params.slidesPerView==='auto'||params.slidesPerView>1)&&swiper.isEnd&&!swiper.isBeginning&&!swiper.params.centeredSlides){swiper.slideTo(swiper.slides.length-1,0,false,true);}else{swiper.slideTo(swiper.activeIndex,0,false,true);}
if(swiper.autoplay&&swiper.autoplay.running&&swiper.autoplay.paused){swiper.autoplay.run();}
swiper.allowSlidePrev=allowSlidePrev;swiper.allowSlideNext=allowSlideNext;if(swiper.params.watchOverflow&&snapGrid!==swiper.snapGrid){swiper.checkOverflow();}}
function onClick(e){var swiper=this;if(!swiper.allowClick){if(swiper.params.preventClicks)e.preventDefault();if(swiper.params.preventClicksPropagation&&swiper.animating){e.stopPropagation();e.stopImmediatePropagation();}}}
function onScroll(){var swiper=this;var wrapperEl=swiper.wrapperEl,rtlTranslate=swiper.rtlTranslate;swiper.previousTranslate=swiper.translate;if(swiper.isHorizontal()){if(rtlTranslate){swiper.translate=wrapperEl.scrollWidth-wrapperEl.offsetWidth-wrapperEl.scrollLeft;}else{swiper.translate=-wrapperEl.scrollLeft;}}else{swiper.translate=-wrapperEl.scrollTop;}
if(swiper.translate===-0)swiper.translate=0;swiper.updateActiveIndex();swiper.updateSlidesClasses();var newProgress;var translatesDiff=swiper.maxTranslate()-swiper.minTranslate();if(translatesDiff===0){newProgress=0;}else{newProgress=(swiper.translate-swiper.minTranslate())/translatesDiff;}
if(newProgress!==swiper.progress){swiper.updateProgress(rtlTranslate?-swiper.translate:swiper.translate);}
swiper.emit('setTranslate',swiper.translate,false);}
var dummyEventAttached=false;function dummyEventListener(){}
function attachEvents(){var swiper=this;var document=getDocument();var params=swiper.params,touchEvents=swiper.touchEvents,el=swiper.el,wrapperEl=swiper.wrapperEl,device=swiper.device,support=swiper.support;swiper.onTouchStart=onTouchStart.bind(swiper);swiper.onTouchMove=onTouchMove.bind(swiper);swiper.onTouchEnd=onTouchEnd.bind(swiper);if(params.cssMode){swiper.onScroll=onScroll.bind(swiper);}
swiper.onClick=onClick.bind(swiper);var capture=!!params.nested;if(!support.touch&&support.pointerEvents){el.addEventListener(touchEvents.start,swiper.onTouchStart,false);document.addEventListener(touchEvents.move,swiper.onTouchMove,capture);document.addEventListener(touchEvents.end,swiper.onTouchEnd,false);}else{if(support.touch){var passiveListener=touchEvents.start==='touchstart'&&support.passiveListener&&params.passiveListeners?{passive:true,capture:false}:false;el.addEventListener(touchEvents.start,swiper.onTouchStart,passiveListener);el.addEventListener(touchEvents.move,swiper.onTouchMove,support.passiveListener?{passive:false,capture:capture}:capture);el.addEventListener(touchEvents.end,swiper.onTouchEnd,passiveListener);if(touchEvents.cancel){el.addEventListener(touchEvents.cancel,swiper.onTouchEnd,passiveListener);}
if(!dummyEventAttached){document.addEventListener('touchstart',dummyEventListener);dummyEventAttached=true;}}
if(params.simulateTouch&&!device.ios&&!device.android||params.simulateTouch&&!support.touch&&device.ios){el.addEventListener('mousedown',swiper.onTouchStart,false);document.addEventListener('mousemove',swiper.onTouchMove,capture);document.addEventListener('mouseup',swiper.onTouchEnd,false);}}
if(params.preventClicks||params.preventClicksPropagation){el.addEventListener('click',swiper.onClick,true);}
if(params.cssMode){wrapperEl.addEventListener('scroll',swiper.onScroll);}
if(params.updateOnWindowResize){swiper.on(device.ios||device.android?'resize orientationchange observerUpdate':'resize observerUpdate',onResize,true);}else{swiper.on('observerUpdate',onResize,true);}}
function detachEvents(){var swiper=this;var document=getDocument();var params=swiper.params,touchEvents=swiper.touchEvents,el=swiper.el,wrapperEl=swiper.wrapperEl,device=swiper.device,support=swiper.support;var capture=!!params.nested;if(!support.touch&&support.pointerEvents){el.removeEventListener(touchEvents.start,swiper.onTouchStart,false);document.removeEventListener(touchEvents.move,swiper.onTouchMove,capture);document.removeEventListener(touchEvents.end,swiper.onTouchEnd,false);}else{if(support.touch){var passiveListener=touchEvents.start==='onTouchStart'&&support.passiveListener&&params.passiveListeners?{passive:true,capture:false}:false;el.removeEventListener(touchEvents.start,swiper.onTouchStart,passiveListener);el.removeEventListener(touchEvents.move,swiper.onTouchMove,capture);el.removeEventListener(touchEvents.end,swiper.onTouchEnd,passiveListener);if(touchEvents.cancel){el.removeEventListener(touchEvents.cancel,swiper.onTouchEnd,passiveListener);}}
if(params.simulateTouch&&!device.ios&&!device.android||params.simulateTouch&&!support.touch&&device.ios){el.removeEventListener('mousedown',swiper.onTouchStart,false);document.removeEventListener('mousemove',swiper.onTouchMove,capture);document.removeEventListener('mouseup',swiper.onTouchEnd,false);}}
if(params.preventClicks||params.preventClicksPropagation){el.removeEventListener('click',swiper.onClick,true);}
if(params.cssMode){wrapperEl.removeEventListener('scroll',swiper.onScroll);}
swiper.off(device.ios||device.android?'resize orientationchange observerUpdate':'resize observerUpdate',onResize);}
var events={attachEvents:attachEvents,detachEvents:detachEvents};function setBreakpoint(){var swiper=this;var activeIndex=swiper.activeIndex,initialized=swiper.initialized,_swiper$loopedSlides=swiper.loopedSlides,loopedSlides=_swiper$loopedSlides===void 0?0:_swiper$loopedSlides,params=swiper.params,$el=swiper.$el;var breakpoints=params.breakpoints;if(!breakpoints||breakpoints&&Object.keys(breakpoints).length===0)return;var breakpoint=swiper.getBreakpoint(breakpoints);if(breakpoint&&swiper.currentBreakpoint!==breakpoint){var breakpointOnlyParams=breakpoint in breakpoints?breakpoints[breakpoint]:undefined;if(breakpointOnlyParams){['slidesPerView','spaceBetween','slidesPerGroup','slidesPerGroupSkip','slidesPerColumn'].forEach(function(param){var paramValue=breakpointOnlyParams[param];if(typeof paramValue==='undefined')return;if(param==='slidesPerView'&&(paramValue==='AUTO'||paramValue==='auto')){breakpointOnlyParams[param]='auto';}else if(param==='slidesPerView'){breakpointOnlyParams[param]=parseFloat(paramValue);}else{breakpointOnlyParams[param]=parseInt(paramValue,10);}});}
var breakpointParams=breakpointOnlyParams||swiper.originalParams;var wasMultiRow=params.slidesPerColumn>1;var isMultiRow=breakpointParams.slidesPerColumn>1;if(wasMultiRow&&!isMultiRow){$el.removeClass(params.containerModifierClass+"multirow "+params.containerModifierClass+"multirow-column");swiper.emitContainerClasses();}else if(!wasMultiRow&&isMultiRow){$el.addClass(params.containerModifierClass+"multirow");if(breakpointParams.slidesPerColumnFill==='column'){$el.addClass(params.containerModifierClass+"multirow-column");}
swiper.emitContainerClasses();}
var directionChanged=breakpointParams.direction&&breakpointParams.direction!==params.direction;var needsReLoop=params.loop&&(breakpointParams.slidesPerView!==params.slidesPerView||directionChanged);if(directionChanged&&initialized){swiper.changeDirection();}
extend$1(swiper.params,breakpointParams);extend$1(swiper,{allowTouchMove:swiper.params.allowTouchMove,allowSlideNext:swiper.params.allowSlideNext,allowSlidePrev:swiper.params.allowSlidePrev});swiper.currentBreakpoint=breakpoint;swiper.emit('_beforeBreakpoint',breakpointParams);if(needsReLoop&&initialized){swiper.loopDestroy();swiper.loopCreate();swiper.updateSlides();swiper.slideTo(activeIndex-loopedSlides+swiper.loopedSlides,0,false);}
swiper.emit('breakpoint',breakpointParams);}}
function getBreakpoints(breakpoints){var window=getWindow();if(!breakpoints)return undefined;var breakpoint=false;var points=Object.keys(breakpoints).map(function(point){if(typeof point==='string'&&point.indexOf('@')===0){var minRatio=parseFloat(point.substr(1));var value=window.innerHeight*minRatio;return{value:value,point:point};}
return{value:point,point:point};});points.sort(function(a,b){return parseInt(a.value,10)-parseInt(b.value,10);});for(var i=0;i<points.length;i+=1){var _points$i=points[i],point=_points$i.point,value=_points$i.value;if(value<=window.innerWidth){breakpoint=point;}}
return breakpoint||'max';}
var breakpoints={setBreakpoint:setBreakpoint,getBreakpoint:getBreakpoints};function addClasses(){var swiper=this;var classNames=swiper.classNames,params=swiper.params,rtl=swiper.rtl,$el=swiper.$el,device=swiper.device;var suffixes=[];suffixes.push('initialized');suffixes.push(params.direction);if(params.freeMode){suffixes.push('free-mode');}
if(params.autoHeight){suffixes.push('autoheight');}
if(rtl){suffixes.push('rtl');}
if(params.slidesPerColumn>1){suffixes.push('multirow');if(params.slidesPerColumnFill==='column'){suffixes.push('multirow-column');}}
if(device.android){suffixes.push('android');}
if(device.ios){suffixes.push('ios');}
if(params.cssMode){suffixes.push('css-mode');}
suffixes.forEach(function(suffix){classNames.push(params.containerModifierClass+suffix);});$el.addClass(classNames.join(' '));swiper.emitContainerClasses();}
function removeClasses(){var swiper=this;var $el=swiper.$el,classNames=swiper.classNames;$el.removeClass(classNames.join(' '));swiper.emitContainerClasses();}
var classes={addClasses:addClasses,removeClasses:removeClasses};function loadImage(imageEl,src,srcset,sizes,checkForComplete,callback){var window=getWindow();var image;function onReady(){if(callback)callback();}
var isPicture=$(imageEl).parent('picture')[0];if(!isPicture&&(!imageEl.complete||!checkForComplete)){if(src){image=new window.Image();image.onload=onReady;image.onerror=onReady;if(sizes){image.sizes=sizes;}
if(srcset){image.srcset=srcset;}
if(src){image.src=src;}}else{onReady();}}else{onReady();}}
function preloadImages(){var swiper=this;swiper.imagesToLoad=swiper.$el.find('img');function onReady(){if(typeof swiper==='undefined'||swiper===null||!swiper||swiper.destroyed)return;if(swiper.imagesLoaded!==undefined)swiper.imagesLoaded+=1;if(swiper.imagesLoaded===swiper.imagesToLoad.length){if(swiper.params.updateOnImagesReady)swiper.update();swiper.emit('imagesReady');}}
for(var i=0;i<swiper.imagesToLoad.length;i+=1){var imageEl=swiper.imagesToLoad[i];swiper.loadImage(imageEl,imageEl.currentSrc||imageEl.getAttribute('src'),imageEl.srcset||imageEl.getAttribute('srcset'),imageEl.sizes||imageEl.getAttribute('sizes'),true,onReady);}}
var images={loadImage:loadImage,preloadImages:preloadImages};function checkOverflow(){var swiper=this;var params=swiper.params;var wasLocked=swiper.isLocked;var lastSlidePosition=swiper.slides.length>0&&params.slidesOffsetBefore+params.spaceBetween*(swiper.slides.length-1)+swiper.slides[0].offsetWidth*swiper.slides.length;if(params.slidesOffsetBefore&&params.slidesOffsetAfter&&lastSlidePosition){swiper.isLocked=lastSlidePosition<=swiper.size;}else{swiper.isLocked=swiper.snapGrid.length===1;}
swiper.allowSlideNext=!swiper.isLocked;swiper.allowSlidePrev=!swiper.isLocked;if(wasLocked!==swiper.isLocked)swiper.emit(swiper.isLocked?'lock':'unlock');if(wasLocked&&wasLocked!==swiper.isLocked){swiper.isEnd=false;if(swiper.navigation)swiper.navigation.update();}}
var checkOverflow$1={checkOverflow:checkOverflow};var defaults={init:true,direction:'horizontal',touchEventsTarget:'container',initialSlide:0,speed:300,cssMode:false,updateOnWindowResize:true,nested:false,width:null,height:null,preventInteractionOnTransition:false,userAgent:null,url:null,edgeSwipeDetection:false,edgeSwipeThreshold:20,freeMode:false,freeModeMomentum:true,freeModeMomentumRatio:1,freeModeMomentumBounce:true,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:false,freeModeMinimumVelocity:0.02,autoHeight:false,setWrapperSize:false,virtualTranslate:false,effect:'slide',breakpoints:undefined,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:'column',slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:false,centeredSlidesBounds:false,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:true,centerInsufficientSlides:false,watchOverflow:false,roundLengths:false,touchRatio:1,touchAngle:45,simulateTouch:true,shortSwipes:true,longSwipes:true,longSwipesRatio:0.5,longSwipesMs:300,followFinger:true,allowTouchMove:true,threshold:0,touchMoveStopPropagation:false,touchStartPreventDefault:true,touchStartForcePreventDefault:false,touchReleaseOnEdges:false,uniqueNavElements:true,resistance:true,resistanceRatio:0.85,watchSlidesProgress:false,watchSlidesVisibility:false,grabCursor:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,preloadImages:true,updateOnImagesReady:true,loop:false,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:false,loopPreventsSlide:true,allowSlidePrev:true,allowSlideNext:true,swipeHandler:null,noSwiping:true,noSwipingClass:'swiper-no-swiping',noSwipingSelector:null,passiveListeners:true,containerModifierClass:'swiper-container-',slideClass:'swiper-slide',slideBlankClass:'swiper-slide-invisible-blank',slideActiveClass:'swiper-slide-active',slideDuplicateActiveClass:'swiper-slide-duplicate-active',slideVisibleClass:'swiper-slide-visible',slideDuplicateClass:'swiper-slide-duplicate',slideNextClass:'swiper-slide-next',slideDuplicateNextClass:'swiper-slide-duplicate-next',slidePrevClass:'swiper-slide-prev',slideDuplicatePrevClass:'swiper-slide-duplicate-prev',wrapperClass:'swiper-wrapper',runCallbacksOnInit:true,_emitClasses:false};var prototypes={modular:modular,eventsEmitter:eventsEmitter,update:update,translate:translate,transition:transition$1,slide:slide,loop:loop,grabCursor:grabCursor,manipulation:manipulation,events:events,breakpoints:breakpoints,checkOverflow:checkOverflow$1,classes:classes,images:images};var extendedDefaults={};var Swiper=function(){function Swiper(){var el;var params;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}
if(args.length===1&&args[0].constructor&&args[0].constructor===Object){params=args[0];}else{el=args[0];params=args[1];}
if(!params)params={};params=extend$1({},params);if(el&&!params.el)params.el=el;var swiper=this;swiper.support=getSupport();swiper.device=getDevice({userAgent:params.userAgent});swiper.browser=getBrowser();swiper.eventsListeners={};swiper.eventsAnyListeners=[];if(typeof swiper.modules==='undefined'){swiper.modules={};}
Object.keys(swiper.modules).forEach(function(moduleName){var module=swiper.modules[moduleName];if(module.params){var moduleParamName=Object.keys(module.params)[0];var moduleParams=module.params[moduleParamName];if(typeof moduleParams!=='object'||moduleParams===null)return;if(!(moduleParamName in params&&'enabled'in moduleParams))return;if(params[moduleParamName]===true){params[moduleParamName]={enabled:true};}
if(typeof params[moduleParamName]==='object'&&!('enabled'in params[moduleParamName])){params[moduleParamName].enabled=true;}
if(!params[moduleParamName])params[moduleParamName]={enabled:false};}});var swiperParams=extend$1({},defaults);swiper.useParams(swiperParams);swiper.params=extend$1({},swiperParams,extendedDefaults,params);swiper.originalParams=extend$1({},swiper.params);swiper.passedParams=extend$1({},params);if(swiper.params&&swiper.params.on){Object.keys(swiper.params.on).forEach(function(eventName){swiper.on(eventName,swiper.params.on[eventName]);});}
if(swiper.params&&swiper.params.onAny){swiper.onAny(swiper.params.onAny);}
swiper.$=$;var $el=$(swiper.params.el);el=$el[0];if(!el){return undefined;}
if($el.length>1){var swipers=[];$el.each(function(containerEl){var newParams=extend$1({},params,{el:containerEl});swipers.push(new Swiper(newParams));});return swipers;}
el.swiper=swiper;var $wrapperEl;if(el&&el.shadowRoot&&el.shadowRoot.querySelector){$wrapperEl=$(el.shadowRoot.querySelector("."+swiper.params.wrapperClass));$wrapperEl.children=function(options){return $el.children(options);};}else{$wrapperEl=$el.children("."+swiper.params.wrapperClass);}
extend$1(swiper,{$el:$el,el:el,$wrapperEl:$wrapperEl,wrapperEl:$wrapperEl[0],classNames:[],slides:$(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function isHorizontal(){return swiper.params.direction==='horizontal';},isVertical:function isVertical(){return swiper.params.direction==='vertical';},rtl:el.dir.toLowerCase()==='rtl'||$el.css('direction')==='rtl',rtlTranslate:swiper.params.direction==='horizontal'&&(el.dir.toLowerCase()==='rtl'||$el.css('direction')==='rtl'),wrongRTL:$wrapperEl.css('display')==='-webkit-box',activeIndex:0,realIndex:0,isBeginning:true,isEnd:false,translate:0,previousTranslate:0,progress:0,velocity:0,animating:false,allowSlideNext:swiper.params.allowSlideNext,allowSlidePrev:swiper.params.allowSlidePrev,touchEvents:function touchEvents(){var touch=['touchstart','touchmove','touchend','touchcancel'];var desktop=['mousedown','mousemove','mouseup'];if(swiper.support.pointerEvents){desktop=['pointerdown','pointermove','pointerup'];}
swiper.touchEventsTouch={start:touch[0],move:touch[1],end:touch[2],cancel:touch[3]};swiper.touchEventsDesktop={start:desktop[0],move:desktop[1],end:desktop[2]};return swiper.support.touch||!swiper.params.simulateTouch?swiper.touchEventsTouch:swiper.touchEventsDesktop;}(),touchEventsData:{isTouched:undefined,isMoved:undefined,allowTouchCallbacks:undefined,touchStartTime:undefined,isScrolling:undefined,currentTranslate:undefined,startTranslate:undefined,allowThresholdMove:undefined,formElements:'input, select, option, textarea, button, video, label',lastClickTime:now(),clickTimeout:undefined,velocities:[],allowMomentumBounce:undefined,isTouchEvent:undefined,startMoving:undefined},allowClick:true,allowTouchMove:swiper.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0});swiper.useModules();swiper.emit('_swiper');if(swiper.params.init){swiper.init();}
return swiper;}
var _proto=Swiper.prototype;_proto.emitContainerClasses=function emitContainerClasses(){var swiper=this;if(!swiper.params._emitClasses||!swiper.el)return;var classes=swiper.el.className.split(' ').filter(function(className){return className.indexOf('swiper-container')===0||className.indexOf(swiper.params.containerModifierClass)===0;});swiper.emit('_containerClasses',classes.join(' '));};_proto.getSlideClasses=function getSlideClasses(slideEl){var swiper=this;return slideEl.className.split(' ').filter(function(className){return className.indexOf('swiper-slide')===0||className.indexOf(swiper.params.slideClass)===0;}).join(' ');};_proto.emitSlidesClasses=function emitSlidesClasses(){var swiper=this;if(!swiper.params._emitClasses||!swiper.el)return;swiper.slides.each(function(slideEl){var classNames=swiper.getSlideClasses(slideEl);swiper.emit('_slideClass',slideEl,classNames);});};_proto.slidesPerViewDynamic=function slidesPerViewDynamic(){var swiper=this;var params=swiper.params,slides=swiper.slides,slidesGrid=swiper.slidesGrid,swiperSize=swiper.size,activeIndex=swiper.activeIndex;var spv=1;if(params.centeredSlides){var slideSize=slides[activeIndex].swiperSlideSize;var breakLoop;for(var i=activeIndex+1;i<slides.length;i+=1){if(slides[i]&&!breakLoop){slideSize+=slides[i].swiperSlideSize;spv+=1;if(slideSize>swiperSize)breakLoop=true;}}
for(var _i=activeIndex-1;_i>=0;_i-=1){if(slides[_i]&&!breakLoop){slideSize+=slides[_i].swiperSlideSize;spv+=1;if(slideSize>swiperSize)breakLoop=true;}}}else{for(var _i2=activeIndex+1;_i2<slides.length;_i2+=1){if(slidesGrid[_i2]-slidesGrid[activeIndex]<swiperSize){spv+=1;}}}
return spv;};_proto.update=function update(){var swiper=this;if(!swiper||swiper.destroyed)return;var snapGrid=swiper.snapGrid,params=swiper.params;if(params.breakpoints){swiper.setBreakpoint();}
swiper.updateSize();swiper.updateSlides();swiper.updateProgress();swiper.updateSlidesClasses();function setTranslate(){var translateValue=swiper.rtlTranslate?swiper.translate*-1:swiper.translate;var newTranslate=Math.min(Math.max(translateValue,swiper.maxTranslate()),swiper.minTranslate());swiper.setTranslate(newTranslate);swiper.updateActiveIndex();swiper.updateSlidesClasses();}
var translated;if(swiper.params.freeMode){setTranslate();if(swiper.params.autoHeight){swiper.updateAutoHeight();}}else{if((swiper.params.slidesPerView==='auto'||swiper.params.slidesPerView>1)&&swiper.isEnd&&!swiper.params.centeredSlides){translated=swiper.slideTo(swiper.slides.length-1,0,false,true);}else{translated=swiper.slideTo(swiper.activeIndex,0,false,true);}
if(!translated){setTranslate();}}
if(params.watchOverflow&&snapGrid!==swiper.snapGrid){swiper.checkOverflow();}
swiper.emit('update');};_proto.changeDirection=function changeDirection(newDirection,needUpdate){if(needUpdate===void 0){needUpdate=true;}
var swiper=this;var currentDirection=swiper.params.direction;if(!newDirection){newDirection=currentDirection==='horizontal'?'vertical':'horizontal';}
if(newDirection===currentDirection||newDirection!=='horizontal'&&newDirection!=='vertical'){return swiper;}
swiper.$el.removeClass(""+swiper.params.containerModifierClass+currentDirection).addClass(""+swiper.params.containerModifierClass+newDirection);swiper.emitContainerClasses();swiper.params.direction=newDirection;swiper.slides.each(function(slideEl){if(newDirection==='vertical'){slideEl.style.width='';}else{slideEl.style.height='';}});swiper.emit('changeDirection');if(needUpdate)swiper.update();return swiper;};_proto.init=function init(){var swiper=this;if(swiper.initialized)return;swiper.emit('beforeInit');if(swiper.params.breakpoints){swiper.setBreakpoint();}
swiper.addClasses();if(swiper.params.loop){swiper.loopCreate();}
swiper.updateSize();swiper.updateSlides();if(swiper.params.watchOverflow){swiper.checkOverflow();}
if(swiper.params.grabCursor){swiper.setGrabCursor();}
if(swiper.params.preloadImages){swiper.preloadImages();}
if(swiper.params.loop){swiper.slideTo(swiper.params.initialSlide+swiper.loopedSlides,0,swiper.params.runCallbacksOnInit);}else{swiper.slideTo(swiper.params.initialSlide,0,swiper.params.runCallbacksOnInit);}
swiper.attachEvents();swiper.initialized=true;swiper.emit('init');swiper.emit('afterInit');};_proto.destroy=function destroy(deleteInstance,cleanStyles){if(deleteInstance===void 0){deleteInstance=true;}
if(cleanStyles===void 0){cleanStyles=true;}
var swiper=this;var params=swiper.params,$el=swiper.$el,$wrapperEl=swiper.$wrapperEl,slides=swiper.slides;if(typeof swiper.params==='undefined'||swiper.destroyed){return null;}
swiper.emit('beforeDestroy');swiper.initialized=false;swiper.detachEvents();if(params.loop){swiper.loopDestroy();}
if(cleanStyles){swiper.removeClasses();$el.removeAttr('style');$wrapperEl.removeAttr('style');if(slides&&slides.length){slides.removeClass([params.slideVisibleClass,params.slideActiveClass,params.slideNextClass,params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index');}}
swiper.emit('destroy');Object.keys(swiper.eventsListeners).forEach(function(eventName){swiper.off(eventName);});if(deleteInstance!==false){swiper.$el[0].swiper=null;deleteProps(swiper);}
swiper.destroyed=true;return null;};Swiper.extendDefaults=function extendDefaults(newDefaults){extend$1(extendedDefaults,newDefaults);};Swiper.installModule=function installModule(module){if(!Swiper.prototype.modules)Swiper.prototype.modules={};var name=module.name||Object.keys(Swiper.prototype.modules).length+"_"+now();Swiper.prototype.modules[name]=module;};Swiper.use=function use(module){if(Array.isArray(module)){module.forEach(function(m){return Swiper.installModule(m);});return Swiper;}
Swiper.installModule(module);return Swiper;};_createClass(Swiper,null,[{key:"extendedDefaults",get:function get(){return extendedDefaults;}},{key:"defaults",get:function get(){return defaults;}}]);return Swiper;}();Object.keys(prototypes).forEach(function(prototypeGroup){Object.keys(prototypes[prototypeGroup]).forEach(function(protoMethod){Swiper.prototype[protoMethod]=prototypes[prototypeGroup][protoMethod];});});Swiper.use([Resize,Observer$1]);var Virtual={update:function update(force){var swiper=this;var _swiper$params=swiper.params,slidesPerView=_swiper$params.slidesPerView,slidesPerGroup=_swiper$params.slidesPerGroup,centeredSlides=_swiper$params.centeredSlides;var _swiper$params$virtua=swiper.params.virtual,addSlidesBefore=_swiper$params$virtua.addSlidesBefore,addSlidesAfter=_swiper$params$virtua.addSlidesAfter;var _swiper$virtual=swiper.virtual,previousFrom=_swiper$virtual.from,previousTo=_swiper$virtual.to,slides=_swiper$virtual.slides,previousSlidesGrid=_swiper$virtual.slidesGrid,renderSlide=_swiper$virtual.renderSlide,previousOffset=_swiper$virtual.offset;swiper.updateActiveIndex();var activeIndex=swiper.activeIndex||0;var offsetProp;if(swiper.rtlTranslate)offsetProp='right';else offsetProp=swiper.isHorizontal()?'left':'top';var slidesAfter;var slidesBefore;if(centeredSlides){slidesAfter=Math.floor(slidesPerView/2)+slidesPerGroup+addSlidesAfter;slidesBefore=Math.floor(slidesPerView/2)+slidesPerGroup+addSlidesBefore;}else{slidesAfter=slidesPerView+(slidesPerGroup-1)+addSlidesAfter;slidesBefore=slidesPerGroup+addSlidesBefore;}
var from=Math.max((activeIndex||0)-slidesBefore,0);var to=Math.min((activeIndex||0)+slidesAfter,slides.length-1);var offset=(swiper.slidesGrid[from]||0)-(swiper.slidesGrid[0]||0);extend$1(swiper.virtual,{from:from,to:to,offset:offset,slidesGrid:swiper.slidesGrid});function onRendered(){swiper.updateSlides();swiper.updateProgress();swiper.updateSlidesClasses();if(swiper.lazy&&swiper.params.lazy.enabled){swiper.lazy.load();}}
if(previousFrom===from&&previousTo===to&&!force){if(swiper.slidesGrid!==previousSlidesGrid&&offset!==previousOffset){swiper.slides.css(offsetProp,offset+"px");}
swiper.updateProgress();return;}
if(swiper.params.virtual.renderExternal){swiper.params.virtual.renderExternal.call(swiper,{offset:offset,from:from,to:to,slides:function getSlides(){var slidesToRender=[];for(var i=from;i<=to;i+=1){slidesToRender.push(slides[i]);}
return slidesToRender;}()});if(swiper.params.virtual.renderExternalUpdate){onRendered();}
return;}
var prependIndexes=[];var appendIndexes=[];if(force){swiper.$wrapperEl.find("."+swiper.params.slideClass).remove();}else{for(var i=previousFrom;i<=previousTo;i+=1){if(i<from||i>to){swiper.$wrapperEl.find("."+swiper.params.slideClass+"[data-swiper-slide-index=\""+i+"\"]").remove();}}}
for(var _i=0;_i<slides.length;_i+=1){if(_i>=from&&_i<=to){if(typeof previousTo==='undefined'||force){appendIndexes.push(_i);}else{if(_i>previousTo)appendIndexes.push(_i);if(_i<previousFrom)prependIndexes.push(_i);}}}
appendIndexes.forEach(function(index){swiper.$wrapperEl.append(renderSlide(slides[index],index));});prependIndexes.sort(function(a,b){return b-a;}).forEach(function(index){swiper.$wrapperEl.prepend(renderSlide(slides[index],index));});swiper.$wrapperEl.children('.swiper-slide').css(offsetProp,offset+"px");onRendered();},renderSlide:function renderSlide(slide,index){var swiper=this;var params=swiper.params.virtual;if(params.cache&&swiper.virtual.cache[index]){return swiper.virtual.cache[index];}
var $slideEl=params.renderSlide?$(params.renderSlide.call(swiper,slide,index)):$("<div class=\""+swiper.params.slideClass+"\" data-swiper-slide-index=\""+index+"\">"+slide+"</div>");if(!$slideEl.attr('data-swiper-slide-index'))$slideEl.attr('data-swiper-slide-index',index);if(params.cache)swiper.virtual.cache[index]=$slideEl;return $slideEl;},appendSlide:function appendSlide(slides){var swiper=this;if(typeof slides==='object'&&'length'in slides){for(var i=0;i<slides.length;i+=1){if(slides[i])swiper.virtual.slides.push(slides[i]);}}else{swiper.virtual.slides.push(slides);}
swiper.virtual.update(true);},prependSlide:function prependSlide(slides){var swiper=this;var activeIndex=swiper.activeIndex;var newActiveIndex=activeIndex+1;var numberOfNewSlides=1;if(Array.isArray(slides)){for(var i=0;i<slides.length;i+=1){if(slides[i])swiper.virtual.slides.unshift(slides[i]);}
newActiveIndex=activeIndex+slides.length;numberOfNewSlides=slides.length;}else{swiper.virtual.slides.unshift(slides);}
if(swiper.params.virtual.cache){var cache=swiper.virtual.cache;var newCache={};Object.keys(cache).forEach(function(cachedIndex){var $cachedEl=cache[cachedIndex];var cachedElIndex=$cachedEl.attr('data-swiper-slide-index');if(cachedElIndex){$cachedEl.attr('data-swiper-slide-index',parseInt(cachedElIndex,10)+1);}
newCache[parseInt(cachedIndex,10)+numberOfNewSlides]=$cachedEl;});swiper.virtual.cache=newCache;}
swiper.virtual.update(true);swiper.slideTo(newActiveIndex,0);},removeSlide:function removeSlide(slidesIndexes){var swiper=this;if(typeof slidesIndexes==='undefined'||slidesIndexes===null)return;var activeIndex=swiper.activeIndex;if(Array.isArray(slidesIndexes)){for(var i=slidesIndexes.length-1;i>=0;i-=1){swiper.virtual.slides.splice(slidesIndexes[i],1);if(swiper.params.virtual.cache){delete swiper.virtual.cache[slidesIndexes[i]];}
if(slidesIndexes[i]<activeIndex)activeIndex-=1;activeIndex=Math.max(activeIndex,0);}}else{swiper.virtual.slides.splice(slidesIndexes,1);if(swiper.params.virtual.cache){delete swiper.virtual.cache[slidesIndexes];}
if(slidesIndexes<activeIndex)activeIndex-=1;activeIndex=Math.max(activeIndex,0);}
swiper.virtual.update(true);swiper.slideTo(activeIndex,0);},removeAllSlides:function removeAllSlides(){var swiper=this;swiper.virtual.slides=[];if(swiper.params.virtual.cache){swiper.virtual.cache={};}
swiper.virtual.update(true);swiper.slideTo(0,0);}};var Virtual$1={name:'virtual',params:{virtual:{enabled:false,slides:[],cache:true,renderSlide:null,renderExternal:null,renderExternalUpdate:true,addSlidesBefore:0,addSlidesAfter:0}},create:function create(){var swiper=this;bindModuleMethods(swiper,{virtual:_extends({},Virtual,{slides:swiper.params.virtual.slides,cache:{}})});},on:{beforeInit:function beforeInit(swiper){if(!swiper.params.virtual.enabled)return;swiper.classNames.push(swiper.params.containerModifierClass+"virtual");var overwriteParams={watchSlidesProgress:true};extend$1(swiper.params,overwriteParams);extend$1(swiper.originalParams,overwriteParams);if(!swiper.params.initialSlide){swiper.virtual.update();}},setTranslate:function setTranslate(swiper){if(!swiper.params.virtual.enabled)return;swiper.virtual.update();}}};var Keyboard={handle:function handle(event){var swiper=this;var window=getWindow();var document=getDocument();var rtl=swiper.rtlTranslate;var e=event;if(e.originalEvent)e=e.originalEvent;var kc=e.keyCode||e.charCode;var pageUpDown=swiper.params.keyboard.pageUpDown;var isPageUp=pageUpDown&&kc===33;var isPageDown=pageUpDown&&kc===34;var isArrowLeft=kc===37;var isArrowRight=kc===39;var isArrowUp=kc===38;var isArrowDown=kc===40;if(!swiper.allowSlideNext&&(swiper.isHorizontal()&&isArrowRight||swiper.isVertical()&&isArrowDown||isPageDown)){return false;}
if(!swiper.allowSlidePrev&&(swiper.isHorizontal()&&isArrowLeft||swiper.isVertical()&&isArrowUp||isPageUp)){return false;}
if(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey){return undefined;}
if(document.activeElement&&document.activeElement.nodeName&&(document.activeElement.nodeName.toLowerCase()==='input'||document.activeElement.nodeName.toLowerCase()==='textarea')){return undefined;}
if(swiper.params.keyboard.onlyInViewport&&(isPageUp||isPageDown||isArrowLeft||isArrowRight||isArrowUp||isArrowDown)){var inView=false;if(swiper.$el.parents("."+swiper.params.slideClass).length>0&&swiper.$el.parents("."+swiper.params.slideActiveClass).length===0){return undefined;}
var windowWidth=window.innerWidth;var windowHeight=window.innerHeight;var swiperOffset=swiper.$el.offset();if(rtl)swiperOffset.left-=swiper.$el[0].scrollLeft;var swiperCoord=[[swiperOffset.left,swiperOffset.top],[swiperOffset.left+swiper.width,swiperOffset.top],[swiperOffset.left,swiperOffset.top+swiper.height],[swiperOffset.left+swiper.width,swiperOffset.top+swiper.height]];for(var i=0;i<swiperCoord.length;i+=1){var point=swiperCoord[i];if(point[0]>=0&&point[0]<=windowWidth&&point[1]>=0&&point[1]<=windowHeight){if(point[0]===0&&point[1]===0)continue;inView=true;}}
if(!inView)return undefined;}
if(swiper.isHorizontal()){if(isPageUp||isPageDown||isArrowLeft||isArrowRight){if(e.preventDefault)e.preventDefault();else e.returnValue=false;}
if((isPageDown||isArrowRight)&&!rtl||(isPageUp||isArrowLeft)&&rtl)swiper.slideNext();if((isPageUp||isArrowLeft)&&!rtl||(isPageDown||isArrowRight)&&rtl)swiper.slidePrev();}else{if(isPageUp||isPageDown||isArrowUp||isArrowDown){if(e.preventDefault)e.preventDefault();else e.returnValue=false;}
if(isPageDown||isArrowDown)swiper.slideNext();if(isPageUp||isArrowUp)swiper.slidePrev();}
swiper.emit('keyPress',kc);return undefined;},enable:function enable(){var swiper=this;var document=getDocument();if(swiper.keyboard.enabled)return;$(document).on('keydown',swiper.keyboard.handle);swiper.keyboard.enabled=true;},disable:function disable(){var swiper=this;var document=getDocument();if(!swiper.keyboard.enabled)return;$(document).off('keydown',swiper.keyboard.handle);swiper.keyboard.enabled=false;}};var Keyboard$1={name:'keyboard',params:{keyboard:{enabled:false,onlyInViewport:true,pageUpDown:true}},create:function create(){var swiper=this;bindModuleMethods(swiper,{keyboard:_extends({enabled:false},Keyboard)});},on:{init:function init(swiper){if(swiper.params.keyboard.enabled){swiper.keyboard.enable();}},destroy:function destroy(swiper){if(swiper.keyboard.enabled){swiper.keyboard.disable();}}}};function isEventSupported(){var document=getDocument();var eventName='onwheel';var isSupported=(eventName in document);if(!isSupported){var element=document.createElement('div');element.setAttribute(eventName,'return;');isSupported=typeof element[eventName]==='function';}
if(!isSupported&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature('','')!==true){isSupported=document.implementation.hasFeature('Events.wheel','3.0');}
return isSupported;}
var Mousewheel={lastScrollTime:now(),lastEventBeforeSnap:undefined,recentWheelEvents:[],event:function event(){var window=getWindow();if(window.navigator.userAgent.indexOf('firefox')>-1)return'DOMMouseScroll';return isEventSupported()?'wheel':'mousewheel';},normalize:function normalize(e){var PIXEL_STEP=10;var LINE_HEIGHT=40;var PAGE_HEIGHT=800;var sX=0;var sY=0;var pX=0;var pY=0;if('detail'in e){sY=e.detail;}
if('wheelDelta'in e){sY=-e.wheelDelta/120;}
if('wheelDeltaY'in e){sY=-e.wheelDeltaY/120;}
if('wheelDeltaX'in e){sX=-e.wheelDeltaX/120;}
if('axis'in e&&e.axis===e.HORIZONTAL_AXIS){sX=sY;sY=0;}
pX=sX*PIXEL_STEP;pY=sY*PIXEL_STEP;if('deltaY'in e){pY=e.deltaY;}
if('deltaX'in e){pX=e.deltaX;}
if(e.shiftKey&&!pX){pX=pY;pY=0;}
if((pX||pY)&&e.deltaMode){if(e.deltaMode===1){pX*=LINE_HEIGHT;pY*=LINE_HEIGHT;}else{pX*=PAGE_HEIGHT;pY*=PAGE_HEIGHT;}}
if(pX&&!sX){sX=pX<1?-1:1;}
if(pY&&!sY){sY=pY<1?-1:1;}
return{spinX:sX,spinY:sY,pixelX:pX,pixelY:pY};},handleMouseEnter:function handleMouseEnter(){var swiper=this;swiper.mouseEntered=true;},handleMouseLeave:function handleMouseLeave(){var swiper=this;swiper.mouseEntered=false;},handle:function handle(event){var e=event;var disableParentSwiper=true;var swiper=this;var params=swiper.params.mousewheel;if(swiper.params.cssMode){e.preventDefault();}
var target=swiper.$el;if(swiper.params.mousewheel.eventsTarget!=='container'){target=$(swiper.params.mousewheel.eventsTarget);}
if(!swiper.mouseEntered&&!target[0].contains(e.target)&&!params.releaseOnEdges)return true;if(e.originalEvent)e=e.originalEvent;var delta=0;var rtlFactor=swiper.rtlTranslate?-1:1;var data=Mousewheel.normalize(e);if(params.forceToAxis){if(swiper.isHorizontal()){if(Math.abs(data.pixelX)>Math.abs(data.pixelY))delta=-data.pixelX*rtlFactor;else return true;}else if(Math.abs(data.pixelY)>Math.abs(data.pixelX))delta=-data.pixelY;else return true;}else{delta=Math.abs(data.pixelX)>Math.abs(data.pixelY)?-data.pixelX*rtlFactor:-data.pixelY;}
if(delta===0)return true;if(params.invert)delta=-delta;var positions=swiper.getTranslate()+delta*params.sensitivity;if(positions>=swiper.minTranslate())positions=swiper.minTranslate();if(positions<=swiper.maxTranslate())positions=swiper.maxTranslate();disableParentSwiper=swiper.params.loop?true:!(positions===swiper.minTranslate()||positions===swiper.maxTranslate());if(disableParentSwiper&&swiper.params.nested)e.stopPropagation();if(!swiper.params.freeMode){var newEvent={time:now(),delta:Math.abs(delta),direction:Math.sign(delta),raw:event};var recentWheelEvents=swiper.mousewheel.recentWheelEvents;if(recentWheelEvents.length>=2){recentWheelEvents.shift();}
var prevEvent=recentWheelEvents.length?recentWheelEvents[recentWheelEvents.length-1]:undefined;recentWheelEvents.push(newEvent);if(prevEvent){if(newEvent.direction!==prevEvent.direction||newEvent.delta>prevEvent.delta||newEvent.time>prevEvent.time+150){swiper.mousewheel.animateSlider(newEvent);}}else{swiper.mousewheel.animateSlider(newEvent);}
if(swiper.mousewheel.releaseScroll(newEvent)){return true;}}else{var _newEvent={time:now(),delta:Math.abs(delta),direction:Math.sign(delta)};var lastEventBeforeSnap=swiper.mousewheel.lastEventBeforeSnap;var ignoreWheelEvents=lastEventBeforeSnap&&_newEvent.time<lastEventBeforeSnap.time+500&&_newEvent.delta<=lastEventBeforeSnap.delta&&_newEvent.direction===lastEventBeforeSnap.direction;if(!ignoreWheelEvents){swiper.mousewheel.lastEventBeforeSnap=undefined;if(swiper.params.loop){swiper.loopFix();}
var position=swiper.getTranslate()+delta*params.sensitivity;var wasBeginning=swiper.isBeginning;var wasEnd=swiper.isEnd;if(position>=swiper.minTranslate())position=swiper.minTranslate();if(position<=swiper.maxTranslate())position=swiper.maxTranslate();swiper.setTransition(0);swiper.setTranslate(position);swiper.updateProgress();swiper.updateActiveIndex();swiper.updateSlidesClasses();if(!wasBeginning&&swiper.isBeginning||!wasEnd&&swiper.isEnd){swiper.updateSlidesClasses();}
if(swiper.params.freeModeSticky){clearTimeout(swiper.mousewheel.timeout);swiper.mousewheel.timeout=undefined;var _recentWheelEvents=swiper.mousewheel.recentWheelEvents;if(_recentWheelEvents.length>=15){_recentWheelEvents.shift();}
var _prevEvent=_recentWheelEvents.length?_recentWheelEvents[_recentWheelEvents.length-1]:undefined;var firstEvent=_recentWheelEvents[0];_recentWheelEvents.push(_newEvent);if(_prevEvent&&(_newEvent.delta>_prevEvent.delta||_newEvent.direction!==_prevEvent.direction)){_recentWheelEvents.splice(0);}else if(_recentWheelEvents.length>=15&&_newEvent.time-firstEvent.time<500&&firstEvent.delta-_newEvent.delta>=1&&_newEvent.delta<=6){var snapToThreshold=delta>0?0.8:0.2;swiper.mousewheel.lastEventBeforeSnap=_newEvent;_recentWheelEvents.splice(0);swiper.mousewheel.timeout=nextTick(function(){swiper.slideToClosest(swiper.params.speed,true,undefined,snapToThreshold);},0);}
if(!swiper.mousewheel.timeout){swiper.mousewheel.timeout=nextTick(function(){var snapToThreshold=0.5;swiper.mousewheel.lastEventBeforeSnap=_newEvent;_recentWheelEvents.splice(0);swiper.slideToClosest(swiper.params.speed,true,undefined,snapToThreshold);},500);}}
if(!ignoreWheelEvents)swiper.emit('scroll',e);if(swiper.params.autoplay&&swiper.params.autoplayDisableOnInteraction)swiper.autoplay.stop();if(position===swiper.minTranslate()||position===swiper.maxTranslate())return true;}}
if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;},animateSlider:function animateSlider(newEvent){var swiper=this;var window=getWindow();if(this.params.mousewheel.thresholdDelta&&newEvent.delta<this.params.mousewheel.thresholdDelta){return false;}
if(this.params.mousewheel.thresholdTime&&now()-swiper.mousewheel.lastScrollTime<this.params.mousewheel.thresholdTime){return false;}
if(newEvent.delta>=6&&now()-swiper.mousewheel.lastScrollTime<60){return true;}
if(newEvent.direction<0){if((!swiper.isEnd||swiper.params.loop)&&!swiper.animating){swiper.slideNext();swiper.emit('scroll',newEvent.raw);}}else if((!swiper.isBeginning||swiper.params.loop)&&!swiper.animating){swiper.slidePrev();swiper.emit('scroll',newEvent.raw);}
swiper.mousewheel.lastScrollTime=new window.Date().getTime();return false;},releaseScroll:function releaseScroll(newEvent){var swiper=this;var params=swiper.params.mousewheel;if(newEvent.direction<0){if(swiper.isEnd&&!swiper.params.loop&&params.releaseOnEdges){return true;}}else if(swiper.isBeginning&&!swiper.params.loop&&params.releaseOnEdges){return true;}
return false;},enable:function enable(){var swiper=this;var event=Mousewheel.event();if(swiper.params.cssMode){swiper.wrapperEl.removeEventListener(event,swiper.mousewheel.handle);return true;}
if(!event)return false;if(swiper.mousewheel.enabled)return false;var target=swiper.$el;if(swiper.params.mousewheel.eventsTarget!=='container'){target=$(swiper.params.mousewheel.eventsTarget);}
target.on('mouseenter',swiper.mousewheel.handleMouseEnter);target.on('mouseleave',swiper.mousewheel.handleMouseLeave);target.on(event,swiper.mousewheel.handle);swiper.mousewheel.enabled=true;return true;},disable:function disable(){var swiper=this;var event=Mousewheel.event();if(swiper.params.cssMode){swiper.wrapperEl.addEventListener(event,swiper.mousewheel.handle);return true;}
if(!event)return false;if(!swiper.mousewheel.enabled)return false;var target=swiper.$el;if(swiper.params.mousewheel.eventsTarget!=='container'){target=$(swiper.params.mousewheel.eventsTarget);}
target.off(event,swiper.mousewheel.handle);swiper.mousewheel.enabled=false;return true;}};var Mousewheel$1={name:'mousewheel',params:{mousewheel:{enabled:false,releaseOnEdges:false,invert:false,forceToAxis:false,sensitivity:1,eventsTarget:'container',thresholdDelta:null,thresholdTime:null}},create:function create(){var swiper=this;bindModuleMethods(swiper,{mousewheel:{enabled:false,lastScrollTime:now(),lastEventBeforeSnap:undefined,recentWheelEvents:[],enable:Mousewheel.enable,disable:Mousewheel.disable,handle:Mousewheel.handle,handleMouseEnter:Mousewheel.handleMouseEnter,handleMouseLeave:Mousewheel.handleMouseLeave,animateSlider:Mousewheel.animateSlider,releaseScroll:Mousewheel.releaseScroll}});},on:{init:function init(swiper){if(!swiper.params.mousewheel.enabled&&swiper.params.cssMode){swiper.mousewheel.disable();}
if(swiper.params.mousewheel.enabled)swiper.mousewheel.enable();},destroy:function destroy(swiper){if(swiper.params.cssMode){swiper.mousewheel.enable();}
if(swiper.mousewheel.enabled)swiper.mousewheel.disable();}}};var Navigation={update:function update(){var swiper=this;var params=swiper.params.navigation;if(swiper.params.loop)return;var _swiper$navigation=swiper.navigation,$nextEl=_swiper$navigation.$nextEl,$prevEl=_swiper$navigation.$prevEl;if($prevEl&&$prevEl.length>0){if(swiper.isBeginning){$prevEl.addClass(params.disabledClass);}else{$prevEl.removeClass(params.disabledClass);}
$prevEl[swiper.params.watchOverflow&&swiper.isLocked?'addClass':'removeClass'](params.lockClass);}
if($nextEl&&$nextEl.length>0){if(swiper.isEnd){$nextEl.addClass(params.disabledClass);}else{$nextEl.removeClass(params.disabledClass);}
$nextEl[swiper.params.watchOverflow&&swiper.isLocked?'addClass':'removeClass'](params.lockClass);}},onPrevClick:function onPrevClick(e){var swiper=this;e.preventDefault();if(swiper.isBeginning&&!swiper.params.loop)return;swiper.slidePrev();},onNextClick:function onNextClick(e){var swiper=this;e.preventDefault();if(swiper.isEnd&&!swiper.params.loop)return;swiper.slideNext();},init:function init(){var swiper=this;var params=swiper.params.navigation;if(!(params.nextEl||params.prevEl))return;var $nextEl;var $prevEl;if(params.nextEl){$nextEl=$(params.nextEl);if(swiper.params.uniqueNavElements&&typeof params.nextEl==='string'&&$nextEl.length>1&&swiper.$el.find(params.nextEl).length===1){$nextEl=swiper.$el.find(params.nextEl);}}
if(params.prevEl){$prevEl=$(params.prevEl);if(swiper.params.uniqueNavElements&&typeof params.prevEl==='string'&&$prevEl.length>1&&swiper.$el.find(params.prevEl).length===1){$prevEl=swiper.$el.find(params.prevEl);}}
if($nextEl&&$nextEl.length>0){$nextEl.on('click',swiper.navigation.onNextClick);}
if($prevEl&&$prevEl.length>0){$prevEl.on('click',swiper.navigation.onPrevClick);}
extend$1(swiper.navigation,{$nextEl:$nextEl,nextEl:$nextEl&&$nextEl[0],$prevEl:$prevEl,prevEl:$prevEl&&$prevEl[0]});},destroy:function destroy(){var swiper=this;var _swiper$navigation2=swiper.navigation,$nextEl=_swiper$navigation2.$nextEl,$prevEl=_swiper$navigation2.$prevEl;if($nextEl&&$nextEl.length){$nextEl.off('click',swiper.navigation.onNextClick);$nextEl.removeClass(swiper.params.navigation.disabledClass);}
if($prevEl&&$prevEl.length){$prevEl.off('click',swiper.navigation.onPrevClick);$prevEl.removeClass(swiper.params.navigation.disabledClass);}}};var Navigation$1={name:'navigation',params:{navigation:{nextEl:null,prevEl:null,hideOnClick:false,disabledClass:'swiper-button-disabled',hiddenClass:'swiper-button-hidden',lockClass:'swiper-button-lock'}},create:function create(){var swiper=this;bindModuleMethods(swiper,{navigation:_extends({},Navigation)});},on:{init:function init(swiper){swiper.navigation.init();swiper.navigation.update();},toEdge:function toEdge(swiper){swiper.navigation.update();},fromEdge:function fromEdge(swiper){swiper.navigation.update();},destroy:function destroy(swiper){swiper.navigation.destroy();},click:function click(swiper,e){var _swiper$navigation3=swiper.navigation,$nextEl=_swiper$navigation3.$nextEl,$prevEl=_swiper$navigation3.$prevEl;if(swiper.params.navigation.hideOnClick&&!$(e.target).is($prevEl)&&!$(e.target).is($nextEl)){var isHidden;if($nextEl){isHidden=$nextEl.hasClass(swiper.params.navigation.hiddenClass);}else if($prevEl){isHidden=$prevEl.hasClass(swiper.params.navigation.hiddenClass);}
if(isHidden===true){swiper.emit('navigationShow');}else{swiper.emit('navigationHide');}
if($nextEl){$nextEl.toggleClass(swiper.params.navigation.hiddenClass);}
if($prevEl){$prevEl.toggleClass(swiper.params.navigation.hiddenClass);}}}}};var Pagination={update:function update(){var swiper=this;var rtl=swiper.rtl;var params=swiper.params.pagination;if(!params.el||!swiper.pagination.el||!swiper.pagination.$el||swiper.pagination.$el.length===0)return;var slidesLength=swiper.virtual&&swiper.params.virtual.enabled?swiper.virtual.slides.length:swiper.slides.length;var $el=swiper.pagination.$el;var current;var total=swiper.params.loop?Math.ceil((slidesLength-swiper.loopedSlides*2)/swiper.params.slidesPerGroup):swiper.snapGrid.length;if(swiper.params.loop){current=Math.ceil((swiper.activeIndex-swiper.loopedSlides)/swiper.params.slidesPerGroup);if(current>slidesLength-1-swiper.loopedSlides*2){current-=slidesLength-swiper.loopedSlides*2;}
if(current>total-1)current-=total;if(current<0&&swiper.params.paginationType!=='bullets')current=total+current;}else if(typeof swiper.snapIndex!=='undefined'){current=swiper.snapIndex;}else{current=swiper.activeIndex||0;}
if(params.type==='bullets'&&swiper.pagination.bullets&&swiper.pagination.bullets.length>0){var bullets=swiper.pagination.bullets;var firstIndex;var lastIndex;var midIndex;if(params.dynamicBullets){swiper.pagination.bulletSize=bullets.eq(0)[swiper.isHorizontal()?'outerWidth':'outerHeight'](true);$el.css(swiper.isHorizontal()?'width':'height',swiper.pagination.bulletSize*(params.dynamicMainBullets+4)+"px");if(params.dynamicMainBullets>1&&swiper.previousIndex!==undefined){swiper.pagination.dynamicBulletIndex+=current-swiper.previousIndex;if(swiper.pagination.dynamicBulletIndex>params.dynamicMainBullets-1){swiper.pagination.dynamicBulletIndex=params.dynamicMainBullets-1;}else if(swiper.pagination.dynamicBulletIndex<0){swiper.pagination.dynamicBulletIndex=0;}}
firstIndex=current-swiper.pagination.dynamicBulletIndex;lastIndex=firstIndex+(Math.min(bullets.length,params.dynamicMainBullets)-1);midIndex=(lastIndex+firstIndex)/2;}
bullets.removeClass(params.bulletActiveClass+" "+params.bulletActiveClass+"-next "+params.bulletActiveClass+"-next-next "+params.bulletActiveClass+"-prev "+params.bulletActiveClass+"-prev-prev "+params.bulletActiveClass+"-main");if($el.length>1){bullets.each(function(bullet){var $bullet=$(bullet);var bulletIndex=$bullet.index();if(bulletIndex===current){$bullet.addClass(params.bulletActiveClass);}
if(params.dynamicBullets){if(bulletIndex>=firstIndex&&bulletIndex<=lastIndex){$bullet.addClass(params.bulletActiveClass+"-main");}
if(bulletIndex===firstIndex){$bullet.prev().addClass(params.bulletActiveClass+"-prev").prev().addClass(params.bulletActiveClass+"-prev-prev");}
if(bulletIndex===lastIndex){$bullet.next().addClass(params.bulletActiveClass+"-next").next().addClass(params.bulletActiveClass+"-next-next");}}});}else{var $bullet=bullets.eq(current);var bulletIndex=$bullet.index();$bullet.addClass(params.bulletActiveClass);if(params.dynamicBullets){var $firstDisplayedBullet=bullets.eq(firstIndex);var $lastDisplayedBullet=bullets.eq(lastIndex);for(var i=firstIndex;i<=lastIndex;i+=1){bullets.eq(i).addClass(params.bulletActiveClass+"-main");}
if(swiper.params.loop){if(bulletIndex>=bullets.length-params.dynamicMainBullets){for(var _i=params.dynamicMainBullets;_i>=0;_i-=1){bullets.eq(bullets.length-_i).addClass(params.bulletActiveClass+"-main");}
bullets.eq(bullets.length-params.dynamicMainBullets-1).addClass(params.bulletActiveClass+"-prev");}else{$firstDisplayedBullet.prev().addClass(params.bulletActiveClass+"-prev").prev().addClass(params.bulletActiveClass+"-prev-prev");$lastDisplayedBullet.next().addClass(params.bulletActiveClass+"-next").next().addClass(params.bulletActiveClass+"-next-next");}}else{$firstDisplayedBullet.prev().addClass(params.bulletActiveClass+"-prev").prev().addClass(params.bulletActiveClass+"-prev-prev");$lastDisplayedBullet.next().addClass(params.bulletActiveClass+"-next").next().addClass(params.bulletActiveClass+"-next-next");}}}
if(params.dynamicBullets){var dynamicBulletsLength=Math.min(bullets.length,params.dynamicMainBullets+4);var bulletsOffset=(swiper.pagination.bulletSize*dynamicBulletsLength-swiper.pagination.bulletSize)/2-midIndex*swiper.pagination.bulletSize;var offsetProp=rtl?'right':'left';bullets.css(swiper.isHorizontal()?offsetProp:'top',bulletsOffset+"px");}}
if(params.type==='fraction'){$el.find("."+params.currentClass).text(params.formatFractionCurrent(current+1));$el.find("."+params.totalClass).text(params.formatFractionTotal(total));}
if(params.type==='progressbar'){var progressbarDirection;if(params.progressbarOpposite){progressbarDirection=swiper.isHorizontal()?'vertical':'horizontal';}else{progressbarDirection=swiper.isHorizontal()?'horizontal':'vertical';}
var scale=(current+1)/total;var scaleX=1;var scaleY=1;if(progressbarDirection==='horizontal'){scaleX=scale;}else{scaleY=scale;}
$el.find("."+params.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+scaleX+") scaleY("+scaleY+")").transition(swiper.params.speed);}
if(params.type==='custom'&&params.renderCustom){$el.html(params.renderCustom(swiper,current+1,total));swiper.emit('paginationRender',$el[0]);}else{swiper.emit('paginationUpdate',$el[0]);}
$el[swiper.params.watchOverflow&&swiper.isLocked?'addClass':'removeClass'](params.lockClass);},render:function render(){var swiper=this;var params=swiper.params.pagination;if(!params.el||!swiper.pagination.el||!swiper.pagination.$el||swiper.pagination.$el.length===0)return;var slidesLength=swiper.virtual&&swiper.params.virtual.enabled?swiper.virtual.slides.length:swiper.slides.length;var $el=swiper.pagination.$el;var paginationHTML='';if(params.type==='bullets'){var numberOfBullets=swiper.params.loop?Math.ceil((slidesLength-swiper.loopedSlides*2)/swiper.params.slidesPerGroup):swiper.snapGrid.length;for(var i=0;i<numberOfBullets;i+=1){if(params.renderBullet){paginationHTML+=params.renderBullet.call(swiper,i,params.bulletClass);}else{paginationHTML+="<"+params.bulletElement+" class=\""+params.bulletClass+"\"></"+params.bulletElement+">";}}
$el.html(paginationHTML);swiper.pagination.bullets=$el.find("."+params.bulletClass.replace(/ /g,'.'));}
if(params.type==='fraction'){if(params.renderFraction){paginationHTML=params.renderFraction.call(swiper,params.currentClass,params.totalClass);}else{paginationHTML="<span class=\""+params.currentClass+"\"></span>"+' / '+("<span class=\""+params.totalClass+"\"></span>");}
$el.html(paginationHTML);}
if(params.type==='progressbar'){if(params.renderProgressbar){paginationHTML=params.renderProgressbar.call(swiper,params.progressbarFillClass);}else{paginationHTML="<span class=\""+params.progressbarFillClass+"\"></span>";}
$el.html(paginationHTML);}
if(params.type!=='custom'){swiper.emit('paginationRender',swiper.pagination.$el[0]);}},init:function init(){var swiper=this;var params=swiper.params.pagination;if(!params.el)return;var $el=$(params.el);if($el.length===0)return;if(swiper.params.uniqueNavElements&&typeof params.el==='string'&&$el.length>1){$el=swiper.$el.find(params.el);}
if(params.type==='bullets'&&params.clickable){$el.addClass(params.clickableClass);}
$el.addClass(params.modifierClass+params.type);if(params.type==='bullets'&&params.dynamicBullets){$el.addClass(""+params.modifierClass+params.type+"-dynamic");swiper.pagination.dynamicBulletIndex=0;if(params.dynamicMainBullets<1){params.dynamicMainBullets=1;}}
if(params.type==='progressbar'&&params.progressbarOpposite){$el.addClass(params.progressbarOppositeClass);}
if(params.clickable){$el.on('click',"."+params.bulletClass.replace(/ /g,'.'),function onClick(e){e.preventDefault();var index=$(this).index()*swiper.params.slidesPerGroup;if(swiper.params.loop)index+=swiper.loopedSlides;swiper.slideTo(index);});}
extend$1(swiper.pagination,{$el:$el,el:$el[0]});},destroy:function destroy(){var swiper=this;var params=swiper.params.pagination;if(!params.el||!swiper.pagination.el||!swiper.pagination.$el||swiper.pagination.$el.length===0)return;var $el=swiper.pagination.$el;$el.removeClass(params.hiddenClass);$el.removeClass(params.modifierClass+params.type);if(swiper.pagination.bullets)swiper.pagination.bullets.removeClass(params.bulletActiveClass);if(params.clickable){$el.off('click',"."+params.bulletClass.replace(/ /g,'.'));}}};var Pagination$1={name:'pagination',params:{pagination:{el:null,bulletElement:'span',clickable:false,hideOnClick:false,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:false,type:'bullets',dynamicBullets:false,dynamicMainBullets:1,formatFractionCurrent:function formatFractionCurrent(number){return number;},formatFractionTotal:function formatFractionTotal(number){return number;},bulletClass:'swiper-pagination-bullet',bulletActiveClass:'swiper-pagination-bullet-active',modifierClass:'swiper-pagination-',currentClass:'swiper-pagination-current',totalClass:'swiper-pagination-total',hiddenClass:'swiper-pagination-hidden',progressbarFillClass:'swiper-pagination-progressbar-fill',progressbarOppositeClass:'swiper-pagination-progressbar-opposite',clickableClass:'swiper-pagination-clickable',lockClass:'swiper-pagination-lock'}},create:function create(){var swiper=this;bindModuleMethods(swiper,{pagination:_extends({dynamicBulletIndex:0},Pagination)});},on:{init:function init(swiper){swiper.pagination.init();swiper.pagination.render();swiper.pagination.update();},activeIndexChange:function activeIndexChange(swiper){if(swiper.params.loop){swiper.pagination.update();}else if(typeof swiper.snapIndex==='undefined'){swiper.pagination.update();}},snapIndexChange:function snapIndexChange(swiper){if(!swiper.params.loop){swiper.pagination.update();}},slidesLengthChange:function slidesLengthChange(swiper){if(swiper.params.loop){swiper.pagination.render();swiper.pagination.update();}},snapGridLengthChange:function snapGridLengthChange(swiper){if(!swiper.params.loop){swiper.pagination.render();swiper.pagination.update();}},destroy:function destroy(swiper){swiper.pagination.destroy();},click:function click(swiper,e){if(swiper.params.pagination.el&&swiper.params.pagination.hideOnClick&&swiper.pagination.$el.length>0&&!$(e.target).hasClass(swiper.params.pagination.bulletClass)){var isHidden=swiper.pagination.$el.hasClass(swiper.params.pagination.hiddenClass);if(isHidden===true){swiper.emit('paginationShow');}else{swiper.emit('paginationHide');}
swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);}}}};var Scrollbar={setTranslate:function setTranslate(){var swiper=this;if(!swiper.params.scrollbar.el||!swiper.scrollbar.el)return;var scrollbar=swiper.scrollbar,rtl=swiper.rtlTranslate,progress=swiper.progress;var dragSize=scrollbar.dragSize,trackSize=scrollbar.trackSize,$dragEl=scrollbar.$dragEl,$el=scrollbar.$el;var params=swiper.params.scrollbar;var newSize=dragSize;var newPos=(trackSize-dragSize)*progress;if(rtl){newPos=-newPos;if(newPos>0){newSize=dragSize-newPos;newPos=0;}else if(-newPos+dragSize>trackSize){newSize=trackSize+newPos;}}else if(newPos<0){newSize=dragSize+newPos;newPos=0;}else if(newPos+dragSize>trackSize){newSize=trackSize-newPos;}
if(swiper.isHorizontal()){$dragEl.transform("translate3d("+newPos+"px, 0, 0)");$dragEl[0].style.width=newSize+"px";}else{$dragEl.transform("translate3d(0px, "+newPos+"px, 0)");$dragEl[0].style.height=newSize+"px";}
if(params.hide){clearTimeout(swiper.scrollbar.timeout);$el[0].style.opacity=1;swiper.scrollbar.timeout=setTimeout(function(){$el[0].style.opacity=0;$el.transition(400);},1000);}},setTransition:function setTransition(duration){var swiper=this;if(!swiper.params.scrollbar.el||!swiper.scrollbar.el)return;swiper.scrollbar.$dragEl.transition(duration);},updateSize:function updateSize(){var swiper=this;if(!swiper.params.scrollbar.el||!swiper.scrollbar.el)return;var scrollbar=swiper.scrollbar;var $dragEl=scrollbar.$dragEl,$el=scrollbar.$el;$dragEl[0].style.width='';$dragEl[0].style.height='';var trackSize=swiper.isHorizontal()?$el[0].offsetWidth:$el[0].offsetHeight;var divider=swiper.size/swiper.virtualSize;var moveDivider=divider*(trackSize/swiper.size);var dragSize;if(swiper.params.scrollbar.dragSize==='auto'){dragSize=trackSize*divider;}else{dragSize=parseInt(swiper.params.scrollbar.dragSize,10);}
if(swiper.isHorizontal()){$dragEl[0].style.width=dragSize+"px";}else{$dragEl[0].style.height=dragSize+"px";}
if(divider>=1){$el[0].style.display='none';}else{$el[0].style.display='';}
if(swiper.params.scrollbar.hide){$el[0].style.opacity=0;}
extend$1(scrollbar,{trackSize:trackSize,divider:divider,moveDivider:moveDivider,dragSize:dragSize});scrollbar.$el[swiper.params.watchOverflow&&swiper.isLocked?'addClass':'removeClass'](swiper.params.scrollbar.lockClass);},getPointerPosition:function getPointerPosition(e){var swiper=this;if(swiper.isHorizontal()){return e.type==='touchstart'||e.type==='touchmove'?e.targetTouches[0].clientX:e.clientX;}
return e.type==='touchstart'||e.type==='touchmove'?e.targetTouches[0].clientY:e.clientY;},setDragPosition:function setDragPosition(e){var swiper=this;var scrollbar=swiper.scrollbar,rtl=swiper.rtlTranslate;var $el=scrollbar.$el,dragSize=scrollbar.dragSize,trackSize=scrollbar.trackSize,dragStartPos=scrollbar.dragStartPos;var positionRatio;positionRatio=(scrollbar.getPointerPosition(e)-$el.offset()[swiper.isHorizontal()?'left':'top']-(dragStartPos!==null?dragStartPos:dragSize/2))/(trackSize-dragSize);positionRatio=Math.max(Math.min(positionRatio,1),0);if(rtl){positionRatio=1-positionRatio;}
var position=swiper.minTranslate()+(swiper.maxTranslate()-swiper.minTranslate())*positionRatio;swiper.updateProgress(position);swiper.setTranslate(position);swiper.updateActiveIndex();swiper.updateSlidesClasses();},onDragStart:function onDragStart(e){var swiper=this;var params=swiper.params.scrollbar;var scrollbar=swiper.scrollbar,$wrapperEl=swiper.$wrapperEl;var $el=scrollbar.$el,$dragEl=scrollbar.$dragEl;swiper.scrollbar.isTouched=true;swiper.scrollbar.dragStartPos=e.target===$dragEl[0]||e.target===$dragEl?scrollbar.getPointerPosition(e)-e.target.getBoundingClientRect()[swiper.isHorizontal()?'left':'top']:null;e.preventDefault();e.stopPropagation();$wrapperEl.transition(100);$dragEl.transition(100);scrollbar.setDragPosition(e);clearTimeout(swiper.scrollbar.dragTimeout);$el.transition(0);if(params.hide){$el.css('opacity',1);}
if(swiper.params.cssMode){swiper.$wrapperEl.css('scroll-snap-type','none');}
swiper.emit('scrollbarDragStart',e);},onDragMove:function onDragMove(e){var swiper=this;var scrollbar=swiper.scrollbar,$wrapperEl=swiper.$wrapperEl;var $el=scrollbar.$el,$dragEl=scrollbar.$dragEl;if(!swiper.scrollbar.isTouched)return;if(e.preventDefault)e.preventDefault();else e.returnValue=false;scrollbar.setDragPosition(e);$wrapperEl.transition(0);$el.transition(0);$dragEl.transition(0);swiper.emit('scrollbarDragMove',e);},onDragEnd:function onDragEnd(e){var swiper=this;var params=swiper.params.scrollbar;var scrollbar=swiper.scrollbar,$wrapperEl=swiper.$wrapperEl;var $el=scrollbar.$el;if(!swiper.scrollbar.isTouched)return;swiper.scrollbar.isTouched=false;if(swiper.params.cssMode){swiper.$wrapperEl.css('scroll-snap-type','');$wrapperEl.transition('');}
if(params.hide){clearTimeout(swiper.scrollbar.dragTimeout);swiper.scrollbar.dragTimeout=nextTick(function(){$el.css('opacity',0);$el.transition(400);},1000);}
swiper.emit('scrollbarDragEnd',e);if(params.snapOnRelease){swiper.slideToClosest();}},enableDraggable:function enableDraggable(){var swiper=this;if(!swiper.params.scrollbar.el)return;var document=getDocument();var scrollbar=swiper.scrollbar,touchEventsTouch=swiper.touchEventsTouch,touchEventsDesktop=swiper.touchEventsDesktop,params=swiper.params,support=swiper.support;var $el=scrollbar.$el;var target=$el[0];var activeListener=support.passiveListener&&params.passiveListeners?{passive:false,capture:false}:false;var passiveListener=support.passiveListener&&params.passiveListeners?{passive:true,capture:false}:false;if(!support.touch){target.addEventListener(touchEventsDesktop.start,swiper.scrollbar.onDragStart,activeListener);document.addEventListener(touchEventsDesktop.move,swiper.scrollbar.onDragMove,activeListener);document.addEventListener(touchEventsDesktop.end,swiper.scrollbar.onDragEnd,passiveListener);}else{target.addEventListener(touchEventsTouch.start,swiper.scrollbar.onDragStart,activeListener);target.addEventListener(touchEventsTouch.move,swiper.scrollbar.onDragMove,activeListener);target.addEventListener(touchEventsTouch.end,swiper.scrollbar.onDragEnd,passiveListener);}},disableDraggable:function disableDraggable(){var swiper=this;if(!swiper.params.scrollbar.el)return;var document=getDocument();var scrollbar=swiper.scrollbar,touchEventsTouch=swiper.touchEventsTouch,touchEventsDesktop=swiper.touchEventsDesktop,params=swiper.params,support=swiper.support;var $el=scrollbar.$el;var target=$el[0];var activeListener=support.passiveListener&&params.passiveListeners?{passive:false,capture:false}:false;var passiveListener=support.passiveListener&&params.passiveListeners?{passive:true,capture:false}:false;if(!support.touch){target.removeEventListener(touchEventsDesktop.start,swiper.scrollbar.onDragStart,activeListener);document.removeEventListener(touchEventsDesktop.move,swiper.scrollbar.onDragMove,activeListener);document.removeEventListener(touchEventsDesktop.end,swiper.scrollbar.onDragEnd,passiveListener);}else{target.removeEventListener(touchEventsTouch.start,swiper.scrollbar.onDragStart,activeListener);target.removeEventListener(touchEventsTouch.move,swiper.scrollbar.onDragMove,activeListener);target.removeEventListener(touchEventsTouch.end,swiper.scrollbar.onDragEnd,passiveListener);}},init:function init(){var swiper=this;if(!swiper.params.scrollbar.el)return;var scrollbar=swiper.scrollbar,$swiperEl=swiper.$el;var params=swiper.params.scrollbar;var $el=$(params.el);if(swiper.params.uniqueNavElements&&typeof params.el==='string'&&$el.length>1&&$swiperEl.find(params.el).length===1){$el=$swiperEl.find(params.el);}
var $dragEl=$el.find("."+swiper.params.scrollbar.dragClass);if($dragEl.length===0){$dragEl=$("<div class=\""+swiper.params.scrollbar.dragClass+"\"></div>");$el.append($dragEl);}
extend$1(scrollbar,{$el:$el,el:$el[0],$dragEl:$dragEl,dragEl:$dragEl[0]});if(params.draggable){scrollbar.enableDraggable();}},destroy:function destroy(){var swiper=this;swiper.scrollbar.disableDraggable();}};var Scrollbar$1={name:'scrollbar',params:{scrollbar:{el:null,dragSize:'auto',hide:false,draggable:false,snapOnRelease:true,lockClass:'swiper-scrollbar-lock',dragClass:'swiper-scrollbar-drag'}},create:function create(){var swiper=this;bindModuleMethods(swiper,{scrollbar:_extends({isTouched:false,timeout:null,dragTimeout:null},Scrollbar)});},on:{init:function init(swiper){swiper.scrollbar.init();swiper.scrollbar.updateSize();swiper.scrollbar.setTranslate();},update:function update(swiper){swiper.scrollbar.updateSize();},resize:function resize(swiper){swiper.scrollbar.updateSize();},observerUpdate:function observerUpdate(swiper){swiper.scrollbar.updateSize();},setTranslate:function setTranslate(swiper){swiper.scrollbar.setTranslate();},setTransition:function setTransition(swiper,duration){swiper.scrollbar.setTransition(duration);},destroy:function destroy(swiper){swiper.scrollbar.destroy();}}};var Parallax={setTransform:function setTransform(el,progress){var swiper=this;var rtl=swiper.rtl;var $el=$(el);var rtlFactor=rtl?-1:1;var p=$el.attr('data-swiper-parallax')||'0';var x=$el.attr('data-swiper-parallax-x');var y=$el.attr('data-swiper-parallax-y');var scale=$el.attr('data-swiper-parallax-scale');var opacity=$el.attr('data-swiper-parallax-opacity');if(x||y){x=x||'0';y=y||'0';}else if(swiper.isHorizontal()){x=p;y='0';}else{y=p;x='0';}
if(x.indexOf('%')>=0){x=parseInt(x,10)*progress*rtlFactor+"%";}else{x=x*progress*rtlFactor+"px";}
if(y.indexOf('%')>=0){y=parseInt(y,10)*progress+"%";}else{y=y*progress+"px";}
if(typeof opacity!=='undefined'&&opacity!==null){var currentOpacity=opacity-(opacity-1)*(1-Math.abs(progress));$el[0].style.opacity=currentOpacity;}
if(typeof scale==='undefined'||scale===null){$el.transform("translate3d("+x+", "+y+", 0px)");}else{var currentScale=scale-(scale-1)*(1-Math.abs(progress));$el.transform("translate3d("+x+", "+y+", 0px) scale("+currentScale+")");}},setTranslate:function setTranslate(){var swiper=this;var $el=swiper.$el,slides=swiper.slides,progress=swiper.progress,snapGrid=swiper.snapGrid;$el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(function(el){swiper.parallax.setTransform(el,progress);});slides.each(function(slideEl,slideIndex){var slideProgress=slideEl.progress;if(swiper.params.slidesPerGroup>1&&swiper.params.slidesPerView!=='auto'){slideProgress+=Math.ceil(slideIndex/2)-progress*(snapGrid.length-1);}
slideProgress=Math.min(Math.max(slideProgress,-1),1);$(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(function(el){swiper.parallax.setTransform(el,slideProgress);});});},setTransition:function setTransition(duration){if(duration===void 0){duration=this.params.speed;}
var swiper=this;var $el=swiper.$el;$el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(function(parallaxEl){var $parallaxEl=$(parallaxEl);var parallaxDuration=parseInt($parallaxEl.attr('data-swiper-parallax-duration'),10)||duration;if(duration===0)parallaxDuration=0;$parallaxEl.transition(parallaxDuration);});}};var Parallax$1={name:'parallax',params:{parallax:{enabled:false}},create:function create(){var swiper=this;bindModuleMethods(swiper,{parallax:_extends({},Parallax)});},on:{beforeInit:function beforeInit(swiper){if(!swiper.params.parallax.enabled)return;swiper.params.watchSlidesProgress=true;swiper.originalParams.watchSlidesProgress=true;},init:function init(swiper){if(!swiper.params.parallax.enabled)return;swiper.parallax.setTranslate();},setTranslate:function setTranslate(swiper){if(!swiper.params.parallax.enabled)return;swiper.parallax.setTranslate();},setTransition:function setTransition(swiper,duration){if(!swiper.params.parallax.enabled)return;swiper.parallax.setTransition(duration);}}};var Zoom={getDistanceBetweenTouches:function getDistanceBetweenTouches(e){if(e.targetTouches.length<2)return 1;var x1=e.targetTouches[0].pageX;var y1=e.targetTouches[0].pageY;var x2=e.targetTouches[1].pageX;var y2=e.targetTouches[1].pageY;var distance=Math.sqrt(Math.pow(x2-x1,2)+Math.pow(y2-y1,2));return distance;},onGestureStart:function onGestureStart(e){var swiper=this;var support=swiper.support;var params=swiper.params.zoom;var zoom=swiper.zoom;var gesture=zoom.gesture;zoom.fakeGestureTouched=false;zoom.fakeGestureMoved=false;if(!support.gestures){if(e.type!=='touchstart'||e.type==='touchstart'&&e.targetTouches.length<2){return;}
zoom.fakeGestureTouched=true;gesture.scaleStart=Zoom.getDistanceBetweenTouches(e);}
if(!gesture.$slideEl||!gesture.$slideEl.length){gesture.$slideEl=$(e.target).closest("."+swiper.params.slideClass);if(gesture.$slideEl.length===0)gesture.$slideEl=swiper.slides.eq(swiper.activeIndex);gesture.$imageEl=gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');gesture.$imageWrapEl=gesture.$imageEl.parent("."+params.containerClass);gesture.maxRatio=gesture.$imageWrapEl.attr('data-swiper-zoom')||params.maxRatio;if(gesture.$imageWrapEl.length===0){gesture.$imageEl=undefined;return;}}
if(gesture.$imageEl){gesture.$imageEl.transition(0);}
swiper.zoom.isScaling=true;},onGestureChange:function onGestureChange(e){var swiper=this;var support=swiper.support;var params=swiper.params.zoom;var zoom=swiper.zoom;var gesture=zoom.gesture;if(!support.gestures){if(e.type!=='touchmove'||e.type==='touchmove'&&e.targetTouches.length<2){return;}
zoom.fakeGestureMoved=true;gesture.scaleMove=Zoom.getDistanceBetweenTouches(e);}
if(!gesture.$imageEl||gesture.$imageEl.length===0){if(e.type==='gesturechange')zoom.onGestureStart(e);return;}
if(support.gestures){zoom.scale=e.scale*zoom.currentScale;}else{zoom.scale=gesture.scaleMove/gesture.scaleStart*zoom.currentScale;}
if(zoom.scale>gesture.maxRatio){zoom.scale=gesture.maxRatio-1+Math.pow(zoom.scale-gesture.maxRatio+1,0.5);}
if(zoom.scale<params.minRatio){zoom.scale=params.minRatio+1-Math.pow(params.minRatio-zoom.scale+1,0.5);}
gesture.$imageEl.transform("translate3d(0,0,0) scale("+zoom.scale+")");},onGestureEnd:function onGestureEnd(e){var swiper=this;var device=swiper.device;var support=swiper.support;var params=swiper.params.zoom;var zoom=swiper.zoom;var gesture=zoom.gesture;if(!support.gestures){if(!zoom.fakeGestureTouched||!zoom.fakeGestureMoved){return;}
if(e.type!=='touchend'||e.type==='touchend'&&e.changedTouches.length<2&&!device.android){return;}
zoom.fakeGestureTouched=false;zoom.fakeGestureMoved=false;}
if(!gesture.$imageEl||gesture.$imageEl.length===0)return;zoom.scale=Math.max(Math.min(zoom.scale,gesture.maxRatio),params.minRatio);gesture.$imageEl.transition(swiper.params.speed).transform("translate3d(0,0,0) scale("+zoom.scale+")");zoom.currentScale=zoom.scale;zoom.isScaling=false;if(zoom.scale===1)gesture.$slideEl=undefined;},onTouchStart:function onTouchStart(e){var swiper=this;var device=swiper.device;var zoom=swiper.zoom;var gesture=zoom.gesture,image=zoom.image;if(!gesture.$imageEl||gesture.$imageEl.length===0)return;if(image.isTouched)return;if(device.android&&e.cancelable)e.preventDefault();image.isTouched=true;image.touchesStart.x=e.type==='touchstart'?e.targetTouches[0].pageX:e.pageX;image.touchesStart.y=e.type==='touchstart'?e.targetTouches[0].pageY:e.pageY;},onTouchMove:function onTouchMove(e){var swiper=this;var zoom=swiper.zoom;var gesture=zoom.gesture,image=zoom.image,velocity=zoom.velocity;if(!gesture.$imageEl||gesture.$imageEl.length===0)return;swiper.allowClick=false;if(!image.isTouched||!gesture.$slideEl)return;if(!image.isMoved){image.width=gesture.$imageEl[0].offsetWidth;image.height=gesture.$imageEl[0].offsetHeight;image.startX=getTranslate(gesture.$imageWrapEl[0],'x')||0;image.startY=getTranslate(gesture.$imageWrapEl[0],'y')||0;gesture.slideWidth=gesture.$slideEl[0].offsetWidth;gesture.slideHeight=gesture.$slideEl[0].offsetHeight;gesture.$imageWrapEl.transition(0);if(swiper.rtl){image.startX=-image.startX;image.startY=-image.startY;}}
var scaledWidth=image.width*zoom.scale;var scaledHeight=image.height*zoom.scale;if(scaledWidth<gesture.slideWidth&&scaledHeight<gesture.slideHeight)return;image.minX=Math.min(gesture.slideWidth/2-scaledWidth/2,0);image.maxX=-image.minX;image.minY=Math.min(gesture.slideHeight/2-scaledHeight/2,0);image.maxY=-image.minY;image.touchesCurrent.x=e.type==='touchmove'?e.targetTouches[0].pageX:e.pageX;image.touchesCurrent.y=e.type==='touchmove'?e.targetTouches[0].pageY:e.pageY;if(!image.isMoved&&!zoom.isScaling){if(swiper.isHorizontal()&&(Math.floor(image.minX)===Math.floor(image.startX)&&image.touchesCurrent.x<image.touchesStart.x||Math.floor(image.maxX)===Math.floor(image.startX)&&image.touchesCurrent.x>image.touchesStart.x)){image.isTouched=false;return;}
if(!swiper.isHorizontal()&&(Math.floor(image.minY)===Math.floor(image.startY)&&image.touchesCurrent.y<image.touchesStart.y||Math.floor(image.maxY)===Math.floor(image.startY)&&image.touchesCurrent.y>image.touchesStart.y)){image.isTouched=false;return;}}
if(e.cancelable){e.preventDefault();}
e.stopPropagation();image.isMoved=true;image.currentX=image.touchesCurrent.x-image.touchesStart.x+image.startX;image.currentY=image.touchesCurrent.y-image.touchesStart.y+image.startY;if(image.currentX<image.minX){image.currentX=image.minX+1-Math.pow(image.minX-image.currentX+1,0.8);}
if(image.currentX>image.maxX){image.currentX=image.maxX-1+Math.pow(image.currentX-image.maxX+1,0.8);}
if(image.currentY<image.minY){image.currentY=image.minY+1-Math.pow(image.minY-image.currentY+1,0.8);}
if(image.currentY>image.maxY){image.currentY=image.maxY-1+Math.pow(image.currentY-image.maxY+1,0.8);}
if(!velocity.prevPositionX)velocity.prevPositionX=image.touchesCurrent.x;if(!velocity.prevPositionY)velocity.prevPositionY=image.touchesCurrent.y;if(!velocity.prevTime)velocity.prevTime=Date.now();velocity.x=(image.touchesCurrent.x-velocity.prevPositionX)/(Date.now()-velocity.prevTime)/2;velocity.y=(image.touchesCurrent.y-velocity.prevPositionY)/(Date.now()-velocity.prevTime)/2;if(Math.abs(image.touchesCurrent.x-velocity.prevPositionX)<2)velocity.x=0;if(Math.abs(image.touchesCurrent.y-velocity.prevPositionY)<2)velocity.y=0;velocity.prevPositionX=image.touchesCurrent.x;velocity.prevPositionY=image.touchesCurrent.y;velocity.prevTime=Date.now();gesture.$imageWrapEl.transform("translate3d("+image.currentX+"px, "+image.currentY+"px,0)");},onTouchEnd:function onTouchEnd(){var swiper=this;var zoom=swiper.zoom;var gesture=zoom.gesture,image=zoom.image,velocity=zoom.velocity;if(!gesture.$imageEl||gesture.$imageEl.length===0)return;if(!image.isTouched||!image.isMoved){image.isTouched=false;image.isMoved=false;return;}
image.isTouched=false;image.isMoved=false;var momentumDurationX=300;var momentumDurationY=300;var momentumDistanceX=velocity.x*momentumDurationX;var newPositionX=image.currentX+momentumDistanceX;var momentumDistanceY=velocity.y*momentumDurationY;var newPositionY=image.currentY+momentumDistanceY;if(velocity.x!==0)momentumDurationX=Math.abs((newPositionX-image.currentX)/velocity.x);if(velocity.y!==0)momentumDurationY=Math.abs((newPositionY-image.currentY)/velocity.y);var momentumDuration=Math.max(momentumDurationX,momentumDurationY);image.currentX=newPositionX;image.currentY=newPositionY;var scaledWidth=image.width*zoom.scale;var scaledHeight=image.height*zoom.scale;image.minX=Math.min(gesture.slideWidth/2-scaledWidth/2,0);image.maxX=-image.minX;image.minY=Math.min(gesture.slideHeight/2-scaledHeight/2,0);image.maxY=-image.minY;image.currentX=Math.max(Math.min(image.currentX,image.maxX),image.minX);image.currentY=Math.max(Math.min(image.currentY,image.maxY),image.minY);gesture.$imageWrapEl.transition(momentumDuration).transform("translate3d("+image.currentX+"px, "+image.currentY+"px,0)");},onTransitionEnd:function onTransitionEnd(){var swiper=this;var zoom=swiper.zoom;var gesture=zoom.gesture;if(gesture.$slideEl&&swiper.previousIndex!==swiper.activeIndex){if(gesture.$imageEl){gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');}
if(gesture.$imageWrapEl){gesture.$imageWrapEl.transform('translate3d(0,0,0)');}
zoom.scale=1;zoom.currentScale=1;gesture.$slideEl=undefined;gesture.$imageEl=undefined;gesture.$imageWrapEl=undefined;}},toggle:function toggle(e){var swiper=this;var zoom=swiper.zoom;if(zoom.scale&&zoom.scale!==1){zoom.out();}else{zoom.in(e);}},in:function _in(e){var swiper=this;var zoom=swiper.zoom;var params=swiper.params.zoom;var gesture=zoom.gesture,image=zoom.image;if(!gesture.$slideEl){if(swiper.params.virtual&&swiper.params.virtual.enabled&&swiper.virtual){gesture.$slideEl=swiper.$wrapperEl.children("."+swiper.params.slideActiveClass);}else{gesture.$slideEl=swiper.slides.eq(swiper.activeIndex);}
gesture.$imageEl=gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');gesture.$imageWrapEl=gesture.$imageEl.parent("."+params.containerClass);}
if(!gesture.$imageEl||gesture.$imageEl.length===0)return;gesture.$slideEl.addClass(""+params.zoomedSlideClass);var touchX;var touchY;var offsetX;var offsetY;var diffX;var diffY;var translateX;var translateY;var imageWidth;var imageHeight;var scaledWidth;var scaledHeight;var translateMinX;var translateMinY;var translateMaxX;var translateMaxY;var slideWidth;var slideHeight;if(typeof image.touchesStart.x==='undefined'&&e){touchX=e.type==='touchend'?e.changedTouches[0].pageX:e.pageX;touchY=e.type==='touchend'?e.changedTouches[0].pageY:e.pageY;}else{touchX=image.touchesStart.x;touchY=image.touchesStart.y;}
zoom.scale=gesture.$imageWrapEl.attr('data-swiper-zoom')||params.maxRatio;zoom.currentScale=gesture.$imageWrapEl.attr('data-swiper-zoom')||params.maxRatio;if(e){slideWidth=gesture.$slideEl[0].offsetWidth;slideHeight=gesture.$slideEl[0].offsetHeight;offsetX=gesture.$slideEl.offset().left;offsetY=gesture.$slideEl.offset().top;diffX=offsetX+slideWidth/2-touchX;diffY=offsetY+slideHeight/2-touchY;imageWidth=gesture.$imageEl[0].offsetWidth;imageHeight=gesture.$imageEl[0].offsetHeight;scaledWidth=imageWidth*zoom.scale;scaledHeight=imageHeight*zoom.scale;translateMinX=Math.min(slideWidth/2-scaledWidth/2,0);translateMinY=Math.min(slideHeight/2-scaledHeight/2,0);translateMaxX=-translateMinX;translateMaxY=-translateMinY;translateX=diffX*zoom.scale;translateY=diffY*zoom.scale;if(translateX<translateMinX){translateX=translateMinX;}
if(translateX>translateMaxX){translateX=translateMaxX;}
if(translateY<translateMinY){translateY=translateMinY;}
if(translateY>translateMaxY){translateY=translateMaxY;}}else{translateX=0;translateY=0;}
gesture.$imageWrapEl.transition(300).transform("translate3d("+translateX+"px, "+translateY+"px,0)");gesture.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+zoom.scale+")");},out:function out(){var swiper=this;var zoom=swiper.zoom;var params=swiper.params.zoom;var gesture=zoom.gesture;if(!gesture.$slideEl){if(swiper.params.virtual&&swiper.params.virtual.enabled&&swiper.virtual){gesture.$slideEl=swiper.$wrapperEl.children("."+swiper.params.slideActiveClass);}else{gesture.$slideEl=swiper.slides.eq(swiper.activeIndex);}
gesture.$imageEl=gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');gesture.$imageWrapEl=gesture.$imageEl.parent("."+params.containerClass);}
if(!gesture.$imageEl||gesture.$imageEl.length===0)return;zoom.scale=1;zoom.currentScale=1;gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');gesture.$slideEl.removeClass(""+params.zoomedSlideClass);gesture.$slideEl=undefined;},toggleGestures:function toggleGestures(method){var swiper=this;var zoom=swiper.zoom;var selector=zoom.slideSelector,passive=zoom.passiveListener;swiper.$wrapperEl[method]('gesturestart',selector,zoom.onGestureStart,passive);swiper.$wrapperEl[method]('gesturechange',selector,zoom.onGestureChange,passive);swiper.$wrapperEl[method]('gestureend',selector,zoom.onGestureEnd,passive);},enableGestures:function enableGestures(){if(this.zoom.gesturesEnabled)return;this.zoom.gesturesEnabled=true;this.zoom.toggleGestures('on');},disableGestures:function disableGestures(){if(!this.zoom.gesturesEnabled)return;this.zoom.gesturesEnabled=false;this.zoom.toggleGestures('off');},enable:function enable(){var swiper=this;var support=swiper.support;var zoom=swiper.zoom;if(zoom.enabled)return;zoom.enabled=true;var passiveListener=swiper.touchEvents.start==='touchstart'&&support.passiveListener&&swiper.params.passiveListeners?{passive:true,capture:false}:false;var activeListenerWithCapture=support.passiveListener?{passive:false,capture:true}:true;var slideSelector="."+swiper.params.slideClass;swiper.zoom.passiveListener=passiveListener;swiper.zoom.slideSelector=slideSelector;if(support.gestures){swiper.$wrapperEl.on(swiper.touchEvents.start,swiper.zoom.enableGestures,passiveListener);swiper.$wrapperEl.on(swiper.touchEvents.end,swiper.zoom.disableGestures,passiveListener);}else if(swiper.touchEvents.start==='touchstart'){swiper.$wrapperEl.on(swiper.touchEvents.start,slideSelector,zoom.onGestureStart,passiveListener);swiper.$wrapperEl.on(swiper.touchEvents.move,slideSelector,zoom.onGestureChange,activeListenerWithCapture);swiper.$wrapperEl.on(swiper.touchEvents.end,slideSelector,zoom.onGestureEnd,passiveListener);if(swiper.touchEvents.cancel){swiper.$wrapperEl.on(swiper.touchEvents.cancel,slideSelector,zoom.onGestureEnd,passiveListener);}}
swiper.$wrapperEl.on(swiper.touchEvents.move,"."+swiper.params.zoom.containerClass,zoom.onTouchMove,activeListenerWithCapture);},disable:function disable(){var swiper=this;var zoom=swiper.zoom;if(!zoom.enabled)return;var support=swiper.support;swiper.zoom.enabled=false;var passiveListener=swiper.touchEvents.start==='touchstart'&&support.passiveListener&&swiper.params.passiveListeners?{passive:true,capture:false}:false;var activeListenerWithCapture=support.passiveListener?{passive:false,capture:true}:true;var slideSelector="."+swiper.params.slideClass;if(support.gestures){swiper.$wrapperEl.off(swiper.touchEvents.start,swiper.zoom.enableGestures,passiveListener);swiper.$wrapperEl.off(swiper.touchEvents.end,swiper.zoom.disableGestures,passiveListener);}else if(swiper.touchEvents.start==='touchstart'){swiper.$wrapperEl.off(swiper.touchEvents.start,slideSelector,zoom.onGestureStart,passiveListener);swiper.$wrapperEl.off(swiper.touchEvents.move,slideSelector,zoom.onGestureChange,activeListenerWithCapture);swiper.$wrapperEl.off(swiper.touchEvents.end,slideSelector,zoom.onGestureEnd,passiveListener);if(swiper.touchEvents.cancel){swiper.$wrapperEl.off(swiper.touchEvents.cancel,slideSelector,zoom.onGestureEnd,passiveListener);}}
swiper.$wrapperEl.off(swiper.touchEvents.move,"."+swiper.params.zoom.containerClass,zoom.onTouchMove,activeListenerWithCapture);}};var Zoom$1={name:'zoom',params:{zoom:{enabled:false,maxRatio:3,minRatio:1,toggle:true,containerClass:'swiper-zoom-container',zoomedSlideClass:'swiper-slide-zoomed'}},create:function create(){var swiper=this;bindModuleMethods(swiper,{zoom:_extends({enabled:false,scale:1,currentScale:1,isScaling:false,gesture:{$slideEl:undefined,slideWidth:undefined,slideHeight:undefined,$imageEl:undefined,$imageWrapEl:undefined,maxRatio:3},image:{isTouched:undefined,isMoved:undefined,currentX:undefined,currentY:undefined,minX:undefined,minY:undefined,maxX:undefined,maxY:undefined,width:undefined,height:undefined,startX:undefined,startY:undefined,touchesStart:{},touchesCurrent:{}},velocity:{x:undefined,y:undefined,prevPositionX:undefined,prevPositionY:undefined,prevTime:undefined}},Zoom)});var scale=1;Object.defineProperty(swiper.zoom,'scale',{get:function get(){return scale;},set:function set(value){if(scale!==value){var imageEl=swiper.zoom.gesture.$imageEl?swiper.zoom.gesture.$imageEl[0]:undefined;var slideEl=swiper.zoom.gesture.$slideEl?swiper.zoom.gesture.$slideEl[0]:undefined;swiper.emit('zoomChange',value,imageEl,slideEl);}
scale=value;}});},on:{init:function init(swiper){if(swiper.params.zoom.enabled){swiper.zoom.enable();}},destroy:function destroy(swiper){swiper.zoom.disable();},touchStart:function touchStart(swiper,e){if(!swiper.zoom.enabled)return;swiper.zoom.onTouchStart(e);},touchEnd:function touchEnd(swiper,e){if(!swiper.zoom.enabled)return;swiper.zoom.onTouchEnd(e);},doubleTap:function doubleTap(swiper,e){if(swiper.params.zoom.enabled&&swiper.zoom.enabled&&swiper.params.zoom.toggle){swiper.zoom.toggle(e);}},transitionEnd:function transitionEnd(swiper){if(swiper.zoom.enabled&&swiper.params.zoom.enabled){swiper.zoom.onTransitionEnd();}},slideChange:function slideChange(swiper){if(swiper.zoom.enabled&&swiper.params.zoom.enabled&&swiper.params.cssMode){swiper.zoom.onTransitionEnd();}}}};var Lazy={loadInSlide:function loadInSlide(index,loadInDuplicate){if(loadInDuplicate===void 0){loadInDuplicate=true;}
var swiper=this;var params=swiper.params.lazy;if(typeof index==='undefined')return;if(swiper.slides.length===0)return;var isVirtual=swiper.virtual&&swiper.params.virtual.enabled;var $slideEl=isVirtual?swiper.$wrapperEl.children("."+swiper.params.slideClass+"[data-swiper-slide-index=\""+index+"\"]"):swiper.slides.eq(index);var $images=$slideEl.find("."+params.elementClass+":not(."+params.loadedClass+"):not(."+params.loadingClass+")");if($slideEl.hasClass(params.elementClass)&&!$slideEl.hasClass(params.loadedClass)&&!$slideEl.hasClass(params.loadingClass)){$images.push($slideEl[0]);}
if($images.length===0)return;$images.each(function(imageEl){var $imageEl=$(imageEl);$imageEl.addClass(params.loadingClass);var background=$imageEl.attr('data-background');var src=$imageEl.attr('data-src');var srcset=$imageEl.attr('data-srcset');var sizes=$imageEl.attr('data-sizes');var $pictureEl=$imageEl.parent('picture');swiper.loadImage($imageEl[0],src||background,srcset,sizes,false,function(){if(typeof swiper==='undefined'||swiper===null||!swiper||swiper&&!swiper.params||swiper.destroyed)return;if(background){$imageEl.css('background-image',"url(\""+background+"\")");$imageEl.removeAttr('data-background');}else{if(srcset){$imageEl.attr('srcset',srcset);$imageEl.removeAttr('data-srcset');}
if(sizes){$imageEl.attr('sizes',sizes);$imageEl.removeAttr('data-sizes');}
if($pictureEl.length){$pictureEl.children('source').each(function(sourceEl){var $source=$(sourceEl);if($source.attr('data-srcset')){$source.attr('srcset',$source.attr('data-srcset'));$source.removeAttr('data-srcset');}});}
if(src){$imageEl.attr('src',src);$imageEl.removeAttr('data-src');}}
$imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);$slideEl.find("."+params.preloaderClass).remove();if(swiper.params.loop&&loadInDuplicate){var slideOriginalIndex=$slideEl.attr('data-swiper-slide-index');if($slideEl.hasClass(swiper.params.slideDuplicateClass)){var originalSlide=swiper.$wrapperEl.children("[data-swiper-slide-index=\""+slideOriginalIndex+"\"]:not(."+swiper.params.slideDuplicateClass+")");swiper.lazy.loadInSlide(originalSlide.index(),false);}else{var duplicatedSlide=swiper.$wrapperEl.children("."+swiper.params.slideDuplicateClass+"[data-swiper-slide-index=\""+slideOriginalIndex+"\"]");swiper.lazy.loadInSlide(duplicatedSlide.index(),false);}}
swiper.emit('lazyImageReady',$slideEl[0],$imageEl[0]);if(swiper.params.autoHeight){swiper.updateAutoHeight();}});swiper.emit('lazyImageLoad',$slideEl[0],$imageEl[0]);});},load:function load(){var swiper=this;var $wrapperEl=swiper.$wrapperEl,swiperParams=swiper.params,slides=swiper.slides,activeIndex=swiper.activeIndex;var isVirtual=swiper.virtual&&swiperParams.virtual.enabled;var params=swiperParams.lazy;var slidesPerView=swiperParams.slidesPerView;if(slidesPerView==='auto'){slidesPerView=0;}
function slideExist(index){if(isVirtual){if($wrapperEl.children("."+swiperParams.slideClass+"[data-swiper-slide-index=\""+index+"\"]").length){return true;}}else if(slides[index])return true;return false;}
function slideIndex(slideEl){if(isVirtual){return $(slideEl).attr('data-swiper-slide-index');}
return $(slideEl).index();}
if(!swiper.lazy.initialImageLoaded)swiper.lazy.initialImageLoaded=true;if(swiper.params.watchSlidesVisibility){$wrapperEl.children("."+swiperParams.slideVisibleClass).each(function(slideEl){var index=isVirtual?$(slideEl).attr('data-swiper-slide-index'):$(slideEl).index();swiper.lazy.loadInSlide(index);});}else if(slidesPerView>1){for(var i=activeIndex;i<activeIndex+slidesPerView;i+=1){if(slideExist(i))swiper.lazy.loadInSlide(i);}}else{swiper.lazy.loadInSlide(activeIndex);}
if(params.loadPrevNext){if(slidesPerView>1||params.loadPrevNextAmount&&params.loadPrevNextAmount>1){var amount=params.loadPrevNextAmount;var spv=slidesPerView;var maxIndex=Math.min(activeIndex+spv+Math.max(amount,spv),slides.length);var minIndex=Math.max(activeIndex-Math.max(spv,amount),0);for(var _i=activeIndex+slidesPerView;_i<maxIndex;_i+=1){if(slideExist(_i))swiper.lazy.loadInSlide(_i);}
for(var _i2=minIndex;_i2<activeIndex;_i2+=1){if(slideExist(_i2))swiper.lazy.loadInSlide(_i2);}}else{var nextSlide=$wrapperEl.children("."+swiperParams.slideNextClass);if(nextSlide.length>0)swiper.lazy.loadInSlide(slideIndex(nextSlide));var prevSlide=$wrapperEl.children("."+swiperParams.slidePrevClass);if(prevSlide.length>0)swiper.lazy.loadInSlide(slideIndex(prevSlide));}}},checkInViewOnLoad:function checkInViewOnLoad(){var window=getWindow();var swiper=this;if(!swiper||swiper.destroyed)return;var $scrollElement=swiper.params.lazy.scrollingElement?$(swiper.params.lazy.scrollingElement):$(window);var isWindow=$scrollElement[0]===window;var scrollElementWidth=isWindow?window.innerWidth:$scrollElement[0].offsetWidth;var scrollElementHeight=isWindow?window.innerHeight:$scrollElement[0].offsetHeight;var swiperOffset=swiper.$el.offset();var rtl=swiper.rtlTranslate;var inView=false;if(rtl)swiperOffset.left-=swiper.$el[0].scrollLeft;var swiperCoord=[[swiperOffset.left,swiperOffset.top],[swiperOffset.left+swiper.width,swiperOffset.top],[swiperOffset.left,swiperOffset.top+swiper.height],[swiperOffset.left+swiper.width,swiperOffset.top+swiper.height]];for(var i=0;i<swiperCoord.length;i+=1){var point=swiperCoord[i];if(point[0]>=0&&point[0]<=scrollElementWidth&&point[1]>=0&&point[1]<=scrollElementHeight){if(point[0]===0&&point[1]===0)continue;inView=true;}}
if(inView){swiper.lazy.load();$scrollElement.off('scroll',swiper.lazy.checkInViewOnLoad);}else if(!swiper.lazy.scrollHandlerAttached){swiper.lazy.scrollHandlerAttached=true;$scrollElement.on('scroll',swiper.lazy.checkInViewOnLoad);}}};var Lazy$1={name:'lazy',params:{lazy:{checkInView:false,enabled:false,loadPrevNext:false,loadPrevNextAmount:1,loadOnTransitionStart:false,scrollingElement:'',elementClass:'swiper-lazy',loadingClass:'swiper-lazy-loading',loadedClass:'swiper-lazy-loaded',preloaderClass:'swiper-lazy-preloader'}},create:function create(){var swiper=this;bindModuleMethods(swiper,{lazy:_extends({initialImageLoaded:false},Lazy)});},on:{beforeInit:function beforeInit(swiper){if(swiper.params.lazy.enabled&&swiper.params.preloadImages){swiper.params.preloadImages=false;}},init:function init(swiper){if(swiper.params.lazy.enabled&&!swiper.params.loop&&swiper.params.initialSlide===0){if(swiper.params.lazy.checkInView){swiper.lazy.checkInViewOnLoad();}else{swiper.lazy.load();}}},scroll:function scroll(swiper){if(swiper.params.freeMode&&!swiper.params.freeModeSticky){swiper.lazy.load();}},resize:function resize(swiper){if(swiper.params.lazy.enabled){swiper.lazy.load();}},scrollbarDragMove:function scrollbarDragMove(swiper){if(swiper.params.lazy.enabled){swiper.lazy.load();}},transitionStart:function transitionStart(swiper){if(swiper.params.lazy.enabled){if(swiper.params.lazy.loadOnTransitionStart||!swiper.params.lazy.loadOnTransitionStart&&!swiper.lazy.initialImageLoaded){swiper.lazy.load();}}},transitionEnd:function transitionEnd(swiper){if(swiper.params.lazy.enabled&&!swiper.params.lazy.loadOnTransitionStart){swiper.lazy.load();}},slideChange:function slideChange(swiper){if(swiper.params.lazy.enabled&&swiper.params.cssMode){swiper.lazy.load();}}}};var Controller={LinearSpline:function LinearSpline(x,y){var binarySearch=function search(){var maxIndex;var minIndex;var guess;return function(array,val){minIndex=-1;maxIndex=array.length;while(maxIndex-minIndex>1){guess=maxIndex+minIndex>>1;if(array[guess]<=val){minIndex=guess;}else{maxIndex=guess;}}
return maxIndex;};}();this.x=x;this.y=y;this.lastIndex=x.length-1;var i1;var i3;this.interpolate=function interpolate(x2){if(!x2)return 0;i3=binarySearch(this.x,x2);i1=i3-1;return(x2-this.x[i1])*(this.y[i3]-this.y[i1])/(this.x[i3]-this.x[i1])+this.y[i1];};return this;},getInterpolateFunction:function getInterpolateFunction(c){var swiper=this;if(!swiper.controller.spline){swiper.controller.spline=swiper.params.loop?new Controller.LinearSpline(swiper.slidesGrid,c.slidesGrid):new Controller.LinearSpline(swiper.snapGrid,c.snapGrid);}},setTranslate:function setTranslate(_setTranslate,byController){var swiper=this;var controlled=swiper.controller.control;var multiplier;var controlledTranslate;var Swiper=swiper.constructor;function setControlledTranslate(c){var translate=swiper.rtlTranslate?-swiper.translate:swiper.translate;if(swiper.params.controller.by==='slide'){swiper.controller.getInterpolateFunction(c);controlledTranslate=-swiper.controller.spline.interpolate(-translate);}
if(!controlledTranslate||swiper.params.controller.by==='container'){multiplier=(c.maxTranslate()-c.minTranslate())/(swiper.maxTranslate()-swiper.minTranslate());controlledTranslate=(translate-swiper.minTranslate())*multiplier+c.minTranslate();}
if(swiper.params.controller.inverse){controlledTranslate=c.maxTranslate()-controlledTranslate;}
c.updateProgress(controlledTranslate);c.setTranslate(controlledTranslate,swiper);c.updateActiveIndex();c.updateSlidesClasses();}
if(Array.isArray(controlled)){for(var i=0;i<controlled.length;i+=1){if(controlled[i]!==byController&&controlled[i]instanceof Swiper){setControlledTranslate(controlled[i]);}}}else if(controlled instanceof Swiper&&byController!==controlled){setControlledTranslate(controlled);}},setTransition:function setTransition(duration,byController){var swiper=this;var Swiper=swiper.constructor;var controlled=swiper.controller.control;var i;function setControlledTransition(c){c.setTransition(duration,swiper);if(duration!==0){c.transitionStart();if(c.params.autoHeight){nextTick(function(){c.updateAutoHeight();});}
c.$wrapperEl.transitionEnd(function(){if(!controlled)return;if(c.params.loop&&swiper.params.controller.by==='slide'){c.loopFix();}
c.transitionEnd();});}}
if(Array.isArray(controlled)){for(i=0;i<controlled.length;i+=1){if(controlled[i]!==byController&&controlled[i]instanceof Swiper){setControlledTransition(controlled[i]);}}}else if(controlled instanceof Swiper&&byController!==controlled){setControlledTransition(controlled);}}};var Controller$1={name:'controller',params:{controller:{control:undefined,inverse:false,by:'slide'}},create:function create(){var swiper=this;bindModuleMethods(swiper,{controller:_extends({control:swiper.params.controller.control},Controller)});},on:{update:function update(swiper){if(!swiper.controller.control)return;if(swiper.controller.spline){swiper.controller.spline=undefined;delete swiper.controller.spline;}},resize:function resize(swiper){if(!swiper.controller.control)return;if(swiper.controller.spline){swiper.controller.spline=undefined;delete swiper.controller.spline;}},observerUpdate:function observerUpdate(swiper){if(!swiper.controller.control)return;if(swiper.controller.spline){swiper.controller.spline=undefined;delete swiper.controller.spline;}},setTranslate:function setTranslate(swiper,translate,byController){if(!swiper.controller.control)return;swiper.controller.setTranslate(translate,byController);},setTransition:function setTransition(swiper,duration,byController){if(!swiper.controller.control)return;swiper.controller.setTransition(duration,byController);}}};var A11y={getRandomNumber:function getRandomNumber(size){if(size===void 0){size=16;}
var randomChar=function randomChar(){return Math.round(16*Math.random()).toString(16);};return'x'.repeat(size).replace(/x/g,randomChar);},makeElFocusable:function makeElFocusable($el){$el.attr('tabIndex','0');return $el;},makeElNotFocusable:function makeElNotFocusable($el){$el.attr('tabIndex','-1');return $el;},addElRole:function addElRole($el,role){$el.attr('role',role);return $el;},addElRoleDescription:function addElRoleDescription($el,description){$el.attr('aria-role-description',description);return $el;},addElControls:function addElControls($el,controls){$el.attr('aria-controls',controls);return $el;},addElLabel:function addElLabel($el,label){$el.attr('aria-label',label);return $el;},addElId:function addElId($el,id){$el.attr('id',id);return $el;},addElLive:function addElLive($el,live){$el.attr('aria-live',live);return $el;},disableEl:function disableEl($el){$el.attr('aria-disabled',true);return $el;},enableEl:function enableEl($el){$el.attr('aria-disabled',false);return $el;},onEnterKey:function onEnterKey(e){var swiper=this;var params=swiper.params.a11y;if(e.keyCode!==13)return;var $targetEl=$(e.target);if(swiper.navigation&&swiper.navigation.$nextEl&&$targetEl.is(swiper.navigation.$nextEl)){if(!(swiper.isEnd&&!swiper.params.loop)){swiper.slideNext();}
if(swiper.isEnd){swiper.a11y.notify(params.lastSlideMessage);}else{swiper.a11y.notify(params.nextSlideMessage);}}
if(swiper.navigation&&swiper.navigation.$prevEl&&$targetEl.is(swiper.navigation.$prevEl)){if(!(swiper.isBeginning&&!swiper.params.loop)){swiper.slidePrev();}
if(swiper.isBeginning){swiper.a11y.notify(params.firstSlideMessage);}else{swiper.a11y.notify(params.prevSlideMessage);}}
if(swiper.pagination&&$targetEl.is("."+swiper.params.pagination.bulletClass.replace(/ /g,'.'))){$targetEl[0].click();}},notify:function notify(message){var swiper=this;var notification=swiper.a11y.liveRegion;if(notification.length===0)return;notification.html('');notification.html(message);},updateNavigation:function updateNavigation(){var swiper=this;if(swiper.params.loop||!swiper.navigation)return;var _swiper$navigation=swiper.navigation,$nextEl=_swiper$navigation.$nextEl,$prevEl=_swiper$navigation.$prevEl;if($prevEl&&$prevEl.length>0){if(swiper.isBeginning){swiper.a11y.disableEl($prevEl);swiper.a11y.makeElNotFocusable($prevEl);}else{swiper.a11y.enableEl($prevEl);swiper.a11y.makeElFocusable($prevEl);}}
if($nextEl&&$nextEl.length>0){if(swiper.isEnd){swiper.a11y.disableEl($nextEl);swiper.a11y.makeElNotFocusable($nextEl);}else{swiper.a11y.enableEl($nextEl);swiper.a11y.makeElFocusable($nextEl);}}},updatePagination:function updatePagination(){var swiper=this;var params=swiper.params.a11y;if(swiper.pagination&&swiper.params.pagination.clickable&&swiper.pagination.bullets&&swiper.pagination.bullets.length){swiper.pagination.bullets.each(function(bulletEl){var $bulletEl=$(bulletEl);swiper.a11y.makeElFocusable($bulletEl);if(!swiper.params.pagination.renderBullet){swiper.a11y.addElRole($bulletEl,'button');swiper.a11y.addElLabel($bulletEl,params.paginationBulletMessage.replace(/\{\{index\}\}/,$bulletEl.index()+1));}});}},init:function init(){var swiper=this;var params=swiper.params.a11y;swiper.$el.append(swiper.a11y.liveRegion);var $containerEl=swiper.$el;if(params.containerRoleDescriptionMessage){swiper.a11y.addElRoleDescription($containerEl,params.containerRoleDescriptionMessage);}
if(params.containerMessage){swiper.a11y.addElLabel($containerEl,params.containerMessage);}
var $wrapperEl=swiper.$wrapperEl;var wrapperId=$wrapperEl.attr('id')||"swiper-wrapper-"+swiper.a11y.getRandomNumber(16);var live;swiper.a11y.addElId($wrapperEl,wrapperId);if(swiper.params.autoplay&&swiper.params.autoplay.enabled){live='off';}else{live='polite';}
swiper.a11y.addElLive($wrapperEl,live);if(params.itemRoleDescriptionMessage){swiper.a11y.addElRoleDescription($(swiper.slides),params.itemRoleDescriptionMessage);}
swiper.a11y.addElRole($(swiper.slides),'group');swiper.slides.each(function(slideEl){var $slideEl=$(slideEl);swiper.a11y.addElLabel($slideEl,$slideEl.index()+1+" / "+swiper.slides.length);});var $nextEl;var $prevEl;if(swiper.navigation&&swiper.navigation.$nextEl){$nextEl=swiper.navigation.$nextEl;}
if(swiper.navigation&&swiper.navigation.$prevEl){$prevEl=swiper.navigation.$prevEl;}
if($nextEl&&$nextEl.length){swiper.a11y.makeElFocusable($nextEl);if($nextEl[0].tagName!=='BUTTON'){swiper.a11y.addElRole($nextEl,'button');$nextEl.on('keydown',swiper.a11y.onEnterKey);}
swiper.a11y.addElLabel($nextEl,params.nextSlideMessage);swiper.a11y.addElControls($nextEl,wrapperId);}
if($prevEl&&$prevEl.length){swiper.a11y.makeElFocusable($prevEl);if($prevEl[0].tagName!=='BUTTON'){swiper.a11y.addElRole($prevEl,'button');$prevEl.on('keydown',swiper.a11y.onEnterKey);}
swiper.a11y.addElLabel($prevEl,params.prevSlideMessage);swiper.a11y.addElControls($prevEl,wrapperId);}
if(swiper.pagination&&swiper.params.pagination.clickable&&swiper.pagination.bullets&&swiper.pagination.bullets.length){swiper.pagination.$el.on('keydown',"."+swiper.params.pagination.bulletClass.replace(/ /g,'.'),swiper.a11y.onEnterKey);}},destroy:function destroy(){var swiper=this;if(swiper.a11y.liveRegion&&swiper.a11y.liveRegion.length>0)swiper.a11y.liveRegion.remove();var $nextEl;var $prevEl;if(swiper.navigation&&swiper.navigation.$nextEl){$nextEl=swiper.navigation.$nextEl;}
if(swiper.navigation&&swiper.navigation.$prevEl){$prevEl=swiper.navigation.$prevEl;}
if($nextEl){$nextEl.off('keydown',swiper.a11y.onEnterKey);}
if($prevEl){$prevEl.off('keydown',swiper.a11y.onEnterKey);}
if(swiper.pagination&&swiper.params.pagination.clickable&&swiper.pagination.bullets&&swiper.pagination.bullets.length){swiper.pagination.$el.off('keydown',"."+swiper.params.pagination.bulletClass.replace(/ /g,'.'),swiper.a11y.onEnterKey);}}};var A11y$1={name:'a11y',params:{a11y:{enabled:true,notificationClass:'swiper-notification',prevSlideMessage:'Previous slide',nextSlideMessage:'Next slide',firstSlideMessage:'This is the first slide',lastSlideMessage:'This is the last slide',paginationBulletMessage:'Go to slide {{index}}',containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null}},create:function create(){var swiper=this;bindModuleMethods(swiper,{a11y:_extends({},A11y,{liveRegion:$("<span class=\""+swiper.params.a11y.notificationClass+"\" aria-live=\"assertive\" aria-atomic=\"true\"></span>")})});},on:{afterInit:function afterInit(swiper){if(!swiper.params.a11y.enabled)return;swiper.a11y.init();swiper.a11y.updateNavigation();},toEdge:function toEdge(swiper){if(!swiper.params.a11y.enabled)return;swiper.a11y.updateNavigation();},fromEdge:function fromEdge(swiper){if(!swiper.params.a11y.enabled)return;swiper.a11y.updateNavigation();},paginationUpdate:function paginationUpdate(swiper){if(!swiper.params.a11y.enabled)return;swiper.a11y.updatePagination();},destroy:function destroy(swiper){if(!swiper.params.a11y.enabled)return;swiper.a11y.destroy();}}};var History={init:function init(){var swiper=this;var window=getWindow();if(!swiper.params.history)return;if(!window.history||!window.history.pushState){swiper.params.history.enabled=false;swiper.params.hashNavigation.enabled=true;return;}
var history=swiper.history;history.initialized=true;history.paths=History.getPathValues(swiper.params.url);if(!history.paths.key&&!history.paths.value)return;history.scrollToSlide(0,history.paths.value,swiper.params.runCallbacksOnInit);if(!swiper.params.history.replaceState){window.addEventListener('popstate',swiper.history.setHistoryPopState);}},destroy:function destroy(){var swiper=this;var window=getWindow();if(!swiper.params.history.replaceState){window.removeEventListener('popstate',swiper.history.setHistoryPopState);}},setHistoryPopState:function setHistoryPopState(){var swiper=this;swiper.history.paths=History.getPathValues(swiper.params.url);swiper.history.scrollToSlide(swiper.params.speed,swiper.history.paths.value,false);},getPathValues:function getPathValues(urlOverride){var window=getWindow();var location;if(urlOverride){location=new URL(urlOverride);}else{location=window.location;}
var pathArray=location.pathname.slice(1).split('/').filter(function(part){return part!=='';});var total=pathArray.length;var key=pathArray[total-2];var value=pathArray[total-1];return{key:key,value:value};},setHistory:function setHistory(key,index){var swiper=this;var window=getWindow();if(!swiper.history.initialized||!swiper.params.history.enabled)return;var location;if(swiper.params.url){location=new URL(swiper.params.url);}else{location=window.location;}
var slide=swiper.slides.eq(index);var value=History.slugify(slide.attr('data-history'));if(!location.pathname.includes(key)){value=key+"/"+value;}
var currentState=window.history.state;if(currentState&&currentState.value===value){return;}
if(swiper.params.history.replaceState){window.history.replaceState({value:value},null,value);}else{window.history.pushState({value:value},null,value);}},slugify:function slugify(text){return text.toString().replace(/\s+/g,'-').replace(/[^\w-]+/g,'').replace(/--+/g,'-').replace(/^-+/,'').replace(/-+$/,'');},scrollToSlide:function scrollToSlide(speed,value,runCallbacks){var swiper=this;if(value){for(var i=0,length=swiper.slides.length;i<length;i+=1){var slide=swiper.slides.eq(i);var slideHistory=History.slugify(slide.attr('data-history'));if(slideHistory===value&&!slide.hasClass(swiper.params.slideDuplicateClass)){var index=slide.index();swiper.slideTo(index,speed,runCallbacks);}}}else{swiper.slideTo(0,speed,runCallbacks);}}};var History$1={name:'history',params:{history:{enabled:false,replaceState:false,key:'slides'}},create:function create(){var swiper=this;bindModuleMethods(swiper,{history:_extends({},History)});},on:{init:function init(swiper){if(swiper.params.history.enabled){swiper.history.init();}},destroy:function destroy(swiper){if(swiper.params.history.enabled){swiper.history.destroy();}},transitionEnd:function transitionEnd(swiper){if(swiper.history.initialized){swiper.history.setHistory(swiper.params.history.key,swiper.activeIndex);}},slideChange:function slideChange(swiper){if(swiper.history.initialized&&swiper.params.cssMode){swiper.history.setHistory(swiper.params.history.key,swiper.activeIndex);}}}};var HashNavigation={onHashCange:function onHashCange(){var swiper=this;var document=getDocument();swiper.emit('hashChange');var newHash=document.location.hash.replace('#','');var activeSlideHash=swiper.slides.eq(swiper.activeIndex).attr('data-hash');if(newHash!==activeSlideHash){var newIndex=swiper.$wrapperEl.children("."+swiper.params.slideClass+"[data-hash=\""+newHash+"\"]").index();if(typeof newIndex==='undefined')return;swiper.slideTo(newIndex);}},setHash:function setHash(){var swiper=this;var window=getWindow();var document=getDocument();if(!swiper.hashNavigation.initialized||!swiper.params.hashNavigation.enabled)return;if(swiper.params.hashNavigation.replaceState&&window.history&&window.history.replaceState){window.history.replaceState(null,null,"#"+swiper.slides.eq(swiper.activeIndex).attr('data-hash')||'');swiper.emit('hashSet');}else{var slide=swiper.slides.eq(swiper.activeIndex);var hash=slide.attr('data-hash')||slide.attr('data-history');document.location.hash=hash||'';swiper.emit('hashSet');}},init:function init(){var swiper=this;var document=getDocument();var window=getWindow();if(!swiper.params.hashNavigation.enabled||swiper.params.history&&swiper.params.history.enabled)return;swiper.hashNavigation.initialized=true;var hash=document.location.hash.replace('#','');if(hash){var speed=0;for(var i=0,length=swiper.slides.length;i<length;i+=1){var slide=swiper.slides.eq(i);var slideHash=slide.attr('data-hash')||slide.attr('data-history');if(slideHash===hash&&!slide.hasClass(swiper.params.slideDuplicateClass)){var index=slide.index();swiper.slideTo(index,speed,swiper.params.runCallbacksOnInit,true);}}}
if(swiper.params.hashNavigation.watchState){$(window).on('hashchange',swiper.hashNavigation.onHashCange);}},destroy:function destroy(){var swiper=this;var window=getWindow();if(swiper.params.hashNavigation.watchState){$(window).off('hashchange',swiper.hashNavigation.onHashCange);}}};var HashNavigation$1={name:'hash-navigation',params:{hashNavigation:{enabled:false,replaceState:false,watchState:false}},create:function create(){var swiper=this;bindModuleMethods(swiper,{hashNavigation:_extends({initialized:false},HashNavigation)});},on:{init:function init(swiper){if(swiper.params.hashNavigation.enabled){swiper.hashNavigation.init();}},destroy:function destroy(swiper){if(swiper.params.hashNavigation.enabled){swiper.hashNavigation.destroy();}},transitionEnd:function transitionEnd(swiper){if(swiper.hashNavigation.initialized){swiper.hashNavigation.setHash();}},slideChange:function slideChange(swiper){if(swiper.hashNavigation.initialized&&swiper.params.cssMode){swiper.hashNavigation.setHash();}}}};var Autoplay={run:function run(){var swiper=this;var $activeSlideEl=swiper.slides.eq(swiper.activeIndex);var delay=swiper.params.autoplay.delay;if($activeSlideEl.attr('data-swiper-autoplay')){delay=$activeSlideEl.attr('data-swiper-autoplay')||swiper.params.autoplay.delay;}
clearTimeout(swiper.autoplay.timeout);swiper.autoplay.timeout=nextTick(function(){var autoplayResult;if(swiper.params.autoplay.reverseDirection){if(swiper.params.loop){swiper.loopFix();autoplayResult=swiper.slidePrev(swiper.params.speed,true,true);swiper.emit('autoplay');}else if(!swiper.isBeginning){autoplayResult=swiper.slidePrev(swiper.params.speed,true,true);swiper.emit('autoplay');}else if(!swiper.params.autoplay.stopOnLastSlide){autoplayResult=swiper.slideTo(swiper.slides.length-1,swiper.params.speed,true,true);swiper.emit('autoplay');}else{swiper.autoplay.stop();}}else if(swiper.params.loop){swiper.loopFix();autoplayResult=swiper.slideNext(swiper.params.speed,true,true);swiper.emit('autoplay');}else if(!swiper.isEnd){autoplayResult=swiper.slideNext(swiper.params.speed,true,true);swiper.emit('autoplay');}else if(!swiper.params.autoplay.stopOnLastSlide){autoplayResult=swiper.slideTo(0,swiper.params.speed,true,true);swiper.emit('autoplay');}else{swiper.autoplay.stop();}
if(swiper.params.cssMode&&swiper.autoplay.running)swiper.autoplay.run();else if(autoplayResult===false){swiper.autoplay.run();}},delay);},start:function start(){var swiper=this;if(typeof swiper.autoplay.timeout!=='undefined')return false;if(swiper.autoplay.running)return false;swiper.autoplay.running=true;swiper.emit('autoplayStart');swiper.autoplay.run();return true;},stop:function stop(){var swiper=this;if(!swiper.autoplay.running)return false;if(typeof swiper.autoplay.timeout==='undefined')return false;if(swiper.autoplay.timeout){clearTimeout(swiper.autoplay.timeout);swiper.autoplay.timeout=undefined;}
swiper.autoplay.running=false;swiper.emit('autoplayStop');return true;},pause:function pause(speed){var swiper=this;if(!swiper.autoplay.running)return;if(swiper.autoplay.paused)return;if(swiper.autoplay.timeout)clearTimeout(swiper.autoplay.timeout);swiper.autoplay.paused=true;if(speed===0||!swiper.params.autoplay.waitForTransition){swiper.autoplay.paused=false;swiper.autoplay.run();}else{swiper.$wrapperEl[0].addEventListener('transitionend',swiper.autoplay.onTransitionEnd);swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd',swiper.autoplay.onTransitionEnd);}},onVisibilityChange:function onVisibilityChange(){var swiper=this;var document=getDocument();if(document.visibilityState==='hidden'&&swiper.autoplay.running){swiper.autoplay.pause();}
if(document.visibilityState==='visible'&&swiper.autoplay.paused){swiper.autoplay.run();swiper.autoplay.paused=false;}},onTransitionEnd:function onTransitionEnd(e){var swiper=this;if(!swiper||swiper.destroyed||!swiper.$wrapperEl)return;if(e.target!==swiper.$wrapperEl[0])return;swiper.$wrapperEl[0].removeEventListener('transitionend',swiper.autoplay.onTransitionEnd);swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd',swiper.autoplay.onTransitionEnd);swiper.autoplay.paused=false;if(!swiper.autoplay.running){swiper.autoplay.stop();}else{swiper.autoplay.run();}}};var Autoplay$1={name:'autoplay',params:{autoplay:{enabled:false,delay:3000,waitForTransition:true,disableOnInteraction:true,stopOnLastSlide:false,reverseDirection:false}},create:function create(){var swiper=this;bindModuleMethods(swiper,{autoplay:_extends({},Autoplay,{running:false,paused:false})});},on:{init:function init(swiper){if(swiper.params.autoplay.enabled){swiper.autoplay.start();var document=getDocument();document.addEventListener('visibilitychange',swiper.autoplay.onVisibilityChange);}},beforeTransitionStart:function beforeTransitionStart(swiper,speed,internal){if(swiper.autoplay.running){if(internal||!swiper.params.autoplay.disableOnInteraction){swiper.autoplay.pause(speed);}else{swiper.autoplay.stop();}}},sliderFirstMove:function sliderFirstMove(swiper){if(swiper.autoplay.running){if(swiper.params.autoplay.disableOnInteraction){swiper.autoplay.stop();}else{swiper.autoplay.pause();}}},touchEnd:function touchEnd(swiper){if(swiper.params.cssMode&&swiper.autoplay.paused&&!swiper.params.autoplay.disableOnInteraction){swiper.autoplay.run();}},destroy:function destroy(swiper){if(swiper.autoplay.running){swiper.autoplay.stop();}
var document=getDocument();document.removeEventListener('visibilitychange',swiper.autoplay.onVisibilityChange);}}};var Fade={setTranslate:function setTranslate(){var swiper=this;var slides=swiper.slides;for(var i=0;i<slides.length;i+=1){var $slideEl=swiper.slides.eq(i);var offset=$slideEl[0].swiperSlideOffset;var tx=-offset;if(!swiper.params.virtualTranslate)tx-=swiper.translate;var ty=0;if(!swiper.isHorizontal()){ty=tx;tx=0;}
var slideOpacity=swiper.params.fadeEffect.crossFade?Math.max(1-Math.abs($slideEl[0].progress),0):1+Math.min(Math.max($slideEl[0].progress,-1),0);$slideEl.css({opacity:slideOpacity}).transform("translate3d("+tx+"px, "+ty+"px, 0px)");}},setTransition:function setTransition(duration){var swiper=this;var slides=swiper.slides,$wrapperEl=swiper.$wrapperEl;slides.transition(duration);if(swiper.params.virtualTranslate&&duration!==0){var eventTriggered=false;slides.transitionEnd(function(){if(eventTriggered)return;if(!swiper||swiper.destroyed)return;eventTriggered=true;swiper.animating=false;var triggerEvents=['webkitTransitionEnd','transitionend'];for(var i=0;i<triggerEvents.length;i+=1){$wrapperEl.trigger(triggerEvents[i]);}});}}};var EffectFade={name:'effect-fade',params:{fadeEffect:{crossFade:false}},create:function create(){var swiper=this;bindModuleMethods(swiper,{fadeEffect:_extends({},Fade)});},on:{beforeInit:function beforeInit(swiper){if(swiper.params.effect!=='fade')return;swiper.classNames.push(swiper.params.containerModifierClass+"fade");var overwriteParams={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:true,spaceBetween:0,virtualTranslate:true};extend$1(swiper.params,overwriteParams);extend$1(swiper.originalParams,overwriteParams);},setTranslate:function setTranslate(swiper){if(swiper.params.effect!=='fade')return;swiper.fadeEffect.setTranslate();},setTransition:function setTransition(swiper,duration){if(swiper.params.effect!=='fade')return;swiper.fadeEffect.setTransition(duration);}}};var Cube={setTranslate:function setTranslate(){var swiper=this;var $el=swiper.$el,$wrapperEl=swiper.$wrapperEl,slides=swiper.slides,swiperWidth=swiper.width,swiperHeight=swiper.height,rtl=swiper.rtlTranslate,swiperSize=swiper.size,browser=swiper.browser;var params=swiper.params.cubeEffect;var isHorizontal=swiper.isHorizontal();var isVirtual=swiper.virtual&&swiper.params.virtual.enabled;var wrapperRotate=0;var $cubeShadowEl;if(params.shadow){if(isHorizontal){$cubeShadowEl=$wrapperEl.find('.swiper-cube-shadow');if($cubeShadowEl.length===0){$cubeShadowEl=$('<div class="swiper-cube-shadow"></div>');$wrapperEl.append($cubeShadowEl);}
$cubeShadowEl.css({height:swiperWidth+"px"});}else{$cubeShadowEl=$el.find('.swiper-cube-shadow');if($cubeShadowEl.length===0){$cubeShadowEl=$('<div class="swiper-cube-shadow"></div>');$el.append($cubeShadowEl);}}}
for(var i=0;i<slides.length;i+=1){var $slideEl=slides.eq(i);var slideIndex=i;if(isVirtual){slideIndex=parseInt($slideEl.attr('data-swiper-slide-index'),10);}
var slideAngle=slideIndex*90;var round=Math.floor(slideAngle/360);if(rtl){slideAngle=-slideAngle;round=Math.floor(-slideAngle/360);}
var progress=Math.max(Math.min($slideEl[0].progress,1),-1);var tx=0;var ty=0;var tz=0;if(slideIndex%4===0){tx=-round*4*swiperSize;tz=0;}else if((slideIndex-1)%4===0){tx=0;tz=-round*4*swiperSize;}else if((slideIndex-2)%4===0){tx=swiperSize+round*4*swiperSize;tz=swiperSize;}else if((slideIndex-3)%4===0){tx=-swiperSize;tz=3*swiperSize+swiperSize*4*round;}
if(rtl){tx=-tx;}
if(!isHorizontal){ty=tx;tx=0;}
var transform="rotateX("+(isHorizontal?0:-slideAngle)+"deg) rotateY("+(isHorizontal?slideAngle:0)+"deg) translate3d("+tx+"px, "+ty+"px, "+tz+"px)";if(progress<=1&&progress>-1){wrapperRotate=slideIndex*90+progress*90;if(rtl)wrapperRotate=-slideIndex*90-progress*90;}
$slideEl.transform(transform);if(params.slideShadows){var shadowBefore=isHorizontal?$slideEl.find('.swiper-slide-shadow-left'):$slideEl.find('.swiper-slide-shadow-top');var shadowAfter=isHorizontal?$slideEl.find('.swiper-slide-shadow-right'):$slideEl.find('.swiper-slide-shadow-bottom');if(shadowBefore.length===0){shadowBefore=$("<div class=\"swiper-slide-shadow-"+(isHorizontal?'left':'top')+"\"></div>");$slideEl.append(shadowBefore);}
if(shadowAfter.length===0){shadowAfter=$("<div class=\"swiper-slide-shadow-"+(isHorizontal?'right':'bottom')+"\"></div>");$slideEl.append(shadowAfter);}
if(shadowBefore.length)shadowBefore[0].style.opacity=Math.max(-progress,0);if(shadowAfter.length)shadowAfter[0].style.opacity=Math.max(progress,0);}}
$wrapperEl.css({'-webkit-transform-origin':"50% 50% -"+swiperSize/2+"px",'-moz-transform-origin':"50% 50% -"+swiperSize/2+"px",'-ms-transform-origin':"50% 50% -"+swiperSize/2+"px",'transform-origin':"50% 50% -"+swiperSize/2+"px"});if(params.shadow){if(isHorizontal){$cubeShadowEl.transform("translate3d(0px, "+(swiperWidth/2+params.shadowOffset)+"px, "+-swiperWidth/2+"px) rotateX(90deg) rotateZ(0deg) scale("+params.shadowScale+")");}else{var shadowAngle=Math.abs(wrapperRotate)-Math.floor(Math.abs(wrapperRotate)/90)*90;var multiplier=1.5-(Math.sin(shadowAngle*2*Math.PI/360)/2+Math.cos(shadowAngle*2*Math.PI/360)/2);var scale1=params.shadowScale;var scale2=params.shadowScale/multiplier;var offset=params.shadowOffset;$cubeShadowEl.transform("scale3d("+scale1+", 1, "+scale2+") translate3d(0px, "+(swiperHeight/2+offset)+"px, "+-swiperHeight/2/scale2+"px) rotateX(-90deg)");}}
var zFactor=browser.isSafari||browser.isWebView?-swiperSize/2:0;$wrapperEl.transform("translate3d(0px,0,"+zFactor+"px) rotateX("+(swiper.isHorizontal()?0:wrapperRotate)+"deg) rotateY("+(swiper.isHorizontal()?-wrapperRotate:0)+"deg)");},setTransition:function setTransition(duration){var swiper=this;var $el=swiper.$el,slides=swiper.slides;slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);if(swiper.params.cubeEffect.shadow&&!swiper.isHorizontal()){$el.find('.swiper-cube-shadow').transition(duration);}}};var EffectCube={name:'effect-cube',params:{cubeEffect:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:0.94}},create:function create(){var swiper=this;bindModuleMethods(swiper,{cubeEffect:_extends({},Cube)});},on:{beforeInit:function beforeInit(swiper){if(swiper.params.effect!=='cube')return;swiper.classNames.push(swiper.params.containerModifierClass+"cube");swiper.classNames.push(swiper.params.containerModifierClass+"3d");var overwriteParams={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:true,resistanceRatio:0,spaceBetween:0,centeredSlides:false,virtualTranslate:true};extend$1(swiper.params,overwriteParams);extend$1(swiper.originalParams,overwriteParams);},setTranslate:function setTranslate(swiper){if(swiper.params.effect!=='cube')return;swiper.cubeEffect.setTranslate();},setTransition:function setTransition(swiper,duration){if(swiper.params.effect!=='cube')return;swiper.cubeEffect.setTransition(duration);}}};var Flip={setTranslate:function setTranslate(){var swiper=this;var slides=swiper.slides,rtl=swiper.rtlTranslate;for(var i=0;i<slides.length;i+=1){var $slideEl=slides.eq(i);var progress=$slideEl[0].progress;if(swiper.params.flipEffect.limitRotation){progress=Math.max(Math.min($slideEl[0].progress,1),-1);}
var offset=$slideEl[0].swiperSlideOffset;var rotate=-180*progress;var rotateY=rotate;var rotateX=0;var tx=-offset;var ty=0;if(!swiper.isHorizontal()){ty=tx;tx=0;rotateX=-rotateY;rotateY=0;}else if(rtl){rotateY=-rotateY;}
$slideEl[0].style.zIndex=-Math.abs(Math.round(progress))+slides.length;if(swiper.params.flipEffect.slideShadows){var shadowBefore=swiper.isHorizontal()?$slideEl.find('.swiper-slide-shadow-left'):$slideEl.find('.swiper-slide-shadow-top');var shadowAfter=swiper.isHorizontal()?$slideEl.find('.swiper-slide-shadow-right'):$slideEl.find('.swiper-slide-shadow-bottom');if(shadowBefore.length===0){shadowBefore=$("<div class=\"swiper-slide-shadow-"+(swiper.isHorizontal()?'left':'top')+"\"></div>");$slideEl.append(shadowBefore);}
if(shadowAfter.length===0){shadowAfter=$("<div class=\"swiper-slide-shadow-"+(swiper.isHorizontal()?'right':'bottom')+"\"></div>");$slideEl.append(shadowAfter);}
if(shadowBefore.length)shadowBefore[0].style.opacity=Math.max(-progress,0);if(shadowAfter.length)shadowAfter[0].style.opacity=Math.max(progress,0);}
$slideEl.transform("translate3d("+tx+"px, "+ty+"px, 0px) rotateX("+rotateX+"deg) rotateY("+rotateY+"deg)");}},setTransition:function setTransition(duration){var swiper=this;var slides=swiper.slides,activeIndex=swiper.activeIndex,$wrapperEl=swiper.$wrapperEl;slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);if(swiper.params.virtualTranslate&&duration!==0){var eventTriggered=false;slides.eq(activeIndex).transitionEnd(function onTransitionEnd(){if(eventTriggered)return;if(!swiper||swiper.destroyed)return;eventTriggered=true;swiper.animating=false;var triggerEvents=['webkitTransitionEnd','transitionend'];for(var i=0;i<triggerEvents.length;i+=1){$wrapperEl.trigger(triggerEvents[i]);}});}}};var EffectFlip={name:'effect-flip',params:{flipEffect:{slideShadows:true,limitRotation:true}},create:function create(){var swiper=this;bindModuleMethods(swiper,{flipEffect:_extends({},Flip)});},on:{beforeInit:function beforeInit(swiper){if(swiper.params.effect!=='flip')return;swiper.classNames.push(swiper.params.containerModifierClass+"flip");swiper.classNames.push(swiper.params.containerModifierClass+"3d");var overwriteParams={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:true,spaceBetween:0,virtualTranslate:true};extend$1(swiper.params,overwriteParams);extend$1(swiper.originalParams,overwriteParams);},setTranslate:function setTranslate(swiper){if(swiper.params.effect!=='flip')return;swiper.flipEffect.setTranslate();},setTransition:function setTransition(swiper,duration){if(swiper.params.effect!=='flip')return;swiper.flipEffect.setTransition(duration);}}};var Coverflow={setTranslate:function setTranslate(){var swiper=this;var swiperWidth=swiper.width,swiperHeight=swiper.height,slides=swiper.slides,slidesSizesGrid=swiper.slidesSizesGrid;var params=swiper.params.coverflowEffect;var isHorizontal=swiper.isHorizontal();var transform=swiper.translate;var center=isHorizontal?-transform+swiperWidth/2:-transform+swiperHeight/2;var rotate=isHorizontal?params.rotate:-params.rotate;var translate=params.depth;for(var i=0,length=slides.length;i<length;i+=1){var $slideEl=slides.eq(i);var slideSize=slidesSizesGrid[i];var slideOffset=$slideEl[0].swiperSlideOffset;var offsetMultiplier=(center-slideOffset-slideSize/2)/slideSize*params.modifier;var rotateY=isHorizontal?rotate*offsetMultiplier:0;var rotateX=isHorizontal?0:rotate*offsetMultiplier;var translateZ=-translate*Math.abs(offsetMultiplier);var stretch=params.stretch;if(typeof stretch==='string'&&stretch.indexOf('%')!==-1){stretch=parseFloat(params.stretch)/100*slideSize;}
var translateY=isHorizontal?0:stretch*offsetMultiplier;var translateX=isHorizontal?stretch*offsetMultiplier:0;var scale=1-(1-params.scale)*Math.abs(offsetMultiplier);if(Math.abs(translateX)<0.001)translateX=0;if(Math.abs(translateY)<0.001)translateY=0;if(Math.abs(translateZ)<0.001)translateZ=0;if(Math.abs(rotateY)<0.001)rotateY=0;if(Math.abs(rotateX)<0.001)rotateX=0;if(Math.abs(scale)<0.001)scale=0;var slideTransform="translate3d("+translateX+"px,"+translateY+"px,"+translateZ+"px)  rotateX("+rotateX+"deg) rotateY("+rotateY+"deg) scale("+scale+")";$slideEl.transform(slideTransform);$slideEl[0].style.zIndex=-Math.abs(Math.round(offsetMultiplier))+1;if(params.slideShadows){var $shadowBeforeEl=isHorizontal?$slideEl.find('.swiper-slide-shadow-left'):$slideEl.find('.swiper-slide-shadow-top');var $shadowAfterEl=isHorizontal?$slideEl.find('.swiper-slide-shadow-right'):$slideEl.find('.swiper-slide-shadow-bottom');if($shadowBeforeEl.length===0){$shadowBeforeEl=$("<div class=\"swiper-slide-shadow-"+(isHorizontal?'left':'top')+"\"></div>");$slideEl.append($shadowBeforeEl);}
if($shadowAfterEl.length===0){$shadowAfterEl=$("<div class=\"swiper-slide-shadow-"+(isHorizontal?'right':'bottom')+"\"></div>");$slideEl.append($shadowAfterEl);}
if($shadowBeforeEl.length)$shadowBeforeEl[0].style.opacity=offsetMultiplier>0?offsetMultiplier:0;if($shadowAfterEl.length)$shadowAfterEl[0].style.opacity=-offsetMultiplier>0?-offsetMultiplier:0;}}},setTransition:function setTransition(duration){var swiper=this;swiper.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);}};var EffectCoverflow={name:'effect-coverflow',params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:true}},create:function create(){var swiper=this;bindModuleMethods(swiper,{coverflowEffect:_extends({},Coverflow)});},on:{beforeInit:function beforeInit(swiper){if(swiper.params.effect!=='coverflow')return;swiper.classNames.push(swiper.params.containerModifierClass+"coverflow");swiper.classNames.push(swiper.params.containerModifierClass+"3d");swiper.params.watchSlidesProgress=true;swiper.originalParams.watchSlidesProgress=true;},setTranslate:function setTranslate(swiper){if(swiper.params.effect!=='coverflow')return;swiper.coverflowEffect.setTranslate();},setTransition:function setTransition(swiper,duration){if(swiper.params.effect!=='coverflow')return;swiper.coverflowEffect.setTransition(duration);}}};var Thumbs={init:function init(){var swiper=this;var thumbsParams=swiper.params.thumbs;if(swiper.thumbs.initialized)return false;swiper.thumbs.initialized=true;var SwiperClass=swiper.constructor;if(thumbsParams.swiper instanceof SwiperClass){swiper.thumbs.swiper=thumbsParams.swiper;extend$1(swiper.thumbs.swiper.originalParams,{watchSlidesProgress:true,slideToClickedSlide:false});extend$1(swiper.thumbs.swiper.params,{watchSlidesProgress:true,slideToClickedSlide:false});}else if(isObject$1(thumbsParams.swiper)){swiper.thumbs.swiper=new SwiperClass(extend$1({},thumbsParams.swiper,{watchSlidesVisibility:true,watchSlidesProgress:true,slideToClickedSlide:false}));swiper.thumbs.swiperCreated=true;}
swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);swiper.thumbs.swiper.on('tap',swiper.thumbs.onThumbClick);return true;},onThumbClick:function onThumbClick(){var swiper=this;var thumbsSwiper=swiper.thumbs.swiper;if(!thumbsSwiper)return;var clickedIndex=thumbsSwiper.clickedIndex;var clickedSlide=thumbsSwiper.clickedSlide;if(clickedSlide&&$(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass))return;if(typeof clickedIndex==='undefined'||clickedIndex===null)return;var slideToIndex;if(thumbsSwiper.params.loop){slideToIndex=parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'),10);}else{slideToIndex=clickedIndex;}
if(swiper.params.loop){var currentIndex=swiper.activeIndex;if(swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)){swiper.loopFix();swiper._clientLeft=swiper.$wrapperEl[0].clientLeft;currentIndex=swiper.activeIndex;}
var prevIndex=swiper.slides.eq(currentIndex).prevAll("[data-swiper-slide-index=\""+slideToIndex+"\"]").eq(0).index();var nextIndex=swiper.slides.eq(currentIndex).nextAll("[data-swiper-slide-index=\""+slideToIndex+"\"]").eq(0).index();if(typeof prevIndex==='undefined')slideToIndex=nextIndex;else if(typeof nextIndex==='undefined')slideToIndex=prevIndex;else if(nextIndex-currentIndex<currentIndex-prevIndex)slideToIndex=nextIndex;else slideToIndex=prevIndex;}
swiper.slideTo(slideToIndex);},update:function update(initial){var swiper=this;var thumbsSwiper=swiper.thumbs.swiper;if(!thumbsSwiper)return;var slidesPerView=thumbsSwiper.params.slidesPerView==='auto'?thumbsSwiper.slidesPerViewDynamic():thumbsSwiper.params.slidesPerView;var autoScrollOffset=swiper.params.thumbs.autoScrollOffset;var useOffset=autoScrollOffset&&!thumbsSwiper.params.loop;if(swiper.realIndex!==thumbsSwiper.realIndex||useOffset){var currentThumbsIndex=thumbsSwiper.activeIndex;var newThumbsIndex;var direction;if(thumbsSwiper.params.loop){if(thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)){thumbsSwiper.loopFix();thumbsSwiper._clientLeft=thumbsSwiper.$wrapperEl[0].clientLeft;currentThumbsIndex=thumbsSwiper.activeIndex;}
var prevThumbsIndex=thumbsSwiper.slides.eq(currentThumbsIndex).prevAll("[data-swiper-slide-index=\""+swiper.realIndex+"\"]").eq(0).index();var nextThumbsIndex=thumbsSwiper.slides.eq(currentThumbsIndex).nextAll("[data-swiper-slide-index=\""+swiper.realIndex+"\"]").eq(0).index();if(typeof prevThumbsIndex==='undefined')newThumbsIndex=nextThumbsIndex;else if(typeof nextThumbsIndex==='undefined')newThumbsIndex=prevThumbsIndex;else if(nextThumbsIndex-currentThumbsIndex===currentThumbsIndex-prevThumbsIndex)newThumbsIndex=currentThumbsIndex;else if(nextThumbsIndex-currentThumbsIndex<currentThumbsIndex-prevThumbsIndex)newThumbsIndex=nextThumbsIndex;else newThumbsIndex=prevThumbsIndex;direction=swiper.activeIndex>swiper.previousIndex?'next':'prev';}else{newThumbsIndex=swiper.realIndex;direction=newThumbsIndex>swiper.previousIndex?'next':'prev';}
if(useOffset){newThumbsIndex+=direction==='next'?autoScrollOffset:-1*autoScrollOffset;}
if(thumbsSwiper.visibleSlidesIndexes&&thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex)<0){if(thumbsSwiper.params.centeredSlides){if(newThumbsIndex>currentThumbsIndex){newThumbsIndex=newThumbsIndex-Math.floor(slidesPerView/2)+1;}else{newThumbsIndex=newThumbsIndex+Math.floor(slidesPerView/2)-1;}}else if(newThumbsIndex>currentThumbsIndex){newThumbsIndex=newThumbsIndex-slidesPerView+1;}
thumbsSwiper.slideTo(newThumbsIndex,initial?0:undefined);}}
var thumbsToActivate=1;var thumbActiveClass=swiper.params.thumbs.slideThumbActiveClass;if(swiper.params.slidesPerView>1&&!swiper.params.centeredSlides){thumbsToActivate=swiper.params.slidesPerView;}
if(!swiper.params.thumbs.multipleActiveThumbs){thumbsToActivate=1;}
thumbsToActivate=Math.floor(thumbsToActivate);thumbsSwiper.slides.removeClass(thumbActiveClass);if(thumbsSwiper.params.loop||thumbsSwiper.params.virtual&&thumbsSwiper.params.virtual.enabled){for(var i=0;i<thumbsToActivate;i+=1){thumbsSwiper.$wrapperEl.children("[data-swiper-slide-index=\""+(swiper.realIndex+i)+"\"]").addClass(thumbActiveClass);}}else{for(var _i=0;_i<thumbsToActivate;_i+=1){thumbsSwiper.slides.eq(swiper.realIndex+_i).addClass(thumbActiveClass);}}}};var Thumbs$1={name:'thumbs',params:{thumbs:{swiper:null,multipleActiveThumbs:true,autoScrollOffset:0,slideThumbActiveClass:'swiper-slide-thumb-active',thumbsContainerClass:'swiper-container-thumbs'}},create:function create(){var swiper=this;bindModuleMethods(swiper,{thumbs:_extends({swiper:null,initialized:false},Thumbs)});},on:{beforeInit:function beforeInit(swiper){var thumbs=swiper.params.thumbs;if(!thumbs||!thumbs.swiper)return;swiper.thumbs.init();swiper.thumbs.update(true);},slideChange:function slideChange(swiper){if(!swiper.thumbs.swiper)return;swiper.thumbs.update();},update:function update(swiper){if(!swiper.thumbs.swiper)return;swiper.thumbs.update();},resize:function resize(swiper){if(!swiper.thumbs.swiper)return;swiper.thumbs.update();},observerUpdate:function observerUpdate(swiper){if(!swiper.thumbs.swiper)return;swiper.thumbs.update();},setTransition:function setTransition(swiper,duration){var thumbsSwiper=swiper.thumbs.swiper;if(!thumbsSwiper)return;thumbsSwiper.setTransition(duration);},beforeDestroy:function beforeDestroy(swiper){var thumbsSwiper=swiper.thumbs.swiper;if(!thumbsSwiper)return;if(swiper.thumbs.swiperCreated&&thumbsSwiper){thumbsSwiper.destroy();}}}};var components=[Virtual$1,Keyboard$1,Mousewheel$1,Navigation$1,Pagination$1,Scrollbar$1,Parallax$1,Zoom$1,Lazy$1,Controller$1,A11y$1,History$1,HashNavigation$1,Autoplay$1,EffectFade,EffectCube,EffectFlip,EffectCoverflow,Thumbs$1];Swiper.use(components);return Swiper;})));;$(document).ready(function(){$('.block-cdc').on("traitementcdc",function(){swiperCdcAccueil();});$('.slide-bg-images').on("accueildefilement",function(){swiperDefilementAccueil();});swiperGo();});function swiperGo(){if($('.swiper-container-cdc')){new Swiper('.swiper-container-cdc',{slidesPerView:1,slidesPerGroup:1,spaceBetween:10,pagination:{el:'.swiper-pagination-cdc',clickable:true},breakpoints:{1025:{slidesPerView:3,spaceBetween:50,slidesPerGroup:3,},641:{slidesPerView:2,spaceBetween:30,slidesPerGroup:2}}});if($('.swiper-pagination-cdc span').length==1){$('.swiper-pagination-cdc').hide();}}
if($('.block-slide.container-block-actualite')){if($('.block-slide.container-block-actualite').data('nb-display')>1){new Swiper('.swiper-container-actu',{slidesPerView:1,spaceBetween:10,pagination:{el:'.swiper-pagination-actu',clickable:true},breakpoints:{1025:{slidesPerView:3,spaceBetween:50},641:{slidesPerView:2,spaceBetween:30}}});if($('.swiper-pagination-actu span').length==1){$('.swiper-pagination-actu').hide();}}}
if($('.swiper-container-bandeau')){new Swiper('.swiper-container-bandeau',{slidesPerView:1,spaceBetween:0,centeredSlides:true,effect:'fade',autoplay:{delay:3500,disableOnInteraction:false},pagination:{el:'.swiper-pagination-bandeau',clickable:true}});if($('.swiper-pagination-bandeau span').length==1){$('.swiper-pagination-bandeau').hide();}}
if($('.swiper-container-agence')){new Swiper('.swiper-container-agence',{slidesPerView:1,spaceBetween:0,centeredSlides:true,pagination:{el:'.swiper-pagination-agence',clickable:true}});if($('.swiper-pagination-agence span').length==1){$('.swiper-pagination-agence').hide();}}
if($('.block-annonce-placeholder .swiper-container-placeholder')){var column=2;if($('.block-annonce-placeholder').data('nb-offre')<4){column=1;}
new Swiper('.swiper-container-placeholder',{slidesPerView:1,slidesPerGroup:1,spaceBetween:10,slidesPerColumnFill:'column',slidesPerColumn:1,pagination:{el:'.swiper-pagination-placeholder',clickable:true},breakpoints:{1025:{slidesPerView:3,spaceBetween:50,slidesPerGroup:3,slidesPerColumnFill:'row',slidesPerColumn:column},641:{slidesPerView:2,spaceBetween:30,slidesPerGroup:2}}});}
if($('.swiper-container-liste-agence')){new Swiper('.swiper-container-liste-agence',{slidesPerView:1,spaceBetween:10,slidesPerGroup:1,setWrapperSize:true,touchEventsTarget:'wrapper',pagination:{el:'.swiper-pagination-liste-agence',clickable:true},breakpoints:{992:{slidesPerView:3,spaceBetween:30,slidesPerGroup:3},641:{slidesPerView:2,spaceBetween:20,slidesPerGroup:2}}});if($('.swiper-pagination-liste-agence span').length==1){$('.swiper-pagination-liste-agence').hide();}}}
function swiperDefilementAccueil(){new Swiper('.swiper-container-bandeau-accueil',{slidesPerView:1,spaceBetween:0,centeredSlides:true,effect:'fade',autoplay:{delay:5000,disableOnInteraction:false}});}
function swiperCdcAccueil(){new Swiper('.swiper-container-cdc',{slidesPerView:1,slidesPerGroup:1,spaceBetween:10,pagination:{el:'.swiper-pagination-cdc',clickable:true},breakpoints:{1025:{slidesPerView:3,spaceBetween:50,slidesPerGroup:3},641:{slidesPerView:2,spaceBetween:30,slidesPerGroup:2}}});if($('.swiper-pagination-cdc span').length==1){$('.swiper-pagination-cdc').hide();}};(function($){$(".telephone a").click(function(event){if(window.matchMedia('only screen and (min-width: 769px)').matches){event.preventDefault();}});})(jQuery);;(function($){var AffichageNumTracker=function(element){this.element=$(element);};AffichageNumTracker.prototype={_isInit:false,show:function(){if(this._isInit===false){var that=this;var btn=$('.btn-content.telephone a');var texteOff=btn.data("texte-afficher");btn.text(function(index,text){$(this).removeClass('tel-actif');$(this).data('texte-afficher',text);return texteOff;});btn.click(function(){$(this).text(function(){$(this).addClass('tel-actif');return $(this).data('texte-afficher');})});that._isInit=true;}},destroy:function(){$('.btn-content.telephone a').off('click');this._isInit=false;}};$.fn.affichagenumtracker=function(option){return this.each(function(){var $this=$(this),data=$this.data('affichagenumtracker');if(!data)
$this.data('affichagenumtracker',(data=new AffichageNumTracker(this)));if(typeof option==='string')
data[option]();else
data.show();});};})(jQuery);;$(document).ready(function(){$('.btn-content.telephone a').one("click",function(){if($(this).data('tracker-element')&&$(this).data('tracker-obj')&&typeof ga!=='undefined'){var element=$(this).data('tracker-element');var label=$(this).data('tracker-obj');ga(function(){var trackers=ga.getAll();for(var i=0;i<trackers.length;++i){var tracker=trackers[i];tracker.send('event',element,'click',label);}});}});});
;/*! jQuery UI - v1.12.1 - 2019-02-18
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(p.inline?p.dpDiv.parent()[0]:p.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var l=0,h=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=h.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=h.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,l=t(this),h=l.outerWidth(),c=l.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=h+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),T=e(k.my,l.outerWidth(),l.outerHeight());"right"===n.my[0]?D.left-=h:"center"===n.my[0]&&(D.left-=h/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=T[0],D.top+=T[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:h,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+T[0],u[1]+T[1]],my:n.my,at:n.at,within:b,elem:l})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-h,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:l,left:D.left,top:D.top,width:h,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,l,h=i.nodeName.toLowerCase();return"area"===h?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(h)?(r=!i.disabled,r&&(l=t(i).closest("fieldset")[0],l&&(r=!l.disabled))):r="a"===h?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var c=!1;t(document).on("mouseup",function(){c=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!c){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,c=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)
},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,l,h,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)l=s.snapElements[d].left-s.margins.left,h=l+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,l-g>_||m>h+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(l-_),r=g>=Math.abs(h-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(l-m),r=g>=Math.abs(h-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&u(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var u=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,l=a+e.helperProportions.height,h=i.offset.left,c=i.offset.top,u=h+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=h&&u>=r&&a>=c&&d>=l;case"intersect":return o+e.helperProportions.width/2>h&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>l-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,h,i.proportions().width);case"touch":return(a>=c&&d>=a||l>=c&&d>=l||c>a&&l>d)&&(o>=h&&u>=o||r>=h&&u>=r||h>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&u(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=u(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,l=this._change[o];return this._updatePrevProperties(),l?(i=l.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,l=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(a,{top:l,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&c&&(t.top=l-e.minHeight),n&&c&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-a},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,l=t(this).resizable("instance"),h=l.options,c=l.element,u=h.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(l.containerElement=t(d),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=l._num(e.css("padding"+s))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=l.containerOffset,n=l.containerSize.height,o=l.containerSize.width,a=l._hasScroll(d,"left")?d.scrollWidth:o,r=l._hasScroll(d)?d.scrollHeight:n,l.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,l=a.containerOffset,h=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=l),h.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?l.left:0),h.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?l.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-l.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-l.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),l=a.outerWidth()-e.sizeDiff.width,h=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};
t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,l="number"==typeof s.grid?[s.grid,s.grid]:s.grid,h=l[0]||1,c=l[1]||1,u=Math.round((n.width-o.width)/h)*h,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=l,_&&(p+=h),v&&(f+=c),g&&(p-=h),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-h)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-h>0?(i.size.width=p,i.position.left=a.left-u):(p=h-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,l=e.pageY;return o>r&&(i=r,r=o,o=i),a>l&&(i=l,l=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:l-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?h=!(c.left>r||o>c.right||c.top>l||a>c.bottom):"fit"===n.tolerance&&(h=c.left>o&&r>c.right&&c.top>a&&l>c.bottom),h?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+h>r&&l>s+h,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&l>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],l=[],h=this._connectWith();if(h&&e)for(s=h.length-1;s>=0;s--)for(o=t(h[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&l.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=l.length-1;s>=0;s--)l[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,l,h,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,h=r.length;h>s;s++)l=t(r[s]),l.data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,l,h,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(l=this.items[s].item.offset()[a],h=!1,e[u]-l>this.items[s][r]/2&&(h=!0),n>Math.abs(e[u]-l)&&(n=Math.abs(e[u]-l),o=this.items[s],this.direction=h?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))
},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],l=r&&n.collapsible,h=l?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:l?t():a,newPanel:h};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=l?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=h&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var d=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var l=n[s]("widget");t.data(l[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(l[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(d,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)
},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var p;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,l,h,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,h/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),p===n&&(p=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),a(h.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==n.dateFormat&&void 0===n.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,l,h,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),l=t.datepicker._checkOffset(s,l,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),s.inline||(h=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?s.dpDiv.show(h,t.datepicker._get(s,"showOptions"),c):s.dpDiv[h||"show"](h?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))}},_updateDatepicker:function(e){this.maxRows=4,p=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(l).match(o);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(l,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],l+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>l&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return l(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||l("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":r+=parseInt(h[1],10);break;case"w":case"W":r+=7*parseInt(h[1],10);break;case"m":case"M":a+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}h=l.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,T,I,P,M,S,N,H,z,A,O,E,W,F,L,R=new Date,Y=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),B=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),X=this._get(t,"stepMonths"),$=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-X,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+X,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:Y,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",h=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(B?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),T=" ui-corner-all",I="",$){if(I+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:I+=" ui-datepicker-group-first",T=" ui-corner-"+(B?"right":"left");
break;case U[1]-1:I+=" ui-datepicker-group-last",T=" ui-corner-"+(B?"left":"right");break;default:I+=" ui-datepicker-group-middle",T=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===k?B?o:s:"")+(/all|right/.test(T)&&0===k?B?s:o:"")+this._generateMonthYearHeader(t,Z,te,J,Q,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(I+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),N=(this._getFirstDayOfMonth(te,Z)-c+7)%7,H=Math.ceil((N+S)/7),z=$?this.maxRows>H?this.maxRows:H:H,this.maxRows=z,A=this._daylightSavingAdjust(new Date(te,Z,1-N)),O=0;z>O;O++){for(I+="<tr>",E=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)W=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!W[0]||J&&J>A||Q&&A>Q,E+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+W[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!W[2]?"":" title='"+W[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===Y.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);I+=E+"</tr>"}Z++,Z>11&&(Z=0,te++),I+="</tbody></table>"+($?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=I}y+=x}return y+=h,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=s.getMonth())&&(!h||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),l=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(l>=0?"+":"")+l,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)
},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,l,h,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),l=t(s).closest("li"),h=l.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=l.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),h&&l.data("ui-tabs-aria-controls",h),l.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,l=r?t():this._getPanelForTab(o),h=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:h,newTab:r?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},l=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),l(n,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){h.of=t,a.is(":hidden")||a.position(h)}var o,a,r,l,h=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),l=t("<div>").html(a.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(h.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]
}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip;var f="ui-effects-",g="ui-effects-style",m="ui-effects-animated",_=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,o){var a,r=o.re.exec(i),l=r&&o.parse(r),h=o.space||"rgba";return l?(a=s[h](l),s[c[h].cache]=a[c[h].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,a,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,l],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),o=c[n],a=0===this.alpha()?h("transparent"):this,r=a[o.cache]||o.to(a._rgba),l=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],h=s[o],c=u[n.type]||{};null!==h&&(null===a?l[o]=h:(c.mod&&(h-a>c.mod/2?a+=c.mod:a-h>c.mod/2&&(a-=c.mod)),l[o]=i((h-a)*e+a,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),l=Math.min(s,n,o),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-o)/h+360:n===r?60*(o-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[a]&&(this[a]=l(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[a]=d,n):h(d)},f(o,function(e,i){h.fn[e]||(h.fn[e]=function(n){var o,a=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=h(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(_),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(_.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var l=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",h=l.children?a.find("*").addBack():a;h=h.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),h=h.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(m)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(f+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(f+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(g,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(g)||"",t.removeData(g)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(f+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=f+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(m),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(l)&&l.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[h](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===h:"show"===h)?(r[h](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",l=s.complete,h=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,h)||o;i.data(m,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?h?this[h](s.duration,l):this.each(function(){l&&l.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,l=o?a.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var v=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},l=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),l&&l.css(t.effects.clipToBox(r)),r.clip=a),l&&l.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,l="hide"===r,h="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(h||l?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),h&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),l&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=l?2*u:u/2;l&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,l=r||"horizontal"===a,h=r||"vertical"===a;s=o.cssClip(),n.clip={top:h?(s.bottom-s.top)/2:s.top,right:l?(s.right-s.left)/2:s.right,bottom:h?(s.bottom-s.top)/2:s.bottom,left:l?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r?"-=":"+=",c="+="===h?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,u[l]=h+s,a&&(n.css(u),u[l]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(l=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,h=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?h*_:0),top:l+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:h*_),top:l+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,l=/([0-9]+)%/.exec(r),h=!!e.horizFirst,c=h?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;l&&(r=parseInt(l[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,l,n.from.y,_),v=t.effects.setTransition(a,l,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,h,n.from.x,_),v=t.effects.setTransition(a,h,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(l=l.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,l,n.from.y,o),a=t.effects.setTransition(i,l,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,h,n.from.x,o),a=t.effects.setTransition(i,h,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,l=2*(e.times||5)+(r?1:0),h=e.duration/l,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);l>u;u++)s.animate({opacity:c},h,e.easing),c=1-c;s.animate({opacity:c},h,e.easing),s.queue(i),t.effects.unshift(s,d,l+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,l=2*r+1,h=Math.round(e.duration/l),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,h,e.easing);r>s;s++)n.animate(p,h,e.easing).animate(f,h,e.easing);n.animate(p,h,e.easing).animate(d,h/2,e.easing).queue(i),t.effects.unshift(n,g,l+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u=e.distance||o["top"===h?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[h],d[h]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[l][1]]=d.clip[a[l][0]],"show"===r&&(o.cssClip(d.clip),o.css(h,d[h]),d.clip=s,d[h]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var v;t.uiBackCompat!==!1&&(v=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)}))});
;function jFormsJQControlAutocomplete(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.minLength=-1;this.maxLength=-1;this.regexp=null;this.readOnly=false
this.pathJson='';this.nbMaxItemShow=10;};jFormsJQControlAutocomplete.prototype.check=function(val,jfrm){if(this.minLength!=-1&&val.length<this.minLength)return false;if(this.maxLength!=-1&&val.length>this.maxLength)return false;if(this.regexp&&!this.regexp.test(val))return false;return true};function jforms_autocomplete(control,config){var _start=function(){if(control.pathJson!==''){jQuery('#'+control.formName+'_'+control.name).each(function(){var el=$(this);var el_section=el.parents('.jforms-section');var data_ajax={};jQuery.each(el.data(),function(key,value){if(typeof(value)==='string'){data_ajax[key]=value;}});el.autocomplete({source:function(request,response){data_ajax['s']=request.term;data_ajax['n']=control.nbMaxItemShow;data_ajax['entityname']=el.data('entityname');jQuery.ajax({url:control.pathJson,dataType:"json",data:data_ajax,success:function(data){response(jQuery.map(data,function(item){return item;}));}});},select:function(event,ui){var elemCp,elemPays='';if(el.data('entityname')){elemCp=jQuery('input[data-fieldname="CodePostal"][data-entityname="'+el.data('entityname')+'"]',el_section);elemPays=jQuery('input[data-fieldname="Pays"][data-entityname="'+el.data('entityname')+'"]',el_section);}
if(elemCp.length==0){elemCp=jQuery('input[name^="code_postal"]',el_section);}
if(elemPays.length==0){elemPays=jQuery('input[name^="pays"]',el_section);}
if(elemCp!=''&&elemCp.val()==''){elemCp.val(ui.item.datas.codepostal);}
if(elemPays!=''&&elemPays.val()==''){elemPays.val(ui.item.datas.pays);}},minLength:2,delay:500});});}};jQuery(document).ready(function(){_start()})};(function($){$.widget('ui.tagit',{options:{allowDuplicates:false,caseSensitive:true,fieldName:'tags',placeholderText:null,readOnly:false,removeConfirmation:false,tagLimit:null,availableTags:[],autocomplete:{},showAutocompleteOnFocus:false,allowSpaces:false,singleField:false,singleFieldDelimiter:',',singleFieldNode:null,animate:true,tabIndex:null,beforeTagAdded:null,afterTagAdded:null,beforeTagRemoved:null,afterTagRemoved:null,onTagClicked:null,onTagLimitExceeded:null,requireAutocomplete:false,onTagAdded:null,onTagRemoved:null,tagSource:null},_create:function(){var that=this;if(this.element.is('input')){this.tagList=$('<ul></ul>').insertAfter(this.element);this.options.singleField=true;this.options.singleFieldNode=this.element;this.element.addClass('tagit-hidden-field');}else{this.tagList=this.element.find('ul, ol').andSelf().last();}
this.tagInput=$('<input type="text" />').addClass('ui-widget-content');if(this.options.readOnly)this.tagInput.attr('disabled','disabled');if(this.options.tabIndex){this.tagInput.attr('tabindex',this.options.tabIndex);}
if(this.options.placeholderText){this.tagInput.attr('placeholder',this.options.placeholderText);}
if(!this.options.autocomplete.source){this.options.autocomplete.source=function(search,showChoices){var filter=search.term.toLowerCase();var choices=$.grep(this.options.availableTags,function(element){return(element.toLowerCase().indexOf(filter)===0);});if(!this.options.allowDuplicates){choices=this._subtractArray(choices,this.assignedTags());}
showChoices(choices);};}
if(this.options.showAutocompleteOnFocus){this.tagInput.focus(function(event,ui){that._showAutocomplete();});if(typeof this.options.autocomplete.minLength==='undefined'){this.options.autocomplete.minLength=0;}}
if($.isFunction(this.options.autocomplete.source)){this.options.autocomplete.source=$.proxy(this.options.autocomplete.source,this);}
if($.isFunction(this.options.tagSource)){this.options.tagSource=$.proxy(this.options.tagSource,this);}
this.tagList.addClass('tagit').addClass('ui-widget ui-widget-content ui-corner-all').append($('<li class="tagit-new"></li>').append(this.tagInput)).click(function(e){var target=$(e.target);if(target.hasClass('tagit-label')){var tag=target.closest('.tagit-choice');if(!tag.hasClass('removed')){that._trigger('onTagClicked',e,{tag:tag,tagLabel:that.tagLabel(tag)});}}else{that.tagInput.focus();}});var addedExistingFromSingleFieldNode=false;if(this.options.singleField){if(this.options.singleFieldNode){var node=$(this.options.singleFieldNode);var tags=node.val().split(this.options.singleFieldDelimiter);node.val('');$.each(tags,function(index,tag){that.createTag(tag,null,true);addedExistingFromSingleFieldNode=true;});}else{this.options.singleFieldNode=$('<input type="hidden" style="display:none;" value="" name="'+this.options.fieldName+'" />');this.tagList.after(this.options.singleFieldNode);}}
if(!addedExistingFromSingleFieldNode){this.tagList.children('li').each(function(){if(!$(this).hasClass('tagit-new')){that.createTag($(this).text(),$(this).attr('class'),true);$(this).remove();}});}
this.tagInput.keydown(function(event){if(event.which==$.ui.keyCode.BACKSPACE&&that.tagInput.val()===''){var tag=that._lastTag();if(!that.options.removeConfirmation||tag.hasClass('remove')){that.removeTag(tag);}else if(that.options.removeConfirmation){tag.addClass('remove ui-state-highlight');}}else if(that.options.removeConfirmation){that._lastTag().removeClass('remove ui-state-highlight');}
if(that.options.requireAutocomplete!==true){if((event.which===$.ui.keyCode.COMMA&&event.shiftKey===false)||event.which===$.ui.keyCode.ENTER||(event.which==$.ui.keyCode.TAB&&that.tagInput.val()!=='')||(event.which==$.ui.keyCode.SPACE&&that.options.allowSpaces!==true&&($.trim(that.tagInput.val()).replace(/^s*/,'').charAt(0)!='"'||($.trim(that.tagInput.val()).charAt(0)=='"'&&$.trim(that.tagInput.val()).charAt($.trim(that.tagInput.val()).length-1)=='"'&&$.trim(that.tagInput.val()).length-1!==0)))){if(!(event.which===$.ui.keyCode.ENTER&&that.tagInput.val()==='')){event.preventDefault();}
if(!(that.options.autocomplete.autoFocus&&that.tagInput.data('autocomplete-open'))){that.tagInput.autocomplete('close');that.createTag(that._cleanedInput());}}}});this.tagInput.blur(function(e){if(that.options.requireAutocomplete!==true){if(!that.tagInput.data('autocomplete-open')){that.createTag(that._cleanedInput());}}
else{that.tagInput.val('');}});if(this.options.availableTags||this.options.tagSource||this.options.autocomplete.source){var autocompleteOptions={select:function(event,ui){that.createTag(ui.item.value);return false;}};$.extend(autocompleteOptions,this.options.autocomplete);autocompleteOptions.source=this.options.tagSource||autocompleteOptions.source;this.tagInput.autocomplete(autocompleteOptions).bind('autocompleteopen.tagit',function(event,ui){that.tagInput.data('autocomplete-open',true);}).bind('autocompleteclose.tagit',function(event,ui){that.tagInput.data('autocomplete-open',false)});this.tagInput.autocomplete('widget').addClass('tagit-autocomplete');}},destroy:function(){$.Widget.prototype.destroy.call(this);this.element.unbind('.tagit');this.tagList.unbind('.tagit');this.tagInput.removeData('autocomplete-open');this.tagList.removeClass(['tagit','ui-widget','ui-widget-content','ui-corner-all','tagit-hidden-field'].join(' '));if(this.element.is('input')){this.element.removeClass('tagit-hidden-field');this.tagList.remove();}else{this.element.children('li').each(function(){if($(this).hasClass('tagit-new')){$(this).remove();}else{$(this).removeClass(['tagit-choice','ui-widget-content','ui-state-default','ui-state-highlight','ui-corner-all','remove','tagit-choice-editable','tagit-choice-read-only'].join(' '));$(this).text($(this).children('.tagit-label').text());}});if(this.singleFieldNode){this.singleFieldNode.remove();}}
return this;},_cleanedInput:function(){return $.trim(this.tagInput.val().replace(/^"(.*)"$/,'$1'));},_lastTag:function(){return this.tagList.find('.tagit-choice:last:not(.removed)');},_tags:function(){return this.tagList.find('.tagit-choice:not(.removed)');},assignedTags:function(){var that=this;var tags=[];if(this.options.singleField){tags=$(this.options.singleFieldNode).val().split(this.options.singleFieldDelimiter);if(tags[0]===''){tags=[];}}else{this._tags().each(function(){tags.push(that.tagLabel(this));});}
return tags;},_updateSingleTagsField:function(tags){$(this.options.singleFieldNode).val(tags.join(this.options.singleFieldDelimiter)).trigger('change');},_subtractArray:function(a1,a2){var result=[];for(var i=0;i<a1.length;i++){if($.inArray(a1[i],a2)==-1){result.push(a1[i]);}}
return result;},tagLabel:function(tag){if(this.options.singleField){return $(tag).find('.tagit-label:first').text();}else{return $(tag).find('input:first').val();}},_showAutocomplete:function(){this.tagInput.autocomplete('search','');},_findTagByLabel:function(name){var that=this;var tag=null;this._tags().each(function(i){if(that._formatStr(name)==that._formatStr(that.tagLabel(this))){tag=$(this);return false;}});return tag;},_isNew:function(name){return!this._findTagByLabel(name);},_formatStr:function(str){if(this.options.caseSensitive){return str;}
return $.trim(str.toLowerCase());},_effectExists:function(name){return Boolean($.effects&&($.effects[name]||($.effects.effect&&$.effects.effect[name])));},createTag:function(value,additionalClass,duringInitialization){var that=this;value=$.trim(value);if(this.options.preprocessTag){value=this.options.preprocessTag(value);}
if(value===''){return false;}
if(!this.options.allowDuplicates&&!this._isNew(value)){var existingTag=this._findTagByLabel(value);if(this._trigger('onTagExists',null,{existingTag:existingTag,duringInitialization:duringInitialization})!==false){if(this._effectExists('highlight')){existingTag.effect('highlight');}}
return false;}
if(this.options.tagLimit&&this._tags().length>=this.options.tagLimit){this._trigger('onTagLimitExceeded',null,{duringInitialization:duringInitialization});return false;}
var label=$(this.options.onTagClicked?'<a class="tagit-label"></a>':'<span class="tagit-label"></span>').text(value);var tag=$('<li></li>').addClass('tagit-choice ui-widget-content ui-state-default ui-corner-all').addClass(additionalClass).append(label);if(this.options.readOnly){tag.addClass('tagit-choice-read-only');}else{tag.addClass('tagit-choice-editable');var removeTagIcon=$('<span></span>').addClass('ui-icon ui-icon-close');var removeTag=$('<a><span class="text-icon">\xd7</span></a>').addClass('tagit-close').append(removeTagIcon).click(function(e){that.removeTag(tag);});tag.append(removeTag);}
if(!this.options.singleField){var escapedValue=label.html();tag.append('<input type="hidden" value="'+escapedValue+'" name="'+this.options.fieldName+'" class="tagit-hidden-field" />');}
if(this._trigger('beforeTagAdded',null,{tag:tag,tagLabel:this.tagLabel(tag),duringInitialization:duringInitialization})===false){return;}
if(this.options.singleField){var tags=this.assignedTags();tags.push(value);this._updateSingleTagsField(tags);}
this._trigger('onTagAdded',null,tag);this.tagInput.val('');this.tagInput.parent().before(tag);this._trigger('afterTagAdded',null,{tag:tag,tagLabel:this.tagLabel(tag),duringInitialization:duringInitialization,tags:this._tags(),tagLimit:this.options.tagLimit});if(this.options.showAutocompleteOnFocus&&!duringInitialization){setTimeout(function(){that._showAutocomplete();},0);}},removeTag:function(tag,animate){animate=typeof animate==='undefined'?this.options.animate:animate;tag=$(tag);this._trigger('onTagRemoved',null,tag);if(this._trigger('beforeTagRemoved',null,{tag:tag,tagLabel:this.tagLabel(tag)})===false){return;}
if(this.options.singleField){var tags=this.assignedTags();var removedTagLabel=this.tagLabel(tag);tags=$.grep(tags,function(el){return el!=removedTagLabel;});this._updateSingleTagsField(tags);}
if(animate){tag.addClass('removed');var hide_args=this._effectExists('blind')?['blind',{direction:'horizontal'},'fast']:['fast'];var thisTag=this;hide_args.push(function(){tag.remove();thisTag._trigger('afterTagRemoved',null,{tag:tag,tagLabel:thisTag.tagLabel(tag),tags:thisTag._tags(),tagLimit:thisTag.options.tagLimit});});tag.fadeOut('fast').hide.apply(tag,hide_args).dequeue();}else{tag.remove();this._trigger('afterTagRemoved',null,{tag:tag,tagLabel:this.tagLabel(tag),tags:this._tags(),tagLimit:this.options.tagLimit});}},removeTagByLabel:function(tagLabel,animate){var toRemove=this._findTagByLabel(tagLabel);if(!toRemove){throw"No such tag exists with the name '"+tagLabel+"'";}
this.removeTag(toRemove,animate);},removeAll:function(){var that=this;this._tags().each(function(index,tag){that.removeTag(tag,false);});}});})(jQuery);;
/*! Magnific Popup - v1.1.0 - 2016-02-20
 * http://dimsemenov.com/plugins/magnific-popup/
 * Copyright (c) 2016 Dmitry Semenov; */
;(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){factory(require('jquery'));}else{factory(window.jQuery||window.Zepto);}}(function($){var CLOSE_EVENT='Close',BEFORE_CLOSE_EVENT='BeforeClose',AFTER_CLOSE_EVENT='AfterClose',BEFORE_APPEND_EVENT='BeforeAppend',MARKUP_PARSE_EVENT='MarkupParse',OPEN_EVENT='Open',CHANGE_EVENT='Change',NS='mfp',EVENT_NS='.'+NS,READY_CLASS='mfp-ready',REMOVING_CLASS='mfp-removing',PREVENT_CLOSE_CLASS='mfp-prevent-close';var mfp,MagnificPopup=function(){},_isJQ=!!(window.jQuery),_prevStatus,_window=$(window),_document,_prevContentType,_wrapClasses,_currPopupType;var _mfpOn=function(name,f){mfp.ev.on(NS+name+EVENT_NS,f);},_getEl=function(className,appendTo,html,raw){var el=document.createElement('div');el.className='mfp-'+className;if(html){el.innerHTML=html;}
if(!raw){el=$(el);if(appendTo){el.appendTo(appendTo);}}else if(appendTo){appendTo.appendChild(el);}
return el;},_mfpTrigger=function(e,data){mfp.ev.triggerHandler(NS+e,data);if(mfp.st.callbacks){e=e.charAt(0).toLowerCase()+e.slice(1);if(mfp.st.callbacks[e]){mfp.st.callbacks[e].apply(mfp,$.isArray(data)?data:[data]);}}},_getCloseBtn=function(type){if(type!==_currPopupType||!mfp.currTemplate.closeBtn){mfp.currTemplate.closeBtn=$(mfp.st.closeMarkup.replace('%title%',mfp.st.tClose));_currPopupType=type;}
return mfp.currTemplate.closeBtn;},_checkInstance=function(){if(!$.magnificPopup.instance){mfp=new MagnificPopup();mfp.init();$.magnificPopup.instance=mfp;}},supportsTransitions=function(){var s=document.createElement('p').style,v=['ms','O','Moz','Webkit'];if(s['transition']!==undefined){return true;}
while(v.length){if(v.pop()+'Transition'in s){return true;}}
return false;};MagnificPopup.prototype={constructor:MagnificPopup,init:function(){var appVersion=navigator.appVersion;mfp.isLowIE=mfp.isIE8=document.all&&!document.addEventListener;mfp.isAndroid=(/android/gi).test(appVersion);mfp.isIOS=(/iphone|ipad|ipod/gi).test(appVersion);mfp.supportsTransition=supportsTransitions();mfp.probablyMobile=(mfp.isAndroid||mfp.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent));_document=$(document);mfp.popupsCache={};},open:function(data){var i;if(data.isObj===false){mfp.items=data.items.toArray();mfp.index=0;var items=data.items,item;for(i=0;i<items.length;i++){item=items[i];if(item.parsed){item=item.el[0];}
if(item===data.el[0]){mfp.index=i;break;}}}else{mfp.items=$.isArray(data.items)?data.items:[data.items];mfp.index=data.index||0;}
if(mfp.isOpen){mfp.updateItemHTML();return;}
mfp.types=[];_wrapClasses='';if(data.mainEl&&data.mainEl.length){mfp.ev=data.mainEl.eq(0);}else{mfp.ev=_document;}
if(data.key){if(!mfp.popupsCache[data.key]){mfp.popupsCache[data.key]={};}
mfp.currTemplate=mfp.popupsCache[data.key];}else{mfp.currTemplate={};}
mfp.st=$.extend(true,{},$.magnificPopup.defaults,data);mfp.fixedContentPos=mfp.st.fixedContentPos==='auto'?!mfp.probablyMobile:mfp.st.fixedContentPos;if(mfp.st.modal){mfp.st.closeOnContentClick=false;mfp.st.closeOnBgClick=false;mfp.st.showCloseBtn=false;mfp.st.enableEscapeKey=false;}
if(!mfp.bgOverlay){mfp.bgOverlay=_getEl('bg').on('click'+EVENT_NS,function(){mfp.close();});mfp.wrap=_getEl('wrap').attr('tabindex',-1).on('click'+EVENT_NS,function(e){if(mfp._checkIfClose(e.target)){mfp.close();}});mfp.container=_getEl('container',mfp.wrap);}
mfp.contentContainer=_getEl('content');if(mfp.st.preloader){mfp.preloader=_getEl('preloader',mfp.container,mfp.st.tLoading);}
var modules=$.magnificPopup.modules;for(i=0;i<modules.length;i++){var n=modules[i];n=n.charAt(0).toUpperCase()+n.slice(1);mfp['init'+n].call(mfp);}
_mfpTrigger('BeforeOpen');if(mfp.st.showCloseBtn){if(!mfp.st.closeBtnInside){mfp.wrap.append(_getCloseBtn());}else{_mfpOn(MARKUP_PARSE_EVENT,function(e,template,values,item){values.close_replaceWith=_getCloseBtn(item.type);});_wrapClasses+=' mfp-close-btn-in';}}
if(mfp.st.alignTop){_wrapClasses+=' mfp-align-top';}
if(mfp.fixedContentPos){mfp.wrap.css({overflow:mfp.st.overflowY,overflowX:'hidden',overflowY:mfp.st.overflowY});}else{mfp.wrap.css({top:_window.scrollTop(),position:'absolute'});}
if(mfp.st.fixedBgPos===false||(mfp.st.fixedBgPos==='auto'&&!mfp.fixedContentPos)){mfp.bgOverlay.css({height:_document.height(),position:'absolute'});}
if(mfp.st.enableEscapeKey){_document.on('keyup'+EVENT_NS,function(e){if(e.keyCode===27){mfp.close();}});}
_window.on('resize'+EVENT_NS,function(){mfp.updateSize();});if(!mfp.st.closeOnContentClick){_wrapClasses+=' mfp-auto-cursor';}
if(_wrapClasses)
mfp.wrap.addClass(_wrapClasses);var windowHeight=mfp.wH=_window.height();var windowStyles={};if(mfp.fixedContentPos){if(mfp._hasScrollBar(windowHeight)){var s=mfp._getScrollbarSize();if(s){windowStyles.marginRight=s;}}}
if(mfp.fixedContentPos){if(!mfp.isIE7){windowStyles.overflow='hidden';}else{$('body, html').css('overflow','hidden');}}
var classesToadd=mfp.st.mainClass;if(mfp.isIE7){classesToadd+=' mfp-ie7';}
if(classesToadd){mfp._addClassToMFP(classesToadd);}
mfp.updateItemHTML();_mfpTrigger('BuildControls');$('html').css(windowStyles);mfp.bgOverlay.add(mfp.wrap).prependTo(mfp.st.prependTo||$(document.body));mfp._lastFocusedEl=document.activeElement;setTimeout(function(){if(mfp.content){mfp._addClassToMFP(READY_CLASS);mfp._setFocus();}else{mfp.bgOverlay.addClass(READY_CLASS);}
_document.on('focusin'+EVENT_NS,mfp._onFocusIn);},16);mfp.isOpen=true;mfp.updateSize(windowHeight);_mfpTrigger(OPEN_EVENT);return data;},close:function(){if(!mfp.isOpen)return;_mfpTrigger(BEFORE_CLOSE_EVENT);mfp.isOpen=false;if(mfp.st.removalDelay&&!mfp.isLowIE&&mfp.supportsTransition){mfp._addClassToMFP(REMOVING_CLASS);setTimeout(function(){mfp._close();},mfp.st.removalDelay);}else{mfp._close();}},_close:function(){_mfpTrigger(CLOSE_EVENT);var classesToRemove=REMOVING_CLASS+' '+READY_CLASS+' ';mfp.bgOverlay.detach();mfp.wrap.detach();mfp.container.empty();if(mfp.st.mainClass){classesToRemove+=mfp.st.mainClass+' ';}
mfp._removeClassFromMFP(classesToRemove);if(mfp.fixedContentPos){var windowStyles={marginRight:''};if(mfp.isIE7){$('body, html').css('overflow','');}else{windowStyles.overflow='';}
$('html').css(windowStyles);}
_document.off('keyup'+EVENT_NS+' focusin'+EVENT_NS);mfp.ev.off(EVENT_NS);mfp.wrap.attr('class','mfp-wrap').removeAttr('style');mfp.bgOverlay.attr('class','mfp-bg');mfp.container.attr('class','mfp-container');if(mfp.st.showCloseBtn&&(!mfp.st.closeBtnInside||mfp.currTemplate[mfp.currItem.type]===true)){if(mfp.currTemplate.closeBtn)
mfp.currTemplate.closeBtn.detach();}
if(mfp.st.autoFocusLast&&mfp._lastFocusedEl){$(mfp._lastFocusedEl).focus();}
mfp.currItem=null;mfp.content=null;mfp.currTemplate=null;mfp.prevHeight=0;_mfpTrigger(AFTER_CLOSE_EVENT);},updateSize:function(winHeight){if(mfp.isIOS){var zoomLevel=document.documentElement.clientWidth/window.innerWidth;var height=window.innerHeight*zoomLevel;mfp.wrap.css('height',height);mfp.wH=height;}else{mfp.wH=winHeight||_window.height();}
if(!mfp.fixedContentPos){mfp.wrap.css('height',mfp.wH);}
_mfpTrigger('Resize');},updateItemHTML:function(){var item=mfp.items[mfp.index];mfp.contentContainer.detach();if(mfp.content)
mfp.content.detach();if(!item.parsed){item=mfp.parseEl(mfp.index);}
var type=item.type;_mfpTrigger('BeforeChange',[mfp.currItem?mfp.currItem.type:'',type]);mfp.currItem=item;if(!mfp.currTemplate[type]){var markup=mfp.st[type]?mfp.st[type].markup:false;_mfpTrigger('FirstMarkupParse',markup);if(markup){mfp.currTemplate[type]=$(markup);}else{mfp.currTemplate[type]=true;}}
if(_prevContentType&&_prevContentType!==item.type){mfp.container.removeClass('mfp-'+_prevContentType+'-holder');}
var newContent=mfp['get'+type.charAt(0).toUpperCase()+type.slice(1)](item,mfp.currTemplate[type]);mfp.appendContent(newContent,type);item.preloaded=true;_mfpTrigger(CHANGE_EVENT,item);_prevContentType=item.type;mfp.container.prepend(mfp.contentContainer);_mfpTrigger('AfterChange');},appendContent:function(newContent,type){mfp.content=newContent;if(newContent){if(mfp.st.showCloseBtn&&mfp.st.closeBtnInside&&mfp.currTemplate[type]===true){if(!mfp.content.find('.mfp-close').length){mfp.content.append(_getCloseBtn());}}else{mfp.content=newContent;}}else{mfp.content='';}
_mfpTrigger(BEFORE_APPEND_EVENT);mfp.container.addClass('mfp-'+type+'-holder');mfp.contentContainer.append(mfp.content);},parseEl:function(index){var item=mfp.items[index],type;if(item.tagName){item={el:$(item)};}else{type=item.type;item={data:item,src:item.src};}
if(item.el){var types=mfp.types;for(var i=0;i<types.length;i++){if(item.el.hasClass('mfp-'+types[i])){type=types[i];break;}}
item.src=item.el.attr('data-mfp-src');if(!item.src){item.src=item.el.attr('href');}}
item.type=type||mfp.st.type||'inline';item.index=index;item.parsed=true;mfp.items[index]=item;_mfpTrigger('ElementParse',item);return mfp.items[index];},addGroup:function(el,options){var eHandler=function(e){e.mfpEl=this;mfp._openClick(e,el,options);};if(!options){options={};}
var eName='click.magnificPopup';options.mainEl=el;if(options.items){options.isObj=true;el.off(eName).on(eName,eHandler);}else{options.isObj=false;if(options.delegate){el.off(eName).on(eName,options.delegate,eHandler);}else{options.items=el;el.off(eName).on(eName,eHandler);}}},_openClick:function(e,el,options){var midClick=options.midClick!==undefined?options.midClick:$.magnificPopup.defaults.midClick;if(!midClick&&(e.which===2||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){return;}
var disableOn=options.disableOn!==undefined?options.disableOn:$.magnificPopup.defaults.disableOn;if(disableOn){if($.isFunction(disableOn)){if(!disableOn.call(mfp)){return true;}}else{if(_window.width()<disableOn){return true;}}}
if(e.type){e.preventDefault();if(mfp.isOpen){e.stopPropagation();}}
options.el=$(e.mfpEl);if(options.delegate){options.items=el.find(options.delegate);}
mfp.open(options);},updateStatus:function(status,text){if(mfp.preloader){if(_prevStatus!==status){mfp.container.removeClass('mfp-s-'+_prevStatus);}
if(!text&&status==='loading'){text=mfp.st.tLoading;}
var data={status:status,text:text};_mfpTrigger('UpdateStatus',data);status=data.status;text=data.text;mfp.preloader.html(text);mfp.preloader.find('a').on('click',function(e){e.stopImmediatePropagation();});mfp.container.addClass('mfp-s-'+status);_prevStatus=status;}},_checkIfClose:function(target){if($(target).hasClass(PREVENT_CLOSE_CLASS)){return;}
var closeOnContent=mfp.st.closeOnContentClick;var closeOnBg=mfp.st.closeOnBgClick;if(closeOnContent&&closeOnBg){return true;}else{if(!mfp.content||$(target).hasClass('mfp-close')||(mfp.preloader&&target===mfp.preloader[0])){return true;}
if((target!==mfp.content[0]&&!$.contains(mfp.content[0],target))){if(closeOnBg){if($.contains(document,target)){return true;}}}else if(closeOnContent){return true;}}
return false;},_addClassToMFP:function(cName){mfp.bgOverlay.addClass(cName);mfp.wrap.addClass(cName);},_removeClassFromMFP:function(cName){this.bgOverlay.removeClass(cName);mfp.wrap.removeClass(cName);},_hasScrollBar:function(winHeight){return((mfp.isIE7?_document.height():document.body.scrollHeight)>(winHeight||_window.height()));},_setFocus:function(){(mfp.st.focus?mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).focus();},_onFocusIn:function(e){if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0],e.target)){mfp._setFocus();return false;}},_parseMarkup:function(template,values,item){var arr;if(item.data){values=$.extend(item.data,values);}
_mfpTrigger(MARKUP_PARSE_EVENT,[template,values,item]);$.each(values,function(key,value){if(value===undefined||value===false){return true;}
arr=key.split('_');if(arr.length>1){var el=template.find(EVENT_NS+'-'+arr[0]);if(el.length>0){var attr=arr[1];if(attr==='replaceWith'){if(el[0]!==value[0]){el.replaceWith(value);}}else if(attr==='img'){if(el.is('img')){el.attr('src',value);}else{el.replaceWith($('<img>').attr('src',value).attr('class',el.attr('class')));}}else{el.attr(arr[1],value);}}}else{template.find(EVENT_NS+'-'+key).html(value);}});},_getScrollbarSize:function(){if(mfp.scrollbarSize===undefined){var scrollDiv=document.createElement("div");scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';document.body.appendChild(scrollDiv);mfp.scrollbarSize=scrollDiv.offsetWidth-scrollDiv.clientWidth;document.body.removeChild(scrollDiv);}
return mfp.scrollbarSize;}};$.magnificPopup={instance:null,proto:MagnificPopup.prototype,modules:[],open:function(options,index){_checkInstance();if(!options){options={};}else{options=$.extend(true,{},options);}
options.isObj=true;options.index=index||0;return this.instance.open(options);},close:function(){return $.magnificPopup.instance&&$.magnificPopup.instance.close();},registerModule:function(name,module){if(module.options){$.magnificPopup.defaults[name]=module.options;}
$.extend(this.proto,module.proto);this.modules.push(name);},defaults:{disableOn:0,key:null,midClick:false,mainClass:'',preloader:true,focus:'',closeOnContentClick:false,closeOnBgClick:true,closeBtnInside:true,showCloseBtn:true,enableEscapeKey:true,modal:false,alignTop:false,removalDelay:0,prependTo:null,fixedContentPos:'auto',fixedBgPos:'auto',overflowY:'auto',closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:'Close (Esc)',tLoading:'Loading...',autoFocusLast:true}};$.fn.magnificPopup=function(options){_checkInstance();var jqEl=$(this);if(typeof options==="string"){if(options==='open'){var items,itemOpts=_isJQ?jqEl.data('magnificPopup'):jqEl[0].magnificPopup,index=parseInt(arguments[1],10)||0;if(itemOpts.items){items=itemOpts.items[index];}else{items=jqEl;if(itemOpts.delegate){items=items.find(itemOpts.delegate);}
items=items.eq(index);}
mfp._openClick({mfpEl:items},jqEl,itemOpts);}else{if(mfp.isOpen)
mfp[options].apply(mfp,Array.prototype.slice.call(arguments,1));}}else{options=$.extend(true,{},options);if(_isJQ){jqEl.data('magnificPopup',options);}else{jqEl[0].magnificPopup=options;}
mfp.addGroup(jqEl,options);}
return jqEl;};var INLINE_NS='inline',_hiddenClass,_inlinePlaceholder,_lastInlineElement,_putInlineElementsBack=function(){if(_lastInlineElement){_inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach();_lastInlineElement=null;}};$.magnificPopup.registerModule(INLINE_NS,{options:{hiddenClass:'hide',markup:'',tNotFound:'Content not found'},proto:{initInline:function(){mfp.types.push(INLINE_NS);_mfpOn(CLOSE_EVENT+'.'+INLINE_NS,function(){_putInlineElementsBack();});},getInline:function(item,template){_putInlineElementsBack();if(item.src){var inlineSt=mfp.st.inline,el=$(item.src);if(el.length){var parent=el[0].parentNode;if(parent&&parent.tagName){if(!_inlinePlaceholder){_hiddenClass=inlineSt.hiddenClass;_inlinePlaceholder=_getEl(_hiddenClass);_hiddenClass='mfp-'+_hiddenClass;}
_lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);}
mfp.updateStatus('ready');}else{mfp.updateStatus('error',inlineSt.tNotFound);el=$('<div>');}
item.inlineElement=el;return el;}
mfp.updateStatus('ready');mfp._parseMarkup(template,{},item);return template;}}});var AJAX_NS='ajax',_ajaxCur,_removeAjaxCursor=function(){if(_ajaxCur){$(document.body).removeClass(_ajaxCur);}},_destroyAjaxRequest=function(){_removeAjaxCursor();if(mfp.req){mfp.req.abort();}};$.magnificPopup.registerModule(AJAX_NS,{options:{settings:null,cursor:'mfp-ajax-cur',tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){mfp.types.push(AJAX_NS);_ajaxCur=mfp.st.ajax.cursor;_mfpOn(CLOSE_EVENT+'.'+AJAX_NS,_destroyAjaxRequest);_mfpOn('BeforeChange.'+AJAX_NS,_destroyAjaxRequest);},getAjax:function(item){if(_ajaxCur){$(document.body).addClass(_ajaxCur);}
mfp.updateStatus('loading');var opts=$.extend({url:item.src,success:function(data,textStatus,jqXHR){var temp={data:data,xhr:jqXHR};_mfpTrigger('ParseAjax',temp);mfp.appendContent($(temp.data),AJAX_NS);item.finished=true;_removeAjaxCursor();mfp._setFocus();setTimeout(function(){mfp.wrap.addClass(READY_CLASS);},16);mfp.updateStatus('ready');_mfpTrigger('AjaxContentAdded');},error:function(){_removeAjaxCursor();item.finished=item.loadError=true;mfp.updateStatus('error',mfp.st.ajax.tError.replace('%url%',item.src));}},mfp.st.ajax.settings);mfp.req=$.ajax(opts);return'';}}});var _imgInterval,_getTitle=function(item){if(item.data&&item.data.title!==undefined)
return item.data.title;var src=mfp.st.image.titleSrc;if(src){if($.isFunction(src)){return src.call(mfp,item);}else if(item.el){return item.el.attr(src)||'';}}
return'';};$.magnificPopup.registerModule('image',{options:{markup:'<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<figure>'+'<div class="mfp-img"></div>'+'<figcaption>'+'<div class="mfp-bottom-bar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'</div>'+'</figcaption>'+'</figure>'+'</div>',cursor:'mfp-zoom-out-cur',titleSrc:'title',verticalFit:true,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var imgSt=mfp.st.image,ns='.image';mfp.types.push('image');_mfpOn(OPEN_EVENT+ns,function(){if(mfp.currItem.type==='image'&&imgSt.cursor){$(document.body).addClass(imgSt.cursor);}});_mfpOn(CLOSE_EVENT+ns,function(){if(imgSt.cursor){$(document.body).removeClass(imgSt.cursor);}
_window.off('resize'+EVENT_NS);});_mfpOn('Resize'+ns,mfp.resizeImage);if(mfp.isLowIE){_mfpOn('AfterChange',mfp.resizeImage);}},resizeImage:function(){var item=mfp.currItem;if(!item||!item.img)return;if(mfp.st.image.verticalFit){var decr=0;if(mfp.isLowIE){decr=parseInt(item.img.css('padding-top'),10)+parseInt(item.img.css('padding-bottom'),10);}
item.img.css('max-height',mfp.wH-decr);}},_onImageHasSize:function(item){if(item.img){item.hasSize=true;if(_imgInterval){clearInterval(_imgInterval);}
item.isCheckingImgSize=false;_mfpTrigger('ImageHasSize',item);if(item.imgHidden){if(mfp.content)
mfp.content.removeClass('mfp-loading');item.imgHidden=false;}}},findImageSize:function(item){var counter=0,img=item.img[0],mfpSetInterval=function(delay){if(_imgInterval){clearInterval(_imgInterval);}
_imgInterval=setInterval(function(){if(img.naturalWidth>0){mfp._onImageHasSize(item);return;}
if(counter>200){clearInterval(_imgInterval);}
counter++;if(counter===3){mfpSetInterval(10);}else if(counter===40){mfpSetInterval(50);}else if(counter===100){mfpSetInterval(500);}},delay);};mfpSetInterval(1);},getImage:function(item,template){var guard=0,onLoadComplete=function(){if(item){if(item.img[0].complete){item.img.off('.mfploader');if(item===mfp.currItem){mfp._onImageHasSize(item);mfp.updateStatus('ready');}
item.hasSize=true;item.loaded=true;_mfpTrigger('ImageLoadComplete');}
else{guard++;if(guard<200){setTimeout(onLoadComplete,100);}else{onLoadError();}}}},onLoadError=function(){if(item){item.img.off('.mfploader');if(item===mfp.currItem){mfp._onImageHasSize(item);mfp.updateStatus('error',imgSt.tError.replace('%url%',item.src));}
item.hasSize=true;item.loaded=true;item.loadError=true;}},imgSt=mfp.st.image;var el=template.find('.mfp-img');if(el.length){var img=document.createElement('img');img.className='mfp-img';if(item.el&&item.el.find('img').length){img.alt=item.el.find('img').attr('alt');}
item.img=$(img).on('load.mfploader',onLoadComplete).on('error.mfploader',onLoadError);img.src=item.src;if(el.is('img')){item.img=item.img.clone();}
img=item.img[0];if(img.naturalWidth>0){item.hasSize=true;}else if(!img.width){item.hasSize=false;}}
mfp._parseMarkup(template,{title:_getTitle(item),img_replaceWith:item.img},item);mfp.resizeImage();if(item.hasSize){if(_imgInterval)clearInterval(_imgInterval);if(item.loadError){template.addClass('mfp-loading');mfp.updateStatus('error',imgSt.tError.replace('%url%',item.src));}else{template.removeClass('mfp-loading');mfp.updateStatus('ready');}
return template;}
mfp.updateStatus('loading');item.loading=true;if(!item.hasSize){item.imgHidden=true;template.addClass('mfp-loading');mfp.findImageSize(item);}
return template;}}});var hasMozTransform,getHasMozTransform=function(){if(hasMozTransform===undefined){hasMozTransform=document.createElement('p').style.MozTransform!==undefined;}
return hasMozTransform;};$.magnificPopup.registerModule('zoom',{options:{enabled:false,easing:'ease-in-out',duration:300,opener:function(element){return element.is('img')?element:element.find('img');}},proto:{initZoom:function(){var zoomSt=mfp.st.zoom,ns='.zoom',image;if(!zoomSt.enabled||!mfp.supportsTransition){return;}
var duration=zoomSt.duration,getElToAnimate=function(image){var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),transition='all '+(zoomSt.duration/1000)+'s '+zoomSt.easing,cssObj={position:'fixed',zIndex:9999,left:0,top:0,'-webkit-backface-visibility':'hidden'},t='transition';cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition;newImg.css(cssObj);return newImg;},showMainContent=function(){mfp.content.css('visibility','visible');},openTimeout,animatedImg;_mfpOn('BuildControls'+ns,function(){if(mfp._allowZoom()){clearTimeout(openTimeout);mfp.content.css('visibility','hidden');image=mfp._getItemToZoom();if(!image){showMainContent();return;}
animatedImg=getElToAnimate(image);animatedImg.css(mfp._getOffset());mfp.wrap.append(animatedImg);openTimeout=setTimeout(function(){animatedImg.css(mfp._getOffset(true));openTimeout=setTimeout(function(){showMainContent();setTimeout(function(){animatedImg.remove();image=animatedImg=null;_mfpTrigger('ZoomAnimationEnded');},16);},duration);},16);}});_mfpOn(BEFORE_CLOSE_EVENT+ns,function(){if(mfp._allowZoom()){clearTimeout(openTimeout);mfp.st.removalDelay=duration;if(!image){image=mfp._getItemToZoom();if(!image){return;}
animatedImg=getElToAnimate(image);}
animatedImg.css(mfp._getOffset(true));mfp.wrap.append(animatedImg);mfp.content.css('visibility','hidden');setTimeout(function(){animatedImg.css(mfp._getOffset());},16);}});_mfpOn(CLOSE_EVENT+ns,function(){if(mfp._allowZoom()){showMainContent();if(animatedImg){animatedImg.remove();}
image=null;}});},_allowZoom:function(){return mfp.currItem.type==='image';},_getItemToZoom:function(){if(mfp.currItem.hasSize){return mfp.currItem.img;}else{return false;}},_getOffset:function(isLarge){var el;if(isLarge){el=mfp.currItem.img;}else{el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem);}
var offset=el.offset();var paddingTop=parseInt(el.css('padding-top'),10);var paddingBottom=parseInt(el.css('padding-bottom'),10);offset.top-=($(window).scrollTop()-paddingTop);var obj={width:el.width(),height:(_isJQ?el.innerHeight():el[0].offsetHeight)-paddingBottom-paddingTop};if(getHasMozTransform()){obj['-moz-transform']=obj['transform']='translate('+offset.left+'px,'+offset.top+'px)';}else{obj.left=offset.left;obj.top=offset.top;}
return obj;}}});var IFRAME_NS='iframe',_emptyPage='//about:blank',_fixIframeBugs=function(isShowing){if(mfp.currTemplate[IFRAME_NS]){var el=mfp.currTemplate[IFRAME_NS].find('iframe');if(el.length){if(!isShowing){el[0].src=_emptyPage;}
if(mfp.isIE8){el.css('display',isShowing?'block':'none');}}}};$.magnificPopup.registerModule(IFRAME_NS,{options:{markup:'<div class="mfp-iframe-scaler">'+'<div class="mfp-close"></div>'+'<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+'</div>',srcAction:'iframe_src',patterns:{youtube:{index:'youtube.com',id:'v=',src:'//www.youtube.com/embed/%id%?autoplay=1'},vimeo:{index:'vimeo.com/',id:'/',src:'//player.vimeo.com/video/%id%?autoplay=1'},gmaps:{index:'//maps.google.',src:'%id%&output=embed'}}},proto:{initIframe:function(){mfp.types.push(IFRAME_NS);_mfpOn('BeforeChange',function(e,prevType,newType){if(prevType!==newType){if(prevType===IFRAME_NS){_fixIframeBugs();}else if(newType===IFRAME_NS){_fixIframeBugs(true);}}});_mfpOn(CLOSE_EVENT+'.'+IFRAME_NS,function(){_fixIframeBugs();});},getIframe:function(item,template){var embedSrc=item.src;var iframeSt=mfp.st.iframe;$.each(iframeSt.patterns,function(){if(embedSrc.indexOf(this.index)>-1){if(this.id){if(typeof this.id==='string'){embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length,embedSrc.length);}else{embedSrc=this.id.call(this,embedSrc);}}
embedSrc=this.src.replace('%id%',embedSrc);return false;}});var dataObj={};if(iframeSt.srcAction){dataObj[iframeSt.srcAction]=embedSrc;}
mfp._parseMarkup(template,dataObj,item);mfp.updateStatus('ready');return template;}}});var _getLoopedId=function(index){var numSlides=mfp.items.length;if(index>numSlides-1){return index-numSlides;}else if(index<0){return numSlides+index;}
return index;},_replaceCurrTotal=function(text,curr,total){return text.replace(/%curr%/gi,curr+1).replace(/%total%/gi,total);};$.magnificPopup.registerModule('gallery',{options:{enabled:false,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:true,arrows:true,tPrev:'Previous (Left arrow key)',tNext:'Next (Right arrow key)',tCounter:'%curr% of %total%'},proto:{initGallery:function(){var gSt=mfp.st.gallery,ns='.mfp-gallery';mfp.direction=true;if(!gSt||!gSt.enabled)return false;_wrapClasses+=' mfp-gallery';_mfpOn(OPEN_EVENT+ns,function(){if(gSt.navigateByImgClick){mfp.wrap.on('click'+ns,'.mfp-img',function(){if(mfp.items.length>1){mfp.next();return false;}});}
_document.on('keydown'+ns,function(e){if(e.keyCode===37){mfp.prev();}else if(e.keyCode===39){mfp.next();}});});_mfpOn('UpdateStatus'+ns,function(e,data){if(data.text){data.text=_replaceCurrTotal(data.text,mfp.currItem.index,mfp.items.length);}});_mfpOn(MARKUP_PARSE_EVENT+ns,function(e,element,values,item){var l=mfp.items.length;values.counter=l>1?_replaceCurrTotal(gSt.tCounter,item.index,l):'';});_mfpOn('BuildControls'+ns,function(){if(mfp.items.length>1&&gSt.arrows&&!mfp.arrowLeft){var markup=gSt.arrowMarkup,arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi,gSt.tPrev).replace(/%dir%/gi,'left')).addClass(PREVENT_CLOSE_CLASS),arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi,gSt.tNext).replace(/%dir%/gi,'right')).addClass(PREVENT_CLOSE_CLASS);arrowLeft.click(function(){mfp.prev();});arrowRight.click(function(){mfp.next();});mfp.container.append(arrowLeft.add(arrowRight));}});_mfpOn(CHANGE_EVENT+ns,function(){if(mfp._preloadTimeout)clearTimeout(mfp._preloadTimeout);mfp._preloadTimeout=setTimeout(function(){mfp.preloadNearbyImages();mfp._preloadTimeout=null;},16);});_mfpOn(CLOSE_EVENT+ns,function(){_document.off(ns);mfp.wrap.off('click'+ns);mfp.arrowRight=mfp.arrowLeft=null;});},next:function(){mfp.direction=true;mfp.index=_getLoopedId(mfp.index+1);mfp.updateItemHTML();},prev:function(){mfp.direction=false;mfp.index=_getLoopedId(mfp.index-1);mfp.updateItemHTML();},goTo:function(newIndex){mfp.direction=(newIndex>=mfp.index);mfp.index=newIndex;mfp.updateItemHTML();},preloadNearbyImages:function(){var p=mfp.st.gallery.preload,preloadBefore=Math.min(p[0],mfp.items.length),preloadAfter=Math.min(p[1],mfp.items.length),i;for(i=1;i<=(mfp.direction?preloadAfter:preloadBefore);i++){mfp._preloadItem(mfp.index+i);}
for(i=1;i<=(mfp.direction?preloadBefore:preloadAfter);i++){mfp._preloadItem(mfp.index-i);}},_preloadItem:function(index){index=_getLoopedId(index);if(mfp.items[index].preloaded){return;}
var item=mfp.items[index];if(!item.parsed){item=mfp.parseEl(index);}
_mfpTrigger('LazyLoad',item);if(item.type==='image'){item.img=$('<img class="mfp-img" />').on('load.mfploader',function(){item.hasSize=true;}).on('error.mfploader',function(){item.hasSize=true;item.loadError=true;_mfpTrigger('LazyLoadError',item);}).attr('src',item.src);}
item.preloaded=true;}}});var RETINA_NS='retina';$.magnificPopup.registerModule(RETINA_NS,{options:{replaceSrc:function(item){return item.src.replace(/\.\w+$/,function(m){return'@2x'+m;});},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var st=mfp.st.retina,ratio=st.ratio;ratio=!isNaN(ratio)?ratio:ratio();if(ratio>1){_mfpOn('ImageHasSize'+'.'+RETINA_NS,function(e,item){item.img.css({'max-width':item.img[0].naturalWidth/ratio,'width':'100%'});});_mfpOn('ElementParse'+'.'+RETINA_NS,function(e,item){item.src=st.replaceSrc(item,ratio);});}}}}});_checkInstance();}));;(function($){$.fn.enableForm=function(){var t=$(this);var form=jFormsJQ.getForm("jforms_webcontact_formbase");if(t.length>0){t.parent().show();t.removeAttr("disabled");if(t.hasClass('jforms-required')){var ctrls=form.controls;for(var i=0;i<ctrls.length;i++){if(ctrls[i].name===$(this).attr("name")){form.controls[i].required=true;}}}}
return this;};$.fn.disableForm=function(){var t=$(this);var form=jFormsJQ.getForm("jforms_webcontact_formbase");if(t.length>0){t.parent().hide();t.attr("disabled","disabled");if(t.hasClass('jforms-required')){var ctrls=form.controls;for(var i=0;i<ctrls.length;i++){if(ctrls[i].name===$(this).attr("name")){form.controls[i].required=false;}}}}
return this;};$.fn.initWebContactForm=function(){var form=$(this);if(form.attr('id')!=='jforms_webcontact_formbase'){return this;}
var sections={};var next_page_container=$("#webcontact-next-page");var previous_page_container=$("#webcontact-previous-page");var tabsnav_container=$('#webcontact-tabsnav');var setSectionRepeatableDisabled=function(section_id){var enabled=[];for(var key in sections[section_id]){if($(sections[section_id][key][0],form).is(":hidden")){enabled.push(key);}}
$("#jforms_webcontact_formbase_repeat_"+section_id,form).val(enabled);};var addInputsBloc=function(section_id){var inputsBlocFound=false;var hiddenLeft=false;for(var key in sections[section_id]){if($(sections[section_id][key],form).is(":hidden")){if(!inputsBlocFound){for(var index in sections[section_id][key]){$(sections[section_id][key][index],form).enableForm();}
inputsBlocFound=true;}
else{hiddenLeft=true;}}}
setSectionRepeatableDisabled(section_id);return hiddenLeft;};var removeInputsBloc=function(section_id,bloc_id){var input=$("#add_"+section_id,form);for(var index in sections[section_id][bloc_id]){$(sections[section_id][bloc_id][index]).disableForm();if($(sections[section_id][bloc_id][index]).is(":input")){$(sections[section_id][bloc_id][index]).val("");}
input.parent().before($(sections[section_id][bloc_id][index]).parent());}
input.show();setSectionRepeatableDisabled(section_id);};var initSections=function(section,inputs){var re=/.*_([0-9]+)$/g;var hiddenSections=$("#jforms_webcontact_formbase_repeat_"+section.id,form).val().split(',');inputs.each(function(){var index=this.name.replace(re,"$1");if(isNaN(index)){return;}
if(typeof sections[section.id][index]==="undefined"||sections[section.id][index]===null){sections[section.id][index]=[];if(index>0){var linkId="remove-bloc-"+section.id+"_"+index;$(this).parent().before("<div class='jforms-container-field jforms-del-block'><a href='#' id='"+linkId+"'>"+section.attributes["data-btn-del"].value+"</a></div>");var removeLink=$("#"+linkId,section);if(hiddenSections.indexOf(index)!==-1){removeLink.parent().hide();}
removeLink.click(function(){removeInputsBloc(section.id,index);return false;});sections[section.id][index].push(removeLink);}}
sections[section.id][index].push(this);if(hiddenSections.indexOf(index)!==-1){$(this).disableForm();}});setSectionRepeatableDisabled(section.id);};$(".jforms-section",form).each(function(){var section=this;var repeatable=section.attributes['data-max-repeat'].value;if(repeatable>1){sections[section.id]={};var inputs=$(":input",section);initSections(section,inputs);var addLinkId="#add_"+section.id;$(addLinkId,section).click(function(){if(!addInputsBloc(section.id)){$(this).hide();}
return false;})}
if($(".jforms-container-field:visible",this).length===0){$(this).hide();}});var jform_page=$(".jforms-page",form);if(jform_page.length>1){var checkPageLinks=function(){form.trigger('loadPage');var etape=$("#webcontact-etape");var step_message=etape.attr("data-page");var nb_page=tabsnav_container.find('li').length;var tabsnav_active=tabsnav_container.find('.active');var cur_page=tabsnav_active.index()+1;if(typeof step_message!=='undefined'&&step_message!==null){step_message=step_message.replace("%1$s",cur_page);step_message=step_message.replace("%2$s",nb_page);etape.text(step_message);}
if(tabsnav_active.prev().length===0){previous_page_container.hide();}
else{previous_page_container.show();}
if(tabsnav_active.next().length===0){next_page_container.hide();$("#jforms_webcontact_formbase_submitbtn",form).show();}
else{next_page_container.show();$("#jforms_webcontact_formbase_submitbtn",form).hide();}
var page_id=tabsnav_active.find('a').attr("href");var polygonMap=$(page_id).find(".recherche-polygone").find(".choix_localisation_map");if(polygonMap.length>0){polygonMap.data('object').resized();}};jform_page.hide();jform_page.first().show();tabsnav_container.find('li:first').addClass('active');$('.webcontact-menu-tab').click(function(){tabsnav_container.find('li').removeClass('active');var currentTab=$(this).attr('href');tabsnav_container.find('li a[href="'+currentTab+'"]').parent().addClass('active');$(".jforms-page",form).hide();$(currentTab).show();checkPageLinks();$('html, body').animate({scrollTop:$(this).offset().top},'slow');return false;});previous_page_container.click(function(){var previousSibling=tabsnav_container.find('.active').prev();$('a',previousSibling).click();return false;});next_page_container.click(function(){var nextSibling=tabsnav_container.find('.active').next();$('a',nextSibling).click();return false;});checkPageLinks();}
var dateContainer=$('.jforms-container-field-date',form).find('input');var currentLang=$('html').attr('lang');var placeHolderLang={"day":["jj","dd"],"month":["mm","mm"],"year":["aaaa","yyyy"]};dateContainer.each(function(){var name=$(this).attr('name');var res=name.match(/\[([a-z]+)\]/);if(res!==null&&res.length>0){var val=placeHolderLang[res[1]];if(currentLang==="fr-FR"){$(this).attr('placeholder',val[0]);}else{$(this).attr('placeholder',val[1]);}}});form.trigger("charged");return this;}})(jQuery);;function addHandlerWebContact(jFormsJQ){var form=jFormsJQ.getForm("jforms_webcontact_formbase")
if(form){form.addSubmitHandler(function(ev){return cleanFormWebContact($('#jforms_webcontact_formbase'));});}}
function cleanFormWebContact(formElement){var fields=formElement.find("input.unused,select.unused,textarea.unused");fields.each(function(){$(this).val(null);});return true;}
$(document).ready(function(){var typeOperation=$('select[data-fieldname="TypeOperation"][data-entityname="Bien"],select[data-fieldname="TypeOperation"][data-entityname="Recherche"]');var typeBien=$('select[data-fieldname="TypeBien"][data-entityname="Bien"],select[data-fieldname="TypeBien"][data-entityname="Recherche"]');function empty(value){return(typeof value=="undefined"||value===0||value==""||value==null);}
function manageFieldRequirement(field,enable){if(enable){field.enableForm();field.removeClass('unused');}else{field.disableForm();field.addClass('unused');}
if(field.hasClass('jforms-required')&&field.prop("tagName")=="SELECT"){if(!enable){field.prepend("<option></option>");}else{var firstOption=field.find('option:first-child');if(firstOption.attr('value')==""){firstOption.remove();}}}}
function linkedFieldVisibilite(rootCheckField,field,defaultValue){var hasField=$('input[data-fieldname="'+rootCheckField+'"]');if(hasField.length==1){hasField.change(function(){var linkedField=$('[data-fieldname="'+field+'"]');if(linkedField.length==1){if($(this).is(":checked")){manageFieldRequirement(linkedField,true);if(!empty(defaultValue)){var valLinkedField=linkedField.val();if(empty(valLinkedField)){linkedField.val(defaultValue);}}}else{manageFieldRequirement(linkedField,false);}}});hasField.change();}}
function fieldVisibilite(fieldName,entiteName,show){var field;if(entiteName.match(/\|/)){var res=entiteName.split('|');var list_selector=new Array();for(index=0;index<res.length;++index){list_selector.push('[data-fieldname="'+fieldName+'"][data-entityname="'+res[index]+'"]');}
field=$(list_selector.join(', '));}else{field=$('[data-fieldname="'+fieldName+'"][data-entityname="'+entiteName+'"]');}
if(field.length==1){var section=field.parents(".jforms-section");if(show==true){$(section).show();}
manageFieldRequirement(field,show);if($(".jforms-container-field:visible",section).length==0&&section.parents(".jforms-page").is(":visible")){$(section).hide();}}}
function fieldUnbindEvent(fieldName,entiteName){var field=$('[data-fieldname="'+fieldName+'"][data-entityname="'+entiteName+'"]');field.unbind();}
if(typeOperation.length==1&&typeBien.length==1){typeOperation.change(function(){var operation=$(this).val();var availableViagerType=['Appartement','Maison','Divers'];typeBien.find("option").each(function(){if(availableViagerType.indexOf($(this).val())==-1&&operation=="Viager"){$(this).hide();}else if(operation!="Viager"){$(this).show();}});fieldVisibilite('Montant','Bien',true);fieldVisibilite('LoyerOccupant','Bien',false);fieldVisibilite('ChargesLocatives','Bien',false);fieldVisibilite('ChargesCopropriete','Bien',false);fieldVisibilite('TaxeFonciere','Bien',false);fieldVisibilite('LoyerOccupant','Bien',false);fieldVisibilite('ChargesLocatives','Bien',true);fieldVisibilite('TypeMandat','Bien',false);switch(operation){case'Vente':fieldVisibilite('ChargesLocatives','Bien',true);fieldVisibilite('ChargesCopropriete','Bien',true);fieldVisibilite('TaxeFonciere','Bien',true);fieldVisibilite('LoyerOccupant','Bien',true);fieldVisibilite('TypeMandat','Bien',true);break;case'Viager':fieldVisibilite('ChargesLocatives','Bien',false);fieldVisibilite('LoyerOccupant','Bien',true);if(!(availableViagerType.indexOf(typeBien.val())>=0)){typeBien.val('Appartement');}
break;}
typeBien.change();});typeOperation.change();function initLinkedField(){linkedFieldVisibilite("Cave","NbCaves",1);linkedFieldVisibilite("Terrasse","SurfaceTerrasse",null);linkedFieldVisibilite("Balcon","SurfaceBalcon",null);}
typeBien.change(function(){var nomTypeBien=$(this).val();fieldVisibilite('TypeFond','Bien|Recherche',false);fieldVisibilite('NbPieces','Bien|Recherche',true);fieldVisibilite('NbPiecesMaxi','Recherche',true);fieldVisibilite('NbChambres','Bien|Recherche',false);fieldVisibilite('NbChambresMaxi','Recherche',false);fieldVisibilite('SurfaceSejour','Bien',false);fieldVisibilite('SurfaceMiniSejour','Recherche',false);fieldVisibilite('SurfaceTerrain','Bien',false);fieldVisibilite('SurfaceTerrainMaxi','Recherche',false);fieldVisibilite('SurfaceTerrainMini','Recherche',false);fieldVisibilite('Etage','Bien',false);fieldVisibilite('EtageMini','Recherche',false);fieldVisibilite('NbEtages','Bien',false);fieldVisibilite('Anciennete','Bien|Recherche',true);fieldVisibilite('AnneeConstruction','Bien',true);fieldVisibilite('EtatGeneral','Bien',true);fieldVisibilite('EtatTerrain','Bien',false);fieldVisibilite('EtatOccupation','Bien',true);fieldVisibilite('Meuble','Bien',false);fieldVisibilite('TypeChauffage','Bien',true);fieldVisibilite('NatureChauffage','Bien',true);fieldVisibilite('ModeChauffage','Bien',true);fieldVisibilite('DPE','Bien',true);fieldVisibilite('GES','Bien',true);fieldVisibilite('DPEMaxi','Recherche',true);fieldVisibilite('GESMaxi','Recherche',true);fieldVisibilite('TaxeBureau','Bien',false);fieldVisibilite('TaxeEntrepotParAn','Bien',false);fieldVisibilite('QuotePartRIEParAn','Bien',false);fieldVisibilite('TEOMParAn','Bien',false);fieldVisibilite('AssuranceParAn','Bien',false);fieldVisibilite('AccesCamion','Bien',false);fieldVisibilite('Accessibilite','Bien|Recherche',false);fieldVisibilite('Alignement','Bien',false);fieldVisibilite('Baignoire','Bien|Recherche',false);fieldVisibilite('NbSallesBain','Bien',false);fieldVisibilite('NbSallesEau','Bien',false);fieldVisibilite('Balcon','Bien|Recherche',false);fieldVisibilite('Bureau','Bien|Recherche',false);fieldVisibilite('Cablage','Bien|Recherche',false);fieldVisibilite('Cave','Bien|Recherche',false);fieldVisibilite('NbCaves','Bien',false);fieldVisibilite('Cellier','Bien|Recherche',false);fieldVisibilite('Cheminee','Bien|Recherche',false);fieldVisibilite('Cloture','Bien|Recherche',false);fieldVisibilite('Combles','Bien|Recherche',false);fieldVisibilite('ControleAcces','Bien|Recherche',false);fieldVisibilite('Constructible','Bien|Recherche',false);fieldVisibilite('Digicode','Bien|Recherche',false);fieldVisibilite('DoubleVitrage','Bien|Recherche',false);fieldVisibilite('Dressing','Bien|Recherche',false);fieldVisibilite('FauxPlafond','Bien|Recherche',false);fieldVisibilite('FauxPlancher','Bien|Recherche',false);fieldVisibilite('Gardien','Bien|Recherche',false);fieldVisibilite('Gaz','Bien|Recherche',false);fieldVisibilite('Lotissement','Bien|Recherche',false);fieldVisibilite('Interphone','Bien|Recherche',false);fieldVisibilite('Jardin','Bien|Recherche',false);fieldUnbindEvent('Jardin','Bien');fieldVisibilite('MonteCharge','Bien|Recherche',false);fieldVisibilite('Mitoyenne','Bien|Recherche',false);fieldVisibilite('Piscine','Bien|Recherche',false);fieldVisibilite('QuaiDechargement','Bien|Recherche',false);fieldVisibilite('Terrasse','Bien|Recherche',false);fieldVisibilite('Viabilise','Bien|Recherche',false);fieldVisibilite('AccesHandicape','Bien|Recherche',true);fieldVisibilite('Alarme','Bien|Recherche',true);fieldVisibilite('Ascenseur','Bien|Recherche',true);fieldVisibilite('NbWC','Bien',true);fieldVisibilite('Climatisation','Bien|Recherche',true);fieldVisibilite('NbGarages','Bien',true);fieldVisibilite('NbParkInt','Bien',true);fieldVisibilite('NbParkExt','Bien',true);fieldVisibilite('Exposition','Bien',true);fieldVisibilite('PrixVenteHt','Bien',true);fieldVisibilite('NbStationnementsMini','Recherche',true);fieldVisibilite('ChiffreDAffairesMini','Recherche',false);fieldVisibilite('TypeEtage','Recherche',false);fieldVisibilite('Vue','Recherche',false);fieldVisibilite('AccesCamion','Recherche',false);switch(nomTypeBien){case'Divers':fieldVisibilite('NbChambres','Bien|Recherche',true);fieldVisibilite('NbChambresMaxi','Recherche',true);fieldVisibilite('SurfaceSejour','Bien',true);fieldVisibilite('SurfaceMiniSejour','Recherche',true);fieldVisibilite('SurfaceTerrain','Bien',true);fieldVisibilite('SurfaceTerrainMaxi','Recherche',true);fieldVisibilite('SurfaceTerrainMini','Recherche',true);fieldVisibilite('Etage','Bien',true);fieldVisibilite('EtageMini','Recherche',true);fieldVisibilite('NbEtages','Bien',true);fieldVisibilite('Alignement','Bien',true);fieldVisibilite('Baignoire','Bien|Recherche',true);fieldVisibilite('NbSallesEau','Bien',true);fieldVisibilite('Balcon','Bien|Recherche',true);fieldVisibilite('Bureau','Bien|Recherche',true);fieldVisibilite('Cablage','Bien|Recherche',true);fieldVisibilite('Cave','Bien|Recherche',true);fieldVisibilite('Cellier','Bien|Recherche',true);fieldVisibilite('Cheminee','Bien|Recherche',true);fieldVisibilite('Cloture','Bien|Recherche',true);fieldVisibilite('Combles','Bien|Recherche',true);fieldVisibilite('ControleAcces','Bien|Recherche',true);fieldVisibilite('Digicode','Bien|Recherche',true);fieldVisibilite('DoubleVitrage','Bien|Recherche',true);fieldVisibilite('Dressing','Bien|Recherche',true);fieldVisibilite('FauxPlafond','Bien|Recherche',true);fieldVisibilite('FauxPlancher','Bien|Recherche',true);fieldVisibilite('Gardien','Bien|Recherche',true);fieldVisibilite('Gaz','Bien|Recherche',true);fieldVisibilite('Lotissement','Bien|Recherche',true);fieldVisibilite('Interphone','Bien|Recherche',true);fieldVisibilite('Jardin','Bien|Recherche',true);fieldVisibilite('MonteCharge|Recherche','Bien',true);fieldVisibilite('Mitoyenne','Bien|Recherche',true);fieldVisibilite('Piscine','Bien|Recherche',true);fieldVisibilite('QuaiDechargement','Bien|Recherche',true);fieldVisibilite('Terrasse','Bien|Recherche',true);fieldVisibilite('Viabilise','Bien|Recherche',true);fieldVisibilite('TypeEtage','Recherche',true);fieldVisibilite('Vue','Recherche',true);if(typeOperation.val()=="Location"){fieldVisibilite('Meuble','Bien',true);}
break;case'Terrain':fieldVisibilite('NbPieces','Bien|Recherche',false);fieldVisibilite('NbPiecesMaxi','Recherche',false);fieldVisibilite('Anciennete','Bien|Recherche',false);fieldVisibilite('AnneeConstruction','Bien|Recherche',false);fieldVisibilite('EtatGeneral','Bien',false);fieldVisibilite('EtatTerrain','Bien',true);fieldVisibilite('EtatOccupation','Bien',false);fieldVisibilite('TypeChauffage','Bien',false);fieldVisibilite('NatureChauffage','Bien',false);fieldVisibilite('ModeChauffage','Bien',false);fieldVisibilite('DPE','Bien',false);fieldVisibilite('GES','Bien',false);fieldVisibilite('DPEMaxi','Recherche',false);fieldVisibilite('GESMaxi','Recherche',false);fieldVisibilite('AccesHandicape','Bien|Recherche',false);fieldVisibilite('Alarme','Bien|Recherche',false);fieldVisibilite('Ascenseur','Bien|Recherche',false);fieldVisibilite('NbWC','Bien',false);fieldVisibilite('Climatisation','Bien|Recherche',false);fieldVisibilite('NbGarages','Bien',false);fieldVisibilite('NbParkInt','Bien',false);fieldVisibilite('NbParkExt','Bien',false);fieldVisibilite('Exposition','Bien',false);fieldVisibilite('Accessibilite','Bien|Recherche',true);fieldVisibilite('Alignement','Bien',true);fieldVisibilite('Cloture','Bien|Recherche',true);fieldVisibilite('Constructible','Bien|Recherche',true);fieldVisibilite('Gaz','Bien|Recherche',true);fieldVisibilite('Lotissement','Bien|Recherche',true);fieldVisibilite('Viabilise','Bien|Recherche',true);fieldVisibilite('NbStationnementsMini','Recherche',false);break;case'Maison':fieldVisibilite('NbChambres','Bien|Recherche',true);fieldVisibilite('NbChambresMaxi','Recherche',true);fieldVisibilite('SurfaceSejour','Bien',true);fieldVisibilite('SurfaceMiniSejour','Recherche',true);fieldVisibilite('SurfaceTerrain','Bien',true);fieldVisibilite('SurfaceTerrainMaxi','Recherche',true);fieldVisibilite('SurfaceTerrainMini','Recherche',true);fieldVisibilite('Baignoire','Bien|Recherche',true);fieldVisibilite('NbSallesBain','Bien',true);fieldVisibilite('NbSallesEau','Bien',true);fieldVisibilite('Balcon','Bien|Recherche',true);fieldVisibilite('Bureau','Bien|Recherche',true);fieldVisibilite('Cave','Bien|Recherche',true);fieldVisibilite('Cellier','Bien|Recherche',true);fieldVisibilite('Cheminee','Bien|Recherche',true);fieldVisibilite('Combles','Bien|Recherche',true);fieldVisibilite('DoubleVitrage','Bien|Recherche',true);fieldVisibilite('Dressing','Bien|Recherche',true);fieldVisibilite('Lotissement','Bien|Recherche',true);fieldVisibilite('Interphone','Bien|Recherche',true);fieldVisibilite('Mitoyenne','Bien|Recherche',true);fieldVisibilite('Piscine','Bien|Recherche',true);fieldVisibilite('Terrasse','Bien|Recherche',true);fieldVisibilite('Ascenseur','Bien|Recherche',false);fieldVisibilite('Vue','Recherche',true);if(typeOperation.val()=="Location"){fieldVisibilite('Meuble','Bien',true);}
break;case'Appartement':fieldVisibilite('NbChambres','Bien|Recherche',true);fieldVisibilite('NbChambresMaxi','Recherche',true);fieldVisibilite('SurfaceSejour','Bien',true);fieldVisibilite('SurfaceMiniSejour','Recherche',true);fieldVisibilite('Etage','Bien',true);fieldVisibilite('EtageMini','Recherche',true);fieldVisibilite('NbEtages','Bien',true);fieldVisibilite('Baignoire','Bien|Recherche',true);fieldVisibilite('NbSallesBain','Bien',true);fieldVisibilite('NbSallesEau','Bien',true);fieldVisibilite('Balcon','Bien|Recherche',true);fieldVisibilite('Bureau','Bien|Recherche',true);fieldVisibilite('Cave','Bien|Recherche',true);fieldVisibilite('Cellier','Bien|Recherche',true);fieldVisibilite('Cheminee','Bien|Recherche',true);fieldVisibilite('Digicode','Bien|Recherche',true);fieldVisibilite('DoubleVitrage','Bien|Recherche',true);fieldVisibilite('Dressing','Bien|Recherche',true);fieldVisibilite('Gardien','Bien|Recherche',true);fieldVisibilite('Interphone','Bien|Recherche',true);fieldVisibilite('Jardin','Bien|Recherche',true);fieldVisibilite('Terrasse','Bien|Recherche',true);fieldVisibilite('TypeEtage','Recherche',true);fieldVisibilite('Vue','Recherche',true);if(typeOperation.val()=="Location"){fieldVisibilite('Meuble','Bien',true);}
linkedFieldVisibilite('Jardin','SurfaceTerrain',null);break;case'Immeuble':fieldVisibilite('NbEtages','Bien',true);fieldVisibilite('Cave','Bien|Recherche',true);fieldVisibilite('Digicode','Bien|Recherche',true);fieldVisibilite('DoubleVitrage','Bien|Recherche',true);fieldVisibilite('Gardien','Bien|Recherche',true);fieldVisibilite('Interphone','Bien|Recherche',true);fieldVisibilite('Jardin','Bien',true);fieldVisibilite('MonteCharge','Bien|Recherche',true);fieldVisibilite('Piscine','Bien|Recherche',true);break;case'FondCommerce':fieldVisibilite('TypeFond','Bien|Recherche',true);fieldVisibilite('QuotePartRIEParAn','Bien',true);fieldVisibilite('TEOMParAn','Bien',true);fieldVisibilite('AssuranceParAn','Bien',true);fieldVisibilite('Cablage','Bien|Recherche',true);fieldVisibilite('FauxPlafond','Bien|Recherche',true);fieldVisibilite('FauxPlancher','Bien|Recherche',true);fieldVisibilite('ChiffreDAffairesMini','Recherche',true);break;case'LocalCommercial':fieldVisibilite('FauxPlafond','Bien|Recherche',true);fieldVisibilite('FauxPlancher','Bien|Recherche',true);fieldVisibilite('Gardien','Bien|Recherche',true);fieldVisibilite('Interphone','Bien|Recherche',true);fieldVisibilite('MonteCharge','Bien|Recherche',true);fieldVisibilite('QuotePartRIEParAn','Bien',true);fieldVisibilite('TEOMParAn','Bien',true);fieldVisibilite('AssuranceParAn','Bien',true);fieldVisibilite('Cablage','Bien|Recherche',true);fieldVisibilite('Cave','Bien|Recherche',true);break;case'LocalProfessionnel':fieldVisibilite('QuotePartRIEParAn','Bien',true);fieldVisibilite('Etage','Bien',true);fieldVisibilite('EtageMini','Recherche',true);fieldVisibilite('NbEtages','Bien',true);fieldVisibilite('TaxeBureau','Bien',true);fieldVisibilite('TaxeEntrepotParAn','Bien',true);fieldVisibilite('TEOMParAn','Bien',true);fieldVisibilite('AssuranceParAn','Bien',true);fieldVisibilite('Balcon','Bien|Recherche',true);fieldVisibilite('Cablage','Bien|Recherche',true);fieldVisibilite('Cave','Bien|Recherche',true);fieldVisibilite('ControleAcces','Bien|Recherche',true);fieldVisibilite('DoubleVitrage','Bien|Recherche',true);fieldVisibilite('FauxPlafond','Bien|Recherche',true);fieldVisibilite('FauxPlancher','Bien|Recherche',true);fieldVisibilite('Gardien','Bien|Recherche',true);fieldVisibilite('NbSallesEau','Bien',true);fieldVisibilite('Interphone','Bien|Recherche',true);fieldVisibilite('TypeEtage','Recherche',false);fieldVisibilite('Vue','Recherche',true);break;case'LocalIndustriel':fieldVisibilite('TaxeBureau','Bien',true);fieldVisibilite('TaxeEntrepotParAn','Bien',true);fieldVisibilite('QuotePartRIEParAn','Bien',true);fieldVisibilite('TEOMParAn','Bien',true);fieldVisibilite('AssuranceParAn','Bien',true);fieldVisibilite('AccesCamion','Bien',true);fieldVisibilite('Bureau','Bien|Recherche',true);fieldVisibilite('Cablage','Bien|Recherche',true);fieldVisibilite('Cloture','Bien|Recherche',true);fieldVisibilite('ControleAcces','Bien|Recherche',true);fieldVisibilite('FauxPlafond','Bien|Recherche',true);fieldVisibilite('FauxPlancher','Bien|Recherche',true);fieldVisibilite('Gardien','Bien|Recherche',true);fieldVisibilite('Interphone','Bien|Recherche',true);fieldVisibilite('MonteCharge','Bien|Recherche',true);fieldVisibilite('QuaiDechargement','Bien|Recherche',true);fieldVisibilite('AccesHandicape','Bien|Recherche',false);fieldVisibilite('AccesCamion','Recherche',true);break;case'Garage':fieldVisibilite('DPE','Bien',false);fieldVisibilite('GES','Bien',false);fieldVisibilite('DPEMaxi','Recherche',false);fieldVisibilite('GESMaxi','Recherche',false);fieldVisibilite('AccesHandicape','Bien|Recherche',false);fieldVisibilite('Ascenseur','Bien|Recherche',false);fieldVisibilite('Climatisation','Bien|Recherche',false);fieldVisibilite('NbGarages','Bien',false);fieldVisibilite('NbParkInt','Bien',false);fieldVisibilite('NbParkExt','Bien',false);fieldVisibilite('Exposition','Bien',false);break;}
initLinkedField();});typeBien.change();}
function disableSection(idSection){var toDisableSection=$('#'+idSection);var fields=toDisableSection.find('.jforms-container-field');fields.each(function(){var champs=$(this).find('input, textarea, select');if(!empty(champs.attr('id'))){var entite=champs.data('entityname');var fieldname=champs.data('fieldname');if(!empty(entite)&&!empty(fieldname)){manageFieldRequirement(champs,false);}else{$(this).hide();}}});toDisableSection.hide();}
function enableSection(idSection){var toEnableSection=$('#'+idSection);var fields=toEnableSection.find('.jforms-container-field');fields.each(function(){var champs=$(this).find('input, textarea, select');if(!empty(champs.attr('id'))){var entite=champs.data('entityname');var fieldname=champs.data('fieldname');if(!empty(entite)&&!empty(fieldname)){manageFieldRequirement(champs,true);}else{$(this).show();}}});toEnableSection.show();}
var envoiASoi=$('input[type="checkbox"][data-fieldname="EnvoiSoiMeme"][data-entityname="Complements"]');if(envoiASoi.length>0){envoiASoi.change(function(){var checked=false;if($(this).is(':checked')){checked=true;}else{checked=false;}
var section=$(this).parents('.jforms-section');var section_id=section.attr('id');var sections=section.parent().find('.jforms-section');sections.each(function(){if($(this).attr('id')!=section_id&&$(this).attr('id')!='section_auto'){if(checked){disableSection($(this).attr('id'));}else{enableSection($(this).attr('id'));}}});});$(this).parents('form').on("charged",function(){envoiASoi.change();});}});;function generate_localisation_selector(sectionName){function _start(){if($('#'+sectionName+' [data-plugin="choix_localisation"]').length>1){var pluginElements=$('<div>');var listePluginName=[];var listeElements=[];pluginElements.addClass('selecteur-localisation');pluginElements.addClass('jforms-container-field');pluginElements.addClass('jforms-container-field-radio-selecteur');var selectedOptionId=null;$('#'+sectionName+' [data-plugin="choix_localisation"]').each(function(){if(typeof($(this).val())!="undefined"&&$(this).val()!=""&&$(this).val()!=null){selectedOptionId=$(this).attr('id');}
listeElements.push($(this));listePluginName.push($(this).attr('id'));var radioConteneur=$('<label>');var radioElement=$('<input>');radioConteneur.append($(this).parent().find("label").html());$(this).parent().find('.jforms-container-label').remove();radioElement.prop('type','radio');radioElement.attr('data-name',$(this).attr('id'));radioElement.attr('name',sectionName+'-type-localisation');radioElement.addClass('type-localisation');radioConteneur.append(radioElement);pluginElements.append(radioConteneur);});listeElements[0].parent().before(pluginElements);for(var cpt=1;cpt<listeElements.length;cpt++){listeElements[0].parent().after(listeElements[cpt].parent());}
$('#'+sectionName+' input[name="'+sectionName+'-type-localisation"]').change(function(){for(var i=0;i<listePluginName.length;i++){$("#"+listePluginName[i]).addClass('unused');$("#"+listePluginName[i]).disableForm();}
var toEnable=$(this).data('name');$("#"+toEnable).removeClass('unused');$("#"+toEnable).enableForm();if($("#"+toEnable).data('fieldname')=='Polygone'){var mapObject=$("#"+toEnable+"_map").data('object');if(typeof mapObject!=="undefined"&&mapObject!==null){mapObject.resized();}}
$(this).parents('form').trigger('changeLocalisation');});if(typeof(selectedOptionId)=="undefined"||selectedOptionId==""||selectedOptionId==null){$('#'+sectionName+' input[name="'+sectionName+'-type-localisation"]').first().attr('checked','checked').trigger('change');}else{$('#'+sectionName+' input[name="'+sectionName+'-type-localisation"][data-name="'+selectedOptionId+'"]').attr('checked','checked').trigger('change');}}}
$(document).ready(function(){_start();});};var jFormsJQ={_forms:{},tForm:null,selectFillUrl:'',config:{},_submitListener:function(ev){var frm=jFormsJQ.getForm(ev.target.attributes.getNamedItem("id").value);jQuery(ev.target).trigger('jFormsUpdateFields');var submitOk=true;try{for(var i=0;i<frm.preSubmitHandlers.length;i++){if(!frm.preSubmitHandlers[i](ev))
submitOk=false;}
if(!jFormsJQ.verifyForm(ev.target))
submitOk=false;for(var j=0;j<frm.postSubmitHandlers.length;j++){if(!frm.postSubmitHandlers[j](ev))
submitOk=false;}}
catch(e){return false;}
return submitOk;},declareForm:function(aForm){this._forms[aForm.name]=aForm;jQuery('#'+aForm.name).bind('submit',jFormsJQ._submitListener);},getForm:function(name){return this._forms[name];},verifyForm:function(frmElt){this.tForm=this._forms[frmElt.attributes.getNamedItem("id").value];var msg='';var valid=true;this.tForm.errorDecorator.start(this.tForm);for(var i=0;i<this.tForm.controls.length;i++){if(!this.verifyControl(this.tForm.controls[i],this.tForm))
valid=false;}
if(!valid)
this.tForm.errorDecorator.end();return valid;},verifyControl:function(ctrl,frm){var val;if(typeof ctrl.getValue=='function'){val=ctrl.getValue();}
else{var elt=frm.element.elements[ctrl.name];if(!elt)return true;val=this.getValue(elt);}
if(val===null||val===false){if(ctrl.required){frm.errorDecorator.addError(ctrl,1);return false;}}
else{if(!ctrl.check(val,frm)){if(!("getChild"in ctrl)){frm.errorDecorator.addError(ctrl,2);}
return false;}}
return true;},getValue:function(elt){if(elt.nodeType){switch(elt.nodeName.toLowerCase()){case"input":if(elt.getAttribute('type')=='checkbox')
return elt.checked;case"textarea":var val=jQuery.trim(elt.value);return(val!==''?val:null);case"select":if(!elt.multiple)
return(elt.value!==''?elt.value:null);var values=[];for(var i=0;i<elt.options.length;i++){if(elt.options[i].selected)
values.push(elt.options[i].value);}
if(values.length)
return values;return null;}}else if(this.isCollection(elt)){var values=[];for(var i=0;i<elt.length;i++){var item=elt[i];if(item.checked)
values.push(item.value);}
if(values.length){if(elt[0].getAttribute('type')=='radio')
return values[0];return values;}}
return null;},hasClass:function(elt,clss){return jQuery(elt).hasClass(clss);},addClass:function(elt,clss){if(this.isCollection(elt)){for(var j=0;j<elt.length;j++){jQuery(elt[j]).addClass(clss);}}else{jQuery(elt).addClass(clss);}},removeClass:function(elt,clss){if(this.isCollection(elt)){for(var j=0;j<elt.length;j++){jQuery(elt[j]).removeClass(clss);}}else{jQuery(elt).removeClass(clss);}},setAttribute:function(elt,name,value){if(this.isCollection(elt)){for(var j=0;j<elt.length;j++){elt[j].setAttribute(name,value);}}else{elt.setAttribute(name,value);}},removeAttribute:function(elt,name){if(this.isCollection(elt)){for(var j=0;j<elt.length;j++){elt[j].removeAttribute(name);}}else{elt.removeAttribute(name);}},isCollection:function(elt){if(typeof HTMLCollection!="undefined"&&elt instanceof HTMLCollection){return true;}
if(typeof NodeList!="undefined"&&elt instanceof NodeList){return true;}
if(elt instanceof Array)
return true;if(elt.length!=undefined&&(elt.localName==undefined||elt.localName=='SELECT'||elt.localName!='select'))
return true;return false;}};function jFormsJQForm(name,selector,id){this.selector=selector;this.formId=id;this.name=name;this.controls=[];this.errorDecorator=new jFormsJQErrorDecoratorHtml();this.element=jQuery('#'+name).get(0);this.allDependencies={};this.updateInProgress=false;this.controlsToUpdate=[];this.preSubmitHandlers=[];this.postSubmitHandlers=[];};jFormsJQForm.prototype={addControl:function(ctrl){this.controls.push(ctrl);ctrl.formName=this.name;},setErrorDecorator:function(decorator){this.errorDecorator=decorator;},getControl:function(aControlName){var ctrls=this.controls;for(var i=0;i<ctrls.length;i++){if(ctrls[i].name==aControlName){return ctrls[i];}
else if(ctrls[i].getChild){var child=ctrls[i].getChild(aControlName);if(child)
return child;}}
return null;},declareDynamicFill:function(controlName){var elt=this.element.elements[controlName];var ctrl=this.getControl(controlName);if(!ctrl.dependencies)
return;var me=this;for(var i=0;i<ctrl.dependencies.length;i++){var depName=ctrl.dependencies[i];var dep=this.element.elements[depName];if(this.allDependencies[depName]===undefined){this.allDependencies[depName]=[controlName];jQuery(dep).change(function(){me.updateLinkedElements(depName);});}
else{this.allDependencies[depName].push(controlName);}}},updateDynamicList:function(controlName){var ctrl=this.getControl(controlName);if(!ctrl.dependencies){return;}
this.controlsToUpdate.push(controlName);this.dynamicFillAjax();},updateLinkedElements:function(controlName){if(this.updateInProgress)
return;this.updateInProgress=true;this.buildOrderedControlsList(controlName);this.dynamicFillAjax();},buildOrderedControlsList:function(controlName){this.controlsToUpdate=[];var alreadyCheckedControls=[];var checkedCircularDependency=[];var me=this;var buildListDependencies=function(controlName){if(checkedCircularDependency[controlName]===true)
throw"Circular reference !";checkedCircularDependency[controlName]=true;var list=me.allDependencies[controlName];if(list!==undefined){for(var j=0;j<list.length;j++){if(alreadyCheckedControls[list[j]]!==true){buildListDependencies(list[j]);}}}
checkedCircularDependency[controlName]=false;alreadyCheckedControls[controlName]=true;me.controlsToUpdate.push(controlName);};var list=this.allDependencies[controlName];if(list!==undefined){for(var i=0;i<list.length;i++){checkedCircularDependency=[];if(alreadyCheckedControls[list[i]]!==true){buildListDependencies(list[i]);}}}},dynamicFillAjax:function(){var ctrlname=this.controlsToUpdate.pop();if(!ctrlname){this.updateInProgress=false;this.controlsToUpdate=[];return;}
var ctrl=this.getControl(ctrlname);var token=this.element.elements['__JFORMS_TOKEN__'];if(typeof token=="undefined"){token='';}
else
token=token.value;var param={'__form':this.selector,'__formid':this.formId,'__JFORMS_TOKEN__':token,'__ref':ctrl.name.replace('[]','')};for(var i=0;i<ctrl.dependencies.length;i++){var n=ctrl.dependencies[i];param[n]=jFormsJQ.getValue(this.element.elements[n]);}
var elt=this.element.elements[ctrl.name];var me=this;jQuery.post(jFormsJQ.selectFillUrl,param,function(data){if(elt.nodeType&&elt.nodeName.toLowerCase()=='select'){var select=jQuery(elt).eq(0);var emptyitem=select.children('option[value=""]').detach();select.empty();if(emptyitem)
select.append(emptyitem);jQuery.each(data,function(i,item){if(typeof item.items=='object'){select.append('<optgroup label="'+item.label+'"/>');var optgroup=select.children('optgroup[label="'+item.label+'"]').eq(0);jQuery.each(item.items,function(i,item){optgroup.append('<option value="'+item.value+'">'+item.label+'</option>');});}
else
select.append('<option value="'+item.value+'">'+item.label+'</option>');});}
if(me.controlsToUpdate.length){me.dynamicFillAjax();}
else{me.updateInProgress=false;}},"json");},addSubmitHandler:function(handler,beforeCheck){if(beforeCheck){this.preSubmitHandlers.push(handler);}
else
this.postSubmitHandlers.push(handler);}};function jFormsJQControlString(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.minLength=-1;this.maxLength=-1;this.regexp=null;this.readOnly=false;};jFormsJQControlString.prototype.check=function(val,jfrm){if(this.minLength!=-1&&val.length<this.minLength)
return false;if(this.maxLength!=-1&&val.length>this.maxLength)
return false;if(this.regexp&&!this.regexp.test(val))
return false;return true;};function jFormsJQControlHtml(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.minLength=-1;this.maxLength=-1;this.readOnly=false;};jFormsJQControlHtml.prototype.check=function(val,jfrm){if(this.minLength!=-1&&val.length<this.minLength)
return false;if(this.maxLength!=-1&&val.length>this.maxLength)
return false;return true;};jFormsJQControlHtml.prototype.getValue=function(){var frm=jFormsJQ.getForm(this.formName);var elt=frm.element.elements[this.name];if(!elt)return null;val=jFormsJQ.getValue(elt);if(val==null)
return null;val=val.replace(/<(img|object|video|svg|embed)[^>]*>/gi,'TAG');val=val.replace(/<\/?[\S][^>]*>/gi,'');val=val.replace(/&[a-z]+;/gi,'');val=jQuery.trim(val);if(val=='')
return null;return val;};function jFormsJQControlSecret(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.minLength=-1;this.maxLength=-1;this.regexp=null;this.readOnly=false;};jFormsJQControlSecret.prototype.check=function(val,jfrm){if(this.minLength!=-1&&val.length<this.minLength)
return false;if(this.maxLength!=-1&&val.length>this.maxLength)
return false;if(this.regexp&&!this.regexp.test(val))
return false;return true;};function jFormsJQControlConfirm(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this._masterControl=name.replace(/_confirm$/,'');};jFormsJQControlConfirm.prototype.check=function(val,jfrm){if(jFormsJQ.getValue(jfrm.element.elements[this._masterControl])!==val)
return false;return true;};function jFormsJQControlBoolean(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.readOnly=false;};jFormsJQControlBoolean.prototype.check=function(val,jfrm){return(val==true||val==false);};function jFormsJQControlDecimal(name,label){this.name=name;this.label=label;this.required=false;this.minValue=-1;this.maxValue=-1;this.errInvalid='';this.errRequired='';this.readOnly=false;};jFormsJQControlDecimal.prototype.check=function(val,jfrm){if(!(-1!=val.search(/^\s*[\+\-]?\d+(\.\d+)?\s*$/)))return false;if(this.minValue!=-1&&parseFloat(val)<this.minValue)return false;if(this.maxValue!=-1&&parseFloat(val)>this.maxValue)return false;return true;};function jFormsJQControlInteger(name,label){this.name=name;this.label=label;this.required=false;this.minValue=-1;this.maxValue=-1;this.errInvalid='';this.errRequired='';this.readOnly=false;};jFormsJQControlInteger.prototype.check=function(val,jfrm){if(!(-1!=val.search(/^\s*[\+\-]?\d+\s*$/)))return false;if(this.minValue!=-1&&parseInt(val)<this.minValue)return false;if(this.maxValue!=-1&&parseInt(val)>this.maxValue)return false;return true;};function jFormsJQControlHexadecimal(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.readOnly=false;};jFormsJQControlHexadecimal.prototype.check=function(val,jfrm){return(val.search(/^0x[a-f0-9A-F]+$/)!=-1);};function jFormsJQControlDatetime(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.minDate=null;this.maxDate=null;this.multiFields=false;this.readOnly=false;};jFormsJQControlDatetime.prototype.check=function(val,jfrm){var t=val.match(/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2})(:(\d{2}))?$/);if(t==null)return false;var yy=parseInt(t[1],10);var mm=parseInt(t[2],10)-1;var dd=parseInt(t[3],10);var th=parseInt(t[4],10);var tm=parseInt(t[5],10);var ts=0;if(t[7]!=null&&t[7]!="")
ts=parseInt(t[7],10);var dt=new Date(yy,mm,dd,th,tm,ts);if(yy!=dt.getFullYear()||mm!=dt.getMonth()||dd!=dt.getDate()||th!=dt.getHours()||tm!=dt.getMinutes()||ts!=dt.getSeconds())
return false;else if((this.minDate!==null&&val<this.minDate)||(this.maxDate!==null&&val>this.maxDate))
return false;return true;};jFormsJQControlDatetime.prototype.getValue=function(){if(!this.multiFields){var val=jQuery.trim(jQuery('#'+this.formName+'_'+this.name).val());return(val!==''?val:null);}
var controlId='#'+this.formName+'_'+this.name;var v=jQuery(controlId+'_year').val()+'-'
+jQuery(controlId+'_month').val()+'-'
+jQuery(controlId+'_day').val()+' '
+jQuery(controlId+'_hour').val()+':'
+jQuery(controlId+'_minutes').val();var secondsControl=jQuery('#'+this.formName+'_'+this.name+'_seconds');if(secondsControl.attr('type')!=='hidden'){v+=':'+secondsControl.val();if(v=='-- ::')
return null;}
else if(v=='-- :')
return null;return v;};jFormsJQControlDatetime.prototype.deactivate=function(deactivate){var controlId='#'+this.formName+'_'+this.name;if(deactivate){if(!this.multiFields)
jQuery(controlId).attr('disabled','disabled').addClass('jforms-disabled').trigger('jFormsActivateControl',false);else{jQuery(controlId+'_year').attr('disabled','disabled').addClass('jforms-disabled');jQuery(controlId+'_month').attr('disabled','disabled').addClass('jforms-disabled');jQuery(controlId+'_day').attr('disabled','disabled').addClass('jforms-disabled');jQuery(controlId+'_hour').attr('disabled','disabled').addClass('jforms-disabled');jQuery(controlId+'_minutes').attr('disabled','disabled').addClass('jforms-disabled');jQuery(controlId+'_seconds').attr('disabled','disabled').addClass('jforms-disabled');jQuery(controlId+'_hidden').trigger('jFormsActivateControl',false);}}
else{if(!this.multiFields)
jQuery(controlId).removeAttr('disabled').removeClass('jforms-disabled').trigger('jFormsActivateControl',true);else{jQuery(controlId+'_year').removeAttr('disabled').removeClass('jforms-disabled');jQuery(controlId+'_month').removeAttr('disabled').removeClass('jforms-disabled');jQuery(controlId+'_day').removeAttr('disabled').removeClass('jforms-disabled');jQuery(controlId+'_hour').removeAttr('disabled').removeClass('jforms-disabled');jQuery(controlId+'_minutes').removeAttr('disabled').removeClass('jforms-disabled');jQuery(controlId+'_seconds').removeAttr('disabled').removeClass('jforms-disabled');jQuery(controlId+'_hidden').trigger('jFormsActivateControl',true);}}};function jFormsJQControlDate(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.multiFields=false;this.minDate=null;this.maxDate=null;this.readOnly=false;};jFormsJQControlDate.prototype.check=function(val,jfrm){var t=val.match(/^(\d{4})\-(\d{2})\-(\d{2})$/);if(t==null)return false;var yy=parseInt(t[1],10);var mm=parseInt(t[2],10)-1;var dd=parseInt(t[3],10);var dt=new Date(yy,mm,dd,0,0,0);if(yy!=dt.getFullYear()||mm!=dt.getMonth()||dd!=dt.getDate())
return false;else if((this.minDate!==null&&val<this.minDate)||(this.maxDate!==null&&val>this.maxDate))
return false;return true;};jFormsJQControlDate.prototype.getValue=function(){if(!this.multiFields){var val=jQuery.trim(jQuery('#'+this.formName+'_'+this.name).val());return(val!==''?val:null);}
var controlId='#'+this.formName+'_'+this.name;var v=jQuery(controlId+'_year').val()+'-'
+jQuery(controlId+'_month').val()+'-'
+jQuery(controlId+'_day').val();if(v=='--')
return null;return v;};jFormsJQControlDate.prototype.deactivate=function(deactivate){var controlId='#'+this.formName+'_'+this.name;if(deactivate){if(!this.multiFields)
jQuery(controlId).attr('disabled','disabled').addClass('jforms-disabled').trigger('jFormsActivateControl',false);else{jQuery(controlId+'_year').attr('disabled','disabled').addClass('jforms-disabled');jQuery(controlId+'_month').attr('disabled','disabled').addClass('jforms-disabled');jQuery(controlId+'_day').attr('disabled','disabled').addClass('jforms-disabled');jQuery(controlId+'_hidden').trigger('jFormsActivateControl',false);}}
else{if(!this.multiFields)
jQuery(controlId).removeAttr('disabled').removeClass('jforms-disabled').trigger('jFormsActivateControl',true);else{jQuery(controlId+'_year').removeAttr('disabled').removeClass('jforms-disabled');jQuery(controlId+'_month').removeAttr('disabled').removeClass('jforms-disabled');jQuery(controlId+'_day').removeAttr('disabled').removeClass('jforms-disabled');jQuery(controlId+'_hidden').trigger('jFormsActivateControl',true);}}};function jFormsJQControlTime(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';};jFormsJQControlTime.prototype.check=function(val,jfrm){var t=val.match(/^(\d{2}):(\d{2})(:(\d{2}))?$/);if(t==null)return false;var th=parseInt(t[1],10);var tm=parseInt(t[2],10);var ts=0;if(t[4]!=null)
ts=parseInt(t[4],10);var dt=new Date(2007,5,2,th,tm,ts);if(th!=dt.getHours()||tm!=dt.getMinutes()||ts!=dt.getSeconds())
return false;else
return true;};function jFormsJQControlLocaleDatetime(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.lang='';this.readOnly=false;};jFormsJQControlLocaleDatetime.prototype.check=function(val,jfrm){var yy,mm,dd,th,tm,ts;if(this.lang.indexOf('fr_')==0){var t=val.match(/^(\d{2})\/(\d{2})\/(\d{4}) (\d{2}):(\d{2})(:(\d{2}))?$/);if(t==null)return false;yy=parseInt(t[3],10);mm=parseInt(t[2],10)-1;dd=parseInt(t[1],10);th=parseInt(t[4],10);tm=parseInt(t[5],10);ts=0;if(t[7]!=null)
ts=parseInt(t[7],10);}else{var t=val.match(/^(\d{2})\/(\d{2})\/(\d{4}) (\d{2}):(\d{2})(:(\d{2}))?$/);if(t==null)return false;yy=parseInt(t[3],10);mm=parseInt(t[1],10)-1;dd=parseInt(t[2],10);th=parseInt(t[4],10);tm=parseInt(t[5],10);ts=0;if(t[7]!=null)
ts=parseInt(t[7],10);}
var dt=new Date(yy,mm,dd,th,tm,ts);if(yy!=dt.getFullYear()||mm!=dt.getMonth()||dd!=dt.getDate()||th!=dt.getHours()||tm!=dt.getMinutes()||ts!=dt.getSeconds())
return false;else
return true;};function jFormsJQControlLocaleDate(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.lang='';this.readOnly=false;};jFormsJQControlLocaleDate.prototype.check=function(val,jfrm){var yy,mm,dd;if(this.lang.indexOf('fr_')==0){var t=val.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(t==null)return false;yy=parseInt(t[3],10);mm=parseInt(t[2],10)-1;dd=parseInt(t[1],10);}else{var t=val.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(t==null)return false;yy=parseInt(t[3],10);mm=parseInt(t[1],10)-1;dd=parseInt(t[2],10);}
var dt=new Date(yy,mm,dd,0,0,0);if(yy!=dt.getFullYear()||mm!=dt.getMonth()||dd!=dt.getDate())
return false;else
return true;};function jFormsJQControlUrl(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.readOnly=false;};jFormsJQControlUrl.prototype.check=function(val,jfrm){return(val.search(/^[a-z]+:\/\/((((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))((\/)|$)/)!=-1);};function jFormsJQControlEmail(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.readOnly=false;};jFormsJQControlEmail.prototype.check=function(val,jfrm){return(val.search(/^((\"[^\"f\n\r\t\b]+\")|([\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$/)!=-1);};function jFormsJQControlIpv4(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.readOnly=false;};jFormsJQControlIpv4.prototype.check=function(val,jfrm){var t=val.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);if(t)
return(t[1]<256&&t[2]<256&&t[3]<256&&t[4]<256);return false;};function jFormsJQControlIpv6(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.readOnly=false;};jFormsJQControlIpv6.prototype.check=function(val,jfrm){return(val.search(/^([a-f0-9]{1,4})(:([a-f0-9]{1,4})){7}$/i)!=-1);};function jFormsJQControlColor(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.readOnly=false;};jFormsJQControlColor.prototype.check=function(val,jfrm){return(val.search(/^#[a-f0-9A-F]{6}$/)!=-1);};function jFormsJQControlChoice(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.items={};this.readOnly=false;};jFormsJQControlChoice.prototype={addControl:function(ctrl,itemValue){if(this.items[itemValue]===undefined){this.items[itemValue]=[];}
if(ctrl){this.items[itemValue].push(ctrl);ctrl.formName=this.formName;}},getChild:function(aControlName){for(var it in this.items){for(var i=0;i<this.items[it].length;i++){var c=this.items[it][i];if(c.name==aControlName)
return c;}}
return null;},check:function(val,jfrm){if(this.items[val]==undefined)
return false;var list=this.items[val];var valid=true;for(var i=0;i<list.length;i++){var ctrlvalid=jFormsJQ.verifyControl(list[i],jfrm);if(!ctrlvalid)
valid=false;}
return valid;},activate:function(val){var frmElt=document.getElementById(this.formName);for(var j in this.items){var list=this.items[j];var htmlItem=document.getElementById(this.formName+'_'+this.name+'_'+j+'_item');if(htmlItem){if(val==j){jFormsJQ.addClass(htmlItem,"jforms-selected");jFormsJQ.removeClass(htmlItem,"jforms-notselected");}
else{jFormsJQ.removeClass(htmlItem,"jforms-selected");jFormsJQ.addClass(htmlItem,"jforms-notselected");}}
for(var i=0;i<list.length;i++){var ctl=list[i];if(typeof ctl.deactivate=='function'){if(ctl.readOnly)
ctl.deactivate(true);else
ctl.deactivate(val!=j);continue;}
var elt=frmElt.elements[ctl.name];if(val==j&&!ctl.readOnly){jFormsJQ.removeAttribute(elt,"disabled");jFormsJQ.removeClass(elt,"jforms-disabled");}else{jFormsJQ.setAttribute(elt,"disabled","disabled");jFormsJQ.addClass(elt,"jforms-disabled");}}}}};function jFormsJQControlGroup(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.readOnly=false;this.children=[];this.hasCheckbox=false;};jFormsJQControlGroup.prototype={addControl:function(ctrl,itemValue){this.children.push(ctrl);ctrl.formName=this.formName;},getChild:function(aControlName){for(var i=0;i<this.children.length;i++){var c=this.children[i];if(c.name==aControlName)
return c;}
return null;},check:function(val,jfrm){if(this.hasCheckbox){var chk=document.getElementById(this.formName+'_'+this.name+'_checkbox');if(!chk.checked){return true;}}
var valid=true;for(var i=0;i<this.children.length;i++){var ctrlvalid=jFormsJQ.verifyControl(this.children[i],jfrm);if(!ctrlvalid){valid=false;}}
return valid;},activate:function(yes){var checkboxItem=document.getElementById(this.formName+'_'+this.name+'_checkbox');if(checkboxItem){if(yes){checkboxItem.setAttribute('checked','true');}
else{checkboxItem.removeAttribute('checked');}
this.showActivate();}},showActivate:function(){var checkboxItem=document.getElementById(this.formName+'_'+this.name+'_checkbox');if(!this.hasCheckbox||!checkboxItem){return;}
var fieldset=document.getElementById(this.formName+'_'+this.name);var frmElt=document.getElementById(this.formName);var toactivate=checkboxItem.checked;if(toactivate){jFormsJQ.removeClass(fieldset,"jforms-notselected");}
else{jFormsJQ.addClass(fieldset,"jforms-notselected");}
for(var i=0;i<this.children.length;i++){var ctl=this.children[i];if(typeof ctl.deactivate=='function'){if(ctl.readOnly){ctl.deactivate(true);}else{ctl.deactivate(!toactivate);}
continue;}
var elt=frmElt.elements[ctl.name];if(toactivate&&!ctl.readOnly){jFormsJQ.removeAttribute(elt,"disabled");jFormsJQ.removeClass(elt,"jforms-disabled");}else{jFormsJQ.setAttribute(elt,"disabled","disabled");jFormsJQ.addClass(elt,"jforms-disabled");}}}};function jFormsJQErrorDecoratorAlert(){this.message='';};jFormsJQErrorDecoratorAlert.prototype={start:function(form){this.message='';},addError:function(control,messageType){if(messageType==1){this.message+="* "+control.errRequired+"\n";}else if(messageType==2){this.message+="* "+control.errInvalid+"\n";}else{this.message+="* Error on '"+control.label+"' field\n";}},end:function(){if(this.message!=''){alert(this.message);}}};function jFormsJQErrorDecoratorHtml(){this.message='';};jFormsJQErrorDecoratorHtml.prototype={start:function(form){this.message='';this.form=form;jQuery("#"+form.name+" .jforms-error").removeClass('jforms-error');$('#'+this.form.name+'_errors').empty().hide();},addError:function(control,messageType){var elt=this.form.element.elements[control.name];if(elt&&elt.nodeType){jQuery(elt).addClass('jforms-error');}
var name=control.name.replace(/\[\]/,'');jQuery("#"+this.form.name+"_"+name+"_label").addClass('jforms-error');if(messageType==1){this.message+='<li class="error"> '+control.errRequired+"</li>";}else if(messageType==2){this.message+='<li class="error"> '+control.errInvalid+"</li>";}else{this.message+='<li class="error"> Error on \''+control.label+"' </li>";}},end:function(){var errid=this.form.name+'_errors';var ul=document.getElementById(errid);if(this.message!=''){if(!ul){ul=document.createElement('ul');ul.setAttribute('class','jforms-error-list');ul.setAttribute('id',errid);jQuery(this.form.element).first().before(ul);}
var jul=jQuery(ul);location.hash="#"+errid;jul.hide().html(this.message).fadeIn();}
else if(ul){jQuery(ul).hide();}}};;var jelix_datepicker_default_Manager={_config:null,_initControl:function(control){console.log("_initControl d")
var disabled=false;if(control.multiFields){var eltId='#'+control.formName+'_'+control.name;var eltYear=jQuery(eltId+'_year').after('<input type="hidden" disabled="disabled" id="'+control.formName+'_'+control.name+'_hidden" />');var eltMonth=jQuery(eltId+'_month');var eltDay=jQuery(eltId+'_day');var elt=jQuery(eltId+'_hidden');disabled=eltYear.attr('disabled');}
else{var elt=jQuery('#'+control.formName+'_'+control.name);disabled=elt.attr('disabled');}
var params={changeMonth:true,changeYear:true,showButtonPanel:true,showOn:"button",buttonImageOnly:true,buttonImage:this._config.jelixWWWPath+'design/jforms/calendar.gif',onSelect:function(date){if(!control.multiFields)
return;eltYear.val('');eltMonth.val('');eltDay.val('');date=date.split('-');eltYear.val(date[0]);eltMonth.val(date[1]);eltDay.val(date[2]);}};var currentYear=parseInt(new Date().getFullYear(),10);var yearRange=[parseInt(currentYear-10,10),parseInt(currentYear+10,10)];if(control.minDate){var t=control.minDate.match(/^(\d{4})\-(\d{2})\-(\d{2}).*$/);if(t!==null){yearRange[0]=parseInt(t[1],10);params.minDate=new Date(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10));}}
if(control.maxDate){var t=control.maxDate.match(/^(\d{4})\-(\d{2})\-(\d{2}).*$/);if(t!==null){yearRange[1]=parseInt(t[1],10);params.maxDate=new Date(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10));}}
params.yearRange=yearRange.join(':');if(control.multiFields){params.beforeShow=function(){elt.val(eltYear.val()+'-'+eltMonth.val()+'-'+eltDay.val());};}
if(!control.lang){params.dateFormat='yy-mm-dd';}
elt.datepicker(params);jQuery("#ui-datepicker-div").css("z-index",999999);var triggerIcon=elt.parent().children('img.ui-datepicker-trigger').eq(0);if(!control.required&&triggerIcon){triggerIcon.after(' <img class="ui-datepicker-reset" src="'+this._config.jelixWWWPath+'design/jforms/cross.png" alt="'+elt.datepicker('option','resetButtonText')+'"  title="'+elt.datepicker('option','resetButtonText')+'" />');var cleanTriggerIcon=elt.parent().children('img').eq(1);cleanTriggerIcon.click(function(e){if(elt.datepicker('isDisabled'))
return;if(control.multiFields){eltYear.val('');eltMonth.val('');eltDay.val('');}
elt.val('');});}
if(triggerIcon){triggerIcon.css({'vertical-align':'text-bottom','margin-left':'3px'});}
elt.bind('jFormsActivateControl',function(e,val){if(val){jQuery(this).datepicker('enable');if(!control.required&&triggerIcon){cleanTriggerIcon.css('opacity','1');}}
else{jQuery(this).datepicker('disable');if(!control.required&&triggerIcon){cleanTriggerIcon.css('opacity','0.5');}}});elt.trigger('jFormsActivateControl',!disabled);elt.blur();},_scriptReady:false,_controls:[],declareControl:function(aControl){if(this._scriptReady){this._initControl(aControl);}
else{this._controls.push(aControl);}},_start:function(){console.log("start d")
var datapickCtrl=this._controls.shift();while(datapickCtrl){this._initControl(datapickCtrl);datapickCtrl=this._controls.shift();}
this._scriptReady=true;}};function jelix_datepicker_default(aControl,config){jelix_datepicker_default_Manager.declareControl(aControl);if(jelix_datepicker_default_Manager._controls.length<=1){jelix_datepicker_default_Manager._config=config;jQuery(document).ready(function(){jelix_datepicker_default_Manager._start();});}};function jFormsJQControlRecaptchabtn(name,label){this.name=name;this.label=label;this.required=false;this.errInvalid='';this.errRequired='';this.minLength=-1;this.maxLength=-1;this.regexp=null;this.readOnly=false
this.token='';};jFormsJQControlRecaptchabtn.prototype.check=function(val,jfrm){if(val===''){grecaptcha.execute();return false}
return true};jFormsJQControlRecaptchabtn.prototype.getValue=function(){return this.token;};jFormsJQControlRecaptchabtn.prototype.setToken=function(token){this.token=token;};;(function($){var SubMenu=function(element){this.element=$(element);if('ontouchstart'in document.documentElement){this.TOUCH=true;}};SubMenu.prototype={TOUCH:false,element:null,setTimeoutConstUp:null,setTimeoutConstDown:null,show:function(){var element=this.element;var that=this;$('> li > .submenu',element).each(function(){var submenu_li_parent=$(this).parents('li').addClass('have-submenu');if($(this).hasClass('submenu-simple')){$('a',submenu_li_parent).append('<span class="chevron-submenu"></span>')}})
if(this.TOUCH){var elemclickable;if($('.chevron-submenu',element).length){elemclickable=$('.chevron-submenu',element)}else{elemclickable=$('> li > a',element)}
elemclickable.click(function(event){var submenu_li_parent=$(this).parents('li');var submenu=submenu_li_parent.children('.submenu');if(submenu.length>0){if(submenu.is(':visible')){submenu.hide();submenu_li_parent.removeClass('open-submenu');}else{$('.submenu',element).hide();submenu.show();if(submenu.outerWidth()<=submenu_li_parent.outerWidth()){submenu.outerWidth(submenu_li_parent.outerWidth());}
submenu_li_parent.addClass('open-submenu');if(submenu.width()<=submenu_li_parent.width()){submenu.width(submenu_li_parent.width());}
$(".submenu-simple",submenu_li_parent).position({my:"center top",at:"center bottom",of:submenu_li_parent,collision:"flipfit"});}
event.preventDefault();return false;}});}else{$('> li',element).hover(function(){var that=this;this.setTimeoutConstUp=setTimeout(function(){$('.submenu',that).css("display","flex");if($('.submenu',that).outerWidth()<=$(that).outerWidth()){$('.submenu',that).outerWidth($(that).outerWidth());}
$(".submenu-simple",that).position({my:"center top",at:"center bottom",of:$(that),collision:'fit none'});$(that).addClass('open-submenu');},100);clearTimeout(this.setTimeoutConstDown);this.setTimeoutConstDown=null;},function(){var that=this;this.setTimeoutConstDown=setTimeout(function(){$('.submenu',that).hide();$(that).removeClass('open-submenu');},100);clearTimeout(this.setTimeoutConstUp);this.setTimeoutConstUp=null;});}},destroy:function(){$(this.element).find('a').off('click');$(this.element).find('> li').off('mouseenter mouseleave');$(this.element).find('.chevron-submenu').remove();}};$.fn.submenu=function(option){return this.each(function(){var $this=$(this),data=$this.data('submenu')
if(!data)
$this.data('submenu',(data=new SubMenu(this)));if(typeof option==='string')
data[option]();else
data.show();});};})(jQuery);;(function($){var NavTopBar=function(element){this.element=$(element);};NavTopBar.prototype={_isInit:false,show:function(){if(this._isInit===false){var that=this;var blockMenu=$('.container-header .container-menu');var menuSecondary=$('#menu_main-secondary');$('.btn-navbar').click(function(){var windowHeight=$(window).height();var headerHeight=$('.container-header').height();if((blockMenu.css('height')!='0px'&&menuSecondary.css('display')=='block')||(blockMenu.css('height')=='0px'&&menuSecondary.css('display')=='none')){blockMenu.css({'height':(windowHeight-headerHeight)+'px'});}else{blockMenu.css({'height':'0px'});}
menuSecondary.hide();that.element.toggle();});that._isInit=true;}},destroy:function(){$('.btn-navbar').off('click');this.element.removeAttr('style');this._isInit=false;}};$.fn.navtopbar=function(option){return this.each(function(){var $this=$(this),data=$this.data('navtopbar');if(!data)
$this.data('navtopbar',(data=new NavTopBar(this)));if(typeof option==='string')
data[option]();else
data.show();});};})(jQuery);;(function($){var NavSecondaryBar=function(element){this.element=$(element);};NavSecondaryBar.prototype={_isInit:false,show:function(){if(this._isInit===false){var that=this;var menuPrimary=$('#menu_main');var blockMenu=$('.container-header .container-menu');menuPrimary.after(this.element.hide());$('.btn-navbar-perso').click(function(){var windowHeight=$(window).height();var headerHeight=$('.container-header').height();if((blockMenu.css('height')!='0px'&&menuPrimary.css('display')=='block')||(blockMenu.css('height')=='0px'&&menuPrimary.css('display')=='none')){blockMenu.css({'height':(windowHeight-headerHeight)+'px'});}else{blockMenu.css({'height':'0px'});}
menuPrimary.hide();that.element.toggle();});that._isInit=true;}},destroy:function(){$('.btn-navbar-perso').off('click');this.element.removeAttr('style');if($(".acces-extranet p").length==1){$('.acces-extranet p').after(this.element.hide());}else{$('.acces-extranet').append(this.element);}
this._isInit=false;}};$.fn.navsecondarybar=function(option){return this.each(function(){var $this=$(this),data=$this.data('navsecondarybar');if(!data)
$this.data('navsecondarybar',(data=new NavSecondaryBar(this)));if(typeof option==='string')
data[option]();else
data.show();});};})(jQuery);;(function($){var AddLabelAccueil=function(){label=jsData.labelmenu_accueil;langue=jsData.langue;if(langue=='fr'){langue='';}else{langue+='/';}};AddLabelAccueil.prototype={show:function(){if(!issetMenuAccueil()){item_menu='<li id="menu_index"><a href="/'+langue+'">'+label+'</a></li>';$("#menu_main").prepend(item_menu);}},destroy:function(){$("#menu_index").remove();}};var issetMenuAccueil=function(){return($("#menu_main").find('a[href="/"]').length||$("#menu_main").find('a[href="/en/"]').length);};$.fn.addlabelaccueil=function(option){return this.each(function(){var $this=$(this),data=$this.data('labelmenu');if(!data){$this.data('labelmenu',(data=new AddLabelAccueil(this)));}
if(typeof option==='string')
data[option]();else
data.show();});};})(jQuery);;(function($){var Moteur=function(element){this.element=$(element);this.defaultOpen=$(this.element).attr('data-default-open');this.contenuInitialH2=$(this.element).attr('data-initial');this.contenuModifH2=$(this.element).attr('data-update');};Moteur.prototype={_isInit:false,show:function(){if(this.defaultOpen=='false'){$('.accordion').slideToggle();$(this.element).find('#header_moteur').html(this.contenuModifH2);}else{if($('.wbs-siteaccueil').length==1){$(this.element).find('#header_moteur').html(this.contenuInitialH2);}}
if(this._isInit===false){var that=this;if($('.wbs-siteaccueil').length==1){$('#header_moteur',this.element).click(function(){$('.moteur_items').slideToggle();$('.accordion').removeClass('accordeon-active').slideToggle();});}else if($('.wbs-siteaccueil').length==0){$('.accordeon-inactive').remove();$('#header_moteur',this.element).click(function(){if(!$(this).is('.accordeon-active')){that.closeall();$('.accordion').slideToggle();$(this).html(that.contenuInitialH2);$(this).addClass('accordeon-active');}else{$('.accordion').slideToggle();$(this).html(that.contenuModifH2);$(this).removeClass('accordeon-active');}});}
this._isInit=true;}},destroy:function(){$('#header_moteur').off('click');$('.moteur_items').removeAttr('style');$('.accordion').removeAttr('style');this._isInit=false;},closeall:function(){$('#header_moteur').next('div').removeClass('accordeon-active').slideUp();}};$.fn.moteur=function(option){return this.each(function(){var $this=$(this),data=$this.data('moteur');if(!data)
$this.data('moteur',(data=new Moteur(this)));if(typeof option==='string')
data[option]();else
data.show();});};})(jQuery);;(function($){var MenuHideDown=function(element){this.element=$(element);};MenuHideDown.prototype={_isInit:false,show:function(){if(this._isInit===false){var that=this;var prev=0;var $window=$(window);var nav=$('header');$window.scroll(function(){var scrollTop=$window.scrollTop();nav.toggleClass('hidden',prev>nav.height()&&scrollTop>prev);if(nav.hasClass('hidden')){$('#menu_main-secondary').hide();$('#menu_main').hide();$('.container-menu').css({'height':'0px'});}
prev=scrollTop;});that._isInit=true;}},desktop:function(){if(this._isInit===false){var that=this;var prev=0;var $window=$(window);var nav=$('header');$window.scroll(function(){var scrollTop=$window.scrollTop();nav.toggleClass('hidden',prev>nav.height()&&scrollTop>prev);if(nav.hasClass('hidden')){nav.slideUp(400);}else{nav.slideDown(400);}
nav.toggleClass('minify',scrollTop>nav.height());prev=scrollTop;});that._isInit=true;}},destroy:function(){$(window).off("scroll");this._isInit=false;}};$.fn.menuhidedown=function(option){return this.each(function(){var $this=$(this),data=$this.data('menuhidedown');if(!data)
$this.data('menuhidedown',(data=new MenuHideDown(this)));if(typeof option==='string')
data[option]();else
data.show();});};})(jQuery);;var typeCharte='mf';var initClassic=function(){if(window.matchMedia('only screen and (min-width: 992px)').matches){$("#menu_main").submenu();if(typeof($.fn.affichagenumtracker)!='undefined'){$('.container-contact-content').affichagenumtracker();}
if(typeof($.fn.menuhidedown)!='undefined'){$("header").menuhidedown('desktop');}}};var destroyClassic=function(){$("#menu_main").submenu('destroy');if(typeof($.fn.affichagenumtracker)!='undefined'){$('.container-contact-content').affichagenumtracker('destroy');}
if(typeof($.fn.menuhidedown)!='undefined'){$("header").menuhidedown('destroy');}};var initMobile=function(){if(window.matchMedia('only screen and (max-width: 991px)').matches){$("#menu_main").navtopbar();$("#menu_main").addlabelaccueil();$(".block-moteur").moteur();if(typeof($.fn.navsecondarybar)!='undefined'){$("#menu_main-secondary").navsecondarybar();}
if(typeof($.fn.menuhidedown)!='undefined'){$("header").menuhidedown();}}};var destroyMobile=function(){$("#menu_main").navtopbar('destroy');$("#menu_main").addlabelaccueil('destroy');$(".block-moteur").moteur('destroy');if(typeof($.fn.navsecondarybar)!='undefined'){$("#menu_main-secondary").navsecondarybar('destroy');}
if(typeof($.fn.menuhidedown)!='undefined'){$("header").menuhidedown('destroy');}};;window.matchMedia=window.matchMedia||(function(doc,undefined){var docElem=doc.documentElement,refNode=docElem.firstElementChild||docElem.firstChild,fakeBody=doc.createElement('body'),div=doc.createElement('div');div.id='mq-test-1';div.style.cssText="position:absolute;top:-100em";fakeBody.style.background="none";fakeBody.appendChild(div);var mqRun=function(mq){div.innerHTML='&shy;<style media="'+mq+'"> #mq-test-1 { width: 42px; }</style>';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:mq};},getEmValue=function(){var ret,body=docElem.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none";}
body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);if(fakeUsed){docElem.removeChild(body);}else{body.removeChild(div);}
ret=eminpx=parseFloat(div.offsetWidth);return ret;},eminpx,mqSupport=mqRun('(min-width: 0px)').matches;return function(mq){if(mqSupport){return mqRun(mq);}else{var min=mq.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),max=mq.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),minnull=min===null,maxnull=max===null,currWidth=doc.body.offsetWidth,em='em';if(!!min){min=parseFloat(min)*(min.indexOf(em)>-1?(eminpx||getEmValue()):1);}
if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?(eminpx||getEmValue()):1);}
bool=(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max);return{matches:bool,media:mq};}};}(document));function isModeMobile(){if(window.matchMedia('only screen and (max-width: 768px)').matches){return true;}else{return false;}}
$("document").ready(function(){initMobile();initClassic();let responsive='768';if(typeCharte==='mf'&&typeCharte==='dynamics'){responsive='991';}
if(typeCharte==='moving'){responsive='1023';}
if(window.matchMedia("only screen and (max-width: "+responsive+"px)").addListener){window.matchMedia("only screen and (max-width: "+responsive+"px)").addListener(function(){if(window.matchMedia("only screen and (max-width: "+responsive+"px)").matches){destroyClassic();initMobile();}else{destroyMobile();initClassic();}});}
try{var vh=window.innerHeight*0.01;document.documentElement.style.setProperty('--vh',(window.innerHeight*0.01)+'px');window.addEventListener('resize',function(){document.documentElement.style.setProperty('--vh',(window.innerHeight*0.01)+'px');});}catch(e){}});;$(document).ready(function(){$('.block-moteur form select').each(function(){$(this).children('option').first().text($(this).data('text'));})});;$(document).ready(function(){var menu=$('ul#menu_main-secondary');var btnMenuDesktop=$('.acces-extranet p');var btnMenuMobile=$('.btn-navbar-perso');$(document).click(function(event){var target=$(event.target);if((target.is(btnMenuDesktop)!=true&&target.is(btnMenuMobile)!=true)&&menu.is(":visible")!==false){menu.hide();}});btnMenuDesktop.click(function(){menu.toggle();});});;function getModeDropDown(){var mode='text'
if($('.block-lang-selector').hasClass('flag')){mode='flag';}else if($('.block-lang-selector').hasClass('minitext')){mode='minitext';}
return mode;}
function createDropDown(targetSelector,mode,ismobile){ismobile=ismobile||false;var $form=$("div.block-lang-selector form");$form.hide();var source=$("#lang-options");source.removeAttr("autocomplete");var selected=source.find("option:selected");var options=$("option",source);if(ismobile==false){targetSelector.append('<dl id="target" class="dropdown-lang dropdown-lang-desktop"></dl>')
if(mode==='flag'){$("#target").append('<dt class="'+selected.val()+'"><a href="#" title="'+selected.text()+'"><img src="/static/images/flag/'+selected.val()+'.png" alt="'+selected.text()+'"/></a></dt>')
$("#target").append('<dd><ul></ul></dd>')
options.each(function(){$("#target dd ul").append('<li class="'+$(this).val()+'"><a href="'+$(this).attr("title")+'" title="'+$(this).text()+'"><img src="/static/images/flag/'+$(this).val()+'.png" alt="'+$(this).text()+'"/></a></li>');});}else if(mode==='minitext'){$("#target").append('<dt class="'+selected.val()+'"><a href="#" title="'+selected.text()+'">'+selected.val()+'</a></dt>')
$("#target").append('<dd><ul></ul></dd>')
options.each(function(){$("#target dd ul").append('<li class="'+$(this).val()+'"><a href="'+$(this).attr("title")+'" title="'+$(this).text()+'">'+$(this).text()+'</a></li>');});}else{$("#target").append('<dt class="'+selected.val()+'"><a href="#" title="'+selected.text()+'">'+selected.text()+'</a></dt>')
$("#target").append('<dd><ul></ul></dd>')
options.each(function(){$("#target dd ul").append('<li class="'+$(this).val()+'"><a href="'+$(this).attr("title")+'" title="'+$(this).text()+'">'+$(this).text()+'</a></li>');});}}else{targetSelector.append('<ul id="target" class="dropdown-lang dropdown-lang-mobile"></ul>')
if(mode==='flag'){options.each(function(){$("#target").append('<li class="'+$(this).val()+'"><a href="'+$(this).attr("title")+'" title="'+$(this).text()+'"><img src="/static/images/flag/'+$(this).val()+'.png" alt="'+$(this).text()+'"/></a></li>');});}else if(mode==='minitext'){options.each(function(){$("#target").append('<li class="'+$(this).val()+'"><a href="'+$(this).attr("title")+'" title="'+$(this).text()+'">'+$(this).text()+'</a></li>');});}else{options.each(function(){$("#target").append('<li class="'+$(this).val()+'"><a href="'+$(this).attr("title")+'" title="'+$(this).text()+'">'+$(this).text()+'</a></li>');});}}}
function clickDropDown(){var $dropTrigger=$(".dropdown-lang dt a");var $languageList=$(".dropdown-lang dd ul");$dropTrigger.addClass('open');$dropTrigger.click(function(){if($languageList.is(":hidden")){$languageList.slideDown("slow");$(this).addClass("close").removeClass("open");}else{$languageList.slideUp("slow");$(this).addClass("open").removeClass("close");}});$(document).bind('click',function(e){var $clicked=$(e.target);if(!$clicked.parents().hasClass("dropdown-lang"))
$languageList.slideUp(200);});$(".dropdown-lang dd ul li a").click(function(){var clickedValue=$(this).parent().attr("class");var clickedTitle=$(this).find("em").html();$("#target dt").removeClass().addClass(clickedValue);$("#target dt em").html(clickedTitle);$languageList.hide();});};$(document).ready(function(){createDropDown($("div.block-lang-selector"),getModeDropDown(),false);clickDropDown();});;$(document).ready(function(){var formDiv=$("div.block-lang-selector form").parent();if(window.matchMedia("only screen and (max-width: 991px)").addListener){window.matchMedia("only screen and (max-width: 991px)").addListener(function(){if(window.matchMedia('only screen and (max-width: 991px)').matches){$('.dropdown-lang').remove();$('#menu_main .social-toolbar').before(formDiv);if($('.block-lang-selector').hasClass('text')){$('.block-lang-selector').removeClass('text').addClass('flag');}
createDropDown($("div.block-lang-selector"),getModeDropDown(),true);}else{$('.dropdown-lang').remove();$('.container-top .acces-extranet').before(formDiv);if($('.block-lang-selector').hasClass('flag')){$('.block-lang-selector').removeClass('flag').addClass('text');}
createDropDown($("div.block-lang-selector"),getModeDropDown(),false);clickDropDown();}});}
if(window.matchMedia('only screen and (max-width: 991px)').matches){$('.dropdown-lang').remove();$('#menu_main .social-toolbar').before(formDiv);if($('.block-lang-selector').hasClass('text')){$('.block-lang-selector').removeClass('text').addClass('flag');}
createDropDown($("div.block-lang-selector"),getModeDropDown(),true);}});;(function(a){var f=/[\-\[\]{}()*+?.,\\\^$|#\s]/g;a.widget("ech.multiselectfilter",{options:{label:"Filter:",width:null,placeholder:"Enter keywords",autoReset:!1},_create:function(){var e;var b=this,c=this.options,d=this.instance=a(this.element).data("multiselect");this.header=d.menu.find(".ui-multiselect-header").addClass("ui-multiselect-hasfilter");e=this.wrapper=a('<div class="ui-multiselect-filter">'+(c.label.length?c.label:"")+'<input placeholder="'+c.placeholder+'" type="search"'+(/\d/.test(c.width)?'style="width:'+c.width+'px"':"")+" /></div>").prependTo(this.header),c=e;this.inputs=d.menu.find('input[type="checkbox"], input[type="radio"]');this.input=c.find("input").bind({keydown:function(a){13===a.which&&a.preventDefault()},keyup:a.proxy(b._handler,b),click:a.proxy(b._handler,b)});this.updateCache();d._toggleChecked=function(c,d){var e=d&&d.length?d:this.labels.find("input"),i=this,e=e.not(b.instance._isOpen?":disabled, :hidden":":disabled").each(this._toggleState("checked",c));this.update();var j=e.map(function(){return this.value}).get();this.element.find("option").filter(function(){!this.disabled&&-1<a.inArray(this.value,j)&&i._toggleState("selected",c).call(this)})};d=a(document).bind("multiselectrefresh",function(){b.updateCache();b._handler()});this.options.autoReset&&d.bind("multiselectclose",a.proxy(this._reset,this))},_handler:function(b){var c=a.trim(this.input[0].value.toLowerCase()),d=this.rows,g=this.inputs,h=this.cache;if(c){d.hide();var e=RegExp(c.replace(f,"\\$&"),"gi");this._trigger("filter",b,a.map(h,function(a,b){return-1!==a.search(e)?(d.eq(b).show(),g.get(b)):null}))}else d.show();this.instance.menu.find(".ui-multiselect-optgroup-label").each(function(){var b=a(this),c=b.nextUntil(".ui-multiselect-optgroup-label").filter(function(){return"none"!==a.css(this,"display")}).length;b[c?"show":"hide"]()})},_reset:function(){this.input.val("").trigger("keyup")},updateCache:function(){this.rows=this.instance.menu.find(".ui-multiselect-checkboxes li:not(.ui-multiselect-optgroup-label)");this.cache=this.element.children().map(function(){var b=a(this);"optgroup"===this.tagName.toLowerCase()&&(b=b.children());return b.map(function(){return this.innerHTML.toLowerCase()}).get()}).get()},widget:function(){return this.wrapper},destroy:function(){a.Widget.prototype.destroy.call(this);this.input.val("").trigger("keyup");this.wrapper.remove()}})})(jQuery);;(function(d){var k=0;d.widget("ech.multiselect",{options:{header:!0,height:175,minWidth:225,classes:"",checkAllText:"Check all",uncheckAllText:"Uncheck all",noneSelectedText:"Select options",selectedText:"# selected",selectedList:0,show:null,hide:null,autoOpen:!1,multiple:!0,position:{}},_create:function(){var a=this.element.hide(),b=this.options;this.speed=d.fx.speeds._default;this._isOpen=!1;a=(this.button=d('<button type="button"><span class="ui-icon ui-icon-triangle-2-n-s"></span></button>')).addClass("ui-multiselect ui-widget ui-state-default ui-corner-all").addClass(b.classes).attr({title:a.attr("title"),"aria-haspopup":!0,tabIndex:a.attr("tabIndex")}).insertAfter(a);(this.buttonlabel=d("<span />")).html(b.noneSelectedText).appendTo(a);var a=(this.menu=d("<div />")).addClass("ui-multiselect-menu ui-widget ui-widget-content ui-corner-all").addClass(b.classes).appendTo(document.body),c=(this.header=d("<div />")).addClass("ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix").appendTo(a);(this.headerLinkContainer=d("<ul />")).addClass("ui-helper-reset").html(function(){return!0===b.header?'<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span>'+b.checkAllText+'</span></a></li><li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span>'+b.uncheckAllText+"</span></a></li>":"string"===typeof b.header?"<li>"+b.header+"</li>":""}).append('<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><span class="ui-icon ui-icon-circle-close"></span></a></li>').appendTo(c);(this.checkboxContainer=d("<ul />")).addClass("ui-multiselect-checkboxes ui-helper-reset").appendTo(a);this._bindEvents();this.refresh(!0);b.multiple||a.addClass("ui-multiselect-single")},_init:function(){!1===this.options.header&&this.header.hide();this.options.multiple||this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").hide();this.options.autoOpen&&this.open();this.element.is(":disabled")&&this.disable()},refresh:function(a){var b=this.element,c=this.options,f=this.menu,h=this.checkboxContainer,g=[],e="",i=b.attr("id")||k++;b.find("option").each(function(b){d(this);var a=this.parentNode,f=this.innerHTML,h=this.title,k=this.value,b="ui-multiselect-"+(this.id||i+"-option-"+b),l=this.disabled,n=this.selected,m=["ui-corner-all"],o=(l?"ui-multiselect-disabled ":" ")+this.className,j;"OPTGROUP"===a.tagName&&(j=a.getAttribute("label"),-1===d.inArray(j,g)&&(e+='<li class="ui-multiselect-optgroup-label '+a.className+'"><a href="#">'+j+"</a></li>",g.push(j)));l&&m.push("ui-state-disabled");n&&!c.multiple&&m.push("ui-state-active");e+='<li class="'+o+'">';e+='<label for="'+b+'" title="'+h+'" class="'+m.join(" ")+'">';e+='<input id="'+b+'" name="multiselect_'+i+'" type="'+(c.multiple?"checkbox":"radio")+'" value="'+k+'" title="'+f+'"';n&&(e+=' checked="checked"',e+=' aria-selected="true"');l&&(e+=' disabled="disabled"',e+=' aria-disabled="true"');e+=" /><span>"+f+"</span></label></li>"});h.html(e);this.labels=f.find("label");this.inputs=this.labels.children("input");this._setButtonWidth();this._setMenuWidth();this.button[0].defaultValue=this.update();a||this._trigger("refresh")},update:function(){var a=this.options,b=this.inputs,c=b.filter(":checked"),f=c.length,a=0===f?a.noneSelectedText:d.isFunction(a.selectedText)?a.selectedText.call(this,f,b.length,c.get()):/\d/.test(a.selectedList)&&0<a.selectedList&&f<=a.selectedList?c.map(function(){return d(this).next().html()}).get().join(", "):a.selectedText.replace("#",f).replace("#",b.length);this.buttonlabel.html(a);return a},_bindEvents:function(){function a(){b[b._isOpen?"close":"open"]();return!1}var b=this,c=this.button;c.find("span").bind("click.multiselect",a);c.bind({click:a,keypress:function(a){switch(a.which){case 27:case 38:case 37:b.close();break;case 39:case 40:b.open()}},mouseenter:function(){c.hasClass("ui-state-disabled")||d(this).addClass("ui-state-hover")},mouseleave:function(){d(this).removeClass("ui-state-hover")},focus:function(){c.hasClass("ui-state-disabled")||d(this).addClass("ui-state-focus")},blur:function(){d(this).removeClass("ui-state-focus")}});this.header.delegate("a","click.multiselect",function(a){if(d(this).hasClass("ui-multiselect-close"))b.close();else b[d(this).hasClass("ui-multiselect-all")?"checkAll":"uncheckAll"]();a.preventDefault()});this.menu.delegate("li.ui-multiselect-optgroup-label a","click.multiselect",function(a){a.preventDefault();var c=d(this),g=c.parent().nextUntil("li.ui-multiselect-optgroup-label").find("input:visible:not(:disabled)"),e=g.get(),c=c.parent().text();!1!==b._trigger("beforeoptgrouptoggle",a,{inputs:e,label:c})&&(b._toggleChecked(g.filter(":checked").length!==g.length,g),b._trigger("optgrouptoggle",a,{inputs:e,label:c,checked:e[0].checked}))}).delegate("label","mouseenter.multiselect",function(){d(this).hasClass("ui-state-disabled")||(b.labels.removeClass("ui-state-hover"),d(this).addClass("ui-state-hover").find("input").focus())}).delegate("label","keydown.multiselect",function(a){a.preventDefault();switch(a.which){case 9:case 27:b.close();break;case 38:case 40:case 37:case 39:b._traverse(a.which,this);break;case 13:d(this).find("input")[0].click()}}).delegate('input[type="checkbox"], input[type="radio"]',"click.multiselect",function(a){var c=d(this),g=this.value,e=this.checked,i=b.element.find("option");this.disabled||!1===b._trigger("click",a,{value:g,text:this.title,checked:e})?a.preventDefault():(c.focus(),c.attr("aria-selected",e),i.each(function(){this.value===g?this.selected=e:b.options.multiple||(this.selected=!1)}),b.options.multiple||(b.labels.removeClass("ui-state-active"),c.closest("label").toggleClass("ui-state-active",e),b.close()),b.element.trigger("change"),setTimeout(d.proxy(b.update,b),10))});d(document).bind("mousedown.multiselect",function(a){b._isOpen&&(!d.contains(b.menu[0],a.target)&&!d.contains(b.button[0],a.target)&&a.target!==b.button[0])&&b.close()});d(this.element[0].form).bind("reset.multiselect",function(){setTimeout(d.proxy(b.refresh,b),10)})},_setButtonWidth:function(){var a=this.element.outerWidth(),b=this.options;/\d/.test(b.minWidth)&&a<b.minWidth&&(a=b.minWidth);this.button.width(a)},_setMenuWidth:function(){var a=this.menu,b=this.button.outerWidth()-parseInt(a.css("padding-left"),10)-parseInt(a.css("padding-right"),10)-parseInt(a.css("border-right-width"),10)-parseInt(a.css("border-left-width"),10);a.width(b||this.button.outerWidth())},_traverse:function(a,b){var c=d(b),f=38===a||37===a,c=c.parent()[f?"prevAll":"nextAll"]("li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)")[f?"last":"first"]();c.length?c.find("label").trigger("mouseover"):(c=this.menu.find("ul").last(),this.menu.find("label")[f?"last":"first"]().trigger("mouseover"),c.scrollTop(f?c.height():0))},_toggleState:function(a,b){return function(){this.disabled||(this[a]=b);b?this.setAttribute("aria-selected",!0):this.removeAttribute("aria-selected")}},_toggleChecked:function(a,b){var c=b&&b.length?b:this.inputs,f=this;c.each(this._toggleState("checked",a));c.eq(0).focus();this.update();var h=c.map(function(){return this.value}).get();this.element.find("option").each(function(){!this.disabled&&-1<d.inArray(this.value,h)&&f._toggleState("selected",a).call(this)});c.length&&this.element.trigger("change")},_toggleDisabled:function(a){this.button.attr({disabled:a,"aria-disabled":a})[a?"addClass":"removeClass"]("ui-state-disabled");var b=this.menu.find("input"),b=a?b.filter(":enabled").data("ech-multiselect-disabled",!0):b.filter(function(){return!0===d.data(this,"ech-multiselect-disabled")}).removeData("ech-multiselect-disabled");b.attr({disabled:a,"arial-disabled":a}).parent()[a?"addClass":"removeClass"]("ui-state-disabled");this.element.attr({disabled:a,"aria-disabled":a})},open:function(){var a=this.button,b=this.menu,c=this.speed,f=this.options,h=[];if(!(!1===this._trigger("beforeopen")||a.hasClass("ui-state-disabled")||this._isOpen)){var g=b.find("ul").last(),e=f.show,i=a.offset();d.isArray(f.show)&&(e=f.show[0],c=f.show[1]||this.speed);e&&(h=[e,c]);g.scrollTop(0).height(f.height);d.ui.position&&!d.isEmptyObject(f.position)?(f.position.of=f.position.of||a,b.show().position(f.position).hide()):b.css({top:i.top+a.outerHeight(),left:i.left});d.fn.show.apply(b,h);this.labels.eq(0).trigger("mouseover").trigger("mouseenter").find("input").trigger("focus");a.addClass("ui-state-active");this._isOpen=!0;this._trigger("open")}},close:function(){if(!1!==this._trigger("beforeclose")){var a=this.options,b=a.hide,c=this.speed,f=[];d.isArray(a.hide)&&(b=a.hide[0],c=a.hide[1]||this.speed);b&&(f=[b,c]);d.fn.hide.apply(this.menu,f);this.button.removeClass("ui-state-active").trigger("blur").trigger("mouseleave");this._isOpen=!1;this._trigger("close")}},enable:function(){this._toggleDisabled(!1)},disable:function(){this._toggleDisabled(!0)},checkAll:function(){this._toggleChecked(!0);this._trigger("checkAll")},uncheckAll:function(){this._toggleChecked(!1);this._trigger("uncheckAll")},getChecked:function(){return this.menu.find("input").filter(":checked")},destroy:function(){d.Widget.prototype.destroy.call(this);this.button.remove();this.menu.remove();this.element.show();return this},isOpen:function(){return this._isOpen},widget:function(){return this.menu},getButton:function(){return this.button},_setOption:function(a,b){var c=this.menu;switch(a){case"header":c.find("div.ui-multiselect-header")[b?"show":"hide"]();break;case"checkAllText":c.find("a.ui-multiselect-all span").eq(-1).text(b);break;case"uncheckAllText":c.find("a.ui-multiselect-none span").eq(-1).text(b);break;case"height":c.find("ul").last().height(parseInt(b,10));break;case"minWidth":this.options[a]=parseInt(b,10);this._setButtonWidth();this._setMenuWidth();break;case"selectedText":case"selectedList":case"noneSelectedText":this.options[a]=b;this.update();break;case"classes":c.add(this.button).removeClass(this.options.classes).addClass(b);break;case"multiple":c.toggleClass("ui-multiselect-single",!b),this.options.multiple=b,this.element[0].multiple=b,this.refresh()}d.Widget.prototype._setOption.apply(this,arguments)}})})(jQuery);;$.widget("custom.localisationcomplete",$.ui.autocomplete,{_renderMenu:function(ul,items){var that=this;$.each(items,function(index,item_cat){if(items.length>1)
ul.append("<li class='ui-autocomplete-type'>"+item_cat.label+"</li>");$.each(item_cat.data,function(index,item){var ivalue,ilabel;if(item.type=='complete'){ilabel=item.name;ivalue=item.name;}else if(item.type=='cp'){ilabel=item.name;ivalue=item.cp;}else if(item.type=='departement'){ilabel=item.name+" ("+item.code_dep+")";ivalue=item.name+" ("+item.code_dep+")";}else{ilabel=item.name+" ("+item.cp+")";ivalue=item.name+" ("+item.cp+")";}
that._renderItemData(ul,{label:ilabel,value:ivalue,originaldata:item});});});}});;!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ol=e():t.ol=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=10)}([function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return $})),r.d(e,"b",(function(){return _r})),r.d(e,"c",(function(){return Kr})),r.d(e,"d",(function(){return hr})),r.d(e,"e",(function(){return Hr})),r.d(e,"f",(function(){return i}));var i={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `["get", "building_type"]`). Each label must be either:\n - a single literal value; or\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `["c", "b"]`). The input matches if any of the values in the array matches, similar to the `"in"` operator.\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object.  Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}};var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function a(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function s(t,e){return t(e={exports:{}},e.exports),e.exports}var u=s((function(t,e){!function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,a="object"==typeof o&&o;a.global!==a&&a.window!==a&&a.self!==a||(r=a);var s,u,l=2147483647,h=/^xn--/,c=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,g=String.fromCharCode;function y(t){throw RangeError(f[t])}function m(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function v(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+m((t=t.replace(p,".")).split("."),e).join(".")}function _(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function b(t){return m(t,(function(t){var e="";return t>65535&&(e+=g((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=g(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,r){var n=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;n+=36)t=d(t/35);return d(n+36*t/(t+38))}function S(t){var e,r,n,i,o,a,s,u,h,c,p,f=[],g=t.length,m=0,v=128,_=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&y("not-basic"),f.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<g;){for(o=m,a=1,s=36;i>=g&&y("invalid-input"),((u=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||u>d((l-m)/a))&&y("overflow"),m+=u*a,!(u<(h=s<=_?1:s>=_+26?26:s-_));s+=36)a>d(l/(c=36-h))&&y("overflow"),a*=c;_=w(m-o,e=f.length+1,0==o),d(m/e)>l-v&&y("overflow"),v+=d(m/e),m%=e,f.splice(m++,0,v)}return b(f)}function T(t){var e,r,n,i,o,a,s,u,h,c,p,f,m,v,b,S=[];for(f=(t=_(t)).length,e=128,r=0,o=72,a=0;a<f;++a)(p=t[a])<128&&S.push(g(p));for(n=i=S.length,i&&S.push("-");n<f;){for(s=l,a=0;a<f;++a)(p=t[a])>=e&&p<s&&(s=p);for(s-e>d((l-r)/(m=n+1))&&y("overflow"),r+=(s-e)*m,e=s,a=0;a<f;++a)if((p=t[a])<e&&++r>l&&y("overflow"),p==e){for(u=r,h=36;!(u<(c=h<=o?1:h>=o+26?26:h-o));h+=36)b=u-c,v=36-c,S.push(g(x(c+b%v,0))),u=d(b/v);S.push(g(x(u,0))),o=w(r,m,n==i),r=0,++n}++r,++e}return S.join("")}if(s={version:"1.3.2",ucs2:{decode:_,encode:b},decode:S,encode:T,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+T(t):t}))},toUnicode:function(t){return v(t,(function(t){return h.test(t)?S(t.slice(4).toLowerCase()):t}))}},n&&i)if(t.exports==n)i.exports=s;else for(u in s)s.hasOwnProperty(u)&&(n[u]=s[u]);else r.punycode=s}(o)})),l=function(t){return"string"==typeof t},h=function(t){return"object"==typeof t&&null!==t},c=function(t){return null===t},p=function(t){return null==t};function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var d=function(t,e,r,n){e=e||"&",r=r||"=";var i={};if("string"!=typeof t||0===t.length)return i;var o=/\+/g;t=t.split(e);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var u=0;u<s;++u){var l,h,c,p,d=t[u].replace(o,"%20"),g=d.indexOf(r);g>=0?(l=d.substr(0,g),h=d.substr(g+1)):(l=d,h=""),c=decodeURIComponent(l),p=decodeURIComponent(h),f(i,c)?Array.isArray(i[c])?i[c].push(p):i[c]=[i[c],p]:i[c]=p}return i},g=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},y=function(t,e,r,n){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var i=encodeURIComponent(g(n))+r;return Array.isArray(t[n])?t[n].map((function(t){return i+encodeURIComponent(g(t))})).join(e):i+encodeURIComponent(g(t[n]))})).join(e):n?encodeURIComponent(g(n))+r+encodeURIComponent(g(t)):""},m=s((function(t,e){e.decode=e.parse=d,e.encode=e.stringify=y}));m.decode,m.parse,m.encode,m.stringify;function v(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var _=/^([a-z0-9.+-]+:)/i,b=/:[0-9]*$/,x=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),S=["'"].concat(w),T=["%","/","?",";","#"].concat(S),E=["/","?","#"],C=/^[+a-z0-9A-Z_-]{0,63}$/,P=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,R={javascript:!0,"javascript:":!0},O={javascript:!0,"javascript:":!0},I={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function L(t,e,r){if(t&&h(t)&&t instanceof v)return t;var n=new v;return n.parse(t,e,r),n}v.prototype.parse=function(t,e,r){if(!l(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=-1!==n&&n<t.indexOf("#")?"?":"#",o=t.split(i);o[0]=o[0].replace(/\\/g,"/");var a=t=o.join(i);if(a=a.trim(),!r&&1===t.split("#").length){var s=x.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=e?m.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=_.exec(a);if(h){var c=(h=h[0]).toLowerCase();this.protocol=c,a=a.substr(h.length)}if(r||h||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var p="//"===a.substr(0,2);!p||h&&O[h]||(a=a.substr(2),this.slashes=!0)}if(!O[h]&&(p||h&&!I[h])){for(var f,d,g=-1,y=0;y<E.length;y++){-1!==(v=a.indexOf(E[y]))&&(-1===g||v<g)&&(g=v)}-1!==(d=-1===g?a.lastIndexOf("@"):a.lastIndexOf("@",g))&&(f=a.slice(0,d),a=a.slice(d+1),this.auth=decodeURIComponent(f)),g=-1;for(y=0;y<T.length;y++){var v;-1!==(v=a.indexOf(T[y]))&&(-1===g||v<g)&&(g=v)}-1===g&&(g=a.length),this.host=a.slice(0,g),a=a.slice(g),this.parseHost(),this.hostname=this.hostname||"";var b="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!b)for(var w=this.hostname.split(/\./),L=(y=0,w.length);y<L;y++){var M=w[y];if(M&&!M.match(C)){for(var F="",A=0,k=M.length;A<k;A++)M.charCodeAt(A)>127?F+="x":F+=M[A];if(!F.match(C)){var N=w.slice(0,y),j=w.slice(y+1),G=M.match(P);G&&(N.push(G[1]),j.unshift(G[2])),j.length&&(a="/"+j.join(".")+a),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),b||(this.hostname=u.toASCII(this.hostname));var D=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+D,this.href+=this.host,b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!R[c])for(y=0,L=S.length;y<L;y++){var U=S[y];if(-1!==a.indexOf(U)){var B=encodeURIComponent(U);B===U&&(B=escape(U)),a=a.split(U).join(B)}}var Y=a.indexOf("#");-1!==Y&&(this.hash=a.substr(Y),a=a.slice(0,Y));var V=a.indexOf("?");if(-1!==V?(this.search=a.substr(V),this.query=a.substr(V+1),e&&(this.query=m.parse(this.query)),a=a.slice(0,V)):e&&(this.search="",this.query={}),a&&(this.pathname=a),I[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var W=this.search||"";this.path=D+W}return this.href=this.format(),this},v.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&h(this.query)&&Object.keys(this.query).length&&(o=m.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||I[e])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),e+i+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+n},v.prototype.resolve=function(t){return this.resolveObject(L(t,!1,!0)).format()},v.prototype.resolveObject=function(t){if(l(t)){var e=new v;e.parse(t,!1,!0),t=e}for(var r=new v,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),s=0;s<a.length;s++){var u=a[s];"protocol"!==u&&(r[u]=t[u])}return I[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!I[t.protocol]){for(var h=Object.keys(t),f=0;f<h.length;f++){var d=h[f];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||O[t.protocol])r.pathname=t.pathname;else{for(var g=(t.pathname||"").split("/");g.length&&!(t.host=g.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==g[0]&&g.unshift(""),g.length<2&&g.unshift(""),r.pathname=g.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var y=r.pathname||"",m=r.search||"";r.path=y+m}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&"/"===r.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),x=b||_||r.host&&t.pathname,w=x,S=r.pathname&&r.pathname.split("/")||[],T=(g=t.pathname&&t.pathname.split("/")||[],r.protocol&&!I[r.protocol]);if(T&&(r.hostname="",r.port=null,r.host&&(""===S[0]?S[0]=r.host:S.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===g[0]?g[0]=t.host:g.unshift(t.host)),t.host=null),x=x&&(""===g[0]||""===S[0])),b)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,S=g;else if(g.length)S||(S=[]),S.pop(),S=S.concat(g),r.search=t.search,r.query=t.query;else if(!p(t.search)){if(T)r.hostname=r.host=S.shift(),(L=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=L.shift(),r.host=r.hostname=L.shift());return r.search=t.search,r.query=t.query,c(r.pathname)&&c(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=S.slice(-1)[0],C=(r.host||t.host||S.length>1)&&("."===E||".."===E)||""===E,P=0,R=S.length;R>=0;R--)"."===(E=S[R])?S.splice(R,1):".."===E?(S.splice(R,1),P++):P&&(S.splice(R,1),P--);if(!x&&!w)for(;P--;P)S.unshift("..");!x||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),C&&"/"!==S.join("/").substr(-1)&&S.push("");var L,M=""===S[0]||S[0]&&"/"===S[0].charAt(0);T&&(r.hostname=r.host=M?"":S.length?S.shift():"",(L=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=L.shift(),r.host=r.hostname=L.shift()));return(x=x||r.host&&S.length)&&!M&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),c(r.pathname)&&c(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},v.prototype.parseHost=function(){var t=this.host,e=b.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};function M(t){for(var e=[],r=arguments.length-1;r-->0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var o=i[n];for(var a in o)t[a]=o[a]}return t}var F=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),A=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r<n.length;r+=1){var i=n[r],o=i[0],a=i[1];this.bindings[o]=a}};A.prototype.concat=function(t){return new A(this,t)},A.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},A.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var k={kind:"null"},N={kind:"number"},j={kind:"string"},G={kind:"boolean"},D={kind:"color"},z={kind:"object"},U={kind:"value"},B={kind:"collator"},Y={kind:"formatted"},V={kind:"resolvedImage"};function W(t,e){return{kind:"array",itemType:t,N:e}}function q(t){if("array"===t.kind){var e=q(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var X=[k,N,j,G,D,Y,z,W(U),V];function Z(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Z(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=X;r<n.length;r+=1){if(!Z(n[r],e))return null}}return"Expected "+q(t)+" but found "+q(e)+" instead."}function K(t,e){return e.some((function(e){return e.kind===t.kind}))}function H(t,e){return e.some((function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t}))}var J=s((function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function a(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=i.indexOf("("),l=i.indexOf(")");if(-1!==u&&l+1===i.length){var h=i.substr(0,u),c=i.substr(u+1,l-(u+1)).split(","),p=1;switch(h){case"rgba":if(4!==c.length)return null;p=a(c.pop());case"rgb":return 3!==c.length?null:[o(c[0]),o(c[1]),o(c[2]),p];case"hsla":if(4!==c.length)return null;p=a(c.pop());case"hsl":if(3!==c.length)return null;var f=(parseFloat(c[0])%360+360)%360/360,d=a(c[1]),g=a(c[2]),y=g<=.5?g*(d+1):g+d-g*d,m=2*g-y;return[n(255*s(m,y,f+1/3)),n(255*s(m,y,f)),n(255*s(m,y,f-1/3)),p];default:return null}}return null}}catch(t){}})).parseCSSColor,$=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};$.parse=function(t){if(t){if(t instanceof $)return t;if("string"==typeof t){var e=J(t);if(e)return new $(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},$.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(n)+","+i+")"},$.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},$.black=new $(0,0,0,1),$.white=new $(1,1,1,1),$.transparent=new $(0,0,0,0),$.red=new $(1,0,0,1);var Q=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Q.prototype.compare=function(t,e){return this.collator.compare(t,e)},Q.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var tt=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},et=function(t){this.sections=t};et.fromString=function(t){return new et([new tt(t,null,null,null,null)])},et.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},et.factory=function(t){return t instanceof et?t:et.fromString(t)},et.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},et.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];if(n.image)t.push(["image",n.image.name]);else{t.push(n.text);var i={};n.fontStack&&(i["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(i["font-scale"]=n.scale),n.textColor&&(i["text-color"]=["rgba"].concat(n.textColor.toArray())),t.push(i)}}return t};var rt=function(t){this.name=t.name,this.available=t.available};function nt(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function it(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof $)return!0;if(t instanceof Q)return!0;if(t instanceof et)return!0;if(t instanceof rt)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1){if(!it(r[e]))return!1}return!0}if("object"==typeof t){for(var n in t)if(!it(t[n]))return!1;return!0}return!1}function ot(t){if(null===t)return k;if("string"==typeof t)return j;if("boolean"==typeof t)return G;if("number"==typeof t)return N;if(t instanceof $)return D;if(t instanceof Q)return B;if(t instanceof et)return Y;if(t instanceof rt)return V;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n<i.length;n+=1){var o=ot(i[n]);if(e){if(e===o)continue;e=U;break}e=o}return W(e||U,r)}return z}function at(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof $||t instanceof et||t instanceof rt?t.toString():JSON.stringify(t)}rt.prototype.toString=function(){return this.name},rt.fromString=function(t){return t?new rt({name:t,available:!1}):null},rt.prototype.serialize=function(){return["image",this.name]};var st=function(t,e){this.type=t,this.value=e};st.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!it(t[1]))return e.error("invalid value");var r=t[1],n=ot(r),i=e.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new st(n,r)},st.prototype.evaluate=function(){return this.value},st.prototype.eachChild=function(){},st.prototype.outputDefined=function(){return!0},st.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof $?["rgba"].concat(this.value.toArray()):this.value instanceof et?this.value.serialize():this.value};var ut=function(t){this.name="ExpressionEvaluationError",this.message=t};ut.prototype.toJSON=function(){return this.message};var lt={string:j,number:N,boolean:G,object:z},ht=function(t,e){this.type=t,this.args=e};ht.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,n=1,i=t[0];if("array"===i){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in lt)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=lt[s],n++}else o=U;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],n++}r=W(o,a)}else r=lt[i];for(var u=[];n<t.length;n++){var l=e.parse(t[n],n,U);if(!l)return null;u.push(l)}return new ht(r,u)},ht.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!Z(this.type,ot(r)))return r;if(e===this.args.length-1)throw new ut("Expected value to be of type "+q(this.type)+", but found "+q(ot(r))+" instead.")}return null},ht.prototype.eachChild=function(t){this.args.forEach(t)},ht.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},ht.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var ct=function(t){this.type=Y,this.sections=t};ct.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],i=!1,o=1;o<=t.length-1;++o){var a=t[o];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,N)))return null;var u=null;if(a["text-font"]&&!(u=e.parse(a["text-font"],1,W(j))))return null;var l=null;if(a["text-color"]&&!(l=e.parse(a["text-color"],1,D)))return null;var h=n[n.length-1];h.scale=s,h.font=u,h.textColor=l}else{var c=e.parse(t[o],1,U);if(!c)return null;var p=c.type.kind;if("string"!==p&&"value"!==p&&"null"!==p&&"resolvedImage"!==p)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:c,scale:null,font:null,textColor:null})}}return new ct(n)},ct.prototype.evaluate=function(t){return new et(this.sections.map((function(e){var r=e.content.evaluate(t);return ot(r)===V?new tt("",r,null,null,null):new tt(at(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},ct.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t(n.content),n.scale&&t(n.scale),n.font&&t(n.font),n.textColor&&t(n.textColor)}},ct.prototype.outputDefined=function(){return!1},ct.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t.push(n.content.serialize());var i={};n.scale&&(i["font-scale"]=n.scale.serialize()),n.font&&(i["text-font"]=n.font.serialize()),n.textColor&&(i["text-color"]=n.textColor.serialize()),t.push(i)}return t};var pt=function(t){this.type=V,this.input=t};pt.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,j);return r?new pt(r):e.error("No image name provided.")},pt.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=rt.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r},pt.prototype.eachChild=function(t){t(this.input)},pt.prototype.outputDefined=function(){return!1},pt.prototype.serialize=function(){return["image",this.input.serialize()]};var ft={"to-boolean":G,"to-color":D,"to-number":N,"to-string":j},dt=function(t,e){this.type=t,this.args=e};dt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=ft[r],i=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,U);if(!a)return null;i.push(a)}return new dt(n,i)},dt.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,n=0,i=this.args;n<i.length;n+=1){if(r=null,(e=i[n].evaluate(t))instanceof $)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":nt(e[0],e[1],e[2],e[3])))return new $(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ut(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,u=this.args;s<u.length;s+=1){if(null===(a=u[s].evaluate(t)))return 0;var l=Number(a);if(!isNaN(l))return l}throw new ut("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?et.fromString(at(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?rt.fromString(at(this.args[0].evaluate(t))):at(this.args[0].evaluate(t))},dt.prototype.eachChild=function(t){this.args.forEach(t)},dt.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},dt.prototype.serialize=function(){if("formatted"===this.type.kind)return new ct([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new pt(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var gt=["Unknown","Point","LineString","Polygon"],yt=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};yt.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},yt.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?gt[this.feature.type]:this.feature.type:null},yt.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},yt.prototype.canonicalID=function(){return this.canonical},yt.prototype.properties=function(){return this.feature&&this.feature.properties||{}},yt.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=$.parse(t)),e};var mt=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};mt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},mt.prototype.eachChild=function(t){this.args.forEach(t)},mt.prototype.outputDefined=function(){return!1},mt.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},mt.parse=function(t,e){var r,n=t[0],i=mt.definitions[n];if(!i)return e.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter((function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1})),u=null,l=0,h=s;l<h.length;l+=1){var c=h[l],p=c[0],f=c[1];u=new Dt(e.registry,e.path,null,e.scope);for(var d=[],g=!1,y=1;y<t.length;y++){var m=t[y],v=Array.isArray(p)?p[y-1]:p.type,_=u.parse(m,1+d.length,v);if(!_){g=!0;break}d.push(_)}if(!g)if(Array.isArray(p)&&p.length!==d.length)u.error("Expected "+p.length+" arguments, but found "+d.length+" instead.");else{for(var b=0;b<d.length;b++){var x=Array.isArray(p)?p[b]:p.type,w=d[b];u.concat(b+1).checkSubtype(x,w.type)}if(0===u.errors.length)return new mt(n,o,f,d)}}if(1===s.length)(r=e.errors).push.apply(r,u.errors);else{for(var S=(s.length?s:a).map((function(t){var e,r=t[0];return e=r,Array.isArray(e)?"("+e.map(q).join(", ")+")":"("+q(e.type)+"...)"})).join(" | "),T=[],E=1;E<t.length;E++){var C=e.parse(t[E],1+T.length);if(!C)return null;T.push(q(C.type))}e.error("Expected arguments of type "+S+", but found ("+T.join(", ")+") instead.")}return null},mt.register=function(t,e){for(var r in mt.definitions=e,e)t[r]=mt};var vt=function(t,e,r){this.type=B,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};vt.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,G);if(!n)return null;var i=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,G);if(!i)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,j))?null:new vt(n,i,o)},vt.prototype.evaluate=function(t){return new Q(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},vt.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},vt.prototype.outputDefined=function(){return!1},vt.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};function _t(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function bt(t,e){return!(t[0]<=e[0])&&(!(t[2]>=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function xt(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),o=Math.pow(2,e.z);return[Math.round(n*o*8192),Math.round(i*o*8192)]}function wt(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function St(t,e){for(var r,n,i,o,a,s,u,l=!1,h=0,c=e.length;h<c;h++)for(var p=e[h],f=0,d=p.length;f<d-1;f++){if(r=t,n=p[f],i=p[f+1],o=void 0,a=void 0,s=void 0,u=void 0,o=r[0]-n[0],a=r[1]-n[1],s=r[0]-i[0],u=r[1]-i[1],o*u-s*a==0&&o*s<=0&&a*u<=0)return!1;wt(t,p[f],p[f+1])&&(l=!l)}return l}function Tt(t,e){for(var r=0;r<e.length;r++)if(St(t,e[r]))return!0;return!1}function Et(t,e,r,n){var i=t[0]-r[0],o=t[1]-r[1],a=e[0]-r[0],s=e[1]-r[1],u=n[0]-r[0],l=n[1]-r[1],h=i*l-u*o,c=a*l-u*s;return h>0&&c<0||h<0&&c>0}function Ct(t,e,r){for(var n=0,i=r;n<i.length;n+=1)for(var o=i[n],a=0;a<o.length-1;++a)if(s=t,u=e,l=o[a],h=o[a+1],c=void 0,p=void 0,f=void 0,d=void 0,f=[u[0]-s[0],u[1]-s[1]],d=[h[0]-l[0],h[1]-l[1]],0!=(c=d)[0]*(p=f)[1]-c[1]*p[0]&&Et(s,u,l,h)&&Et(l,h,s,u))return!0;var s,u,l,h,c,p,f,d;return!1}function Pt(t,e){for(var r=0;r<t.length;++r)if(!St(t[r],e))return!1;for(var n=0;n<t.length-1;++n)if(Ct(t[n],t[n+1],e))return!1;return!0}function Rt(t,e){for(var r=0;r<e.length;r++)if(Pt(t,e[r]))return!0;return!1}function Ot(t,e,r){for(var n=[],i=0;i<t.length;i++){for(var o=[],a=0;a<t[i].length;a++){var s=xt(t[i][a],r);_t(e,s),o.push(s)}n.push(o)}return n}function It(t,e,r){for(var n=[],i=0;i<t.length;i++){var o=Ot(t[i],e,r);n.push(o)}return n}function Lt(t,e,r,n){if(t[0]<r[0]||t[0]>r[2]){var i=.5*n,o=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===o&&(o=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=o}_t(e,t)}function Mt(t,e,r,n){for(var i=8192*Math.pow(2,n.z),o=[8192*n.x,8192*n.y],a=[],s=0,u=t;s<u.length;s+=1)for(var l=0,h=u[s];l<h.length;l+=1){var c=h[l],p=[c.x+o[0],c.y+o[1]];Lt(p,e,r,i),a.push(p)}return a}function Ft(t,e,r,n){for(var i,o=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],s=[],u=0,l=t;u<l.length;u+=1){for(var h=[],c=0,p=l[u];c<p.length;c+=1){var f=p[c],d=[f.x+a[0],f.y+a[1]];_t(e,d),h.push(d)}s.push(h)}if(e[2]-e[0]<=o/2){(i=e)[0]=i[1]=1/0,i[2]=i[3]=-1/0;for(var g=0,y=s;g<y.length;g+=1)for(var m=0,v=y[g];m<v.length;m+=1){Lt(v[m],e,r,o)}}return s}var At=function(t,e){this.type=G,this.geojson=t,this.geometries=e};function kt(t){if(t instanceof mt){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof At)return!1;var e=!0;return t.eachChild((function(t){e&&!kt(t)&&(e=!1)})),e}function Nt(t){if(t instanceof mt&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!Nt(t)&&(e=!1)})),e}function jt(t,e){if(t instanceof mt&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild((function(t){r&&!jt(t,e)&&(r=!1)})),r}At.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(it(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var n=0;n<r.features.length;++n){var i=r.features[n].geometry.type;if("Polygon"===i||"MultiPolygon"===i)return new At(r,r.features[n].geometry)}else if("Feature"===r.type){var o=r.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new At(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new At(r,r)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},At.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var o=Ot(e.coordinates,n,i),a=Mt(t.geometry(),r,n,i);if(!bt(r,n))return!1;for(var s=0,u=a;s<u.length;s+=1){if(!St(u[s],o))return!1}}if("MultiPolygon"===e.type){var l=It(e.coordinates,n,i),h=Mt(t.geometry(),r,n,i);if(!bt(r,n))return!1;for(var c=0,p=h;c<p.length;c+=1){if(!Tt(p[c],l))return!1}}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var o=Ot(e.coordinates,n,i),a=Ft(t.geometry(),r,n,i);if(!bt(r,n))return!1;for(var s=0,u=a;s<u.length;s+=1){if(!Pt(u[s],o))return!1}}if("MultiPolygon"===e.type){var l=It(e.coordinates,n,i),h=Ft(t.geometry(),r,n,i);if(!bt(r,n))return!1;for(var c=0,p=h;c<p.length;c+=1){if(!Rt(p[c],l))return!1}}return!0}(t,this.geometries)}return!1},At.prototype.eachChild=function(){},At.prototype.outputDefined=function(){return!0},At.prototype.serialize=function(){return["within",this.geojson]};var Gt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Gt.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new Gt(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Gt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Gt.prototype.eachChild=function(){},Gt.prototype.outputDefined=function(){return!1},Gt.prototype.serialize=function(){return["var",this.name]};var Dt=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new A),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=n,this.errors=i,this.expectedType=r};function zt(t,e){for(var r,n,i=t.length-1,o=0,a=i,s=0;o<=a;)if(r=t[s=Math.floor((o+a)/2)],n=t[s+1],r<=e){if(s===i||e<n)return s;o=s+1}else{if(!(r>e))throw new ut("Input is not a number.");a=s-1}return 0}Dt.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},Dt.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ht(e,[t]):"coerce"===r?new dt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}if(!(o instanceof st)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof Gt)return t(e.boundExpression);if(e instanceof mt&&"error"===e.name)return!1;if(e instanceof vt)return!1;if(e instanceof At)return!1;var r=e instanceof dt||e instanceof ht,n=!0;if(e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof st})),!n)return!1;return kt(e)&&jt(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var u=new yt;try{o=new st(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Dt.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new Dt(this.registry,n,e||null,i,this.errors)},Dt.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-->0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new F(n,t))},Dt.prototype.checkSubtype=function(t,e){var r=Z(t,e);return r&&this.error(r),r};var Ut=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n<i.length;n+=1){var o=i[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};Ut.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");var r=e.parse(t[1],1,N);if(!r)return null;var n=[],i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var o=1;o<t.length;o+=2){var a=1===o?-1/0:t[o],s=t[o+1],u=o,l=o+1;if("number"!=typeof a)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(n.length&&n[n.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var h=e.parse(s,l,i);if(!h)return null;i=i||h.type,n.push([a,h])}return new Ut(i,r,n)},Ut.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[zt(e,n)].evaluate(t)},Ut.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},Ut.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},Ut.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Bt=Yt;function Yt(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}function Vt(t,e,r){return t*(1-r)+e*r}Yt.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},Yt.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},Yt.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},Yt.prototype.solveCurveX=function(t,e){var r,n,i,o,a;for(void 0===e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if((i=t)<(r=0))return r;if(i>(n=1))return n;for(;r<n;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?r=i:n=i,i=.5*(n-r)+r}return i},Yt.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Wt=Object.freeze({__proto__:null,number:Vt,color:function(t,e,r){return new $(Vt(t.r,e.r,r),Vt(t.g,e.g,r),Vt(t.b,e.b,r),Vt(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return Vt(t,e[n],r)}))}}),qt=6/29,Xt=3*qt*qt,Zt=Math.PI/180,Kt=180/Math.PI;function Ht(t){return t>.008856451679035631?Math.pow(t,1/3):t/Xt+4/29}function Jt(t){return t>qt?t*t*t:Xt*(t-4/29)}function $t(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Qt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function te(t){var e=Qt(t.r),r=Qt(t.g),n=Qt(t.b),i=Ht((.4124564*e+.3575761*r+.1804375*n)/.95047),o=Ht((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-Ht((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function ee(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*Jt(e),r=.95047*Jt(r),n=1.08883*Jt(n),new $($t(3.2404542*r-1.5371385*e-.4985314*n),$t(-.969266*r+1.8760108*e+.041556*n),$t(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function re(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var ne={forward:te,reverse:ee,interpolate:function(t,e,r){return{l:Vt(t.l,e.l,r),a:Vt(t.a,e.a,r),b:Vt(t.b,e.b,r),alpha:Vt(t.alpha,e.alpha,r)}}},ie={forward:function(t){var e=te(t),r=e.l,n=e.a,i=e.b,o=Math.atan2(i,n)*Kt;return{h:o<0?o+360:o,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*Zt,r=t.c;return ee({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:re(t.h,e.h,r),c:Vt(t.c,e.c,r),l:Vt(t.l,e.l,r),alpha:Vt(t.alpha,e.alpha,r)}}},oe=Object.freeze({__proto__:null,lab:ne,hcl:ie}),ae=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=i;o<a.length;o+=1){var s=a[o],u=s[0],l=s[1];this.labels.push(u),this.outputs.push(l)}};function se(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}ae.interpolationFactor=function(t,e,r,n){var i=0;if("exponential"===t.name)i=se(e,t.base,r,n);else if("linear"===t.name)i=se(e,1,r,n);else if("cubic-bezier"===t.name){var o=t.controlPoints;i=new Bt(o[0],o[1],o[2],o[3]).solve(se(e,1,r,n))}return i},ae.parse=function(t,e){var r=t[0],n=t[1],i=t[2],o=t.slice(3);if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return e.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,N)))return null;var u=[],l=null;"interpolate-hcl"===r||"interpolate-lab"===r?l=D:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var h=0;h<o.length;h+=2){var c=o[h],p=o[h+1],f=h+3,d=h+4;if("number"!=typeof c)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(u.length&&u[u.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var g=e.parse(p,d,l);if(!g)return null;l=l||g.type,u.push([c,g])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new ae(l,r,n,i,u):e.error("Type "+q(l)+" is not interpolatable.")},ae.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var o=zt(e,n),a=e[o],s=e[o+1],u=ae.interpolationFactor(this.interpolation,n,a,s),l=r[o].evaluate(t),h=r[o+1].evaluate(t);return"interpolate"===this.operator?Wt[this.type.kind.toLowerCase()](l,h,u):"interpolate-hcl"===this.operator?ie.reverse(ie.interpolate(ie.forward(l),ie.forward(h),u)):ne.reverse(ne.interpolate(ne.forward(l),ne.forward(h),u))},ae.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},ae.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},ae.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var ue=function(t,e){this.type=t,this.args=e};ue.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,n=e.expectedType;n&&"value"!==n.kind&&(r=n);for(var i=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],u=e.parse(s,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!u)return null;r=r||u.type,i.push(u)}var l=n&&i.some((function(t){return Z(n,t.type)}));return new ue(l?U:r,i)},ue.prototype.evaluate=function(t){for(var e,r=null,n=0,i=0,o=this.args;i<o.length;i+=1){if(n++,(r=o[i].evaluate(t))&&r instanceof rt&&!r.available&&(e||(e=r.name),r=null,n===this.args.length&&(r=e)),null!==r)break}return r},ue.prototype.eachChild=function(t){this.args.forEach(t)},ue.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},ue.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var le=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};le.prototype.evaluate=function(t){return this.result.evaluate(t)},le.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1){t(r[e][1])}t(this.result)},le.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],n=1;n<t.length-1;n+=2){var i=t[n];if("string"!=typeof i)return e.error("Expected string, but found "+typeof i+" instead.",n);if(/[^a-zA-Z0-9_]/.test(i))return e.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=e.parse(t[n+1],n+1);if(!o)return null;r.push([i,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return a?new le(r,a):null},le.prototype.outputDefined=function(){return this.result.outputDefined()},le.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t.push(i,o.serialize())}return t.push(this.result.serialize()),t};var he=function(t,e,r){this.type=t,this.index=e,this.input=r};he.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,N),n=e.parse(t[2],2,W(e.expectedType||U));if(!r||!n)return null;var i=n.type;return new he(i.itemType,r,n)},he.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new ut("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new ut("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new ut("Array index must be an integer, but found "+e+" instead.");return r[e]},he.prototype.eachChild=function(t){t(this.index),t(this.input)},he.prototype.outputDefined=function(){return!1},he.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ce=function(t,e){this.type=G,this.needle=t,this.haystack=e};ce.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,U),n=e.parse(t[2],2,U);return r&&n?K(r.type,[G,j,N,k,U])?new ce(r,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+q(r.type)+" instead"):null},ce.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!H(e,["boolean","string","number","null"]))throw new ut("Expected first argument to be of type boolean, string, number or null, but found "+q(ot(e))+" instead.");if(!H(r,["string","array"]))throw new ut("Expected second argument to be of type array or string, but found "+q(ot(r))+" instead.");return r.indexOf(e)>=0},ce.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},ce.prototype.outputDefined=function(){return!0},ce.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var pe=function(t,e,r){this.type=N,this.needle=t,this.haystack=e,this.fromIndex=r};pe.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,U),n=e.parse(t[2],2,U);if(!r||!n)return null;if(!K(r.type,[G,j,N,k,U]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+q(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,N);return i?new pe(r,n,i):null}return new pe(r,n)},pe.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!H(e,["boolean","string","number","null"]))throw new ut("Expected first argument to be of type boolean, string, number or null, but found "+q(ot(e))+" instead.");if(!H(r,["string","array"]))throw new ut("Expected second argument to be of type array or string, but found "+q(ot(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},pe.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},pe.prototype.outputDefined=function(){return!1},pe.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var fe=function(t,e,r,n,i,o){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o};fe.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],u=t[a+1];Array.isArray(s)||(s=[s]);var l=e.concat(a);if(0===s.length)return l.error("Expected at least one branch label.");for(var h=0,c=s;h<c.length;h+=1){var p=c[h];if("number"!=typeof p&&"string"!=typeof p)return l.error("Branch labels must be numbers or strings.");if("number"==typeof p&&Math.abs(p)>Number.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return l.error("Numeric branch labels must be integer values.");if(r){if(l.checkSubtype(r,ot(p)))return null}else r=ot(p);if(void 0!==i[String(p)])return l.error("Branch labels must be unique.");i[String(p)]=o.length}var f=e.parse(u,a,n);if(!f)return null;n=n||f.type,o.push(f)}var d=e.parse(t[1],1,U);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new fe(r,n,d,i,o,g):null},fe.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ot(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},fe.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},fe.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},fe.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,o=Object.keys(this.cases).sort();i<o.length;i+=1){var a=o[i];void 0===(c=n[this.cases[a]])?(n[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[c][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,l=r;u<l.length;u+=1){var h=l[u],c=h[0],p=h[1];1===p.length?e.push(s(p[0])):e.push(p.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var de=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};de.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i<t.length-1;i+=2){var o=e.parse(t[i],i,G);if(!o)return null;var a=e.parse(t[i+1],i+1,r);if(!a)return null;n.push([o,a]),r=r||a.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new de(r,n,s):null},de.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];if(i.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},de.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],o=n[1];t(i),t(o)}t(this.otherwise)},de.prototype.outputDefined=function(){return this.branches.every((function(t){t[0];return t[1].outputDefined()}))&&this.otherwise.outputDefined()},de.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t};var ge=function(t,e,r,n){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=n};function ye(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function me(t,e,r,n){return 0===n.compare(e,r)}function ve(t,e,r){var n="=="!==t&&"!="!==t;return function(){function i(t,e,r){this.type=G,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return i.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],o=e.parse(t[1],1,U);if(!o)return null;if(!ye(r,o.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+q(o.type)+"'.");var a=e.parse(t[2],2,U);if(!a)return null;if(!ye(r,a.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+q(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+q(o.type)+"' and '"+q(a.type)+"'.");n&&("value"===o.type.kind&&"value"!==a.type.kind?o=new ht(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new ht(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,B)))return null}return new i(o,a,s)},i.prototype.evaluate=function(i){var o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=ot(o),u=ot(a);if(s.kind!==u.kind||"string"!==s.kind&&"number"!==s.kind)throw new ut('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var l=ot(o),h=ot(a);if("string"!==l.kind||"string"!==h.kind)return e(i,o,a)}return this.collator?r(i,o,a,this.collator.evaluate(i)):e(i,o,a)},i.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},i}()}ge.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,U),n=e.parse(t[2],2,N);if(!r||!n)return null;if(!K(r.type,[W(U),j,U]))return e.error("Expected first argument to be of type array or string, but found "+q(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,N);return i?new ge(r.type,r,n,i):null}return new ge(r.type,r,n)},ge.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!H(e,["string","array"]))throw new ut("Expected first argument to be of type array or string, but found "+q(ot(e))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},ge.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},ge.prototype.outputDefined=function(){return!1},ge.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var _e=ve("==",(function(t,e,r){return e===r}),me),be=ve("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!me(0,e,r,n)})),xe=ve("<",(function(t,e,r){return e<r}),(function(t,e,r,n){return n.compare(e,r)<0})),we=ve(">",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Se=ve("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),Te=ve(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Ee=function(t,e,r,n,i){this.type=j,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ee.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,N);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,j)))return null;var o=null;if(n.currency&&!(o=e.parse(n.currency,1,j)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=e.parse(n["min-fraction-digits"],1,N)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,N))?null:new Ee(r,i,o,a,s)},Ee.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ee.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ee.prototype.outputDefined=function(){return!1},Ee.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Ce=function(t){this.type=N,this.input=t};Ce.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+q(r.type)+" instead."):new Ce(r):null},Ce.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ut("Expected value to be of type string or array, but found "+q(ot(e))+" instead.")},Ce.prototype.eachChild=function(t){t(this.input)},Ce.prototype.outputDefined=function(){return!1},Ce.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Pe={"==":_e,"!=":be,">":we,"<":xe,">=":Te,"<=":Se,array:ht,at:he,boolean:ht,case:de,coalesce:ue,collator:vt,format:ct,image:pt,in:ce,"index-of":pe,interpolate:ae,"interpolate-hcl":ae,"interpolate-lab":ae,length:Ce,let:le,literal:st,match:fe,number:ht,"number-format":Ee,object:ht,slice:ge,step:Ut,string:ht,"to-boolean":dt,"to-color":dt,"to-number":dt,"to-string":dt,var:Gt,within:At};function Re(t,e){var r=e[0],n=e[1],i=e[2],o=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var a=o?o.evaluate(t):1,s=nt(r,n,i,a);if(s)throw new ut(s);return new $(r/255*a,n/255*a,i/255*a,a)}function Oe(t,e){return t in e}function Ie(t,e){var r=e[t];return void 0===r?null:r}function Le(t){return{type:t}}function Me(t){return{result:"success",value:t}}function Fe(t){return{result:"error",value:t}}function Ae(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ke(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Ne(t){return!!t.expression&&t.expression.interpolated}function je(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Ge(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function De(t){return t}function ze(t,e){var r,n,i,o="color"===e.type,a=t.stops&&"object"==typeof t.stops[0][0],s=a||void 0!==t.property,u=a||!s,l=t.type||(Ne(e)?"exponential":"interval");if(o&&((t=M({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],$.parse(t[1])]}))),t.default?t.default=$.parse(t.default):t.default=$.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!oe[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===l)r=Ve;else if("interval"===l)r=Ye;else if("categorical"===l){r=Be,n=Object.create(null);for(var h=0,c=t.stops;h<c.length;h+=1){var p=c[h];n[p[0]]=p[1]}i=typeof t.stops[0][0]}else{if("identity"!==l)throw new Error('Unknown function type "'+l+'"');r=We}if(a){for(var f={},d=[],g=0;g<t.stops.length;g++){var y=t.stops[g],m=y[0].zoom;void 0===f[m]&&(f[m]={zoom:m,type:t.type,property:t.property,default:t.default,stops:[]},d.push(m)),f[m].stops.push([y[0].value,y[1]])}for(var v=[],_=0,b=d;_<b.length;_+=1){var x=b[_];v.push([f[x].zoom,ze(f[x],e)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:ae.interpolationFactor.bind(void 0,w),zoomStops:v.map((function(t){return t[0]})),evaluate:function(r,n){var i=r.zoom;return Ve({stops:v,base:t.base},e,i).evaluate(i,n)}}}if(u){var S="exponential"===l?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:S,interpolationFactor:ae.interpolationFactor.bind(void 0,S),zoomStops:t.stops.map((function(t){return t[0]})),evaluate:function(o){var a=o.zoom;return r(t,e,a,n,i)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[t.property]:void 0;return void 0===s?Ue(t.default,e.default):r(t,e,s,n,i)}}}function Ue(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Be(t,e,r,n,i){return Ue(typeof r===i?n[r]:void 0,t.default,e.default)}function Ye(t,e,r){if("number"!==je(r))return Ue(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=zt(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Ve(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==je(r))return Ue(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var o=zt(t.stops.map((function(t){return t[0]})),r),a=function(t,e,r,n){var i=n-r,o=t-r;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],u=t.stops[o+1][1],l=Wt[e.type]||De;if(t.colorSpace&&"rgb"!==t.colorSpace){var h=oe[t.colorSpace];l=function(t,e){return h.reverse(h.interpolate(h.forward(t),h.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=u.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return l(r,n,a)}}:l(s,u,a)}function We(t,e,r){return"color"===e.type?r=$.parse(r):"formatted"===e.type?r=et.fromString(r.toString()):"resolvedImage"===e.type?r=rt.fromString(r.toString()):je(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Ue(r,t.default,e.default)}mt.register(Pe,{error:[{kind:"error"},[j],function(t,e){var r=e[0];throw new ut(r.evaluate(t))}],typeof:[j,[U],function(t,e){return q(ot(e[0].evaluate(t)))}],"to-rgba":[W(N,4),[D],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[D,[N,N,N],Re],rgba:[D,[N,N,N,N],Re],has:{type:G,overloads:[[[j],function(t,e){return Oe(e[0].evaluate(t),t.properties())}],[[j,z],function(t,e){var r=e[0],n=e[1];return Oe(r.evaluate(t),n.evaluate(t))}]]},get:{type:U,overloads:[[[j],function(t,e){return Ie(e[0].evaluate(t),t.properties())}],[[j,z],function(t,e){var r=e[0],n=e[1];return Ie(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[U,[j],function(t,e){return Ie(e[0].evaluate(t),t.featureState||{})}],properties:[z,[],function(t){return t.properties()}],"geometry-type":[j,[],function(t){return t.geometryType()}],id:[U,[],function(t){return t.id()}],zoom:[N,[],function(t){return t.globals.zoom}],"heatmap-density":[N,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[N,[],function(t){return t.globals.lineProgress||0}],accumulated:[U,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[N,Le(N),function(t,e){for(var r=0,n=0,i=e;n<i.length;n+=1){r+=i[n].evaluate(t)}return r}],"*":[N,Le(N),function(t,e){for(var r=1,n=0,i=e;n<i.length;n+=1){r*=i[n].evaluate(t)}return r}],"-":{type:N,overloads:[[[N,N],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[N],function(t,e){return-e[0].evaluate(t)}]]},"/":[N,[N,N],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],"%":[N,[N,N],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[N,[],function(){return Math.LN2}],pi:[N,[],function(){return Math.PI}],e:[N,[],function(){return Math.E}],"^":[N,[N,N],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[N,[N],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[N,[N],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN10}],ln:[N,[N],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[N,[N],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN2}],sin:[N,[N],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[N,[N],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[N,[N],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[N,[N],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[N,[N],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[N,[N],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[N,Le(N),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[N,Le(N),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[N,[N],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[N,[N],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[N,[N],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[N,[N],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],"filter-==":[G,[j,U],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],"filter-id-==":[G,[U],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[G,[j],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[G,[j,U],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<o}],"filter-id-<":[G,[U],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<i}],"filter->":[G,[j,U],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>o}],"filter-id->":[G,[U],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[G,[j,U],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[G,[U],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[G,[j,U],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],o=n.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[G,[U],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[G,[U],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[G,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[G,[W(j)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[G,[W(U)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[G,[j,W(U)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[G,[j,W(U)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:G,overloads:[[[G,G],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Le(G),function(t,e){for(var r=0,n=e;r<n.length;r+=1){if(!n[r].evaluate(t))return!1}return!0}]]},any:{type:G,overloads:[[[G,G],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Le(G),function(t,e){for(var r=0,n=e;r<n.length;r+=1){if(n[r].evaluate(t))return!0}return!1}]]},"!":[G,[G],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[G,[j],function(t,e){var r=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[j,[j],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[j,[j],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[j,Le(U),function(t,e){return e.map((function(e){return at(e.evaluate(t))})).join("")}],"resolved-locale":[j,[B],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var qe=function(t,e){var r;this.expression=t,this._warningHistory={},this._evaluator=new yt,this._defaultValue=e?"color"===(r=e).type&&Ge(r.default)?new $(0,0,0,0):"color"===r.type?$.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function Xe(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Pe}function Ze(t,e){var r=new Dt(Pe,[],e?function(t){var e={color:D,string:j,number:N,enum:j,boolean:G,formatted:Y,resolvedImage:V};if("array"===t.type)return W(e[t.value]||U,t.length);return e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Me(new qe(n,e)):Fe(r.errors)}qe.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},qe.prototype.evaluate=function(t,e,r,n,i,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new ut("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Ke=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Nt(e.expression)};Ke.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,o)},Ke.prototype.evaluate=function(t,e,r,n,i,o){return this._styleExpression.evaluate(t,e,r,n,i,o)};var He=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Nt(e.expression),this.interpolationType=n};function Je(t,e){if("error"===(t=Ze(t,e)).result)return t;var r=t.value.expression,n=kt(r);if(!n&&!Ae(e))return Fe([new F("","data expressions not supported")]);var i=jt(r,["zoom"]);if(!i&&!ke(e))return Fe([new F("","zoom expressions not supported")]);var o=function t(e){var r=null;if(e instanceof le)r=t(e.result);else if(e instanceof ue)for(var n=0,i=e.args;n<i.length;n+=1){var o=i[n];if(r=t(o))break}else(e instanceof Ut||e instanceof ae)&&e.input instanceof mt&&"zoom"===e.input.name&&(r=e);if(r instanceof F)return r;return e.eachChild((function(e){var n=t(e);n instanceof F?r=n:!r&&n?r=new F("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&n&&r!==n&&(r=new F("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),r}(r);if(!o&&!i)return Fe([new F("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof F)return Fe([o]);if(o instanceof ae&&!Ne(e))return Fe([new F("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Me(new Ke(n?"constant":"source",t.value));var a=o instanceof ae?o.interpolation:void 0;return Me(new He(n?"camera":"composite",t.value,o.labels,a))}He.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,o)},He.prototype.evaluate=function(t,e,r,n,i,o){return this._styleExpression.evaluate(t,e,r,n,i,o)},He.prototype.interpolationFactor=function(t,e,r){return this.interpolationType?ae.interpolationFactor(this.interpolationType,t,e,r):0};var $e=function(t,e){this._parameters=t,this._specification=e,M(this,ze(this._parameters,this._specification))};function Qe(t){return"object"==typeof t?["literal",t]:t}function tr(t,e){var r=t.stops;if(!r)return function(t,e){var r=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",r]:r;if("enum"===e.type)return["match",r,Object.keys(e.values),r,t.default];var n=["color"===e.type?"to-color":e.type,r,Qe(t.default)];return"array"===e.type&&n.splice(1,0,e.value,e.length||null),n}(t,e);var n=r&&"object"==typeof r[0][0],i=n||void 0!==t.property,o=n||!i;return r=r.map((function(t){return!i&&e.tokens&&"string"==typeof t[1]?[t[0],sr(t[1])]:[t[0],Qe(t[1])]})),n?function(t,e,r){for(var n={},i={},o=[],a=0;a<r.length;a++){var s=r[a],u=s[0].zoom;void 0===n[u]&&(n[u]={zoom:u,type:t.type,property:t.property,default:t.default},i[u]=[],o.push(u)),i[u].push([s[0].value,s[1]])}if("exponential"===ar({},e)){for(var l=[er(t),["linear"],["zoom"]],h=0,c=o;h<c.length;h+=1){var p=c[h],f=nr(n[p],e,i[p]);or(l,p,f,!1)}return l}for(var d=["step",["zoom"]],g=0,y=o;g<y.length;g+=1){var m=y[g],v=nr(n[m],e,i[m]);or(d,m,v,!0)}return ir(d),d}(t,e,r):o?function(t,e,r,n){void 0===n&&(n=["zoom"]);var i,o=ar(t,e),a=!1;if("interval"===o)i=["step",n],a=!0;else{if("exponential"!==o)throw new Error('Unknown zoom function type "'+o+'"');var s=void 0!==t.base?t.base:1;i=[er(t),1===s?["linear"]:["exponential",s],n]}for(var u=0,l=r;u<l.length;u+=1){var h=l[u];or(i,h[0],h[1],a)}return ir(i),i}(t,e,r):nr(t,e,r)}function er(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function rr(t,e){return void 0!==t?t:void 0!==e?e:void 0}function nr(t,e,r){var n=ar(t,e),i=["get",t.property];if("categorical"===n&&"boolean"==typeof r[0][0]){for(var o=["case"],a=0,s=r;a<s.length;a+=1){var u=s[a];o.push(["==",i,u[0]],u[1])}return o.push(Qe(rr(t.default,e.default))),o}if("categorical"===n){for(var l=["match",i],h=0,c=r;h<c.length;h+=1){var p=c[h];or(l,p[0],p[1],!1)}return l.push(Qe(rr(t.default,e.default))),l}if("interval"===n){for(var f=["step",["number",i]],d=0,g=r;d<g.length;d+=1){var y=g[d];or(f,y[0],y[1],!0)}return ir(f),void 0===t.default?f:["case",["==",["typeof",i],"number"],f,Qe(t.default)]}if("exponential"===n){for(var m=void 0!==t.base?t.base:1,v=[er(t),1===m?["linear"]:["exponential",m],["number",i]],_=0,b=r;_<b.length;_+=1){var x=b[_];or(v,x[0],x[1],!1)}return void 0===t.default?v:["case",["==",["typeof",i],"number"],v,Qe(t.default)]}throw new Error("Unknown property function type "+n)}function ir(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function or(t,e,r,n){t.length>3&&e===t[t.length-2]||(n&&2===t.length||t.push(e),t.push(r))}function ar(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function sr(t){for(var e=["concat"],r=/{([^{}]+)}/g,n=0,i=r.exec(t);null!==i;i=r.exec(t)){var o=t.slice(n,r.lastIndex-i[0].length);n=r.lastIndex,o.length>0&&e.push(o),e.push(["get",i[1]])}if(1===e.length)return t;if(n<t.length)e.push(t.slice(n));else if(2===e.length)return["to-string",e[1]];return e}function ur(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!ur(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}}$e.deserialize=function(t){return new $e(t._parameters,t._specification)},$e.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var lr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function hr(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};ur(t)||(t=pr(t));var e=Ze(t,lr);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return{filter:function(t,r,n){return e.value.evaluate(t,r,{},n)},needGeometry:function t(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var r=1;r<e.length;r++)if(t(e[r]))return!0;return!1}(t)}}function cr(t,e){return t<e?-1:t>e?1:0}function pr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?fr(t[1],t[2],"=="):"!="===r?yr(fr(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?fr(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(pr))):"all"===r?["all"].concat(t.slice(1).map(pr)):"none"===r?["all"].concat(t.slice(1).map(pr).map(yr)):"in"===r?dr(t[1],t.slice(2)):"!in"===r?yr(dr(t[1],t.slice(2))):"has"===r?gr(t[1]):"!has"===r?yr(gr(t[1])):"within"!==r||t}function fr(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function dr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(cr)]]:["filter-in-small",t,["literal",e]]}}function gr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function yr(t){return["!",t]}var mr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function vr(t,e){var r={};for(var n in t)"ref"!==n&&(r[n]=t[n]);return mr.forEach((function(t){t in e&&(r[t]=e[t])})),r}function _r(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=vr(t[n],e[t[n].ref]));return t}var br=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)},xr=function(t){this.error=t,this.message=t.message;var e=t.message.match(/line (\d+)/);this.line=e?parseInt(e[1],10):0};function wr(t){var e=t.key,r=t.value;return r?[new br(e,r,"constants have been deprecated as of v8")]:[]}function Sr(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Tr(t){if(Array.isArray(t))return t.map(Tr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var r in t)e[r]=Tr(t[r]);return e}return Sr(t)}function Er(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],u=je(r);if("object"!==u)return[new br(e,r,"object expected, "+u+" found")];for(var l in r){var h=l.split(".")[0],c=n[h]||n["*"],p=void 0;if(i[h])p=i[h];else if(n[h])p=Ur;else if(i["*"])p=i["*"];else{if(!n["*"]){s.push(new br(e,r[l],'unknown property "'+l+'"'));continue}p=Ur}s=s.concat(p({key:(e?e+".":e)+l,value:r[l],valueSpec:c,style:o,styleSpec:a,object:r,objectKey:l},r))}for(var f in n)i[f]||n[f].required&&void 0===n[f].default&&void 0===r[f]&&s.push(new br(e,r,'missing required property "'+f+'"'));return s}function Cr(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||Ur;if("array"!==je(e))return[new br(o,e,"array expected, "+je(e)+" found")];if(r.length&&e.length!==r.length)return[new br(o,e,"array length "+r.length+" expected, length "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new br(o,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var s={type:r.value,values:r.values};i.$version<7&&(s.function=r.function),"object"===je(r.value)&&(s=r.value);for(var u=[],l=0;l<e.length;l++)u=u.concat(a({array:e,arrayIndex:l,value:e[l],valueSpec:s,style:n,styleSpec:i,key:o+"["+l+"]"}));return u}function Pr(t){var e=t.key,r=t.value,n=t.valueSpec,i=je(r);return"number"===i&&r!=r&&(i="NaN"),"number"!==i?[new br(e,r,"number expected, "+i+" found")]:"minimum"in n&&r<n.minimum?[new br(e,r,r+" is less than the minimum value "+n.minimum)]:"maximum"in n&&r>n.maximum?[new br(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function Rr(t){var e,r,n,i=t.valueSpec,o=Sr(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,u=!s,l="array"===je(t.value.stops)&&"array"===je(t.value.stops[0])&&"object"===je(t.value.stops[0][0]),h=Er({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new br(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;e=e.concat(Cr({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:c})),"array"===je(r)&&0===r.length&&e.push(new br(t.key,r,"array must have at least one stop"));return e},default:function(t){return Ur({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&h.push(new br(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||h.push(new br(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Ne(t.valueSpec)&&h.push(new br(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!Ae(t.valueSpec)?h.push(new br(t.key,t.value,"property functions not supported")):s&&!ke(t.valueSpec)&&h.push(new br(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!l||void 0!==t.value.property||h.push(new br(t.key,t.value,'"property" property is required')),h;function c(t){var e=[],o=t.value,s=t.key;if("array"!==je(o))return[new br(s,o,"array expected, "+je(o)+" found")];if(2!==o.length)return[new br(s,o,"array length 2 expected, length "+o.length+" found")];if(l){if("object"!==je(o[0]))return[new br(s,o,"object expected, "+je(o[0])+" found")];if(void 0===o[0].zoom)return[new br(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new br(s,o,"object stop key must have value")];if(n&&n>Sr(o[0].zoom))return[new br(s,o[0].zoom,"stop zoom values must appear in ascending order")];Sr(o[0].zoom)!==n&&(n=Sr(o[0].zoom),r=void 0,a={}),e=e.concat(Er({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Pr,value:p}}))}else e=e.concat(p({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return Xe(Tr(o[1]))?e.concat([new br(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Ur({key:s+"[1]",value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function p(t,n){var s=je(t.value),u=Sr(t.value),l=null!==t.value?t.value:n;if(e){if(s!==e)return[new br(t.key,l,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new br(t.key,l,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var h="number expected, "+s+" found";return Ae(i)&&void 0===o&&(h+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new br(t.key,l,h)]}return"categorical"!==o||"number"!==s||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===s&&void 0!==r&&u<r?[new br(t.key,l,"stop domain values must appear in ascending order")]:(r=u,"categorical"===o&&u in a?[new br(t.key,l,"stop domain values must be unique")]:(a[u]=!0,[])):[new br(t.key,l,"integer expected, found "+u)]}}function Or(t){var e=("property"===t.expressionContext?Je:Ze)(Tr(t.value),t.valueSpec);if("error"===e.result)return e.value.map((function(e){return new br(""+t.key+e.key,t.value,e.message)}));var r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!r.outputDefined())return[new br(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Nt(r))return[new br(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Nt(r))return[new br(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!jt(r,["zoom","feature-state"]))return[new br(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!kt(r))return[new br(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ir(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(Sr(r))&&i.push(new br(e,r,"expected one of ["+n.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(n.values).indexOf(Sr(r))&&i.push(new br(e,r,"expected one of ["+Object.keys(n.values).join(", ")+"], "+JSON.stringify(r)+" found")),i}function Lr(t){return ur(Tr(t.value))?Or(M({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==je(r))return[new br(n,r,"array expected, "+je(r)+" found")];var i,o=e.styleSpec,a=[];if(r.length<1)return[new br(n,r,"filter array must have at least 1 element")];switch(a=a.concat(Ir({key:n+"[0]",value:r[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),Sr(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Sr(r[1])&&a.push(new br(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&a.push(new br(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(i=je(r[1]))&&a.push(new br(n+"[1]",r[1],"string expected, "+i+" found"));for(var s=2;s<r.length;s++)i=je(r[s]),"$type"===Sr(r[1])?a=a.concat(Ir({key:n+"["+s+"]",value:r[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&a.push(new br(n+"["+s+"]",r[s],"string, number, or boolean expected, "+i+" found"));break;case"any":case"all":case"none":for(var u=1;u<r.length;u++)a=a.concat(t({key:n+"["+u+"]",value:r[u],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":i=je(r[1]),2!==r.length?a.push(new br(n,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"string"!==i&&a.push(new br(n+"[1]",r[1],"string expected, "+i+" found"));break;case"within":i=je(r[1]),2!==r.length?a.push(new br(n,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"object"!==i&&a.push(new br(n+"[1]",r[1],"object expected, "+i+" found"))}return a}(t)}function Mr(t,e){var r=t.key,n=t.style,i=t.styleSpec,o=t.value,a=t.objectKey,s=i[e+"_"+t.layerType];if(!s)return[];var u=a.match(/^(.*)-transition$/);if("paint"===e&&u&&s[u[1]]&&s[u[1]].transition)return Ur({key:r,value:o,valueSpec:i.transition,style:n,styleSpec:i});var l,h=t.valueSpec||s[a];if(!h)return[new br(r,o,'unknown property "'+a+'"')];if("string"===je(o)&&Ae(h)&&!h.tokens&&(l=/^{([^}]+)}$/.exec(o)))return[new br(r,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(l[1])+" }`.")];var c=[];return"symbol"===t.layerType&&("text-field"===a&&n&&!n.glyphs&&c.push(new br(r,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Ge(Tr(o))&&"identity"===Sr(o.type)&&c.push(new br(r,o,'"text-font" does not support identity functions'))),c.concat(Ur({key:t.key,value:o,valueSpec:h,style:n,styleSpec:i,expressionContext:"property",propertyType:e,propertyKey:a}))}function Fr(t){return Mr(t,"paint")}function Ar(t){return Mr(t,"layout")}function kr(t){var e=[],r=t.value,n=t.key,i=t.style,o=t.styleSpec;r.type||r.ref||e.push(new br(n,r,'either "type" or "ref" is required'));var a,s=Sr(r.type),u=Sr(r.ref);if(r.id)for(var l=Sr(r.id),h=0;h<t.arrayIndex;h++){var c=i.layers[h];Sr(c.id)===l&&e.push(new br(n,r.id,'duplicate layer id "'+r.id+'", previously used at line '+c.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach((function(t){t in r&&e.push(new br(n,r[t],'"'+t+'" is prohibited for ref layers'))})),i.layers.forEach((function(t){Sr(t.id)===u&&(a=t)})),a?a.ref?e.push(new br(n,r.ref,"ref cannot reference another ref layer")):s=Sr(a.type):e.push(new br(n,r.ref,'ref layer "'+u+'" not found'));else if("background"!==s)if(r.source){var p=i.sources&&i.sources[r.source],f=p&&Sr(p.type);p?"vector"===f&&"raster"===s?e.push(new br(n,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new br(n,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==f||r["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new br(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===f&&p.lineMetrics||e.push(new br(n,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new br(n,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new br(n,r.source,'source "'+r.source+'" not found'))}else e.push(new br(n,r,'missing required property "source"'));return e=e.concat(Er({key:n,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Ur({key:n+".type",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:Lr,layout:function(t){return Er({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Ar(M({layerType:s},t))}}})},paint:function(t){return Er({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Fr(M({layerType:s},t))}}})}}}))}function Nr(t){var e=t.value,r=t.key,n=je(e);return"string"!==n?[new br(r,e,"string expected, "+n+" found")]:[]}var jr={promoteId:function(t){var e=t.key,r=t.value;if("string"===je(r))return Nr({key:e,value:r});var n=[];for(var i in r)n.push.apply(n,Nr({key:e+"."+i,value:r[i]}));return n}};function Gr(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new br(r,e,'"type" is required')];var o,a=Sr(e.type);switch(a){case"vector":case"raster":case"raster-dem":return o=Er({key:r,value:e,valueSpec:n["source_"+a.replace("-","_")],style:t.style,styleSpec:n,objectElementValidators:jr});case"geojson":if(o=Er({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n,objectElementValidators:jr}),e.cluster)for(var s in e.clusterProperties){var u=e.clusterProperties[s],l=u[0],h=u[1],c="string"==typeof l?[l,["accumulated"],["get",s]]:l;o.push.apply(o,Or({key:r+"."+s+".map",value:h,expressionContext:"cluster-map"})),o.push.apply(o,Or({key:r+"."+s+".reduce",value:c,expressionContext:"cluster-reduce"}))}return o;case"video":return Er({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case"image":return Er({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case"canvas":return[new br(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ir({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:n})}}function Dr(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,o=[],a=je(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new br("light",e,"object expected, "+a+" found")]);for(var s in e){var u=s.match(/^(.*)-transition$/);o=u&&n[u[1]]&&n[u[1]].transition?o.concat(Ur({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?o.concat(Ur({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):o.concat([new br(s,e[s],'unknown property "'+s+'"')])}return o}var zr={"*":function(){return[]},array:Cr,boolean:function(t){var e=t.value,r=t.key,n=je(e);return"boolean"!==n?[new br(r,e,"boolean expected, "+n+" found")]:[]},number:Pr,color:function(t){var e=t.key,r=t.value,n=je(r);return"string"!==n?[new br(e,r,"color expected, "+n+" found")]:null===J(r)?[new br(e,r,'color expected, "'+r+'" found')]:[]},constants:wr,enum:Ir,filter:Lr,function:Rr,layer:kr,object:Er,source:Gr,light:Dr,string:Nr,formatted:function(t){return 0===Nr(t).length?[]:Or(t)},resolvedImage:function(t){return 0===Nr(t).length?[]:Or(t)}};function Ur(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.expression&&Ge(Sr(e))?Rr(t):r.expression&&Xe(Tr(e))?Or(t):r.type&&zr[r.type]?zr[r.type](t):Er(M({},t,{valueSpec:r.type?n[r.type]:r}))}function Br(t){var e=t.value,r=t.key,n=Nr(t);return n.length||(-1===e.indexOf("{fontstack}")&&n.push(new br(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&n.push(new br(r,e,'"glyphs" url must include a "{range}" token'))),n}function Yr(t,e){void 0===e&&(e=i);var r=[];return r=r.concat(Ur({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Br,"*":function(){return[]}}})),t.constants&&(r=r.concat(wr({key:"constants",value:t.constants,style:t,styleSpec:e}))),Vr(r)}function Vr(t){return[].concat(t).sort((function(t,e){return t.line-e.line}))}function Wr(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return Vr(t.apply(this,e))}}Yr.source=Wr(Gr),Yr.light=Wr(Dr),Yr.layer=Wr(kr),Yr.filter=Wr(Lr),Yr.paintProperty=Wr(Fr),Yr.layoutProperty=Wr(Ar);var qr=s((function(t,e){var r=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,12],r=[1,13],n=[1,9],i=[1,10],o=[1,11],a=[1,14],s=[1,15],u=[14,18,22,24],l=[18,22],h=[22,24],c={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,r,n,i,o,a){var s=o.length-1;switch(i){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(t),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=o[s-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=o[s-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[o[s-2],o[s]];break;case 16:this.$={},this.$[o[s][0]]=o[s][1];break;case 17:this.$=o[s-2],o[s-2][o[s][0]]=o[s][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[o[s]];break;case 21:this.$=o[s-2],o[s-2].push(o[s])}},table:[{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:o,12:1,13:2,15:7,16:8,17:a,23:s},{1:[3]},{14:[1,16]},t(u,[2,7]),t(u,[2,8]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),t(u,[2,3]),t(u,[2,4]),t(u,[2,5]),t([14,18,21,22,24],[2,1]),t(u,[2,2]),{3:20,4:e,18:[1,17],19:18,20:19},{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:o,13:23,15:7,16:8,17:a,23:s,24:[1,21],25:22},{1:[2,6]},t(u,[2,13]),{18:[1,24],22:[1,25]},t(l,[2,16]),{21:[1,26]},t(u,[2,18]),{22:[1,28],24:[1,27]},t(h,[2,20]),t(u,[2,14]),{3:20,4:e,20:29},{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:o,13:30,15:7,16:8,17:a,23:s},t(u,[2,19]),{3:5,4:e,5:6,6:r,7:3,8:n,9:4,10:i,11:o,13:31,15:7,16:8,17:a,23:s},t(l,[2,17]),t(l,[2,15]),t(h,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],o=this.table,a="",s=0,u=0,l=2,h=1,c=i.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(f.yy[d]=this.yy[d]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;i.push(g);var y=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=p.lex()||h)&&(t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,S,T,E,C={};;){if(_=r[r.length-1],this.defaultActions[_]?b=this.defaultActions[_]:(null==v&&(v=m()),b=o[_]&&o[_][v]),void 0===b||!b.length||!b[0]){var P="";for(w in E=[],o[_])this.terminals_[w]&&w>l&&E.push("'"+this.terminals_[w]+"'");P=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(P,{text:p.match,token:this.terminals_[v]||v,line:p.yylineno,loc:g,expected:E})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+v);switch(b[0]){case 1:r.push(v),n.push(p.yytext),i.push(p.yylloc),r.push(b[1]),v=null,u=p.yyleng,a=p.yytext,s=p.yylineno,g=p.yylloc;break;case 2:if(S=this.productions_[b[1]][1],C.$=n[n.length-S],C._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},y&&(C._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[a,u,s,f.yy,b[1],n,i].concat(c))))return x;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[b[1]][0]),n.push(C.$),i.push(C._$),T=o[r[r.length-2]][r[r.length-1]],r.push(T);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((r=this._input.match(this.rules[i[o]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function f(){this.yy={}}return c.lexer=p,f.prototype=c,c.Parser=f,new f}();void 0!==a&&(e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)})}));qr.parser,qr.Parser,qr.parse;function Xr(t){if(t instanceof String||"string"==typeof t||t instanceof n)try{return qr.parse(t.toString())}catch(t){throw new xr(t)}return t}function Zr(t,e){void 0===e&&(e=i);var r=t;try{r=Xr(r)}catch(t){return[t]}return Yr(r,e)}var Kr={StyleExpression:qe,isExpression:Xe,isExpressionFilter:ur,createExpression:Ze,createPropertyExpression:Je,normalizePropertyExpression:function(t,e){if(Ge(t))return new $e(t,e);if(Xe(t)){var r=Je(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=$.parse(t)),{kind:"constant",evaluate:function(){return n}}},ZoomConstantExpression:Ke,ZoomDependentExpression:He,StylePropertyFunction:$e},Hr={convertFunction:tr,createFunction:ze,isFunction:Ge};Zr.parsed=Zr,Zr.latest=Zr}).call(this,r(4),r(7).Buffer)},function(t,e,r){t.exports=function(){"use strict";function t(t,n,i,o,a){!function t(r,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=n-i+1,l=Math.log(s),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(s-h)/s)*(u-s/2<0?-1:1),p=Math.max(i,Math.floor(n-u*h/s+c)),f=Math.min(o,Math.floor(n+(s-u)*h/s+c));t(r,n,p,f,a)}var d=r[n],g=i,y=o;for(e(r,i,n),a(r[o],d)>0&&e(r,i,o);g<y;){for(e(r,g,y),g++,y--;a(r[g],d)<0;)g++;for(;a(r[y],d)>0;)y--}0===a(r[i],d)?e(r,i,y):(y++,e(r,y,o)),y<=n&&(i=y+1),n<=y&&(o=y-1)}}(t,n,i||0,o||t.length-1,a||r)}function e(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function r(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n<e.length;n++)if(r(t,e[n]))return n;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,r,n,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<r;o++){var a=t.children[o];s(i,t.leaf?n(a):a)}return i}function s(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function u(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,r,n,i,o){for(var a=[r,n];a.length;)if(!((n=a.pop())-(r=a.pop())<=i)){var s=r+Math.ceil((n-r)/i/2)*i;t(e,s,r,n,o),a.push(r,s,s,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,r=[];if(!f(t,e))return r;for(var n=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],s=e.leaf?n(a):a;f(t,s)&&(e.leaf?r.push(a):p(t,s)?this._all(a,r):i.push(a))}e=i.pop()}return r},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var r=[];e;){for(var n=0;n<e.children.length;n++){var i=e.children[n],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;r.push(i)}}e=r.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=d([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var r,n,o,a=this.data,s=this.toBBox(t),u=[],l=[];a||u.length;){if(a||(a=u.pop(),n=u[u.length-1],r=l.pop(),o=!0),a.leaf){var h=i(t,a.children,e);if(-1!==h)return a.children.splice(h,1),u.push(a),this._condense(u),this}o||a.leaf||!p(a,s)?n?(r++,a=n.children[r],o=!1):a=null:(u.push(a),l.push(r),r=0,n=a,a=a.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},n.prototype._build=function(t,e,r,n){var i,a=r-e+1,s=this._maxEntries;if(a<=s)return o(i=d(t.slice(e,r+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,n-1))),(i=d([])).leaf=!1,i.height=n;var u=Math.ceil(a/s),l=u*Math.ceil(Math.sqrt(s));g(t,e,r,l,this.compareMinX);for(var h=e;h<=r;h+=l){var c=Math.min(h+l-1,r);g(t,h,c,u,this.compareMinY);for(var p=h;p<=c;p+=u){var f=Math.min(p+u-1,c);i.children.push(this._build(t,p,f,n-1))}}return o(i,this.toBBox),i},n.prototype._chooseSubtree=function(t,e,r,n){for(;n.push(e),!e.leaf&&n.length-1!==r;){for(var i=1/0,o=1/0,a=void 0,s=0;s<e.children.length;s++){var u=e.children[s],l=h(u),c=(p=t,f=u,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-l);c<o?(o=c,i=l<i?l:i,a=u):c===o&&l<i&&(i=l,a=u)}e=a||e.children[0]}var p,f;return e},n.prototype._insert=function(t,e,r){var n=r?t:this.toBBox(t),i=[],o=this._chooseSubtree(n,this.data,e,i);for(o.children.push(t),s(o,n);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(n,i,e)},n.prototype._split=function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var a=this._chooseSplitIndex(r,i,n),s=d(r.children.splice(a,r.children.length-a));s.height=r.height,s.leaf=r.leaf,o(r,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(r,s)},n.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,r){for(var n,i,o,s,u,l,c,p=1/0,f=1/0,d=e;d<=r-e;d++){var g=a(t,0,d,this.toBBox),y=a(t,d,r,this.toBBox),m=(i=g,o=y,s=void 0,u=void 0,l=void 0,c=void 0,s=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),l=Math.min(i.maxX,o.maxX),c=Math.min(i.maxY,o.maxY),Math.max(0,l-s)*Math.max(0,c-u)),v=h(g)+h(y);m<p?(p=m,n=d,f=v<f?v:f):m===p&&v<f&&(f=v,n=d)}return n||r-e},n.prototype._chooseSplitAxis=function(t,e,r){var n=t.leaf?this.compareMinX:u,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,r,n)<this._allDistMargin(t,e,r,i)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,r,n){t.children.sort(n);for(var i=this.toBBox,o=a(t,0,e,i),u=a(t,r-e,r,i),l=c(o)+c(u),h=e;h<r-e;h++){var p=t.children[h];s(o,t.leaf?i(p):p),l+=c(o)}for(var f=r-e-1;f>=e;f--){var d=t.children[f];s(u,t.leaf?i(d):d),l+=c(u)}return l},n.prototype._adjustParentBBoxes=function(t,e,r){for(var n=r;n>=0;n--)s(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,r=void 0;e>=0;e--)0===t[e].children.length?e>0?(r=t[e-1].children).splice(r.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n}()},function(t,e){var r={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},n=/(italic|oblique)$/i,i={};t.exports=function(t,e,o){var a=i[t];if(!a){Array.isArray(t)||(t=[t]);for(var s=400,u="normal",l=[],h=0,c=t.length;h<c;++h){var p=t[h].split(" "),f=p[p.length-1].toLowerCase();for(var d in"normal"==f||"italic"==f||"oblique"==f?(u=f,p.pop(),f=p[p.length-1].toLowerCase()):n.test(f)&&(f=f.replace(n,""),u=p[p.length-1].replace(f,"")),r)if(f==d||f==d.replace("-","")||f==d.replace("-"," ")){s=r[d],p.pop();break}"number"==typeof f&&(s=f);var g=p.join(" ").replace("Klokantech Noto Sans","Noto Sans");-1!==g.indexOf(" ")&&(g='"'+g+'"'),l.push(g)}a=i[t]=[u,s,l]}return a[0]+" "+a[1]+" "+e+"px"+(o?"/"+o:"")+" "+a[2]}},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,l=u>>1,h=-7,c=r?i-1:0,p=r?-1:1,f=t[e+c];for(c+=p,o=f&(1<<-h)-1,f>>=-h,h+=s;h>0;o=256*o+t[e+c],c+=p,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+t[e+c],c+=p,h-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=l}return(f?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,l=8*o-i-1,h=(1<<l)-1,c=h>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?p/u:p*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=h?(s=0,a=h):a+c>=1?(s=(e*u-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+f]=255&s,f+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[r+f]=255&a,f+=d,a/=256,l-=8);t[r+f-d]|=128*g}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";t.exports=i;var n=r(3);function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var o="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function a(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function s(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function u(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function l(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function h(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function c(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function p(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function d(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function g(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function y(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function m(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function v(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function _(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=7&n,t(i,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=v(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=v(this.buf,this.pos)+4294967296*v(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=v(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,o=r.buf;if(i=o[r.pos++],n=(112&i)>>4,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(127&i)<<3,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(127&i)<<10,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(127&i)<<17,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(127&i)<<24,i<128)return s(t,n,e);if(i=o[r.pos++],n|=(1&i)<<31,i<128)return s(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&o?function(t,e,r){return o.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var n="",i=e;for(;i<r;){var o,a,s,u=t[i],l=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h>r)break;1===h?u<128&&(l=u):2===h?128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===h?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===h&&(o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,h=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=h}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var r=a(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),_(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),_(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),_(this.buf,-1&t,this.pos),_(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),_(this.buf,-1&t,this.pos),_(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,n;t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){n>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&u(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&u(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,i.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e){(function(){var e;t.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return e},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},e=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},function(t,e,r){"use strict";(function(t){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var n=r(8),i=r(3),o=r(9);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return l(this,t,e,r)}function l(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=p(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|f(e.length);return 0===(t=s(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e){if(h(e),t=s(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function p(t,e){var r=e.length<0?0:0|f(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function f(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(n)return z(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var h=-1;for(o=r;o<s;o++)if(l(t,o)===l(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*a}else-1!==h&&(o-=o-h),h=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var c=!0,p=0;p<u;p++)if(l(t,o+p)!==l(e,p)){c=!1;break}if(c)return o}return-1}function _(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function b(t,e,r,n){return B(z(e,t.length-r),t,r,n)}function x(t,e,r,n){return B(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return x(t,e,r,n)}function S(t,e,r,n){return B(U(e),t,r,n)}function T(t,e,r,n){return B(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,l=t[i],h=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c<=r)switch(c){case 1:l<128&&(h=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return l(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return h(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return c(null,t)},u.allocUnsafeSlow=function(t){return c(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):g.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),l=this.slice(n,i),h=t.slice(e,r),c=0;c<s;++c)if(l[c]!==h[c]){o=l[c],a=h[c];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return x(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function O(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=D(t[o]);return i}function I(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function F(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function A(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function k(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,o){return o||k(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,o){return o||k(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):A(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):A(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=u.isBuffer(t)?t:z(new u(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var G=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(G,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function B(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(4))},function(t,e,r){"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=l(t),a=n[0],s=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),h=0,c=s>0?a-4:a;for(r=0;r<c;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[h++]=e>>16&255,u[h++]=e>>8&255,u[h++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[h++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(h(t,a,a+16383>s?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,r){for(var i,o,a=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";function n(){return function(){throw new Error("Unimplemented abstract method.")}()}r.r(e);var i=0;function o(t){return t.ol_uid||(t.ol_uid=String(++i))}var a,s=(a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=function(t){function e(e){var r=this,n="Assertion failed. See https://openlayers.org/en/"+("v"+"6.4.3".split("-")[0])+"/doc/errors/#"+e+" for details.";return(r=t.call(this,n)||this).code=e,r.name="AssertionError",r.message=n,r}return s(e,t),e}(Error);function l(t){t.stopPropagation()}var h=function(){function t(t){this.propagationStopped,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.propagationStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),c="propertychange",p=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function f(t,e){return t>e?1:t<e?-1:0}function d(t,e){return t.indexOf(e)>=0}function g(t,e,r){var n=t.length;if(t[0]<=e)return 0;if(e<=t[n-1])return n-1;var i=void 0;if(r>0){for(i=1;i<n;++i)if(t[i]<e)return i-1}else if(r<0){for(i=1;i<n;++i)if(t[i]<=e)return i}else for(i=1;i<n;++i){if(t[i]==e)return i;if(t[i]<e)return t[i-1]-e<e-t[i]?i-1:i}return n-1}function y(t,e,r){for(;e<r;){var n=t[e];t[e]=t[r],t[r]=n,++e,--r}}function m(t,e){for(var r=Array.isArray(e)?e:[e],n=r.length,i=0;i<n;i++)t[t.length]=r[i]}function v(t,e){for(var r,n=t.length>>>0,i=0;i<n;i++)if(e(r=t[i],i,t))return r;return null}function _(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function b(t,e){var r;return!t.every((function(n,i){return r=i,!e(n,i,t)}))?r:-1}function x(){return!0}function w(){return!1}function S(){}var T="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),n=1,i=arguments.length;n<i;++n){var o=arguments[n];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a])}return r};function E(t){for(var e in t)delete t[e]}var C="function"==typeof Object.values?Object.values:function(t){var e=[];for(var r in t)e.push(t[r]);return e};function P(t){var e;for(e in t)return!1;return!e}var R=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),O=function(t){function e(e){var r=t.call(this)||this;return r.eventTarget_=e,r.pendingRemovals_=null,r.dispatching_=null,r.listeners_=null,r}return R(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var r=this.listeners_||(this.listeners_={}),n=r[t]||(r[t]=[]);-1===n.indexOf(e)&&n.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new h(t):t,r=e.type;e.target||(e.target=this.eventTarget_||this);var n,i=this.listeners_&&this.listeners_[r];if(i){var o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});r in o||(o[r]=0,a[r]=0),++o[r];for(var s=0,u=i.length;s<u;++s)if(!1===(n="handleEvent"in i[s]?i[s].handleEvent(e):i[s].call(this,e))||e.propagationStopped){n=!1;break}if(--o[r],0===o[r]){var l=a[r];for(delete a[r];l--;)this.removeEventListener(r,S);delete o[r]}return n}},e.prototype.disposeInternal=function(){this.listeners_&&E(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var r=this.listeners_&&this.listeners_[t];if(r){var n=r.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(r[n]=S,++this.pendingRemovals_[t]):(r.splice(n,1),0===r.length&&delete this.listeners_[t]))}},e}(p),I="change",L="error",M="clear",F="contextmenu",A="click",k="dblclick",N="dragenter",j="dragover",G="drop",D="keydown",z="keypress",U="load",B="resize",Y="touchmove",V="wheel";function W(t,e,r,n,i){if(n&&n!==t&&(r=r.bind(n)),i){var o=r;r=function(){t.removeEventListener(e,r),o.apply(this,arguments)}}var a={target:t,type:e,listener:r};return t.addEventListener(e,r),a}function q(t,e,r,n){return W(t,e,r,n,!0)}function X(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),E(t))}var Z=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function K(t){if(Array.isArray(t))for(var e=0,r=t.length;e<r;++e)X(t[e]);else X(t)}var H=function(t){function e(){var e=t.call(this)||this;return e.revision_=0,e}return Z(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(I)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var r=t.length,n=new Array(r),i=0;i<r;++i)n[i]=W(this,t[i],e);return n}return W(this,t,e)},e.prototype.once=function(t,e){var r;if(Array.isArray(t)){var n=t.length;r=new Array(n);for(var i=0;i<n;++i)r[i]=q(this,t[i],e)}else r=q(this,t,e);return e.ol_key=r,r},e.prototype.un=function(t,e){var r=e.ol_key;if(r)K(r);else if(Array.isArray(t))for(var n=0,i=t.length;n<i;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)},e}(O),J=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.key=r,i.oldValue=n,i}return J(e,t),e}(h),Q=function(t){function e(e){var r=t.call(this)||this;return o(r),r.values_=null,void 0!==e&&r.setProperties(e),r}return J(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&T({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var r;r=et(t),this.dispatchEvent(new $(r,t,e)),r=c,this.dispatchEvent(new $(r,t,e))},e.prototype.set=function(t,e,r){var n=this.values_||(this.values_={});if(r)n[t]=e;else{var i=n[t];n[t]=e,i!==e&&this.notify(t,i)}},e.prototype.setProperties=function(t,e){for(var r in t)this.set(r,t[r],e)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var r=this.values_[t];delete this.values_[t],P(this.values_)&&(this.values_=null),e||this.notify(t,r)}},e}(H),tt={};function et(t){return tt.hasOwnProperty(t)?tt[t]:tt[t]="change:"+t}var rt=Q,nt="add",it="remove",ot=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),at="length",st=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.element=r,i.index=n,i}return ot(e,t),e}(h),ut=function(t){function e(e,r){var n=t.call(this)||this,i=r||{};if(n.unique_=!!i.unique,n.array_=e||[],n.unique_)for(var o=0,a=n.array_.length;o<a;++o)n.assertUnique_(n.array_[o],o);return n.updateLength_(),n}return ot(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,r=t.length;e<r;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,r=0,n=e.length;r<n;++r)t(e[r],r,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(at)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new st(nt,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,r=0,n=e.length;r<n;++r)if(e[r]===t)return this.removeAt(r)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new st(it,e,t)),e},e.prototype.setAt=function(t,e){var r=this.getLength();if(t<r){this.unique_&&this.assertUnique_(e,t);var n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new st(it,n,t)),this.dispatchEvent(new st(nt,e,t))}else{for(var i=r;i<t;++i)this.insertAt(i,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(at,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var r=0,n=this.array_.length;r<n;++r)if(this.array_[r]===t&&r!==e)throw new u(58)},e}(rt);function lt(t,e){if(!t)throw new u(e)}var ht=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var ct=function(t){function e(e){var r=t.call(this)||this;if(r.id_=void 0,r.geometryName_="geometry",r.style_=null,r.styleFunction_=void 0,r.geometryChangeKey_=null,r.addEventListener(et(r.geometryName_),r.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var n=e;r.setGeometry(n)}else{var i=e;r.setProperties(i)}return r}return ht(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var r=this.getGeometry();r&&t.setGeometry(r.clone());var n=this.getStyle();return n&&t.setStyle(n),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(X(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=W(t,I,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;Array.isArray(t)?e=t:(lt("function"==typeof t.getZIndex,41),e=[t]);return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeEventListener(et(this.geometryName_),this.handleGeometryChanged_),this.geometryName_=t,this.addEventListener(et(this.geometryName_),this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(rt),pt="XY",ft="XYZ",dt="XYM",gt="XYZM",yt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},mt={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},vt={};vt[mt.DEGREES]=2*Math.PI*6370997/360,vt[mt.FEET]=.3048,vt[mt.METERS]=1,vt[mt.USFEET]=1200/3937;var _t=mt,bt=new Array(6);function xt(t){return St(t,1,0,0,1,0,0)}function wt(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=e[0],l=e[1],h=e[2],c=e[3],p=e[4],f=e[5];return t[0]=r*u+i*l,t[1]=n*u+o*l,t[2]=r*h+i*c,t[3]=n*h+o*c,t[4]=r*p+i*f+a,t[5]=n*p+o*f+s,t}function St(t,e,r,n,i,o,a){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=o,t[5]=a,t}function Tt(t,e){var r=e[0],n=e[1];return e[0]=t[0]*r+t[2]*n+t[4],e[1]=t[1]*r+t[3]*n+t[5],e}function Et(t,e,r){return wt(t,St(bt,e,0,0,r,0,0))}function Ct(t,e,r,n,i,o,a,s){var u=Math.sin(o),l=Math.cos(o);return t[0]=n*l,t[1]=i*u,t[2]=-n*u,t[3]=i*l,t[4]=a*n*l-s*n*u+e,t[5]=a*i*u+s*i*l+r,t}function Pt(t,e){var r,n=(r=e)[0]*r[3]-r[1]*r[2];lt(0!==n,32);var i=e[0],o=e[1],a=e[2],s=e[3],u=e[4],l=e[5];return t[0]=s/n,t[1]=-o/n,t[2]=-a/n,t[3]=i/n,t[4]=(a*l-s*u)/n,t[5]=-(i*l-o*u)/n,t}function Rt(t){return"matrix("+t.join(", ")+")"}var Ot="bottom-left",It="bottom-right",Lt="top-left",Mt="top-right",Ft=0,At=1,kt=2,Nt=4,jt=8,Gt=16;function Dt(t){for(var e=Xt(),r=0,n=t.length;r<n;++r)te(e,t[r]);return e}function zt(t,e,r){return r?(r[0]=t[0]-e,r[1]=t[1]-e,r[2]=t[2]+e,r[3]=t[3]+e,r):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Ut(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Bt(t,e,r){var n,i;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(i=r<t[1]?t[1]-r:t[3]<r?r-t[3]:0)*i}function Yt(t,e){return Wt(t,e[0],e[1])}function Vt(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Wt(t,e,r){return t[0]<=e&&e<=t[2]&&t[1]<=r&&r<=t[3]}function qt(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=Ft;return a<r?u|=Gt:a>i&&(u|=Nt),s<n?u|=jt:s>o&&(u|=kt),u===Ft&&(u=At),u}function Xt(){return[1/0,1/0,-1/0,-1/0]}function Zt(t,e,r,n,i){return i?(i[0]=t,i[1]=e,i[2]=r,i[3]=n,i):[t,e,r,n]}function Kt(t){return Zt(1/0,1/0,-1/0,-1/0,t)}function Ht(t,e){var r=t[0],n=t[1];return Zt(r,n,r,n,e)}function Jt(t,e,r,n,i){return re(Kt(i),t,e,r,n)}function $t(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Qt(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function te(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function ee(t,e){for(var r=0,n=e.length;r<n;++r)te(t,e[r]);return t}function re(t,e,r,n,i){for(;r<n;r+=i)ne(t,e[r],e[r+1]);return t}function ne(t,e,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],r)}function ie(t,e){var r;return(r=e(ae(t)))||(r=e(se(t)))||(r=e(de(t)))?r:(r=e(fe(t)))||!1}function oe(t){var e=0;return me(t)||(e=ge(t)*ce(t)),e}function ae(t){return[t[0],t[1]]}function se(t){return[t[2],t[1]]}function ue(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function le(t,e){var r;return e===Ot?r=ae(t):e===It?r=se(t):e===Lt?r=fe(t):e===Mt?r=de(t):lt(!1,13),r}function he(t,e,r,n,i){var o=e*n[0]/2,a=e*n[1]/2,s=Math.cos(r),u=Math.sin(r),l=o*s,h=o*u,c=a*s,p=a*u,f=t[0],d=t[1],g=f-l+p,y=f-l-p,m=f+l-p,v=f+l+p,_=d-h-c,b=d-h+c,x=d+h+c,w=d+h-c;return Zt(Math.min(g,y,m,v),Math.min(_,b,x,w),Math.max(g,y,m,v),Math.max(_,b,x,w),i)}function ce(t){return t[3]-t[1]}function pe(t,e,r){var n=r||[1/0,1/0,-1/0,-1/0];return ye(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):Kt(n),n}function fe(t){return[t[0],t[3]]}function de(t){return[t[2],t[3]]}function ge(t){return t[2]-t[0]}function ye(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function me(t){return t[2]<t[0]||t[3]<t[1]}function ve(t,e){var r=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=r,t[2]+=r,t[1]-=n,t[3]+=n}function _e(t,e,r,n){var i=[];if(n>1)for(var o=t[2]-t[0],a=t[3]-t[1],s=0;s<n;++s)i.push(t[0]+o*s/n,t[1],t[2],t[1]+a*s/n,t[2]-o*s/n,t[3],t[0],t[3]-a*s/n);else i=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(i,i,2);for(var u=[],l=[],h=(s=0,i.length);s<h;s+=2)u.push(i[s]),l.push(i[s+1]);return function(t,e,r){return Zt(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),r)}(u,l,r)}function be(t,e){var r=e.getExtent(),n=ue(t);if(e.canWrapX()&&(n[0]<r[0]||n[0]>=r[2])){var i=ge(r),o=Math.floor((n[0]-r[0])/i)*i;t[0]-=o,t[2]-=o}return t}var xe=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||vt[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();function we(t,e,r){return Math.min(Math.max(t,e),r)}var Se="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},Te="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Ee(t,e,r,n,i,o){var a=i-r,s=o-n;if(0!==a||0!==s){var u=((t-r)*a+(e-n)*s)/(a*a+s*s);u>1?(r=i,n=o):u>0&&(r+=a*u,n+=s*u)}return Ce(t,e,r,n)}function Ce(t,e,r,n){var i=r-t,o=n-e;return i*i+o*o}function Pe(t){return 180*t/Math.PI}function Re(t){return t*Math.PI/180}function Oe(t,e){var r=t%e;return r*e<0?r+e:r}function Ie(t,e,r){return t+r*(e-t)}var Le=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Me=6378137*Math.PI,Fe=[-Me,-Me,Me,Me],Ae=[-180,-85,180,85],ke=function(t){function e(e){return t.call(this,{code:e,units:_t.METERS,extent:Fe,global:!0,worldExtent:Ae,getPointResolution:function(t,e){return t/Se(e[1]/6378137)}})||this}return Le(e,t),e}(xe),Ne=[new ke("EPSG:3857"),new ke("EPSG:102100"),new ke("EPSG:102113"),new ke("EPSG:900913"),new ke("urn:ogc:def:crs:EPSG:6.18:3:3857"),new ke("urn:ogc:def:crs:EPSG::3857"),new ke("http://www.opengis.net/gml/srs/epsg.xml#3857")];function je(t,e,r){var n=t.length,i=r>1?r:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(n));for(var a=Me,s=0;s<n;s+=i){o[s]=a*t[s]/180;var u=6378137*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));u>a?u=a:u<-a&&(u=-a),o[s+1]=u}return o}function Ge(t,e,r){var n=t.length,i=r>1?r:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(n));for(var a=0;a<n;a+=i)o[a]=180*t[a]/Me,o[a+1]=360*Math.atan(Math.exp(t[a+1]/6378137))/Math.PI-90;return o}var De=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ze=[-180,-90,180,90],Ue=6378137*Math.PI/180,Be=function(t){function e(e,r){return t.call(this,{code:e,units:_t.DEGREES,extent:ze,axisOrientation:r,global:!0,metersPerUnit:Ue,worldExtent:ze})||this}return De(e,t),e}(xe),Ye=[new Be("CRS:84"),new Be("EPSG:4326","neu"),new Be("urn:ogc:def:crs:EPSG::4326","neu"),new Be("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Be("urn:ogc:def:crs:OGC:1.3:CRS84"),new Be("urn:ogc:def:crs:OGC:2:84"),new Be("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Be("urn:x-ogc:def:crs:EPSG:4326","neu")],Ve={};var We={};function qe(t,e,r){var n=t.getCode(),i=e.getCode();n in We||(We[n]={}),We[n][i]=r}function Xe(t,e){var r;return t in We&&e in We[t]&&(r=We[t][e]),r}function Ze(t,e,r){var n=r||6371008.8,i=Re(t[1]),o=Re(e[1]),a=(o-i)/2,s=Re(e[0]-t[0])/2,u=Math.sin(a)*Math.sin(a)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(o);return 2*n*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))}function Ke(t,e){for(var r=0,n=0,i=t.length;n<i-1;++n)r+=Ze(t[n],t[n+1],e);return r}function He(t,e){for(var r=0,n=t.length,i=t[n-1][0],o=t[n-1][1],a=0;a<n;a++){var s=t[a][0],u=t[a][1];r+=Re(s-i)*(2+Math.sin(Re(o))+Math.sin(Re(u))),i=s,o=u}return r*e*e/2}function Je(t,e,r,n){var i=n||6371008.8,o=Re(t[1]),a=Re(t[0]),s=e/i,u=Math.asin(Math.sin(o)*Math.cos(s)+Math.cos(o)*Math.sin(s)*Math.cos(r));return[Pe(a+Math.atan2(Math.sin(r)*Math.sin(s)*Math.cos(o),Math.cos(s)-Math.sin(o)*Math.sin(u))),Pe(u)]}function $e(t,e,r){var n=void 0!==r?t.toFixed(r):""+t,i=n.indexOf(".");return(i=-1===i?n.length:i)>e?n:new Array(1+e-i).join("0")+n}function Qe(t,e){for(var r=(""+t).split("."),n=(""+e).split("."),i=0;i<Math.max(r.length,n.length);i++){var o=parseInt(r[i]||"0",10),a=parseInt(n[i]||"0",10);if(o>a)return 1;if(a>o)return-1}return 0}function tr(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function er(t,e){var r,n,i=t[0],o=t[1],a=e[0],s=e[1],u=a[0],l=a[1],h=s[0],c=s[1],p=h-u,f=c-l,d=0===p&&0===f?0:(p*(i-u)+f*(o-l))/(p*p+f*f||0);return d<=0?(r=u,n=l):d>=1?(r=h,n=c):(r=u+d*p,n=l+d*f),[r,n]}function rr(t,e,r){var n=Oe(e+180,360)-180,i=Math.abs(3600*n),o=r||0,a=Math.pow(10,o),s=Math.floor(i/3600),u=Math.floor((i-3600*s)/60),l=i-3600*s-60*u;return(l=Math.ceil(l*a)/a)>=60&&(l=0,u+=1),u>=60&&(u=0,s+=1),s+"° "+$e(u,2)+"′ "+$e(l,2,o)+"″"+(0==n?"":" "+t.charAt(n<0?1:0))}function nr(t,e,r){return t?e.replace("{x}",t[0].toFixed(r)).replace("{y}",t[1].toFixed(r)):""}function ir(t,e){for(var r=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){r=!1;break}return r}function or(t,e){var r=Math.cos(e),n=Math.sin(e),i=t[0]*r-t[1]*n,o=t[1]*r+t[0]*n;return t[0]=i,t[1]=o,t}function ar(t,e){return t[0]*=e,t[1]*=e,t}function sr(t,e){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function ur(t,e){return Math.sqrt(sr(t,e))}function lr(t,e){return sr(t,er(t,e))}function hr(t,e){return nr(t,"{x}, {y}",e)}function cr(t,e){if(e.canWrapX()){var r=ge(e.getExtent()),n=pr(t,e,r);n&&(t[0]-=n*r)}return t}function pr(t,e,r){var n=e.getExtent(),i=0;if(e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])){var o=r||ge(n);i=Math.floor((t[0]-n[0])/o)}return i}function fr(t,e,r){var n;if(void 0!==e){for(var i=0,o=t.length;i<o;++i)e[i]=t[i];n=e}else n=t.slice();return n}function dr(t,e,r){if(void 0!==e&&t!==e){for(var n=0,i=t.length;n<i;++n)e[n]=t[n];t=e}return t}function gr(t){!function(t,e){Ve[t]=e}(t.getCode(),t),qe(t,t,fr)}function yr(t){return"string"==typeof t?Ve[t]||null:t||null}function mr(t,e,r,n){var i,o=(t=yr(t)).getPointResolutionFunc();if(o)i=o(e,r),n&&n!==t.getUnits()&&(a=t.getMetersPerUnit())&&(i=i*a/vt[n]);else if(t.getUnits()==_t.DEGREES&&!n||n==_t.DEGREES)i=e;else{var a,s=Tr(t,yr("EPSG:4326")),u=[r[0]-e/2,r[1],r[0]+e/2,r[1],r[0],r[1]-e/2,r[0],r[1]+e/2];i=(Ze((u=s(u,u,2)).slice(0,2),u.slice(2,4))+Ze(u.slice(4,6),u.slice(6,8)))/2,void 0!==(a=n?vt[n]:t.getMetersPerUnit())&&(i/=a)}return i}function vr(t){!function(t){t.forEach(gr)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&qe(e,t,fr)}))}))}function _r(t,e){return t?"string"==typeof t?yr(t):t:yr(e)}function br(t){return function(e,r,n){for(var i=e.length,o=void 0!==n?n:2,a=void 0!==r?r:new Array(i),s=0;s<i;s+=o){var u=t([e[s],e[s+1]]);a[s]=u[0],a[s+1]=u[1];for(var l=o-1;l>=2;--l)a[s+l]=e[s+l]}return a}}function xr(t,e,r,n){var i=yr(t),o=yr(e);qe(i,o,br(r)),qe(o,i,br(n))}function wr(t,e){return Cr(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function Sr(t,e){if(t===e)return!0;var r=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||Tr(t,e)===fr)&&r}function Tr(t,e){var r=Xe(t.getCode(),e.getCode());return r||(r=dr),r}function Er(t,e){return Tr(yr(t),yr(e))}function Cr(t,e,r){return Er(e,r)(t,void 0,t.length)}function Pr(t,e,r,n){return _e(t,Er(e,r),void 0,n)}var Rr,Or,Ir,Lr=null;function Mr(){return Lr}function Fr(t,e){return Lr?Cr(t,e,Lr):t}function Ar(t,e){return Lr?Cr(t,Lr,e):t}function kr(t,e){return Lr?Pr(t,e,Lr):t}function Nr(t,e){return Lr?Pr(t,Lr,e):t}function jr(t,e,r){return function(n){var i,o,a=n[0],s=n[1];if(t.canWrapX()){var u=t.getExtent(),l=ge(u);(o=pr(n,t,l))&&(a-=o*l),a=we(a,u[0],u[2]),s=we(s,u[1],u[3]),i=r([a,s])}else i=r(n);return o&&e.canWrapX()&&(i[0]+=o*ge(e.getExtent())),i}}function Gr(t,e,r,n,i,o){for(var a=o||[],s=0,u=e;u<r;u+=n){var l=t[u],h=t[u+1];a[s++]=i[0]*l+i[2]*h+i[4],a[s++]=i[1]*l+i[3]*h+i[5]}return o&&a.length!=s&&(a.length=s),a}function Dr(t,e,r,n,i,o,a){for(var s=a||[],u=Math.cos(i),l=Math.sin(i),h=o[0],c=o[1],p=0,f=e;f<r;f+=n){var d=t[f]-h,g=t[f+1]-c;s[p++]=h+d*u-g*l,s[p++]=c+d*l+g*u;for(var y=f+2;y<f+n;++y)s[p++]=t[y]}return a&&s.length!=p&&(s.length=p),s}function zr(t,e,r,n,i,o,a){for(var s=a||[],u=0,l=e;l<r;l+=n){s[u++]=t[l]+i,s[u++]=t[l+1]+o;for(var h=l+2;h<l+n;++h)s[u++]=t[h]}return a&&s.length!=u&&(s.length=u),s}vr(Ne),vr(Ye),Rr=Ne,Or=je,Ir=Ge,Ye.forEach((function(t){Rr.forEach((function(e){qe(t,e,Or),qe(e,t,Ir)}))}));var Ur=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Br=[1,0,0,1,0,0],Yr=function(t){function e(){var e,r,n,i,o,a=t.call(this)||this;return a.extent_=[1/0,1/0,-1/0,-1/0],a.extentRevision_=-1,a.simplifiedGeometryMaxMinSquaredTolerance=0,a.simplifiedGeometryRevision=0,a.simplifyTransformedInternal=(e=function(t,e,r){if(!r)return this.getSimplifiedGeometry(e);var n=this.clone();return n.applyTransform(r),n.getSimplifiedGeometry(e)},o=!1,function(){var t=Array.prototype.slice.call(arguments);return o&&this===i&&_(t,n)||(o=!0,i=this,n=t,r=e.apply(this,arguments)),r}),a}return Ur(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return n()},e.prototype.closestPointXY=function(t,e,r,i){return n()},e.prototype.containsXY=function(t,e){var r=this.getClosestPoint([t,e]);return r[0]===t&&r[1]===e},e.prototype.getClosestPoint=function(t,e){var r=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],r,1/0),r},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return n()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Kt(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){n()},e.prototype.scale=function(t,e,r){n()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return n()},e.prototype.getType=function(){return n()},e.prototype.applyTransform=function(t){n()},e.prototype.intersectsExtent=function(t){return n()},e.prototype.translate=function(t,e){n()},e.prototype.transform=function(t,e){var r=yr(t),n=r.getUnits()==_t.TILE_PIXELS?function(t,n,i){var o=r.getExtent(),a=r.getWorldExtent(),s=ce(a)/ce(o);return Ct(Br,a[0],a[3],s,-s,0,0,0),Gr(t,0,t.length,i,Br,n),Er(r,e)(t,n,i)}:Er(r,e);return this.applyTransform(n),this},e}(rt),Vr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Wr(t){var e;return t==pt?e=2:t==ft||t==dt?e=3:t==gt&&(e=4),e}var qr=function(t){function e(){var e=t.call(this)||this;return e.layout=pt,e.stride=2,e.flatCoordinates=null,e}return Vr(e,t),e.prototype.computeExtent=function(t){return Jt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return n()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=Wr(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){n()},e.prototype.setLayout=function(t,e,r){var n;if(t)n=Wr(t);else{for(var i=0;i<r;++i){if(0===e.length)return this.layout=pt,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=pt:3==t?e=ft:4==t&&(e=gt);return e}(n=e.length)}this.layout=t,this.stride=n},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var r=this.getFlatCoordinates();if(r){var n=this.getStride();Dr(r,0,r.length,n,t,e,r),this.changed()}},e.prototype.scale=function(t,e,r){var n=e;void 0===n&&(n=t);var i=r;i||(i=ue(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();!function(t,e,r,n,i,o,a,s){for(var u=s||[],l=a[0],h=a[1],c=0,p=e;p<r;p+=n){var f=t[p]-l,d=t[p+1]-h;u[c++]=l+i*f,u[c++]=h+o*d;for(var g=p+2;g<p+n;++g)u[c++]=t[g]}s&&u.length!=c&&(u.length=c)}(o,0,o.length,a,t,n,i,o),this.changed()}},e.prototype.translate=function(t,e){var r=this.getFlatCoordinates();if(r){var n=this.getStride();zr(r,0,r.length,n,t,e,r),this.changed()}},e}(Yr);function Xr(t,e,r,n,i,o,a){var s,u=t[e],l=t[e+1],h=t[r]-u,c=t[r+1]-l;if(0===h&&0===c)s=e;else{var p=((i-u)*h+(o-l)*c)/(h*h+c*c);if(p>1)s=r;else{if(p>0){for(var f=0;f<n;++f)a[f]=Ie(t[e+f],t[r+f],p);return void(a.length=n)}s=e}}for(f=0;f<n;++f)a[f]=t[s+f];a.length=n}function Zr(t,e,r,n,i){var o=t[e],a=t[e+1];for(e+=n;e<r;e+=n){var s=t[e],u=t[e+1],l=Ce(o,a,s,u);l>i&&(i=l),o=s,a=u}return i}function Kr(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o];i=Zr(t,e,s,n,i),e=s}return i}function Hr(t,e,r,n,i,o,a,s,u,l,h){if(e==r)return l;var c,p;if(0===i){if((p=Ce(a,s,t[e],t[e+1]))<l){for(c=0;c<n;++c)u[c]=t[e+c];return u.length=n,p}return l}for(var f=h||[NaN,NaN],d=e+n;d<r;)if(Xr(t,d-n,d,n,a,s,f),(p=Ce(a,s,f[0],f[1]))<l){for(l=p,c=0;c<n;++c)u[c]=f[c];u.length=n,d+=n}else d+=n*Math.max((Math.sqrt(p)-Math.sqrt(l))/i|0,1);if(o&&(Xr(t,r-n,e,n,a,s,f),(p=Ce(a,s,f[0],f[1]))<l)){for(l=p,c=0;c<n;++c)u[c]=f[c];u.length=n}return l}function Jr(t,e,r,n,i,o,a,s,u,l,h){for(var c=h||[NaN,NaN],p=0,f=r.length;p<f;++p){var d=r[p];l=Hr(t,e,d,n,i,o,a,s,u,l,c),e=d}return l}function $r(t,e,r,n){for(var i=0,o=r.length;i<o;++i)t[e++]=r[i];return e}function Qr(t,e,r,n){for(var i=0,o=r.length;i<o;++i)for(var a=r[i],s=0;s<n;++s)t[e++]=a[s];return e}function tn(t,e,r,n,i){for(var o=i||[],a=0,s=0,u=r.length;s<u;++s){var l=Qr(t,e,r[s],n);o[a++]=l,e=l}return o.length=a,o}function en(t,e,r,n,i,o,a){var s=(r-e)/n;if(s<3){for(;e<r;e+=n)o[a++]=t[e],o[a++]=t[e+1];return a}var u=new Array(s);u[0]=1,u[s-1]=1;for(var l=[e,r-n],h=0;l.length>0;){for(var c=l.pop(),p=l.pop(),f=0,d=t[p],g=t[p+1],y=t[c],m=t[c+1],v=p+n;v<c;v+=n){var _=Ee(t[v],t[v+1],d,g,y,m);_>f&&(h=v,f=_)}f>i&&(u[(h-e)/n]=1,p+n<h&&l.push(p,h),h+n<c&&l.push(h,c))}for(v=0;v<s;++v)u[v]&&(o[a++]=t[e+v*n],o[a++]=t[e+v*n+1]);return a}function rn(t,e,r,n,i,o,a,s){for(var u=0,l=r.length;u<l;++u){var h=r[u];a=en(t,e,h,n,i,o,a),s.push(a),e=h}return a}function nn(t,e){return e*Math.round(t/e)}function on(t,e,r,n,i,o,a){if(e==r)return a;var s,u,l=nn(t[e],i),h=nn(t[e+1],i);e+=n,o[a++]=l,o[a++]=h;do{if(s=nn(t[e],i),u=nn(t[e+1],i),(e+=n)==r)return o[a++]=s,o[a++]=u,a}while(s==l&&u==h);for(;e<r;){var c=nn(t[e],i),p=nn(t[e+1],i);if(e+=n,c!=s||p!=u){var f=s-l,d=u-h,g=c-l,y=p-h;f*y==d*g&&(f<0&&g<f||f==g||f>0&&g>f)&&(d<0&&y<d||d==y||d>0&&y>d)?(s=c,u=p):(o[a++]=s,o[a++]=u,l=s,h=u,s=c,u=p)}}return o[a++]=s,o[a++]=u,a}function an(t,e,r,n,i,o,a,s){for(var u=0,l=r.length;u<l;++u){var h=r[u];a=on(t,e,h,n,i,o,a),s.push(a),e=h}return a}function sn(t,e,r,n,i){for(var o=void 0!==i?i:[],a=0,s=e;s<r;s+=n)o[a++]=t.slice(s,s+n);return o.length=a,o}function un(t,e,r,n,i){for(var o=void 0!==i?i:[],a=0,s=0,u=r.length;s<u;++s){var l=r[s];o[a++]=sn(t,e,l,n,o[a]),e=l}return o.length=a,o}function ln(t,e,r,n,i){for(var o=void 0!==i?i:[],a=0,s=0,u=r.length;s<u;++s){var l=r[s];o[a++]=un(t,e,l,n,o[a]),e=l[l.length-1]}return o.length=a,o}function hn(t,e,r,n){for(var i=0,o=t[r-n],a=t[r-n+1];e<r;e+=n){var s=t[e],u=t[e+1];i+=a*s-o*u,o=s,a=u}return i/2}function cn(t,e,r,n){for(var i=0,o=0,a=r.length;o<a;++o){var s=r[o];i+=hn(t,e,s,n),e=s}return i}var pn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fn=function(t){function e(e,r){var n=t.call(this)||this;return n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===r||Array.isArray(e[0])?n.setCoordinates(e,r):n.setFlatCoordinates(r,e),n}return pn(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Zr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Hr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,r,n))},e.prototype.getArea=function(){return hn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return sn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[];return r.length=en(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,pt)},e.prototype.getType=function(){return yt.LINEAR_RING},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Qr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qr),dn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gn=function(t){function e(e,r){var n=t.call(this)||this;return n.setCoordinates(e,r),n}return dn(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,n){var i=this.flatCoordinates,o=Ce(t,e,i[0],i[1]);if(o<n){for(var a=this.stride,s=0;s<a;++s)r[s]=i[s];return r.length=a,o}return n},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return Ht(this.flatCoordinates,t)},e.prototype.getType=function(){return yt.POINT},e.prototype.intersectsExtent=function(t){return Wt(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=$r(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qr);function yn(t,e,r,n,i){return!ie(i,(function(i){return!mn(t,e,r,n,i[0],i[1])}))}function mn(t,e,r,n,i,o){for(var a=0,s=t[r-n],u=t[r-n+1];e<r;e+=n){var l=t[e],h=t[e+1];u<=o?h>o&&(l-s)*(o-u)-(i-s)*(h-u)>0&&a++:h<=o&&(l-s)*(o-u)-(i-s)*(h-u)<0&&a--,s=l,u=h}return 0!==a}function vn(t,e,r,n,i,o){if(0===r.length)return!1;if(!mn(t,e,r[0],n,i,o))return!1;for(var a=1,s=r.length;a<s;++a)if(mn(t,r[a-1],r[a],n,i,o))return!1;return!0}function _n(t,e,r,n,i,o,a){for(var s,u,l,h,c,p,d,g=i[o+1],y=[],m=0,v=r.length;m<v;++m){var _=r[m];for(h=t[_-n],p=t[_-n+1],s=e;s<_;s+=n)c=t[s],d=t[s+1],(g<=p&&d<=g||p<=g&&g<=d)&&(l=(g-p)/(d-p)*(c-h)+h,y.push(l)),h=c,p=d}var b=NaN,x=-1/0;for(y.sort(f),h=y[0],s=1,u=y.length;s<u;++s){c=y[s];var w=Math.abs(c-h);w>x&&vn(t,e,r,n,l=(h+c)/2,g)&&(b=l,x=w),h=c}return isNaN(b)&&(b=i[o]),a?(a.push(b,g,x),a):[b,g,x]}function bn(t,e,r,n,i){for(var o=[],a=0,s=r.length;a<s;++a){var u=r[a];o=_n(t,e,u,n,i,2*a,o),e=u[u.length-1]}return o}function xn(t,e,r,n,i){for(var o,a=[t[e],t[e+1]],s=[];e+n<r;e+=n){if(s[0]=t[e+n],s[1]=t[e+n+1],o=i(a,s))return o;a[0]=s[0],a[1]=s[1]}return!1}function wn(t,e,r,n,i){var o=re([1/0,1/0,-1/0,-1/0],t,e,r,n);return!!ye(i,o)&&(!!Vt(i,o)||(o[0]>=i[0]&&o[2]<=i[2]||(o[1]>=i[1]&&o[3]<=i[3]||xn(t,e,r,n,(function(t,e){return function(t,e,r){var n=!1,i=qt(t,e),o=qt(t,r);if(i===At||o===At)n=!0;else{var a=t[0],s=t[1],u=t[2],l=t[3],h=e[0],c=e[1],p=r[0],f=r[1],d=(f-c)/(p-h),g=void 0,y=void 0;o&kt&&!(i&kt)&&(n=(g=p-(f-l)/d)>=a&&g<=u),n||!(o&Nt)||i&Nt||(n=(y=f-(p-u)*d)>=s&&y<=l),n||!(o&jt)||i&jt||(n=(g=p-(f-s)/d)>=a&&g<=u),n||!(o&Gt)||i&Gt||(n=(y=f-(p-a)*d)>=s&&y<=l)}return n}(i,t,e)})))))}function Sn(t,e,r,n,i){if(!function(t,e,r,n,i){return!!wn(t,e,r,n,i)||(!!mn(t,e,r,n,i[0],i[1])||(!!mn(t,e,r,n,i[0],i[3])||(!!mn(t,e,r,n,i[2],i[1])||!!mn(t,e,r,n,i[2],i[3]))))}(t,e,r[0],n,i))return!1;if(1===r.length)return!0;for(var o=1,a=r.length;o<a;++o)if(yn(t,r[o-1],r[o],n,i)&&!wn(t,r[o-1],r[o],n,i))return!1;return!0}function Tn(t,e,r,n){for(;e<r-n;){for(var i=0;i<n;++i){var o=t[e+i];t[e+i]=t[r-n+i],t[r-n+i]=o}e+=n,r-=n}}function En(t,e,r,n){for(var i=!0,o=0;o<n;++o)if(t[e+o]!==t[r-n+o]){i=!1;break}i&&(r-=n);var a=function(t,e,r,n){for(var i=-1,o=1/0,a=1/0,s=e;s<r;s+=n){var u=t[s],l=t[s+1];l>o||(l==o&&u>=a||(i=s,o=l,a=u))}return i}(t,e,r,n),s=a-n;s<e&&(s=r-n);var u=a+n;u>=r&&(u=e);var l=t[s],h=t[s+1],c=t[a],p=t[a+1],f=t[u],d=t[u+1];return c*d+l*p+h*f-(h*c+p*f+l*d)<0}function Cn(t,e,r,n,i){for(var o=void 0!==i&&i,a=0,s=r.length;a<s;++a){var u=r[a],l=En(t,e,u,n);if(0===a){if(o&&l||!o&&!l)return!1}else if(o&&!l||!o&&l)return!1;e=u}return!0}function Pn(t,e,r,n,i){for(var o=void 0!==i&&i,a=0,s=r.length;a<s;++a){var u=r[a],l=En(t,e,u,n);(0===a?o&&l||!o&&!l:o&&!l||!o&&l)&&Tn(t,e,u,n),e=u}return e}function Rn(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o)e=Pn(t,e,r[o],n,i);return e}var On=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),In=function(t){function e(e,r,n){var i=t.call(this)||this;return i.ends_=[],i.flatInteriorPointRevision_=-1,i.flatInteriorPoint_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,void 0!==r&&n?(i.setFlatCoordinates(r,e),i.ends_=n):i.setCoordinates(e,r),i}return On(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?m(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},e.prototype.closestPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Kr(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Jr(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,r,n))},e.prototype.containsXY=function(t,e){return vn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return cn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Pn(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,un(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=ue(this.getExtent());this.flatInteriorPoint_=_n(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new gn(this.getFlatInteriorPoint(),dt)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new fn(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,r=this.ends_,n=[],i=0,o=0,a=r.length;o<a;++o){var s=r[o],u=new fn(e.slice(i,s),t);n.push(u),i=s}return n},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Cn(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Pn(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],n=[];return r.length=an(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),r,0,n),new e(r,pt,n)},e.prototype.getType=function(){return yt.POLYGON},e.prototype.intersectsExtent=function(t){return Sn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var r=tn(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.changed()},e}(qr),Ln=In;function Mn(t,e,r,n){for(var i=r||32,o=[],a=0;a<i;++a)m(o,Je(t,e,2*Math.PI*a/i,n));return o.push(o[0],o[1]),new In(o,pt,[o.length])}function Fn(t){var e=t[0],r=t[1],n=t[2],i=t[3],o=[e,r,e,i,n,i,n,r,e,r];return new In(o,pt,[o.length])}function An(t,e,r){for(var n=e||32,i=t.getStride(),o=t.getLayout(),a=t.getCenter(),s=i*(n+1),u=new Array(s),l=0;l<s;l+=i){u[l]=0,u[l+1]=0;for(var h=2;h<i;h++)u[l+h]=a[h]}var c=[u.length],p=new In(u,o,c);return kn(p,a,t.getRadius(),r),p}function kn(t,e,r,n){for(var i=t.getFlatCoordinates(),o=t.getStride(),a=i.length/o-1,s=n||0,u=0;u<=a;++u){var l=u*o,h=s+2*Oe(u,a)*Math.PI/a;i[l]=e[0]+r*Math.cos(h),i[l+1]=e[1]+r*Math.sin(h)}t.changed()}var Nn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jn="accuracy",Gn="accuracyGeometry",Dn="altitude",zn="altitudeAccuracy",Un="heading",Bn="position",Yn="projection",Vn="speed",Wn="tracking",qn="trackingOptions",Xn=function(t){function e(e){var r=t.call(this,L)||this;return r.code=e.code,r.message=e.message,r}return Nn(e,t),e}(h),Zn=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.position_=null,r.transform_=dr,r.watchId_=void 0,r.addEventListener(et(Yn),r.handleProjectionChanged_),r.addEventListener(et(Wn),r.handleTrackingChanged_),void 0!==n.projection&&r.setProjection(n.projection),void 0!==n.trackingOptions&&r.setTrackingOptions(n.trackingOptions),r.setTracking(void 0!==n.tracking&&n.tracking),r}return Nn(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=Tr(yr("EPSG:4326"),t),this.position_&&this.set(Bn,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set(jn,e.accuracy),this.set(Dn,null===e.altitude?void 0:e.altitude),this.set(zn,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(Un,null===e.heading?void 0:Re(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var r=this.transform_(this.position_);this.set(Bn,r),this.set(Vn,null===e.speed?void 0:e.speed);var n=Mn(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set(Gn,n),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Xn(t))},e.prototype.getAccuracy=function(){return this.get(jn)},e.prototype.getAccuracyGeometry=function(){return this.get(Gn)||null},e.prototype.getAltitude=function(){return this.get(Dn)},e.prototype.getAltitudeAccuracy=function(){return this.get(zn)},e.prototype.getHeading=function(){return this.get(Un)},e.prototype.getPosition=function(){return this.get(Bn)},e.prototype.getProjection=function(){return this.get(Yn)},e.prototype.getSpeed=function(){return this.get(Vn)},e.prototype.getTracking=function(){return this.get(Wn)},e.prototype.getTrackingOptions=function(){return this.get(qn)},e.prototype.setProjection=function(t){this.set(Yn,yr(t))},e.prototype.setTracking=function(t){this.set(Wn,t)},e.prototype.setTrackingOptions=function(t){this.set(qn,t)},e}(rt),Kn=function(){function t(t,e,r){this.decay_=t,this.minVelocity_=e,this.delay_=r,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var r=e-3;r>0&&this.points_[r+2]>t;)r-=3;var n=this.points_[e+2]-this.points_[r+2];if(n<1e3/60)return!1;var i=this.points_[e]-this.points_[r],o=this.points_[e+1]-this.points_[r+1];return this.angle_=Math.atan2(o,i),this.initialVelocity_=Math.sqrt(i*i+o*o)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),Hn=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Jn=/^([a-z]*)$|^hsla?\(.*\)$/i;function $n(t){return"string"==typeof t?t:oi(t)}function Qn(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var r=getComputedStyle(e).color;return document.body.removeChild(e),r}return""}var ti,ei,ri=(ti={},ei=0,function(t){var e;if(ti.hasOwnProperty(t))e=ti[t];else{if(ei>=1024){var r=0;for(var n in ti)0==(3&r++)&&(delete ti[n],--ei)}e=function(t){var e,r,n,i,o;if(Jn.exec(t)&&(t=Qn(t)),Hn.exec(t)){var a=t.length-1,s=void 0;s=a<=4?1:2;var u=4===a||8===a;e=parseInt(t.substr(1+0*s,s),16),r=parseInt(t.substr(1+1*s,s),16),n=parseInt(t.substr(1+2*s,s),16),i=u?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,r=(r<<4)+r,n=(n<<4)+n,u&&(i=(i<<4)+i)),o=[e,r,n,i/255]}else 0==t.indexOf("rgba(")?ii(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),ii(o)):lt(!1,14);return o}(t),ti[t]=e,++ei}return e});function ni(t){return Array.isArray(t)?t:ri(t)}function ii(t){return t[0]=we(t[0]+.5|0,0,255),t[1]=we(t[1]+.5|0,0,255),t[2]=we(t[2]+.5|0,0,255),t[3]=we(t[3],0,1),t}function oi(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var r=t[1];r!=(0|r)&&(r=r+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+r+","+n+","+(void 0===t[3]?1:t[3])+")"}var ai=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var r=this.cache_[e];0!=(3&t++)||r.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,r){var n=si(t,e,r);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,r,n){var i=si(t,e,r);this.cache_[i]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function si(t,e,r){return e+":"+t+":"+(r?$n(r):"null")}var ui=new ai,li="opacity",hi="visible",ci="extent",pi="zIndex",fi="maxResolution",di="minResolution",gi="maxZoom",yi="minZoom",mi="source",vi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_i=function(t){function e(e){var r=t.call(this)||this,n=T({},e);return n[li]=void 0!==e.opacity?e.opacity:1,lt("number"==typeof n[li],64),n[hi]=void 0===e.visible||e.visible,n[pi]=e.zIndex,n[fi]=void 0!==e.maxResolution?e.maxResolution:1/0,n[di]=void 0!==e.minResolution?e.minResolution:0,n[yi]=void 0!==e.minZoom?e.minZoom:-1/0,n[gi]=void 0!==e.maxZoom?e.maxZoom:1/0,r.className_=void 0!==n.className?e.className:"ol-layer",delete n.className,r.setProperties(n),r.state_=null,r}return vi(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},r=this.getZIndex();return e.opacity=we(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==r?r:!1===e.managed?1/0:0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return n()},e.prototype.getLayerStatesArray=function(t){return n()},e.prototype.getExtent=function(){return this.get(ci)},e.prototype.getMaxResolution=function(){return this.get(fi)},e.prototype.getMinResolution=function(){return this.get(di)},e.prototype.getMinZoom=function(){return this.get(yi)},e.prototype.getMaxZoom=function(){return this.get(gi)},e.prototype.getOpacity=function(){return this.get(li)},e.prototype.getSourceState=function(){return n()},e.prototype.getVisible=function(){return this.get(hi)},e.prototype.getZIndex=function(){return this.get(pi)},e.prototype.setExtent=function(t){this.set(ci,t)},e.prototype.setMaxResolution=function(t){this.set(fi,t)},e.prototype.setMinResolution=function(t){this.set(di,t)},e.prototype.setMaxZoom=function(t){this.set(gi,t)},e.prototype.setMinZoom=function(t){this.set(yi,t)},e.prototype.setOpacity=function(t){lt("number"==typeof t,64),this.set(li,t)},e.prototype.setVisible=function(t){this.set(hi,t)},e.prototype.setZIndex=function(t){this.set(pi,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(rt),bi="prerender",xi="postrender",wi="precompose",Si="postcompose",Ti="rendercomplete",Ei="undefined",Ci="loading",Pi="ready",Ri="error",Oi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Ii(t,e){if(!t.visible)return!1;var r=e.resolution;if(r<t.minResolution||r>=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var Li=function(t){function e(e){var r=this,n=T({},e);delete n.source,(r=t.call(this,n)||this).mapPrecomposeKey_=null,r.mapRenderKey_=null,r.sourceChangeKey_=null,r.renderer_=null,e.render&&(r.render=e.render),e.map&&r.setMap(e.map),r.addEventListener(et(mi),r.handleSourcePropertyChange_);var i=e.source?e.source:null;return r.setSource(i),r}return Oi(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(mi)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Ei},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(X(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=W(t,I,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_.getFeatures(t)},e.prototype.render=function(t,e){var r=this.getRenderer();if(r.prepareFrame(t))return r.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(X(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(X(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=W(t,wi,(function(t){var e=t.frameState.layerStatesArray,r=this.getLayerState(!1);lt(!e.some((function(t){return t.layer===r.layer})),67),e.push(r)}),this),this.mapRenderKey_=W(this,I,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(mi,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(_i),Mi=function(){function t(){}return t.prototype.drawCustom=function(t,e,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();function Fi(t){return Array.isArray(t)?oi(t):t}var Ai="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",ki=-1!==Ai.indexOf("firefox"),Ni=(-1!==Ai.indexOf("safari")&&Ai.indexOf("chrom"),-1!==Ai.indexOf("webkit")&&-1==Ai.indexOf("edge")),ji=-1!==Ai.indexOf("macintosh"),Gi="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Di="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,zi="undefined"!=typeof Image&&Image.prototype.decode,Ui=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}();function Bi(t,e,r){var n=r&&r.length?r.shift():Di?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");return t&&(n.width=t),e&&(n.height=e),n.getContext("2d")}function Yi(t){var e=t.offsetWidth,r=getComputedStyle(t);return e+=parseInt(r.marginLeft,10)+parseInt(r.marginRight,10)}function Vi(t){var e=t.offsetHeight,r=getComputedStyle(t);return e+=parseInt(r.marginTop,10)+parseInt(r.marginBottom,10)}function Wi(t,e){var r=e.parentNode;r&&r.replaceChild(t,e)}function qi(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function Xi(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var Zi=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),Ki=["style","variant","weight","size","lineHeight","family"],Hi=function(t){var e=t.match(Zi);if(!e)return null;for(var r={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=Ki.length;n<i;++n){var o=e[n+1];void 0!==o&&(r[Ki[n]]=o)}return r.families=r.family.split(/,\s?/),r},Ji=[],$i=[0,0,0,0],Qi=new rt,to=new O;to.setSize=function(){console.warn("labelCache is deprecated.")};var eo,ro,no,io=null,oo={},ao=function(){var t,e,r=["monospace","serif"],n=r.length,i="wmytzilWMYTZIL@#/&?$%10";function o(t,o,a){for(var s=!0,u=0;u<n;++u){var l=r[u];if(e=lo(t+" "+o+" 32px "+l,i),a!=l){var h=lo(t+" "+o+" 32px "+a+","+l,i);s=s&&h!=e}}return!!s}function a(){for(var e=!0,r=Qi.getKeys(),n=0,i=r.length;n<i;++n){var a=r[n];Qi.get(a)<100&&(o.apply(this,a.split("\n"))?(E(oo),io=null,eo=void 0,Qi.set(a,100)):(Qi.set(a,Qi.get(a)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var r=Hi(e);if(r)for(var n=r.families,i=0,s=n.length;i<s;++i){var u=n[i],l=r.style+"\n"+r.weight+"\n"+u;void 0===Qi.get(l)&&(Qi.set(l,100,!0),o(r.style,r.weight,u)||(Qi.set(l,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),so=(no=oo,function(t){var e=no[t];if(null==e)if(Di){var r=Hi(t),n=uo(t,"Žg"),i=isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight);oo[t]=i*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else ro||((ro=document.createElement("div")).innerHTML="M",ro.style.margin="0 !important",ro.style.padding="0 !important",ro.style.position="absolute !important",ro.style.left="-99999px !important"),ro.style.font=t,document.body.appendChild(ro),e=ro.offsetHeight,no[t]=e,document.body.removeChild(ro);return e});function uo(t,e){return io||(io=Bi(1,1)),t!=eo&&(io.font=t,eo=io.font),io.measureText(e)}function lo(t,e){return uo(t,e).width}function ho(t,e,r){if(e in r)return r[e];var n=lo(t,e);return r[e]=n,n}function co(t,e,r,n){0!==e&&(t.translate(r,n),t.rotate(e),t.translate(-r,-n))}function po(t,e,r,n,i,o,a,s,u,l,h){t.save(),1!==r&&(t.globalAlpha*=r),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(u,l),t.scale(h[0],h[1]),function(t,e){for(var r=t.contextInstructions,n=0,i=r.length;n<i;n+=2)Array.isArray(r[n+1])?e[r[n]].apply(e,r[n+1]):e[r[n]]=r[n+1]}(n,t)):h[0]<0||h[1]<0?(t.translate(u,l),t.scale(h[0],h[1]),t.drawImage(n,i,o,a,s,0,0,a,s)):t.drawImage(n,i,o,a,s,u,l,a*h[0],s*h[1]),t.restore()}var fo=null;function go(t){return Di?Rt(t):(fo||(fo=Bi(1,1).canvas),fo.style.transform=Rt(t),fo.style.transform)}var yo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),mo=function(t){function e(e,r,n,i,o,a,s){var u=t.call(this)||this;return u.context_=e,u.pixelRatio_=r,u.extent_=n,u.transform_=i,u.viewRotation_=o,u.squaredTolerance_=a,u.userTransform_=s,u.contextFillState_=null,u.contextStrokeState_=null,u.contextTextState_=null,u.fillState_=null,u.strokeState_=null,u.image_=null,u.imageAnchorX_=0,u.imageAnchorY_=0,u.imageHeight_=0,u.imageOpacity_=0,u.imageOriginX_=0,u.imageOriginY_=0,u.imageRotateWithView_=!1,u.imageRotation_=0,u.imageScale_=[0,0],u.imageWidth_=0,u.text_="",u.textOffsetX_=0,u.textOffsetY_=0,u.textRotateWithView_=!1,u.textRotation_=0,u.textScale_=[0,0],u.textFillState_=null,u.textStrokeState_=null,u.textState_=null,u.pixelCoordinates_=[],u.tmpLocalTransform_=[1,0,0,1,0,0],u}return yo(e,t),e.prototype.drawImages_=function(t,e,r,n){if(this.image_){var i=Gr(t,e,r,2,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,s=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=s*this.imageOpacity_);var u=this.imageRotation_;this.imageRotateWithView_&&(u+=this.viewRotation_);for(var l=0,h=i.length;l<h;l+=2){var c=i[l]-this.imageAnchorX_,p=i[l+1]-this.imageAnchorY_;if(0!==u||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var f=c+this.imageAnchorX_,d=p+this.imageAnchorY_;Ct(a,f,d,1,1,u,-f,-d),o.setTransform.apply(o,a),o.translate(f,d),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=s)}},e.prototype.drawText_=function(t,e,r,n){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var i=Gr(t,e,r,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<r;e+=n){var s=i[e]+this.textOffsetX_,u=i[e+1]+this.textOffsetY_;if(0!==a||1!=this.textScale_[0]||1!=this.textScale_[1]){var l=Ct(this.tmpLocalTransform_,s,u,1,1,a,-s,-u);o.setTransform.apply(o,l),o.translate(s,u),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,s,u),this.textFillState_&&o.fillText(this.text_,s,u)}}},e.prototype.moveToLineTo_=function(t,e,r,n,i){var o=this.context_,a=Gr(t,e,r,n,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);var s=a.length;i&&(s-=2);for(var u=2;u<s;u+=2)o.lineTo(a[u],a[u+1]);return i&&o.closePath(),r},e.prototype.drawRings_=function(t,e,r,n){for(var i=0,o=r.length;i<o;++i)e=this.moveToLineTo_(t,e,r[i],n,!0);return e},e.prototype.drawCircle=function(t){if(ye(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,r){var n=t.getFlatCoordinates();if(n){var i=t.getStride();return Gr(n,0,n.length,i,e,r)}return null}(t,this.transform_,this.pixelCoordinates_),r=e[2]-e[0],n=e[3]-e[1],i=Math.sqrt(r*r+n*n),o=this.context_;o.beginPath(),o.arc(e[0],e[1],i,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case yt.POINT:this.drawPoint(t);break;case yt.LINE_STRING:this.drawLineString(t);break;case yt.POLYGON:this.drawPolygon(t);break;case yt.MULTI_POINT:this.drawMultiPoint(t);break;case yt.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case yt.MULTI_POLYGON:this.drawMultiPolygon(t);break;case yt.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case yt.CIRCLE:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var r=e.getGeometryFunction()(t);r&&ye(this.extent_,r.getExtent())&&(this.setStyle(e),this.drawGeometry(r))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),r=0,n=e.length;r<n;++r)this.drawGeometry(e[r])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.drawImages_(e,0,e.length,r),""!==this.text_&&this.drawText_(e,0,e.length,r)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.drawImages_(e,0,e.length,r),""!==this.text_&&this.drawText_(e,0,e.length,r)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ye(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,r=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(r,0,r.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var n=t.getFlatMidpoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(ye(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var r=this.context_,n=t.getFlatCoordinates(),i=0,o=t.getEnds(),a=t.getStride();r.beginPath();for(var s=0,u=o.length;s<u;++s)i=this.moveToLineTo_(n,i,o[s],a,!1);r.stroke()}if(""!==this.text_){var l=t.getFlatMidpoints();this.drawText_(l,0,l.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ye(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var r=t.getFlatInteriorPoint();this.drawText_(r,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ye(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,r=t.getOrientedFlatCoordinates(),n=0,i=t.getEndss(),o=t.getStride();e.beginPath();for(var a=0,s=i.length;a<s;++a){var u=i[a];n=this.drawRings_(r,n,u,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var l=t.getFlatInteriorPoints();this.drawText_(l,0,l.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,r=this.contextFillState_;r?r.fillStyle!=t.fillStyle&&(r.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,r=this.contextStrokeState_;r?(r.lineCap!=t.lineCap&&(r.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(_(r.lineDash,t.lineDash)||e.setLineDash(r.lineDash=t.lineDash),r.lineDashOffset!=t.lineDashOffset&&(r.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),r.lineJoin!=t.lineJoin&&(r.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),r.lineWidth!=t.lineWidth&&(r.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),r.miterLimit!=t.miterLimit&&(r.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),r.strokeStyle!=t.strokeStyle&&(r.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,r=this.contextTextState_,n=t.textAlign?t.textAlign:"center";r?(r.font!=t.font&&(r.font=t.font,e.font=t.font),r.textAlign!=n&&(r.textAlign=n,e.textAlign=n),r.textBaseline!=t.textBaseline&&(r.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){if(t){var r=t.getColor();this.fillState_={fillStyle:Fi(r||"#000")}}else this.fillState_=null;if(e){var n=e.getColor(),i=e.getLineCap(),o=e.getLineDash(),a=e.getLineDashOffset(),s=e.getLineJoin(),u=e.getWidth(),l=e.getMiterLimit();this.strokeState_={lineCap:void 0!==i?i:"round",lineDash:o||Ji,lineDashOffset:a||0,lineJoin:void 0!==s?s:"round",lineWidth:this.pixelRatio_*(void 0!==u?u:1),miterLimit:void 0!==l?l:10,strokeStyle:Fi(n||"#000")}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){if(t){var e=t.getSize();if(e){var r=t.getAnchor(),n=t.getImage(1),i=t.getOrigin(),o=t.getScaleArray();this.imageAnchorX_=r[0],this.imageAnchorY_=r[1],this.imageHeight_=e[1],this.image_=n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=i[0],this.imageOriginY_=i[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=[this.pixelRatio_*o[0],this.pixelRatio_*o[1]],this.imageWidth_=e[0]}else this.image_=null}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var r=e.getColor();this.textFillState_={fillStyle:Fi(r||"#000")}}else this.textFillState_=null;var n=t.getStroke();if(n){var i=n.getColor(),o=n.getLineCap(),a=n.getLineDash(),s=n.getLineDashOffset(),u=n.getLineJoin(),l=n.getWidth(),h=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:"round",lineDash:a||Ji,lineDashOffset:s||0,lineJoin:void 0!==u?u:"round",lineWidth:void 0!==l?l:1,miterLimit:void 0!==h?h:10,strokeStyle:Fi(i||"#000")}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),f=t.getOffsetY(),d=t.getRotateWithView(),g=t.getRotation(),y=t.getScaleArray(),m=t.getText(),v=t.getTextAlign(),_=t.getTextBaseline();this.textState_={font:void 0!==c?c:"10px sans-serif",textAlign:void 0!==v?v:"center",textBaseline:void 0!==_?_:"middle"},this.text_=void 0!==m?m:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==g?g:0,this.textScale_=[this.pixelRatio_*y[0],this.pixelRatio_*y[1]]}else this.text_=""},e}(Mi),vo="Circle",_o="Default",bo="Image",xo="LineString",wo="Polygon",So="Text",To=0,Eo=1,Co=2,Po=3,Ro=4,Oo={Point:function(t,e,r,n){var i=r.getImage();if(i){if(i.getImageState()!=Co)return;var o=t.getBuilder(r.getZIndex(),bo);o.setImageStyle(i,t.addDeclutter(!1)),o.drawPoint(e,n)}var a=r.getText();if(a){var s=t.getBuilder(r.getZIndex(),So);s.setTextStyle(a,t.addDeclutter(!!i)),s.drawText(e,n)}},LineString:function(t,e,r,n){var i=r.getStroke();if(i){var o=t.getBuilder(r.getZIndex(),xo);o.setFillStrokeStyle(null,i),o.drawLineString(e,n)}var a=r.getText();if(a){var s=t.getBuilder(r.getZIndex(),So);s.setTextStyle(a,t.addDeclutter(!1)),s.drawText(e,n)}},Polygon:function(t,e,r,n){var i=r.getFill(),o=r.getStroke();if(i||o){var a=t.getBuilder(r.getZIndex(),wo);a.setFillStrokeStyle(i,o),a.drawPolygon(e,n)}var s=r.getText();if(s){var u=t.getBuilder(r.getZIndex(),So);u.setTextStyle(s,t.addDeclutter(!1)),u.drawText(e,n)}},MultiPoint:function(t,e,r,n){var i=r.getImage();if(i){if(i.getImageState()!=Co)return;var o=t.getBuilder(r.getZIndex(),bo);o.setImageStyle(i,t.addDeclutter(!1)),o.drawMultiPoint(e,n)}var a=r.getText();if(a){var s=t.getBuilder(r.getZIndex(),So);s.setTextStyle(a,t.addDeclutter(!!i)),s.drawText(e,n)}},MultiLineString:function(t,e,r,n){var i=r.getStroke();if(i){var o=t.getBuilder(r.getZIndex(),xo);o.setFillStrokeStyle(null,i),o.drawMultiLineString(e,n)}var a=r.getText();if(a){var s=t.getBuilder(r.getZIndex(),So);s.setTextStyle(a,t.addDeclutter(!1)),s.drawText(e,n)}},MultiPolygon:function(t,e,r,n){var i=r.getFill(),o=r.getStroke();if(o||i){var a=t.getBuilder(r.getZIndex(),wo);a.setFillStrokeStyle(i,o),a.drawMultiPolygon(e,n)}var s=r.getText();if(s){var u=t.getBuilder(r.getZIndex(),So);u.setTextStyle(s,t.addDeclutter(!1)),u.drawText(e,n)}},GeometryCollection:function(t,e,r,n){var i,o,a=e.getGeometriesArray();for(i=0,o=a.length;i<o;++i){(0,Oo[a[i].getType()])(t,a[i],r,n)}},Circle:function(t,e,r,n){var i=r.getFill(),o=r.getStroke();if(i||o){var a=t.getBuilder(r.getZIndex(),vo);a.setFillStrokeStyle(i,o),a.drawCircle(e,n)}var s=r.getText();if(s){var u=t.getBuilder(r.getZIndex(),So);u.setTextStyle(s,t.addDeclutter(!1)),u.drawText(e,n)}}};function Io(t,e){return parseInt(o(t),10)-parseInt(o(e),10)}function Lo(t,e){var r=Mo(t,e);return r*r}function Mo(t,e){return.5*t/e}function Fo(t,e,r,n,i,o){var a=!1,s=r.getImage();if(s){var u=s.getImageState();u==Co||u==Po?s.unlistenImageChange(i):(u==To&&s.load(),u=s.getImageState(),s.listenImageChange(i),a=!0)}return function(t,e,r,n,i){var o=r.getGeometryFunction()(e);if(!o)return;var a=o.simplifyTransformed(n,i);if(r.getRenderer())!function t(e,r,n,i){if(r.getType()==yt.GEOMETRY_COLLECTION){for(var o=r.getGeometries(),a=0,s=o.length;a<s;++a)t(e,o[a],n,i);return}e.getBuilder(n.getZIndex(),_o).drawCustom(r,i,n.getRenderer())}(t,a,r,e);else{(0,Oo[a.getType()])(t,a,r,e)}}(t,e,r,n,o),a}function Ao(t){var e,r=t.frameState,n=wt(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),i=Lo(r.viewState.resolution,r.pixelRatio),o=Mr();return o&&(e=Tr(o,r.viewState.projection)),new mo(t.context,r.pixelRatio,r.extent,n,r.viewState.rotation,i,e)}function ko(t,e){e&&e.clear();for(var r=t.declutterItems,n=r.length-1;n>=0;--n)for(var i=r[n],o=i.items,a=0,s=o.length;a<s;a+=3)e=o[a].renderDeclutter(o[a+1],o[a+2],i.opacity,e);return r.length=0,e}var No=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function jo(t,e){ui.expire()}var Go=function(t){function e(e){var r=t.call(this)||this;return r.map_=e,r.declutterTree_=null,r}return No(e,t),e.prototype.dispatchRenderEvent=function(t,e){n()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,r=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;Ct(r,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Pt(n,r)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i,o,a,s){var u,l=e.viewState;function h(t,e,r){return i.call(o,e,t?r:null)}var c=l.projection,p=cr(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&n){var d=ge(c.getExtent());f.push([-d,0],[d,0])}var g,y=e.layerStatesArray,m=y.length;this.declutterTree_&&(g=this.declutterTree_.all().map((function(t){return t.value})));for(var v=[],_=0;_<f.length;_++)for(var b=m-1;b>=0;--b){var x=y[b],w=x.layer;if(w.hasRenderer()&&Ii(x,l)&&a.call(s,w)){var S=w.getRenderer(),T=w.getSource();if(S&&T){var E=T.getWrapX()?p:t,C=h.bind(null,x.managed);v[0]=E[0]+f[_][0],v[1]=E[1]+f[_][1],u=S.forEachFeatureAtCoordinate(v,e,r,C,g)}if(u)return u}}},e.prototype.forEachLayerAtPixel=function(t,e,r,i,o){return n()},e.prototype.hasFeatureAtCoordinate=function(t,e,r,n,i,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,r,n,x,this,i,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){this.declutterTree_=ko(t,this.declutterTree_)},e.prototype.scheduleExpireIconCache=function(t){ui.canExpireCache()&&t.postRenderFunctions.push(jo)},e}(p),Do=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),zo=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.inversePixelTransform=r,o.frameState=n,o.context=i,o}return Do(e,t),e}(h),Uo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bo=function(t){function e(e){var r=t.call(this,e)||this;r.fontChangeListenerKey_=W(Qi,c,e.redrawText.bind(e)),r.element_=document.createElement("div");var n=r.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",r.element_.className="ol-unselectable ol-layers";var i=e.getViewport();return i.insertBefore(r.element_,i.firstChild||null),r.children_=[],r.renderedVisible_=!0,r}return Uo(e,t),e.prototype.dispatchRenderEvent=function(t,e){var r=this.getMap();if(r.hasListener(t)){var n=new zo(t,void 0,e);r.dispatchEvent(n)}},e.prototype.disposeInternal=function(){X(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(e){if(e){this.calculateMatrices2D(e),this.dispatchRenderEvent(wi,e);var r=e.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=e.viewState;this.children_.length=0;for(var i=null,o=0,a=r.length;o<a;++o){var s=r[o];if(e.layerIndex=o,Ii(s,n)&&(s.sourceState==Pi||s.sourceState==Ei)){var u=s.layer.render(e,i);u&&u!==i&&(this.children_.push(u),i=u)}}t.prototype.renderFrame.call(this,e),function(t,e){for(var r=t.childNodes,n=0;;++n){var i=r[n],o=e[n];if(!i&&!o)break;i!==o&&(i?o?t.insertBefore(o,i):(t.removeChild(i),--n):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent(Si,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,r,n,i){for(var o=e.viewState,a=e.layerStatesArray,s=a.length-1;s>=0;--s){var u=a[s],l=u.layer;if(l.hasRenderer()&&Ii(u,o)&&i(l)){var h=l.getRenderer().getDataAtPixel(t,e,r);if(h){var c=n(l,h);if(c)return c}}}},e}(Go),Yo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vo="layers",Wo=function(t){function e(e){var r=this,n=e||{},i=T({},n);delete i.layers;var o=n.layers;return(r=t.call(this,i)||this).layersListenerKeys_=[],r.listenerKeys_={},r.addEventListener(et(Vo),r.handleLayersChanged_),o?Array.isArray(o)?o=new ut(o.slice(),{unique:!0}):lt("function"==typeof o.getArray,43):o=new ut(void 0,{unique:!0}),r.setLayers(o),r}return Yo(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(X),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(W(t,nt,this.handleLayersAdd_,this),W(t,it,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(X);E(this.listenerKeys_);for(var r=t.getArray(),n=0,i=r.length;n<i;n++){var a=r[n];this.listenerKeys_[o(a)]=[W(a,c,this.handleLayerChange_,this),W(a,I,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[o(e)]=[W(e,c,this.handleLayerChange_,this),W(e,I,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=o(t.element);this.listenerKeys_[e].forEach(X),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(Vo)},e.prototype.setLayers=function(t){this.set(Vo,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],r=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));for(var n=this.getLayerState(),i=r,o=e.length;i<o;i++){var a=e[i];a.opacity*=n.opacity,a.visible=a.visible&&n.visible,a.maxResolution=Math.min(a.maxResolution,n.maxResolution),a.minResolution=Math.max(a.minResolution,n.minResolution),a.minZoom=Math.max(a.minZoom,n.minZoom),a.maxZoom=Math.min(a.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==a.extent?a.extent=pe(a.extent,n.extent):a.extent=n.extent)}return e},e.prototype.getSourceState=function(){return Pi},e}(_i),qo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xo=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.map=r,i.frameState=void 0!==n?n:null,i}return qo(e,t),e}(h),Zo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ko=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,o)||this;return a.originalEvent=n,a.pixel_=null,a.coordinate_=null,a.dragging=void 0!==i&&i,a}return Zo(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()},e}(Xo),Ho={SINGLECLICK:"singleclick",CLICK:A,DBLCLICK:k,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Jo="pointermove",$o="pointerdown",Qo="pointerup",ta="pointerout",ea=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ra=function(t){function e(e,r){var n=t.call(this,e)||this;n.map_=e,n.clickTimeoutId_,n.dragging_=!1,n.dragListenerKeys_=[],n.moveTolerance_=r?r*Gi:Gi,n.down_=null;var i=n.map_.getViewport();return n.activePointers_=0,n.trackedTouches_={},n.element_=i,n.pointerdownListenerKey_=W(i,$o,n.handlePointerDown_,n),n.originalPointerMoveEvent_,n.relayedListenerKey_=W(i,Jo,n.relayEvent_,n),n.boundHandleTouchMove_=n.handleTouchMove_.bind(n),n.element_.addEventListener(Y,n.boundHandleTouchMove_,!!Ui&&{passive:!1}),n}return ea(e,t),e.prototype.emulateClick_=function(t){var e=new Ko(Ho.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Ko(Ho.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new Ko(Ho.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==Ho.POINTERUP||e.type==Ho.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==Ho.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new Ko(Ho.POINTERUP,this.map_,t);this.dispatchEvent(e),e.propagationStopped||this.dragging_||!this.isMouseActionButton_(t)||this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(X),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var e=new Ko(Ho.POINTERDOWN,this.map_,t);this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length&&(this.dragListenerKeys_.push(W(document,Ho.POINTERMOVE,this.handlePointerMove_,this),W(document,Ho.POINTERUP,this.handlePointerUp_,this),W(this.element_,Ho.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==document&&this.dragListenerKeys_.push(W(this.element_.getRootNode(),Ho.POINTERUP,this.handlePointerUp_,this)))},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new Ko(Ho.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Ko(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){this.originalPointerMoveEvent_&&!this.originalPointerMoveEvent_.defaultPrevented||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(X(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Y,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(X(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(X),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(O),na="postrender",ia="movestart",oa="moveend",aa="layergroup",sa="size",ua="target",la="view",ha=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,E(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,r=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(r);return delete this.queuedElements_[n],r},t.prototype.enqueue=function(t){lt(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=1/0&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,r=this.priorities_,n=e.length,i=e[t],o=r[t],a=t;t<n>>1;){var s=this.getLeftChildIndex_(t),u=this.getRightChildIndex_(t),l=u<n&&r[u]<r[s]?u:s;e[t]=e[l],r[t]=r[l],t=l}e[t]=i,r[t]=o,this.siftDown_(a,t)},t.prototype.siftDown_=function(t,e){for(var r=this.elements_,n=this.priorities_,i=r[e],o=n[e];e>t;){var a=this.getParentIndex_(e);if(!(n[a]>o))break;r[e]=r[a],n[e]=n[a],e=a}r[e]=i,n[e]=o},t.prototype.reprioritize=function(){var t,e,r,n=this.priorityFunction_,i=this.elements_,o=this.priorities_,a=0,s=i.length;for(e=0;e<s;++e)(r=n(t=i[e]))==1/0?delete this.queuedElements_[this.keyFunction_(t)]:(o[a]=r,i[a++]=t);i.length=a,o.length=a,this.heapify_()},t}(),ca=0,pa=1,fa=2,da=3,ga=4,ya=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ma=function(t){function e(e,r){var n=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return n.boundHandleTileChange_=n.handleTileChange.bind(n),n.tileChangeCallback_=r,n.tilesLoading_=0,n.tilesLoadingKeys_={},n}return ya(e,t),e.prototype.enqueue=function(e){var r=t.prototype.enqueue.call(this,e);r&&e[0].addEventListener(I,this.boundHandleTileChange_);return r},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,r=e.getState();if(e.hifi&&r===fa||r===da||r===ga){e.removeEventListener(I,this.boundHandleTileChange_);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var r,n,i=0;this.tilesLoading_<t&&i<e&&this.getCount()>0;)n=(r=this.dequeue()[0]).getKey(),r.getState()!==ca||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++i,r.load())},e}(ha);var va=0,_a=1,ba="center",xa="resolution",wa="rotation";function Sa(t,e,r){return function(n,i,o,a){if(n){var s=e?0:o[0]*i,u=e?0:o[1]*i,l=t[0]+s/2,h=t[2]-s/2,c=t[1]+u/2,p=t[3]-u/2;l>h&&(h=l=(h+l)/2),c>p&&(p=c=(p+c)/2);var f=we(n[0],l,h),d=we(n[1],c,p),g=30*i;return a&&r&&(f+=-g*Math.log(1+Math.max(0,l-n[0])/g)+g*Math.log(1+Math.max(0,n[0]-h)/g),d+=-g*Math.log(1+Math.max(0,c-n[1])/g)+g*Math.log(1+Math.max(0,n[1]-p)/g)),[f,d]}}}function Ta(t){return t}function Ea(t,e,r,n){var i=ge(e)/r[0],o=ce(e)/r[1];return n?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function Ca(t,e,r){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,r&&(n=Math.max(n,r),n/=Math.log(1+50*Math.max(0,r/t-1))/50+1),we(n,r/2,2*e)}function Pa(t,e,r,n,i){return function(o,a,s,u){if(void 0!==o){var l=n?Ea(t,n,s,i):t;return(void 0===r||r)&&u?Ca(o,l,e):we(o,e,l)}}}function Ra(t){return void 0!==t?0:void 0}function Oa(t){return void 0!==t?t:void 0}function Ia(t){return Math.pow(t,3)}function La(t){return 1-Ia(1-t)}function Ma(t){return 3*t*t-2*t*t*t}function Fa(t){return t}var Aa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function ka(t,e){setTimeout((function(){t(e)}),0)}function Na(t){return!(t.sourceCenter&&t.targetCenter&&!ir(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}var ja=function(t){function e(e){var r=t.call(this)||this,n=T({},e);return r.hints_=[0,0],r.animations_=[],r.updateAnimationKey_,r.projection_=_r(n.projection,"EPSG:3857"),r.viewportSize_=[100,100],r.targetCenter_=null,r.targetResolution_,r.targetRotation_,r.cancelAnchor_=void 0,n.center&&(n.center=Ar(n.center,r.projection_)),n.extent&&(n.extent=Nr(n.extent,r.projection_)),r.applyOptions_(n),r}return Aa(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,r,n,i=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28,a=void 0!==t.zoomFactor?t.zoomFactor:2,s=void 0!==t.multiWorld&&t.multiWorld,u=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,l=void 0!==t.showFullExtent&&t.showFullExtent,h=_r(t.projection,"EPSG:3857"),c=h.getExtent(),p=t.constrainOnlyCenter,f=t.extent;s||f||!h.isGlobal()||(p=!1,f=c);if(void 0!==t.resolutions){var d=t.resolutions;r=d[i],n=void 0!==d[o]?d[o]:d[d.length-1],e=t.constrainResolution?function(t,e,r,n){return function(i,o,a,s){if(void 0!==i){var u=t[0],l=t[t.length-1],h=r?Ea(u,r,a,n):u;if(s)return void 0===e||e?Ca(i,h,l):we(i,l,h);var c=Math.min(h,i),p=Math.floor(g(t,c,o));return t[p]>h&&p<t.length-1?t[p+1]:t[p]}}}(d,u,!p&&f,l):Pa(r,n,u,!p&&f,l)}else{var y=(c?Math.max(ge(c),ce(c)):360*vt[_t.DEGREES]/h.getMetersPerUnit())/256/Math.pow(2,0),m=y/Math.pow(2,28);void 0!==(r=t.maxResolution)?i=0:r=y/Math.pow(a,i),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?r/Math.pow(a,o):y/Math.pow(a,o):m),o=i+Math.floor(Math.log(r/n)/Math.log(a)),n=r/Math.pow(a,o-i),e=t.constrainResolution?function(t,e,r,n,i,o){return function(a,s,u,l){if(void 0!==a){var h=i?Ea(e,i,u,o):e,c=void 0!==r?r:0;if(l)return void 0===n||n?Ca(a,h,c):we(a,c,h);var p=Math.ceil(Math.log(e/h)/Math.log(t)-1e-9),f=-s*(.5-1e-9)+.5,d=Math.min(h,a),g=Math.floor(Math.log(e/d)/Math.log(t)+f),y=Math.max(p,g);return we(e/Math.pow(t,y),c,h)}}}(a,r,n,u,!p&&f,l):Pa(r,n,u,!p&&f,l)}return{constraint:e,maxResolution:r,minResolution:n,minZoom:i,zoomFactor:a}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.minZoom_=e.minZoom;var r=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Sa(t.extent,t.constrainOnlyCenter,e)}var r=_r(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&r.isGlobal()){var n=r.getExtent().slice();return n[0]=-1/0,n[2]=1/0,Sa(n,!1,!1)}return Ta}(t),n=e.constraint,i=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(o=i||Re(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=o?0:t:void 0}):!1===e?Oa:"number"==typeof e?(r=e,n=2*Math.PI/r,function(t,e){return e?t:void 0!==t?t=Math.floor(t/n+.5)*n:void 0}):Oa}return Ra;var r,n;var i,o}(t);this.constraints_={center:r,resolution:n,rotation:i},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},e.prototype.getUpdatedOptions_=function(t){var e=T({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),T({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),r=0;r<e.length;++r){var n=arguments[r];n.center&&((n=T({},n)).center=Ar(n.center,this.getProjection())),n.anchor&&((n=T({},n)).anchor=Ar(n.anchor,this.getProjection())),e[r]=n}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,r=arguments.length;if(r>1&&"function"==typeof arguments[r-1]&&(e=arguments[r-1],--r),!this.isDef()){var n=arguments[r-1];return n.center&&this.setCenterInternal(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&ka(e,!0))}for(var i=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,s=this.targetRotation_,u=[],l=0;l<r;++l){var h=arguments[l],c={start:i,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||Ma,callback:e};if(h.center&&(c.sourceCenter=o,c.targetCenter=h.center.slice(),o=c.targetCenter),void 0!==h.zoom?(c.sourceResolution=a,c.targetResolution=this.getResolutionForZoom(h.zoom),a=c.targetResolution):h.resolution&&(c.sourceResolution=a,c.targetResolution=h.resolution,a=c.targetResolution),void 0!==h.rotation){c.sourceRotation=s;var p=Oe(h.rotation-s+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=s+p,s=c.targetRotation}Na(c)?c.complete=!0:i+=c.duration,u.push(c)}this.animations_.push(u),this.setHint(va,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[va]>0},e.prototype.getInteracting=function(){return this.hints_[_a]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(va,-this.hints_[va]);for(var e=0,r=this.animations_.length;e<r;++e){var n=this.animations_[e];if(n[0].callback&&ka(n[0].callback,!1),!t)for(var i=0,o=n.length;i<o;++i){var a=n[i];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,r=this.animations_.length-1;r>=0;--r){for(var n=this.animations_[r],i=!0,o=0,a=n.length;o<a;++o){var s=n[o];if(!s.complete){var u=t-s.start,l=s.duration>0?u/s.duration:1;l>=1?(s.complete=!0,l=1):i=!1;var h=s.easing(l);if(s.sourceCenter){var c=s.sourceCenter[0],p=s.sourceCenter[1],f=c+h*(s.targetCenter[0]-c),d=p+h*(s.targetCenter[1]-p);this.targetCenter_=[f,d]}if(s.sourceResolution&&s.targetResolution){var g=1===h?s.targetResolution:s.sourceResolution+h*(s.targetResolution-s.sourceResolution);if(s.anchor){var y=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(g,0,y,!0);this.targetCenter_=this.calculateCenterZoom(m,s.anchor)}this.targetResolution_=g,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){var v=1===h?Oe(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+h*(s.targetRotation-s.sourceRotation);if(s.anchor){var _=this.constraints_.rotation(v,!0);this.targetCenter_=this.calculateCenterRotate(_,s.anchor)}this.targetRotation_=v}if(this.applyTargetState_(!0),e=!0,!s.complete)break}}if(i){this.animations_[r]=null,this.setHint(va,-1);var b=n[0].callback;b&&ka(b,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var r,n=this.getCenterInternal();return void 0!==n&&(or(r=[n[0]-e[0],n[1]-e[1]],t-this.getRotation()),tr(r,e)),r},e.prototype.calculateCenterZoom=function(t,e){var r,n=this.getCenterInternal(),i=this.getResolution();void 0!==n&&void 0!==i&&(r=[e[0]-t*(e[0]-n[0])/i,e[1]-t*(e[1]-n[1])/i]);return r},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var r=e[0],n=e[1];return[Math.abs(r*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(r*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Fr(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(ba)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return kr(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSize_(),r=this.getCenterInternal();lt(r,1);var n=this.getResolution();lt(void 0!==n,2);var i=this.getRotation();return lt(void 0!==i,3),he(r,n,i,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(xa)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Nr(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var r=e||this.getViewportSize_(),n=ge(t)/r[0],i=ce(t)/r[1];return Math.max(n,i)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,r=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(r/n)/Math.log(e);return function(t){return r/Math.pow(e,t*i)}},e.prototype.getRotation=function(){return this.get(wa)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),r=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(r/n)/e;return function(t){return Math.log(r/t)/e/i}},e.prototype.getState=function(){var t=this.getCenterInternal(),e=this.getProjection(),r=this.getResolution(),n=this.getRotation();return{center:t.slice(0),projection:void 0!==e?e:null,resolution:r,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,r,n=this.minZoom_||0;if(this.resolutions_){var i=g(this.resolutions_,t,1);n=i,e=this.resolutions_[i],r=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,r=this.zoomFactor_;return n+Math.log(e/t)/Math.log(r)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=we(Math.floor(t),0,this.resolutions_.length-2),r=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(r,we(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var r,n=T({size:this.getViewportSize_()},e||{});if(lt(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))lt(!me(t),25),r=Fn(i=Nr(t,this.getProjection()));else if(t.getType()===yt.CIRCLE){var i;(r=Fn(i=Nr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),ue(i))}else{var o=Mr();r=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(r,n)},e.prototype.fitInternal=function(t,e){var r=e||{},n=r.size;n||(n=this.getViewportSize_());var i,o=void 0!==r.padding?r.padding:[0,0,0,0],a=void 0!==r.nearest&&r.nearest;i=void 0!==r.minResolution?r.minResolution:void 0!==r.maxZoom?this.getResolutionForZoom(r.maxZoom):0;for(var s=t.getFlatCoordinates(),u=this.getRotation(),l=Math.cos(-u),h=Math.sin(-u),c=1/0,p=1/0,f=-1/0,d=-1/0,g=t.getStride(),y=0,m=s.length;y<m;y+=g){var v=s[y]*l-s[y+1]*h,_=s[y]*h+s[y+1]*l;c=Math.min(c,v),p=Math.min(p,_),f=Math.max(f,v),d=Math.max(d,_)}var b=this.getResolutionForExtentInternal([c,p,f,d],[n[0]-o[1]-o[3],n[1]-o[0]-o[2]]);b=isNaN(b)?i:Math.max(b,i),b=this.getConstrainedResolution(b,a?0:1),h=-h;var x=(c+f)/2,w=(p+d)/2,T=[(x+=(o[1]-o[3])/2*b)*l-(w+=(o[0]-o[2])/2*b)*h,w*l+x*h],E=r.callback?r.callback:S;void 0!==r.duration?this.animateInternal({resolution:b,center:this.getConstrainedCenter(T,b),duration:r.duration,easing:r.easing},E):(this.targetResolution_=b,this.targetCenter_=T,this.applyTargetState_(!1,!0),ka(E,!0))},e.prototype.centerOn=function(t,e,r){this.centerOnInternal(Ar(t,this.getProjection()),e,r)},e.prototype.centerOnInternal=function(t,e,r){var n=this.getRotation(),i=Math.cos(-n),o=Math.sin(-n),a=t[0]*i-t[1]*o,s=t[1]*i+t[0]*o,u=this.getResolution(),l=(a+=(e[0]/2-r[0])*u)*i-(s+=(r[1]-e[1]/2)*u)*(o=-o),h=s*i+a*o;this.setCenterInternal([l,h])},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=Fr(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var r=e&&Ar(e,this.getProjection());this.adjustResolutionInternal(t,r)},e.prototype.adjustResolutionInternal=function(t,e){var r=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(this.targetResolution_*t,0,n,r);e&&(this.targetCenter_=this.calculateCenterZoom(i,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=Ar(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var r=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,r);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(Ar(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var r=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,r),i=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,i,r),a=this.constraints_.center(this.targetCenter_,o,i,r);this.get(wa)!==n&&this.set(wa,n),this.get(xa)!==o&&this.set(xa,o),this.get(ba)&&ir(this.get(ba),a)||this.set(ba,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,r){var n=void 0!==t?t:200,i=e||0,o=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(o),s=this.constraints_.resolution(this.targetResolution_,i,a),u=this.constraints_.center(this.targetCenter_,s,a);if(0===n&&!this.cancelAnchor_)return this.targetResolution_=s,this.targetRotation_=o,this.targetCenter_=u,void this.applyTargetState_();var l=r||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===s&&this.getRotation()===o&&this.getCenterInternal()&&ir(this.getCenterInternal(),u)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:u,resolution:s,duration:n,easing:La,anchor:l}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(_a,1)},e.prototype.endInteraction=function(t,e,r){var n=r&&Ar(r,this.getProjection());this.endInteractionInternal(t,e,n)},e.prototype.endInteractionInternal=function(t,e,r){this.setHint(_a,-1),this.resolveConstraints(t,e,r)},e.prototype.getConstrainedCenter=function(t,e){var r=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),r)},e.prototype.getConstrainedZoom=function(t,e){var r=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(r,e))},e.prototype.getConstrainedResolution=function(t,e){var r=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,r,n)},e}(rt);function Ga(t,e,r){return void 0===r&&(r=[0,0]),r[0]=t[0]+2*e,r[1]=t[1]+2*e,r}function Da(t,e,r){return void 0===r&&(r=[0,0]),r[0]=t[0]*e+.5|0,r[1]=t[1]*e+.5|0,r}function za(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var Ua=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var Ba=function(t){function e(e){var r=t.call(this)||this,n=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var r,n,i,o={},a=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Wo({layers:t.layers});o[aa]=a,o[ua]=t.target,o[la]=void 0!==t.view?t.view:new ja,void 0!==t.controls&&(Array.isArray(t.controls)?r=new ut(t.controls.slice()):(lt("function"==typeof t.controls.getArray,47),r=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new ut(t.interactions.slice()):(lt("function"==typeof t.interactions.getArray,48),n=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?i=new ut(t.overlays.slice()):(lt("function"==typeof t.overlays.getArray,49),i=t.overlays):i=new ut;return{controls:r,interactions:n,keyboardEventTarget:e,overlays:i,values:o}}(e);return r.boundHandleBrowserEvent_=r.handleBrowserEvent.bind(r),r.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,r.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:Gi,r.postRenderTimeoutHandle_,r.animationDelayKey_,r.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(r),r.coordinateToPixelTransform_=[1,0,0,1,0,0],r.pixelToCoordinateTransform_=[1,0,0,1,0,0],r.frameIndex_=0,r.frameState_=null,r.previousExtent_=null,r.viewPropertyListenerKey_=null,r.viewChangeListenerKey_=null,r.layerGroupPropertyListenerKeys_=null,r.viewport_=document.createElement("div"),r.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),r.viewport_.style.position="relative",r.viewport_.style.overflow="hidden",r.viewport_.style.width="100%",r.viewport_.style.height="100%",r.overlayContainer_=document.createElement("div"),r.overlayContainer_.style.position="absolute",r.overlayContainer_.style.zIndex="0",r.overlayContainer_.style.width="100%",r.overlayContainer_.style.height="100%",r.overlayContainer_.style.pointerEvents="none",r.overlayContainer_.className="ol-overlaycontainer",r.viewport_.appendChild(r.overlayContainer_),r.overlayContainerStopEvent_=document.createElement("div"),r.overlayContainerStopEvent_.style.position="absolute",r.overlayContainerStopEvent_.style.zIndex="0",r.overlayContainerStopEvent_.style.width="100%",r.overlayContainerStopEvent_.style.height="100%",r.overlayContainerStopEvent_.style.pointerEvents="none",r.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",r.viewport_.appendChild(r.overlayContainerStopEvent_),r.mapBrowserEventHandler_=null,r.moveTolerance_=e.moveTolerance,r.keyboardEventTarget_=n.keyboardEventTarget,r.keyHandlerKeys_=null,r.controls=n.controls||new ut,r.interactions=n.interactions||new ut,r.overlays_=n.overlays,r.overlayIdIndex_={},r.renderer_=null,r.handleResize_,r.postRenderFunctions_=[],r.tileQueue_=new ma(r.getTilePriority.bind(r),r.handleTileChange_.bind(r)),r.addEventListener(et(aa),r.handleLayerGroupChanged_),r.addEventListener(et(la),r.handleViewChanged_),r.addEventListener(et(sa),r.handleSizeChanged_),r.addEventListener(et(ua),r.handleTargetChanged_),r.setProperties(n.values),r.controls.forEach(function(t){t.setMap(this)}.bind(r)),r.controls.addEventListener(nt,function(t){t.element.setMap(this)}.bind(r)),r.controls.addEventListener(it,function(t){t.element.setMap(null)}.bind(r)),r.interactions.forEach(function(t){t.setMap(this)}.bind(r)),r.interactions.addEventListener(nt,function(t){t.element.setMap(this)}.bind(r)),r.interactions.addEventListener(it,function(t){t.element.setMap(null)}.bind(r)),r.overlays_.forEach(r.addOverlayInternal_.bind(r)),r.overlays_.addEventListener(nt,function(t){this.addOverlayInternal_(t.element)}.bind(r)),r.overlays_.addEventListener(it,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(r)),r}return Ua(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,r){if(this.frameState_){var n=this.getCoordinateFromPixelInternal(t),i=void 0!==(r=void 0!==r?r:{}).hitTolerance?r.hitTolerance*this.frameState_.pixelRatio:0,o=void 0!==r.layerFilter?r.layerFilter:x,a=!1!==r.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,i,a,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var r=[];return this.forEachFeatureAtPixel(t,(function(t){r.push(t)}),e),r},e.prototype.forEachLayerAtPixel=function(t,e,r){if(this.frameState_){var n=r||{},i=void 0!==n.hitTolerance?n.hitTolerance*this.frameState_.pixelRatio:0,o=n.layerFilter||x;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,i,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var r=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:x,i=void 0!==e.hitTolerance?e.hitTolerance*this.frameState_.pixelRatio:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(r,this.frameState_,i,o,n,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),r="changedTouches"in t?t.changedTouches[0]:t;return[r.clientX-e.left,r.clientY-e.top]},e.prototype.getTarget=function(){return this.get(ua)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return Fr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?Tt(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(aa)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,r=t.length;e<r;++e){var n=t[e].layer.getSource();if(n&&n.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=Ar(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?Tt(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(sa)},e.prototype.getView=function(){return this.get(la)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getTilePriority=function(t,e,r,n){return function(t,e,r,n,i){if(!t||!(r in t.wantedTiles))return 1/0;if(!t.wantedTiles[r][e.getKey()])return 1/0;var o=t.viewState.center,a=n[0]-o[0],s=n[1]-o[1];return 65536*Math.log(i)+Math.sqrt(a*a+s*s)/i}(this.frameState_,t,e,r,n)},e.prototype.handleBrowserEvent=function(t,e){var r=e||t.type,n=new Ko(r,this,t);this.handleMapBrowserEvent(n)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,r=e.type;if(r===$o||r===V||r===D){var n=this.viewport_.getRootNode?this.viewport_.getRootNode():document,i=n===document?e.target:n.elementFromPoint(e.clientX,e.clientY);if(this.overlayContainerStopEvent_.contains(i)||!(n===document?document.documentElement:n).contains(i))return}t.frameState=this.frameState_;var o=this.getInteractions().getArray();if(!1!==this.dispatchEvent(t))for(var a=o.length-1;a>=0;a--){var s=o[a];if(s.getActive())if(!s.handleEvent(t))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var r=this.maxTilesLoading_,n=r;if(t){var i=t.viewHints;if(i[va]||i[_a]){var o=!zi&&Date.now()-t.time>8;r=o?0:8,n=o?0:2}}e.getTilesLoading()<r&&(e.reprioritize(),e.loadMoreTiles(r,n))}!t||!this.hasListener(Ti)||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent(Ti,t);for(var a=this.postRenderFunctions_,s=0,u=a.length;s<u;++s)a[s](this,t);a.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.mapBrowserEventHandler_){for(var e=0,r=this.keyHandlerKeys_.length;e<r;++e)X(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener(F,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(V,this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener(B,this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,qi(this.viewport_)}if(t){for(var n in t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new ra(this,this.moveTolerance_),Ho)this.mapBrowserEventHandler_.addEventListener(Ho[n],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(F,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(V,this.boundHandleBrowserEvent_,!!Ui&&{passive:!1});var i=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[W(i,D,this.handleBrowserEvent,this),W(i,z,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(B,this.handleResize_,!1))}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(X(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(X(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=W(t,c,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=W(t,I,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(X),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[W(t,c,this.render,this),W(t,I,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,r=t.length;e<r;++e){var n=t[e].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this.getSize(),r=this.getView(),n=this.frameState_,i=null;if(void 0!==e&&function(t){return t[0]>0&&t[1]>0}(e)&&r&&r.isDef()){var o=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=r.getState();i={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterItems:n?n.declutterItems:[],extent:he(a.center,a.resolution,a.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:o,wantedTiles:{}}}if(this.frameState_=i,this.renderer_.renderFrame(i),i){if(i.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,i.postRenderFunctions),n)(!this.previousExtent_||!me(this.previousExtent_)&&!$t(i.extent,this.previousExtent_))&&(this.dispatchEvent(new Xo(ia,this,n)),this.previousExtent_=Kt(this.previousExtent_));this.previousExtent_&&!i.viewHints[va]&&!i.viewHints[_a]&&!$t(i.extent,this.previousExtent_)&&(this.dispatchEvent(new Xo(oa,this,i)),Ut(i.extent,this.previousExtent_))}this.dispatchEvent(new Xo(na,this,i)),this.postRenderTimeoutHandle_=setTimeout(this.handlePostRender.bind(this),0)},e.prototype.setLayerGroup=function(t){this.set(aa,t)},e.prototype.setSize=function(t){this.set(sa,t)},e.prototype.setTarget=function(t){this.set(ua,t)},e.prototype.setView=function(t){this.set(la,t)},e.prototype.updateSize=function(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0);this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,r=getComputedStyle(this.viewport_);r.width&&r.height&&(e=[parseInt(r.width,10),parseInt(r.height,10)]),t.setViewportSize(e)}},e}(rt),Ya=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Va=function(t){function e(e){var r=t.call(this)||this,n=e.element;return!n||e.target||n.style.pointerEvents||(n.style.pointerEvents="auto"),r.element=n||null,r.target_=null,r.map_=null,r.listenerKeys=[],e.render&&(r.render=e.render),e.target&&r.setTarget(e.target),r}return Ya(e,t),e.prototype.disposeInternal=function(){qi(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&qi(this.element);for(var e=0,r=this.listenerKeys.length;e<r;++e)X(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==S&&this.listenerKeys.push(W(t,na,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(rt),Wa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qa=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).ulElement_=document.createElement("ul"),r.collapsed_=void 0===n.collapsed||n.collapsed,r.overrideCollapsible_=void 0!==n.collapsible,r.collapsible_=void 0===n.collapsible||n.collapsible,r.collapsible_||(r.collapsed_=!1);var i=void 0!==n.className?n.className:"ol-attribution",o=void 0!==n.tipLabel?n.tipLabel:"Attributions",a=void 0!==n.collapseLabel?n.collapseLabel:"»";"string"==typeof a?(r.collapseLabel_=document.createElement("span"),r.collapseLabel_.textContent=a):r.collapseLabel_=a;var s=void 0!==n.label?n.label:"i";"string"==typeof s?(r.label_=document.createElement("span"),r.label_.textContent=s):r.label_=s;var u=r.collapsible_&&!r.collapsed_?r.collapseLabel_:r.label_,l=document.createElement("button");l.setAttribute("type","button"),l.title=o,l.appendChild(u),l.addEventListener(A,r.handleClick_.bind(r),!1);var h=i+" ol-unselectable ol-control"+(r.collapsed_&&r.collapsible_?" ol-collapsed":"")+(r.collapsible_?"":" ol-uncollapsible"),c=r.element;return c.className=h,c.appendChild(r.ulElement_),c.appendChild(l),r.renderedAttributions_=[],r.renderedVisible_=!0,r}return Wa(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},r=[],n=t.layerStatesArray,i=0,o=n.length;i<o;++i){var a=n[i];if(Ii(a,t.viewState)){var s=a.layer.getSource();if(s){var u=s.getAttributions();if(u){var l=u(t);if(l)if(this.overrideCollapsible_||!1!==s.getAttributionsCollapsible()||this.setCollapsible(!1),Array.isArray(l))for(var h=0,c=l.length;h<c;++h)l[h]in e||(r.push(l[h]),e[l[h]]=!0);else l in e||(r.push(l),e[l]=!0)}}}}return r},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),r=e.length>0;if(this.renderedVisible_!=r&&(this.element.style.display=r?"":"none",this.renderedVisible_=r),!_(e,this.renderedAttributions_)){Xi(this.ulElement_);for(var n=0,i=e.length;n<i;++n){var o=document.createElement("li");o.innerHTML=e[n],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?Wi(this.collapseLabel_,this.label_):Wi(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(Va),Xa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Za=function(t){function e(e){var r=this,n=e||{};r=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this;var i=void 0!==n.className?n.className:"ol-rotate",o=void 0!==n.label?n.label:"⇧";r.label_=null,"string"==typeof o?(r.label_=document.createElement("span"),r.label_.className="ol-compass",r.label_.textContent=o):(r.label_=o,r.label_.classList.add("ol-compass"));var a=n.tipLabel?n.tipLabel:"Reset rotation",s=document.createElement("button");s.className=i+"-reset",s.setAttribute("type","button"),s.title=a,s.appendChild(r.label_),s.addEventListener(A,r.handleClick_.bind(r),!1);var u=i+" ol-unselectable ol-control",l=r.element;return l.className=u,l.appendChild(s),r.callResetNorth_=n.resetNorth?n.resetNorth:void 0,r.duration_=void 0!==n.duration?n.duration:250,r.autoHide_=void 0===n.autoHide||n.autoHide,r.rotation_=void 0,r.autoHide_&&r.element.classList.add("ol-hidden"),r}return Xa(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:La}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var r=e.viewState.rotation;if(r!=this.rotation_){var n="rotate("+r+"rad)";if(this.autoHide_){var i=this.element.classList.contains("ol-hidden");i||0!==r?i&&0!==r&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.label_.style.transform=n}this.rotation_=r}},e}(Va),Ka=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ha=function(t){function e(e){var r=this,n=e||{};r=t.call(this,{element:document.createElement("div"),target:n.target})||this;var i=void 0!==n.className?n.className:"ol-zoom",o=void 0!==n.delta?n.delta:1,a=void 0!==n.zoomInLabel?n.zoomInLabel:"+",s=void 0!==n.zoomOutLabel?n.zoomOutLabel:"−",u=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",l=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=i+"-in",h.setAttribute("type","button"),h.title=u,h.appendChild("string"==typeof a?document.createTextNode(a):a),h.addEventListener(A,r.handleClick_.bind(r,o),!1);var c=document.createElement("button");c.className=i+"-out",c.setAttribute("type","button"),c.title=l,c.appendChild("string"==typeof s?document.createTextNode(s):s),c.addEventListener(A,r.handleClick_.bind(r,-o),!1);var p=i+" ol-unselectable ol-control",f=r.element;return f.className=p,f.appendChild(h),f.appendChild(c),r.duration_=void 0!==n.duration?n.duration:250,r}return Ka(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var r=e.getZoom();if(void 0!==r){var n=e.getConstrainedZoom(r+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:La})):e.setZoom(n)}}},e}(Va);function Ja(t){var e=t||{},r=new ut;return(void 0===e.zoom||e.zoom)&&r.push(new Ha(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&r.push(new Za(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&r.push(new qa(e.attributionOptions)),r}var $a="active",Qa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function ts(t,e,r,n){var i=t.getZoom();if(void 0!==i){var o=t.getConstrainedZoom(i+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:r,duration:void 0!==n?n:250,easing:La})}}var es=function(t){function e(e){var r=t.call(this)||this;return e&&e.handleEvent&&(r.handleEvent=e.handleEvent),r.map_=null,r.setActive(!0),r}return Qa(e,t),e.prototype.getActive=function(){return this.get($a)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set($a,t)},e.prototype.setMap=function(t){this.map_=t},e}(rt),rs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ns=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.delta_=n.delta?n.delta:1,r.duration_=void 0!==n.duration?n.duration:250,r}return rs(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Ho.DBLCLICK){var r=t.originalEvent,n=t.map,i=t.coordinate,o=r.shiftKey?-this.delta_:this.delta_;ts(n.getView(),o,i,this.duration_),t.preventDefault(),e=!0}return!e},e}(es),is=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function os(t){for(var e=t.length,r=0,n=0,i=0;i<e;i++)r+=t[i].clientX,n+=t[i].clientY;return[r/e,n/e]}var as=function(t){function e(e){var r=this,n=e||{};return r=t.call(this,n)||this,n.handleDownEvent&&(r.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(r.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(r.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(r.handleUpEvent=n.handleUpEvent),n.stopDown&&(r.stopDown=n.stopDown),r.handlingDownUpSequence=!1,r.trackedPointers_={},r.targetPointers=[],r}return is(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Ho.POINTERDRAG)this.handleDragEvent(t),t.preventDefault();else if(t.type==Ho.POINTERUP){var r=this.handleUpEvent(t);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(t.type==Ho.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==Ho.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===Ho.POINTERDOWN||e===Ho.POINTERDRAG||e===Ho.POINTERUP}(t)){var e=t.originalEvent,r=e.pointerId.toString();t.type==Ho.POINTERUP?delete this.trackedPointers_[r]:(t.type==Ho.POINTERDOWN||r in this.trackedPointers_)&&(this.trackedPointers_[r]=e),this.targetPointers=C(this.trackedPointers_)}},e}(es);function ss(t){var e=arguments;return function(t){for(var r=!0,n=0,i=e.length;n<i&&(r=r&&e[n](t));++n);return r}}var us=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ls=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},hs=function(t){return t.target.getTargetElement().contains(document.activeElement)},cs=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||hs(t)},ps=x,fs=function(t){var e=t.originalEvent;return 0==e.button&&!(Ni&&ji&&e.ctrlKey)},ds=w,gs=function(t){return t.type==Ho.SINGLECLICK},ys=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ms=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},vs=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},_s=function(t){var e=t.originalEvent;return lt(void 0!==e,56),"mouse"==e.pointerType},bs=function(t){var e=t.originalEvent;return lt(void 0!==e,56),e.isPrimary&&0===e.button},xs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ws=function(t){function e(e){var r=t.call(this,{stopDown:w})||this,n=e||{};r.kinetic_=n.kinetic,r.lastCentroid=null,r.lastPointersCount_,r.panning_=!1;var i=n.condition?n.condition:ss(ys,bs);return r.condition_=n.onFocusOnly?ss(cs,i):i,r.noKinetic_=!1,r}return xs(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,r=os(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var n=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],i=t.map.getView();ar(n,i.getResolution()),or(n,i.getRotation()),i.adjustCenterInternal(n)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,r=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),i=this.kinetic_.getAngle(),o=r.getCenterInternal(),a=e.getPixelFromCoordinateInternal(o),s=e.getCoordinateFromPixelInternal([a[0]-n*Math.cos(i),a[1]-n*Math.sin(i)]);r.animateInternal({center:r.getConstrainedCenter(s),duration:500,easing:La})}return this.panning_&&(this.panning_=!1,r.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(as),Ss=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ts=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{stopDown:w})||this).condition_=n.condition?n.condition:ls,r.lastAngle_=void 0,r.duration_=void 0!==n.duration?n.duration:250,r}return Ss(e,t),e.prototype.handleDragEvent=function(t){if(_s(t)){var e=t.map,r=e.getView();if(r.getConstraints().rotation!==Ra){var n=e.getSize(),i=t.pixel,o=Math.atan2(n[1]/2-i[1],i[0]-n[0]/2);if(void 0!==this.lastAngle_){var a=o-this.lastAngle_;r.adjustRotationInternal(-a)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!_s(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!_s(t)&&(!(!fs(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(as),Es=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cs=function(t){function e(e){var r=t.call(this)||this;return r.geometry_=null,r.element_=document.createElement("div"),r.element_.style.position="absolute",r.element_.style.pointerEvents="auto",r.element_.className="ol-box "+e,r.map_=null,r.startPixel_=null,r.endPixel_=null,r}return Es(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,r=this.element_.style;r.left=Math.min(t[0],e[0])+"px",r.top=Math.min(t[1],e[1])+"px",r.width=Math.abs(e[0]-t[0])+"px",r.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,r=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Ln([r])},e.prototype.getGeometry=function(){return this.geometry_},e}(p),Ps=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rs="boxstart",Os="boxdrag",Is="boxend",Ls=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.coordinate=r,i.mapBrowserEvent=n,i}return Ps(e,t),e}(h),Ms=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.box_=new Cs(n.className||"ol-dragbox"),r.minArea_=void 0!==n.minArea?n.minArea:64,n.onBoxEnd&&(r.onBoxEnd=n.onBoxEnd),r.startPixel_=null,r.condition_=n.condition?n.condition:fs,r.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:r.defaultBoxEndCondition,r}return Ps(e,t),e.prototype.defaultBoxEndCondition=function(t,e,r){var n=r[0]-e[0],i=r[1]-e[1];return n*n+i*i>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ls(Os,t.coordinate,t))},e.prototype.handleUpEvent=function(t){return this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd(t),this.dispatchEvent(new Ls(Is,t.coordinate,t))),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Ls(Rs,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(as),Fs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),As=function(t){function e(e){var r=this,n=e||{},i=n.condition?n.condition:ms;return(r=t.call(this,{condition:i,className:n.className||"ol-dragzoom",minArea:n.minArea})||this).duration_=void 0!==n.duration?n.duration:200,r.out_=void 0!==n.out&&n.out,r}return Fs(e,t),e.prototype.onBoxEnd=function(t){var e,r,n=this.getMap(),i=n.getView(),o=n.getSize(),a=this.getGeometry().getExtent();if(this.out_){var s=i.calculateExtentInternal(o),u=(e=[n.getPixelFromCoordinateInternal(ae(a)),n.getPixelFromCoordinateInternal(de(a))],ee(Kt(r),e));ve(s,1/i.getResolutionForExtentInternal(u,o)),a=s}var l=i.getConstrainedResolution(i.getResolutionForExtentInternal(a,o)),h=i.getConstrainedCenter(ue(a),l);i.animateInternal({resolution:l,center:h,duration:this.duration_,easing:La})},e}(Ms),ks=37,Ns=38,js=39,Gs=40,Ds=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),zs=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.defaultCondition_=function(t){return ys(t)&&vs(t)},r.condition_=void 0!==n.condition?n.condition:r.defaultCondition_,r.duration_=void 0!==n.duration?n.duration:100,r.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,r}return Ds(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==D){var r=t.originalEvent.keyCode;if(this.condition_(t)&&(r==Gs||r==ks||r==js||r==Ns)){var n=t.map.getView(),i=n.getResolution()*this.pixelDelta_,o=0,a=0;r==Gs?a=-i:r==ks?o=-i:r==js?o=i:a=i;var s=[o,a];or(s,n.getRotation()),function(t,e,r){var n=t.getCenterInternal();if(n){var i=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==r?r:250,easing:Fa,center:t.getConstrainedCenter(i)})}}(n,s,this.duration_),t.preventDefault(),e=!0}}return!e},e}(es),Us=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bs=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.condition_=n.condition?n.condition:vs,r.delta_=n.delta?n.delta:1,r.duration_=void 0!==n.duration?n.duration:100,r}return Us(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==D||t.type==z){var r=t.originalEvent.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var n=t.map,i=r=="+".charCodeAt(0)?this.delta_:-this.delta_;ts(n.getView(),i,void 0,this.duration_),t.preventDefault(),e=!0}}return!e},e}(es),Ys=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vs="trackpad",Ws="wheel",qs=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,n)||this).totalDelta_=0,r.lastDelta_=0,r.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,r.duration_=void 0!==n.duration?n.duration:250,r.timeout_=void 0!==n.timeout?n.timeout:80,r.useAnchor_=void 0===n.useAnchor||n.useAnchor,r.constrainResolution_=void 0!==n.constrainResolution&&n.constrainResolution;var i=n.condition?n.condition:ps;return r.condition_=n.onFocusOnly?ss(cs,i):i,r.lastAnchor_=null,r.startTime_=void 0,r.timeoutId_,r.mode_=void 0,r.trackpadEventGap_=400,r.trackpadTimeoutId_,r.deltaPerZoom_=300,r}return Ys(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==V)return!0;t.preventDefault();var e,r=t.map,n=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==V&&(e=n.deltaY,ki&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=Gi),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var i=Date.now();void 0===this.startTime_&&(this.startTime_=i),(!this.mode_||i-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?Vs:Ws);var o=r.getView();if(this.mode_===Vs&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=i,!1;this.totalDelta_+=e;var a=Math.max(this.timeout_-(i-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),a),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var r=-we(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(r=r?r>0?1:-1:0),ts(e,r,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(es),Xs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zs=function(t){function e(e){var r=this,n=e||{},i=n;return i.stopDown||(i.stopDown=w),(r=t.call(this,i)||this).anchor_=null,r.lastAngle_=void 0,r.rotating_=!1,r.rotationDelta_=0,r.threshold_=void 0!==n.threshold?n.threshold:.3,r.duration_=void 0!==n.duration?n.duration:250,r}return Xs(e,t),e.prototype.handleDragEvent=function(t){var e=0,r=this.targetPointers[0],n=this.targetPointers[1],i=Math.atan2(n.clientY-r.clientY,n.clientX-r.clientX);if(void 0!==this.lastAngle_){var o=i-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=i;var a=t.map,s=a.getView();if(s.getConstraints().rotation!==Ra){var u=a.getViewport().getBoundingClientRect(),l=os(this.targetPointers);l[0]-=u.left,l[1]-=u.top,this.anchor_=a.getCoordinateFromPixelInternal(l),this.rotating_&&(a.render(),s.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(as),Ks=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hs=function(t){function e(e){var r=this,n=e||{},i=n;return i.stopDown||(i.stopDown=w),(r=t.call(this,i)||this).anchor_=null,r.duration_=void 0!==n.duration?n.duration:400,r.lastDistance_=void 0,r.lastScaleDelta_=1,r}return Ks(e,t),e.prototype.handleDragEvent=function(t){var e=1,r=this.targetPointers[0],n=this.targetPointers[1],i=r.clientX-n.clientX,o=r.clientY-n.clientY,a=Math.sqrt(i*i+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;var s=t.map,u=s.getView();1!=e&&(this.lastScaleDelta_=e);var l=s.getViewport().getBoundingClientRect(),h=os(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),s.render(),u.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,r),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(as);function Js(t){var e=t||{},r=new ut,n=new Kn(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&r.push(new Ts),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&r.push(new ns({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&r.push(new ws({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&r.push(new Zs),(void 0===e.pinchZoom||e.pinchZoom)&&r.push(new Hs({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(r.push(new zs),r.push(new Bs({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&r.push(new qs({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&r.push(new As({duration:e.zoomDuration})),r}var $s=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qs=function(t){function e(e){return(e=T({},e)).controls||(e.controls=Ja()),e.interactions||(e.interactions=Js({onFocusOnly:!0})),t.call(this,e)||this}return $s(e,t),e.prototype.createRenderer=function(){return new Bo(this)},e}(Ba),tu="bottom-left",eu="bottom-center",ru="bottom-right",nu="center-left",iu="center-center",ou="center-right",au="top-left",su="top-center",uu="top-right",lu=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hu="element",cu="map",pu="offset",fu="position",du="positioning",gu=function(t){function e(e){var r=t.call(this)||this;r.options=e,r.id=e.id,r.insertFirst=void 0===e.insertFirst||e.insertFirst,r.stopEvent=void 0===e.stopEvent||e.stopEvent,r.element=document.createElement("div"),r.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",r.element.style.position="absolute",r.element.style.pointerEvents="auto";var n=e.autoPan;return n&&"object"!=typeof n&&(n={animation:e.autoPanAnimation,margin:e.autoPanMargin}),r.autoPan=n||!1,r.rendered={transform_:"",visible:!0},r.mapPostrenderListenerKey=null,r.addEventListener(et(hu),r.handleElementChanged),r.addEventListener(et(cu),r.handleMapChanged),r.addEventListener(et(pu),r.handleOffsetChanged),r.addEventListener(et(fu),r.handlePositionChanged),r.addEventListener(et(du),r.handlePositioningChanged),void 0!==e.element&&r.setElement(e.element),r.setOffset(void 0!==e.offset?e.offset:[0,0]),r.setPositioning(void 0!==e.positioning?e.positioning:au),void 0!==e.position&&r.setPosition(e.position),r}return lu(e,t),e.prototype.getElement=function(){return this.get(hu)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(cu)},e.prototype.getOffset=function(){return this.get(pu)},e.prototype.getPosition=function(){return this.get(fu)},e.prototype.getPositioning=function(){return this.get(du)},e.prototype.handleElementChanged=function(){Xi(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(qi(this.element),X(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=W(t,na,this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(hu,t)},e.prototype.setMap=function(t){this.set(cu,t)},e.prototype.setOffset=function(t){this.set(pu,t)},e.prototype.setPosition=function(t){this.set(fu,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get(fu)){var r=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),i=this.getRect(n,[Yi(n),Vi(n)]),o=t||{},a=void 0===o.margin?20:o.margin;if(!Vt(r,i)){var s=i[0]-r[0],u=r[2]-i[2],l=i[1]-r[1],h=r[3]-i[3],c=[0,0];if(s<0?c[0]=s-a:u<0&&(c[0]=Math.abs(u)+a),l<0?c[1]=l-a:h<0&&(c[1]=Math.abs(h)+a),0!==c[0]||0!==c[1]){var p=e.getView().getCenterInternal(),f=e.getPixelFromCoordinateInternal(p),d=[f[0]+c[0],f[1]+c[1]],g=o.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(d),duration:g.duration,easing:g.easing})}}}},e.prototype.getRect=function(t,e){var r=t.getBoundingClientRect(),n=r.left+window.pageXOffset,i=r.top+window.pageYOffset;return[n,i,n+e[0],i+e[1]]},e.prototype.setPositioning=function(t){this.set(du,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var r=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(r,n)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var r=this.element.style,n=this.getOffset(),i=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+n[0])+"px",a=Math.round(t[1]+n[1])+"px",s="0%",u="0%";i==ru||i==ou||i==uu?s="-100%":i!=eu&&i!=iu&&i!=su||(s="-50%"),i==tu||i==eu||i==ru?u="-100%":i!=nu&&i!=iu&&i!=ou||(u="-50%");var l="translate("+s+", "+u+") translate("+o+", "+a+")";this.rendered.transform_!=l&&(this.rendered.transform_=l,r.transform=l,r.msTransform=l)},e.prototype.getOptions=function(){return this.options},e}(rt),yu="arraybuffer",mu="json",vu="text",_u="xml",bu=!1;function xu(t,e,r,n){return function(i,o,a){var s=new XMLHttpRequest;s.open("GET","function"==typeof t?t(i,o,a):t,!0),e.getType()==yu&&(s.responseType="arraybuffer"),s.withCredentials=bu,s.onload=function(t){if(!s.status||s.status>=200&&s.status<300){var o=e.getType(),u=void 0;o==mu||o==vu?u=s.responseText:o==_u?(u=s.responseXML)||(u=(new DOMParser).parseFromString(s.responseText,"application/xml")):o==yu&&(u=s.response),u?r.call(this,e.readFeatures(u,{extent:i,featureProjection:a}),e.readProjection(u)):n.call(this)}else n.call(this)}.bind(this),s.onerror=function(){n.call(this)}.bind(this),s.send()}}function wu(t,e){return xu(t,e,(function(t,e){"function"==typeof this.addFeatures&&this.addFeatures(t)}),S)}function Su(t,e){return[[-1/0,-1/0,1/0,1/0]]}var Tu=function(){function t(t,e,r,n){this.minX=t,this.maxX=e,this.minY=r,this.maxY=n}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Eu(t,e,r,n,i){return void 0!==i?(i.minX=t,i.maxX=e,i.minY=r,i.maxY=n,i):new Tu(t,e,r,n)}var Cu=Tu;function Pu(t,e,r,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=r,n):[t,e,r]}function Ru(t,e,r){return t+"/"+e+"/"+r}function Ou(t){return Ru(t[0],t[1],t[2])}function Iu(t){return t.split("/").map(Number)}function Lu(t){return(t[1]<<t[0])+t[2]}var Mu=[0,0,0],Fu=function(){function t(t){var e,r,n,i;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,lt((e=this.resolutions_,r=!0,n=function(t,e){return e-t}||f,e.every((function(t,i){if(0===i)return!0;var o=n(e[i-1],t);return!(o>0||r&&0===o)}))),17),!t.origins)for(var o=0,a=this.resolutions_.length-1;o<a;++o)if(i){if(this.resolutions_[o]/this.resolutions_[o+1]!==i){i=void 0;break}}else i=this.resolutions_[o]/this.resolutions_[o+1];this.zoomFactor_=i,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,lt(this.origins_.length==this.resolutions_.length,20));var s=t.extent;void 0===s||this.origin_||this.origins_||(this.origin_=fe(s)),lt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,lt(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,lt(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==s?s:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){return new Cu(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1))}),this):s&&this.calculateTileRanges_(s)}return t.prototype.forEachTileCoord=function(t,e,r){for(var n=this.getTileRangeForExtentAndZ(t,e),i=n.minX,o=n.maxX;i<=o;++i)for(var a=n.minY,s=n.maxY;a<=s;++a)r([e,i,a])},t.prototype.forEachTileCoordParentTileRange=function(t,e,r,n){var i,o,a=null,s=t[0]-1;for(2===this.zoomFactor_?(i=t[1],o=t[2]):a=this.getTileCoordExtent(t,n);s>=this.minZoom;){if(e(s,2===this.zoomFactor_?Eu(i=Math.floor(i/2),i,o=Math.floor(o/2),o,r):this.getTileRangeForExtentAndZ(a,s,r)))return!0;--s}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,r){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],i=2*t[2];return Eu(n,n+1,i,i+1,e)}var o=this.getTileCoordExtent(t,r);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},t.prototype.getTileRangeExtent=function(t,e,r){var n=this.getOrigin(t),i=this.getResolution(t),o=za(this.getTileSize(t),this.tmpSize_),a=n[0]+e.minX*o[0]*i,s=n[0]+(e.maxX+1)*o[0]*i;return Zt(a,n[1]+e.minY*o[1]*i,s,n[1]+(e.maxY+1)*o[1]*i,r)},t.prototype.getTileRangeForExtentAndZ=function(t,e,r){var n=Mu;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,n);var i=n[1],o=n[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,n),Eu(i,n[1],o,n[2],r)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),r=this.getResolution(t[0]),n=za(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*r,e[1]-(t[2]+.5)*n[1]*r]},t.prototype.getTileCoordExtent=function(t,e){var r=this.getOrigin(t[0]),n=this.getResolution(t[0]),i=za(this.getTileSize(t[0]),this.tmpSize_),o=r[0]+t[1]*i[0]*n,a=r[1]-(t[2]+1)*i[1]*n;return Zt(o,a,o+i[0]*n,a+i[1]*n,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,r){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,r)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,r,n,i){var o=this.getZForResolution(r),a=r/this.getResolution(o),s=this.getOrigin(o),u=za(this.getTileSize(o),this.tmpSize_),l=n?.5:0,h=n?.5:0,c=Math.floor((t-s[0])/r+l),p=Math.floor((s[1]-e)/r+h),f=a*c/u[0],d=a*p/u[1];return n?(f=Math.ceil(f)-1,d=Math.ceil(d)-1):(f=Math.floor(f),d=Math.floor(d)),Pu(o,f,d,i)},t.prototype.getTileCoordForXYAndZ_=function(t,e,r,n,i){var o=this.getOrigin(r),a=this.getResolution(r),s=za(this.getTileSize(r),this.tmpSize_),u=n?.5:0,l=n?.5:0,h=Math.floor((t-o[0])/a+u),c=Math.floor((o[1]-e)/a+l),p=h/s[0],f=c/s[1];return n?(p=Math.ceil(p)-1,f=Math.ceil(f)-1):(p=Math.floor(p),f=Math.floor(f)),Pu(r,p,f,i)},t.prototype.getTileCoordForCoordAndZ=function(t,e,r){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,r)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:null},t.prototype.getZForResolution=function(t,e){return we(g(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,r=new Array(e),n=this.minZoom;n<e;++n)r[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=r},t}();function Au(t){var e=t.getDefaultTileGrid();return e||(e=ju(t),t.setDefaultTileGrid(e)),e}function ku(t){var e=t||{},r=e.extent||yr("EPSG:3857").getExtent(),n={extent:r,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Nu(r,e.maxZoom,e.tileSize,e.maxResolution)};return new Fu(n)}function Nu(t,e,r,n){for(var i=void 0!==e?e:42,o=ce(t),a=ge(t),s=za(void 0!==r?r:256),u=n>0?n:Math.max(a/s[0],o/s[1]),l=i+1,h=new Array(l),c=0;c<l;++c)h[c]=u/Math.pow(2,c);return h}function ju(t,e,r,n){return function(t,e,r,n){var i=void 0!==n?n:Lt,o=Nu(t,e,r);return new Fu({extent:t,origin:le(t,i),resolutions:o,tileSize:r})}(Gu(t),e,r,n)}function Gu(t){var e=(t=yr(t)).getExtent();if(!e){var r=180*vt[_t.DEGREES]/t.getMetersPerUnit();e=Zt(-r,-r,r,r)}return e}var Du,zu=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Uu(t,e){for(var r=zu.length,n=0;n<r;++n)try{var i=t.getContext(zu[n],e);if(i)return i}catch(t){}return null}var Bu="http://www.w3.org/2001/XMLSchema-instance";function Yu(t,e){return hl().createElementNS(t,e)}function Vu(t,e){return function t(e,r,n){if(e.nodeType==Node.CDATA_SECTION_NODE||e.nodeType==Node.TEXT_NODE)r?n.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):n.push(e.nodeValue);else{var i=void 0;for(i=e.firstChild;i;i=i.nextSibling)t(i,r,n)}return n}(t,e,[]).join("")}function Wu(t){return"documentElement"in t}function qu(t){return(new DOMParser).parseFromString(t,"application/xml")}function Xu(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&m(n[n.length-1],i)}}function Zu(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&n[n.length-1].push(i)}}function Ku(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&(n[n.length-1]=i)}}function Hu(t,e,r){return function(n,i){var o=t.call(void 0!==r?r:this,n,i);if(void 0!==o){var a=i[i.length-1],s=void 0!==e?e:n.localName,u=void 0;s in a?u=a[s]:(u=[],a[s]=u),u.push(o)}}}function Ju(t,e,r){return function(n,i){var o=t.call(void 0!==r?r:this,n,i);void 0!==o&&(i[i.length-1][void 0!==e?e:n.localName]=o)}}function $u(t,e){return function(r,n,i){t.call(void 0!==e?e:this,r,n,i),i[i.length-1].node.appendChild(r)}}function Qu(t,e){var r,n;return function(e,i,o){if(void 0===r){r={};var a={};a[e.localName]=t,r[e.namespaceURI]=a,n=tl(e.localName)}al(r,n,i,o)}}function tl(t,e){var r=t;return function(t,n,i){var o=n[n.length-1].node,a=r;return void 0===a&&(a=i),Yu(void 0!==e?e:o.namespaceURI,a)}}var el=tl();function rl(t,e){for(var r=e.length,n=new Array(r),i=0;i<r;++i)n[i]=t[e[i]];return n}function nl(t,e,r){var n,i,o=void 0!==r?r:{};for(n=0,i=t.length;n<i;++n)o[t[n]]=e;return o}function il(t,e,r,n){var i;for(i=e.firstElementChild;i;i=i.nextElementSibling){var o=t[i.namespaceURI];if(void 0!==o){var a=o[i.localName];void 0!==a&&a.call(n,i,r)}}}function ol(t,e,r,n,i){return n.push(t),il(e,r,n,i),n.pop()}function al(t,e,r,n,i,o){for(var a,s,u=(void 0!==i?i:r).length,l=0;l<u;++l)void 0!==(a=r[l])&&void 0!==(s=e.call(void 0!==o?o:this,a,n,void 0!==i?i[l]:void 0))&&t[s.namespaceURI][s.localName].call(o,s,a,n)}function sl(t,e,r,n,i,o,a){return i.push(t),al(e,r,n,i,o,a),i.pop()}var ul=void 0;var ll=void 0;function hl(){return void 0===ll&&"undefined"!=typeof document&&(ll=document.implementation.createDocument("","",null)),ll}var cl=35044;function pl(t){switch(t){case 34962:return Float32Array;case 34963:return Uint32Array;default:return Float32Array}}var fl=function(){function t(t,e){this.array=null,this.type=t,lt(34962===t||34963===t,62),this.usage=void 0!==e?e:cl}return t.prototype.ofSize=function(t){this.array=new(pl(this.type))(t)},t.prototype.fromArray=function(t){this.array=pl(this.type).from(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(pl(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}(),dl="webglcontextlost",gl="webglcontextrestored",yl=function(){function t(t){this.gl_=t.webGlContext;var e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer();var r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,t.vertexShader||"\n  precision mediump float;\n  \n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n  \n  uniform vec2 u_screenSize;\n   \n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n"),e.compileShader(r);var n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n  precision mediump float;\n   \n  uniform sampler2D u_image;\n   \n  varying vec2 v_texCoord;\n   \n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord);\n  }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,r),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach(function(r){this.uniforms_.push({value:t.uniforms[r],location:e.getUniformLocation(this.renderTargetProgram_,r)})}.bind(this))}return t.prototype.getGL=function(){return this.gl_},t.prototype.init=function(t){var e=this.getGL(),r=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.viewport(0,0,r[0],r[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==r[0]||this.renderTargetTextureSize_[1]!==r[1]){this.renderTargetTextureSize_=r;var n=e.RGBA,i=e.RGBA,o=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,0,n,r[0],r[1],0,i,o,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0)}},t.prototype.apply=function(t,e){var r=this.getGL(),n=t.size;r.bindFramebuffer(r.FRAMEBUFFER,e?e.getFrameBuffer():null),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,this.renderTargetTexture_),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.bindBuffer(r.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),r.useProgram(this.renderTargetProgram_),r.enableVertexAttribArray(this.renderTargetAttribLocation_),r.vertexAttribPointer(this.renderTargetAttribLocation_,2,r.FLOAT,!1,0,0),r.uniform2f(this.renderTargetUniformLocation_,n[0],n[1]),r.uniform1i(this.renderTargetTextureLocation_,0),this.applyUniforms(t),r.drawArrays(r.TRIANGLES,0,6)},t.prototype.getFrameBuffer=function(){return this.frameBuffer_},t.prototype.applyUniforms=function(t){var e,r=this.getGL(),n=1;this.uniforms_.forEach((function(i){if((e="function"==typeof i.value?i.value(t):i.value)instanceof HTMLCanvasElement||e instanceof ImageData)i.texture||(i.texture=r.createTexture()),r.activeTexture(r["TEXTURE"+n]),r.bindTexture(r.TEXTURE_2D,i.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),e instanceof ImageData?r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,e.width,e.height,0,r.UNSIGNED_BYTE,new Uint8Array(e.data)):r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),r.uniform1i(i.location,n++);else if(Array.isArray(e))switch(e.length){case 2:return void r.uniform2f(i.location,e[0],e[1]);case 3:return void r.uniform3f(i.location,e[0],e[1],e[2]);case 4:return void r.uniform4f(i.location,e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&r.uniform1f(i.location,e)}))},t}();function ml(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}var vl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_l="u_projectionMatrix",bl="u_offsetScaleMatrix",xl="u_offsetRotateMatrix",wl="u_time",Sl="u_zoom",Tl="u_resolution",El={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126};function Cl(t){for(var e=0,r=0;r<t.length;r++){var n=t[r];e+=n.size*Pl(n.type)}return e}function Pl(t){switch(t){case El.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case El.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case El.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case El.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var Rl=function(t){function e(e){var r=t.call(this)||this,n=e||{};r.boundHandleWebGLContextLost_=r.handleWebGLContextLost.bind(r),r.boundHandleWebGLContextRestored_=r.handleWebGLContextRestored.bind(r),r.canvas_=document.createElement("canvas"),r.canvas_.style.position="absolute",r.canvas_.style.left="0",r.gl_=Uu(r.canvas_);var i=r.getGL();if(r.bufferCache_={},r.currentProgram_=null,lt(d(function(){if(!Du){var t=Uu(document.createElement("canvas"));t&&(Du=t.getSupportedExtensions())}return Du}(),"OES_element_index_uint"),63),i.getExtension("OES_element_index_uint"),r.canvas_.addEventListener(dl,r.boundHandleWebGLContextLost_),r.canvas_.addEventListener(gl,r.boundHandleWebGLContextRestored_),r.offsetRotateMatrix_=[1,0,0,1,0,0],r.offsetScaleMatrix_=[1,0,0,1,0,0],r.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.uniformLocations_={},r.attribLocations_={},r.uniforms_=[],n.uniforms)for(var o in n.uniforms)r.uniforms_.push({name:o,value:n.uniforms[o]});return r.postProcessPasses_=n.postProcesses?n.postProcesses.map((function(t){return new yl({webGlContext:i,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})})):[new yl({webGlContext:i})],r.shaderCompileErrors_=null,r.startTime_=Date.now(),r}return vl(e,t),e.prototype.bindBuffer=function(t){var e=this.getGL(),r=o(t),n=this.bufferCache_[r];n||(n={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[r]=n);e.bindBuffer(t.getType(),n.webGlBuffer)},e.prototype.flushBufferData=function(t){var e=this.getGL();this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var e=this.getGL(),r=o(t),n=this.bufferCache_[r];e.isContextLost()||e.deleteBuffer(n.buffer),delete this.bufferCache_[r]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(dl,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(gl,this.boundHandleWebGLContextRestored_)},e.prototype.prepareDraw=function(t){var e=this.getGL(),r=this.getCanvas(),n=t.size,i=t.pixelRatio;r.width=n[0]*i,r.height=n[1]*i,r.style.width=n[0]+"px",r.style.height=n[1]+"px",e.useProgram(this.currentProgram_);for(var o=this.postProcessPasses_.length-1;o>=0;o--)this.postProcessPasses_[o].init(t);e.bindTexture(e.TEXTURE_2D,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,e,r){var n=this.getGL(),i=e.getSize();n.bindFramebuffer(n.FRAMEBUFFER,e.getFramebuffer()),n.viewport(0,0,i[0],i[1]),n.bindTexture(n.TEXTURE_2D,e.getTexture()),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,r?n.ZERO:n.ONE_MINUS_SRC_ALPHA),n.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,e){var r=this.getGL(),n=r.UNSIGNED_INT,i=e-t,o=4*t;r.drawElements(r.TRIANGLES,i,n,o)},e.prototype.finalizeDraw=function(t){for(var e=0;e<this.postProcessPasses_.length;e++)this.postProcessPasses_[e].apply(t,this.postProcessPasses_[e+1]||null)},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var e=t.size,r=t.viewState.rotation,n=xt(this.offsetScaleMatrix_);Et(n,2/e[0],2/e[1]);var i,o,a,s,u=xt(this.offsetRotateMatrix_);0!==r&&(i=u,o=-r,a=Math.cos(o),s=Math.sin(o),wt(i,St(bt,a,s,-s,a,0,0))),this.setUniformMatrixValue(bl,ml(this.tmpMat4_,n)),this.setUniformMatrixValue(xl,ml(this.tmpMat4_,u)),this.setUniformFloatValue(wl,.001*(Date.now()-this.startTime_)),this.setUniformFloatValue(Sl,t.viewState.zoom),this.setUniformFloatValue(Tl,t.viewState.resolution)},e.prototype.applyUniforms=function(t){var e,r=this.getGL(),n=0;this.uniforms_.forEach(function(i){if((e="function"==typeof i.value?i.value(t):i.value)instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageData)i.texture||(i.prevValue=void 0,i.texture=r.createTexture()),r.activeTexture(r["TEXTURE"+n]),r.bindTexture(r.TEXTURE_2D,i.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(!(e instanceof HTMLImageElement)||e.complete)&&i.prevValue!==e&&(i.prevValue=e,r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e)),r.uniform1i(this.getUniformLocation(i.name),n++);else if(Array.isArray(e)&&6===e.length)this.setUniformMatrixValue(i.name,ml(this.tmpMat4_,e));else if(Array.isArray(e)&&e.length<=4)switch(e.length){case 2:return void r.uniform2f(this.getUniformLocation(i.name),e[0],e[1]);case 3:return void r.uniform3f(this.getUniformLocation(i.name),e[0],e[1],e[2]);case 4:return void r.uniform4f(this.getUniformLocation(i.name),e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&r.uniform1f(this.getUniformLocation(i.name),e)}.bind(this))},e.prototype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0)},e.prototype.compileShader=function(t,e){var r=this.getGL(),n=r.createShader(e);return r.shaderSource(n,t),r.compileShader(n),n},e.prototype.getProgram=function(t,e){var r=this.getGL(),n=this.compileShader(t,r.FRAGMENT_SHADER),i=this.compileShader(e,r.VERTEX_SHADER);this.shaderCompileErrors_=null,r.getShaderInfoLog(n)&&(this.shaderCompileErrors_="Fragment shader compilation failed:\n"+r.getShaderInfoLog(n)),r.getShaderInfoLog(i)&&(this.shaderCompileErrors_=(this.shaderCompileErrors_||"")+"Vertex shader compilation failed:\n"+r.getShaderInfoLog(i));var o=r.createProgram();return r.attachShader(o,n),r.attachShader(o,i),r.linkProgram(o),o},e.prototype.getShaderCompileErrors=function(){return this.shaderCompileErrors_},e.prototype.getUniformLocation=function(t){return void 0===this.uniformLocations_[t]&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return void 0===this.attribLocations_[t]&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,e){var r=t.size,n=t.viewState.rotation,i=t.viewState.resolution,o=t.viewState.center;return xt(e),Ct(e,0,0,2/(i*r[0]),2/(i*r[1]),-n,-o[0],-o[1]),e},e.prototype.setUniformFloatValue=function(t,e){this.getGL().uniform1f(this.getUniformLocation(t),e)},e.prototype.setUniformMatrixValue=function(t,e){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,e)},e.prototype.enableAttributeArray_=function(t,e,r,n,i){var o=this.getAttributeLocation(t);o<0||(this.getGL().enableVertexAttribArray(o),this.getGL().vertexAttribPointer(o,e,r,!1,n,i))},e.prototype.enableAttributes=function(t){for(var e=Cl(t),r=0,n=0;n<t.length;n++){var i=t[n];this.enableAttributeArray_(i.name,i.size,i.type||5126,e,r),r+=i.size*Pl(i.type)}},e.prototype.handleWebGLContextLost=function(){E(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.createTexture=function(t,e,r){var n=this.getGL(),i=r||n.createTexture(),o=n.RGBA,a=n.RGBA,s=n.UNSIGNED_BYTE;return n.bindTexture(n.TEXTURE_2D,i),e?n.texImage2D(n.TEXTURE_2D,0,o,a,s,e):n.texImage2D(n.TEXTURE_2D,0,o,t[0],t[1],0,a,s,null),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),i},e}(p),Ol=new Uint8Array(4),Il=function(){function t(t,e){this.helper_=t;var r=t.getGL();this.texture_=r.createTexture(),this.framebuffer_=r.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return t.prototype.setSize=function(t){_(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())},t.prototype.getSize=function(){return this.size_},t.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},t.prototype.readAll=function(){if(this.dataCacheDirty_){var t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},t.prototype.readPixel=function(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return Ol[0]=0,Ol[1]=0,Ol[2]=0,Ol[3]=0,Ol;this.readAll();var r=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return Ol[0]=this.data_[4*r],Ol[1]=this.data_[4*r+1],Ol[2]=this.data_[4*r+2],Ol[3]=this.data_[4*r+3],Ol},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}(),Ll=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ml=function(t){function e(e){var r=t.call(this,{extent:e.extent,origin:e.origin,origins:e.origins,resolutions:e.resolutions,tileSize:e.tileSize,tileSizes:e.tileSizes,sizes:e.sizes})||this;return r.matrixIds_=e.matrixIds,r}return Ll(e,t),e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(Fu),Fl=Ml;function Al(t,e,r){var n=[],i=[],o=[],a=[],s=[],u=void 0!==r?r:[],l=t.SupportedCRS,h=yr(l.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||yr(l),c=h.getMetersPerUnit(),p="ne"==h.getAxisOrientation().substr(0,2);return t.TileMatrix.sort((function(t,e){return e.ScaleDenominator-t.ScaleDenominator})),t.TileMatrix.forEach((function(e){if(!(u.length>0)||v(u,(function(r){return e.Identifier==r.TileMatrix||-1===e.Identifier.indexOf(":")&&t.Identifier+":"+e.Identifier===r.TileMatrix}))){i.push(e.Identifier);var r=28e-5*e.ScaleDenominator/c,l=e.TileWidth,h=e.TileHeight;p?o.push([e.TopLeftCorner[1],e.TopLeftCorner[0]]):o.push(e.TopLeftCorner),n.push(r),a.push(l==h?l:[l,h]),s.push([e.MatrixWidth,e.MatrixHeight])}})),new Ml({extent:e,origins:o,resolutions:n,matrixIds:i,tileSizes:a,sizes:s})}var kl=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=za(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return n()},t.prototype.getImage=function(t){return n()},t.prototype.getHitDetectionImage=function(){return n()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return n()},t.prototype.getImageSize=function(){return n()},t.prototype.getHitDetectionImageSize=function(){return n()},t.prototype.getOrigin=function(){return n()},t.prototype.getSize=function(){return n()},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=za(t)},t.prototype.listenImageChange=function(t){n()},t.prototype.load=function(){n()},t.prototype.unlistenImageChange=function(t){n()},t}(),Nl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jl=function(t){function e(e){var r=this,n=void 0!==e.rotateWithView&&e.rotateWithView;return(r=t.call(this,{opacity:1,rotateWithView:n,rotation:void 0!==e.rotation?e.rotation:0,scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_={},r.hitDetectionCanvas_=null,r.fill_=void 0!==e.fill?e.fill:null,r.origin_=[0,0],r.points_=e.points,r.radius_=void 0!==e.radius?e.radius:e.radius1,r.radius2_=e.radius2,r.angle_=void 0!==e.angle?e.angle:0,r.stroke_=void 0!==e.stroke?e.stroke:null,r.anchor_=null,r.size_=null,r.imageSize_=null,r.hitDetectionImageSize_=null,r.render(),r}return Nl(e,t),e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionCanvas_){var t=this.createRenderOptions();this.createHitDetectionCanvas_(t)}return this.hitDetectionCanvas_},e.prototype.getImage=function(t){if(!this.canvas_[t||1]){var e=this.createRenderOptions(),r=Bi(e.size*t||1,e.size*t||1);this.draw_(e,r,0,0,t||1),this.canvas_[t||1]=r.canvas}return this.canvas_[t||1]},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return Co},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.createRenderOptions=function(){var t,e="round",r="round",n=0,i=null,o=0,a=0;return this.stroke_&&(null===(t=this.stroke_.getColor())&&(t="#000"),t=Fi(t),void 0===(a=this.stroke_.getWidth())&&(a=1),i=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),void 0===(r=this.stroke_.getLineJoin())&&(r="round"),void 0===(e=this.stroke_.getLineCap())&&(e="round"),void 0===(n=this.stroke_.getMiterLimit())&&(n=10)),{strokeStyle:t,strokeWidth:a,size:2*(this.radius_+a)+1,lineCap:e,lineDash:i,lineDashOffset:o,lineJoin:r,miterLimit:n}},e.prototype.render=function(){var t=this.createRenderOptions(),e=Bi(t.size,t.size);this.draw_(t,e,0,0,1),this.canvas_[1]=e.canvas;var r=e.canvas.width,n=r,i=this.getDisplacement();this.hitDetectionImageSize_=[t.size,t.size],this.createHitDetectionCanvas_(t),this.anchor_=[r/2-i[0],r/2+i[1]],this.size_=[r,r],this.imageSize_=[n,n]},e.prototype.draw_=function(t,e,r,n,i){var o,a,s;e.setTransform(i,0,0,i,0,0),e.translate(r,n),e.beginPath();var u=this.points_;if(u===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(u*=2),o=0;o<=u;o++)a=2*o*Math.PI/u-Math.PI/2+this.angle_,s=o%2==0?this.radius_:l,e.lineTo(t.size/2+s*Math.cos(a),t.size/2+s*Math.sin(a))}if(this.fill_){var h=this.fill_.getColor();null===h&&(h="#000"),e.fillStyle=Fi(h),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionCanvas_=this.getImage(1),this.fill_){var e=this.fill_.getColor(),r=0;if("string"==typeof e&&(e=ni(e)),null===e?r=1:Array.isArray(e)&&(r=4===e.length?e[3]:1),0===r){var n=Bi(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n,0,0)}}},e.prototype.drawHitDetectionCanvas_=function(t,e,r,n){e.translate(r,n),e.beginPath();var i=this.points_;if(i===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var o=void 0!==this.radius2_?this.radius2_:this.radius_;o!==this.radius_&&(i*=2);var a=void 0,s=void 0,u=void 0;for(a=0;a<=i;a++)u=2*a*Math.PI/i-Math.PI/2+this.angle_,s=a%2==0?this.radius_:o,e.lineTo(t.size/2+s*Math.cos(u),t.size/2+s*Math.sin(u))}e.fillStyle="#000",e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e}(kl),Gl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Dl=function(t){function e(e){var r=e||{};return t.call(this,{points:1/0,fill:r.fill,radius:r.radius,stroke:r.stroke,displacement:void 0!==r.displacement?r.displacement:[0,0]})||this}return Gl(e,t),e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(jl),zl=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}(),Ul="fraction",Bl="pixels",Yl="bottom-left",Vl="bottom-right",Wl="top-left",ql="top-right",Xl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zl=function(t){function e(e,r,n,i){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=n,o.resolution=r,o.state=i,o}return Xl(e,t),e.prototype.changed=function(){this.dispatchEvent(I)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return n()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){n()},e}(O),Kl=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Hl(t,e,r){var n=t;if(n.src&&zi){var i=n.decode(),o=!0;return i.then((function(){o&&e()})).catch((function(t){o&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():r())})),function(){o=!1}}var a=[q(n,U,e),q(n,L,r)];return function(){a.forEach(X)}}var Jl=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r,n,To)||this;return s.src_=i,s.image_=new Image,null!==o&&(s.image_.crossOrigin=o),s.unlisten_=null,s.state=To,s.imageLoadFunction_=a,s}return Kl(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Po,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=ce(this.extent)/this.image_.height),this.state=Co,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=To&&this.state!=Po||(this.state=Eo,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=Hl(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Zl),$l=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ql=null,th=function(t){function e(e,r,n,i,o,a){var s=t.call(this)||this;return s.hitDetectionImage_=null,s.image_=e||new Image,null!==i&&(s.image_.crossOrigin=i),s.canvas_={},s.color_=a,s.unlisten_=null,s.imageState_=o,s.size_=n,s.src_=r,s.tainted_,s}return $l(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===Co){Ql||(Ql=Bi(1,1)),Ql.drawImage(this.image_,0,0);try{Ql.getImageData(0,0,1,1),this.tainted_=!1}catch(t){Ql=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(I)},e.prototype.handleImageError_=function(){this.imageState_=Po,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Co,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],r=Bi(t,e);r.fillRect(0,0,t,e),this.hitDetectionImage_=r.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==To){this.imageState_=Eo;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=Hl(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var r=e.getContext("2d");if(r.scale(t,t),r.drawImage(this.image_,0,0),this.isTainted_()){var n=this.color_;return r.globalCompositeOperation="multiply",r.fillStyle="rgb("+n[0]+","+n[1]+","+n[2]+")",r.fillRect(0,0,e.width,e.height),r.globalCompositeOperation="destination-in",void r.drawImage(this.image_,0,0)}for(var i=r.getImageData(0,0,e.width,e.height),o=i.data,a=this.color_[0]/255,s=this.color_[1]/255,u=this.color_[2]/255,l=0,h=o.length;l<h;l+=4)o[l]*=a,o[l+1]*=s,o[l+2]*=u;r.putImageData(i,0,0)}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(O);var eh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rh=function(t){function e(e){var r=this,n=e||{},i=void 0!==n.opacity?n.opacity:1,a=void 0!==n.rotation?n.rotation:0,s=void 0!==n.scale?n.scale:1,u=void 0!==n.rotateWithView&&n.rotateWithView;(r=t.call(this,{opacity:i,rotation:a,scale:s,displacement:void 0!==n.displacement?n.displacement:[0,0],rotateWithView:u})||this).anchor_=void 0!==n.anchor?n.anchor:[.5,.5],r.normalizedAnchor_=null,r.anchorOrigin_=void 0!==n.anchorOrigin?n.anchorOrigin:Wl,r.anchorXUnits_=void 0!==n.anchorXUnits?n.anchorXUnits:Ul,r.anchorYUnits_=void 0!==n.anchorYUnits?n.anchorYUnits:Ul,r.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null;var l=void 0!==n.img?n.img:null,h=void 0!==n.imgSize?n.imgSize:null,c=n.src;lt(!(void 0!==c&&l),4),lt(!l||l&&h,5),void 0!==c&&0!==c.length||!l||(c=l.src||o(l)),lt(void 0!==c&&c.length>0,6);var p=void 0!==n.src?To:Co;return r.color_=void 0!==n.color?ni(n.color):null,r.iconImage_=function(t,e,r,n,i,o){var a=ui.get(e,n,o);return a||(a=new th(t,e,r,n,i,o),ui.set(e,n,o,a)),a}(l,c,h,r.crossOrigin_,p,r.color_),r.offset_=void 0!==n.offset?n.offset:[0,0],r.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:Wl,r.origin_=null,r.size_=void 0!==n.size?n.size:null,r}return eh(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Ul||this.anchorYUnits_==Ul){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Ul&&(t[0]*=e[0]),this.anchorYUnits_==Ul&&(t[1]*=e[1])}if(this.anchorOrigin_!=Wl){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=ql&&this.anchorOrigin_!=Vl||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Yl&&this.anchorOrigin_!=Vl||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_,e=this.getDisplacement();if(this.offsetOrigin_!=Wl){var r=this.getSize(),n=this.iconImage_.getSize();if(!r||!n)return null;t=t.slice(),this.offsetOrigin_!=ql&&this.offsetOrigin_!=Vl||(t[0]=n[0]-r[0]-t[0]),this.offsetOrigin_!=Yl&&this.offsetOrigin_!=Vl||(t[1]=n[1]-r[1]-t[1])}return t[0]+=e[0],t[1]+=e[1],this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(I,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(I,t)},e}(kl),nh=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}(),ih=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=uh,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=uh,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var oh=null;function ah(t,e){if(!oh){var r=new zl({color:"rgba(255,255,255,0.4)"}),n=new nh({color:"#3399CC",width:1.25});oh=[new ih({image:new Dl({fill:r,stroke:n,radius:5}),fill:r,stroke:n})]}return oh}function sh(){var t={},e=[255,255,255,1],r=[0,153,255,1];return t[yt.POLYGON]=[new ih({fill:new zl({color:[255,255,255,.5]})})],t[yt.MULTI_POLYGON]=t[yt.POLYGON],t[yt.LINE_STRING]=[new ih({stroke:new nh({color:e,width:5})}),new ih({stroke:new nh({color:r,width:3})})],t[yt.MULTI_LINE_STRING]=t[yt.LINE_STRING],t[yt.CIRCLE]=t[yt.POLYGON].concat(t[yt.LINE_STRING]),t[yt.POINT]=[new ih({image:new Dl({radius:6,fill:new zl({color:r}),stroke:new nh({color:e,width:1.5})}),zIndex:1/0})],t[yt.MULTI_POINT]=t[yt.POINT],t[yt.GEOMETRY_COLLECTION]=t[yt.POLYGON].concat(t[yt.LINE_STRING],t[yt.POINT]),t}function uh(t){return t.getGeometry()}var lh=ih,hh="point",ch="line",ph=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=za(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new zl({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:hh,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=za(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}(),fh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),dh=function(t){function e(e,r,n){var i=t.call(this)||this,o=n||{};return i.tileCoord=e,i.state=r,i.interimTile=null,i.hifi=!0,i.key="",i.transition_=void 0===o.transition?250:o.transition,i.transitionStarts_={},i}return fh(e,t),e.prototype.changed=function(){this.dispatchEvent(I)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==fa)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==fa){t.interimTile=null;break}t.getState()==pa?e=t:t.getState()==ca?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==da&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){n()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var r=this.transitionStarts_[t];if(r){if(-1===r)return 1}else r=e,this.transitionStarts_[t]=r;var n=e-r+1e3/60;return n>=this.transition_?1:Ia(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(O),gh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var yh,mh=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r,a)||this;return s.crossOrigin_=i,s.src_=n,s.image_=new Image,null!==i&&(s.image_.crossOrigin=i),s.unlisten_=null,s.tileLoadFunction_=o,s}return gh(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.getKey=function(){return this.src_},e.prototype.handleImageError_=function(){var t;this.state=da,this.unlistenImage_(),this.image_=((t=Bi(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=fa:this.state=ga,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==da&&(this.state=ca,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ca&&(this.state=pa,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Hl(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(dh),vh=function(){function t(t,e,r,n,i,o){this.sourceProj_=t,this.targetProj_=e;var a={},s=Er(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return a[e]||(a[e]=s(t)),a[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=i*i,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&ge(n)==ge(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?ge(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?ge(this.targetProj_.getExtent()):null;var u=fe(r),l=de(r),h=se(r),c=ae(r),p=this.transformInv_(u),f=this.transformInv_(l),d=this.transformInv_(h),g=this.transformInv_(c),y=10+(o?Math.max(0,Math.ceil(Te(oe(r)/(o*o*256*256)))):0);if(this.addQuad_(u,l,h,c,p,f,d,g,y),this.wrapsXInSource_){var m=1/0;this.triangles_.forEach((function(t,e,r){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-m>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-m>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-m>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var r=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-r<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}a={}}return t.prototype.addTriangle_=function(t,e,r,n,i,o){this.triangles_.push({source:[n,i,o],target:[t,e,r]})},t.prototype.addQuad_=function(t,e,r,n,i,o,a,s,u){var l=Dt([i,o,a,s]),h=this.sourceWorldWidth_?ge(l)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&h>.5&&h<1,f=!1;if(u>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)f=ge(Dt([t,e,r,n]))/this.targetWorldWidth_>.25||f;!p&&this.sourceProj_.isGlobal()&&h&&(f=h>.25||f)}if(!(!f&&this.maxSourceExtent_&&isFinite(l[0])&&isFinite(l[1])&&isFinite(l[2])&&isFinite(l[3]))||ye(l,this.maxSourceExtent_)){var d=0;if(!(f||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(s[0])&&isFinite(s[1])))if(u>0)f=!0;else if(1!=(d=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(a[0])&&isFinite(a[1])?0:2)+(isFinite(s[0])&&isFinite(s[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(u>0){if(!f){var g=[(t[0]+r[0])/2,(t[1]+r[1])/2],y=this.transformInv_(g),m=void 0;if(p)m=(Oe(i[0],c)+Oe(a[0],c))/2-Oe(y[0],c);else m=(i[0]+a[0])/2-y[0];var v=(i[1]+a[1])/2-y[1];f=m*m+v*v>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-r[0])<=Math.abs(t[1]-r[1])){var _=[(e[0]+r[0])/2,(e[1]+r[1])/2],b=this.transformInv_(_),x=[(n[0]+t[0])/2,(n[1]+t[1])/2],w=this.transformInv_(x);this.addQuad_(t,e,_,x,i,o,b,w,u-1),this.addQuad_(x,_,r,n,w,b,a,s,u-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],T=this.transformInv_(S),E=[(r[0]+n[0])/2,(r[1]+n[1])/2],C=this.transformInv_(E);this.addQuad_(t,S,E,n,i,T,C,s,u-1),this.addQuad_(S,e,r,E,T,o,a,C,u-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&d)&&this.addTriangle_(t,r,n,i,a,s),0==(14&d)&&this.addTriangle_(t,r,e,i,a,o),d&&(0==(13&d)&&this.addTriangle_(e,n,t,o,s,i),0==(7&d)&&this.addTriangle_(e,n,r,o,s,a))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,r,n){var i=e.source;te(t,i[0]),te(t,i[1]),te(t,i[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),_h={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};function bh(t,e,r,n,i){t.beginPath(),t.moveTo(0,0),t.lineTo(e,r),t.lineTo(n,i),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(r,i)),t.restore()}function xh(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function wh(t,e,r,n){var i=Cr(r,e,t),o=mr(e,n,r),a=e.getMetersPerUnit();void 0!==a&&(o*=a);var s=t.getMetersPerUnit();void 0!==s&&(o/=s);var u=t.getExtent();if(!u||Yt(u,i)){var l=mr(t,o,i)/o;isFinite(l)&&l>0&&(o/=l)}return o}function Sh(t,e,r,n,i,o,a,s,u,l,h,c){var p=Bi(Math.round(r*t),Math.round(r*e));if(T(p,c),0===u.length)return p.canvas;function f(t){return Math.round(t*r)/r}p.scale(r,r),p.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];u.forEach((function(t,e,r){Qt(d,t.extent)}));var g=ge(d),y=ce(d),m=Bi(Math.round(r*g/n),Math.round(r*y/n));T(m,c);var v=r/n;u.forEach((function(t,e,r){var n=t.extent[0]-d[0],i=-(t.extent[3]-d[3]),o=ge(t.extent),a=ce(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,l,l,t.image.width-2*l,t.image.height-2*l,n*v,i*v,o*v,a*v)}));var _=fe(a);return s.getTriangles().forEach((function(t,e,i){var a=t.source,s=t.target,u=a[0][0],l=a[0][1],h=a[1][0],g=a[1][1],y=a[2][0],v=a[2][1],b=f((s[0][0]-_[0])/o),x=f(-(s[0][1]-_[1])/o),w=f((s[1][0]-_[0])/o),S=f(-(s[1][1]-_[1])/o),T=f((s[2][0]-_[0])/o),E=f(-(s[2][1]-_[1])/o),C=u,P=l;u=0,l=0;var R=function(t){for(var e=t.length,r=0;r<e;r++){for(var n=r,i=Math.abs(t[r][r]),o=r+1;o<e;o++){var a=Math.abs(t[o][r]);a>i&&(i=a,n=o)}if(0===i)return null;var s=t[n];t[n]=t[r],t[r]=s;for(var u=r+1;u<e;u++)for(var l=-t[u][r]/t[r][r],h=r;h<e+1;h++)r==h?t[u][h]=0:t[u][h]+=l*t[r][h]}for(var c=new Array(e),p=e-1;p>=0;p--){c[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*c[p]}return c}([[h-=C,g-=P,0,0,w-b],[y-=C,v-=P,0,0,T-b],[0,0,h,g,S-x],[0,0,y,v,E-x]]);if(R){if(p.save(),p.beginPath(),function(){if(void 0===yh){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",bh(t,4,5,4,0),bh(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;yh=xh(e,0)||xh(e,4)||xh(e,8)}return yh}()||c===_h){p.moveTo(w,S);for(var O=b-w,I=x-S,L=0;L<4;L++)p.lineTo(w+f((L+1)*O/4),S+f(L*I/3)),3!=L&&p.lineTo(w+f((L+1)*O/4),S+f((L+1)*I/3));p.lineTo(T,E)}else p.moveTo(w,S),p.lineTo(b,x),p.lineTo(T,E);p.clip(),p.transform(R[0],R[2],R[1],R[3],b,x),p.translate(d[0]-C,d[3]-P),p.scale(n/r,-n/r),p.drawImage(m.canvas,0,0),p.restore()}})),h&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,s.getTriangles().forEach((function(t,e,r){var n=t.target,i=(n[0][0]-_[0])/o,a=-(n[0][1]-_[1])/o,s=(n[1][0]-_[0])/o,u=-(n[1][1]-_[1])/o,l=(n[2][0]-_[0])/o,h=-(n[2][1]-_[1])/o;p.beginPath(),p.moveTo(s,u),p.lineTo(i,a),p.lineTo(l,h),p.closePath(),p.stroke()})),p.restore()),p.canvas}var Th=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Eh=function(t){function e(e,r,n,i,o,a,s,u,l,h,c,p){var f=t.call(this,o,ca)||this;f.renderEdges_=void 0!==c&&c,f.contextOptions_=p,f.pixelRatio_=s,f.gutter_=u,f.canvas_=null,f.sourceTileGrid_=r,f.targetTileGrid_=i,f.wrappedTileCoord_=a||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=i.getTileCoordExtent(f.wrappedTileCoord_),g=f.targetTileGrid_.getExtent(),y=f.sourceTileGrid_.getExtent(),m=g?pe(d,g):d;if(0===oe(m))return f.state=ga,f;var v=e.getExtent();v&&(y=y?pe(y,v):v);var _=i.getResolution(f.wrappedTileCoord_[0]),b=function(t,e,r,n){var i=ue(r),o=wh(t,e,i,n);return(!isFinite(o)||o<=0)&&ie(r,(function(r){return o=wh(t,e,r,n),isFinite(o)&&o>0})),o}(e,n,m,_);if(!isFinite(b)||b<=0)return f.state=ga,f;var x=void 0!==h?h:.5;if(f.triangulation_=new vh(e,n,m,y,b*x,_),0===f.triangulation_.getTriangles().length)return f.state=ga,f;f.sourceZ_=r.getZForResolution(b);var w=f.triangulation_.calculateSourceExtent();if(y&&(e.canWrapX()?(w[1]=we(w[1],y[1],y[3]),w[3]=we(w[3],y[1],y[3])):w=pe(w,y)),oe(w)){for(var S=r.getTileRangeForExtentAndZ(w,f.sourceZ_),T=S.minX;T<=S.maxX;T++)for(var E=S.minY;E<=S.maxY;E++){var C=l(f.sourceZ_,T,E,s);C&&f.sourceTiles_.push(C)}0===f.sourceTiles_.length&&(f.state=ga)}else f.state=ga;return f}return Th(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,r,n){e&&e.getState()==fa&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=da;else{var e=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(e),n="number"==typeof r?r:r[0],i="number"==typeof r?r:r[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Sh(n,i,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,s,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=fa}this.changed()},e.prototype.load=function(){if(this.state==ca){this.state=pa,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,r,n){var i=e.getState();if(i==ca||i==pa){t++;var o=W(e,I,(function(r){var n=e.getState();n!=fa&&n!=da&&n!=ga||(X(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),this.sourceTiles_.forEach((function(t,e,r){t.getState()==ca&&t.load()})),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(X),this.sourcesListenerKeys_=null},e}(dh),Ch=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var r=this.entries_[t];return lt(void 0!==r,15),r===this.newest_||(r===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r),r.value_},t.prototype.remove=function(t){var e=this.entries_[t];return lt(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){lt(!(t in this.entries_),16);var r={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[t]=r,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}(),Ph=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ph(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Iu(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(Ou(e.tileCoord)),e.release())}.bind(this))}},e}(Ch),Oh="tileloadstart",Ih="tileloadend",Lh="tileloaderror",Mh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Fh(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var Ah=function(t){function e(e){var r=t.call(this)||this;return r.projection_=yr(e.projection),r.attributions_=Fh(e.attributions),r.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,r.loading=!1,r.state_=void 0!==e.state?e.state:Pi,r.wrapX_=void 0!==e.wrapX&&e.wrapX,r}return Mh(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolutions=function(){return n()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=Fh(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(rt),kh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Nh=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;r.opaque_=void 0!==e.opaque&&e.opaque,r.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,r.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var n=e.tileGrid;return n&&za(n.getTileSize(n.getMinZoom()),[256,256]),r.tileCache=new Rh(e.cacheSize||0),r.tmpSize=[0,0],r.key_=e.key||"",r.tileOptions={transition:e.transition},r.zDirection=e.zDirection?e.zDirection:0,r}return kh(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var r=this.getTileCacheForProjection(t);r&&r.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,r,n){var i=this.getTileCacheForProjection(t);if(!i)return!1;for(var o,a,s,u=!0,l=r.minX;l<=r.maxX;++l)for(var h=r.minY;h<=r.maxY;++h)a=Ru(e,l,h),s=!1,i.containsKey(a)&&(s=(o=i.get(a)).getState()===fa)&&(s=!1!==n(o)),s||(u=!1);return u},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,r,i,o){return n()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Au(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return e&&!Sr(e,t)?null:this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,r){var n=this.getTileGridForProjection(r),i=this.getTilePixelRatio(e),o=za(n.getTileSize(t),this.tmpSize);return 1==i?o:Da(o,i,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var r=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(r);return this.getWrapX()&&r.isGlobal()&&(t=function(t,e,r){var n=e[0],i=t.getTileCoordCenter(e),o=Gu(r);if(Yt(o,i))return e;var a=ge(o),s=Math.ceil((o[0]-i[0])/a);return i[0]+=a*s,t.getTileCoordForCoordAndZ(i,n)}(n,t,r)),function(t,e){var r=t[0],n=t[1],i=t[2];if(e.getMinZoom()>r||r>e.getMaxZoom())return!1;var o,a=e.getExtent();return!(o=a?e.getTileRangeForExtentAndZ(a,r):e.getFullTileRange(r))||o.containsXY(n,i)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var r=this.getTileCacheForProjection(e);t>r.highWaterMark&&(r.highWaterMark=t)},e.prototype.useTile=function(t,e,r,n){},e}(Ah),jh=function(t){function e(e,r){var n=t.call(this,e)||this;return n.tile=r,n}return kh(e,t),e}(h),Gh=Nh;function Dh(t,e){var r=/\{z\}/g,n=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(a,s,u){return a?t.replace(r,a[0].toString()).replace(n,a[1].toString()).replace(i,a[2].toString()).replace(o,(function(){var t=a[0],r=e.getFullTileRange(t);return lt(r,55),(r.getHeight()-a[2]-1).toString()})):void 0}}function zh(t,e){for(var r=t.length,n=new Array(r),i=0;i<r;++i)n[i]=Dh(t[i],e);return Uh(n)}function Uh(t){return 1===t.length?t[0]:function(e,r,n){if(e){var i=Oe(Lu(e),t.length);return t[i](e,r,n)}}}function Bh(t,e,r){}function Yh(t){var e=[],r=/\{([a-z])-([a-z])\}/.exec(t);if(r){var n=r[1].charCodeAt(0),i=r[2].charCodeAt(0),o=void 0;for(o=n;o<=i;++o)e.push(t.replace(r[0],String.fromCharCode(o)));return e}if(r=/\{(\d+)-(\d+)\}/.exec(t)){for(var a=parseInt(r[2],10),s=parseInt(r[1],10);s<=a;s++)e.push(t.replace(r[0],s.toString()));return e}return e.push(t),e}var Vh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wh=function(t){function e(r){var n=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,opaque:r.opaque,projection:r.projection,state:r.state,tileGrid:r.tileGrid,tilePixelRatio:r.tilePixelRatio,wrapX:r.wrapX,transition:r.transition,key:r.key,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===e.prototype.tileUrlFunction,n.tileLoadFunction=r.tileLoadFunction,r.tileUrlFunction&&(n.tileUrlFunction=r.tileUrlFunction.bind(n)),n.urls=null,r.urls?n.setUrls(r.urls):r.url&&n.setUrl(r.url),n.tileLoadingKeys_={},n}return Vh(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,r=t.target,n=o(r),i=r.getState();i==pa?(this.tileLoadingKeys_[n]=!0,e=Oh):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=i==da?Lh:i==fa?Ih:void 0),null!=e&&this.dispatchEvent(new jh(e,r))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=Yh(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(zh(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,r){},e.prototype.useTile=function(t,e,r){var n=Ru(t,e,r);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Gh),qh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Xh(t,e){t.getImage().src=e}var Zh=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Xh,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return r.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,r.tileClass=void 0!==e.tileClass?e.tileClass:mh,r.tileCacheForProjection={},r.tileGridForProjection={},r.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,r.contextOptions_=!1===e.imageSmoothing?_h:void 0,r.renderReprojectionEdges_=!1,r}return qh(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var r=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==r?e:{}),this.tileCacheForProjection){var i=this.tileCacheForProjection[n];i.expireCache(i==r?e:{})}},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Sr(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Sr(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Sr(e,t)){var r=o(t);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=Au(t)),this.tileGridForProjection[r]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Sr(e,t))return this.tileCache;var r=o(t);return r in this.tileCacheForProjection||(this.tileCacheForProjection[r]=new Rh(this.tileCache.highWaterMark)),this.tileCacheForProjection[r]},e.prototype.createTile_=function(t,e,r,n,i,o){var a=[t,e,r],s=this.getTileCoordForTileUrlFunction(a,i),u=s?this.tileUrlFunction(s,n,i):void 0,l=new this.tileClass(a,void 0!==u?ca:ga,void 0!==u?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return l.key=o,l.addEventListener(I,this.handleTileChange.bind(this)),l},e.prototype.getTile=function(t,e,r,n,i){var o=this.getProjection();if(o&&i&&!Sr(o,i)){var a=this.getTileCacheForProjection(i),s=[t,e,r],u=void 0,l=Ou(s);a.containsKey(l)&&(u=a.get(l));var h=this.getKey();if(u&&u.key==h)return u;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(i),f=this.getTileCoordForTileUrlFunction(s,i),d=new Eh(o,c,i,p,s,f,this.getTilePixelRatio(n),this.getGutter(),function(t,e,r,n){return this.getTileInternal(t,e,r,n,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return d.key=h,u?(d.interimTile=u,d.refreshInterimChain(),a.replace(l,d)):a.set(l,d),d}return this.getTileInternal(t,e,r,n,o||i)},e.prototype.getTileInternal=function(t,e,r,n,i){var o=null,a=Ru(t,e,r),s=this.getKey();if(this.tileCache.containsKey(a)){if((o=this.tileCache.get(a)).key!=s){var u=o;o=this.createTile_(t,e,r,n,i,s),u.getState()==ca?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(a,o)}}else o=this.createTile_(t,e,r,n,i,s),this.tileCache.set(a,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var r=yr(t);if(r){var n=o(r);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(Wh);function Kh(t,e,r,n){var i=document.createElement("script"),a="olc_"+o(e);function s(){delete window[a],i.parentNode.removeChild(i)}i.async=!0,i.src=t+(-1==t.indexOf("?")?"?":"&")+(n||"callback")+"="+a;var u=setTimeout((function(){s(),r&&r()}),1e4);window[a]=function(t){clearTimeout(u),s(),e(t)},document.getElementsByTagName("head")[0].appendChild(i)}var Hh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var Jh=function(t){function e(e){var r=this,n=void 0!==e.hidpi&&e.hidpi;return(r=t.call(this,{cacheSize:e.cacheSize,crossOrigin:"anonymous",imageSmoothing:e.imageSmoothing,opaque:!0,projection:yr("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:Ci,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:n?2:1,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition})||this).hidpi_=n,r.culture_=void 0!==e.culture?e.culture:"en-us",r.maxZoom_=void 0!==e.maxZoom?e.maxZoom:-1,r.apiKey_=e.key,r.imagerySet_=e.imagerySet,Kh("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+r.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+r.apiKey_+"&c="+r.culture_,r.handleImageryMetadataResponse.bind(r),void 0,"jsonp"),r}return Hh(e,t),e.prototype.getApiKey=function(){return this.apiKey_},e.prototype.getImagerySet=function(){return this.imagerySet_},e.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var e=t.resourceSets[0].resources[0],r=-1==this.maxZoom_?e.zoomMax:this.maxZoom_,n=Gu(this.getProjection()),i=this.hidpi_?2:1,o=e.imageWidth==e.imageHeight?e.imageWidth/i:[e.imageWidth/i,e.imageHeight/i],a=ku({extent:n,minZoom:e.zoomMin,maxZoom:r,tileSize:o});this.tileGrid=a;var s=this.culture_,u=this.hidpi_;if(this.tileUrlFunction=Uh(e.imageUrlSubdomains.map((function(t){var r=[0,0,0],n=e.imageUrl.replace("{subdomain}",t).replace("{culture}",s);return function(t,e,i){if(t){Pu(t[0],t[1],t[2],r);var o=n;return u&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",function(t){var e,r,n=t[0],i=new Array(n),o=1<<n-1;for(e=0;e<n;++e)r=48,t[1]&o&&(r+=1),t[2]&o&&(r+=2),i[e]=String.fromCharCode(r),o>>=1;return i.join("")}(r))}}}))),e.imageryProviders){var l=Tr(yr("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var r=[],n=t.viewState,i=this.getTileGrid(),o=i.getZForResolution(n.resolution,this.zDirection),a=i.getTileCoordForCoordAndZ(n.center,o)[0];return e.imageryProviders.map((function(e){for(var n=!1,i=e.coverageAreas,o=0,s=i.length;o<s;++o){var u=i[o];if(a>=u.zoomMin&&a<=u.zoomMax){var h=u.bbox;if(ye(_e([h[1],h[0],h[3],h[2]],l),t.extent)){n=!0;break}}}n&&r.push(e.attribution)})),r.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),r}.bind(this))}this.setState(Pi)}else this.setState(Ri)},e}(Zh),$h=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qh=function(t){function e(e){var r=e||{},n=void 0!==r.projection?r.projection:"EPSG:3857",i=void 0!==r.tileGrid?r.tileGrid:ku({extent:Gu(n),maxResolution:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoom,tileSize:r.tileSize});return t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,opaque:r.opaque,projection:n,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:r.tileUrlFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this}return $h(e,t),e}(Zh),tc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ec=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,maxZoom:void 0!==e.maxZoom?e.maxZoom:18,minZoom:e.minZoom,projection:e.projection,wrapX:e.wrapX})||this;return r.account_=e.account,r.mapId_=e.map||"",r.config_=e.config||{},r.templateCache_={},r.initializeMap_(),r}return tc(e,t),e.prototype.getConfig=function(){return this.config_},e.prototype.updateConfig=function(t){T(this.config_,t),this.initializeMap_()},e.prototype.setConfig=function(t){this.config_=t||{},this.initializeMap_()},e.prototype.initializeMap_=function(){var t=JSON.stringify(this.config_);if(this.templateCache_[t])this.applyTemplate_(this.templateCache_[t]);else{var e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);var r=new XMLHttpRequest;r.addEventListener("load",this.handleInitResponse_.bind(this,t)),r.addEventListener("error",this.handleInitError_.bind(this)),r.open("POST",e),r.setRequestHeader("Content-type","application/json"),r.send(JSON.stringify(this.config_))}},e.prototype.handleInitResponse_=function(t,e){var r=e.target;if(!r.status||r.status>=200&&r.status<300){var n=void 0;try{n=JSON.parse(r.responseText)}catch(t){return void this.setState(Ri)}this.applyTemplate_(n),this.templateCache_[t]=n,this.setState(Pi)}else this.setState(Ri)},e.prototype.handleInitError_=function(t){this.setState(Ri)},e.prototype.applyTemplate_=function(t){var e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)},e}(Qh),rc=r(1),nc=r.n(rc),ic=function(){function t(t){this.rbush_=new nc.a(t),this.items_={}}return t.prototype.insert=function(t,e){var r={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(r),this.items_[o(e)]=r},t.prototype.load=function(t,e){for(var r=new Array(e.length),n=0,i=e.length;n<i;n++){var a=t[n],s=e[n],u={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:s};r[n]=u,this.items_[o(s)]=u}this.rbush_.load(r)},t.prototype.remove=function(t){var e=o(t),r=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(r)},t.prototype.update=function(t,e){var r=this.items_[o(e)];$t([r.minX,r.minY,r.maxX,r.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var r,n=0,i=t.length;n<i;n++)if(r=e(t[n]))return r;return r},t.prototype.isEmpty=function(){return P(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return Zt(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),oc="addfeature",ac="changefeature",sc="clear",uc="removefeature",lc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hc=function(t){function e(e,r){var n=t.call(this,e)||this;return n.feature=r,n}return lc(e,t),e}(h),cc=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{attributions:n.attributions,projection:void 0,state:Pi,wrapX:void 0===n.wrapX||n.wrapX})||this).loader_=S,r.format_=n.format,r.overlaps_=void 0===n.overlaps||n.overlaps,r.url_=n.url,void 0!==n.loader?r.loader_=n.loader:void 0!==r.url_&&(lt(r.format_,7),r.loader_=wu(r.url_,r.format_)),r.strategy_=void 0!==n.strategy?n.strategy:Su;var i,o,a=void 0===n.useSpatialIndex||n.useSpatialIndex;return r.featuresRtree_=a?new ic:null,r.loadedExtentsRtree_=new ic,r.nullGeometryFeatures_={},r.idIndex_={},r.uidIndex_={},r.featureChangeKeys_={},r.featuresCollection_=null,Array.isArray(n.features)?o=n.features:n.features&&(o=(i=n.features).getArray()),a||void 0!==i||(i=new ut(o)),void 0!==o&&r.addFeaturesInternal(o),void 0!==i&&r.bindFeaturesCollection_(i),r}return lc(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=o(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var r=t.getGeometry();if(r){var n=r.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new hc(oc,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[W(e,I,this.handleFeatureChange_,this),W(e,c,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var r=!0,n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?r=!1:this.idIndex_[n.toString()]=e),r&&(lt(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),r},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],r=[],n=[],i=0,a=t.length;i<a;i++){var s=o(l=t[i]);this.addToIndex_(s,l)&&r.push(l)}i=0;for(var u=r.length;i<u;i++){var l;s=o(l=r[i]);this.setupChangeEvents_(s,l);var h=l.getGeometry();if(h){var c=h.getExtent();e.push(c),n.push(l)}else this.nullGeometryFeatures_[s]=l}this.featuresRtree_&&this.featuresRtree_.load(e,n);i=0;for(var p=r.length;i<p;i++)this.dispatchEvent(new hc(oc,r[i]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(oc,(function(r){e||(e=!0,t.push(r.feature),e=!1)})),this.addEventListener(uc,(function(r){e||(e=!0,t.remove(r.feature),e=!1)})),t.addEventListener(nt,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(it,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(X)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var r in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var n=new hc(sc);this.dispatchEvent(n),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var r=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(r,(function(r){return r.getGeometry().intersectsCoordinate(t)?e(r):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(r){if(r.getGeometry().intersectsExtent(t)){var n=e(r);if(n)return n}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray():this.featuresRtree_&&(t=this.featuresRtree_.getAll(),P(this.nullGeometryFeatures_)||m(t,C(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray():[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var r=t[0],n=t[1],i=null,o=[NaN,NaN],a=1/0,s=[-1/0,-1/0,1/0,1/0],u=e||x;return this.featuresRtree_.forEachInExtent(s,(function(t){if(u(t)){var e=t.getGeometry(),l=a;if((a=e.closestPointXY(r,n,o,a))<l){i=t;var h=Math.sqrt(a);s[0]=r-h,s[1]=n-h,s[2]=r+h,s[3]=n+h}}})),i},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,r=o(e),n=e.getGeometry();if(n){var i=n.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(i,e)):this.featuresRtree_&&this.featuresRtree_.update(i,e)}else r in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[r]=e);var a=e.getId();if(void 0!==a){var s=a.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[r]=e;this.changed(),this.dispatchEvent(new hc(ac,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:o(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&P(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,r){var n=this.loadedExtentsRtree_,i=this.strategy_(t,e);this.loading=!1;for(var o=function(t,o){var s=i[t];n.forEachInExtent(s,(function(t){return Vt(t.extent,s)}))||(a.loader_.call(a,s,e,r),n.insert(s,{extent:s.slice()}),a.loading=a.loader_!==S)},a=this,s=0,u=i.length;s<u;++s)o(s)},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,r=this.loadedExtentsRtree_;r.forEachInExtent(t,(function(r){if($t(r.extent,t))return e=r,!0})),e&&r.remove(e)},e.prototype.removeFeature=function(t){var e=o(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=o(t);this.featureChangeKeys_[e].forEach(X),delete this.featureChangeKeys_[e];var r=t.getId();void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new hc(uc,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var r in this.idIndex_)if(this.idIndex_[r]===t){delete this.idIndex_[r],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){lt(this.format_,7),this.setLoader(wu(t,this.format_))},e}(Ah),pc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fc=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,wrapX:e.wrapX})||this;return r.resolution=void 0,r.distance=void 0!==e.distance?e.distance:20,r.features=[],r.geometryFunction=e.geometryFunction||function(t){var e=t.getGeometry();return lt(e.getType()==yt.POINT,10),e},r.boundRefresh_=r.refresh.bind(r),r.setSource(e.source||null),r}return pc(e,t),e.prototype.clear=function(e){this.features.length=0,t.prototype.clear.call(this,e)},e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,e,r){this.source.loadFeatures(t,e,r),e!==this.resolution&&(this.clear(),this.resolution=e,this.cluster(),this.addFeatures(this.features))},e.prototype.setDistance=function(t){this.distance=t,this.refresh()},e.prototype.setSource=function(t){this.source&&this.source.removeEventListener(I,this.boundRefresh_),this.source=t,t&&t.addEventListener(I,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=[1/0,1/0,-1/0,-1/0],e=this.distance*this.resolution,r=this.source.getFeatures(),n={},i=0,a=r.length;i<a;i++){var s=r[i];if(!(o(s)in n)){var u=this.geometryFunction(s);if(u){Ht(u.getCoordinates(),t),zt(t,e,t);var l=this.source.getFeaturesInExtent(t);l=l.filter((function(t){var e=o(t);return!(e in n)&&(n[e]=!0,!0)})),this.features.push(this.createCluster(l))}}}},e.prototype.createCluster=function(t){for(var e=[0,0],r=t.length-1;r>=0;--r){var n=this.geometryFunction(t[r]);n?tr(e,n.getCoordinates()):t.splice(r,1)}ar(e,1/t.length);var i=new ct(new gn(e));return i.set("features",t),i},e}(cc),dc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gc="default",yc="truncated",mc=function(t){function e(e,r,n,i,o,a,s){var u=t.call(this,r,n,i,o,a,s)||this;return u.zoomifyImage_=null,u.tileSize_=e,u}return dc(e,t),e.prototype.getImage=function(){if(this.zoomifyImage_)return this.zoomifyImage_;var e=t.prototype.getImage.call(this);if(this.state==fa){var r=this.tileSize_;if(e.width==r[0]&&e.height==r[1])return this.zoomifyImage_=e,e;var n=Bi(r[0],r[1]);return n.drawImage(e,0,0),this.zoomifyImage_=n.canvas,n.canvas}return e},e}(mh),vc=function(t){function e(e){var r=this,n=e,i=n.size,o=void 0!==n.tierSizeCalculation?n.tierSizeCalculation:gc,a=n.tilePixelRatio||1,s=i[0],u=i[1],l=[],h=n.tileSize||256,c=h*a;switch(o){case gc:for(;s>c||u>c;)l.push([Math.ceil(s/c),Math.ceil(u/c)]),c+=c;break;case yc:for(var p=s,f=u;p>c||f>c;)l.push([Math.ceil(p/c),Math.ceil(f/c)]),p>>=1,f>>=1;break;default:lt(!1,53)}l.push([1,1]),l.reverse();for(var d=[a],g=[0],y=1,m=l.length;y<m;y++)d.push(a<<y),g.push(l[y-1][0]*l[y-1][1]+g[y-1]);d.reverse();var v=new Fu({tileSize:h,extent:n.extent||[0,-u,s,0],resolutions:d}),_=n.url;_&&-1==_.indexOf("{TileGroup}")&&-1==_.indexOf("{tileIndex}")&&(_+="{TileGroup}/{z}-{x}-{y}.jpg");var b=Yh(_),x=h*a;var w=Uh(b.map((function(t){return function(e,r,n){if(e){var i=e[0],o=e[1],a=e[2],s=o+a*l[i][0],u={z:i,x:o,y:a,tileIndex:s,TileGroup:"TileGroup"+((s+g[i])/x|0)};return t.replace(/\{(\w+?)\}/g,(function(t,e){return u[e]}))}}}))),S=mc.bind(null,za(h*a));(r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:n.projection,tilePixelRatio:a,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:S,tileGrid:v,tileUrlFunction:w,transition:n.transition})||this).zDirection=n.zDirection;var T=w(v.getTileCoordForCoordAndResolution(ue(v.getExtent()),d[d.length-1]),1,null),E=new Image;return E.addEventListener("error",function(){x=h,this.changed()}.bind(r)),E.src=T,r}return dc(e,t),e}(Zh),_c=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n},bc="version1",xc="version2",wc="version3",Sc={};Sc[bc]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},Sc[xc]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},Sc[wc]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},Sc.none={none:{supports:[],formats:[],qualities:[]}};var Tc=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,Ec=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,Cc=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;var Pc={};Pc[bc]=function(t){var e=t.getComplianceLevelSupportedFeatures();return void 0===e&&(e=Sc[bc].level0),{url:void 0===t.imageInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:_c(e.formats,[void 0===t.imageInfo.formats?[]:t.imageInfo.formats]),qualities:_c(e.qualities,[void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities]),resolutions:t.imageInfo.scale_factors,tileSize:void 0!==t.imageInfo.tile_width?void 0!==t.imageInfo.tile_height?[t.imageInfo.tile_width,t.imageInfo.tile_height]:[t.imageInfo.tile_width,t.imageInfo.tile_width]:null!=t.imageInfo.tile_height?[t.imageInfo.tile_height,t.imageInfo.tile_height]:void 0}},Pc[xc]=function(t){var e=t.getComplianceLevelSupportedFeatures(),r=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,n=r&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],i=r&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=r&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:_c(e.supports,n),formats:_c(e.formats,i),qualities:_c(e.qualities,o)}},Pc[wc]=function(t){var e=t.getComplianceLevelSupportedFeatures(),r=void 0===t.imageInfo.extraFormats?e.formats:_c(e.formats,t.imageInfo.extraFormats),n=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return["jpg","png","gif"].includes(t)})).reduce((function(t,e){return void 0===t&&r.includes(e)?e:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?e.supports:_c(e.supports,t.imageInfo.extraFeatures),formats:r,qualities:void 0===t.imageInfo.extraQualities?e.qualities:_c(e.qualities,t.imageInfo.extraQualities),preferredFormat:n}};var Rc=function(){function t(t){this.setImageInfo(t)}return t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var e=0;e<t.length;e++)switch(t[e]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return bc;case"http://iiif.io/api/image/2/context.json":return xc;case"http://iiif.io/api/image/3/context.json":return wc;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(bc)&&this.imageInfo.identifier)return bc}lt(!1,61)}},t.prototype.getComplianceLevelEntryFromProfile=function(t){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===t&&(t=this.getImageApiVersion()),t){case bc:if(Tc.test(this.imageInfo.profile))return this.imageInfo.profile;break;case wc:if(Cc.test(this.imageInfo.profile))return this.imageInfo.profile;break;case xc:if("string"==typeof this.imageInfo.profile&&Ec.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"==typeof this.imageInfo.profile[0]&&Ec.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var e=this.getComplianceLevelEntryFromProfile(t);if(void 0!==e){var r=e.match(/level[0-2](?:\.json)?$/g);return Array.isArray(r)?r[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),e=this.getComplianceLevelFromProfile(t);return void 0===e?Sc.none.none:Sc[t][e]}},t.prototype.getTileSourceOptions=function(t){var e=t||{},r=this.getImageApiVersion();if(void 0!==r){var n=void 0===r?void 0:Pc[r](this);if(void 0!==n)return{url:n.url,version:r,size:[this.imageInfo.width,this.imageInfo.height],sizes:n.sizes,format:void 0!==e.format&&n.formats.includes(e.format)?e.format:void 0!==n.preferredFormat?n.preferredFormat:"jpg",supports:n.supports,quality:e.quality&&n.qualities.includes(e.quality)?e.quality:n.qualities.includes("native")?"native":"default",resolutions:Array.isArray(n.resolutions)?n.resolutions.sort((function(t,e){return e-t})):void 0,tileSize:n.tileSize}}},t}(),Oc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Ic(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var Lc=function(t){function e(e){var r=this,n=e||{},i=n.url||"";i+=i.lastIndexOf("/")===i.length-1||""===i?"":"/";var o=n.version||xc,a=n.sizes||[],s=n.size;lt(null!=s&&Array.isArray(s)&&2==s.length&&!isNaN(s[0])&&s[0]>0&&!isNaN(s[1])&&s[1]>0,60);var u,l,h,c=s[0],p=s[1],f=n.tileSize,d=n.tilePixelRatio||1,g=n.format||"jpg",y=n.quality||(n.version==bc?"native":"default"),m=n.resolutions||[],v=n.supports||[],_=n.extent||[0,-p,c,0],b=null!=a&&Array.isArray(a)&&a.length>0,x=void 0!==f&&("number"==typeof f&&Number.isInteger(f)&&f>0||Array.isArray(f)&&f.length>0),w=null!=v&&Array.isArray(v)&&(v.includes("regionByPx")||v.includes("regionByPct"))&&(v.includes("sizeByWh")||v.includes("sizeByH")||v.includes("sizeByW")||v.includes("sizeByPct"));if(m.sort((function(t,e){return e-t})),x||w)if(null!=f&&("number"==typeof f&&Number.isInteger(f)&&f>0?(u=f,l=f):Array.isArray(f)&&f.length>0&&((1==f.length||null==f[1]&&Number.isInteger(f[0]))&&(u=f[0],l=f[0]),2==f.length&&(Number.isInteger(f[0])&&Number.isInteger(f[1])?(u=f[0],l=f[1]):null==f[0]&&Number.isInteger(f[1])&&(u=f[1],l=f[1])))),void 0!==u&&void 0!==l||(u=256,l=256),0==m.length)for(var S=h=Math.max(Math.ceil(Math.log(c/u)/Math.LN2),Math.ceil(Math.log(p/l)/Math.LN2));S>=0;S--)m.push(Math.pow(2,S));else{var T=Math.max.apply(Math,m);h=Math.round(Math.log(T)/Math.LN2)}else if(u=c,l=p,m=[],b){a.sort((function(t,e){return t[0]-e[0]})),h=-1;var E=[];for(S=0;S<a.length;S++){var C=c/a[S][0];m.length>0&&m[m.length-1]==C?E.push(S):(m.push(C),h++)}if(E.length>0)for(S=0;S<E.length;S++)a.splice(E[S]-S,1)}else m.push(1),a.push([c,p]),h=0;var P=new Fu({tileSize:[u,l],extent:_,origin:fe(_),resolutions:m}),R=mc.bind(null,za(f||256).map((function(t){return t*d})));return(r=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:n.state,tileClass:R,tileGrid:P,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:function(t,e,r){var n,s,f=t[0];if(!(f>h)){var d=t[1],_=t[2],S=m[f];if(!(void 0===d||void 0===_||void 0===S||d<0||Math.ceil(c/S/u)<=d||_<0||Math.ceil(p/S/l)<=_)){if(w||x){var T=d*u*S,E=_*l*S,C=u*S,P=l*S,R=u,O=l;if(T+C>c&&(C=c-T),E+P>p&&(P=p-E),T+u*S>c&&(R=Math.floor((c-T+S-1)/S)),E+l*S>p&&(O=Math.floor((p-E+S-1)/S)),0==T&&C==c&&0==E&&P==p)n="full";else if(!w||v.includes("regionByPx"))n=T+","+E+","+C+","+P;else if(v.includes("regionByPct")){n="pct:"+Ic(T/c*100)+","+Ic(E/p*100)+","+Ic(C/c*100)+","+Ic(P/p*100)}o!=wc||w&&!v.includes("sizeByWh")?!w||v.includes("sizeByW")?s=R+",":v.includes("sizeByH")?s=","+O:v.includes("sizeByWh")?s=R+","+O:v.includes("sizeByPct")&&(s="pct:"+Ic(100/S)):s=R+","+O}else if(n="full",b){var I=a[f][0],L=a[f][1];s=o==wc?I==c&&L==p?"max":I+","+L:I==c?"full":I+","}else s=o==wc?"max":"full";return i+n+"/"+s+"/0/"+y+"."+g}}},transition:n.transition})||this).zDirection=n.zDirection,r}return Oc(e,t),e}(Zh),Mc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fc=function(t){function e(e,r,n,i,o,a,s){var u=this,l=e.getExtent(),h=r.getExtent(),c=h?pe(n,h):n,p=wh(e,r,ue(c),i),f=new vh(e,r,c,l,.5*p,i),d=a(f.calculateSourceExtent(),p,o),g=d?To:Ro,y=d?d.getPixelRatio():1;return(u=t.call(this,n,i,y,g)||this).targetProj_=r,u.maxSourceExtent_=l,u.triangulation_=f,u.targetResolution_=i,u.targetExtent_=n,u.sourceImage_=d,u.sourcePixelRatio_=y,u.contextOptions_=s,u.canvas_=null,u.sourceListenerKey_=null,u}return Mc(e,t),e.prototype.disposeInternal=function(){this.state==Eo&&this.unlistenSource_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==Co){var e=ge(this.targetExtent_)/this.targetResolution_,r=ce(this.targetExtent_)/this.targetResolution_;this.canvas_=Sh(e,r,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.contextOptions_)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==To){this.state=Eo,this.changed();var t=this.sourceImage_.getState();t==Co||t==Po?this.reproject_():(this.sourceListenerKey_=W(this.sourceImage_,I,(function(t){var e=this.sourceImage_.getState();e!=Co&&e!=Po||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){X(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(Zl),Ac=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),kc="imageloadstart",Nc="imageloadend",jc="imageloaderror",Gc=function(t){function e(e,r){var n=t.call(this,e)||this;return n.image=r,n}return Ac(e,t),e}(h);function Dc(t,e){t.getImage().src=e}var zc=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,projection:e.projection,state:e.state})||this;return r.resolutions_=void 0!==e.resolutions?e.resolutions:null,r.reprojectedImage_=null,r.reprojectedRevision_=0,r.contextOptions_=!1===e.imageSmoothing?_h:void 0,r}return Ac(e,t),e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=g(this.resolutions_,t,0);t=this.resolutions_[e]}return t},e.prototype.getImage=function(t,e,r,n){var i=this.getProjection();if(i&&n&&!Sr(i,n)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Sr(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&$t(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Fc(i,n,t,e,r,function(t,e,r){return this.getImageInternal(t,e,r,i)}.bind(this),this.contextOptions_),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return i&&(n=i),this.getImageInternal(t,e,r,n)},e.prototype.getImageInternal=function(t,e,r,i){return n()},e.prototype.handleImageChange=function(t){var e=t.target;switch(e.getState()){case Eo:this.loading=!0,this.dispatchEvent(new Gc(kc,e));break;case Co:this.loading=!1,this.dispatchEvent(new Gc(Nc,e));break;case Po:this.loading=!1,this.dispatchEvent(new Gc(jc,e))}},e}(Ah);function Uc(t,e){var r=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&r.push(t+"="+encodeURIComponent(e[t]))}));var n=r.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+n}var Bc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yc=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{attributions:n.attributions,imageSmoothing:n.imageSmoothing,projection:n.projection,resolutions:n.resolutions})||this).crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null,r.hidpi_=void 0===n.hidpi||n.hidpi,r.url_=n.url,r.imageLoadFunction_=void 0!==n.imageLoadFunction?n.imageLoadFunction:Dc,r.params_=n.params||{},r.image_=null,r.imageSize_=[0,0],r.renderedRevision_=0,r.ratio_=void 0!==n.ratio?n.ratio:1.5,r}return Bc(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),r=this.hidpi_?r:1;var i=this.image_;if(i&&this.renderedRevision_==this.getRevision()&&i.getResolution()==e&&i.getPixelRatio()==r&&Vt(i.getExtent(),t))return i;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};T(o,this.params_);var a=((t=t.slice())[0]+t[2])/2,s=(t[1]+t[3])/2;if(1!=this.ratio_){var u=this.ratio_*ge(t)/2,l=this.ratio_*ce(t)/2;t[0]=a-u,t[1]=s-l,t[2]=a+u,t[3]=s+l}var h=e/r,c=Math.ceil(ge(t)/h),p=Math.ceil(ce(t)/h);t[0]=a-h*c/2,t[2]=a+h*c/2,t[1]=s-h*p/2,t[3]=s+h*p/2,this.imageSize_[0]=c,this.imageSize_[1]=p;var f=this.getRequestUrl_(t,this.imageSize_,r,n,o);return this.image_=new Jl(t,e,r,f,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(I,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,r,n,i){var o=n.getCode().split(":").pop();i.SIZE=e[0]+","+e[1],i.BBOX=t.join(","),i.BBOXSR=o,i.IMAGESR=o,i.DPI=Math.round(90*r);var a=this.url_,s=a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return s==a&&lt(!1,50),Uc(s,i)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){T(this.params_,t),this.image_=null,this.changed()},e}(zc),Vc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wc=function(t){function e(e,r,n,i,o){var a=this,s=void 0!==o?To:Co;return(a=t.call(this,e,r,n,s)||this).loader_=void 0!==o?o:null,a.canvas_=i,a.error_=null,a}return Vc(e,t),e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=Po):this.state=Co,this.changed()},e.prototype.load=function(){this.state==To&&(this.state=Eo,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(Zl),qc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xc=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{attributions:n.attributions,imageSmoothing:n.imageSmoothing,projection:n.projection,resolutions:n.resolutions,state:n.state})||this).canvasFunction_=n.canvasFunction,r.canvas_=null,r.renderedRevision_=0,r.ratio_=void 0!==n.ratio?n.ratio:1.5,r}return qc(e,t),e.prototype.getImageInternal=function(t,e,r,n){e=this.findNearestResolution(e);var i=this.canvas_;if(i&&this.renderedRevision_==this.getRevision()&&i.getResolution()==e&&i.getPixelRatio()==r&&Vt(i.getExtent(),t))return i;ve(t=t.slice(),this.ratio_);var o=[ge(t)/e*r,ce(t)/e*r],a=this.canvasFunction_.call(this,t,e,r,o,n);return a&&(i=new Wc(t,e,r,a)),this.canvas_=i,this.renderedRevision_=this.getRevision(),i},e}(zc),Zc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var Kc=function(t){function e(e){var r=t.call(this,{imageSmoothing:e.imageSmoothing,projection:e.projection,resolutions:e.resolutions})||this;return r.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null,r.displayDpi_=void 0!==e.displayDpi?e.displayDpi:96,r.params_=e.params||{},r.url_=e.url,r.imageLoadFunction_=void 0!==e.imageLoadFunction?e.imageLoadFunction:Dc,r.hidpi_=void 0===e.hidpi||e.hidpi,r.metersPerUnit_=void 0!==e.metersPerUnit?e.metersPerUnit:1,r.ratio_=void 0!==e.ratio?e.ratio:1,r.useOverlay_=void 0!==e.useOverlay&&e.useOverlay,r.image_=null,r.renderedRevision_=0,r}return Zc(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,n){e=this.findNearestResolution(e),r=this.hidpi_?r:1;var i=this.image_;if(i&&this.renderedRevision_==this.getRevision()&&i.getResolution()==e&&i.getPixelRatio()==r&&Vt(i.getExtent(),t))return i;1!=this.ratio_&&ve(t=t.slice(),this.ratio_);var o=[ge(t)/e*r,ce(t)/e*r];if(void 0!==this.url_){var a=this.getUrl(this.url_,this.params_,t,o,n);(i=new Jl(t,e,r,a,this.crossOrigin_,this.imageLoadFunction_)).addEventListener(I,this.handleImageChange.bind(this))}else i=null;return this.image_=i,this.renderedRevision_=this.getRevision(),i},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.updateParams=function(t){T(this.params_,t),this.changed()},e.prototype.getUrl=function(t,e,r,n,i){var o=function(t,e,r,n){var i=ge(t),o=ce(t),a=e[0],s=e[1],u=.0254/n;return s*i>a*o?i*r/(a*u):o*r/(s*u)}(r,n,this.metersPerUnit_,this.displayDpi_),a=ue(r),s={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(n[0]),SETDISPLAYHEIGHT:Math.round(n[1]),SETVIEWSCALE:o,SETVIEWCENTERX:a[0],SETVIEWCENTERY:a[1]};return T(s,e),Uc(t,s)},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e}(zc),Hc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jc=function(t){function e(e){var r=this,n=void 0!==e.crossOrigin?e.crossOrigin:null,i=void 0!==e.imageLoadFunction?e.imageLoadFunction:Dc;return(r=t.call(this,{attributions:e.attributions,imageSmoothing:e.imageSmoothing,projection:yr(e.projection)})||this).url_=e.url,r.imageExtent_=e.imageExtent,r.image_=new Jl(r.imageExtent_,void 0,1,r.url_,n,i),r.imageSize_=e.imageSize?e.imageSize:null,r.image_.addEventListener(I,r.handleImageChange.bind(r)),r}return Hc(e,t),e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,e,r,n){return ye(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(e){if(this.image_.getState()==Co){var r=this.image_.getExtent(),n=this.image_.getImage(),i=void 0,o=void 0;this.imageSize_?(i=this.imageSize_[0],o=this.imageSize_[1]):(i=n.width,o=n.height);var a=ce(r)/o,s=Math.ceil(ge(r)/a);if(s!=i){var u=Bi(s,o);T(u,this.getContextOptions());var l=u.canvas;u.drawImage(n,0,0,i,o,0,0,l.width,l.height),this.image_.setImage(l)}}t.prototype.handleImageChange.call(this,e)},e}(zc),$c="carmentaserver",Qc="geoserver",tp="mapserver",ep="qgis",rp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),np=[101,101],ip=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{attributions:n.attributions,imageSmoothing:n.imageSmoothing,projection:n.projection,resolutions:n.resolutions})||this).crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null,r.url_=n.url,r.imageLoadFunction_=void 0!==n.imageLoadFunction?n.imageLoadFunction:Dc,r.params_=n.params||{},r.v13_=!0,r.updateV13_(),r.serverType_=n.serverType,r.hidpi_=void 0===n.hidpi||n.hidpi,r.image_=null,r.imageSize_=[0,0],r.renderedRevision_=0,r.ratio_=void 0!==n.ratio?n.ratio:1.5,r}return rp(e,t),e.prototype.getFeatureInfoUrl=function(t,e,r,n){if(void 0!==this.url_){var i=yr(r),o=this.getProjection();o&&o!==i&&(e=wh(o,i,t,e),t=Cr(t,i,o));var a=he(t,e,0,np),s={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};T(s,this.params_,n);var u=Math.floor((t[0]-a[0])/e),l=Math.floor((a[3]-t[1])/e);return s[this.v13_?"I":"X"]=u,s[this.v13_?"J":"Y"]=l,this.getRequestUrl_(a,np,1,o||i,s)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.url_){var r={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var n=this.params_.LAYERS;if(!(!Array.isArray(n)||1===n.length))return;r.LAYER=n}if(void 0!==t){var i=this.getProjection()?this.getProjection().getMetersPerUnit():1;r.SCALE=t*i*39.37*(25.4/.28)}return T(r,e),Uc(this.url_,r)}},e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==r||this.hidpi_&&void 0!==this.serverType_||(r=1);var i=e/r,o=ue(t),a=he(o,i,0,[Math.ceil(ge(t)/i),Math.ceil(ce(t)/i)]),s=he(o,i,0,[Math.ceil(this.ratio_*ge(t)/i),Math.ceil(this.ratio_*ce(t)/i)]),u=this.image_;if(u&&this.renderedRevision_==this.getRevision()&&u.getResolution()==e&&u.getPixelRatio()==r&&Vt(u.getExtent(),a))return u;var l={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};T(l,this.params_),this.imageSize_[0]=Math.round(ge(s)/i),this.imageSize_[1]=Math.round(ce(s)/i);var h=this.getRequestUrl_(s,this.imageSize_,r,n,l);return this.image_=new Jl(s,e,r,h,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(I,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,r,n,i){if(lt(void 0!==this.url_,9),i[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(i.STYLES=""),1!=r)switch(this.serverType_){case Qc:var o=90*r+.5|0;"FORMAT_OPTIONS"in i?i.FORMAT_OPTIONS+=";dpi:"+o:i.FORMAT_OPTIONS="dpi:"+o;break;case tp:i.MAP_RESOLUTION=90*r;break;case $c:case ep:i.DPI=90*r;break;default:lt(!1,8)}i.WIDTH=e[0],i.HEIGHT=e[1];var a,s=n.getAxisOrientation();return a=this.v13_&&"ne"==s.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,i.BBOX=a.join(","),Uc(this.url_,i)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){T(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||"1.3.0";this.v13_=Qe(t,"1.3")>=0},e}(zc),op=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ap='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',sp=function(t){function e(e){var r,n=e||{};r=void 0!==n.attributions?n.attributions:[ap];var i=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",o=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:r,cacheSize:n.cacheSize,crossOrigin:i,imageSmoothing:n.imageSmoothing,opaque:void 0===n.opaque||n.opaque,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,url:o,wrapX:n.wrapX,attributionsCollapsible:!1})||this}return op(e,t),e}(Qh),up=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),lp=function(t){function e(e){var r=e||{};return t.call(this,r)||this}return up(e,t),e}(Li),hp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),cp=function(t){function e(e){var r=t.call(this)||this;return r.boundHandleImageChange_=r.handleImageChange_.bind(r),r.layer_=e,r}return hp(e,t),e.prototype.getFeatures=function(t){return n()},e.prototype.prepareFrame=function(t){return n()},e.prototype.renderFrame=function(t,e){return n()},e.prototype.loadedTileCallback=function(t,e,r){t[e]||(t[e]={}),t[e][r.tileCoord.toString()]=r},e.prototype.createLoadedTileFinder=function(t,e,r){return function(n,i){var o=this.loadedTileCallback.bind(this,r,n);return t.forEachLoadedTile(e,n,i,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){},e.prototype.getDataAtPixel=function(t,e,r){return n()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===Co&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Co&&e!=Po&&t.addEventListener(I,this.boundHandleImageChange_),e==To&&(t.load(),e=t.getState()),e==Co},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Pi&&t.changed()},e}(H),pp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fp=function(t){function e(e){var r=t.call(this,e)||this;return r.container=null,r.renderedResolution,r.tempTransform=[1,0,0,1,0,0],r.pixelTransform=[1,0,0,1,0,0],r.inversePixelTransform=[1,0,0,1,0,0],r.context=null,r.containerReused=!1,r}return pp(e,t),e.prototype.useContainer=function(t,e,r){var n,i,o=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===o&&((s=t.firstElementChild)instanceof HTMLCanvasElement&&(i=s.getContext("2d")));if(!i||0!==i.canvas.width&&i.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=i,this.containerReused=!0),!this.container){(n=document.createElement("div")).className=o;var a=n.style;a.position="absolute",a.width="100%",a.height="100%";var s=(i=Bi()).canvas;n.appendChild(s),(a=s.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=n,this.context=i}},e.prototype.clip=function(t,e,r){var n=e.pixelRatio,i=e.size[0]*n/2,o=e.size[1]*n/2,a=e.viewState.rotation,s=fe(r),u=de(r),l=se(r),h=ae(r);Tt(e.coordinateToPixelTransform,s),Tt(e.coordinateToPixelTransform,u),Tt(e.coordinateToPixelTransform,l),Tt(e.coordinateToPixelTransform,h),t.save(),co(t,-a,i,o),t.beginPath(),t.moveTo(s[0]*n,s[1]*n),t.lineTo(u[0]*n,u[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(h[0]*n,h[1]*n),t.clip(),co(t,a,i,o)},e.prototype.clipUnrotated=function(t,e,r){var n=fe(r),i=de(r),o=se(r),a=ae(r);Tt(e.coordinateToPixelTransform,n),Tt(e.coordinateToPixelTransform,i),Tt(e.coordinateToPixelTransform,o),Tt(e.coordinateToPixelTransform,a);var s=this.inversePixelTransform;Tt(s,n),Tt(s,i),Tt(s,o),Tt(s,a),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,r){var n=this.getLayer();if(n.hasListener(t)){var i=new zo(t,this.inversePixelTransform,r,e);n.dispatchEvent(i)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(bi,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(xi,t,e)},e.prototype.getRenderTransform=function(t,e,r,n,i,o,a){var s=i/2,u=o/2,l=n/e,h=-l,c=-t[0]+a,p=-t[1];return Ct(this.tempTransform,s,u,l,h,-r,c,p)},e.prototype.getDataAtPixel=function(t,e,r){var n,i=Tt(this.inversePixelTransform,t.slice()),o=this.context;try{var a=Math.round(i[0]),s=Math.round(i[1]),u=document.createElement("canvas"),l=u.getContext("2d");u.width=1,u.height=1,l.clearRect(0,0,1,1),l.drawImage(o.canvas,a,s,1,1,0,0,1,1),n=l.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:n}return 0===n[3]?null:n},e}(cp),dp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gp=function(t){function e(e){var r=t.call(this,e)||this;return r.image_=null,r}return dp(e,t),e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],r=t.pixelRatio,n=t.viewState,i=n.resolution,o=this.getLayer().getSource(),a=t.viewHints,s=t.extent;if(void 0!==e.extent&&(s=pe(s,Nr(e.extent,n.projection))),!a[va]&&!a[_a]&&!me(s))if(o){var u=n.projection,l=o.getImage(s,i,r,u);l&&this.loadImage(l)&&(this.image_=l)}else this.image_=null;return!!this.image_},e.prototype.renderFrame=function(t,e){var r=this.image_,n=r.getExtent(),i=r.getResolution(),o=r.getPixelRatio(),a=t.layerStatesArray[t.layerIndex],s=t.pixelRatio,u=t.viewState,l=u.center,h=u.resolution,c=t.size,p=s*i/(h*o),f=Math.round(c[0]*s),d=Math.round(c[1]*s),g=u.rotation;if(g){var y=Math.round(Math.sqrt(f*f+d*d));f=y,d=y}Ct(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/s,1/s,g,-f/2,-d/2),Pt(this.inversePixelTransform,this.pixelTransform);var m=go(this.pixelTransform);this.useContainer(e,m,a.opacity);var v=this.context,_=v.canvas;_.width!=f||_.height!=d?(_.width=f,_.height=d):this.containerReused||v.clearRect(0,0,f,d);var b=!1;if(a.extent){var x=Nr(a.extent,u.projection);(b=!Vt(x,t.extent)&&ye(x,t.extent))&&this.clipUnrotated(v,t,x)}var w=r.getImage(),S=Ct(this.tempTransform,f/2,d/2,p,p,0,o*(n[0]-l[0])/i,o*(l[1]-n[3])/i);this.renderedResolution=i*s/o;var E=S[4],C=S[5],P=w.width*S[0],R=w.height*S[3];if(T(v,this.getLayer().getSource().getContextOptions()),this.preRender(v,t),P>=.5&&R>=.5){var O=a.opacity,I=void 0;1!==O&&(I=this.context.globalAlpha,this.context.globalAlpha=O),this.context.drawImage(w,0,0,+w.width,+w.height,Math.round(E),Math.round(C),Math.round(P),Math.round(R)),1!==O&&(this.context.globalAlpha=I)}return this.postRender(v,t),b&&v.restore(),m!==_.style.transform&&(_.style.transform=m),this.container},e}(fp),yp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),mp=function(t){function e(e){return t.call(this,e)||this}return yp(e,t),e.prototype.createRenderer=function(){return new gp(this)},e}(lp),vp="preload",_p="useInterimTilesOnError",bp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),xp=function(t){function e(e){var r=this,n=e||{},i=T({},n);return delete i.preload,delete i.useInterimTilesOnError,(r=t.call(this,i)||this).setPreload(void 0!==n.preload?n.preload:0),r.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),r}return bp(e,t),e.prototype.getPreload=function(){return this.get(vp)},e.prototype.setPreload=function(t){this.set(vp,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(_p)},e.prototype.setUseInterimTilesOnError=function(t){this.set(_p,t)},e}(Li),wp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sp=function(t){function e(e){var r=t.call(this,e)||this;return r.extentChanged=!0,r.renderedExtent_=null,r.renderedPixelRatio,r.renderedProjection=null,r.renderedRevision,r.renderedTiles=[],r.newTiles_=!1,r.tmpExtent=[1/0,1/0,-1/0,-1/0],r.tmpTileRange_=new Cu(0,0,0,0),r}return wp(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),r=t.getState(),n=e.getUseInterimTilesOnError();return r==fa||r==ga||r==da&&!n},e.prototype.getTile=function(t,e,r,n){var i=n.pixelRatio,o=n.viewState.projection,a=this.getLayer(),s=a.getSource().getTile(t,e,r,i,o);return s.getState()==da&&(a.getUseInterimTilesOnError()?a.getPreload()>0&&(this.newTiles_=!0):s.setState(fa)),this.isDrawableTile(s)||(s=s.getInterimTile()),s},e.prototype.loadedTileCallback=function(e,r,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,r,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var r=t.layerStatesArray[t.layerIndex],n=t.viewState,i=n.projection,a=n.resolution,s=n.center,u=n.rotation,l=t.pixelRatio,h=this.getLayer(),c=h.getSource(),p=c.getRevision(),d=c.getTileGridForProjection(i),g=d.getZForResolution(a,c.zDirection),y=d.getResolution(g),m=t.extent,v=r.extent&&Nr(r.extent,i);v&&(m=pe(m,Nr(r.extent,i)));var _=c.getTilePixelRatio(l),b=Math.round(t.size[0]*_),x=Math.round(t.size[1]*_);if(u){var w=Math.round(Math.sqrt(b*b+x*x));b=w,x=w}var S=y*b/2/_,E=y*x/2/_,C=[s[0]-S,s[1]-E,s[0]+S,s[1]+E],P=d.getTileRangeForExtentAndZ(m,g),R={};R[g]={};var O=this.createLoadedTileFinder(c,i,R),I=this.tmpExtent,L=this.tmpTileRange_;this.newTiles_=!1;for(var M=P.minX;M<=P.maxX;++M)for(var F=P.minY;F<=P.maxY;++F){var A=this.getTile(g,M,F,t);if(this.isDrawableTile(A)){var k=o(this);if(A.getState()==fa){R[g][A.tileCoord.toString()]=A;var N=A.inTransition(k);this.newTiles_||!N&&-1!==this.renderedTiles.indexOf(A)||(this.newTiles_=!0)}if(1===A.getAlpha(k,t.time))continue}var j=d.getTileCoordChildTileRange(A.tileCoord,L,I),G=!1;j&&(G=O(g+1,j)),G||d.forEachTileCoordParentTileRange(A.tileCoord,O,L,I)}var D=y/a;Ct(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/_,1/_,u,-b/2,-x/2);var z=go(this.pixelTransform);this.useContainer(e,z,r.opacity);var U=this.context,B=U.canvas;Pt(this.inversePixelTransform,this.pixelTransform),Ct(this.tempTransform,b/2,x/2,D,D,0,-b/2,-x/2),B.width!=b||B.height!=x?(B.width=b,B.height=x):this.containerReused||U.clearRect(0,0,b,x),v&&this.clipUnrotated(U,t,v),T(U,c.getContextOptions()),this.preRender(U,t),this.renderedTiles.length=0;var Y,V,W,q=Object.keys(R).map(Number);q.sort(f),1!==r.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(Y=[],V=[]):q=q.reverse();for(var X=q.length-1;X>=0;--X){var Z=q[X],K=c.getTilePixelSize(Z,l,i),H=d.getResolution(Z)/y,J=K[0]*H*D,$=K[1]*H*D,Q=d.getTileCoordForCoordAndZ(fe(C),Z),tt=d.getTileCoordExtent(Q),et=Tt(this.tempTransform,[_*(tt[0]-C[0])/y,_*(C[3]-tt[3])/y]),rt=_*c.getGutterForProjection(i),nt=R[Z];for(var it in nt){var ot=(A=nt[it]).tileCoord,at=et[0]-(Q[1]-ot[1])*J,st=Math.round(at+J),ut=et[1]-(Q[2]-ot[2])*$,lt=Math.round(ut+$),ht=st-(M=Math.round(at)),ct=lt-(F=Math.round(ut)),pt=g===Z;if(!(N=pt&&1!==A.getAlpha(o(this),t.time)))if(Y){U.save(),W=[M,F,M+ht,F,M+ht,F+ct,M,F+ct];for(var ft=0,dt=Y.length;ft<dt;++ft)if(g!==Z&&Z<V[ft]){var gt=Y[ft];U.beginPath(),U.moveTo(W[0],W[1]),U.lineTo(W[2],W[3]),U.lineTo(W[4],W[5]),U.lineTo(W[6],W[7]),U.moveTo(gt[6],gt[7]),U.lineTo(gt[4],gt[5]),U.lineTo(gt[2],gt[3]),U.lineTo(gt[0],gt[1]),U.clip()}Y.push(W),V.push(Z)}else U.clearRect(M,F,ht,ct);this.drawTileImage(A,t,M,F,ht,ct,rt,pt,r.opacity),Y&&!N&&U.restore(),this.renderedTiles.push(A),this.updateUsedTiles(t.usedTiles,c,A)}}return this.renderedRevision=p,this.renderedResolution=y,this.extentChanged=!this.renderedExtent_||!$t(this.renderedExtent_,C),this.renderedExtent_=C,this.renderedPixelRatio=l,this.renderedProjection=i,this.manageTilePyramid(t,c,d,l,i,m,g,h.getPreload()),this.scheduleExpireCache(t,c),this.postRender(U,t),r.extent&&U.restore(),z!==B.style.transform&&(B.style.transform=z),this.container},e.prototype.drawTileImage=function(t,e,r,n,i,a,s,u,l){var h=this.getTileImage(t);if(h){var c=o(this),p=u?t.getAlpha(c,e.time):1,f=l*p,d=f!==this.context.globalAlpha;d&&(this.context.save(),this.context.globalAlpha=f),this.context.drawImage(h,s,s,h.width-2*s,h.height-2*s,r,n,i,a),d&&this.context.restore(),1!==p?e.animate=!0:u&&t.endTransition(c)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var r=function(t,e,r){var n=o(t);n in r.usedTiles&&t.expireCache(r.viewState.projection,r.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(r)}},e.prototype.updateUsedTiles=function(t,e,r){var n=o(e);n in t||(t[n]={}),t[n][r.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,r,n,i,a,s,u,l){var h=o(e);h in t.wantedTiles||(t.wantedTiles[h]={});var c,p,f,d,g,y,m=t.wantedTiles[h],v=t.tileQueue,_=0;for(y=r.getMinZoom();y<=s;++y)for(p=r.getTileRangeForExtentAndZ(a,y,p),f=r.getResolution(y),d=p.minX;d<=p.maxX;++d)for(g=p.minY;g<=p.maxY;++g)s-y<=u?(++_,(c=e.getTile(y,d,g,n,i)).getState()==ca&&(m[c.getKey()]=!0,v.isKeyQueued(c.getKey())||v.enqueue([c,h,r.getTileCoordCenter(c.tileCoord),f])),void 0!==l&&l(c)):e.useTile(y,d,g,i);e.updateCacheSize(_,i)},e}(fp);Sp.prototype.getLayer;var Tp=Sp,Ep=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cp=function(t){function e(e){return t.call(this,e)||this}return Ep(e,t),e.prototype.createRenderer=function(){return new Tp(this)},e}(xp),Pp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rp=!0;try{new ImageData(10,10)}catch(t){Rp=!1}var Op=document.createElement("canvas").getContext("2d");function Ip(t){var e=!0;try{new ImageData(10,10)}catch(t){e=!1}function r(t,r,n){return e?new ImageData(t,r,n):{data:t,width:r,height:n}}return function(e){var n,i,o=e.buffers,a=e.meta,s=e.imageOps,u=e.width,l=e.height,h=o.length,c=o[0].byteLength;if(s){var p=new Array(h);for(i=0;i<h;++i)p[i]=r(new Uint8ClampedArray(o[i]),u,l);n=t(p,a).data}else{n=new Uint8ClampedArray(c);var f=new Array(h),d=new Array(h);for(i=0;i<h;++i)f[i]=new Uint8ClampedArray(o[i]),d[i]=[0,0,0,0];for(var g=0;g<c;g+=4){for(var y=0;y<h;++y){var m=f[y];d[y][0]=m[g],d[y][1]=m[g+1],d[y][2]=m[g+2],d[y][3]=m[g+3]}var v=t(d,a);n[g]=v[0],n[g+1]=v[1],n[g+2]=v[2],n[g+3]=v[3]}}return n.buffer}}function Lp(t,e){var r=Object.keys(t.lib||{}).map((function(e){return"var "+e+" = "+t.lib[e].toString()+";"})).concat(["var __minion__ = ("+Ip.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),n=new Blob(r,{type:"text/javascript"}),i=URL.createObjectURL(n),o=new Worker(i);return o.addEventListener("message",e),o}var Mp=function(t){function e(e){var r,n=t.call(this)||this;n._imageOps=!!e.imageOps;var i=[];if(r=0===e.threads?0:n._imageOps?1:e.threads||1)for(var o=0;o<r;++o)i[o]=Lp(e,n._onWorkerMessage.bind(n,o));else i[0]=function(t,e){var r=Ip(t.operation),n=!1;return{postMessage:function(t){setTimeout((function(){n||e({data:{buffer:r(t),meta:t.meta}})}),0)},terminate:function(){n=!0}}}(e,n._onWorkerMessage.bind(n,0));return n._workers=i,n._queue=[],n._maxQueueLength=e.queue||1/0,n._running=0,n._dataLookup={},n._job=null,n}return Pp(e,t),e.prototype.process=function(t,e,r){this._enqueue({inputs:t,meta:e,callback:r}),this._dispatch()},e.prototype._enqueue=function(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},e.prototype._dispatch=function(){if(0===this._running&&this._queue.length>0){var t=this._queue.shift();this._job=t;var e=t.inputs[0].width,r=t.inputs[0].height,n=t.inputs.map((function(t){return t.data.buffer})),i=this._workers.length;if(this._running=i,1===i)this._workers[0].postMessage({buffers:n,meta:t.meta,imageOps:this._imageOps,width:e,height:r},n);else for(var o=t.inputs[0].data.length,a=4*Math.ceil(o/4/i),s=0;s<i;++s){for(var u=s*a,l=[],h=0,c=n.length;h<c;++h)l.push(n[s].slice(u,u+a));this._workers[s].postMessage({buffers:l,meta:t.meta,imageOps:this._imageOps,width:e,height:r},l)}}},e.prototype._onWorkerMessage=function(t,e){this.disposed||(this._dataLookup[t]=e.data,--this._running,0===this._running&&this._resolveJob())},e.prototype._resolveJob=function(){var t,e,r=this._job,n=this._workers.length;if(1===n)t=new Uint8ClampedArray(this._dataLookup[0].buffer),e=this._dataLookup[0].meta;else{var i=r.inputs[0].data.length;t=new Uint8ClampedArray(i),e=new Array(i);for(var o=4*Math.ceil(i/4/n),a=0;a<n;++a){var s=this._dataLookup[a].buffer,u=a*o;t.set(new Uint8ClampedArray(s),u),e[a]=this._dataLookup[a].meta}}this._job=null,this._dataLookup={},r.callback(null,function(t,e,r){if(Rp)return new ImageData(t,e,r);var n=Op.createImageData(e,r);return n.data.set(t),n}(t,r.inputs[0].width,r.inputs[0].height),e),this._dispatch()},e.prototype.disposeInternal=function(){for(var t=0;t<this._workers.length;++t)this._workers[t].terminate();this._workers.length=0},e}(p),Fp="beforeoperations",Ap="afteroperations",kp="pixel",Np="image",jp=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.extent=r.extent,i.resolution=r.viewState.resolution/r.pixelRatio,i.data=n,i}return Pp(e,t),e}(h),Gp=function(t){function e(e){var r=t.call(this,{projection:null})||this;r.processor_=null,r.operationType_=void 0!==e.operationType?e.operationType:kp,r.threads_=void 0!==e.threads?e.threads:1,r.layers_=function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=Up(t[n]);return r}(e.sources);for(var n,i=r.changed.bind(r),o=0,a=r.layers_.length;o<a;++o)r.layers_[o].addEventListener(I,i);return r.tileQueue_=new ma((function(){return 1}),r.changed.bind(r)),r.requestedFrameState_,r.renderedImageCanvas_=null,r.renderedRevision_,r.frameState_={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],extent:null,index:0,layerIndex:0,layerStatesArray:(n=r.layers_,n.map((function(t){return t.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],tileQueue:r.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},declutterItems:[]},r.setAttributions((function(t){for(var r=[],n=0,i=e.sources.length;n<i;++n){var o=e.sources[n],a=(o instanceof Ah?o:o.getSource()).getAttributions();if("function"==typeof a){var s=a(t);r.push.apply(r,s)}}return 0!==r.length?r:null})),void 0!==e.operation&&r.setOperation(e.operation,e.lib),r}return Pp(e,t),e.prototype.setOperation=function(t,e){this.processor_&&this.processor_.dispose(),this.processor_=new Mp({operation:t,imageOps:this.operationType_===Np,queue:1,lib:e,threads:this.threads_}),this.changed()},e.prototype.updateFrameState_=function(t,e,r){var n=T({},this.frameState_);n.viewState=T({},n.viewState);var i=ue(t);n.extent=t.slice(),n.size[0]=Math.round(ge(t)/e),n.size[1]=Math.round(ce(t)/e),n.time=1/0;var o=n.viewState;return o.center=i,o.projection=r,o.resolution=e,n},e.prototype.allSourcesReady_=function(){for(var t=!0,e=0,r=this.layers_.length;e<r;++e)if(this.layers_[e].getSource().getState()!==Pi){t=!1;break}return t},e.prototype.getImage=function(t,e,r,n){if(!this.allSourcesReady_())return null;var i=this.updateFrameState_(t,e,n);if(this.requestedFrameState_=i,this.renderedImageCanvas_){var o=this.renderedImageCanvas_.getResolution(),a=this.renderedImageCanvas_.getExtent();e===o&&$t(t,a)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),i.tileQueue.loadMoreTiles(16,16),i.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_},e.prototype.processSources_=function(){for(var t=this.requestedFrameState_,e=this.layers_.length,r=new Array(e),n=0;n<e;++n){t.layerIndex=n;var i=zp(this.layers_[n],t);if(!i)return;r[n]=i}var o={};this.dispatchEvent(new jp(Fp,t,o)),this.processor_.process(r,o,this.onWorkerComplete_.bind(this,t))},e.prototype.onWorkerComplete_=function(t,e,r,n){if(!e&&r){var i=t.extent,o=t.viewState.resolution;if(o===this.requestedFrameState_.viewState.resolution&&$t(i,this.requestedFrameState_.extent)){var a;if(this.renderedImageCanvas_)a=this.renderedImageCanvas_.getImage().getContext("2d");else a=Bi(Math.round(ge(i)/o),Math.round(ce(i)/o)),this.renderedImageCanvas_=new Wc(i,o,1,a.canvas);a.putImageData(r,0,0),this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new jp(Ap,t,n))}}},e.prototype.getImageInternal=function(){return null},e.prototype.disposeInternal=function(){this.processor_&&this.processor_.dispose(),t.prototype.disposeInternal.call(this)},e}(zc);Gp.prototype.dispose;var Dp=null;function zp(t,e){var r=t.getRenderer();if(!r)throw new Error("Unsupported layer type: "+t);if(!r.prepareFrame(e))return null;var n,i=e.size[0],o=e.size[1],a=r.renderFrame(e,null);if(a&&(n=a.firstElementChild),!(n instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+n);if(n.width===i&&n.height===o)return n.getContext("2d").getImageData(0,0,i,o);if(Dp){var s=Dp.canvas;s.width!==i||s.height!==o?Dp=Bi(i,o):Dp.clearRect(0,0,i,o)}else Dp=Bi(i,o);return Dp.drawImage(n,0,0,i,o),Dp.getImageData(0,0,i,o)}function Up(t){var e;return t instanceof Ah?t instanceof Gh?e=new Cp({source:t}):t instanceof zc&&(e=new mp({source:t})):e=t,e}var Bp=Gp,Yp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vp=['Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',ap],Wp={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},qp={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},Xp=function(t){function e(e){var r=e.layer.indexOf("-"),n=-1==r?e.layer:e.layer.slice(0,r),i=qp[n],o=Wp[e.layer],a=void 0!==e.url?e.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+e.layer+"/{z}/{x}/{y}."+o.extension;return t.call(this,{attributions:Vp,cacheSize:e.cacheSize,crossOrigin:"anonymous",imageSmoothing:e.imageSmoothing,maxZoom:null!=e.maxZoom?e.maxZoom:i.maxZoom,minZoom:null!=e.minZoom?e.minZoom:i.minZoom,opaque:o.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:a,wrapX:e.wrapX})||this}return Yp(e,t),e}(Qh),Zp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kp=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this).params_=n.params||{},r.hidpi_=void 0===n.hidpi||n.hidpi,r.tmpExtent_=[1/0,1/0,-1/0,-1/0],r.setKey(r.getKeyForParams_()),r}return Zp(e,t),e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,r,n,i,o){var a=this.urls;if(a){var s,u=i.getCode().split(":").pop();if(o.SIZE=e[0]+","+e[1],o.BBOX=r.join(","),o.BBOXSR=u,o.IMAGESR=u,o.DPI=Math.round(o.DPI?o.DPI*n:90*n),1==a.length)s=a[0];else s=a[Oe(Lu(t),a.length)];return Uc(s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_?t:1},e.prototype.updateParams=function(t){T(this.params_,t),this.setKey(this.getKeyForParams_())},e.prototype.tileUrlFunction=function(t,e,r){var n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(r)),!(n.getResolutions().length<=t[0])){1==e||this.hidpi_||(e=1);var i=n.getTileCoordExtent(t,this.tmpExtent_),o=za(n.getTileSize(t[0]),this.tmpSize);1!=e&&(o=Da(o,e,this.tmpSize));var a={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return T(a,this.params_),this.getRequestUrl_(t,o,i,e,r,a)}},e}(Zh),Hp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jp=function(t){function e(e,r,n){var i=t.call(this,e,fa)||this;return i.tileSize_=r,i.text_=n,i.canvas_=null,i}return Hp(e,t),e.prototype.getImage=function(){if(this.canvas_)return this.canvas_;var t=this.tileSize_,e=Bi(t[0],t[1]);return e.strokeStyle="grey",e.strokeRect(.5,.5,t[0]+.5,t[1]+.5),e.fillStyle="grey",e.strokeStyle="white",e.textAlign="center",e.textBaseline="middle",e.font="24px sans-serif",e.lineWidth=4,e.strokeText(this.text_,t[0]/2,t[1]/2,t[0]),e.fillText(this.text_,t[0]/2,t[1]/2,t[0]),this.canvas_=e.canvas,e.canvas},e.prototype.load=function(){},e}(dh),$p=function(t){function e(e){var r=e||{};return t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection})||this}return Hp(e,t),e.prototype.getTile=function(t,e,r){var n=Ru(t,e,r);if(this.tileCache.containsKey(n))return this.tileCache.get(n);var i=za(this.tileGrid.getTileSize(t)),o=[t,e,r],a=this.getTileCoordForTileUrlFunction(o),s=void 0;s=a?"z:"+a[0]+" x:"+a[1]+" y:"+a[2]:"none";var u=new Jp(o,i,s);return this.tileCache.set(n,u),u},e}(Qh),Qp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),tf=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmoothing:e.imageSmoothing,projection:yr("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:Ci,tileLoadFunction:e.tileLoadFunction,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition})||this;if(r.tileJSON_=null,r.tileSize_=e.tileSize,e.url)if(e.jsonp)Kh(e.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var n=new XMLHttpRequest;n.addEventListener("load",r.onXHRLoad_.bind(r)),n.addEventListener("error",r.onXHRError_.bind(r)),n.open("GET",e.url),n.send()}else e.tileJSON?r.handleTileJSONResponse(e.tileJSON):lt(!1,51);return r}return Qp(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var e,r=yr("EPSG:4326"),n=this.getProjection();if(void 0!==t.bounds){var i=Tr(r,n);e=_e(t.bounds,i)}var o=t.minzoom||0,a=t.maxzoom||22,s=ku({extent:Gu(n),maxZoom:a,minZoom:o,tileSize:this.tileSize_});if(this.tileGrid=s,this.tileUrlFunction=zh(t.tiles,s),void 0!==t.attribution&&!this.getAttributions()){var u=void 0!==e?e:r.getExtent();this.setAttributions((function(e){return ye(u,e.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState(Pi)},e.prototype.handleTileJSONError=function(){this.setState(Ri)},e}(Zh),ef=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rf=function(t){function e(e){var r=this,n=e||{},i=n.params||{},o=!("TRANSPARENT"in i)||i.TRANSPARENT;return(r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,opaque:!o,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this).gutter_=void 0!==n.gutter?n.gutter:0,r.params_=i,r.v13_=!0,r.serverType_=n.serverType,r.hidpi_=void 0===n.hidpi||n.hidpi,r.tmpExtent_=[1/0,1/0,-1/0,-1/0],r.updateV13_(),r.setKey(r.getKeyForParams_()),r}return ef(e,t),e.prototype.getFeatureInfoUrl=function(t,e,r,n){var i=yr(r),o=this.getProjection(),a=this.getTileGrid();a||(a=this.getTileGridForProjection(i));var s=a.getZForResolution(e,this.zDirection),u=a.getTileCoordForCoordAndZ(t,s);if(!(a.getResolutions().length<=u[0])){var l=a.getResolution(u[0]),h=a.getTileCoordExtent(u,this.tmpExtent_),c=za(a.getTileSize(u[0]),this.tmpSize),p=this.gutter_;0!==p&&(c=Ga(c,p,this.tmpSize),h=zt(h,l*p,h)),o&&o!==i&&(l=wh(o,i,t,l),h=Pr(h,i,o),t=Cr(t,i,o));var f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};T(f,this.params_,n);var d=Math.floor((t[0]-h[0])/l),g=Math.floor((h[3]-t[1])/l);return f[this.v13_?"I":"X"]=d,f[this.v13_?"J":"Y"]=g,this.getRequestUrl_(u,c,h,1,o||i,f)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var r={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var n=this.params_.LAYERS;if(!(!Array.isArray(n)||1===n.length))return;r.LAYER=n}if(void 0!==t){var i=this.getProjection()?this.getProjection().getMetersPerUnit():1;r.SCALE=t*i*39.37*(25.4/.28)}return T(r,e),Uc(this.urls[0],r)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,r,n,i,o){var a=this.urls;if(a){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=i.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=n)switch(this.serverType_){case Qc:var s=90*n+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case tp:o.MAP_RESOLUTION=90*n;break;case $c:case ep:o.DPI=90*n;break;default:lt(!1,52)}var u,l=i.getAxisOrientation(),h=r;if(this.v13_&&"ne"==l.substr(0,2)){var c=void 0;c=r[0],h[0]=r[1],h[1]=c,c=r[2],h[2]=r[3],h[3]=c}if(o.BBOX=h.join(","),1==a.length)u=a[0];else u=a[Oe(Lu(t),a.length)];return Uc(u,o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},e.prototype.updateParams=function(t){T(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||"1.3.0";this.v13_=Qe(t,"1.3")>=0},e.prototype.tileUrlFunction=function(t,e,r){var n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(r)),!(n.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var i=n.getResolution(t[0]),o=n.getTileCoordExtent(t,this.tmpExtent_),a=za(n.getTileSize(t[0]),this.tmpSize),s=this.gutter_;0!==s&&(a=Ga(a,s,this.tmpSize),o=zt(o,i*s,o)),1!=e&&(a=Da(a,e,this.tmpSize));var u={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return T(u,this.params_),this.getRequestUrl_(t,a,o,e,r,u)}},e}(Zh),nf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),of=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r)||this;return s.src_=n,s.extent_=i,s.preemptive_=o,s.grid_=null,s.keys_=null,s.data_=null,s.jsonp_=a,s}return nf(e,t),e.prototype.getImage=function(){return null},e.prototype.getData=function(t){if(!this.grid_||!this.keys_)return null;var e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),r=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),n=this.grid_[Math.floor((1-r)*this.grid_.length)];if("string"!=typeof n)return null;var i=n.charCodeAt(Math.floor(e*n.length));i>=93&&i--,i>=35&&i--;var o=null;if((i-=32)in this.keys_){var a=this.keys_[i];o=this.data_&&a in this.data_?this.data_[a]:a}return o},e.prototype.forDataAtCoordinate=function(t,e,r){this.state==ga&&!0===r?(this.state=ca,q(this,I,(function(r){e(this.getData(t))}),this),this.loadInternal_()):!0===r?setTimeout(function(){e(this.getData(t))}.bind(this),0):e(this.getData(t))},e.prototype.getKey=function(){return this.src_},e.prototype.handleError_=function(){this.state=da,this.changed()},e.prototype.handleLoad_=function(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=fa,this.changed()},e.prototype.loadInternal_=function(){if(this.state==ca)if(this.state=pa,this.jsonp_)Kh(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}},e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(r)}else this.handleError_()},e.prototype.onXHRError_=function(t){this.handleError_()},e.prototype.load=function(){this.preemptive_?this.loadInternal_():this.setState(ga)},e}(dh),af=function(t){function e(e){var r=t.call(this,{projection:yr("EPSG:3857"),state:Ci})||this;if(r.preemptive_=void 0===e.preemptive||e.preemptive,r.tileUrlFunction_=Bh,r.template_=void 0,r.jsonp_=e.jsonp||!1,e.url)if(r.jsonp_)Kh(e.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var n=new XMLHttpRequest;n.addEventListener("load",r.onXHRLoad_.bind(r)),n.addEventListener("error",r.onXHRError_.bind(r)),n.open("GET",e.url),n.send()}else e.tileJSON?r.handleTileJSONResponse(e.tileJSON):lt(!1,51);return r}return nf(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTemplate=function(){return this.template_},e.prototype.forDataAtCoordinateAndResolution=function(t,e,r,n){if(this.tileGrid){var i=this.tileGrid.getZForResolution(e,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,i);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,r,n)}else!0===n?setTimeout((function(){r(null)}),0):r(null)},e.prototype.handleTileJSONError=function(){this.setState(Ri)},e.prototype.handleTileJSONResponse=function(t){var e,r=yr("EPSG:4326"),n=this.getProjection();if(void 0!==t.bounds){var i=Tr(r,n);e=_e(t.bounds,i)}var o=t.minzoom||0,a=t.maxzoom||22,s=ku({extent:Gu(n),maxZoom:a,minZoom:o});this.tileGrid=s,this.template_=t.template;var u=t.grids;if(u){if(this.tileUrlFunction_=zh(u,s),void 0!==t.attribution){var l=void 0!==e?e:r.getExtent();this.setAttributions((function(e){return ye(l,e.extent)?[t.attribution]:null}))}this.setState(Pi)}else this.setState(Ri)},e.prototype.getTile=function(t,e,r,n,i){var o=Ru(t,e,r);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var a=[t,e,r],s=this.getTileCoordForTileUrlFunction(a,i),u=this.tileUrlFunction_(s,n,i),l=new of(a,void 0!==u?ca:ga,void 0!==u?u:"",this.tileGrid.getTileCoordExtent(a),this.preemptive_,this.jsonp_);return this.tileCache.set(o,l),l},e.prototype.useTile=function(t,e,r){var n=Ru(t,e,r);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Gh),sf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),uf=function(t){function e(e,r,n,i,o,a){var s=t.call(this,e,r,a)||this;return s.extent=null,s.format_=i,s.features_=null,s.loader_,s.projection=null,s.resolution,s.tileLoadFunction_=o,s.url_=n,s}return sf(e,t),e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.getKey=function(){return this.url_},e.prototype.load=function(){this.state==ca&&(this.setState(pa),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},e.prototype.onLoad=function(t,e){this.setFeatures(t)},e.prototype.onError=function(){this.setState(da)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(fa)},e.prototype.setLoader=function(t){this.loader_=t},e}(dh),lf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hf=[],cf=function(t){function e(e,r,n,i){var o=t.call(this,e,r,{transition:0})||this;return o.context_={},o.executorGroups={},o.loadingSourceTiles=0,o.errorSourceTileKeys={},o.hitDetectionImageData={},o.replayState_={},o.sourceTiles=null,o.wantedResolution,o.getSourceTiles=i.bind(void 0,o),o.sourceZ=-1,o.hifi=!1,o.wrappedTileCoord=n,o}return lf(e,t),e.prototype.getContext=function(t){var e=o(t);return e in this.context_||(this.context_[e]=Bi(1,1,hf)),this.context_[e]},e.prototype.hasContext=function(t){return o(t)in this.context_},e.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},e.prototype.getReplayState=function(t){var e=o(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedZ:-1,renderedTileZ:-1}),this.replayState_[e]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var e in this.context_)hf.push(this.context_[e].canvas);t.prototype.release.call(this)},e}(dh),pf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ff=function(t){function e(e){var r=this,n=e.projection||"EPSG:3857",i=e.extent||Gu(n),o=e.tileGrid||ku({extent:i,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return(r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,opaque:!1,projection:n,state:e.state,tileGrid:o,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:df,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection})||this).format_=e.format?e.format:null,r.loadingTiles_={},r.sourceTileCache=new Rh(r.tileCache.highWaterMark),r.overlaps_=null==e.overlaps||e.overlaps,r.tileClass=e.tileClass?e.tileClass:uf,r.tileGrids_={},r}return pf(e,t),e.prototype.getFeaturesInExtent=function(t){var e=[],r=this.tileCache;if(0===r.getCount())return e;var n=Iu(r.peekFirstKey())[0],i=this.tileGrid;return r.forEach((function(r){if(r.tileCoord[0]===n&&r.getState()===fa)for(var o=r.getSourceTiles(),a=0,s=o.length;a<s;++a){var u=o[a],l=u.tileCoord;if(ye(t,i.getTileCoordExtent(l))){var h=u.getFeatures();if(h)for(var c=0,p=h.length;c<p;++c){var f=h[c],d=f.getGeometry();ye(t,d.getExtent())&&e.push(f)}}}})),e},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},e.prototype.expireCache=function(e,r){t.prototype.expireCache.call(this,e,r),this.sourceTileCache.expireCache({})},e.prototype.getSourceTiles=function(t,e,r){var n=r.wrappedTileCoord,i=this.getTileGridForProjection(e),o=i.getTileCoordExtent(n),a=n[0],s=i.getResolution(a);zt(o,-s,o);var u=this.tileGrid,l=u.getExtent();l&&pe(o,l,o);var h,c,p,f=u.getZForResolution(s,1),d=u.getMinZoom(),g=r.sourceTiles;if(g&&g.length>0&&g[0].tileCoord[0]===f)h=g,c=!0,p=f;else{h=[],p=f+1;do{--p,c=!0,u.forEachTileCoord(o,p,function(n){var i,o=this.tileUrlFunction(n,t,e);if(void 0!==o)if(this.sourceTileCache.containsKey(o)){var a=(i=this.sourceTileCache.get(o)).getState();if(a===fa||a===da||a===ga)return void h.push(i)}else p===f&&((i=new this.tileClass(n,ca,o,this.format_,this.tileLoadFunction)).extent=u.getTileCoordExtent(n),i.projection=e,i.resolution=u.getResolution(n[0]),this.sourceTileCache.set(o,i),i.addEventListener(I,this.handleTileChange.bind(this)),i.load());c=c&&i&&i.getState()===fa,i&&i.getState()!==ga&&r.getState()===ca&&(r.loadingSourceTiles++,i.addEventListener(I,(function t(){var e=i.getState(),n=i.getKey();if(e===fa||e===da){e===fa?(i.removeEventListener(I,t),r.loadingSourceTiles--,delete r.errorSourceTileKeys[n]):e===da&&(r.errorSourceTileKeys[n]=!0);var o=Object.keys(r.errorSourceTileKeys).length;r.loadingSourceTiles-o==0&&(r.hifi=0===o,r.sourceZ=f,r.setState(fa))}})))}.bind(this)),c||(h.length=0)}while(!c&&p>d)}return r.getState()===ca&&r.setState(pa),c&&(r.hifi=f===p,r.sourceZ=p,r.getState()<fa?r.setState(fa):g&&_(h,g)||(r.sourceTiles=h)),h},e.prototype.getTile=function(t,e,r,n,i){var o,a=Ru(t,e,r),s=this.getKey();if(this.tileCache.containsKey(a)&&(o=this.tileCache.get(a)).key===s)return o;var u=[t,e,r],l=this.getTileCoordForTileUrlFunction(u,i),h=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(i);if(l&&h){var p=c.getTileCoordExtent(l);zt(p,-c.getResolution(t),p),ye(h,p)||(l=null)}var f=!0;if(null!==l){var d=this.tileGrid,g=c.getResolution(t),y=d.getZForResolution(g,1),m=c.getTileCoordExtent(l);zt(m,-g,m),d.forEachTileCoord(m,y,function(t){f=f&&!this.tileUrlFunction(t,n,i)}.bind(this))}var v=new cf(u,f?ga:ca,l,this.getSourceTiles.bind(this,n,i));return v.key=s,o?(v.interimTile=o,v.refreshInterimChain(),this.tileCache.replace(a,v)):this.tileCache.set(a,v),v},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),r=this.tileGrids_[e];if(!r){var n=this.tileGrid;r=ju(t,void 0,n?n.getTileSize(n.getMinZoom()):void 0),this.tileGrids_[e]=r}return r},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,e,r){var n=za(this.getTileGridForProjection(r).getTileSize(t),this.tmpSize);return[Math.round(n[0]*e),Math.round(n[1]*e)]},e.prototype.updateCacheSize=function(e,r){t.prototype.updateCacheSize.call(this,2*e,r)},e}(Wh);function df(t,e){var r=xu(e,t.getFormat(),t.onLoad.bind(t),t.onError.bind(t));t.setLoader(r)}var gf="KVP",yf="REST",mf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vf=function(t){function e(e){var r=this,n=void 0!==e.requestEncoding?e.requestEncoding:gf,i=e.tileGrid,o=e.urls;return void 0===o&&void 0!==e.url&&(o=Yh(e.url)),(r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmoothing:e.imageSmoothing,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,urls:o,wrapX:void 0!==e.wrapX&&e.wrapX,transition:e.transition})||this).version_=void 0!==e.version?e.version:"1.0.0",r.format_=void 0!==e.format?e.format:"image/jpeg",r.dimensions_=void 0!==e.dimensions?e.dimensions:{},r.layer_=e.layer,r.matrixSet_=e.matrixSet,r.style_=e.style,r.requestEncoding_=n,r.setKey(r.getKeyForDimensions_()),o&&o.length>0&&(r.tileUrlFunction=Uh(o.map(r.createFromWMTSTemplate.bind(r)))),r}return mf(e,t),e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.setTileUrlFunction(Uh(t.map(this.createFromWMTSTemplate.bind(this))),e)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixSet_},e.prototype.getRequestEncoding=function(){return this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,e=[];for(var r in this.dimensions_)e[t++]=r+"-"+this.dimensions_[r];return e.join("/")},e.prototype.updateDimensions=function(t){T(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e.prototype.createFromWMTSTemplate=function(t){var e=this.requestEncoding_,r={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e==gf&&T(r,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e==gf?Uc(t,r):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in r?r[e.toLowerCase()]:t}));var n=this.tileGrid,i=this.dimensions_;return function(r,o,a){if(r){var s={TileMatrix:n.getMatrixId(r[0]),TileCol:r[1],TileRow:r[2]};T(s,i);var u=t;return u=e==gf?Uc(u,s):u.replace(/\{(\w+?)\}/g,(function(t,e){return s[e]}))}}},e}(Zh);var _f=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bf="renderOrder",xf=function(t){function e(e){var r=this,n=e||{},i=T({},n);return delete i.style,delete i.renderBuffer,delete i.updateWhileAnimating,delete i.updateWhileInteracting,(r=t.call(this,i)||this).declutter_=void 0!==n.declutter&&n.declutter,r.renderBuffer_=void 0!==n.renderBuffer?n.renderBuffer:100,r.style_=null,r.styleFunction_=void 0,r.setStyle(n.style),r.updateWhileAnimating_=void 0!==n.updateWhileAnimating&&n.updateWhileAnimating,r.updateWhileInteracting_=void 0!==n.updateWhileInteracting&&n.updateWhileInteracting,r}return _f(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(bf)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.setRenderOrder=function(t){this.set(bf,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:ah,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var r;if(Array.isArray(t))r=t;else lt("function"==typeof t.getZIndex,41),r=[t];e=function(){return r}}return e}(this.style_),this.changed()},e}(Li),wf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sf="GENERATE_BUFFERS",Tf=function(t){function e(e,r){var n=t.call(this,e)||this,i=r||{};return n.helper=new Rl({postProcesses:i.postProcesses,uniforms:i.uniforms}),n}return wf(e,t),e.prototype.disposeInternal=function(){this.helper.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getShaderCompileErrors=function(){return this.helper.getShaderCompileErrors()},e}(cp);var Ef=Tf,Cf=new Blob(['var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};'],{type:"application/javascript"}),Pf=URL.createObjectURL(Cf);var Rf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Of=function(t){function e(e,r){var n=this,i=r.uniforms||{},a=[1,0,0,1,0,0];i[_l]=a,(n=t.call(this,e,{uniforms:i,postProcesses:r.postProcesses})||this).sourceRevision_=-1,n.verticesBuffer_=new fl(34962,35048),n.hitVerticesBuffer_=new fl(34962,35048),n.indicesBuffer_=new fl(34963,35048),n.program_=n.helper.getProgram(r.fragmentShader,r.vertexShader),n.hitDetectionEnabled_=!(!r.hitFragmentShader||!r.hitVertexShader),n.hitProgram_=n.hitDetectionEnabled_&&n.helper.getProgram(r.hitFragmentShader,r.hitVertexShader);var s=r.attributes?r.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:El.FLOAT}})):[];n.attributes=[{name:"a_position",size:2,type:El.FLOAT},{name:"a_index",size:1,type:El.FLOAT}].concat(s),n.hitDetectionAttributes=[{name:"a_position",size:2,type:El.FLOAT},{name:"a_index",size:1,type:El.FLOAT},{name:"a_hitColor",size:4,type:El.FLOAT},{name:"a_featureUid",size:1,type:El.FLOAT}].concat(s),n.customAttributes=r.attributes?r.attributes:[],n.previousExtent_=[1/0,1/0,-1/0,-1/0],n.currentTransform_=a,n.renderTransform_=[1,0,0,1,0,0],n.invertRenderTransform_=[1,0,0,1,0,0],n.renderInstructions_=new Float32Array(0),n.hitRenderInstructions_=new Float32Array(0),n.hitRenderTarget_=n.hitDetectionEnabled_&&new Il(n.helper),n.worker_=new Worker(Pf),n.worker_.addEventListener("message",function(t){var e=t.data;if(e.type===Sf){var r=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=r,Pt(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):this.renderInstructions_=new Float32Array(t.data.renderInstructions),this.getLayer().changed()}}.bind(n)),n.featureCache_={},n.featureCount_=0;var u=n.getLayer().getSource();return n.sourceListenKeys_=[W(u,oc,n.handleSourceFeatureAdded_,n),W(u,ac,n.handleSourceFeatureChanged_,n),W(u,uc,n.handleSourceFeatureDelete_,n),W(u,sc,n.handleSourceFeatureClear_,n)],u.forEachFeature(function(t){this.featureCache_[o(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}.bind(n)),n}return Rf(e,t),e.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[o(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[o(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var e=t.feature;delete this.featureCache_[o(e)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e),this.helper.finalizeDraw(t);var r=this.helper.getCanvas(),n=t.layerStatesArray[t.layerIndex].opacity;return n!==parseFloat(r.style.opacity)&&(r.style.opacity=String(n)),this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),r},e.prototype.prepareFrame=function(t){var e=this.getLayer(),r=e.getSource(),n=t.viewState,i=!t.viewHints[va]&&!t.viewHints[_a],o=!$t(this.previousExtent_,t.extent),a=this.sourceRevision_<r.getRevision();if(a&&(this.sourceRevision_=r.getRevision()),i&&(o||a)){var s=n.projection,u=n.resolution,l=e instanceof xf?e.getRenderBuffer():0,h=zt(t.extent,l*u);r.loadFeatures(h,u,s),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),wt(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var e=[1,0,0,1,0,0];this.helper.makeProjectionTransform(t,e);var r,n,i=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===i||(this.renderInstructions_=new Float32Array(i)),this.hitDetectionEnabled_){var o=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===o||(this.hitRenderInstructions_=new Float32Array(o))}var a,s,u,l=[],h=[],c=0,p=0;for(var f in this.featureCache_)if((n=(r=this.featureCache_[f]).geometry)&&n.getType()===yt.POINT){l[0]=n.getFlatCoordinates()[0],l[1]=n.getFlatCoordinates()[1],Tt(e,l),s=p+6,u=void 0,(u=h||[])[0]=Math.floor(s/256/256/256)/255,u[1]=Math.floor(s/256/256)%256/255,u[2]=Math.floor(s/256)%256/255,u[3]=s%256/255,a=u,this.renderInstructions_[c++]=l[0],this.renderInstructions_[c++]=l[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[p++]=l[0],this.hitRenderInstructions_[p++]=l[1],this.hitRenderInstructions_[p++]=a[0],this.hitRenderInstructions_[p++]=a[1],this.hitRenderInstructions_[p++]=a[2],this.hitRenderInstructions_[p++]=a[3],this.hitRenderInstructions_[p++]=Number(f));for(var d=void 0,g=0;g<this.customAttributes.length;g++)d=this.customAttributes[g].callback(r.feature,r.properties),this.renderInstructions_[c++]=d,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[p++]=d)}var y={type:Sf,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(y.projectionTransform=e,this.worker_.postMessage(y,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var m={type:Sf,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};m.projectionTransform=e,m.hitDetection=!0,this.worker_.postMessage(m,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){if(lt(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var o=Tt(e.coordinateToPixelTransform,t.slice()),a=this.hitRenderTarget_.readPixel(o[0]/2,o[1]/2),s=function(t){var e=0;return e+=Math.round(256*t[0]*256*256*255),e+=Math.round(256*t[1]*256*255),e+=Math.round(256*t[2]*255),e+=Math.round(255*t[3])}([a[0]/255,a[1]/255,a[2]/255,a[3]/255]),u=this.hitRenderInstructions_[s],l=Math.floor(u).toString(),h=this.getLayer().getSource().getFeatureByUid(l);return h?n(h,this.getLayer()):void 0}},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach((function(t){X(t)})),this.sourceListenKeys_=null,t.prototype.disposeInternal.call(this)},e}(Ef),If={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Lf=[If.FILL],Mf=[If.STROKE],Ff=[If.BEGIN_PATH],Af=[If.CLOSE_PATH],kf=If,Nf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jf=function(t){function e(e,r,n,i){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=r,o.pixelRatio=i,o.maxLineWidth=0,o.resolution=n,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return Nf(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatCoordinates=function(t,e,r,n,i,o){var a=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(e+=n);var u,l,h,c=t[e],p=t[e+1],f=this.tmpCoordinate_,d=!0;for(u=e+n;u<r;u+=n)f[0]=t[u],f[1]=t[u+1],(h=qt(s,f))!==l?(d&&(this.coordinates[a++]=c,this.coordinates[a++]=p),this.coordinates[a++]=f[0],this.coordinates[a++]=f[1],d=!1):h===At?(this.coordinates[a++]=f[0],this.coordinates[a++]=f[1],d=!1):d=!0,c=f[0],p=f[1],l=h;return(i&&d||u===e+n)&&(this.coordinates[a++]=c,this.coordinates[a++]=p),a},e.prototype.drawCustomCoordinates_=function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o],u=this.appendFlatCoordinates(t,e,s,n,!1,!1);i.push(u),e=s}return e},e.prototype.drawCustom=function(t,e,r){this.beginGeometry(t,e);var n,i,o,a,s,u=t.getType(),l=t.getStride(),h=this.coordinates.length;if(u==yt.MULTI_POLYGON){n=t.getOrientedFlatCoordinates(),a=[];var c=t.getEndss();s=0;for(var p=0,f=c.length;p<f;++p){var d=[];s=this.drawCustomCoordinates_(n,s,c[p],l,d),a.push(d)}this.instructions.push([kf.CUSTOM,h,a,t,r,ln])}else u==yt.POLYGON||u==yt.MULTI_LINE_STRING?(o=[],n=u==yt.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),s=this.drawCustomCoordinates_(n,0,t.getEnds(),l,o),this.instructions.push([kf.CUSTOM,h,o,t,r,un])):u==yt.LINE_STRING||u==yt.MULTI_POINT?(n=t.getFlatCoordinates(),i=this.appendFlatCoordinates(n,0,n.length,l,!1,!1),this.instructions.push([kf.CUSTOM,h,i,t,r,sn])):u==yt.POINT&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),i=this.coordinates.length,this.instructions.push([kf.CUSTOM,h,i,t,r]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){var r=t.getExtent();this.beginGeometryInstruction1_=[kf.BEGIN_GEOMETRY,e,0,r],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[kf.BEGIN_GEOMETRY,e,0,r],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var r,n,i=e.length,o=-1;for(t=0;t<i;++t)(n=(r=e[t])[0])==kf.END_GEOMETRY?o=t:n==kf.BEGIN_GEOMETRY&&(r[2]=t,y(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var r=this.state;if(t){var n=t.getColor();r.fillStyle=Fi(n||"#000")}else r.fillStyle=void 0;if(e){var i=e.getColor();r.strokeStyle=Fi(i||"#000");var o=e.getLineCap();r.lineCap=void 0!==o?o:"round";var a=e.getLineDash();r.lineDash=a?a.slice():Ji;var s=e.getLineDashOffset();r.lineDashOffset=s||0;var u=e.getLineJoin();r.lineJoin=void 0!==u?u:"round";var l=e.getWidth();r.lineWidth=void 0!==l?l:1;var h=e.getMiterLimit();r.miterLimit=void 0!==h?h:10,r.lineWidth>this.maxLineWidth&&(this.maxLineWidth=r.lineWidth,this.bufferedMaxExtent_=null)}else r.strokeStyle=void 0,r.lineCap=void 0,r.lineDash=null,r.lineDashOffset=void 0,r.lineJoin=void 0,r.lineWidth=void 0,r.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,r=[kf.SET_FILL_STYLE,e];return"string"!=typeof e&&r.push(!0),r},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[kf.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var r=t.fillStyle;"string"==typeof r&&t.currentFillStyle==r||(void 0!==r&&this.instructions.push(e.call(this,t)),t.currentFillStyle=r)},e.prototype.updateStrokeStyle=function(t,e){var r=t.strokeStyle,n=t.lineCap,i=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=r||t.currentLineCap!=n||i!=t.currentLineDash&&!_(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=u)&&(void 0!==r&&e.call(this,t),t.currentStrokeStyle=r,t.currentLineCap=n,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=s,t.currentMiterLimit=u)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[kf.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Ut(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;zt(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Mi),Gf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Df=function(t){function e(e,r,n,i){var o=t.call(this,e,r,n,i)||this;return o.declutterGroups_=null,o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o}return Gf(e,t),e.prototype.drawCoordinates_=function(t,e,r,n){return this.appendFlatCoordinates(t,e,r,n,!1,!1)},e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var r=t.getFlatCoordinates(),n=t.getStride(),i=this.coordinates.length,o=this.drawCoordinates_(r,0,r.length,n);this.instructions.push([kf.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.hitDetectionInstructions.push([kf.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var r=t.getFlatCoordinates(),n=t.getStride(),i=this.coordinates.length,o=this.drawCoordinates_(r,0,r.length,n);this.instructions.push([kf.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.hitDetectionInstructions.push([kf.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var r=t.getAnchor(),n=t.getSize(),i=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),a=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=r[0],this.anchorY_=r[1],this.declutterGroups_=e,this.hitDetectionImage_=i,this.image_=o,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0]},e}(jf),zf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Uf=function(t){function e(e,r,n,i){return t.call(this,e,r,n,i)||this}return zf(e,t),e.prototype.drawFlatCoordinates_=function(t,e,r,n){var i=this.coordinates.length,o=this.appendFlatCoordinates(t,e,r,n,!1,!1),a=[kf.MOVE_TO_LINE_TO,i,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),r},e.prototype.drawLineString=function(t,e){var r=this.state,n=r.strokeStyle,i=r.lineWidth;if(void 0!==n&&void 0!==i){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],Ff);var o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(Mf),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var r=this.state,n=r.strokeStyle,i=r.lineWidth;if(void 0!==n&&void 0!==i){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],Ff);for(var o=t.getEnds(),a=t.getFlatCoordinates(),s=t.getStride(),u=0,l=0,h=o.length;l<h;++l)u=this.drawFlatCoordinates_(a,u,o[l],s);this.hitDetectionInstructions.push(Mf),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Mf),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Mf),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(Ff)},e}(jf),Bf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yf=function(t){function e(e,r,n,i){return t.call(this,e,r,n,i)||this}return Bf(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,r,n){var i=this.state,o=void 0!==i.fillStyle,a=void 0!==i.strokeStyle,s=r.length;this.instructions.push(Ff),this.hitDetectionInstructions.push(Ff);for(var u=0;u<s;++u){var l=r[u],h=this.coordinates.length,c=this.appendFlatCoordinates(t,e,l,n,!0,!a),p=[kf.MOVE_TO_LINE_TO,h,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),a&&(this.instructions.push(Af),this.hitDetectionInstructions.push(Af)),e=l}return o&&(this.instructions.push(Lf),this.hitDetectionInstructions.push(Lf)),a&&(this.instructions.push(Mf),this.hitDetectionInstructions.push(Mf)),e},e.prototype.drawCircle=function(t,e){var r=this.state,n=r.fillStyle,i=r.strokeStyle;if(void 0!==n||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([kf.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);var o=t.getFlatCoordinates(),a=t.getStride(),s=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,a,!1,!1);var u=[kf.CIRCLE,s];this.instructions.push(Ff,u),this.hitDetectionInstructions.push(Ff,u),void 0!==r.fillStyle&&(this.instructions.push(Lf),this.hitDetectionInstructions.push(Lf)),void 0!==r.strokeStyle&&(this.instructions.push(Mf),this.hitDetectionInstructions.push(Mf)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var r=this.state,n=r.fillStyle,i=r.strokeStyle;if(void 0!==n||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([kf.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);var o=t.getEnds(),a=t.getOrientedFlatCoordinates(),s=t.getStride();this.drawFlatCoordinatess_(a,0,o,s),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var r=this.state,n=r.fillStyle,i=r.strokeStyle;if(void 0!==n||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([kf.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([kf.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);for(var o=t.getEndss(),a=t.getOrientedFlatCoordinates(),s=t.getStride(),u=0,l=0,h=o.length;l<h;++l)u=this.drawFlatCoordinatess_(a,u,o[l],s);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var r=this.coordinates,n=0,i=r.length;n<i;++n)r[n]=nn(r[n],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(jf);function Vf(t,e,r,n,i){var o,a,s,u,l,h,c,p,f,d=r,g=r,y=0,m=0,v=r;for(o=r;o<n;o+=i){var _=e[o],b=e[o+1];void 0!==u&&(p=_-u,f=b-l,s=Math.sqrt(p*p+f*f),void 0!==h&&(m+=a,Math.acos((h*p+c*f)/(a*s))>t&&(m>y&&(y=m,d=v,g=o),m=0,v=o-i)),a=s,h=p,c=f),u=_,l=b}return(m+=s)>y?[v,o]:[d,g]}var Wf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qf={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Xf={Circle:Yf,Default:jf,Image:Df,LineString:Uf,Polygon:Yf,Text:function(t){function e(e,r,n,i){var o=t.call(this,e,r,n,i)||this;return o.declutterGroups_,o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o}return Wf(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var r=this.textFillState_,n=this.textStrokeState_,i=this.textState_;if(""!==this.text_&&i&&(r||n)){var o,a,s=this.coordinates.length,u=t.getType(),l=null,h=2,c=t.getStride();if(i.placement===ch){if(!ye(this.getBufferedMaxExtent(),t.getExtent()))return;var p=void 0;if(l=t.getFlatCoordinates(),u==yt.LINE_STRING)p=[l.length];else if(u==yt.MULTI_LINE_STRING)p=t.getEnds();else if(u==yt.POLYGON)p=t.getEnds().slice(0,1);else if(u==yt.MULTI_POLYGON){var f=t.getEndss();for(p=[],o=0,a=f.length;o<a;++o)p.push(f[o][0])}this.beginGeometry(t,e);for(var d=i.textAlign,g=0,y=void 0,m=0,v=p.length;m<v;++m){if(null==d){var _=Vf(i.maxAngle,l,g,p[m],c);g=_[0],y=_[1]}else y=p[m];for(o=g;o<y;o+=c)this.coordinates.push(l[o],l[o+1]);h=this.coordinates.length,g=p[m];var b=this.declutterGroups_?0===m?this.declutterGroups_[0]:[].concat(this.declutterGroups_[0]):null;this.drawChars_(s,h,b),s=h}this.endGeometry(e)}else{var x=null;switch(i.overflow||(x=[]),u){case yt.POINT:case yt.MULTI_POINT:h=(l=t.getFlatCoordinates()).length;break;case yt.LINE_STRING:l=t.getFlatMidpoint();break;case yt.CIRCLE:l=t.getCenter();break;case yt.MULTI_LINE_STRING:c=2,h=(l=t.getFlatMidpoints()).length;break;case yt.POLYGON:l=t.getFlatInteriorPoint(),i.overflow||x.push(l[2]/this.resolution),c=3;break;case yt.MULTI_POLYGON:var w=t.getFlatInteriorPoints();for(l=[],o=0,a=w.length;o<a;o+=3)i.overflow||x.push(w[o+2]/this.resolution),l.push(w[o],w[o+1]);if(c=2,0==(h=l.length))return}h=this.appendFlatCoordinates(l,0,h,c,!1,!1),this.saveTextStates_(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var S=i.padding;if(S!=$i&&(i.scale[0]<0||i.scale[1]<0)){var T=i.padding[0],E=i.padding[1],C=i.padding[2],P=i.padding[3];i.scale[0]<0&&(E=-E,P=-P),i.scale[1]<0&&(T=-T,C=-C),S=[T,E,C,P]}var R=this.pixelRatio;this.instructions.push([kf.DRAW_IMAGE,s,h,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,S==$i?$i:S.map((function(t){return t*R})),!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,x]);var O=1/R;this.hitDetectionInstructions.push([kf.DRAW_IMAGE,s,h,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[O,O],NaN,S,!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,x]),this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,r=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var i=this.textKey_;i in this.textStates||(this.textStates[i]={font:e.font,textAlign:e.textAlign||"center",textBaseline:e.textBaseline||"middle",scale:e.scale});var o=this.fillKey_;r&&(o in this.fillStates||(this.fillStates[o]={fillStyle:r.fillStyle}))},e.prototype.drawChars_=function(t,e,r){var n=this.textStrokeState_,i=this.textState_,o=this.strokeKey_,a=this.textKey_,s=this.fillKey_;this.saveTextStates_();var u=this.pixelRatio,l=qf[i.textBaseline],h=this.textOffsetY_*u,c=this.text_,p=n?n.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([kf.DRAW_CHARS,t,e,l,r,i.overflow,s,i.maxAngle,u,h,o,p*u,c,a,1]),this.hitDetectionInstructions.push([kf.DRAW_CHARS,t,e,l,r,i.overflow,s,i.maxAngle,1,h,o,p,c,a,1/u])},e.prototype.setTextStyle=function(t,e){var r,n,i;if(t){this.declutterGroups_=e;var a=t.getFill();a?((n=this.textFillState_)||(n={},this.textFillState_=n),n.fillStyle=Fi(a.getColor()||"#000")):(n=null,this.textFillState_=n);var s=t.getStroke();if(s){(i=this.textStrokeState_)||(i={},this.textStrokeState_=i);var u=s.getLineDash(),l=s.getLineDashOffset(),h=s.getWidth(),c=s.getMiterLimit();i.lineCap=s.getLineCap()||"round",i.lineDash=u?u.slice():Ji,i.lineDashOffset=void 0===l?0:l,i.lineJoin=s.getLineJoin()||"round",i.lineWidth=void 0===h?1:h,i.miterLimit=void 0===c?10:c,i.strokeStyle=Fi(s.getColor()||"#000")}else i=null,this.textStrokeState_=i;r=this.textState_;var p=t.getFont()||"10px sans-serif";ao(p);var f=t.getScaleArray();r.overflow=t.getOverflow(),r.font=p,r.maxAngle=t.getMaxAngle(),r.placement=t.getPlacement(),r.textAlign=t.getTextAlign(),r.textBaseline=t.getTextBaseline()||"middle",r.backgroundFill=t.getBackgroundFill(),r.backgroundStroke=t.getBackgroundStroke(),r.padding=t.getPadding()||$i,r.scale=void 0===f?[1,1]:f;var d=t.getOffsetX(),g=t.getOffsetY(),y=t.getRotateWithView(),m=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===d?0:d,this.textOffsetY_=void 0===g?0:g,this.textRotateWithView_=void 0!==y&&y,this.textRotation_=void 0===m?0:m,this.strokeKey_=i?("string"==typeof i.strokeStyle?i.strokeStyle:o(i.strokeStyle))+i.lineCap+i.lineDashOffset+"|"+i.lineWidth+i.lineJoin+i.miterLimit+"["+i.lineDash.join()+"]":"",this.textKey_=r.font+r.scale+(r.textAlign||"?")+(r.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+o(n.fillStyle):""}else this.text_=""},e}(jf)},Zf=function(){function t(t,e,r,n,i){this.declutter_=i,this.declutterGroups_=null,this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=r,this.buildersByZIndex_={}}return t.prototype.addDeclutter=function(t){var e=null;return this.declutter_&&(t?(e=this.declutterGroups_)[0][0]++:(e=[[1]],this.declutterGroups_=e)),e},t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var r=this.buildersByZIndex_[e];for(var n in r){var i=r[n].finish();t[e][n]=i}}return t},t.prototype.getBuilder=function(t,e){var r=void 0!==t?t.toString():"0",n=this.buildersByZIndex_[r];void 0===n&&(n={},this.buildersByZIndex_[r]=n);var i=n[e];void 0===i&&(i=new(0,Xf[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=i);return i},t}();function Kf(t,e,r,n,i,o,a,s,u,l,h,c){var p,f=[];if(c){var d=Dr(t,e,r,n,c,[t[e],t[e+1]]);p=d[0]>d[d.length-n]}else p=t[e]>t[r-n];for(var g,y,m=i.length,v=t[e],_=t[e+1],b=t[e+=n],x=t[e+1],w=0,S=Math.sqrt(Math.pow(b-v,2)+Math.pow(x-_,2)),T=!1,E=0;E<m;++E){for(var C=i[g=p?m-E-1:E],P=s*u(l,C,h),R=o+P/2;e<r-n&&w+S<R;)v=b,_=x,b=t[e+=n],x=t[e+1],w+=S,S=Math.sqrt(Math.pow(b-v,2)+Math.pow(x-_,2));var O=R-w,I=Math.atan2(x-_,b-v);if(p&&(I+=I>0?-Math.PI:Math.PI),void 0!==y){var L=I-y;if(T=T||0!==L,L+=L>Math.PI?-2*Math.PI:L<-Math.PI?2*Math.PI:0,Math.abs(L)>a)return null}y=I;var M=O/S,F=Ie(v,b,M),A=Ie(_,x,M);f[g]=[F,A,P/2,I,C],o+=P}return T?f:[[f[0][0],f[0][1],f[0][2],f[0][3],i]]}function Hf(t,e,r,n){for(var i=t[e],o=t[e+1],a=0,s=e+n;s<r;s+=n){var u=t[s],l=t[s+1];a+=Math.sqrt((u-i)*(u-i)+(l-o)*(l-o)),i=u,o=l}return a}var Jf=[1/0,1/0,-1/0,-1/0],$f=[1,0,0,1,0,0],Qf=[],td=[],ed=[],rd=[],nd=function(){function t(t,e,r,n,i){this.overlaps=r,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.declutterItems=[],this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderBuffer_=i,this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,r,n){var i=t+e+r+n;if(this.labels_[i])return this.labels_[i];var o=n?this.strokeStates[n]:null,a=r?this.fillStates[r]:null,s=this.textStates[e],u=this.pixelRatio,l=[s.scale[0]*u,s.scale[1]*u],h=qf[s.textAlign||"center"],c=n&&o.lineWidth?o.lineWidth:0,p=t.split("\n"),f=p.length,d=[],g=function(t,e,r){for(var n=e.length,i=0,o=0;o<n;++o){var a=lo(t,e[o]);i=Math.max(i,a),r.push(a)}return i}(s.font,p,d),y=so(s.font),m=g+c,v=[],_=(m+2)*l[0],b=(y*f+c)*l[1],x={width:_<0?Math.floor(_):Math.ceil(_),height:b<0?Math.floor(b):Math.ceil(b),contextInstructions:v};(1==l[0]&&1==l[1]||v.push("scale",l),v.push("font",s.font),n)&&(v.push("strokeStyle",o.strokeStyle),v.push("lineWidth",c),v.push("lineCap",o.lineCap),v.push("lineJoin",o.lineJoin),v.push("miterLimit",o.miterLimit),(Di?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(v.push("setLineDash",[o.lineDash]),v.push("lineDashOffset",o.lineDashOffset)));r&&v.push("fillStyle",a.fillStyle),v.push("textBaseline","middle"),v.push("textAlign","center");var w,S=.5-h,T=h*m+S*c;if(n)for(w=0;w<f;++w)v.push("strokeText",[p[w],T+S*d[w],.5*(c+y)+w*y]);if(r)for(w=0;w<f;++w)v.push("fillText",[p[w],T+S*d[w],.5*(c+y)+w*y]);return this.labels_[i]=x,x},t.prototype.replayTextBackground_=function(t,e,r,n,i,o,a,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,r),t.lineTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],s&&(t.fillStyle=o[1]),this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())},t.prototype.replayImageOrLabel_=function(t,e,r,n,i,o,a,s,u,l,h,c,p,f,d,g,y,m,v){var _=m||v;r-=o*=f[0],n-=a*=f[1];var b=g+h>i.width?i.width-h:g,x=u+c>i.height?i.height-c:u,w=y[3]+b*f[0]+y[1],S=y[0]+x*f[1]+y[2],T=r-y[3],E=n-y[0];(_||0!==p)&&(Qf[0]=T,rd[0]=T,Qf[1]=E,td[1]=E,td[0]=T+w,ed[0]=td[0],ed[1]=E+S,rd[1]=ed[1]);var C=null;if(0!==p){var P=r+o,R=n+a;C=Ct($f,P,R,1,1,p,-P,-R),Tt($f,Qf),Tt($f,td),Tt($f,ed),Tt($f,rd),Zt(Math.min(Qf[0],td[0],ed[0],rd[0]),Math.min(Qf[1],td[1],ed[1],rd[1]),Math.max(Qf[0],td[0],ed[0],rd[0]),Math.max(Qf[1],td[1],ed[1],rd[1]),Jf)}else Zt(T,E,T+w,E+S,Jf);var O=0,I=0;if(s){var L=this.renderBuffer_;L[0]=Math.max(L[0],ge(Jf)),O=L[0],L[1]=Math.max(L[1],ce(Jf)),I=L[1]}var M=t.canvas,F=v?v[2]*f[0]/2:0,A=Jf[0]-F<=(M.width+O)/e&&Jf[2]+F>=-O/e&&Jf[1]-F<=(M.height+I)/e&&Jf[3]+F>=-I/e;if(d&&(r=Math.round(r),n=Math.round(n)),s){if(!A&&1==s[0])return!1;var k=A?[t,C?C.slice(0):null,l,i,h,c,b,x,r,n,f,Jf.slice()]:null;k&&(_&&k.push(m,v,Qf.slice(0),td.slice(0),ed.slice(0),rd.slice(0)),s.push(k))}else A&&(_&&this.replayTextBackground_(t,Qf,td,ed,rd,m,v,!1),po(t,C,l,i,h,c,b,x,r,n,f));return!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=Tt(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;t.save(),t.translate(e[0]%r,e[1]%r),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.renderDeclutter=function(t,e,r,n){for(var i=[],o=1,a=t.length;o<a;++o){var s=(c=t[o])[11];i.push({minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:e})}n||(n=new nc.a(9));var u=!1;for(o=0,a=i.length;o<a;++o)if(n.collides(i[o])){u=!0;break}if(!u){n.load(i);for(var l=1,h=t.length;l<h;++l){var c,p=(c=t[l])[0],f=p.globalAlpha;f!==r&&(p.globalAlpha=r),c.length>12&&this.replayTextBackground_(c[0],c[14],c[15],c[16],c[17],c[12],c[13],!0),po.apply(void 0,c),f!==r&&(p.globalAlpha=f)}}return t.length=1,n},t.prototype.drawLabelWithPointPlacement_=function(t,e,r,n){var i=this.textStates[e],o=this.createLabel(t,e,n,r),a=this.strokeStates[r],s=this.pixelRatio,u=qf[i.textAlign||"center"],l=qf[i.textBaseline||"middle"],h=a&&a.lineWidth?a.lineWidth:0;return{label:o,anchorX:u*(o.width/s-2*i.scale[0])+2*(.5-u)*h,anchorY:l*o.height/s+2*(.5-l)*h}},t.prototype.execute_=function(t,e,r,n,i,o,a){var s,u,l;this.declutterItems.length=0,this.pixelCoordinates_&&_(r,this.renderedTransform_)?s=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),s=Gr(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_),u=this.renderedTransform_,l=r,u[0]=l[0],u[1]=l[1],u[2]=l[2],u[3]=l[3],u[4]=l[4],u[5]=l[5]);for(var h,c,p,f,d,g,y,m,v,b,x,w,S,T,E,C,P,R=0,O=n.length,I=0,L=0,M=0,F=null,A=null,k=this.coordinateCache_,N=this.viewRotation_,j=Math.round(1e12*Math.atan2(-r[1],r[0]))/1e12,G={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:N},D=this.instructions!=n||this.overlaps?0:200;R<O;){var z=n[R];switch(z[0]){case kf.BEGIN_GEOMETRY:(E=z[1]).getGeometry()?void 0===a||ye(a,z[3])?++R:R=z[2]+1:R=z[2];break;case kf.BEGIN_PATH:L>D&&(this.fill_(t),L=0),M>D&&(t.stroke(),M=0),L||M||(t.beginPath(),f=NaN,d=NaN),++R;break;case kf.CIRCLE:var U=s[I=z[1]],B=s[I+1],Y=s[I+2]-U,V=s[I+3]-B,W=Math.sqrt(Y*Y+V*V);t.moveTo(U+W,B),t.arc(U,B,W,0,2*Math.PI,!0),++R;break;case kf.CLOSE_PATH:t.closePath(),++R;break;case kf.CUSTOM:I=z[1],h=z[2];var q=z[3],X=z[4],Z=6==z.length?z[5]:void 0;G.geometry=q,G.feature=E,R in k||(k[R]=[]);var K=k[R];Z?Z(s,I,h,2,K):(K[0]=s[I],K[1]=s[I+1],K.length=2),X(K,G),++R;break;case kf.DRAW_IMAGE:I=z[1],h=z[2],b=z[3],c=z[4],p=z[5],v=o?null:z[6];var H=z[7],J=z[8],$=z[9],Q=z[10],tt=z[11],et=z[12],rt=z[13],nt=z[14];if(!b&&z.length>=19){x=z[18],w=z[19],S=z[20],T=z[21];var it=this.drawLabelWithPointPlacement_(x,w,S,T);b=it.label,z[3]=b;var ot=z[22];c=(it.anchorX-ot)*this.pixelRatio,z[4]=c;var at=z[23];p=(it.anchorY-at)*this.pixelRatio,z[5]=p,H=b.height,z[7]=H,nt=b.width,z[14]=nt}var st=void 0;z.length>24&&(st=z[24]);var ut=void 0,lt=void 0,ht=void 0;z.length>16?(ut=z[15],lt=z[16],ht=z[17]):(ut=$i,lt=!1,ht=!1),tt&&j?et+=N:tt||j||(et-=N);for(var ct=0,pt=0;I<h;I+=2)if(!(st&&st[ct++]<nt/this.pixelRatio)){if(v){var ft=Math.floor(pt);m=v.length<ft+1?[v[0][0]]:v[ft]}(Lt=this.replayImageOrLabel_(t,e,s[I],s[I+1],b,c,p,m,H,J,$,Q,et,rt,i,nt,ut,lt?F:null,ht?A:null))&&m&&v[v.length-1]!==m&&v.push(m),m&&(m.length-1===m[0]&&this.declutterItems.push(this,m,E),pt+=1/m[0])}++R;break;case kf.DRAW_CHARS:var dt=z[1],gt=z[2],yt=z[3];m=o?null:z[4];var mt=z[5];T=z[6];var vt=z[7],_t=z[8],bt=z[9];S=z[10];var xt=z[11];x=z[12],w=z[13];var wt=[z[14],z[14]],St=this.textStates[w],Tt=St.font,Et=[St.scale[0]*_t,St.scale[1]*_t],Ct=void 0;Tt in this.widths_?Ct=this.widths_[Tt]:(Ct={},this.widths_[Tt]=Ct);var Pt=Hf(s,dt,gt,2),Rt=Math.abs(Et[0])*ho(Tt,x,Ct);if(mt||Rt<=Pt){var Ot=this.textStates[w].textAlign,It=Kf(s,dt,gt,2,x,(Pt-Rt)*qf[Ot],vt,Math.abs(Et[0]),ho,Tt,Ct,j?0:this.viewRotation_);if(It){var Lt=!1,Mt=void 0,Ft=void 0,At=void 0,kt=void 0,Nt=void 0;if(S)for(Mt=0,Ft=It.length;Mt<Ft;++Mt)At=(Nt=It[Mt])[4],kt=this.createLabel(At,w,"",S),c=Nt[2]+xt,p=yt*kt.height+2*(.5-yt)*xt*Et[1]/Et[0]-bt,Lt=this.replayImageOrLabel_(t,e,Nt[0],Nt[1],kt,c,p,m,kt.height,1,0,0,Nt[3],wt,!1,kt.width,$i,null,null)||Lt;if(T)for(Mt=0,Ft=It.length;Mt<Ft;++Mt)At=(Nt=It[Mt])[4],kt=this.createLabel(At,w,T,""),c=Nt[2],p=yt*kt.height-bt,Lt=this.replayImageOrLabel_(t,e,Nt[0],Nt[1],kt,c,p,m,kt.height,1,0,0,Nt[3],wt,!1,kt.width,$i,null,null)||Lt;Lt&&this.declutterItems.push(this,m,E)}}++R;break;case kf.END_GEOMETRY:if(void 0!==o){var jt=o(E=z[1]);if(jt)return jt}++R;break;case kf.FILL:D?L++:this.fill_(t),++R;break;case kf.MOVE_TO_LINE_TO:for(I=z[1],h=z[2],C=s[I],y=(P=s[I+1])+.5|0,(g=C+.5|0)===f&&y===d||(t.moveTo(C,P),f=g,d=y),I+=2;I<h;I+=2)g=(C=s[I])+.5|0,y=(P=s[I+1])+.5|0,I!=h-2&&g===f&&y===d||(t.lineTo(C,P),f=g,d=y);++R;break;case kf.SET_FILL_STYLE:F=z,this.alignFill_=z[2],L&&(this.fill_(t),L=0,M&&(t.stroke(),M=0)),t.fillStyle=z[1],++R;break;case kf.SET_STROKE_STYLE:A=z,M&&(t.stroke(),M=0),this.setStrokeStyle_(t,z),++R;break;case kf.STROKE:D?M++:t.stroke(),++R;break;default:++R}}L&&this.fill_(t),M&&t.stroke()},t.prototype.execute=function(t,e,r,n,i){this.viewRotation_=n,this.execute_(t,e,r,this.instructions,i,void 0,void 0)},t.prototype.executeHitDetection=function(t,e,r,n,i){return this.viewRotation_=r,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,i)},t}(),id=[wo,vo,xo,bo,So,_o],od=function(){function t(t,e,r,n,i,o){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=r,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(i)}return t.prototype.clip=function(t,e){var r=this.getClipCoords(e);t.beginPath(),t.moveTo(r[0],r[1]),t.lineTo(r[2],r[3]),t.lineTo(r[4],r[5]),t.lineTo(r[6],r[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var r=this.executorsByZIndex_[e];void 0===r&&(r={},this.executorsByZIndex_[e]=r);var n=t[e],i=[this.renderBuffer_||0,this.renderBuffer_||0];for(var o in n){var a=n[o];r[o]=new nd(this.resolution_,this.pixelRatio_,this.overlaps_,a,i)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var r=this.executorsByZIndex_[e],n=0,i=t.length;n<i;++n)if(t[n]in r)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i,o){var a=2*(n=Math.round(n))+1,s=Ct(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-r,-t[0],-t[1]);this.hitDetectionContext_||(this.hitDetectionContext_=Bi(a,a));var u,l=this.hitDetectionContext_;l.canvas.width!==a||l.canvas.height!==a?(l.canvas.width=a,l.canvas.height=a):l.clearRect(0,0,a,a),void 0!==this.renderBuffer_&&(te(u=[1/0,1/0,-1/0,-1/0],t),zt(u,e*(this.renderBuffer_+n),u));var h,c=function(t){if(void 0!==ad[t])return ad[t];for(var e=2*t+1,r=new Array(e),n=0;n<e;n++)r[n]=new Array(e);var i=t,o=0,a=0;for(;i>=o;)sd(r,t+i,t+o),sd(r,t+o,t+i),sd(r,t-o,t+i),sd(r,t-i,t+o),sd(r,t-i,t-o),sd(r,t-o,t-i),sd(r,t+o,t-i),sd(r,t+i,t-o),o++,2*((a+=1+2*o)-i)+1>0&&(a+=1-2*(i-=1));return ad[t]=r,r}(n);function p(t){for(var e=l.getImageData(0,0,a,a).data,r=0;r<a;r++)for(var n=0;n<a;n++)if(c[r][n]&&e[4*(n*a+r)+3]>0){var s=void 0;return(!o||h!=bo&&h!=So||-1!==o.indexOf(t))&&(s=i(t)),s||void l.clearRect(0,0,a,a)}}var d,g,y,m,v,_=Object.keys(this.executorsByZIndex_).map(Number);for(_.sort(f),d=_.length-1;d>=0;--d){var b=_[d].toString();for(y=this.executorsByZIndex_[b],g=id.length-1;g>=0;--g)if(void 0!==(m=y[h=id[g]])&&(v=m.executeHitDetection(l,s,r,p,u)))return v}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var r=e[0],n=e[1],i=e[2],o=e[3],a=[r,n,r,o,i,o,i,n];return Gr(a,0,8,2,t,a),a},t.prototype.isEmpty=function(){return P(this.executorsByZIndex_)},t.prototype.execute=function(t,e,r,n,i,o,a){var s=Object.keys(this.executorsByZIndex_).map(Number);s.sort(f),this.maxExtent_&&(t.save(),this.clip(t,r));var u,l,h,c,p,d,g=o||id;for(u=0,l=s.length;u<l;++u){var y=s[u].toString();for(p=this.executorsByZIndex_[y],h=0,c=g.length;h<c;++h){var m=g[h];if(void 0!==(d=p[m]))if(!a||m!=bo&&m!=So)d.execute(t,e,r,n,i);else{var v=a[y];v?v.push(d,r.slice(0)):a[y]=[d,r.slice(0)]}}}this.maxExtent_&&t.restore()},t}(),ad={0:[[!0]]};function sd(t,e,r){var n,i=Math.floor(t.length/2);if(e>=i)for(n=i;n<e;n++)t[n][r]=!0;else if(e<i)for(n=e+1;n<i;n++)t[n][r]=!0}function ud(t,e,r,n,i,o){for(var a=Object.keys(t).map(Number).sort(f),s=0,u=a.length;s<u;++s)for(var l=t[a[s].toString()],h=void 0,c=0,p=l.length;c<p;){var d=l[c++],g=l[c++];d.execute(e,1,g,r,i),d!==h&&d.declutterItems.length>0&&(h=d,o.push({items:d.declutterItems,opacity:n}))}}var ld=od;function hd(t,e,r,n,i,o,a){var s=Bi(t[0]/2,t[1]/2);s.imageSmoothingEnabled=!1;for(var u=s.canvas,l=new mo(s,.5,i,null,a),h=r.length,c=Math.floor(16777215/h),p={},d=1;d<=h;++d){var g=r[d-1],y=g.getStyleFunction()||n;if(n){var m=y(g,o);if(m){Array.isArray(m)||(m=[m]);for(var v="#"+("000000"+(d*c).toString(16)).slice(-6),_=0,b=m.length;_<b;++_){var x=m[_],w=x.clone(),S=w.getFill();S&&S.setColor(v);var T=w.getStroke();T&&T.setColor(v),w.setText(void 0);var E=x.getImage();if(E){var C=E.getImageSize();if(!C)continue;var P=document.createElement("canvas");P.width=C[0],P.height=C[1];var R=P.getContext("2d",{alpha:!1});R.fillStyle=v;var O=R.canvas;R.fillRect(0,0,O.width,O.height),Bi(C?C[0]:O.width,C?C[1]:O.height).drawImage(O,0,0),w.setImage(new rh({img:O,imgSize:C,anchor:E.getAnchor(),anchorXUnits:Bl,anchorYUnits:Bl,offset:E.getOrigin(),size:E.getSize(),opacity:E.getOpacity(),scale:E.getScale(),rotation:E.getRotation(),rotateWithView:E.getRotateWithView()}))}var I=Number(w.getZIndex());(A=p[I])||(A={},p[I]=A,A[yt.POLYGON]=[],A[yt.CIRCLE]=[],A[yt.LINE_STRING]=[],A[yt.POINT]=[]);var L=w.getGeometryFunction()(g);L&&ye(i,L.getExtent())&&A[L.getType().replace("Multi","")].push(L,w)}}}}for(var M=Object.keys(p).map(Number).sort(f),F=(d=0,M.length);d<F;++d){var A=p[M[d]];for(var k in A){var N=A[k];for(_=0,b=N.length;_<b;_+=2){l.setStyle(N[_+1]);for(var j=0,G=e.length;j<G;++j)l.setTransform(e[j]),l.drawGeometry(N[_])}}}return s.getImageData(0,0,u.width,u.height)}function cd(t,e,r){var n=[];if(r){var i=4*(Math.round(t[0]/2)+Math.round(t[1]/2)*r.width),o=r.data[i],a=r.data[i+1],s=r.data[i+2]+256*(a+256*o),u=Math.floor(16777215/e.length);s&&s%u==0&&n.push(e[s/u-1])}return n}var pd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fd=function(t){function e(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.animatingOrInteracting_,r.dirty_=!1,r.hitDetectionImageData_=null,r.renderedFeatures_=null,r.renderedRevision_=-1,r.renderedResolution_=NaN,r.renderedExtent_=[1/0,1/0,-1/0,-1/0],r.renderedRotation_,r.renderedCenter_=null,r.renderedProjection_=null,r.renderedRenderOrder_=null,r.replayGroup_=null,r.replayGroupChanged=!0,r.clipping=!0,r}return pd(e,t),e.prototype.useContainer=function(e,r,n){n<1&&(e=null),t.prototype.useContainer.call(this,e,r,n)},e.prototype.renderFrame=function(t,e){var r=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];!function(t,e,r){St(t,e,0,0,r,0,0)}(this.pixelTransform,1/r,1/r),Pt(this.inversePixelTransform,this.pixelTransform);var i=Rt(this.pixelTransform);this.useContainer(e,i,n.opacity);var o=this.context,a=o.canvas,s=this.replayGroup_;if(!s||s.isEmpty())return!this.containerReused&&a.width>0&&(a.width=0),this.container;var u=Math.round(t.size[0]*r),l=Math.round(t.size[1]*r);a.width!=u||a.height!=l?(a.width=u,a.height=l,a.style.transform!==i&&(a.style.transform=i)):this.containerReused||o.clearRect(0,0,u,l),this.preRender(o,t);var h=t.extent,c=t.viewState,p=c.center,f=c.resolution,d=c.projection,g=c.rotation,y=d.getExtent(),m=this.getLayer().getSource(),v=!1;if(n.extent&&this.clipping){var _=Nr(n.extent,d);(v=!Vt(_,t.extent)&&ye(_,t.extent))&&this.clipUnrotated(o,t,_)}var b=t.viewHints,x=!(b[va]||b[_a]),w=this.getRenderTransform(p,f,g,r,u,l,0),S=this.getLayer().getDeclutter()?{}:null;if(s.execute(o,1,w,g,x,void 0,S),m.getWrapX()&&d.canWrapX()&&!Vt(y,h)){for(var T=h[0],E=ge(y),C=0,P=void 0;T<y[0];){P=E*--C;var R=this.getRenderTransform(p,f,g,r,u,l,P);s.execute(o,1,R,g,x,void 0,S),T+=E}for(C=0,T=h[2];T>y[2];){P=E*++C;var O=this.getRenderTransform(p,f,g,r,u,l,P);s.execute(o,1,O,g,x,void 0,S),T-=E}}if(S){var I=t.viewHints;ud(S,o,g,1,!(I[va]||I[_a]),t.declutterItems)}v&&o.restore(),this.postRender(o,t);var L=n.opacity,M=this.container;return L!==parseFloat(M.style.opacity)&&(M.style.opacity=1===L?"":String(L)),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e,r){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var n=[this.context.canvas.width,this.context.canvas.height];Tt(this.pixelTransform,n);var i=this.renderedCenter_,o=this.renderedResolution_,a=this.renderedRotation_,s=this.renderedProjection_,u=this.renderedExtent_,l=this.getLayer(),h=[],c=n[0]/2,p=n[1]/2;h.push(this.getRenderTransform(i,o,a,.5,c,p,0).slice());var f=l.getSource(),d=s.getExtent();if(f.getWrapX()&&s.canWrapX()&&!Vt(d,u)){for(var g=u[0],y=ge(d),m=0,v=void 0;g<d[0];)v=y*--m,h.push(this.getRenderTransform(i,o,a,.5,c,p,v).slice()),g+=y;for(m=0,g=u[2];g>d[2];)v=y*++m,h.push(this.getRenderTransform(i,o,a,.5,c,p,v).slice()),g-=y}this.hitDetectionImageData_=hd(n,h,this.renderedFeatures_,l.getStyleFunction(),u,o,a)}e(cd(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){if(this.replayGroup_){var a=e.viewState.resolution,s=e.viewState.rotation,u=this.getLayer(),l={};return this.replayGroup_.forEachFeatureAtCoordinate(t,a,s,r,(function(t){var e=o(t);if(!(e in l))return l[e]=!0,n(t,u)}),u.getDeclutter()?i:null)}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),r=e.getSource();if(!r)return!1;var n=t.viewHints[va],i=t.viewHints[_a],o=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&n||!a&&i)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var s=t.extent,u=t.viewState,l=u.projection,h=u.resolution,c=t.pixelRatio,p=e.getRevision(),f=e.getRenderBuffer(),d=e.getRenderOrder();void 0===d&&(d=Io);var g=u.center.slice(),y=zt(s,f*h),m=[y.slice()],v=l.getExtent();if(r.getWrapX()&&l.canWrapX()&&!Vt(v,t.extent)){var _=ge(v),b=Math.max(ge(y)/2,_);y[0]=v[0]-b,y[2]=v[2]+b,cr(g,l);var x=be(m[0],l);x[0]<v[0]&&x[2]<v[2]?m.push([x[0]+_,x[1],x[2]+_,x[3]]):x[0]>v[0]&&x[2]>v[2]&&m.push([x[0]-_,x[1],x[2]-_,x[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&Vt(this.renderedExtent_,y))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var w,S=new Zf(Mo(h,c),y,h,c,e.getDeclutter()),T=Mr();if(T){for(var E=0,C=m.length;E<C;++E)r.loadFeatures(kr(m[E],l),h,T);w=Tr(T,l)}else for(E=0,C=m.length;E<C;++E)r.loadFeatures(m[E],h,l);var P=Lo(h,c),R=function(t){var r,n=t.getStyleFunction()||e.getStyleFunction();if(n&&(r=n(t,h)),r){var i=this.renderFeature(t,P,r,S,w);this.dirty_=this.dirty_||i}}.bind(this),O=kr(y,l),I=r.getFeaturesInExtent(O);d&&I.sort(d);for(E=0,C=I.length;E<C;++E)R(I[E]);this.renderedFeatures_=I;var L=S.finish(),M=new ld(y,h,c,r.getOverlaps(),L,e.getRenderBuffer());return this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=d,this.renderedExtent_=y,this.renderedCenter_=g,this.renderedProjection_=l,this.replayGroup_=M,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,r,n,i){if(!r)return!1;var o=!1;if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)o=Fo(n,t,r[a],e,this.boundHandleStyleImageChange_,i)||o;else o=Fo(n,t,r,e,this.boundHandleStyleImageChange_,i);return o},e}(fp),dd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gd=function(t){function e(e){var r=t.call(this,e)||this;return r.vectorRenderer_=new fd(e),r.layerImageRatio_=e.getImageRatio(),r.coordinateToVectorPixelTransform_=[1,0,0,1,0,0],r.renderedPixelToCoordinateTransform_=null,r}return dd(e,t),e.prototype.disposeInternal=function(){this.vectorRenderer_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getFeatures=function(t){if(this.vectorRenderer_){var e=Tt(this.coordinateToVectorPixelTransform_,Tt(this.renderedPixelToCoordinateTransform_,t.slice()));return this.vectorRenderer_.getFeatures(e)}return new Promise((function(t,e){t([])}))},e.prototype.handleFontsChanged=function(){this.vectorRenderer_.handleFontsChanged()},e.prototype.prepareFrame=function(t){var e=t.pixelRatio,r=t.viewState,n=r.resolution,i=t.viewHints,o=this.vectorRenderer_,a=t.extent;1!==this.layerImageRatio_&&ve(a=a.slice(0),this.layerImageRatio_);var s=ge(a)/n,u=ce(a)/n;if(!i[va]&&!i[_a]&&!me(a)){o.useContainer(null,null,1);var l=o.context,h=T({},t,{declutterItems:[],extent:a,size:[s,u],viewState:T({},t.viewState,{rotation:0})}),c=new Wc(a,n,e,l.canvas,(function(t){o.prepareFrame(h)&&o.replayGroupChanged&&(o.clipping=!1,o.renderFrame(h,null),ko(h,null),t())}));c.addEventListener(I,function(){if(c.getState()===Co){this.image_=c;var t=c.getResolution(),n=c.getPixelRatio(),i=t*e/n;this.renderedResolution=i,this.coordinateToVectorPixelTransform_=Ct(this.coordinateToVectorPixelTransform_,s/2,u/2,1/i,-1/i,0,-r.center[0],-r.center[1])}}.bind(this)),c.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_},e.prototype.preRender=function(){},e.prototype.postRender=function(){},e.prototype.forEachFeatureAtCoordinate=function(e,r,n,i,o){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,r,n,i,o):t.prototype.forEachFeatureAtCoordinate.call(this,e,r,n,i,o)},e}(gp),yd="image",md="hybrid",vd="vector",_d=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bd={image:[wo,vo,xo,bo,So],hybrid:[wo,xo],vector:[]},xd={image:[_o],hybrid:[bo,So,_o],vector:[wo,vo,xo,bo,So,_o]},wd=function(t){function e(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.dirty_=!1,r.renderedLayerRevision_,r.renderedPixelToCoordinateTransform_=null,r.renderedRotation_,r.renderTileImageQueue_={},r.tileListenerKeys_={},r.tmpTransform_=[1,0,0,1,0,0],r}return _d(e,t),e.prototype.prepareTile=function(t,e,r,n){var i,a=o(t),s=t.getState();return(s===fa&&t.hifi||s===da)&&a in this.tileListenerKeys_&&(X(this.tileListenerKeys_[a]),delete this.tileListenerKeys_[a]),s!==fa&&s!==da||(this.updateExecutorGroup_(t,e,r),this.tileImageNeedsRender_(t,e,r)&&(i=!0,n&&(this.renderTileImageQueue_[a]=t))),i},e.prototype.getTile=function(e,r,n,i){var a=i.pixelRatio,s=i.viewState,u=s.resolution,l=s.projection,h=this.getLayer(),c=h.getSource().getTile(e,r,n,a,l);if(c.getState()<fa){c.wantedResolution=u;var p=o(c);if(!(p in this.tileListenerKeys_)){var f=W(c,I,this.prepareTile.bind(this,c,a,l,!0));this.tileListenerKeys_[p]=f}}else{var d=i.viewHints;!!(d[va]||d[_a])&&c.wantedResolution||(c.wantedResolution=u),this.prepareTile(c,a,l,!1)&&h.getRenderMode()!==vd&&this.renderTileImage_(c,i)}return t.prototype.getTile.call(this,e,r,n,i)},e.prototype.isDrawableTile=function(e){var r=this.getLayer();return t.prototype.isDrawableTile.call(this,e)&&(r.getRenderMode()===vd?o(r)in e.executorGroups:e.hasContext(r))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(e){var r=this.getLayer().getRevision();return this.renderedLayerRevision_!=r&&(this.renderedTiles.length=0),this.renderedLayerRevision_=r,t.prototype.prepareFrame.call(this,e)},e.prototype.updateExecutorGroup_=function(t,e,r){var n=this.getLayer(),i=n.getRevision(),a=n.getRenderOrder()||null,s=t.wantedResolution,u=t.getReplayState(n);if(u.dirty||u.renderedResolution!==s||u.renderedRevision!=i||u.renderedRenderOrder!=a||u.renderedZ!==t.sourceZ){var l=n.getSource(),h=l.getTileGrid(),c=l.getTileGridForProjection(r).getTileCoordExtent(t.wrappedTileCoord),p=l.getSourceTiles(e,r,t),f=o(n);delete t.hitDetectionImageData[f],t.executorGroups[f]=[];for(var d=function(r,i){var o=p[r];if(o.getState()!=fa)return"continue";var d=o.tileCoord,y=h.getTileCoordExtent(d),m=pe(c,y),v=$t(y,m)?null:zt(m,n.getRenderBuffer()*s,g.tmpExtent);u.dirty=!1;var _=new Zf(0,m,s,e,n.getDeclutter()),b=Lo(s,e),x=function(t){var e,r=t.getStyleFunction()||n.getStyleFunction();if(r&&(e=r(t,s)),e){var i=this.renderFeature(t,b,e,_);this.dirty_=this.dirty_||i,u.dirty=u.dirty||i}},w=o.getFeatures();a&&a!==u.renderedRenderOrder&&w.sort(a);for(var S=0,T=w.length;S<T;++S){var E=w[S];v&&!ye(v,E.getGeometry().getExtent())||x.call(g,E)}var C=_.finish(),P=n.getRenderMode()!==vd&&n.getDeclutter()&&1===p.length?null:m,R=new ld(P,s,e,l.getOverlaps(),C,n.getRenderBuffer());t.executorGroups[f].push(R)},g=this,y=0,m=p.length;y<m;++y)d(y);u.renderedRevision=i,u.renderedZ=t.sourceZ,u.renderedRenderOrder=a,u.renderedResolution=s}},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,i){var a=e.viewState.resolution,s=e.viewState.rotation;r=null==r?0:r;var u,l,h,c=this.getLayer(),p=c.getDeclutter(),f=c.getSource().getTileGridForProjection(e.viewState.projection),d={},g=this.renderedTiles,y=function(){var e=g[l],h=Yt(f.getTileCoordExtent(e.wrappedTileCoord),t);if(!p&&!h)return"continue";for(var y=e.executorGroups[o(c)],m=0,v=y.length;m<v;++m){var _=y[m];u=u||_.forEachFeatureAtCoordinate(t,a,s,r,(function(t){if(h||i&&-1!==i.indexOf(t)){var e=t.getId();if(void 0===e&&(e=o(t)),!(e in d))return d[e]=!0,n(t,c)}}),c.getDeclutter()?i:null)}};for(l=0,h=g.length;l<h;++l)y();return u},e.prototype.getFeatures=function(t){return new Promise(function(e,r){for(var n,i=this.getLayer(),a=o(i),s=i.getSource(),u=this.renderedProjection,l=u.getExtent(),h=this.renderedResolution,c=s.getTileGridForProjection(u),p=Tt(this.renderedPixelToCoordinateTransform_,t.slice()),f=c.getTileCoordForCoordAndResolution(p,h),d=0,g=this.renderedTiles.length;d<g;++d)if(f.toString()===this.renderedTiles[d].tileCoord.toString()){if((n=this.renderedTiles[d]).getState()===fa&&n.hifi){var y=c.getTileCoordExtent(n.tileCoord);s.getWrapX()&&u.canWrapX()&&!Vt(l,y)&&cr(p,u);break}n=void 0}if(!n||n.loadingSourceTiles>0)e([]);else{var m=fe(c.getTileCoordExtent(n.wrappedTileCoord)),v=[(p[0]-m[0])/h,(m[1]-p[1])/h],_=n.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]),b=n.hitDetectionImageData[a];if(!b&&!this.animatingOrInteracting_){var x=za(c.getTileSize(c.getZForResolution(h))),w=[x[0]/2,x[1]/2],S=this.renderedRotation_;b=hd(x,[this.getRenderTransform(c.getTileCoordCenter(n.wrappedTileCoord),h,0,.5,w[0],w[1],0)],_,i.getStyleFunction(),c.getTileCoordExtent(n.wrappedTileCoord),n.getReplayState(i).renderedResolution,S),n.hitDetectionImageData[a]=b}e(cd(v,_,b))}}.bind(this))},e.prototype.handleFontsChanged=function(){E(this.renderTileImageQueue_);var t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderFrame=function(e,r){var n=e.viewHints,i=!(n[va]||n[_a]);this.renderQueuedTileImages_(i,e),t.prototype.renderFrame.call(this,e,r),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var a=this.getLayer(),s=a.getRenderMode();if(s===yd)return this.container;var u=a.getSource(),l=e.usedTiles[o(u)];for(var h in this.renderTileImageQueue_)l&&h in l||delete this.renderTileImageQueue_[h];for(var c=this.context,p=a.getDeclutter()?{}:null,f=xd[s],d=e.pixelRatio,g=e.viewState,y=g.center,m=g.resolution,v=g.rotation,_=e.size,b=Math.round(_[0]*d),x=Math.round(_[1]*d),w=this.renderedTiles,S=u.getTileGridForProjection(e.viewState.projection),T=[],E=[],C=w.length-1;C>=0;--C)for(var P=w[C],R=P.tileCoord,O=S.getTileCoordExtent(P.wrappedTileCoord),I=S.getTileCoordExtent(R,this.tmpExtent)[0]-O[0],L=wt(Et(this.inversePixelTransform.slice(),1/d,1/d),this.getRenderTransform(y,m,v,d,b,x,I)),M=P.executorGroups[o(a)],F=!1,A=0,k=M.length;A<k;++A){var N=M[A];if(N.hasExecutors(f)){var j=P.tileCoord[0],G=void 0;if(!p&&!F){G=N.getClipCoords(L),c.save();for(var D=0,z=T.length;D<z;++D){var U=T[D];j<E[D]&&(c.beginPath(),c.moveTo(G[0],G[1]),c.lineTo(G[2],G[3]),c.lineTo(G[4],G[5]),c.lineTo(G[6],G[7]),c.moveTo(U[6],U[7]),c.lineTo(U[4],U[5]),c.lineTo(U[2],U[3]),c.lineTo(U[0],U[1]),c.clip())}}N.execute(c,1,L,v,i,f,p),p||F||(c.restore(),T.push(G),E.push(j),F=!0)}}p&&ud(p,c,v,e.layerStatesArray[e.layerIndex].opacity,i,e.declutterItems);return this.container},e.prototype.renderQueuedTileImages_=function(t,e){for(var r in this.renderTileImageQueue_){if(!t&&Date.now()-e.time>8){e.animate=!0;break}var n=this.renderTileImageQueue_[r];delete this.renderTileImageQueue_[r],this.renderTileImage_(n,e)}},e.prototype.renderFeature=function(t,e,r,n){if(!r)return!1;var i=!1;if(Array.isArray(r))for(var o=0,a=r.length;o<a;++o)i=Fo(n,t,r[o],e,this.boundHandleStyleImageChange_)||i;else i=Fo(n,t,r,e,this.boundHandleStyleImageChange_);return i},e.prototype.tileImageNeedsRender_=function(t,e,r){var n=this.getLayer(),i=t.getReplayState(n),o=n.getRevision(),a=t.sourceZ,s=t.wantedResolution;return i.renderedTileResolution!==s||i.renderedTileRevision!==o||i.renderedTileZ!==a},e.prototype.renderTileImage_=function(t,e){var r=this.getLayer(),n=t.getReplayState(r),i=r.getRevision(),a=t.executorGroups[o(r)];n.renderedTileRevision=i,n.renderedTileZ=t.sourceZ;var s=t.wrappedTileCoord,u=s[0],l=r.getSource(),h=e.pixelRatio,c=e.viewState.projection,p=l.getTileGridForProjection(c),f=p.getResolution(t.tileCoord[0]),d=e.pixelRatio/t.wantedResolution*f,g=p.getResolution(u),y=t.getContext(r);h=Math.max(h,d/h);var m=l.getTilePixelSize(u,h,c);y.canvas.width=m[0],y.canvas.height=m[1];var v=h/d;if(1!==v){var _=xt(this.tmpTransform_);Et(_,v,v),y.setTransform.apply(y,_)}var b=p.getTileCoordExtent(s,this.tmpExtent),x=d/g,w=xt(this.tmpTransform_);Et(w,x,-x),function(t,e,r){wt(t,St(bt,1,0,0,1,e,r))}(w,-b[0],-b[3]);for(var S=0,T=a.length;S<T;++S){a[S].execute(y,v,w,0,!0,bd[r.getRenderMode()])}n.renderedTileResolution=t.wantedResolution},e}(Tp);function Sd(t,e,r,n,i,o,a){var s,u,l=(r-e)/n;if(1===l)s=e;else if(2===l)s=e,u=i;else if(0!==l){for(var h=t[e],c=t[e+1],p=0,d=[0],g=e+n;g<r;g+=n){var y=t[g],m=t[g+1];p+=Math.sqrt((y-h)*(y-h)+(m-c)*(m-c)),d.push(p),h=y,c=m}var v=i*p,_=function(t,e,r){for(var n,i,o=r||f,a=0,s=t.length,u=!1;a<s;)(i=+o(t[n=a+(s-a>>1)],e))<0?a=n+1:(s=n,u=!i);return u?a:~a}(d,v);_<0?(u=(v-d[-_-2])/(d[-_-1]-d[-_-2]),s=e+(-_-2)*n):s=e+_*n}var b=a>1?a:2,x=o||new Array(b);for(g=0;g<b;++g)x[g]=void 0===s?NaN:void 0===u?t[s+g]:Ie(t[s+g],t[s+n+g],u);return x}function Td(t,e,r,n,i,o){if(r==e)return null;var a;if(i<t[e+n-1])return o?((a=t.slice(e,e+n))[n-1]=i,a):null;if(t[r-1]<i)return o?((a=t.slice(r-n,r))[n-1]=i,a):null;if(i==t[e+n-1])return t.slice(e,e+n);for(var s=e/n,u=r/n;s<u;){var l=s+u>>1;i<t[(l+1)*n-1]?u=l:s=l+1}var h=t[s*n-1];if(i==h)return t.slice((s-1)*n,(s-1)*n+n);var c=(i-h)/(t[(s+1)*n-1]-h);a=[];for(var p=0;p<n-1;++p)a.push(Ie(t[(s-1)*n+p],t[s*n+p],c));return a.push(i),a}var Ed=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cd=function(t){function e(e,r){var n=t.call(this)||this;return n.flatMidpoint_=null,n.flatMidpointRevision_=-1,n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===r||Array.isArray(e[0])?n.setCoordinates(e,r):n.setFlatCoordinates(r,e),n}return Ed(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?m(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Zr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Hr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,r,n))},e.prototype.forEachSegment=function(t){return xn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=dt&&this.layout!=gt)return null;var r=void 0!==e&&e;return Td(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r)},e.prototype.getCoordinates=function(){return sn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return Sd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return Hf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[];return r.length=en(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,pt)},e.prototype.getType=function(){return yt.LINE_STRING},e.prototype.intersectsExtent=function(t){return wn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Qr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qr),Pd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rd=function(t){function e(e){return t.call(this,e)||this}return Pd(e,t),e.prototype.createRenderer=function(){return new fd(this)},e}(xf);function Od(t,e,r){for(var n,i,o,a,s,u,l=[],h=t(0),c=t(1),p=e(h),f=e(c),d=[c,h],g=[f,p],y=[1,0],m={},v=1e5;--v>0&&y.length>0;)o=y.pop(),h=d.pop(),p=g.pop(),(u=o.toString())in m||(l.push(p[0],p[1]),m[u]=!0),a=y.pop(),c=d.pop(),f=g.pop(),Ee((i=e(n=t(s=(o+a)/2)))[0],i[1],p[0],p[1],f[0],f[1])<r?(l.push(f[0],f[1]),m[u=a.toString()]=!0):(y.push(a,s,s,o),g.push(f,i,i,p),d.push(c,n,n,h));return l}var Id=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ld=new nh({color:"rgba(0,0,0,0.2)"}),Md=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],Fd=function(t){function e(e){var r=this,n=e||{},i=T({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},n);return delete i.maxLines,delete i.strokeStyle,delete i.targetSize,delete i.showLabels,delete i.lonLabelFormatter,delete i.latLabelFormatter,delete i.lonLabelPosition,delete i.latLabelPosition,delete i.lonLabelStyle,delete i.latLabelStyle,delete i.intervals,(r=t.call(this,i)||this).projection_=null,r.maxLat_=1/0,r.maxLon_=1/0,r.minLat_=-1/0,r.minLon_=-1/0,r.maxX_=1/0,r.maxY_=1/0,r.minX_=-1/0,r.minY_=-1/0,r.targetSize_=void 0!==n.targetSize?n.targetSize:100,r.maxLines_=void 0!==n.maxLines?n.maxLines:100,r.meridians_=[],r.parallels_=[],r.strokeStyle_=void 0!==n.strokeStyle?n.strokeStyle:Ld,r.fromLonLatTransform_=void 0,r.toLonLatTransform_=void 0,r.projectionCenterLonLat_=null,r.bottomLeft_=null,r.bottomRight_=null,r.topLeft_=null,r.topRight_=null,r.meridiansLabels_=null,r.parallelsLabels_=null,n.showLabels&&(r.lonLabelFormatter_=null==n.lonLabelFormatter?rr.bind(r,"EW"):n.lonLabelFormatter,r.latLabelFormatter_=null==n.latLabelFormatter?rr.bind(r,"NS"):n.latLabelFormatter,r.lonLabelPosition_=null==n.lonLabelPosition?0:n.lonLabelPosition,r.latLabelPosition_=null==n.latLabelPosition?1:n.latLabelPosition,r.lonLabelStyleBase_=new lh({text:void 0!==n.lonLabelStyle?n.lonLabelStyle.clone():new ph({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new zl({color:"rgba(0,0,0,1)"}),stroke:new nh({color:"rgba(255,255,255,1)",width:3})})}),r.lonLabelStyle_=function(t){var e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_}.bind(r),r.latLabelStyleBase_=new lh({text:void 0!==n.latLabelStyle?n.latLabelStyle.clone():new ph({font:"12px Calibri,sans-serif",textAlign:"right",fill:new zl({color:"rgba(0,0,0,1)"}),stroke:new nh({color:"rgba(255,255,255,1)",width:3})})}),r.latLabelStyle_=function(t){var e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_}.bind(r),r.meridiansLabels_=[],r.parallelsLabels_=[],r.addEventListener(xi,r.drawLabels_.bind(r))),r.intervals_=void 0!==n.intervals?n.intervals:Md,r.setSource(new cc({loader:r.loaderFunction.bind(r),strategy:r.strategyFunction.bind(r),features:new ut,overlaps:!1,useSpatialIndex:!1,wrapX:n.wrapX})),r.featurePool_=[],r.lineStyle_=new lh({stroke:r.strokeStyle_}),r.loadedExtent_=null,r.renderedExtent_=null,r.setRenderOrder(null),r}return Id(e,t),e.prototype.strategyFunction=function(t,e){var r,n,i,o=t.slice();return this.projection_&&this.getSource().getWrapX()&&be(o,this.projection_),this.loadedExtent_&&(r=this.loadedExtent_,n=o,i=e,Math.abs(r[0]-n[0])<i&&Math.abs(r[2]-n[2])<i&&Math.abs(r[1]-n[1])<i&&Math.abs(r[3]-n[3])<i?o=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[o]},e.prototype.loaderFunction=function(t,e,r){this.loadedExtent_=t;var n=this.getSource(),i=pe(this.getExtent()||[-1/0,-1/0,1/0,1/0],t);if(!(this.renderedExtent_&&$t(this.renderedExtent_,i)||(this.renderedExtent_=i,me(i)))){var o=ue(i),a=e*e/4;(!this.projection_||!Sr(this.projection_,r))&&this.updateProjectionInfo_(r),this.createGraticule_(i,o,e,a);var s,u=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(u+=this.meridians_.length),this.parallelsLabels_&&(u+=this.parallels_.length);u>this.featurePool_.length;)s=new ct,this.featurePool_.push(s);var l=n.getFeaturesCollection();l.clear();var h,c,p=0;for(h=0,c=this.meridians_.length;h<c;++h)(s=this.featurePool_[p++]).setGeometry(this.meridians_[h]),s.setStyle(this.lineStyle_),l.push(s);for(h=0,c=this.parallels_.length;h<c;++h)(s=this.featurePool_[p++]).setGeometry(this.parallels_[h]),s.setStyle(this.lineStyle_),l.push(s)}},e.prototype.addMeridian_=function(t,e,r,n,i,o){var a=this.getMeridian_(t,e,r,n,o);if(ye(a.getExtent(),i)){if(this.meridiansLabels_){var s=this.lonLabelFormatter_(t);o in this.meridiansLabels_?this.meridiansLabels_[o].text=s:this.meridiansLabels_[o]={geom:new gn([]),text:s}}this.meridians_[o++]=a}return o},e.prototype.addParallel_=function(t,e,r,n,i,o){var a=this.getParallel_(t,e,r,n,o);if(ye(a.getExtent(),i)){if(this.parallelsLabels_){var s=this.latLabelFormatter_(t);o in this.parallelsLabels_?this.parallelsLabels_[o].text=s:this.parallelsLabels_[o]={geom:new gn([]),text:s}}this.parallels_[o++]=a}return o},e.prototype.drawLabels_=function(t){var e=t.frameState.viewState.rotation,r=t.frameState.extent,n=ue(r),i=r;if(e){var o=ge(r),a=ce(r),s=Math.abs(Math.cos(e)),u=Math.abs(Math.sin(e)),l=(u*a-s*o)/(u*u-s*s),h=(u*o-s*a)/(u*u-s*s);i=[n[0]-l/2,n[1]-h/2,n[0]+l/2,n[1]+h/2]}var c=0,p=0,f=this.latLabelPosition_<.5,d=this.projection_.getExtent(),g=ge(d);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!Vt(d,r)&&(c=Math.floor((r[0]-d[0])/g),p=Math.ceil((r[2]-d[2])/g),f=f!==Math.abs(e)>Math.PI/2);for(var y=Ao(t),m=c;m<=p;++m){var v=this.meridians_.length+this.parallels_.length,_=void 0,b=void 0,x=void 0,w=void 0;if(this.meridiansLabels_)for(b=0,x=this.meridiansLabels_.length;b<x;++b){var S=this.meridians_[b];if(e||0!==m)(T=S.clone()).translate(m*g,0),T.rotate(-e,n),(w=this.getMeridianPoint_(T,i,b)).rotate(e,n);else w=this.getMeridianPoint_(S,r,b);(_=this.featurePool_[v++]).setGeometry(w),_.set("graticule_label",this.meridiansLabels_[b].text),y.drawFeature(_,this.lonLabelStyle_(_))}if(this.parallelsLabels_&&(m===c&&f||m===p&&!f))for(b=0,x=this.parallels_.length;b<x;++b){var T;S=this.parallels_[b];if(e||0!==m)(T=S.clone()).translate(m*g,0),T.rotate(-e,n),(w=this.getParallelPoint_(T,i,b)).rotate(e,n);else w=this.getParallelPoint_(S,r,b);(_=this.featurePool_[v++]).setGeometry(w),_.set("graticule_label",this.parallelsLabels_[b].text),y.drawFeature(_,this.latLabelStyle_(_))}}},e.prototype.createGraticule_=function(t,e,r,n){var i=this.getInterval_(r);if(-1==i)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));var o=!1,a=this.projection_.getExtent(),s=ge(a);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!Vt(a,t)&&(ge(t)>=s?(t[0]=a[0],t[2]=a[2]):o=!0);var u=[we(e[0],this.minX_,this.maxX_),we(e[1],this.minY_,this.maxY_)],l=this.toLonLatTransform_(u);isNaN(l[1])&&(l[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);var h,c,p,f,d=we(l[0],this.minLon_,this.maxLon_),g=we(l[1],this.minLat_,this.maxLat_),y=this.maxLines_,m=t;o||(m=[we(t[0],this.minX_,this.maxX_),we(t[1],this.minY_,this.maxY_),we(t[2],this.minX_,this.maxX_),we(t[3],this.minY_,this.maxY_)]);var v=_e(m,this.toLonLatTransform_,void 0,8),_=v[3],b=v[2],x=v[1],w=v[0];if(o||(Yt(m,this.bottomLeft_)&&(w=this.minLon_,x=this.minLat_),Yt(m,this.bottomRight_)&&(b=this.maxLon_,x=this.minLat_),Yt(m,this.topLeft_)&&(w=this.minLon_,_=this.maxLat_),Yt(m,this.topRight_)&&(b=this.maxLon_,_=this.maxLat_),_=we(_,g,this.maxLat_),b=we(b,d,this.maxLon_),x=we(x,this.minLat_,g),w=we(w,this.minLon_,d)),f=we(d=Math.floor(d/i)*i,this.minLon_,this.maxLon_),c=this.addMeridian_(f,x,_,n,t,0),h=0,o)for(;(f-=i)>=w&&h++<y;)c=this.addMeridian_(f,x,_,n,t,c);else for(;f!=this.minLon_&&h++<y;)f=Math.max(f-i,this.minLon_),c=this.addMeridian_(f,x,_,n,t,c);if(f=we(d,this.minLon_,this.maxLon_),h=0,o)for(;(f+=i)<=b&&h++<y;)c=this.addMeridian_(f,x,_,n,t,c);else for(;f!=this.maxLon_&&h++<y;)f=Math.min(f+i,this.maxLon_),c=this.addMeridian_(f,x,_,n,t,c);for(this.meridians_.length=c,this.meridiansLabels_&&(this.meridiansLabels_.length=c),p=we(g=Math.floor(g/i)*i,this.minLat_,this.maxLat_),c=this.addParallel_(p,w,b,n,t,0),h=0;p!=this.minLat_&&h++<y;)p=Math.max(p-i,this.minLat_),c=this.addParallel_(p,w,b,n,t,c);for(p=we(g,this.minLat_,this.maxLat_),h=0;p!=this.maxLat_&&h++<y;)p=Math.min(p+i,this.maxLat_),c=this.addParallel_(p,w,b,n,t,c);this.parallels_.length=c,this.parallelsLabels_&&(this.parallelsLabels_.length=c)},e.prototype.getInterval_=function(t){for(var e=this.projectionCenterLonLat_[0],r=this.projectionCenterLonLat_[1],n=-1,i=Math.pow(this.targetSize_*t,2),o=[],a=[],s=0,u=this.intervals_.length;s<u;++s){var l=we(this.intervals_[s]/2,0,90),h=we(r,-90+l,90-l);if(o[0]=e-l,o[1]=h-l,a[0]=e+l,a[1]=h+l,this.fromLonLatTransform_(o,o),this.fromLonLatTransform_(a,a),Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)<=i)break;n=this.intervals_[s]}return n},e.prototype.getMeridian_=function(t,e,r,n,i){var o=function(t,e,r,n,i){return Od((function(n){return[t,e+(r-e)*n]}),Er(yr("EPSG:4326"),n),i)}(t,e,r,this.projection_,n),a=this.meridians_[i];return a?(a.setFlatCoordinates(pt,o),a.changed()):(a=new Cd(o,pt),this.meridians_[i]=a),a},e.prototype.getMeridianPoint_=function(t,e,r){var n=t.getFlatCoordinates(),i=1,o=n.length-1;n[i]>n[o]&&(i=o,o=1);var a=Math.max(e[1],n[i]),s=Math.min(e[3],n[o]),u=we(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,a,s),l=[n[i-1]+(n[o-1]-n[i-1])*(u-n[i])/(n[o]-n[i]),u],h=this.meridiansLabels_[r].geom;return h.setCoordinates(l),h},e.prototype.getMeridians=function(){return this.meridians_},e.prototype.getParallel_=function(t,e,r,n,i){var o=function(t,e,r,n,i){return Od((function(n){return[e+(r-e)*n,t]}),Er(yr("EPSG:4326"),n),i)}(t,e,r,this.projection_,n),a=this.parallels_[i];return a?(a.setFlatCoordinates(pt,o),a.changed()):a=new Cd(o,pt),a},e.prototype.getParallelPoint_=function(t,e,r){var n=t.getFlatCoordinates(),i=0,o=n.length-2;n[i]>n[o]&&(i=o,o=0);var a=Math.max(e[0],n[i]),s=Math.min(e[2],n[o]),u=we(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,a,s),l=[u,n[i+1]+(n[o+1]-n[i+1])*(u-n[i])/(n[o]-n[i])],h=this.parallelsLabels_[r].geom;return h.setCoordinates(l),h},e.prototype.getParallels=function(){return this.parallels_},e.prototype.updateProjectionInfo_=function(t){var e=yr("EPSG:4326"),r=t.getWorldExtent();this.maxLat_=r[3],this.maxLon_=r[2],this.minLat_=r[1],this.minLon_=r[0];var n=Er(t,e);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=n;else{var i=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(t,e,r){for(var o=r||2,a=n(t,e,o),s=0,u=a.length;s<u;s+=o)a[s]<i&&(a[s]+=360);return a}}this.fromLonLatTransform_=Er(e,t);var o=_e([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=o[0],this.maxX_=o[2],this.minY_=o[1],this.maxY_=o[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_(ue(t.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t},e}(Rd),Ad=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),kd="blur",Nd="gradient",jd="radius",Gd=["#00f","#0ff","#0f0","#ff0","#f00"];var Dd=function(t){function e(e){var r=this,n=e||{},i=T({},n);delete i.gradient,delete i.radius,delete i.blur,delete i.weight,(r=t.call(this,i)||this).gradient_=null,r.addEventListener(et(Nd),r.handleGradientChanged_),r.setGradient(n.gradient?n.gradient:Gd),r.setBlur(void 0!==n.blur?n.blur:15),r.setRadius(void 0!==n.radius?n.radius:8);var o=n.weight?n.weight:"weight";return r.weightFunction_="string"==typeof o?function(t){return t.get(o)}:o,r.setRenderOrder(null),r}return Ad(e,t),e.prototype.getBlur=function(){return this.get(kd)},e.prototype.getGradient=function(){return this.get(Nd)},e.prototype.getRadius=function(){return this.get(jd)},e.prototype.handleGradientChanged_=function(){this.gradient_=function(t){for(var e=Bi(1,256),r=e.createLinearGradient(0,0,1,256),n=1/(t.length-1),i=0,o=t.length;i<o;++i)r.addColorStop(i*n,t[i]);return e.fillStyle=r,e.fillRect(0,0,1,256),e.canvas}(this.getGradient())},e.prototype.setBlur=function(t){this.set(kd,t)},e.prototype.setGradient=function(t){this.set(Nd,t)},e.prototype.setRadius=function(t){this.set(jd,t)},e.prototype.createRenderer=function(){return new Of(this,{attributes:[{name:"weight",callback:function(t){var e=this.weightFunction_(t);return void 0!==e?we(e,0,1):1}.bind(this)}],vertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_weight = a_weight;\n        }",fragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n        }",hitVertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n        attribute vec4 a_hitColor;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_hitColor = a_hitColor;\n          v_weight = a_weight;\n        }",hitFragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          if (alpha < 0.05) {\n            discard;\n          }\n\n          gl_FragColor = v_hitColor;\n        }",uniforms:{u_size:function(){return 2*(this.get(jd)+this.get(kd))}.bind(this),u_blurSlope:function(){return this.get(jd)/Math.max(1,this.get(kd))}.bind(this)},postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this)}}]})},e}(Rd),zd=function(){function t(){this.dataProjection=null,this.defaultFeatureProjection=null}return t.prototype.getReadOptions=function(t,e){var r;if(e){var n=e.dataProjection?yr(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()===_t.TILE_PIXELS&&(n=yr(n)).setWorldExtent(e.extent),r={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(r)},t.prototype.adaptOptions=function(t){return T({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return n()},t.prototype.readFeature=function(t,e){return n()},t.prototype.readFeatures=function(t,e){return n()},t.prototype.readGeometry=function(t,e){return n()},t.prototype.readProjection=function(t){return n()},t.prototype.writeFeature=function(t,e){return n()},t.prototype.writeFeatures=function(t,e){return n()},t.prototype.writeGeometry=function(t,e){return n()},t}();function Ud(t,e,r){var n,i=r?yr(r.featureProjection):null,o=r?yr(r.dataProjection):null;if(n=i&&o&&!Sr(i,o)?(e?t.clone():t).transform(e?i:o,e?o:i):t,e&&r&&void 0!==r.decimals){var a=Math.pow(10,r.decimals);n===t&&(n=t.clone()),n.applyTransform((function(t){for(var e=0,r=t.length;e<r;++e)t[e]=Math.round(t[e]*a)/a;return t}))}return n}function Bd(t,e){var r=e?yr(e.featureProjection):null,n=e?yr(e.dataProjection):null;return r&&n&&!Sr(r,n)?Pr(t,n,r):t}var Yd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vd=function(t){function e(e,r,n){var i=t.call(this)||this;if(i.ends_=[],i.maxDelta_=-1,i.maxDeltaRevision_=-1,Array.isArray(e[0]))i.setCoordinates(e,r);else if(void 0!==r&&n)i.setFlatCoordinates(r,e),i.ends_=n;else{for(var o=i.getLayout(),a=e,s=[],u=[],l=0,h=a.length;l<h;++l){var c=a[l];0===l&&(o=c.getLayout()),m(s,c.getFlatCoordinates()),u.push(s.length)}i.setFlatCoordinates(o,s),i.ends_=u}return i}return Yd(e,t),e.prototype.appendLineString=function(t){this.flatCoordinates?m(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},e.prototype.closestPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Kr(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Jr(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,r,n))},e.prototype.getCoordinateAtM=function(t,e,r){if(this.layout!=dt&&this.layout!=gt||0===this.flatCoordinates.length)return null;var n=void 0!==e&&e,i=void 0!==r&&r;return function(t,e,r,n,i,o,a){if(a)return Td(t,e,r[r.length-1],n,i,o);var s;if(i<t[n-1])return o?((s=t.slice(0,n))[n-1]=i,s):null;if(t[t.length-1]<i)return o?((s=t.slice(t.length-n))[n-1]=i,s):null;for(var u=0,l=r.length;u<l;++u){var h=r[u];if(e!=h){if(i<t[e+n-1])return null;if(i<=t[h-1])return Td(t,e,h,n,i,!1);e=h}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,n,i)},e.prototype.getCoordinates=function(){return un(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new Cd(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,r=this.layout,n=[],i=0,o=0,a=e.length;o<a;++o){var s=e[o],u=new Cd(t.slice(i,s),r);n.push(u),i=s}return n},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,r=0,n=this.ends_,i=this.stride,o=0,a=n.length;o<a;++o){var s=n[o];m(t,Sd(e,r,s,i,.5)),r=s}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],n=[];return r.length=rn(this.flatCoordinates,0,this.ends_,this.stride,t,r,0,n),new e(r,pt,n)},e.prototype.getType=function(){return yt.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){if(wn(t,e,r[o],n,i))return!0;e=r[o]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var r=tn(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.changed()},e}(qr),Wd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qd=function(t){function e(e,r){var n=t.call(this)||this;return r&&!Array.isArray(e[0])?n.setFlatCoordinates(r,e):n.setCoordinates(e,r),n}return Wd(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?m(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,n){if(n<Bt(this.getExtent(),t,e))return n;for(var i=this.flatCoordinates,o=this.stride,a=0,s=i.length;a<s;a+=o){var u=Ce(t,e,i[a],i[a+1]);if(u<n){n=u;for(var l=0;l<o;++l)r[l]=i[a+l];r.length=o}}return n},e.prototype.getCoordinates=function(){return sn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new gn(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,r=this.stride,n=[],i=0,o=t.length;i<o;i+=r){var a=new gn(t.slice(i,i+r),e);n.push(a)}return n},e.prototype.getType=function(){return yt.MULTI_POINT},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,r=this.stride,n=0,i=e.length;n<i;n+=r){if(Wt(t,e[n],e[n+1]))return!0}return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Qr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qr);function Xd(t,e,r,n){for(var i=[],o=[1/0,1/0,-1/0,-1/0],a=0,s=r.length;a<s;++a){var u=r[a];o=Jt(t,e,u[0],n),i.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=u[u.length-1]}return i}var Zd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kd=function(t){function e(e,r,n){var i=t.call(this)||this;if(i.endss_=[],i.flatInteriorPointsRevision_=-1,i.flatInteriorPoints_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,!n&&!Array.isArray(e[0])){for(var o=i.getLayout(),a=e,s=[],u=[],l=0,h=a.length;l<h;++l){var c=a[l];0===l&&(o=c.getLayout());for(var p=s.length,f=c.getEnds(),d=0,g=f.length;d<g;++d)f[d]+=p;m(s,c.getFlatCoordinates()),u.push(f)}r=o,e=s,n=u}return void 0!==r&&n?(i.setFlatCoordinates(r,e),i.endss_=n):i.setCoordinates(e,r),i}return Zd(e,t),e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var r=this.flatCoordinates.length;m(this.flatCoordinates,t.getFlatCoordinates());for(var n=0,i=(e=t.getEnds().slice()).length;n<i;++n)e[n]+=r}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,r=new Array(t),n=0;n<t;++n)r[n]=this.endss_[n].slice();return new e(this.flatCoordinates.slice(),this.layout,r)},e.prototype.closestPointXY=function(t,e,r,n){return n<Bt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o];i=Kr(t,e,s,n,i),e=s[s.length-1]}return i}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,r,n,i,o,a,s,u,l,h){for(var c=h||[NaN,NaN],p=0,f=r.length;p<f;++p){var d=r[p];l=Jr(t,e,d,n,i,o,a,s,u,l,c),e=d[d.length-1]}return l}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,r,n))},e.prototype.containsXY=function(t,e){return function(t,e,r,n,i,o){if(0===r.length)return!1;for(var a=0,s=r.length;a<s;++a){var u=r[a];if(vn(t,e,u,n,i,o))return!0;e=u[u.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,r,n){for(var i=0,o=0,a=r.length;o<a;++o){var s=r[o];i+=cn(t,e,s,n),e=s[s.length-1]}return i}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Rn(e=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,t):e=this.flatCoordinates,ln(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=Xd(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=bn(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new qd(this.getFlatInteriorPoints().slice(),dt)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o];if(!Cn(t,e,s,n,i))return!1;s.length&&(e=s[s.length-1])}return!0}(t,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Rn(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],n=[];return r.length=function(t,e,r,n,i,o,a,s){for(var u=0,l=r.length;u<l;++u){var h=r[u],c=[];a=an(t,e,h,n,i,o,a,c),s.push(c),e=h[h.length-1]}return a}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),r,0,n),new e(r,pt,n)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var r=this.endss_[t-1];e=r[r.length-1]}var n=this.endss_[t].slice(),i=n[n.length-1];if(0!==e)for(var o=0,a=n.length;o<a;++o)n[o]-=e;return new Ln(this.flatCoordinates.slice(e,i),this.layout,n)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,r=this.endss_,n=[],i=0,o=0,a=r.length;o<a;++o){var s=r[o].slice(),u=s[s.length-1];if(0!==i)for(var l=0,h=s.length;l<h;++l)s[l]-=i;var c=new Ln(e.slice(i,u),t,s);n.push(c),i=u}return n},e.prototype.getType=function(){return yt.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return function(t,e,r,n,i){for(var o=0,a=r.length;o<a;++o){var s=r[o];if(Sn(t,e,s,n,i))return!0;e=s[s.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var r=function(t,e,r,n,i){for(var o=i||[],a=0,s=0,u=r.length;s<u;++s){var l=tn(t,e,r[s],n,o[a]);o[a++]=l,e=l[l.length-1]}return o.length=a,o}(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===r.length)this.flatCoordinates.length=0;else{var n=r[r.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()},e}(qr),Hd=r(5),Jd=r.n(Hd),$d=[1,0,0,1,0,0],Qd=function(){function t(t,e,r,n,i){this.extent_,this.id_=i,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r,this.properties_=n}return t.prototype.get=function(t){return this.properties_[t]},t.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===yt.POINT?Ht(this.flatCoordinates_):Jt(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},t.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=ue(this.getExtent());this.flatInteriorPoints_=_n(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},t.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=Xd(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=bn(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},t.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=Sd(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},t.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,r=this.ends_,n=0,i=r.length;n<i;++n){var o=r[n],a=Sd(t,e,o,2,.5);m(this.flatMidpoints_,a),e=o}}return this.flatMidpoints_},t.prototype.getId=function(){return this.id_},t.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,e){return this},t.prototype.getProperties=function(){return this.properties_},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){},t.prototype.getType=function(){return this.type_},t.prototype.transform=function(t,e){var r=(t=yr(t)).getExtent(),n=t.getWorldExtent(),i=ce(n)/ce(r);Ct($d,n[0],n[3],i,-i,0,0,0),Gr(this.flatCoordinates_,0,this.flatCoordinates_.length,2,$d,this.flatCoordinates_)},t.prototype.getEnds=function(){return this.ends_},t}();Qd.prototype.getEndss=Qd.prototype.getEnds,Qd.prototype.getFlatCoordinates=Qd.prototype.getOrientedFlatCoordinates;var tg=Qd,eg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function rg(t,e,r){if(3===t){var n={keys:[],values:[],features:[]},i=r.readVarint()+r.pos;r.readFields(ng,n,i),n.length=n.features.length,n.length&&(e[n.name]=n)}}function ng(t,e,r){if(15===t)e.version=r.readVarint();else if(1===t)e.name=r.readString();else if(5===t)e.extent=r.readVarint();else if(2===t)e.features.push(r.pos);else if(3===t)e.keys.push(r.readString());else if(4===t){for(var n=null,i=r.readVarint()+r.pos;r.pos<i;)n=1===(t=r.readVarint()>>3)?r.readString():2===t?r.readFloat():3===t?r.readDouble():4===t?r.readVarint64():5===t?r.readVarint():6===t?r.readSVarint():7===t?r.readBoolean():null;e.values.push(n)}}function ig(t,e,r){if(1==t)e.id=r.readVarint();else if(2==t)for(var n=r.readVarint()+r.pos;r.pos<n;){var i=e.layer.keys[r.readVarint()],o=e.layer.values[r.readVarint()];e.properties[i]=o}else 3==t?e.type=r.readVarint():4==t&&(e.geometry=r.pos)}function og(t,e,r){t.pos=e.features[r];var n=t.readVarint()+t.pos,i={layer:e,type:0,properties:{}};return t.readFields(ig,i,n),i}var ag=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.dataProjection=new xe({code:"",units:_t.TILE_PIXELS}),r.featureClass_=n.featureClass?n.featureClass:tg,r.geometryName_=n.geometryName,r.layerName_=n.layerName?n.layerName:"layer",r.layers_=n.layers?n.layers:null,r.idProperty_=n.idProperty,r}return eg(e,t),e.prototype.readRawGeometry_=function(t,e,r,n){t.pos=e.geometry;for(var i=t.readVarint()+t.pos,o=1,a=0,s=0,u=0,l=0,h=0;t.pos<i;){if(!a){var c=t.readVarint();o=7&c,a=c>>3}a--,1===o||2===o?(s+=t.readSVarint(),u+=t.readSVarint(),1===o&&l>h&&(n.push(l),h=l),r.push(s,u),l+=2):7===o?l>h&&(r.push(r[h],r[h+1]),l+=2):lt(!1,59)}l>h&&(n.push(l),h=l)},e.prototype.createFeature_=function(t,e,r){var n,i=e.type;if(0===i)return null;var o,a=e.properties;this.idProperty_?(o=a[this.idProperty_],delete a[this.idProperty_]):o=e.id,a[this.layerName_]=e.layer.name;var s=[],u=[];this.readRawGeometry_(t,e,s,u);var l=function(t,e){var r;1===t?r=1===e?yt.POINT:yt.MULTI_POINT:2===t?r=1===e?yt.LINE_STRING:yt.MULTI_LINE_STRING:3===t&&(r=yt.POLYGON);return r}(i,u.length);if(this.featureClass_===tg)(n=new this.featureClass_(l,s,u,a,o)).transform(r.dataProjection,r.featureProjection);else{var h=void 0;if(l==yt.POLYGON){for(var c=[],p=0,f=0,d=0,g=u.length;d<g;++d){var y=u[d];if(En(s,p,y,2)){if(0===c.length)continue;c[c.length-1].push(u[f])}else c.push(u.slice(f,d+1));f=d+1,p=y}h=c.length>1?new Kd(s,pt,c):new Ln(s,pt,u)}else h=l===yt.POINT?new gn(s,pt):l===yt.LINE_STRING?new Cd(s,pt):l===yt.POLYGON?new Ln(s,pt,u):l===yt.MULTI_POINT?new qd(s,pt):l===yt.MULTI_LINE_STRING?new Vd(s,pt,u):null;n=new(0,this.featureClass_),this.geometryName_&&n.setGeometryName(this.geometryName_);var m=Ud(h,!1,r);n.setGeometry(m),n.setId(o),n.setProperties(a,!0)}return n},e.prototype.getType=function(){return yu},e.prototype.readFeatures=function(t,e){var r=this.layers_,n=this.adaptOptions(e),i=yr(n.dataProjection);i.setWorldExtent(n.extent),n.dataProjection=i;var o=new Jd.a(t),a=o.readFields(rg,{}),s=[];for(var u in a)if(!r||-1!=r.indexOf(u)){var l=a[u],h=l?[0,0,l.extent,l.extent]:null;i.setExtent(h);for(var c=0,p=l.length;c<p;++c){var f=og(o,l,c);s.push(this.createFeature_(o,f,n))}}return s},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(zd),sg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ug=function(t){function e(e){var r=this,n=e||{},i=T({},n);delete i.preload,delete i.useInterimTilesOnError,r=t.call(this,i)||this;var o=n.renderMode||md;return lt(null==o||o==yd||o==md||o==vd,28),r.renderMode_=o,r.setPreload(n.preload?n.preload:0),r.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),r}return sg(e,t),e.prototype.createRenderer=function(){return new wd(this)},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(vp)},e.prototype.getUseInterimTilesOnError=function(){return this.get(_p)},e.prototype.setPreload=function(t){this.set(vp,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(_p,t)},e}(xf),lg=r(2),hg=r.n(lg),cg=r(0);function pg(t){return t*Math.PI/180}var fg=function(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function dg(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var r=document.createElement("canvas");return r.width=t,r.height=e,r}var gg,yg=Array(256).join(" ");function mg(t,e){if(e>=.05){for(var r="",n=t.split("\n"),i=yg.slice(0,Math.round(e/.1)),o=0,a=n.length;o<a;++o)o>0&&(r+="\n"),r+=n[o].split("").join(i);return r}return t}function vg(){return gg||(gg=dg(1,1).getContext("2d")),gg}function _g(t,e){return vg().measureText(t).width+(t.length-1)*e}var bg={};to&&W(to,M,(function(){bg={}}));var xg,wg,Sg=cg.e.isFunction,Tg=cg.e.convertFunction,Eg=cg.c.isExpression,Cg=cg.c.createPropertyExpression,Pg={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Rg={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},Og={},Ig={zoom:0},Lg={};function Mg(t,e,r,n,i){var o=t.id;Lg[o]||(Lg[o]={});var a=Lg[o];if(!a[r]){var s=(t[e]||Og)[r],u=cg.f[e+"_"+t.type][r];void 0===s&&(s=u.default);var l=Eg(s);if(!l&&Sg(s)&&(s=Tg(s,u),l=!0),l){var h=function(t,e){var r=Cg(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}(s,u);a[r]=h.evaluate.bind(h)}else"color"==u.type&&(s=cg.a.parse(s)),a[r]=function(){return s}}return Ig.zoom=n,a[r](Ig,i)}var Fg={};function Ag(t,e){if(t){if(0===t.a||0===e)return;var r=t.a;return e=void 0===e?1:e,"rgba("+Math.round(255*t.r/r)+","+Math.round(255*t.g/r)+","+Math.round(255*t.b/r)+","+r*e+")"}return t}var kg=/^([^]*)\{(.*)\}([^]*)$/;function Ng(t,e){var r;do{if(r=t.match(kg)){var n=e[r[2]]||"";t=r[1]+n+r[3]}}while(r);return t}var jg=function(t,e,r,n,i,o,a){if(void 0===n&&(n=fg),"string"==typeof e&&(e=JSON.parse(e)),8!=e.version)throw new Error("glStyle version 8 required.");var s,u;if(o)if("undefined"!=typeof Image){var l=new Image;l.crossOrigin="anonymous",l.onload=function(){s=l,u=[l.width,l.height],t.changed(),l.onload=null},l.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var h=self;h.postMessage({action:"loadImage",src:o}),h.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(s=t.data.image,u=[s.width,s.height])}))}for(var c,p=Object(cg.b)(e.layers),f={},d=[],g=0,y=p.length;g<y;++g){var m=p[g],v=m.id;if("string"==typeof r&&m.source==r||-1!==r.indexOf(v)){var _=m["source-layer"];if(!c){c=m.source;var b=e.sources[c];if(!b)throw new Error('Source "'+c+'" is not defined');var x=b.type;if("vector"!==x&&"geojson"!==x)throw new Error('Source "'+c+'" is not of type "vector" or "geojson", but "'+x+'"')}var w=f[_];w||(w=f[_]=[]),w.push({layer:m,index:g}),d.push(v)}delete Lg[v],delete Fg[v]}var S=new nh,T=new zl,E={},C={},P=[],R=function(t,e){var r=t.getProperties(),o=f[r.layer];if(o){var l=n.indexOf(e);-1==l&&(l=function(t,e){for(var r=0,n=e.length;r<n;++r){if(e[r]<t&&r+1<n){var i=e[r]/e[r+1];return r+Math.log(e[r]/t)/Math.log(i)}}return n-1}(e,n));for(var h=Pg[t.getGeometry().getType()],c={properties:r,type:h},p=-1,d=function(n,f){var d=o[n],g=d.layer,y=g.id,m=g.layout||Og,v=g.paint||Og;if("none"===m.visibility||"minzoom"in g&&l<g.minzoom||"maxzoom"in g&&l>=g.maxzoom)return"continue";var _=g.filter;if(!_||function(t,e,r,n){return t in Fg||(Fg[t]=Object(cg.d)(e).filter),Ig.zoom=n,Fg[t](Ig,r)}(y,_,c,l)){var b=void 0,x=void 0,w=void 0,R=void 0,O=void 0,I=void 0,L=d.index;if(3==h&&"fill"==g.type)if(x=Mg(g,"paint","fill-opacity",l,c),"fill-pattern"in v){var M=Mg(g,"paint","fill-pattern",l,c);if(M){var F="string"==typeof M?Ng(M,r):M.toString();if(s&&i&&i[F]){++p,(I=P[p])&&I.getFill()&&!I.getStroke()&&!I.getText()||(I=P[p]=new lh({fill:new zl})),w=I.getFill(),I.setZIndex(L);var A=C[ut=F+"."+x];if(!A)(ct=(ht=dg((lt=i[F]).width,lt.height)).getContext("2d")).globalAlpha=x,ct.drawImage(s,lt.x,lt.y,lt.width,lt.height,0,0,lt.width,lt.height),A=ct.createPattern(ht,"repeat"),C[ut]=A;w.setColor(A)}}}else(b=Ag(Mg(g,"paint","fill-color",l,c),x))&&("fill-outline-color"in v&&(O=Ag(Mg(g,"paint","fill-outline-color",l,c),x)),O||(O=b),++p,(I=P[p])&&I.getFill()&&I.getStroke()&&!I.getText()||(I=P[p]=new lh({fill:new zl,stroke:new nh})),(w=I.getFill()).setColor(b),(R=I.getStroke()).setColor(O),R.setWidth(1),I.setZIndex(L));if(1!=h&&"line"==g.type){b=!("line-pattern"in v)&&"line-color"in v?Ag(Mg(g,"paint","line-color",l,c),Mg(g,"paint","line-opacity",l,c)):void 0;var k=Mg(g,"paint","line-width",l,c);b&&k>0&&(++p,(I=P[p])&&I.getStroke()&&!I.getFill()&&!I.getText()||(I=P[p]=new lh({stroke:new nh})),(R=I.getStroke()).setLineCap(Mg(g,"layout","line-cap",l,c)),R.setLineJoin(Mg(g,"layout","line-join",l,c)),R.setMiterLimit(Mg(g,"layout","line-miter-limit",l,c)),R.setColor(b),R.setWidth(k),R.setLineDash(v["line-dasharray"]?Mg(g,"paint","line-dasharray",l,c).map((function(t){return t*k})):null),I.setZIndex(L))}var N=!1,j=null,G=0,D=void 0,z=void 0,U=void 0;if((1==h||2==h)&&"icon-image"in m){var B=Mg(g,"layout","icon-image",l,c);if(B){D="string"==typeof B?Ng(B,r):B.toString();var Y=void 0;if(s&&i&&i[D]){var V=Mg(g,"layout","icon-rotation-alignment",l,c);if(2==h){var W=t.getGeometry();if(W.getFlatMidpoint||W.getFlatMidpoints){var q=W.getExtent();if(Math.sqrt(Math.max(Math.pow((q[2]-q[0])/e,2),Math.pow((q[3]-q[1])/e,2)))>150){var X="MultiLineString"===W.getType()?W.getFlatMidpoints():W.getFlatMidpoint();if(wg||(wg=new tg("Point",xg=[NaN,NaN],[],{},null)),Y=wg,xg[0]=X[0],xg[1]=X[1],"line"===(Lt=Mg(g,"layout","symbol-placement",l,c))&&"map"===V)for(var Z=W.getStride(),K=W.getFlatCoordinates(),H=0,J=K.length-Z;H<J;H+=Z){var $=K[H],Q=K[H+1],tt=K[H+Z],et=K[H+Z+1],rt=Math.min($,tt),nt=Math.min(Q,et),it=Math.max($,tt),ot=Math.max(Q,et);if(X[0]>=rt&&X[0]<=it&&X[1]>=nt&&X[1]<=ot){G=Math.atan2(Q-et,tt-$);break}}}}}if(2!==h||Y){++p,(I=P[p])&&I.getImage()&&!I.getFill()&&!I.getStroke()||(I=P[p]=new lh),I.setGeometry(Y);var at=Mg(g,"layout","icon-size",l,c),st=void 0!==v["icon-color"]?Mg(g,"paint","icon-color",l,c):null,ut=D+"."+at;if(null!==st&&(ut+="."+st),!(z=E[ut])){var lt=i[D];if(null!==st){var ht,ct;(ct=(ht=dg(lt.width,lt.height)).getContext("2d")).drawImage(s,lt.x,lt.y,lt.width,lt.height,0,0,lt.width,lt.height);for(var pt=ct.getImageData(0,0,ht.width,ht.height),ft=0,dt=pt.data.length;ft<dt;ft+=4){var gt=st.a;0!==gt&&(pt.data[ft]=255*st.r/gt,pt.data[ft+1]=255*st.g/gt,pt.data[ft+2]=255*st.b/gt),pt.data[ft+3]=gt}ct.putImageData(pt,0,0),z=E[ut]=new rh({img:ht,imgSize:[ht.width,ht.height],scale:at/lt.pixelRatio})}else z=E[ut]=new rh({img:s,imgSize:u,size:[lt.width,lt.height],offset:[lt.x,lt.y],rotateWithView:"map"===V,scale:at/lt.pixelRatio})}z.setRotation(G+pg(Mg(g,"layout","icon-rotate",l,c))),z.setOpacity(Mg(g,"paint","icon-opacity",l,c)),z.setAnchor(Rg[Mg(g,"layout","icon-anchor",l,c)]),I.setImage(z),j=I.getText(),I.setText(void 0),I.setZIndex(L),N=!0,U=!1}else U=!0}}}if(1==h&&"circle-radius"in v){++p,(I=P[p])&&I.getImage()&&!I.getFill()&&!I.getStroke()||(I=P[p]=new lh);var yt=Mg(g,"paint","circle-radius",l,c),mt=Ag(Mg(g,"paint","circle-stroke-color",l,c),Mg(g,"paint","circle-stroke-opacity",l,c)),vt=Ag(Mg(g,"paint","circle-color",l,c),Mg(g,"paint","circle-opacity",l,c)),_t=Mg(g,"paint","circle-stroke-width",l,c),bt=yt+"."+mt+"."+vt+"."+_t;(z=E[bt])||(z=E[bt]=new Dl({radius:yt,stroke:mt&&_t>0?new nh({width:_t,color:mt}):void 0,fill:vt?new zl({color:vt}):void 0})),I.setImage(z),j=I.getText(),I.setText(void 0),I.setGeometry(void 0),I.setZIndex(L),N=!0}var xt=void 0;if("text-field"in m)xt=Ng(Mg(g,"layout","text-field",l,c).toString(),r).trim(),x=Mg(g,"paint","text-opacity",l,c);if(xt&&x&&!U){N||(++p,(I=P[p])&&I.getText()&&!I.getFill()&&!I.getStroke()||(I=P[p]=new lh),I.setImage(void 0),I.setGeometry(void 0)),I.getText()||I.setText(j||new ph({padding:[2,2,2,2]})),j=I.getText();var wt=Math.round(Mg(g,"layout","text-size",l,c)),St=Mg(g,"layout","text-font",l,c),Tt=Mg(g,"layout","text-line-height",l,c),Et=hg()(a?a(St):St,wt,Tt),Ct=m["text-transform"];"uppercase"==Ct?xt=xt.toUpperCase():"lowercase"==Ct&&(xt=xt.toLowerCase());var Pt=Mg(g,"layout","text-max-width",l,c),Rt=Mg(g,"layout","text-letter-spacing",l,c),Ot=2==h?mg(xt,Rt):function t(e,r,n,i){if(-1!==e.indexOf("\n")){for(var o=e.split("\n"),a=[],s=0,u=o.length;s<u;++s)a.push(t(o[s],r,n,i));return a.join("\n")}var l=n+","+r+","+e+","+i,h=bg[l];if(!h){var c=e.split(" ");if(c.length>1){var p=vg();p.font=r;var f=p.measureText("M").width*n,d="";for(a=[],s=0,u=c.length;s<u;++s){var g=c[s],y=d+(d?" ":"")+g;_g(y,i)<=f?d=y:(d&&a.push(d),d=g)}d&&a.push(d);for(s=0;s<a.length;++s){var m=a[s];if(_g(m,i)<.35*f){var v=s>0?_g(a[s-1],i):1/0,_=s<a.length-1?_g(a[s+1],i):1/0;a.splice(s,1),v<_?(a[s-1]+=" "+m,s-=1):a[s]=m+" "+a[s]}}for(s=0,u=a.length-1;s<u;++s){var b=a[s],x=a[s+1];if(_g(b,i)>.7*f&&_g(x,i)<.6*f){var w=b.split(" "),S=w.pop();_g(S,i)<.2*f&&(a[s]=w.join(" "),a[s+1]=S+" "+x),u-=1}}h=a.join("\n")}else h=e;h=mg(h,i),bg[l]=h}return h}(xt,Et,Pt,Rt);j.setText(Ot),j.setFont(Et),j.setRotation(pg(Mg(g,"layout","text-rotate",l,c)));var It=Mg(g,"layout","text-anchor",l,c),Lt=N||1==h?"point":Mg(g,"layout","symbol-placement",l,c);j.setPlacement(Lt);var Mt=Mg(g,"paint","text-halo-width",l,c),Ft=Mg(g,"layout","text-offset",l,c),At=Mg(g,"paint","text-translate",l,c),kt=0,Nt=0;if("point"==Lt){var jt="center";-1!==It.indexOf("left")?(jt="left",Nt=Mt):-1!==It.indexOf("right")&&(jt="right",Nt=-Mt),j.setTextAlign(jt);var Gt=Mg(g,"layout","text-rotation-alignment",l,c);j.setRotateWithView("map"==Gt)}else j.setMaxAngle(pg(Mg(g,"layout","text-max-angle",l,c))*xt.length/Ot.length),j.setTextAlign(),j.setRotateWithView(!1);var Dt="middle";0==It.indexOf("bottom")?(Dt="bottom",kt=-Mt-.5*(Tt-1)*wt):0==It.indexOf("top")&&(Dt="top",kt=Mt+.5*(Tt-1)*wt),j.setTextBaseline(Dt),j.setOffsetX(Ft[0]*wt+Nt+At[0]),j.setOffsetY(Ft[1]*wt+kt+At[1]),T.setColor(Ag(Mg(g,"paint","text-color",l,c),x)),j.setFill(T);var zt=Ag(Mg(g,"paint","text-halo-color",l,c),x);if(zt){S.setColor(zt),Mt*=2;var Ut=.5*wt;S.setWidth(Mt<=Ut?Mt:Ut),j.setStroke(S)}else j.setStroke(void 0);var Bt=Mg(g,"layout","text-padding",l,c),Yt=j.getPadding();Bt!==Yt[0]&&(Yt[0]=Yt[1]=Yt[2]=Yt[3]=Bt),I.setZIndex(L)}}},g=0,y=o.length;g<y;++g)d(g);return p>-1?(P.length=p+1,P):void 0}};return t.setStyle(R),t.set("mapbox-source",c),t.set("mapbox-layers",d),R},Gg=r(6),Dg=r.n(Gg),zg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Ug(t){for(var e=[],r=0,n=t.length;r<n;++r)e.push(t[r].clone());return e}var Bg=function(t){function e(e){var r=t.call(this)||this;return r.geometries_=e||null,r.changeEventsKeys_=[],r.listenGeometriesChange_(),r}return zg(e,t),e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(X),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(W(this.geometries_[t],I,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t},e.prototype.closestPointXY=function(t,e,r,n){if(n<Bt(this.getExtent(),t,e))return n;for(var i=this.geometries_,o=0,a=i.length;o<a;++o)n=i[o].closestPointXY(t,e,r,n);return n},e.prototype.containsXY=function(t,e){for(var r=this.geometries_,n=0,i=r.length;n<i;++n)if(r[n].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){Kt(t);for(var e=this.geometries_,r=0,n=e.length;r<n;++r)Qt(t,e[r].getExtent());return t},e.prototype.getGeometries=function(){return Ug(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],e=this.geometries_,r=0,n=e.length;r<n;++r)e[r].getType()===this.getType()?t=t.concat(e[r].getGeometriesArrayRecursive()):t.push(e[r]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var r=[],n=this.geometries_,i=!1,o=0,a=n.length;o<a;++o){var s=n[o],u=s.getSimplifiedGeometry(t);r.push(u),u!==s&&(i=!0)}if(i){var l=new e(null);return l.setGeometriesArray(r),l}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return yt.GEOMETRY_COLLECTION},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,r=0,n=e.length;r<n;++r)if(e[r].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var r=this.geometries_,n=0,i=r.length;n<i;++n)r[n].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,r){var n=r;n||(n=ue(this.getExtent()));for(var i=this.geometries_,o=0,a=i.length;o<a;++o)i[o].scale(t,e,n);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(Ug(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,r=0,n=e.length;r<n;++r)e[r].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var r=this.geometries_,n=0,i=r.length;n<i;++n)r[n].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}(Yr),Yg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Vg(t){if("string"==typeof t){var e=JSON.parse(t);return e||null}return null!==t?t:null}var Wg=function(t){function e(){return t.call(this)||this}return Yg(e,t),e.prototype.getType=function(){return mu},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(Vg(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(Vg(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return n()},e.prototype.readFeaturesFromObject=function(t,e){return n()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(Vg(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return n()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(Vg(t))},e.prototype.readProjectionFromObject=function(t){return n()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return n()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return n()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return n()},e}(zd),qg=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Xg(t,e){if(!t)return null;var r;switch(t.type){case yt.POINT:r=function(t){return new gn(t.coordinates)}(t);break;case yt.LINE_STRING:r=function(t){return new Cd(t.coordinates)}(t);break;case yt.POLYGON:r=function(t){return new Ln(t.coordinates)}(t);break;case yt.MULTI_POINT:r=function(t){return new qd(t.coordinates)}(t);break;case yt.MULTI_LINE_STRING:r=function(t){return new Vd(t.coordinates)}(t);break;case yt.MULTI_POLYGON:r=function(t){return new Kd(t.coordinates)}(t);break;case yt.GEOMETRY_COLLECTION:r=function(t,e){var r=t.geometries.map((function(t){return Xg(t,e)}));return new Bg(r)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return Ud(r,!1,e)}function Zg(t,e){var r,n=(t=Ud(t,!0,e)).getType();switch(n){case yt.POINT:r=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case yt.LINE_STRING:r=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case yt.POLYGON:r=function(t,e){var r;e&&(r=e.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(r)}}(t,e);break;case yt.MULTI_POINT:r=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case yt.MULTI_LINE_STRING:r=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case yt.MULTI_POLYGON:r=function(t,e){var r;e&&(r=e.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(r)}}(t,e);break;case yt.GEOMETRY_COLLECTION:r=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){var r=T({},e);return delete r.featureProjection,Zg(t,r)}))}}(t,e);break;case yt.CIRCLE:r={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+n)}return r}var Kg,Hg=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this)||this).dataProjection=yr(n.dataProjection?n.dataProjection:"EPSG:4326"),n.featureProjection&&(r.defaultFeatureProjection=yr(n.featureProjection)),r.geometryName_=n.geometryName,r.extractGeometryName_=n.extractGeometryName,r}return qg(e,t),e.prototype.readFeatureFromObject=function(t,e){var r=null,n=Xg((r="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),i=new ct;return this.geometryName_?i.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in r!==void 0&&i.setGeometryName(r.geometry_name),i.setGeometry(n),"id"in r&&i.setId(r.id),r.properties&&i.setProperties(r.properties,!0),i},e.prototype.readFeaturesFromObject=function(t,e){var r=null;if("FeatureCollection"===t.type){r=[];for(var n=t.features,i=0,o=n.length;i<o;++i)r.push(this.readFeatureFromObject(n[i],e))}else r=[this.readFeatureFromObject(t,e)];return r},e.prototype.readGeometryFromObject=function(t,e){return Xg(t,e)},e.prototype.readProjectionFromObject=function(t){var e,r=t.crs;return r?"name"==r.type?e=yr(r.properties.name):"EPSG"===r.type?e=yr("EPSG:"+r.properties.code):lt(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var r={type:"Feature",geometry:null,properties:null},n=t.getId();if(void 0!==n&&(r.id=n),!t.hasProperties())return r;var i=t.getProperties(),o=t.getGeometry();return o&&(r.geometry=Zg(o,e),delete i[t.getGeometryName()]),P(i)||(r.properties=i),r},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var r=[],n=0,i=t.length;n<i;++n)r.push(this.writeFeatureObject(t[n],e));return{type:"FeatureCollection",features:r}},e.prototype.writeGeometryObject=function(t,e){return Zg(t,this.adaptOptions(e))},e}(Wg),Jg=/font-family: ?([^;]*);/,$g=/("|')/g;function Qg(t){if(!Kg){Kg={};for(var e=document.styleSheets,r=0,n=e.length;r<n;++r){var i=e[r];try{var o=i.rules||i.cssRules;if(o)for(var a=0,s=o.length;a<s;++a){var u=o[a];if(5==u.type){var l=u.cssText.match(Jg);Kg[l[1].replace($g,"")]=!0}}}catch(t){}}}return t in Kg}var ty={},ey=Dg.a.getNames();function ry(t){var e=t.toString();if(e in ty)return t;for(var r=t.map((function(t){var e=hg()(t,1).split(" ");return[e.slice(3).join(" ").replace(/"/g,""),e[1]+e[0]]})),n=0,i=r.length;n<i;++n){var o=r[n],a=o[0];if(!Qg(a)&&-1!==ey.indexOf(a)){var s="https://fonts.googleapis.com/css?family="+a.replace(/ /g,"+")+":"+o[1];if(!document.querySelector('link[href="'+s+'"]')){var u=document.createElement("link");u.href=s,u.rel="stylesheet",document.head.appendChild(u)}}}return ty[e]=!0,t}var ny=/^(.*)(\?.*)$/;function iy(t,e){return e&&0===t.indexOf(".")&&(t=e+t),t}function oy(t,e,r){var n=(t=iy(t,e)).match(ny);return n?n[1]+r+(n.length>2?n[2]:""):t+r}function ay(t,e,r,n,i){return new Promise((function(o,a){if("object"!=typeof e&&(e=JSON.parse(e)),8!=e.version)return a(new Error("glStyle version 8 required."));if(!(t instanceof Rd||t instanceof ug))return a(new Error("Can only apply to VectorLayer or VectorTileLayer"));var s,u,l;function h(){l||e.sprite&&!s?l?(t.setStyle(l),o()):a(new Error("Something went wrong trying to apply style.")):(l=jg(t,e,r,i,s,u,ry),t.getStyle()?o():a(new Error("Nothing to show for source ["+r+"]")))}if(e.sprite){var c=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",p=oy(e.sprite,n,c+".json");fetch(p,{credentials:"same-origin"}).then((function(t){return t.ok||""===c?t:(p=oy(e.sprite,n,".json"),fetch(p,{credentials:"same-origin"}))})).then((function(t){if(t.ok)return t.json();a(new Error("Problem fetching sprite from "+p+": "+t.statusText))})).then((function(t){if(void 0===t||0===Object.keys(t).length)return a(new Error("No sprites found."));s=t,u=oy(e.sprite,n,c+".png"),h()})).catch((function(t){a(new Error("Sprites cannot be loaded: "+p+": "+t.message))}))}else h()}))}new Hg;var sy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function uy(t){return 0!==t.indexOf("mapbox://")?"":t.slice("mapbox://".length)}var ly=function(t){function e(e){var r=t.call(this,L)||this;return r.error=e,r}return sy(e,t),e}(h),hy="vector",cy=function(t){function e(e){var r=this,n=!("declutter"in e)||e.declutter,i=new ff({state:Ci,format:new ag});return(r=t.call(this,{source:i,declutter:n,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,renderOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError})||this).sourceId=e.source,r.layers=e.layers,r.accessToken=e.accessToken,r.fetchStyle(e.styleUrl),r}return sy(e,t),e.prototype.fetchStyle=function(t){var e=this,r=function(t,e){var r=uy(t);if(!r)return t;if(0!==r.indexOf("styles/"))throw new Error("unexpected style url: "+t);return"https://api.mapbox.com/styles/v1/"+r.slice("styles/".length)+"?&access_token="+e}(t,this.accessToken);fetch(r).then((function(t){if(!t.ok)throw new Error("unexpected response when fetching style: "+t.status);return t.json()})).then((function(t){e.onStyleLoad(t)})).catch((function(t){e.handleError(t)}))},e.prototype.onStyleLoad=function(t){var e,r,n=this;if(this.layers){for(var i={},o=0;o<t.layers.length;++o){var a=t.layers[o];a.source&&(i[a.id]=a.source)}var s=void 0;for(o=0;o<this.layers.length;++o){var u=i[this.layers[o]];if(!u)return void this.handleError(new Error("could not find source for "+this.layers[o]));if(s){if(s!==u)return void this.handleError(new Error("layers can only use a single source, found "+s+" and "+u))}else s=u}e=s,r=this.layers}else r=e=this.sourceId;r||(r=e=Object.keys(t.sources)[0]),t.sprite&&(t.sprite=function(t,e){var r=uy(t);if(!r)return t;if(0!==r.indexOf("sprites/"))throw new Error("unexpected sprites url: "+t);return"https://api.mapbox.com/styles/v1/"+r.slice("sprites/".length)+"/sprite?access_token="+e}(t.sprite,this.accessToken)),t.glyphs&&(t.glyphs=function(t,e){var r=uy(t);if(!r)return t;if(0!==r.indexOf("fonts/"))throw new Error("unexpected fonts url: "+t);return"https://api.mapbox.com/fonts/v1/"+r.slice("fonts/".length)+"/0-255.pbf?access_token="+e}(t.glyphs,this.accessToken));var l=t.sources[e];if(l.type===hy){var h,c,p,f=this.getSource();f.setUrl((h=l.url,c=this.accessToken,(p=uy(h))?"https://{a-d}.tiles.mapbox.com/v4/"+p+"/{z}/{x}/{y}.vector.pbf?access_token="+c:h)),ay(this,t,r).then((function(){f.setState(Pi)})).catch((function(t){n.handleError(t)}))}else this.handleError(new Error("only works for vector sources, found "+l.type))},e.prototype.handleError=function(t){this.dispatchEvent(new ly(t)),this.getSource().setState(Ri)},e}(ug),py=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fy=function(t){function e(e){var r=this,n=e||{},i=T({},n);return delete i.imageRatio,(r=t.call(this,i)||this).imageRatio_=void 0!==n.imageRatio?n.imageRatio:1,r}return py(e,t),e.prototype.getImageRatio=function(){return this.imageRatio_},e.prototype.createRenderer=function(){return new gd(this)},e}(xf),dy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gy="addfeatures",yy=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.features=n,o.file=r,o.projection=i,o}return dy(e,t),e}(h),my=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,{handleEvent:x})||this).formatConstructors_=n.formatConstructors?n.formatConstructors:[],r.projection_=n.projection?yr(n.projection):null,r.dropListenKeys_=null,r.source_=n.source||null,r.target=n.target?n.target:null,r}return dy(e,t),e.prototype.handleResult_=function(t,e){var r=e.target.result,n=this.getMap(),i=this.projection_;i||(i=n.getView().getProjection());for(var o=this.formatConstructors_,a=0,s=o.length;a<s;++a){var u=new o[a],l=this.tryReadFeatures_(u,r,{featureProjection:i});if(l&&l.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(l)),this.dispatchEvent(new yy(gy,t,l,i));break}}},e.prototype.registerListeners_=function(){var t=this.getMap();if(t){var e=this.target?this.target:t.getViewport();this.dropListenKeys_=[W(e,G,this.handleDrop,this),W(e,N,this.handleStop,this),W(e,j,this.handleStop,this),W(e,G,this.handleStop,this)]}},e.prototype.setActive=function(e){!this.getActive()&&e&&this.registerListeners_(),this.getActive()&&!e&&this.unregisterListeners_(),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},e.prototype.tryReadFeatures_=function(t,e,r){try{return t.readFeatures(e,r)}catch(t){return null}},e.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(X),this.dropListenKeys_=null)},e.prototype.handleDrop=function(t){for(var e=t.dataTransfer.files,r=0,n=e.length;r<n;++r){var i=e.item(r),o=new FileReader;o.addEventListener(U,this.handleResult_.bind(this,i)),o.readAsText(i)}},e.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},e}(es),vy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_y=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).condition_=n.condition?n.condition:ms,r.lastAngle_=void 0,r.lastMagnitude_=void 0,r.lastScaleDelta_=0,r.duration_=void 0!==n.duration?n.duration:400,r}return vy(e,t),e.prototype.handleDragEvent=function(t){if(_s(t)){var e=t.map,r=e.getSize(),n=t.pixel,i=n[0]-r[0]/2,o=r[1]/2-n[1],a=Math.atan2(o,i),s=Math.sqrt(i*i+o*o),u=e.getView();if(void 0!==this.lastAngle_){var l=this.lastAngle_-a;u.adjustRotationInternal(l)}this.lastAngle_=a,void 0!==this.lastMagnitude_&&u.adjustResolutionInternal(this.lastMagnitude_/s),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/s),this.lastMagnitude_=s}},e.prototype.handleUpEvent=function(t){if(!_s(t))return!0;var e=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,r),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return!!_s(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))},e}(as),by=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),xy=function(t){function e(e,r,n){var i=t.call(this)||this;if(void 0!==n&&void 0===r)i.setFlatCoordinates(n,e);else{var o=r||0;i.setCenterAndRadius(e,o,n)}return i}return by(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),void 0,this.layout)},e.prototype.closestPointXY=function(t,e,r,n){var i=this.flatCoordinates,o=t-i[0],a=e-i[1],s=o*o+a*a;if(s<n){if(0===s)for(var u=0;u<this.stride;++u)r[u]=i[u];else{var l=this.getRadius()/Math.sqrt(s);r[0]=i[0]+l*o,r[1]=i[1]+l*a;for(u=2;u<this.stride;++u)r[u]=i[u]}return r.length=this.stride,s}return n},e.prototype.containsXY=function(t,e){var r=this.flatCoordinates,n=t-r[0],i=e-r[1];return n*n+i*i<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,r=e[this.stride]-e[0];return Zt(e[0]-r,e[1]-r,e[0]+r,e[1]+r,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return yt.CIRCLE},e.prototype.intersectsExtent=function(t){if(ye(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||ie(t,this.intersectsCoordinate.bind(this)))}return!1},e.prototype.setCenter=function(t){var e=this.stride,r=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+r;for(var i=1;i<e;++i)n[e+i]=t[i];this.setFlatCoordinates(this.layout,n),this.changed()},e.prototype.setCenterAndRadius=function(t,e,r){this.setLayout(r,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var n=this.flatCoordinates,i=$r(n,0,t,this.stride);n[i++]=n[0]+e;for(var o=1,a=this.stride;o<a;++o)n[i++]=n[o];n.length=i,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var r=this.getCenter(),n=this.getStride();this.setCenter(Dr(r,0,r.length,n,t,e,r)),this.changed()},e.prototype.translate=function(t,e){var r=this.getCenter(),n=this.getStride();this.setCenter(zr(r,0,r.length,n,t,e,r)),this.changed()},e}(qr);xy.prototype.transform;var wy=xy,Sy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ty="Point",Ey="LineString",Cy="Polygon",Py="Circle",Ry="drawstart",Oy="drawend",Iy="drawabort",Ly=function(t){function e(e,r){var n=t.call(this,e)||this;return n.feature=r,n}return Sy(e,t),e}(h);var My=function(t){function e(e){var r=this,n=e;n.stopDown||(n.stopDown=w),(r=t.call(this,n)||this).shouldHandle_=!1,r.downPx_=null,r.downTimeout_,r.lastDragTime_,r.freehand_=!1,r.source_=e.source?e.source:null,r.features_=e.features?e.features:null,r.snapTolerance_=e.snapTolerance?e.snapTolerance:12,r.type_=e.type,r.mode_=function(t){var e;t===yt.POINT||t===yt.MULTI_POINT?e=Ty:t===yt.LINE_STRING||t===yt.MULTI_LINE_STRING?e=Ey:t===yt.POLYGON||t===yt.MULTI_POLYGON?e=Cy:t===yt.CIRCLE&&(e=Py);return e}(r.type_),r.stopClick_=!!e.stopClick,r.minPoints_=e.minPoints?e.minPoints:r.mode_===Cy?3:2,r.maxPoints_=e.maxPoints?e.maxPoints:1/0,r.finishCondition_=e.finishCondition?e.finishCondition:x;var i,o=e.geometryFunction;if(!o)if(r.type_===yt.CIRCLE)o=function(t,e,r){var n=e||new wy([NaN,NaN]),i=Ar(t[0],r),o=sr(i,Ar(t[1],r));n.setCenterAndRadius(i,Math.sqrt(o));var a=Mr();return a&&n.transform(r,a),n};else{var a,s=r.mode_;s===Ty?a=gn:s===Ey?a=Cd:s===Cy&&(a=Ln),o=function(t,e,r){var n=e;return n?s===Cy?t[0].length?n.setCoordinates([t[0].concat([t[0][0]])]):n.setCoordinates([]):n.setCoordinates(t):n=new a(t),n}}return r.geometryFunction_=o,r.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,r.finishCoordinate_=null,r.sketchFeature_=null,r.sketchPoint_=null,r.sketchCoords_=null,r.sketchLine_=null,r.sketchLineCoords_=null,r.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,r.overlay_=new Rd({source:new cc({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(i=sh(),function(t,e){return i[t.getGeometry().getType()]}),updateWhileInteracting:!0}),r.geometryName_=e.geometryName,r.condition_=e.condition?e.condition:ys,r.freehandCondition_,e.freehand?r.freehandCondition_=ps:r.freehandCondition_=e.freehandCondition?e.freehandCondition:ms,r.addEventListener(et($a),r.updateState_),r}return Sy(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){e.originalEvent.type===F&&e.preventDefault(),this.freehand_=this.mode_!==Ty&&this.freehandCondition_(e);var r=e.type===Ho.POINTERMOVE,n=!0;!this.freehand_&&this.lastDragTime_&&e.type===Ho.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,r=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&e.type===Ho.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),n=!1):this.freehand_&&e.type===Ho.POINTERDOWN?n=!1:r?(n=e.type===Ho.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.preventDefault()):("mouse"==e.originalEvent.pointerType||e.type===Ho.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===Ho.DBLCLICK&&(n=!1),t.prototype.handleEvent.call(this,e)&&n},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new Ko(Ho.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t);var r=this.mode_===Py;return this.shouldHandle_?(this.finishCoordinate_?this.freehand_||r?this.finishDrawing():this.atFinish_(t)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate):(this.startDrawing_(t),this.mode_===Ty&&this.finishDrawing()),e=!1):this.freehand_&&this.abortDrawing(),!e&&this.stopClick_&&t.stopPropagation(),e},e.prototype.handlePointerMove_=function(t){if(this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,r=t.pixel,n=e[0]-r[0],i=e[1]-r[1],o=n*n+i*i;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t):this.createOrUpdateSketchPoint_(t)},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var r=!1,n=[this.finishCoordinate_];if(this.mode_===Ey)r=this.sketchCoords_.length>this.minPoints_;else if(this.mode_===Cy){var i=this.sketchCoords_;r=i[0].length>this.minPoints_,n=[i[0][0],i[0][i[0].length-2]]}if(r)for(var o=t.map,a=0,s=n.length;a<s;a++){var u=n[a],l=o.getPixelFromCoordinate(u),h=t.pixel,c=h[0]-l[0],p=h[1]-l[1],f=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(c*c+p*p)<=f){this.finishCoordinate_=u;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){var e=t.coordinate.slice();this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new ct(new gn(e)),this.updateSketchFeatures_())},e.prototype.startDrawing_=function(t){var e=t.coordinate,r=t.map.getView().getProjection();this.finishCoordinate_=e,this.mode_===Ty?this.sketchCoords_=e.slice():this.mode_===Cy?(this.sketchCoords_=[[e.slice(),e.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[e.slice(),e.slice()],this.sketchLineCoords_&&(this.sketchLine_=new ct(new Cd(this.sketchLineCoords_)));var n=this.geometryFunction_(this.sketchCoords_,void 0,r);this.sketchFeature_=new ct,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(n),this.updateSketchFeatures_(),this.dispatchEvent(new Ly(Ry,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,r,n,i=t.coordinate,o=this.sketchFeature_.getGeometry(),a=t.map.getView().getProjection();(this.mode_===Ty?r=this.sketchCoords_:this.mode_===Cy?(r=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(t)&&(i=this.finishCoordinate_.slice())):r=(e=this.sketchCoords_)[e.length-1],r[0]=i[0],r[1]=i[1],this.geometryFunction_(this.sketchCoords_,o,a),this.sketchPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(i);if(o.getType()==yt.POLYGON&&this.mode_!==Cy){this.sketchLine_||(this.sketchLine_=new ct);var s=o.getLinearRing(0);(n=this.sketchLine_.getGeometry())?(n.setFlatCoordinates(s.getLayout(),s.getFlatCoordinates()),n.changed()):(n=new Cd(s.getFlatCoordinates(),s.getLayout()),this.sketchLine_.setGeometry(n))}else this.sketchLineCoords_&&(n=this.sketchLine_.getGeometry()).setCoordinates(this.sketchLineCoords_);this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,r,n=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection();this.mode_===Ey?(this.finishCoordinate_=t.slice(),(r=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?r.pop():e=!0),r.push(t.slice()),this.geometryFunction_(r,n,i)):this.mode_===Cy&&((r=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?r.pop():e=!0),r.push(t.slice()),e&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,n,i)),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection();this.mode_===Ey?((t=this.sketchCoords_).splice(-2,1),this.geometryFunction_(t,e,r),t.length>=2&&(this.finishCoordinate_=t[t.length-2].slice())):this.mode_===Cy&&((t=this.sketchCoords_[0]).splice(-2,1),this.sketchLine_.getGeometry().setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,r)),0===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,r=t.getGeometry(),n=this.getMap().getView().getProjection();this.mode_===Ey?(e.pop(),this.geometryFunction_(e,r,n)):this.mode_===Cy&&(e[0].pop(),this.geometryFunction_(e,r,n),e=r.getCoordinates()),this.type_===yt.MULTI_POINT?t.setGeometry(new qd([e])):this.type_===yt.MULTI_LINE_STRING?t.setGeometry(new Vd([e])):this.type_===yt.MULTI_POLYGON&&t.setGeometry(new Kd([e])),this.dispatchEvent(new Ly(Oy,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new Ly(Iy,t))},e.prototype.appendCoordinates=function(t){var e=this.mode_,r=[];e===Ey?r=this.sketchCoords_:e===Cy&&(r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]);for(var n=r.pop(),i=0;i<t.length;i++)this.addToDrawing_(t[i]);this.addToDrawing_(n)},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var r=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=r.slice(),this.sketchCoords_.push(r.slice()),this.updateSketchFeatures_(),this.dispatchEvent(new Ly(Ry,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},e}(as),Fy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ay="extentchanged",ky=function(t){function e(e){var r=t.call(this,Ay)||this;return r.extent=e,r}return Fy(e,t),e}(h);function Ny(){var t=sh();return function(e,r){return t[yt.POINT]}}function jy(t){return function(e){return Dt([t,e])}}function Gy(t,e){return t[0]==e[0]?function(r){return Dt([t,[r[0],e[1]]])}:t[1]==e[1]?function(r){return Dt([t,[e[0],r[1]]])}:null}var Dy=function(t){function e(e){var r,n=this,i=e||{};return(n=t.call(this,i)||this).condition_=i.condition?i.condition:ps,n.extent_=null,n.pointerHandler_=null,n.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,n.snappedToVertex_=!1,n.extentFeature_=null,n.vertexFeature_=null,e||(e={}),n.extentOverlay_=new Rd({source:new cc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.boxStyle?e.boxStyle:(r=sh(),function(t,e){return r[yt.POLYGON]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.vertexOverlay_=new Rd({source:new cc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.pointerStyle?e.pointerStyle:Ny(),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.extent&&n.setExtent(e.extent),n}return Fy(e,t),e.prototype.snapToVertex_=function(t,e){var r=e.getCoordinateFromPixelInternal(t),n=this.getExtentInternal();if(n){var i=function(t){return[[[t[0],t[1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(n);i.sort((function(t,e){return lr(r,t)-lr(r,e)}));var o=i[0],a=er(r,o),s=e.getPixelFromCoordinateInternal(a);if(ur(t,s)<=this.pixelTolerance_){var u=e.getPixelFromCoordinateInternal(o[0]),l=e.getPixelFromCoordinateInternal(o[1]),h=sr(s,u),c=sr(s,l),p=Math.sqrt(Math.min(h,c));return this.snappedToVertex_=p<=this.pixelTolerance_,this.snappedToVertex_&&(a=h>c?o[1]:o[0]),a}}return null},e.prototype.handlePointerMove_=function(t){var e=t.pixel,r=t.map,n=this.snapToVertex_(e,r);n||(n=r.getCoordinateFromPixelInternal(e)),this.createOrUpdatePointerFeature_(n)},e.prototype.createOrUpdateExtentFeature_=function(t){var e=this.extentFeature_;return e?t?e.setGeometry(Fn(t)):e.setGeometry(void 0):(e=new ct(t?Fn(t):{}),this.extentFeature_=e,this.extentOverlay_.getSource().addFeature(e)),e},e.prototype.createOrUpdatePointerFeature_=function(t){var e=this.vertexFeature_;e?e.getGeometry().setCoordinates(t):(e=new ct(new gn(t)),this.vertexFeature_=e,this.vertexOverlay_.getSource().addFeature(e));return e},e.prototype.handleEvent=function(e){return!e.originalEvent||!this.condition_(e)||(e.type!=Ho.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),t.prototype.handleEvent.call(this,e),!1)},e.prototype.handleDownEvent=function(t){var e=t.pixel,r=t.map,n=this.getExtentInternal(),i=this.snapToVertex_(e,r),o=function(t){var e=null,r=null;return t[0]==n[0]?e=n[2]:t[0]==n[2]&&(e=n[0]),t[1]==n[1]?r=n[3]:t[1]==n[3]&&(r=n[1]),null!==e&&null!==r?[e,r]:null};if(i&&n){var a=i[0]==n[0]||i[0]==n[2]?i[0]:null,s=i[1]==n[1]||i[1]==n[3]?i[1]:null;null!==a&&null!==s?this.pointerHandler_=jy(o(i)):null!==a?this.pointerHandler_=Gy(o([a,n[1]]),o([a,n[3]])):null!==s&&(this.pointerHandler_=Gy(o([n[0],s]),o([n[2],s])))}else i=r.getCoordinateFromPixelInternal(e),this.setExtent([i[0],i[1],i[0],i[1]]),this.pointerHandler_=jy(i);return!0},e.prototype.handleDragEvent=function(t){if(this.pointerHandler_){var e=t.coordinate;this.setExtent(this.pointerHandler_(e)),this.createOrUpdatePointerFeature_(e)}},e.prototype.handleUpEvent=function(t){this.pointerHandler_=null;var e=this.getExtentInternal();return e&&0!==oe(e)||this.setExtent(null),!1},e.prototype.setMap=function(e){this.extentOverlay_.setMap(e),this.vertexOverlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getExtent=function(){return kr(this.getExtentInternal(),this.getMap().getView().getProjection())},e.prototype.getExtentInternal=function(){return this.extent_},e.prototype.setExtent=function(t){this.extent_=t||null,this.createOrUpdateExtentFeature_(t),this.dispatchEvent(new ky(this.extent_))},e}(as),zy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Uy=[0,0,0,0],By=[],Yy="modifystart",Vy="modifyend",Wy=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.features=r,i.mapBrowserEvent=n,i}return zy(e,t),e}(h);function qy(t,e){return t.index-e.index}function Xy(t,e,r){var n=e.geometry;if(n.getType()===yt.CIRCLE){var i=n;if(1===e.index){var o=Mr();o&&(i=i.clone().transform(o,r));var a=sr(i.getCenter(),Ar(t,r)),s=Math.sqrt(a)-i.getRadius();return s*s}}var u=Ar(t,r);return By[0]=Ar(e.segment[0],r),By[1]=Ar(e.segment[1],r),lr(u,By)}function Zy(t,e,r){var n=e.geometry;if(n.getType()===yt.CIRCLE&&1===e.index){var i=n,o=Mr();return o&&(i=i.clone().transform(o,r)),Fr(i.getClosestPoint(Ar(t,r)),r)}var a=Ar(t,r);return By[0]=Ar(e.segment[0],r),By[1]=Ar(e.segment[1],r),Fr(er(a,By),r)}var Ky=function(t){function e(e){var r,n,i=t.call(this,e)||this;if(i.boundHandleFeatureChange_=i.handleFeatureChange_.bind(i),i.condition_=e.condition?e.condition:bs,i.defaultDeleteCondition_=function(t){return us(t)&&gs(t)},i.deleteCondition_=e.deleteCondition?e.deleteCondition:i.defaultDeleteCondition_,i.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:ps,i.vertexFeature_=null,i.vertexSegments_=null,i.lastPixel_=[0,0],i.ignoreNextSingleClick_=!1,i.modified_=!1,i.rBush_=new ic,i.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,i.snappedToVertex_=!1,i.changingFeature_=!1,i.dragSegments_=[],i.overlay_=new Rd({source:new cc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:(r=sh(),function(t,e){return r[yt.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),i.SEGMENT_WRITERS_={Point:i.writePointGeometry_.bind(i),LineString:i.writeLineStringGeometry_.bind(i),LinearRing:i.writeLineStringGeometry_.bind(i),Polygon:i.writePolygonGeometry_.bind(i),MultiPoint:i.writeMultiPointGeometry_.bind(i),MultiLineString:i.writeMultiLineStringGeometry_.bind(i),MultiPolygon:i.writeMultiPolygonGeometry_.bind(i),Circle:i.writeCircleGeometry_.bind(i),GeometryCollection:i.writeGeometryCollectionGeometry_.bind(i)},i.source_=null,e.source?(i.source_=e.source,n=new ut(i.source_.getFeatures()),i.source_.addEventListener(oc,i.handleSourceAdd_.bind(i)),i.source_.addEventListener(uc,i.handleSourceRemove_.bind(i))):n=e.features,!n)throw new Error("The modify interaction requires features or a source");return i.features_=n,i.features_.forEach(i.addFeature_.bind(i)),i.features_.addEventListener(nt,i.handleFeatureAdd_.bind(i)),i.features_.addEventListener(it,i.handleFeatureRemove_.bind(i)),i.lastPointerEvent_=null,i}return zy(e,t),e.prototype.addFeature_=function(t){var e=t.getGeometry();if(e){var r=this.SEGMENT_WRITERS_[e.getType()];r&&r(t,e)}var n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(I,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t){this.modified_||(this.modified_=!0,this.dispatchEvent(new Wy(Yy,this.features_,t)))},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(I,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,r=[];e.forEach((function(e){t===e.feature&&r.push(e)}));for(var n=r.length-1;n>=0;--n){for(var i=r[n],o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===i&&this.dragSegments_.splice(o,1);e.remove(i)}},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){var e=t.element;this.removeFeature_(e)},e.prototype.writePointGeometry_=function(t,e){var r=e.getCoordinates(),n={feature:t,geometry:e,segment:[r,r]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n){var o=r[n],a={feature:t,geometry:e,depth:[n],index:n,segment:[o,o]};this.rBush_.insert(e.getExtent(),a)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length-1;n<i;++n){var o=r.slice(n,n+2),a={feature:t,geometry:e,index:n,segment:o};this.rBush_.insert(Dt(o),a)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length-1;a<s;++a){var u=o.slice(a,a+2),l={feature:t,geometry:e,depth:[n],index:a,segment:u};this.rBush_.insert(Dt(u),l)}},e.prototype.writePolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length-1;a<s;++a){var u=o.slice(a,a+2),l={feature:t,geometry:e,depth:[n],index:a,segment:u};this.rBush_.insert(Dt(u),l)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length;a<s;++a)for(var u=o[a],l=0,h=u.length-1;l<h;++l){var c=u.slice(l,l+2),p={feature:t,geometry:e,depth:[a,n],index:l,segment:c};this.rBush_.insert(Dt(c),p)}},e.prototype.writeCircleGeometry_=function(t,e){var r=e.getCenter(),n={feature:t,geometry:e,index:0,segment:[r,r]},i={feature:t,geometry:e,index:1,segment:[r,r]},o=[n,i];n.featureSegments=o,i.featureSegments=o,this.rBush_.insert(Ht(r),n);var a=e,s=Mr();if(s&&this.getMap()){var u=this.getMap().getView().getProjection();a=An(a=a.clone().transform(s,u)).transform(u,s)}this.rBush_.insert(a.getExtent(),i)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var r=e.getGeometriesArray(),n=0;n<r.length;++n){var i=r[n];(0,this.SEGMENT_WRITERS_[i.getType()])(t,i)}},e.prototype.createOrUpdateVertexFeature_=function(t){var e=this.vertexFeature_;e?e.getGeometry().setCoordinates(t):(e=new ct(new gn(t)),this.vertexFeature_=e,this.overlay_.getSource().addFeature(e));return e},e.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=Ho.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(r=!(e.type!=Ho.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==Ho.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!r);var r},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t);for(var e=t.coordinate,r=0,n=this.dragSegments_.length;r<n;++r){for(var i=this.dragSegments_[r],o=i[0],a=o.depth,s=o.geometry,u=void 0,l=o.segment,h=i[1];e.length<s.getStride();)e.push(l[h][e.length]);switch(s.getType()){case yt.POINT:u=e,l[0]=e,l[1]=e;break;case yt.MULTI_POINT:(u=s.getCoordinates())[o.index]=e,l[0]=e,l[1]=e;break;case yt.LINE_STRING:(u=s.getCoordinates())[o.index+h]=e,l[h]=e;break;case yt.MULTI_LINE_STRING:case yt.POLYGON:(u=s.getCoordinates())[a[0]][o.index+h]=e,l[h]=e;break;case yt.MULTI_POLYGON:(u=s.getCoordinates())[a[1]][a[0]][o.index+h]=e,l[h]=e;break;case yt.CIRCLE:if(l[0]=e,l[1]=e,0===o.index)this.changingFeature_=!0,s.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0;var c=t.map.getView().getProjection(),p=ur(Ar(s.getCenter(),c),Ar(e,c)),f=Mr();if(f){var d=s.clone().transform(f,c);d.setRadius(p),p=d.transform(c,f).getRadius()}s.setRadius(p),this.changingFeature_=!1}}u&&this.setGeometryCoordinates_(s,u)}this.createOrUpdateVertexFeature_(e)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.modified_=!1;var r=this.vertexFeature_;if(r){var n=t.map.getView().getProjection(),i=[],a=r.getGeometry().getCoordinates(),s=Dt([a]),u=this.rBush_.getInExtent(s),l={};u.sort(qy);for(var h=0,c=u.length;h<c;++h){var p=u[h],f=p.segment,d=o(p.geometry),g=p.depth;if(g&&(d+="-"+g.join("-")),l[d]||(l[d]=new Array(2)),p.geometry.getType()!==yt.CIRCLE||1!==p.index)if(!ir(f[0],a)||l[d][0])if(!ir(f[1],a)||l[d][1])o(f)in this.vertexSegments_&&!l[d][0]&&!l[d][1]&&this.insertVertexCondition_(t)&&i.push([p,a]);else{if((p.geometry.getType()===yt.LINE_STRING||p.geometry.getType()===yt.MULTI_LINE_STRING)&&l[d][0]&&0===l[d][0].index)continue;this.dragSegments_.push([p,1]),l[d][1]=p}else this.dragSegments_.push([p,0]),l[d][0]=p;else ir(Zy(e,p,n),a)&&!l[d][0]&&(this.dragSegments_.push([p,0]),l[d][0]=p)}i.length&&this.willModifyFeatures_(t);for(var y=i.length-1;y>=0;--y)this.insertVertex_.apply(this,i[y])}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var r=this.dragSegments_[e][0],n=r.geometry;if(n.getType()===yt.CIRCLE){var i=n.getCenter(),o=r.featureSegments[0],a=r.featureSegments[1];o.segment[0]=i,o.segment[1]=i,a.segment[0]=i,a.segment[1]=i,this.rBush_.update(Ht(i),o);var s=n,u=Mr();if(u){var l=t.map.getView().getProjection();s=An(s=s.clone().transform(u,l)).transform(l,u)}this.rBush_.update(s.getExtent(),a)}else this.rBush_.update(Dt(r.segment),r)}return this.modified_&&(this.dispatchEvent(new Wy(Vy,this.features_,t)),this.modified_=!1),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,e,r){var n=r||e.getCoordinateFromPixel(t),i=e.getView().getProjection(),a=kr(zt(Nr(Ht(n,Uy),i),e.getView().getResolution()*this.pixelTolerance_,Uy),i),s=this.rBush_.getInExtent(a);if(s.length>0){s.sort((function(t,e){return Xy(n,t,i)-Xy(n,e,i)}));var u=s[0],l=u.segment,h=Zy(n,u,i),c=e.getPixelFromCoordinate(h),p=ur(t,c);if(p<=this.pixelTolerance_){var f={};if(u.geometry.getType()===yt.CIRCLE&&1===u.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h);else{var d=e.getPixelFromCoordinate(l[0]),g=e.getPixelFromCoordinate(l[1]),y=sr(c,d),m=sr(c,g);p=Math.sqrt(Math.min(y,m)),this.snappedToVertex_=p<=this.pixelTolerance_,this.snappedToVertex_&&(h=y>m?l[1]:l[0]),this.createOrUpdateVertexFeature_(h);for(var v=1,_=s.length;v<_;++v){var b=s[v].segment;if(!(ir(l[0],b[0])&&ir(l[1],b[1])||ir(l[0],b[1])&&ir(l[1],b[0])))break;f[o(b)]=!0}}return f[o(l)]=!0,void(this.vertexSegments_=f)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var r,n=t.segment,i=t.feature,o=t.geometry,a=t.depth,s=t.index;e.length<o.getStride();)e.push(0);switch(o.getType()){case yt.MULTI_LINE_STRING:case yt.POLYGON:(r=o.getCoordinates())[a[0]].splice(s+1,0,e);break;case yt.MULTI_POLYGON:(r=o.getCoordinates())[a[1]][a[0]].splice(s+1,0,e);break;case yt.LINE_STRING:(r=o.getCoordinates()).splice(s+1,0,e);break;default:return}this.setGeometryCoordinates_(o,r);var u=this.rBush_;u.remove(t),this.updateSegmentIndices_(o,s,a,1);var l={segment:[n[0],e],feature:i,geometry:o,depth:a,index:s};u.insert(Dt(l.segment),l),this.dragSegments_.push([l,1]);var h={segment:[e,n[1]],feature:i,geometry:o,depth:a,index:s+1};u.insert(Dt(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Ho.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t);var e=this.removeVertex_();return this.dispatchEvent(new Wy(Vy,this.features_,t)),this.modified_=!1,e}return!1},e.prototype.removeVertex_=function(){var t,e,r,n,i,a,s,u,l,h,c,p=this.dragSegments_,f={},d=!1;for(i=p.length-1;i>=0;--i)c=o((h=(r=p[i])[0]).feature),h.depth&&(c+="-"+h.depth.join("-")),c in f||(f[c]={}),0===r[1]?(f[c].right=h,f[c].index=h.index):1==r[1]&&(f[c].left=h,f[c].index=h.index+1);for(c in f){switch(l=f[c].right,s=f[c].left,(u=(a=f[c].index)-1)<0&&(u=0),t=e=(n=(h=void 0!==s?s:l).geometry).getCoordinates(),d=!1,n.getType()){case yt.MULTI_LINE_STRING:e[h.depth[0]].length>2&&(e[h.depth[0]].splice(a,1),d=!0);break;case yt.LINE_STRING:e.length>2&&(e.splice(a,1),d=!0);break;case yt.MULTI_POLYGON:t=t[h.depth[1]];case yt.POLYGON:(t=t[h.depth[0]]).length>4&&(a==t.length-1&&(a=0),t.splice(a,1),d=!0,0===a&&(t.pop(),t.push(t[0]),u=t.length-1))}if(d){this.setGeometryCoordinates_(n,e);var g=[];if(void 0!==s&&(this.rBush_.remove(s),g.push(s.segment[0])),void 0!==l&&(this.rBush_.remove(l),g.push(l.segment[1])),void 0!==s&&void 0!==l){var y={depth:h.depth,feature:h.feature,geometry:h.geometry,index:u,segment:g};this.rBush_.insert(Dt(y.segment),y)}this.updateSegmentIndices_(n,a,h.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),p.length=0}}return d},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,r,n){this.rBush_.forEachInExtent(t.getExtent(),(function(i){i.geometry===t&&(void 0===r||void 0===i.depth||_(i.depth,r))&&i.index>e&&(i.index+=n)}))},e}(as),Hy=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jy="select",$y=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.selected=r,o.deselected=n,o.mapBrowserEvent=i,o}return Hy(e,t),e}(h),Qy={};var tm=function(t){function e(e){var r,n,i=t.call(this)||this,o=e||{};if(i.boundAddFeature_=i.addFeature_.bind(i),i.boundRemoveFeature_=i.removeFeature_.bind(i),i.condition_=o.condition?o.condition:gs,i.addCondition_=o.addCondition?o.addCondition:ds,i.removeCondition_=o.removeCondition?o.removeCondition:ds,i.toggleCondition_=o.toggleCondition?o.toggleCondition:ms,i.multi_=!!o.multi&&o.multi,i.filter_=o.filter?o.filter:x,i.hitTolerance_=o.hitTolerance?o.hitTolerance:0,i.style_=void 0!==o.style?o.style:(m((r=sh())[yt.POLYGON],r[yt.LINE_STRING]),m(r[yt.GEOMETRY_COLLECTION],r[yt.LINE_STRING]),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),i.features_=o.features||new ut,o.layers)if("function"==typeof o.layers)n=o.layers;else{var a=o.layers;n=function(t){return d(a,t)}}else n=x;return i.layerFilter_=n,i.featureLayerAssociation_={},i}return Hy(e,t),e.prototype.addFeatureLayerAssociation_=function(t,e){this.featureLayerAssociation_[o(t)]=e},e.prototype.getFeatures=function(){return this.features_},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[o(t)]},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),t.prototype.setMap.call(this,e),e?(this.features_.addEventListener(nt,this.boundAddFeature_),this.features_.addEventListener(it,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(nt,this.boundAddFeature_),this.features_.removeEventListener(it,this.boundRemoveFeature_))},e.prototype.addFeature_=function(t){var e=t.element;this.style_&&this.applySelectedStyle_(e)},e.prototype.removeFeature_=function(t){var e=t.element;this.style_&&this.restorePreviousStyle_(e)},e.prototype.getStyle=function(){return this.style_},e.prototype.applySelectedStyle_=function(t){var e=o(t);e in Qy||(Qy[e]=t.getStyle()),t.setStyle(this.style_)},e.prototype.restorePreviousStyle_=function(t){var r=o(t),n=this.getMap().getInteractions().getArray().filter((function(r){return r instanceof e&&r.getStyle()&&-1!==r.getFeatures().getArray().indexOf(t)}));n.length>0?t.setStyle(n[n.length-1].getStyle()):(t.setStyle(Qy[r]),delete Qy[r])},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[o(t)]},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=this.addCondition_(t),r=this.removeCondition_(t),n=this.toggleCondition_(t),i=!e&&!r&&!n,o=t.map,a=this.getFeatures(),s=[],u=[];if(i){E(this.featureLayerAssociation_),o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.filter_(t,e))return u.push(t),this.addFeatureLayerAssociation_(t,e),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var l=a.getLength()-1;l>=0;--l){var h=a.item(l),c=u.indexOf(h);c>-1?u.splice(c,1):(a.remove(h),s.push(h))}0!==u.length&&a.extend(u)}else{o.forEachFeatureAtPixel(t.pixel,function(t,i){if(this.filter_(t,i))return!e&&!n||d(a.getArray(),t)?(r||n)&&d(a.getArray(),t)&&(s.push(t),this.removeFeatureLayerAssociation_(t)):(u.push(t),this.addFeatureLayerAssociation_(t,i)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var p=s.length-1;p>=0;--p)a.remove(s[p]);a.extend(u)}return(u.length>0||s.length>0)&&this.dispatchEvent(new $y(Jy,u,s,t)),!0},e}(es),em=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function rm(t){return t.feature?t.feature:t.element?t.element:void 0}var nm=[],im=function(t){function e(e){var r=this,n=e||{},i=n;return i.handleDownEvent||(i.handleDownEvent=x),i.stopDown||(i.stopDown=w),(r=t.call(this,i)||this).source_=n.source?n.source:null,r.vertex_=void 0===n.vertex||n.vertex,r.edge_=void 0===n.edge||n.edge,r.features_=n.features?n.features:null,r.featuresListenerKeys_=[],r.featureChangeListenerKeys_={},r.indexedFeaturesExtents_={},r.pendingFeatures_={},r.pixelTolerance_=void 0!==n.pixelTolerance?n.pixelTolerance:10,r.rBush_=new ic,r.SEGMENT_WRITERS_={Point:r.writePointGeometry_.bind(r),LineString:r.writeLineStringGeometry_.bind(r),LinearRing:r.writeLineStringGeometry_.bind(r),Polygon:r.writePolygonGeometry_.bind(r),MultiPoint:r.writeMultiPointGeometry_.bind(r),MultiLineString:r.writeMultiLineStringGeometry_.bind(r),MultiPolygon:r.writeMultiPolygonGeometry_.bind(r),GeometryCollection:r.writeGeometryCollectionGeometry_.bind(r),Circle:r.writeCircleGeometry_.bind(r)},r}return em(e,t),e.prototype.addFeature=function(t,e){var r=void 0===e||e,n=o(t),i=t.getGeometry();if(i){var a=this.SEGMENT_WRITERS_[i.getType()];a&&(this.indexedFeaturesExtents_[n]=i.getExtent([1/0,1/0,-1/0,-1/0]),a(t,i))}r&&(this.featureChangeListenerKeys_[n]=W(t,I,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var r=this.snapTo(e.pixel,e.coordinate,e.map);return r.snapped&&(e.coordinate=r.vertex.slice(0,2),e.pixel=r.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=rm(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=rm(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var r=o(e);r in this.pendingFeatures_||(this.pendingFeatures_[r]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=C(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var r=void 0===e||e,n=o(t),i=this.indexedFeaturesExtents_[n];if(i){var a=this.rBush_,s=[];a.forEachInExtent(i,(function(e){t===e.feature&&s.push(e)}));for(var u=s.length-1;u>=0;--u)a.remove(s[u])}r&&(X(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])},e.prototype.setMap=function(e){var r=this.getMap(),n=this.featuresListenerKeys_,i=this.getFeatures_();r&&(n.forEach(X),n.length=0,i.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?n.push(W(this.features_,nt,this.handleFeatureAdd_,this),W(this.features_,it,this.handleFeatureRemove_,this)):this.source_&&n.push(W(this.source_,oc,this.handleFeatureAdd_,this),W(this.source_,uc,this.handleFeatureRemove_,this)),i.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,r){var n=Dt([r.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),r.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_])]),i=this.rBush_.getInExtent(n);this.vertex_&&!this.edge_&&(i=i.filter((function(t){return t.feature.getGeometry().getType()!==yt.CIRCLE})));var o=!1,a=null,s=null;if(0===i.length)return{snapped:o,vertex:a,vertexPixel:s};for(var u,l=r.getView().getProjection(),h=Ar(e,l),c=1/0,p=0;p<i.length;++p){var f=i[p];nm[0]=Ar(f.segment[0],l),nm[1]=Ar(f.segment[1],l);var d=lr(h,nm);d<c&&(u=f,c=d)}var g=u.segment;if(this.vertex_&&!this.edge_){var y=r.getPixelFromCoordinate(g[0]),m=r.getPixelFromCoordinate(g[1]),v=sr(t,y),_=sr(t,m);Math.sqrt(Math.min(v,_))<=this.pixelTolerance_&&(o=!0,a=v>_?g[1]:g[0],s=r.getPixelFromCoordinate(a))}else if(this.edge_){var b=u.feature.getGeometry().getType()===yt.CIRCLE;if(b){var x=u.feature.getGeometry(),w=Mr();w&&(x=x.clone().transform(w,l)),a=Fr(function(t,e){var r=e.getRadius(),n=e.getCenter(),i=n[0],o=n[1],a=t[0]-i,s=t[1]-o;0===a&&0===s&&(a=1);var u=Math.sqrt(a*a+s*s);return[i+r*a/u,o+r*s/u]}(h,x),l)}else nm[0]=Ar(g[0],l),nm[1]=Ar(g[1],l),a=Fr(er(h,nm),l);if(ur(t,s=r.getPixelFromCoordinate(a))<=this.pixelTolerance_&&(o=!0,this.vertex_&&!b)){y=r.getPixelFromCoordinate(g[0]),m=r.getPixelFromCoordinate(g[1]),v=sr(s,y),_=sr(s,m);Math.sqrt(Math.min(v,_))<=this.pixelTolerance_&&(a=v>_?g[1]:g[0],s=r.getPixelFromCoordinate(a))}}return o&&(s=[Math.round(s[0]),Math.round(s[1])]),{snapped:o,vertex:a,vertexPixel:s}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,e){var r=this.getMap().getView().getProjection(),n=e,i=Mr();i&&(n=n.clone().transform(i,r));var o=An(n);i&&o.transform(r,i);for(var a=o.getCoordinates()[0],s=0,u=a.length-1;s<u;++s){var l=a.slice(s,s+2),h={feature:t,segment:l};this.rBush_.insert(Dt(l),h)}},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var r=e.getGeometriesArray(),n=0;n<r.length;++n){var i=this.SEGMENT_WRITERS_[r[n].getType()];i&&i(t,r[n])}},e.prototype.writeLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length-1;n<i;++n){var o=r.slice(n,n+2),a={feature:t,segment:o};this.rBush_.insert(Dt(o),a)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length-1;a<s;++a){var u=o.slice(a,a+2),l={feature:t,segment:u};this.rBush_.insert(Dt(u),l)}},e.prototype.writeMultiPointGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n){var o=r[n],a={feature:t,segment:[o,o]};this.rBush_.insert(e.getExtent(),a)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length;a<s;++a)for(var u=o[a],l=0,h=u.length-1;l<h;++l){var c=u.slice(l,l+2),p={feature:t,segment:c};this.rBush_.insert(Dt(c),p)}},e.prototype.writePointGeometry_=function(t,e){var r=e.getCoordinates(),n={feature:t,segment:[r,r]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writePolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n<i;++n)for(var o=r[n],a=0,s=o.length-1;a<s;++a){var u=o.slice(a,a+2),l={feature:t,segment:u};this.rBush_.insert(Dt(u),l)}},e}(as),om=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),am="translatestart",sm="translating",um="translateend",lm=function(t){function e(e,r,n,i,o){var a=t.call(this,e)||this;return a.features=r,a.coordinate=n,a.startCoordinate=i,a.mapBrowserEvent=o,a}return om(e,t),e}(h),hm=function(t){function e(e){var r,n=this,i=e||{};if((n=t.call(this,i)||this).lastCoordinate_=null,n.startCoordinate_=null,n.features_=void 0!==i.features?i.features:null,i.layers)if("function"==typeof i.layers)r=i.layers;else{var o=i.layers;r=function(t){return d(o,t)}}else r=x;return n.layerFilter_=r,n.filter_=i.filter?i.filter:x,n.hitTolerance_=i.hitTolerance?i.hitTolerance:0,n.lastFeature_=null,n.addEventListener(et($a),n.handleActiveChanged_),n}return om(e,t),e.prototype.handleDownEvent=function(t){if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);var e=this.features_||new ut([this.lastFeature_]);return this.dispatchEvent(new lm(am,e,t.coordinate,this.startCoordinate_,t)),!0}return!1},e.prototype.handleUpEvent=function(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);var e=this.features_||new ut([this.lastFeature_]);return this.dispatchEvent(new lm(um,e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1},e.prototype.handleDragEvent=function(t){if(this.lastCoordinate_){var e=t.coordinate,r=e[0]-this.lastCoordinate_[0],n=e[1]-this.lastCoordinate_[1],i=this.features_||new ut([this.lastFeature_]);i.forEach((function(t){var e=t.getGeometry();e.translate(r,n),t.setGeometry(e)})),this.lastCoordinate_=e,this.dispatchEvent(new lm(sm,i,e,this.startCoordinate_,t))}},e.prototype.handleMoveEvent=function(t){var e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")},e.prototype.featuresAtPixel_=function(t,e){return e.forEachFeatureAtPixel(t,function(t,e){if(this.filter_(t,e)&&(!this.features_||d(this.features_.getArray(),t)))return t}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){var r=this.getMap();t.prototype.setMap.call(this,e),this.updateState_(r)},e.prototype.handleActiveChanged_=function(){this.updateState_(null)},e.prototype.updateState_=function(t){var e=this.getMap(),r=this.getActive();e&&r||(e=e||t)&&e.getViewport().classList.remove("ol-grab","ol-grabbing")},e}(as),cm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pm={};pm[yt.POINT]=function(t){var e;e=void 0!==t.m&&void 0!==t.z?new gn([t.x,t.y,t.z,t.m],gt):void 0!==t.z?new gn([t.x,t.y,t.z],ft):void 0!==t.m?new gn([t.x,t.y,t.m],dt):new gn([t.x,t.y]);return e},pm[yt.LINE_STRING]=function(t){var e=gm(t);return new Cd(t.paths[0],e)},pm[yt.POLYGON]=function(t){var e=gm(t);return new Ln(t.rings,e)},pm[yt.MULTI_POINT]=function(t){var e=gm(t);return new qd(t.points,e)},pm[yt.MULTI_LINE_STRING]=function(t){var e=gm(t);return new Vd(t.paths,e)},pm[yt.MULTI_POLYGON]=function(t){var e=gm(t);return new Kd(t.rings,e)};var fm={};function dm(t,e){var r,n,i;if(!t)return null;if("number"==typeof t.x&&"number"==typeof t.y)i=yt.POINT;else if(t.points)i=yt.MULTI_POINT;else if(t.paths){i=1===t.paths.length?yt.LINE_STRING:yt.MULTI_LINE_STRING}else if(t.rings){var o=t,a=gm(o),s=function(t,e){var r,n,i=[],o=[],a=[];for(r=0,n=t.length;r<n;++r){i.length=0,Qr(i,0,t[r],e.length),En(i,0,i.length,e.length)?o.push([t[r]]):a.push(t[r])}for(;a.length;){var s=a.shift(),u=!1;for(r=o.length-1;r>=0;r--){var l=o[r][0];if(Vt(new fn(l).getExtent(),new fn(s).getExtent())){o[r].push(s),u=!0;break}}u||o.push([s.reverse()])}return o}(o.rings,a);1===s.length?(i=yt.POLYGON,t=T({},t,((r={}).rings=s[0],r))):(i=yt.MULTI_POLYGON,t=T({},t,((n={}).rings=s,n)))}return Ud((0,pm[i])(t),!1,e)}function gm(t){var e=pt;return!0===t.hasZ&&!0===t.hasM?e=gt:!0===t.hasZ?e=ft:!0===t.hasM&&(e=dt),e}function ym(t){var e=t.getLayout();return{hasZ:e===ft||e===gt,hasM:e===dt||e===gt}}function mm(t,e){return(0,fm[t.getType()])(Ud(t,!0,e),e)}fm[yt.POINT]=function(t,e){var r,n=t.getCoordinates(),i=t.getLayout();i===ft?r={x:n[0],y:n[1],z:n[2]}:i===dt?r={x:n[0],y:n[1],m:n[2]}:i===gt?r={x:n[0],y:n[1],z:n[2],m:n[3]}:i===pt?r={x:n[0],y:n[1]}:lt(!1,34);return r},fm[yt.LINE_STRING]=function(t,e){var r=ym(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:[t.getCoordinates()]}},fm[yt.POLYGON]=function(t,e){var r=ym(t);return{hasZ:r.hasZ,hasM:r.hasM,rings:t.getCoordinates(!1)}},fm[yt.MULTI_POINT]=function(t,e){var r=ym(t);return{hasZ:r.hasZ,hasM:r.hasM,points:t.getCoordinates()}},fm[yt.MULTI_LINE_STRING]=function(t,e){var r=ym(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:t.getCoordinates()}},fm[yt.MULTI_POLYGON]=function(t,e){for(var r=ym(t),n=t.getCoordinates(!1),i=[],o=0;o<n.length;o++)for(var a=n[o].length-1;a>=0;a--)i.push(n[o][a]);return{hasZ:r.hasZ,hasM:r.hasM,rings:i}};var vm=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this)||this).geometryName_=n.geometryName,r}return cm(e,t),e.prototype.readFeatureFromObject=function(t,e,r){var n=t,i=dm(n.geometry,e),o=new ct;if(this.geometryName_&&o.setGeometryName(this.geometryName_),o.setGeometry(i),n.attributes){o.setProperties(n.attributes,!0);var a=n.attributes[r];void 0!==a&&o.setId(a)}return o},e.prototype.readFeaturesFromObject=function(t,e){var r=e||{};if(t.features){for(var n=[],i=t.features,o=0,a=i.length;o<a;++o)n.push(this.readFeatureFromObject(i[o],r,t.objectIdFieldName));return n}return[this.readFeatureFromObject(t,r)]},e.prototype.readGeometryFromObject=function(t,e){return dm(t,e)},e.prototype.readProjectionFromObject=function(t){return t.spatialReference&&void 0!==t.spatialReference.wkid?yr("EPSG:"+t.spatialReference.wkid):null},e.prototype.writeGeometryObject=function(t,e){return mm(t,this.adaptOptions(e))},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var r={};if(!t.hasProperties())return r.attributes={},r;var n=t.getProperties(),i=t.getGeometry();return i&&(r.geometry=mm(i,e),e&&e.featureProjection&&(r.geometry.spatialReference={wkid:Number(yr(e.featureProjection).getCode().split(":").pop())}),delete n[t.getGeometryName()]),P(n)?r.attributes={}:r.attributes=n,r},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var r=[],n=0,i=t.length;n<i;++n)r.push(this.writeFeatureObject(t[n],e));return{features:r}},e}(Wg),_m=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bm=function(t){function e(){var e=t.call(this)||this;return e.xmlSerializer_=(void 0===ul&&"undefined"!=typeof XMLSerializer&&(ul=new XMLSerializer),ul),e}return _m(e,t),e.prototype.getType=function(){return _u},e.prototype.readFeature=function(t,e){if(t){if("string"==typeof t){var r=qu(t);return this.readFeatureFromDocument(r,e)}return Wu(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null},e.prototype.readFeatureFromDocument=function(t,e){var r=this.readFeaturesFromDocument(t,e);return r.length>0?r[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"==typeof t){var r=qu(t);return this.readFeaturesFromDocument(r,e)}return Wu(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var r=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&m(r,this.readFeaturesFromNode(n,e));return r},e.prototype.readFeaturesFromNode=function(t,e){return n()},e.prototype.readGeometry=function(t,e){if(t){if("string"==typeof t){var r=qu(t);return this.readGeometryFromDocument(r,e)}return Wu(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"==typeof t){var e=qu(t);return this.readProjectionFromDocument(e)}return Wu(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var r=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var r=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=function(t,e){var r=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeGeometryNode=function(t,e){return null},e}(zd),xm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wm="http://www.opengis.net/gml",Sm=/^[\s\xa0]*$/,Tm=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.featureType=n.featureType,r.featureNS=n.featureNS,r.srsName=n.srsName,r.schemaLocation="",r.FEATURE_COLLECTION_PARSERS={},r.FEATURE_COLLECTION_PARSERS[r.namespace]={featureMember:Zu(r.readFeaturesInternal),featureMembers:Ku(r.readFeaturesInternal)},r}return xm(e,t),e.prototype.readFeaturesInternal=function(t,e){var r=t.localName,n=null;if("FeatureCollection"==r)n=ol([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==r||"featureMember"==r){var i=e[0],o=i.featureType,a=i.featureNS;if(!o&&t.childNodes){o=[],a={};for(var s=0,u=t.childNodes.length;s<u;++s){var l=t.childNodes[s];if(1===l.nodeType){var h=l.nodeName.split(":").pop();if(-1===o.indexOf(h)){var c="",p=0,f=l.namespaceURI;for(var d in a){if(a[d]===f){c=d;break}++p}c||(a[c="p"+p]=f),o.push(c+":"+h)}}}"featureMember"!=r&&(i.featureType=o,i.featureNS=a)}if("string"==typeof a){var g=a;(a={}).p0=g}var y={},m=Array.isArray(o)?o:[o];for(var v in a){var _={};for(s=0,u=m.length;s<u;++s){(-1===m[s].indexOf(":")?"p0":m[s].split(":")[0])===v&&(_[m[s].split(":").pop()]="featureMembers"==r?Zu(this.readFeatureElement,this):Ku(this.readFeatureElement,this))}y[a[v]]=_}n=ol("featureMember"==r?void 0:[],y,t,e)}return null===n&&(n=[]),n},e.prototype.readGeometryElement=function(t,e){var r=e[0];r.srsName=t.firstElementChild.getAttribute("srsName"),r.srsDimension=t.firstElementChild.getAttribute("srsDimension");var n=ol(null,this.GEOMETRY_PARSERS,t,e,this);return n?Array.isArray(n)?Bd(n,r):Ud(n,!1,r):void 0},e.prototype.readFeatureElementInternal=function(t,e,r){for(var n,i={},o=t.firstElementChild;o;o=o.nextElementSibling){var a=void 0,s=o.localName;0===o.childNodes.length||1===o.childNodes.length&&(3===o.firstChild.nodeType||4===o.firstChild.nodeType)?(a=Vu(o,!1),Sm.test(a)&&(a=void 0)):(r&&(a=this.readGeometryElement(o,e)),a?"boundedBy"!==s&&(n=s):a=this.readFeatureElementInternal(o,e,!1)),i[s]?(i[s]instanceof Array||(i[s]=[i[s]]),i[s].push(a)):i[s]=a;var u=o.attributes.length;if(u>0){i[s]={_content_:i[s]};for(var l=0;l<u;l++){var h=o.attributes[l].name;i[s][h]=o.attributes[l].value}}}if(r){var c=new ct(i);n&&c.setGeometryName(n);var p=t.getAttribute("fid")||function(t,e,r){return t.getAttributeNS(e,r)||""}(t,this.namespace,"id");return p&&c.setId(p),c}return i},e.prototype.readFeatureElement=function(t,e){return this.readFeatureElementInternal(t,e,!0)},e.prototype.readPoint=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);if(r)return new gn(r,ft)},e.prototype.readMultiPoint=function(t,e){var r=ol([],this.MULTIPOINT_PARSERS,t,e,this);return r?new qd(r):void 0},e.prototype.readMultiLineString=function(t,e){var r=ol([],this.MULTILINESTRING_PARSERS,t,e,this);if(r)return new Vd(r)},e.prototype.readMultiPolygon=function(t,e){var r=ol([],this.MULTIPOLYGON_PARSERS,t,e,this);if(r)return new Kd(r)},e.prototype.pointMemberParser=function(t,e){il(this.POINTMEMBER_PARSERS,t,e,this)},e.prototype.lineStringMemberParser=function(t,e){il(this.LINESTRINGMEMBER_PARSERS,t,e,this)},e.prototype.polygonMemberParser=function(t,e){il(this.POLYGONMEMBER_PARSERS,t,e,this)},e.prototype.readLineString=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);return r?new Cd(r,ft):void 0},e.prototype.readFlatLinearRing=function(t,e){var r=ol(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this);return r||void 0},e.prototype.readLinearRing=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);if(r)return new fn(r,ft)},e.prototype.readPolygon=function(t,e){var r=ol([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this);if(r&&r[0]){var n,i=r[0],o=[i.length],a=void 0;for(a=1,n=r.length;a<n;++a)m(i,r[a]),o.push(i.length);return new Ln(i,ft,o)}},e.prototype.readFlatCoordinatesFromNode=function(t,e){return ol(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.readGeometryFromNode=function(t,e){var r=this.readGeometryElement(t,[this.getReadOptions(t,e||{})]);return r||null},e.prototype.readFeaturesFromNode=function(t,e){var r={featureType:this.featureType,featureNS:this.featureNS};return e&&T(r,this.getReadOptions(t,e)),this.readFeaturesInternal(t,[r])||[]},e.prototype.readProjectionFromNode=function(t){return yr(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(bm);Tm.prototype.namespace=wm,Tm.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},Tm.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},Tm.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},Tm.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:Zu(Tm.prototype.pointMemberParser),pointMembers:Zu(Tm.prototype.pointMemberParser)}},Tm.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:Zu(Tm.prototype.lineStringMemberParser),lineStringMembers:Zu(Tm.prototype.lineStringMemberParser)}},Tm.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:Zu(Tm.prototype.polygonMemberParser),polygonMembers:Zu(Tm.prototype.polygonMemberParser)}},Tm.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:Zu(Tm.prototype.readFlatCoordinatesFromNode)}},Tm.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Zu(Tm.prototype.readLineString)}},Tm.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Zu(Tm.prototype.readPolygon)}},Tm.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:Ku(Tm.prototype.readFlatLinearRing)}};var Em=Tm;function Cm(t){return Pm(Vu(t,!1))}function Pm(t){var e=/^\s*(true|1)|(false|0)\s*$/.exec(t);return e?void 0!==e[1]||!1:void 0}function Rm(t){var e=Vu(t,!1),r=Date.parse(e);return isNaN(r)?void 0:r/1e3}function Om(t){return Im(Vu(t,!1))}function Im(t){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t);return e?parseFloat(e[1]):void 0}function Lm(t){return Mm(Vu(t,!1))}function Mm(t){var e=/^\s*(\d+)\s*$/.exec(t);return e?parseInt(e[1],10):void 0}function Fm(t){return Vu(t,!1).trim()}function Am(t,e){jm(t,e?"1":"0")}function km(t,e){var r=e.toPrecision();t.appendChild(hl().createTextNode(r))}function Nm(t,e){var r=e.toString();t.appendChild(hl().createTextNode(r))}function jm(t,e){t.appendChild(hl().createTextNode(e))}var Gm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Dm={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},zm=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).surface_=void 0!==n.surface&&n.surface,r.curve_=void 0!==n.curve&&n.curve,r.multiCurve_=void 0===n.multiCurve||n.multiCurve,r.multiSurface_=void 0===n.multiSurface||n.multiSurface,r.schemaLocation=n.schemaLocation?n.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",r.hasZ=void 0!==n.hasZ&&n.hasZ,r}return Gm(e,t),e.prototype.readMultiCurve=function(t,e){var r=ol([],this.MULTICURVE_PARSERS,t,e,this);return r?new Vd(r):void 0},e.prototype.readMultiSurface=function(t,e){var r=ol([],this.MULTISURFACE_PARSERS,t,e,this);if(r)return new Kd(r)},e.prototype.curveMemberParser=function(t,e){il(this.CURVEMEMBER_PARSERS,t,e,this)},e.prototype.surfaceMemberParser=function(t,e){il(this.SURFACEMEMBER_PARSERS,t,e,this)},e.prototype.readPatch=function(t,e){return ol([null],this.PATCHES_PARSERS,t,e,this)},e.prototype.readSegment=function(t,e){return ol([null],this.SEGMENTS_PARSERS,t,e,this)},e.prototype.readPolygonPatch=function(t,e){return ol([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this)},e.prototype.readLineStringSegment=function(t,e){return ol([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.interiorParser=function(t,e){var r=ol(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.exteriorParser=function(t,e){var r=ol(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.readSurface=function(t,e){var r=ol([null],this.SURFACE_PARSERS,t,e,this);if(r&&r[0]){var n,i=r[0],o=[i.length],a=void 0;for(a=1,n=r.length;a<n;++a)m(i,r[a]),o.push(i.length);return new Ln(i,ft,o)}},e.prototype.readCurve=function(t,e){var r=ol([null],this.CURVE_PARSERS,t,e,this);return r?new Cd(r,ft):void 0},e.prototype.readEnvelope=function(t,e){var r=ol([null],this.ENVELOPE_PARSERS,t,e,this);return Zt(r[1][0],r[1][1],r[2][0],r[2][1])},e.prototype.readFlatPos=function(t,e){for(var r,n=Vu(t,!1),i=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];r=i.exec(n);)o.push(parseFloat(r[1])),n=n.substr(r[0].length);if(""===n){var a=e[0].srsName,s="enu";if(a)s=yr(a).getAxisOrientation();if("neu"===s){var u,l=void 0;for(l=0,u=o.length;l<u;l+=3){var h=o[l],c=o[l+1];o[l]=c,o[l+1]=h}}var p=o.length;if(2==p&&o.push(0),0!==p)return o}},e.prototype.readFlatPosList=function(t,e){var r=Vu(t,!1).replace(/^\s*|\s*$/g,""),n=e[0],i=n.srsName,o=n.srsDimension,a="enu";i&&(a=yr(i).getAxisOrientation());var s,u,l,h=r.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=Mm(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=Mm(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=Mm(t.parentNode.getAttribute("srsDimension")):o&&(c=Mm(o));for(var p=[],f=0,d=h.length;f<d;f+=c)s=parseFloat(h[f]),u=parseFloat(h[f+1]),l=3===c?parseFloat(h[f+2]):0,"en"===a.substr(0,2)?p.push(s,u,l):p.push(u,s,l);return p},e.prototype.writePos_=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);var a=n.srsName,s="enu";a&&(s=yr(a).getAxisOrientation());var u,l=e.getCoordinates();(u="en"===s.substr(0,2)?l[0]+" "+l[1]:l[1]+" "+l[0],i)&&(u+=" "+(l[2]||0));jm(t,u)},e.prototype.getCoords_=function(t,e,r){var n="enu";e&&(n=yr(e).getAxisOrientation());var i="en"===n.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];r&&(i+=" "+(t[2]||0));return i},e.prototype.writePosList_=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);for(var a,s=n.srsName,u=e.getCoordinates(),l=u.length,h=new Array(l),c=0;c<l;++c)a=u[c],h[c]=this.getCoords_(a,s,i);jm(t,h.join(" "))},e.prototype.writePoint=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=Yu(t.namespaceURI,"pos");t.appendChild(i),this.writePos_(i,e,r)},e.prototype.writeEnvelope=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];sl({node:t},this.ENVELOPE_SERIALIZERS,el,i,r,["lowerCorner","upperCorner"],this)},e.prototype.writeLinearRing=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=Yu(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,r)},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1],i=n.node,o=n.exteriorWritten;return void 0===o&&(n.exteriorWritten=!0),Yu(i.namespaceURI,void 0!==o?"interior":"exterior")},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var a=e.getLinearRings();sl({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,a,r,void 0,this)}else if("Surface"===t.nodeName){var s=Yu(t.namespaceURI,"patches");t.appendChild(s),this.writeSurfacePatches_(s,e,r)}},e.prototype.writeCurveOrLineString=function(t,e,r){var n=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&n&&t.setAttribute("srsName",n),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=Yu(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,r)}else if("Curve"===t.nodeName){var o=Yu(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,a=n.surface;o&&t.setAttribute("srsName",o);var s=e.getPolygons();sl({node:t,hasZ:i,srsName:o,surface:a},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,r,void 0,this)},e.prototype.writeMultiPoint=function(t,e,r){var n=r[r.length-1],i=n.srsName,o=n.hasZ;i&&t.setAttribute("srsName",i);var a=e.getPoints();sl({node:t,hasZ:o,srsName:i},this.POINTMEMBER_SERIALIZERS,tl("pointMember"),a,r,void 0,this)},e.prototype.writeMultiCurveOrLineString=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,a=n.curve;o&&t.setAttribute("srsName",o);var s=e.getLineStrings();sl({node:t,hasZ:i,srsName:o,curve:a},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,r,void 0,this)},e.prototype.writeRing=function(t,e,r){var n=Yu(t.namespaceURI,"LinearRing");t.appendChild(n),this.writeLinearRing(n,e,r)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r))},e.prototype.writePointMember=function(t,e,r){var n=Yu(t.namespaceURI,"Point");t.appendChild(n),this.writePoint(n,e,r)},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeCurveOrLineString(n,e,r))},e.prototype.writeSurfacePatches_=function(t,e,r){var n=Yu(t.namespaceURI,"PolygonPatch");t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r)},e.prototype.writeCurveSegments_=function(t,e,r){var n=Yu(t.namespaceURI,"LineStringSegment");t.appendChild(n),this.writeCurveOrLineString(n,e,r)},e.prototype.writeGeometryElement=function(t,e,r){var n,i=r[r.length-1],o=T({},i);o.node=t,n=Array.isArray(e)?Bd(e,i):Ud(e,!0,i),sl(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[n],r,void 0,this)},e.prototype.writeFeatureElement=function(t,e,r){var n=e.getId();n&&t.setAttribute("fid",n);var i=r[r.length-1],o=i.featureNS,a=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var s=[],u=[];if(e.hasProperties()){var l=e.getProperties();for(var h in l){var c=l[h];null!==c&&(s.push(h),u.push(c),h==a||"function"==typeof c.getSimplifiedGeometry?h in i.serializers[o]||(i.serializers[o][h]=$u(this.writeGeometryElement,this)):h in i.serializers[o]||(i.serializers[o][h]=$u(jm)))}}var p=T({},i);p.node=t,sl(p,i.serializers,tl(void 0,o),u,r,s)},e.prototype.writeFeatureMembers_=function(t,e,r){var n=r[r.length-1],i=n.featureType,o=n.featureNS,a={};a[o]={},a[o][i]=$u(this.writeFeatureElement,this);var s=T({},n);s.node=t,sl(s,a,tl(i,o),e,r)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1].node;return Yu(this.namespace,Dm[n.nodeName])},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var n,i=e[e.length-1],o=i.multiSurface,a=i.surface,s=i.curve,u=i.multiCurve;return Array.isArray(t)?n="Envelope":"MultiPolygon"===(n=t.getType())&&!0===o?n="MultiSurface":"Polygon"===n&&!0===a?n="Surface":"LineString"===n&&!0===s?n="Curve":"MultiLineString"===n&&!0===u&&(n="MultiCurve"),Yu(this.namespace,n)},e.prototype.writeGeometryNode=function(t,e){e=this.adaptOptions(e);var r=Yu(this.namespace,"geom"),n={node:r,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return e&&T(n,e),this.writeGeometryElement(r,t,[n]),r},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=Yu(this.namespace,"featureMembers");r.setAttributeNS(Bu,"xsi:schemaLocation",this.schemaLocation);var n={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return e&&T(n,e),this.writeFeatureMembers_(r,t,[n]),r},e}(Em);zm.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:Ku(zm.prototype.readFlatPos),posList:Ku(zm.prototype.readFlatPosList)}},zm.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:zm.prototype.interiorParser,exterior:zm.prototype.exteriorParser}},zm.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Ku(Em.prototype.readPoint),MultiPoint:Ku(Em.prototype.readMultiPoint),LineString:Ku(Em.prototype.readLineString),MultiLineString:Ku(Em.prototype.readMultiLineString),LinearRing:Ku(Em.prototype.readLinearRing),Polygon:Ku(Em.prototype.readPolygon),MultiPolygon:Ku(Em.prototype.readMultiPolygon),Surface:Ku(zm.prototype.readSurface),MultiSurface:Ku(zm.prototype.readMultiSurface),Curve:Ku(zm.prototype.readCurve),MultiCurve:Ku(zm.prototype.readMultiCurve),Envelope:Ku(zm.prototype.readEnvelope)}},zm.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:Zu(zm.prototype.curveMemberParser),curveMembers:Zu(zm.prototype.curveMemberParser)}},zm.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:Zu(zm.prototype.surfaceMemberParser),surfaceMembers:Zu(zm.prototype.surfaceMemberParser)}},zm.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Zu(Em.prototype.readLineString),Curve:Zu(zm.prototype.readCurve)}},zm.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Zu(Em.prototype.readPolygon),Surface:Zu(zm.prototype.readSurface)}},zm.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:Ku(zm.prototype.readPatch)}},zm.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:Ku(zm.prototype.readSegment)}},zm.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:Zu(zm.prototype.readFlatPosList),upperCorner:Zu(zm.prototype.readFlatPosList)}},zm.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:Ku(zm.prototype.readPolygonPatch)}},zm.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:Ku(zm.prototype.readLineStringSegment)}},zm.prototype.writeFeatures,zm.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:$u(zm.prototype.writeRing),interior:$u(zm.prototype.writeRing)}},zm.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:$u(jm),upperCorner:$u(jm)}},zm.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:$u(zm.prototype.writeSurfaceOrPolygonMember),polygonMember:$u(zm.prototype.writeSurfaceOrPolygonMember)}},zm.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:$u(zm.prototype.writePointMember)}},zm.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:$u(zm.prototype.writeLineStringOrCurveMember),curveMember:$u(zm.prototype.writeLineStringOrCurveMember)}},zm.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:$u(zm.prototype.writeCurveOrLineString),MultiCurve:$u(zm.prototype.writeMultiCurveOrLineString),Point:$u(zm.prototype.writePoint),MultiPoint:$u(zm.prototype.writeMultiPoint),LineString:$u(zm.prototype.writeCurveOrLineString),MultiLineString:$u(zm.prototype.writeMultiCurveOrLineString),LinearRing:$u(zm.prototype.writeLinearRing),Polygon:$u(zm.prototype.writeSurfaceOrPolygon),MultiPolygon:$u(zm.prototype.writeMultiSurfaceOrPolygon),Surface:$u(zm.prototype.writeSurfaceOrPolygon),MultiSurface:$u(zm.prototype.writeMultiSurfaceOrPolygon),Envelope:$u(zm.prototype.writeEnvelope)}};var Um=zm,Bm=Um;Bm.prototype.writeFeatures,Bm.prototype.writeFeaturesNode;var Ym=Bm,Vm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wm={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},qm=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).FEATURE_COLLECTION_PARSERS[wm].featureMember=Zu(r.readFeaturesInternal),r.schemaLocation=n.schemaLocation?n.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",r}return Vm(e,t),e.prototype.readFlatCoordinates=function(t,e){var r=Vu(t,!1).replace(/^\s*|\s*$/g,""),n=e[0].srsName,i="enu";if(n){var o=yr(n);o&&(i=o.getAxisOrientation())}for(var a=r.trim().split(/\s+/),s=[],u=0,l=a.length;u<l;u++){var h=a[u].split(/,+/),c=parseFloat(h[0]),p=parseFloat(h[1]),f=3===h.length?parseFloat(h[2]):0;"en"===i.substr(0,2)?s.push(c,p,f):s.push(p,c,f)}return s},e.prototype.readBox=function(t,e){var r=ol([null],this.BOX_PARSERS_,t,e,this);return Zt(r[1][0],r[1][1],r[1][3],r[1][4])},e.prototype.innerBoundaryIsParser=function(t,e){var r=ol(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.outerBoundaryIsParser=function(t,e){var r=ol(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var n,i=e[e.length-1],o=i.multiSurface,a=i.surface,s=i.multiCurve;return Array.isArray(t)?n="Envelope":"MultiPolygon"===(n=t.getType())&&!0===o?n="MultiSurface":"Polygon"===n&&!0===a?n="Surface":"MultiLineString"===n&&!0===s&&(n="MultiCurve"),Yu("http://www.opengis.net/gml",n)},e.prototype.writeFeatureElement=function(t,e,r){var n=e.getId();n&&t.setAttribute("fid",n);var i=r[r.length-1],o=i.featureNS,a=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var s=[],u=[];if(e.hasProperties()){var l=e.getProperties();for(var h in l){var c=l[h];null!==c&&(s.push(h),u.push(c),h==a||"function"==typeof c.getSimplifiedGeometry?h in i.serializers[o]||(i.serializers[o][h]=$u(this.writeGeometryElement,this)):h in i.serializers[o]||(i.serializers[o][h]=$u(jm)))}}var p=T({},i);p.node=t,sl(p,i.serializers,tl(void 0,o),u,r,s)},e.prototype.writeCurveOrLineString=function(t,e,r){var n=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&n&&t.setAttribute("srsName",n),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,r)}else if("Curve"===t.nodeName){var o=Yu(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeCurveOrLineString(n,e,r))},e.prototype.writeMultiCurveOrLineString=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,a=n.curve;o&&t.setAttribute("srsName",o);var s=e.getLineStrings();sl({node:t,hasZ:i,srsName:o,curve:a},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,r,void 0,this)},e.prototype.writeGeometryElement=function(t,e,r){var n,i=r[r.length-1],o=T({},i);o.node=t,n=Array.isArray(e)?Bd(e,i):Ud(e,!0,i),sl(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[n],r,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var e=Yu(t,"coordinates");return e.setAttribute("decimal","."),e.setAttribute("cs",","),e.setAttribute("ts"," "),e},e.prototype.writeCoordinates_=function(t,e,r){for(var n=r[r.length-1],i=n.hasZ,o=n.srsName,a=e.getCoordinates(),s=a.length,u=new Array(s),l=0;l<s;++l){var h=a[l];u[l]=this.getCoords_(h,o,i)}jm(t,u.join(" "))},e.prototype.writeCurveSegments_=function(t,e,r){var n=Yu(t.namespaceURI,"LineStringSegment");t.appendChild(n),this.writeCurveOrLineString(n,e,r)},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var a=e.getLinearRings();sl({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,a,r,void 0,this)}else if("Surface"===t.nodeName){var s=Yu(t.namespaceURI,"patches");t.appendChild(s),this.writeSurfacePatches_(s,e,r)}},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1],i=n.node,o=n.exteriorWritten;return void 0===o&&(n.exteriorWritten=!0),Yu(i.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,e,r){var n=Yu(t.namespaceURI,"PolygonPatch");t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r)},e.prototype.writeRing=function(t,e,r){var n=Yu(t.namespaceURI,"LinearRing");t.appendChild(n),this.writeLinearRing(n,e,r)},e.prototype.getCoords_=function(t,e,r){var n="enu";e&&(n=yr(e).getAxisOrientation());var i="en"===n.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];r&&(i+=","+(t[2]||0));return i},e.prototype.writePoint=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;o&&t.setAttribute("srsName",o);var a=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(a);var s=e.getCoordinates();jm(a,this.getCoords_(s,o,i))},e.prototype.writeMultiPoint=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;o&&t.setAttribute("srsName",o);var a=e.getPoints();sl({node:t,hasZ:i,srsName:o},this.POINTMEMBER_SERIALIZERS,tl("pointMember"),a,r,void 0,this)},e.prototype.writePointMember=function(t,e,r){var n=Yu(t.namespaceURI,"Point");t.appendChild(n),this.writePoint(n,e,r)},e.prototype.writeLinearRing=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,r)},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,a=n.surface;o&&t.setAttribute("srsName",o);var s=e.getPolygons();sl({node:t,hasZ:i,srsName:o,surface:a},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,r,void 0,this)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r))},e.prototype.writeEnvelope=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];sl({node:t},this.ENVELOPE_SERIALIZERS,el,i,r,["lowerCorner","upperCorner"],this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1].node;return Yu("http://www.opengis.net/gml",Wm[n.nodeName])},e}(Em);qm.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:Ku(qm.prototype.readFlatCoordinates)}},qm.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:qm.prototype.innerBoundaryIsParser,outerBoundaryIs:qm.prototype.outerBoundaryIsParser}},qm.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:Zu(qm.prototype.readFlatCoordinates)}},qm.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Ku(Em.prototype.readPoint),MultiPoint:Ku(Em.prototype.readMultiPoint),LineString:Ku(Em.prototype.readLineString),MultiLineString:Ku(Em.prototype.readMultiLineString),LinearRing:Ku(Em.prototype.readLinearRing),Polygon:Ku(Em.prototype.readPolygon),MultiPolygon:Ku(Em.prototype.readMultiPolygon),Box:Ku(qm.prototype.readBox)}},qm.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:$u(qm.prototype.writeCurveOrLineString),MultiCurve:$u(qm.prototype.writeMultiCurveOrLineString),Point:$u(qm.prototype.writePoint),MultiPoint:$u(qm.prototype.writeMultiPoint),LineString:$u(qm.prototype.writeCurveOrLineString),MultiLineString:$u(qm.prototype.writeMultiCurveOrLineString),LinearRing:$u(qm.prototype.writeLinearRing),Polygon:$u(qm.prototype.writeSurfaceOrPolygon),MultiPolygon:$u(qm.prototype.writeMultiSurfaceOrPolygon),Surface:$u(qm.prototype.writeSurfaceOrPolygon),MultiSurface:$u(qm.prototype.writeMultiSurfaceOrPolygon),Envelope:$u(qm.prototype.writeEnvelope)}},qm.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:$u(qm.prototype.writeLineStringOrCurveMember),curveMember:$u(qm.prototype.writeLineStringOrCurveMember)}},qm.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:$u(qm.prototype.writeRing),innerBoundaryIs:$u(qm.prototype.writeRing)}},qm.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:$u(qm.prototype.writePointMember)}},qm.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:$u(qm.prototype.writeSurfaceOrPolygonMember),polygonMember:$u(qm.prototype.writeSurfaceOrPolygonMember)}},qm.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:$u(jm),upperCorner:$u(jm)}};var Xm=qm,Zm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Km=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).schemaLocation=n.schemaLocation?n.schemaLocation:r.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",r}return Zm(e,t),e}(Um);Km.prototype.namespace="http://www.opengis.net/gml/3.2",Km.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:Ku(Um.prototype.readFlatPos),posList:Ku(Um.prototype.readFlatPosList)}},Km.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:Um.prototype.interiorParser,exterior:Um.prototype.exteriorParser}},Km.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Ku(Em.prototype.readPoint),MultiPoint:Ku(Em.prototype.readMultiPoint),LineString:Ku(Em.prototype.readLineString),MultiLineString:Ku(Em.prototype.readMultiLineString),LinearRing:Ku(Em.prototype.readLinearRing),Polygon:Ku(Em.prototype.readPolygon),MultiPolygon:Ku(Em.prototype.readMultiPolygon),Surface:Ku(Km.prototype.readSurface),MultiSurface:Ku(Um.prototype.readMultiSurface),Curve:Ku(Km.prototype.readCurve),MultiCurve:Ku(Um.prototype.readMultiCurve),Envelope:Ku(Km.prototype.readEnvelope)}},Km.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:Zu(Um.prototype.curveMemberParser),curveMembers:Zu(Um.prototype.curveMemberParser)}},Km.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:Zu(Um.prototype.surfaceMemberParser),surfaceMembers:Zu(Um.prototype.surfaceMemberParser)}},Km.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Zu(Em.prototype.readLineString),Curve:Zu(Um.prototype.readCurve)}},Km.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Zu(Em.prototype.readPolygon),Surface:Zu(Um.prototype.readSurface)}},Km.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:Ku(Um.prototype.readPatch)}},Km.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:Ku(Um.prototype.readSegment)}},Km.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:Zu(Um.prototype.readFlatPosList),upperCorner:Zu(Um.prototype.readFlatPosList)}},Km.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:Ku(Um.prototype.readPolygonPatch)}},Km.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:Ku(Um.prototype.readLineStringSegment)}},Km.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:Zu(Em.prototype.pointMemberParser),pointMembers:Zu(Em.prototype.pointMemberParser)}},Km.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:Zu(Em.prototype.lineStringMemberParser),lineStringMembers:Zu(Em.prototype.lineStringMemberParser)}},Km.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:Zu(Em.prototype.polygonMemberParser),polygonMembers:Zu(Em.prototype.polygonMemberParser)}},Km.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Zu(Em.prototype.readFlatCoordinatesFromNode)}},Km.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Zu(Em.prototype.readLineString)}},Km.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Zu(Em.prototype.readPolygon)}},Km.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:Ku(Em.prototype.readFlatLinearRing)}},Km.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:$u(Um.prototype.writeRing),interior:$u(Um.prototype.writeRing)}},Km.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:$u(jm),upperCorner:$u(jm)}},Km.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:$u(Um.prototype.writeSurfaceOrPolygonMember),polygonMember:$u(Um.prototype.writeSurfaceOrPolygonMember)}},Km.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:$u(Um.prototype.writePointMember)}},Km.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:$u(Um.prototype.writeLineStringOrCurveMember),curveMember:$u(Um.prototype.writeLineStringOrCurveMember)}},Km.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:$u(Um.prototype.writeCurveOrLineString),MultiCurve:$u(Um.prototype.writeMultiCurveOrLineString),Point:$u(Km.prototype.writePoint),MultiPoint:$u(Um.prototype.writeMultiPoint),LineString:$u(Um.prototype.writeCurveOrLineString),MultiLineString:$u(Um.prototype.writeMultiCurveOrLineString),LinearRing:$u(Um.prototype.writeLinearRing),Polygon:$u(Um.prototype.writeSurfaceOrPolygon),MultiPolygon:$u(Um.prototype.writeMultiSurfaceOrPolygon),Surface:$u(Um.prototype.writeSurfaceOrPolygon),MultiSurface:$u(Um.prototype.writeMultiSurfaceOrPolygon),Envelope:$u(Um.prototype.writeEnvelope)}};var Hm=Km,Jm=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$m=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],Qm={rte:Pv,trk:Rv,wpt:Ov},tv=nl($m,{rte:Zu(Pv),trk:Zu(Rv),wpt:Zu(Ov)}),ev=nl($m,{text:Ju(Fm,"linkText"),type:Ju(Fm,"linkType")}),rv=nl($m,{rte:$u((function(t,e,r){var n=r[0],i=e.getProperties(),o={node:t};o.properties=i;var a=e.getGeometry();if(a.getType()==yt.LINE_STRING){var s=Ud(a,!0,n);o.geometryLayout=s.getLayout(),i.rtept=s.getCoordinates()}var u=r[r.length-1].node,l=pv[u.namespaceURI],h=rl(i,l);sl(o,fv,el,h,r,l)})),trk:$u((function(t,e,r){var n=r[0],i=e.getProperties(),o={node:t};o.properties=i;var a=e.getGeometry();if(a.getType()==yt.MULTI_LINE_STRING){var s=Ud(a,!0,n);i.trkseg=s.getLineStrings()}var u=r[r.length-1].node,l=gv[u.namespaceURI],h=rl(i,l);sl(o,yv,el,h,r,l)})),wpt:$u((function(t,e,r){var n=r[0],i=r[r.length-1];i.properties=e.getProperties();var o=e.getGeometry();if(o.getType()==yt.POINT){var a=Ud(o,!0,n);i.geometryLayout=a.getLayout(),Lv(t,a.getCoordinates(),r)}}))}),nv=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.dataProjection=yr("EPSG:4326"),r.readExtensions_=n.readExtensions,r}return Jm(e,t),e.prototype.handleReadExtensions_=function(t){t||(t=[]);for(var e=0,r=t.length;e<r;++e){var n=t[e];if(this.readExtensions_){var i=n.get("extensionsNode_")||null;this.readExtensions_(n,i)}n.set("extensionsNode_",void 0)}},e.prototype.readFeatureFromNode=function(t,e){if(!d($m,t.namespaceURI))return null;var r=Qm[t.localName];if(!r)return null;var n=r(t,[this.getReadOptions(t,e)]);return n?(this.handleReadExtensions_([n]),n):null},e.prototype.readFeaturesFromNode=function(t,e){if(!d($m,t.namespaceURI))return[];if("gpx"==t.localName){var r=ol([],tv,t,[this.getReadOptions(t,e)]);return r?(this.handleReadExtensions_(r),r):[]}return[]},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=Yu("http://www.topografix.com/GPX/1/1","gpx");return r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",Bu),r.setAttributeNS(Bu,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),r.setAttribute("version","1.1"),r.setAttribute("creator","OpenLayers"),sl({node:r},rv,wv,t,[e]),r},e}(bm),iv=nl($m,{name:Ju(Fm),cmt:Ju(Fm),desc:Ju(Fm),src:Ju(Fm),link:Ev,number:Ju(Lm),extensions:Cv,type:Ju(Fm),rtept:function(t,e){var r=ol({},ov,t,e);if(r){var n=e[e.length-1],i=n.flatCoordinates,o=n.layoutOptions;Sv(i,o,t,r)}}}),ov=nl($m,{ele:Ju(Om),time:Ju(Rm)}),av=nl($m,{name:Ju(Fm),cmt:Ju(Fm),desc:Ju(Fm),src:Ju(Fm),link:Ev,number:Ju(Lm),type:Ju(Fm),extensions:Cv,trkseg:function(t,e){var r=e[e.length-1];il(sv,t,e);var n=r.flatCoordinates;r.ends.push(n.length)}}),sv=nl($m,{trkpt:function(t,e){var r=ol({},uv,t,e);if(r){var n=e[e.length-1],i=n.flatCoordinates,o=n.layoutOptions;Sv(i,o,t,r)}}}),uv=nl($m,{ele:Ju(Om),time:Ju(Rm)}),lv=nl($m,{ele:Ju(Om),time:Ju(Rm),magvar:Ju(Om),geoidheight:Ju(Om),name:Ju(Fm),cmt:Ju(Fm),desc:Ju(Fm),src:Ju(Fm),link:Ev,sym:Ju(Fm),type:Ju(Fm),fix:Ju(Fm),sat:Ju(Lm),hdop:Ju(Om),vdop:Ju(Om),pdop:Ju(Om),ageofdgpsdata:Ju(Om),dgpsid:Ju(Lm),extensions:Cv}),hv=["text","type"],cv=nl($m,{text:$u(jm),type:$u(jm)}),pv=nl($m,["name","cmt","desc","src","link","number","type","rtept"]),fv=nl($m,{name:$u(jm),cmt:$u(jm),desc:$u(jm),src:$u(jm),link:$u(Iv),number:$u(Nm),type:$u(jm),rtept:Qu($u(Lv))}),dv=nl($m,["ele","time"]),gv=nl($m,["name","cmt","desc","src","link","number","type","trkseg"]),yv=nl($m,{name:$u(jm),cmt:$u(jm),desc:$u(jm),src:$u(jm),link:$u(Iv),number:$u(Nm),type:$u(jm),trkseg:Qu($u((function(t,e,r){var n={node:t};n.geometryLayout=e.getLayout(),n.properties={},sl(n,vv,mv,e.getCoordinates(),r)})))}),mv=tl("trkpt"),vv=nl($m,{trkpt:$u(Lv)}),_v=nl($m,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),bv=nl($m,{ele:$u(km),time:$u((function(t,e){var r=new Date(1e3*e),n=r.getUTCFullYear()+"-"+$e(r.getUTCMonth()+1,2)+"-"+$e(r.getUTCDate(),2)+"T"+$e(r.getUTCHours(),2)+":"+$e(r.getUTCMinutes(),2)+":"+$e(r.getUTCSeconds(),2)+"Z";t.appendChild(hl().createTextNode(n))})),magvar:$u(km),geoidheight:$u(km),name:$u(jm),cmt:$u(jm),desc:$u(jm),src:$u(jm),link:$u(Iv),sym:$u(jm),type:$u(jm),fix:$u(jm),sat:$u(Nm),hdop:$u(km),vdop:$u(km),pdop:$u(km),ageofdgpsdata:$u(km),dgpsid:$u(Nm)}),xv={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function wv(t,e,r){var n=t.getGeometry();if(n){var i=xv[n.getType()];if(i)return Yu(e[e.length-1].node.namespaceURI,i)}}function Sv(t,e,r,n){return t.push(parseFloat(r.getAttribute("lon")),parseFloat(r.getAttribute("lat"))),"ele"in n?(t.push(n.ele),delete n.ele,e.hasZ=!0):t.push(0),"time"in n?(t.push(n.time),delete n.time,e.hasM=!0):t.push(0),t}function Tv(t,e,r){var n=pt,i=2;if(t.hasZ&&t.hasM?(n=gt,i=4):t.hasZ?(n=ft,i=3):t.hasM&&(n=dt,i=3),4!==i){for(var o=0,a=e.length/4;o<a;o++)e[o*i]=e[4*o],e[o*i+1]=e[4*o+1],t.hasZ&&(e[o*i+2]=e[4*o+2]),t.hasM&&(e[o*i+2]=e[4*o+3]);if(e.length=e.length/4*i,r)for(o=0,a=r.length;o<a;o++)r[o]=r[o]/4*i}return n}function Ev(t,e){var r=e[e.length-1],n=t.getAttribute("href");null!==n&&(r.link=n),il(ev,t,e)}function Cv(t,e){e[e.length-1].extensionsNode_=t}function Pv(t,e){var r=e[0],n=ol({flatCoordinates:[],layoutOptions:{}},iv,t,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var o=n.layoutOptions;delete n.layoutOptions;var a=Tv(o,i),s=new Cd(i,a);Ud(s,!1,r);var u=new ct(s);return u.setProperties(n,!0),u}}function Rv(t,e){var r=e[0],n=ol({flatCoordinates:[],ends:[],layoutOptions:{}},av,t,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var o=n.ends;delete n.ends;var a=n.layoutOptions;delete n.layoutOptions;var s=Tv(a,i,o),u=new Vd(i,s,o);Ud(u,!1,r);var l=new ct(u);return l.setProperties(n,!0),l}}function Ov(t,e){var r=e[0],n=ol({},lv,t,e);if(n){var i={},o=Sv([],i,t,n),a=Tv(i,o),s=new gn(o,a);Ud(s,!1,r);var u=new ct(s);return u.setProperties(n,!0),u}}function Iv(t,e,r){t.setAttribute("href",e);var n=r[r.length-1].properties,i=[n.linkText,n.linkType];sl({node:t},cv,el,i,r,hv)}function Lv(t,e,r){var n=r[r.length-1],i=n.node.namespaceURI,o=n.properties;switch(t.setAttributeNS(null,"lat",String(e[1])),t.setAttributeNS(null,"lon",String(e[0])),n.geometryLayout){case gt:0!==e[3]&&(o.time=e[3]);case ft:0!==e[2]&&(o.ele=e[2]);break;case dt:0!==e[2]&&(o.time=e[2])}var a="rtept"==t.nodeName?dv[i]:_v[i],s=rl(o,a);sl({node:t,properties:o},bv,el,s,r,a)}var Mv=nv,Fv=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Av(t){return"string"==typeof t?t:""}var kv,Nv,jv,Gv,Dv,zv,Uv,Bv=function(t){function e(){return t.call(this)||this}return Fv(e,t),e.prototype.getType=function(){return vu},e.prototype.readFeature=function(t,e){return this.readFeatureFromText(Av(t),this.adaptOptions(e))},e.prototype.readFeatureFromText=function(t,e){return n()},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromText(Av(t),this.adaptOptions(e))},e.prototype.readFeaturesFromText=function(t,e){return n()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromText(Av(t),this.adaptOptions(e))},e.prototype.readGeometryFromText=function(t,e){return n()},e.prototype.readProjection=function(t){return this.readProjectionFromText(Av(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){return this.writeFeatureText(t,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){return n()},e.prototype.writeFeatures=function(t,e){return this.writeFeaturesText(t,this.adaptOptions(e))},e.prototype.writeFeaturesText=function(t,e){return n()},e.prototype.writeGeometry=function(t,e){return this.writeGeometryText(t,this.adaptOptions(e))},e.prototype.writeGeometryText=function(t,e){return n()},e}(zd),Yv=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vv="barometric",Wv="gps",qv="none",Xv=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Zv=/^H.([A-Z]{3}).*?:(.*)/,Kv=/^HFDTE(\d{2})(\d{2})(\d{2})/,Hv=/\r\n|\r|\n/,Jv=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.dataProjection=yr("EPSG:4326"),r.altitudeMode_=n.altitudeMode?n.altitudeMode:qv,r}return Yv(e,t),e.prototype.readFeatureFromText=function(t,e){var r,n,i=this.altitudeMode_,o=t.split(Hv),a={},s=[],u=2e3,l=0,h=1,c=-1;for(r=0,n=o.length;r<n;++r){var p=o[r],f=void 0;if("B"==p.charAt(0)){if(f=Xv.exec(p)){var d=parseInt(f[1],10),g=parseInt(f[2],10),y=parseInt(f[3],10),m=parseInt(f[4],10)+parseInt(f[5],10)/6e4;"S"==f[6]&&(m=-m);var v=parseInt(f[7],10)+parseInt(f[8],10)/6e4;if("W"==f[9]&&(v=-v),s.push(v,m),i!=qv){var _=void 0;_=i==Wv?parseInt(f[11],10):i==Vv?parseInt(f[12],10):0,s.push(_)}var b=Date.UTC(u,l,h,d,g,y);b<c&&(b=Date.UTC(u,l,h+1,d,g,y)),s.push(b/1e3),c=b}}else"H"==p.charAt(0)&&((f=Kv.exec(p))?(h=parseInt(f[1],10),l=parseInt(f[2],10)-1,u=2e3+parseInt(f[3],10)):(f=Zv.exec(p))&&(a[f[1]]=f[2].trim()))}if(0===s.length)return null;var x=new Cd(s,i==qv?dt:gt),w=new ct(Ud(x,!1,e));return w.setProperties(a,!0),w},e.prototype.readFeaturesFromText=function(t,e){var r=this.readFeatureFromText(t,e);return r?[r]:[]},e}(Bv),$v=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qv=["http://www.google.com/kml/ext/2.2"],t_=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],e_={fraction:Ul,pixels:Bl,insetPixels:Bl},r_=nl(t_,{ExtendedData:K_,Region:H_,MultiGeometry:Ju(z_,"geometry"),LineString:Ju(j_,"geometry"),LinearRing:Ju(G_,"geometry"),Point:Ju(U_,"geometry"),Polygon:Ju(Y_,"geometry"),Style:Ju(W_),StyleMap:function(t,e){var r=S_.call(this,t,e);if(!r)return;var n=e[e.length-1];Array.isArray(r)?n.Style=r:"string"==typeof r?n.styleUrl=r:lt(!1,38)},address:Ju(Fm),description:Ju(Fm),name:Ju(Fm),open:Ju(Cm),phoneNumber:Ju(Fm),styleUrl:Ju(b_),visibility:Ju(Cm)},nl(Qv,{MultiTrack:Ju((function(t,e){var r=ol([],I_,t,e);if(!r)return;return new Vd(r)}),"geometry"),Track:Ju(M_,"geometry")})),n_=nl(t_,{ExtendedData:K_,Region:H_,Link:function(t,e){il(i_,t,e)},address:Ju(Fm),description:Ju(Fm),name:Ju(Fm),open:Ju(Cm),phoneNumber:Ju(Fm),visibility:Ju(Cm)}),i_=nl(t_,{href:Ju(b_)}),o_=nl(t_,{LatLonAltBox:function(t,e){var r=ol({},Q_,t,e);if(!r)return;var n=e[e.length-1],i=[parseFloat(r.west),parseFloat(r.south),parseFloat(r.east),parseFloat(r.north)];n.extent=i,n.altitudeMode=r.altitudeMode,n.minAltitude=parseFloat(r.minAltitude),n.maxAltitude=parseFloat(r.maxAltitude)},Lod:function(t,e){var r=ol({},tb,t,e);if(!r)return;var n=e[e.length-1];n.minLodPixels=parseFloat(r.minLodPixels),n.maxLodPixels=parseFloat(r.maxLodPixels),n.minFadeExtent=parseFloat(r.minFadeExtent),n.maxFadeExtent=parseFloat(r.maxFadeExtent)}}),a_=nl(t_,["Document","Placemark"]),s_=nl(t_,{Document:$u((function(t,e,r){sl({node:t},ob,ab,e,r,void 0,this)})),Placemark:$u(Ib)}),u_=null;var l_,h_=null;var c_,p_=null;var f_=null;var d_=null;var g_,y_=null;var m_=function(t){function e(e){var r=t.call(this)||this,n=e||{};return y_||(u_=new zl({color:kv=[255,255,255,1]}),h_=new rh({anchor:Nv=[20,2],anchorOrigin:Yl,anchorXUnits:jv=Bl,anchorYUnits:Gv=Bl,crossOrigin:"anonymous",rotation:0,scale:Uv=.5,size:Dv=[64,64],src:zv="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"}),l_="NO_IMAGE",p_=new nh({color:kv,width:1}),c_=new nh({color:[51,51,51,1],width:2}),f_=new ph({font:"bold 16px Helvetica",fill:u_,stroke:c_,scale:.8}),d_=new lh({fill:u_,image:h_,text:f_,stroke:p_,zIndex:0}),y_=[d_]),r.dataProjection=yr("EPSG:4326"),r.defaultStyle_=n.defaultStyle?n.defaultStyle:y_,r.extractStyles_=void 0===n.extractStyles||n.extractStyles,r.writeStyles_=void 0===n.writeStyles||n.writeStyles,r.sharedStyles_={},r.showPointNames_=void 0===n.showPointNames||n.showPointNames,r.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",r}return $v(e,t),e.prototype.readDocumentOrFolder_=function(t,e){var r=ol([],nl(t_,{Document:Xu(this.readDocumentOrFolder_,this),Folder:Xu(this.readDocumentOrFolder_,this),Placemark:Zu(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),t,e,this);return r||void 0},e.prototype.readPlacemark_=function(t,e){var r=ol({geometry:null},r_,t,e,this);if(r){var n=new ct,i=t.getAttribute("id");null!==i&&n.setId(i);var o=e[0],a=r.geometry;if(a&&Ud(a,!1,o),n.setGeometry(a),delete r.geometry,this.extractStyles_){var s=function(t,e,r,n,i){return function(o,a){var s=i,u="",l=[];if(s){var h=o.getGeometry();if(h){var c=h.getType();s=c===yt.GEOMETRY_COLLECTION?(l=h.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.POINT||e===yt.MULTI_POINT}))).length>0:c===yt.POINT||c===yt.MULTI_POINT}}s&&(u=o.get("name"),(s=s&&!!u)&&u.search(/&[^&]+;/)>-1&&(g_||(g_=document.createElement("textarea")),g_.innerHTML=u,u=g_.value));var p=r;if(t?p=t:e&&(p=function t(e,r,n){return Array.isArray(e)?e:"string"==typeof e?(!(e in n)&&"#"+e in n&&(e="#"+e),t(n[e],r,n)):r}(e,r,n)),s){var f=function(t,e){var r=[0,0],n="start",i=t.getImage();if(i){var o=i.getImageSize();if(null===o&&(o=Dv),2==o.length){var a=i.getScaleArray();r[0]=a[0]*o[0]/2,r[1]=-a[1]*o[1]/2,n="left"}}var s=t.getText();s?((s=s.clone()).setFont(s.getFont()||f_.getFont()),s.setScale(s.getScale()||f_.getScale()),s.setFill(s.getFill()||f_.getFill()),s.setStroke(s.getStroke()||c_)):s=f_.clone();return s.setText(e),s.setOffsetX(r[0]),s.setOffsetY(r[1]),s.setTextAlign(n),new lh({image:i,text:s})}(p[0],u);return l.length>0?(f.setGeometry(new Bg(l)),[f,new lh({geometry:p[0].getGeometry(),image:null,fill:p[0].getFill(),stroke:p[0].getStroke(),text:null})].concat(p.slice(1))):f}return p}}(r.Style,r.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);n.setStyle(s)}return delete r.Style,n.setProperties(r,!0),n}},e.prototype.readSharedStyle_=function(t,e){var r=t.getAttribute("id");if(null!==r){var n=W_.call(this,t,e);if(n){var i=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)i=new URL("#"+r,o).href;else i="#"+r;this.sharedStyles_[i]=n}}},e.prototype.readSharedStyleMap_=function(t,e){var r=t.getAttribute("id");if(null!==r){var n=S_.call(this,t,e);if(n){var i,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)i=new URL("#"+r,o).href;else i="#"+r;this.sharedStyles_[i]=n}}},e.prototype.readFeatureFromNode=function(t,e){if(!d(t_,t.namespaceURI))return null;var r=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return r||null},e.prototype.readFeaturesFromNode=function(t,e){if(!d(t_,t.namespaceURI))return[];var r,n=t.localName;if("Document"==n||"Folder"==n)return(r=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]))||[];if("Placemark"==n){var i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i?[i]:[]}if("kml"==n){r=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var a=this.readFeaturesFromNode(o,e);a&&m(r,a)}return r}return[]},e.prototype.readName=function(t){if(t){if("string"==typeof t){var e=qu(t);return this.readNameFromDocument(e)}return Wu(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var r=this.readNameFromNode(e);if(r)return r}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(d(t_,e.namespaceURI)&&"name"==e.localName)return Fm(e);for(e=t.firstElementChild;e;e=e.nextElementSibling){var r=e.localName;if(d(t_,e.namespaceURI)&&("Document"==r||"Folder"==r||"Placemark"==r||"kml"==r)){var n=this.readNameFromNode(e);if(n)return n}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"==typeof t){var r=qu(t);m(e,this.readNetworkLinksFromDocument(r))}else Wu(t)?m(e,this.readNetworkLinksFromDocument(t)):m(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&m(e,this.readNetworkLinksFromNode(r));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(d(t_,r.namespaceURI)&&"NetworkLink"==r.localName){var n=ol({},n_,r,[]);e.push(n)}for(r=t.firstElementChild;r;r=r.nextElementSibling){var i=r.localName;!d(t_,r.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||m(e,this.readNetworkLinksFromNode(r))}return e},e.prototype.readRegion=function(t){var e=[];if("string"==typeof t){var r=qu(t);m(e,this.readRegionFromDocument(r))}else Wu(t)?m(e,this.readRegionFromDocument(t)):m(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&m(e,this.readRegionFromNode(r));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(d(t_,r.namespaceURI)&&"Region"==r.localName){var n=ol({},o_,r,[]);e.push(n)}for(r=t.firstElementChild;r;r=r.nextElementSibling){var i=r.localName;!d(t_,r.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||m(e,this.readRegionFromNode(r))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=Yu(t_[4],"kml"),n="http://www.w3.org/2000/xmlns/";r.setAttributeNS(n,"xmlns:gx",Qv[0]),r.setAttributeNS(n,"xmlns:xsi",Bu),r.setAttributeNS(Bu,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var i={node:r},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var a=a_[r.namespaceURI],s=rl(o,a);return sl(i,s_,el,s,[e],a,this),r},e}(bm);function v_(t){var e=Vu(t,!1),r=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(r){var n=r[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}}function __(t){for(var e,r=Vu(t,!1),n=[],i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i;e=i.exec(r);){var o=parseFloat(e[1]),a=parseFloat(e[2]),s=e[3]?parseFloat(e[3]):0;n.push(o,a,s),r=r.substr(e[0].length)}if(""===r)return n}function b_(t){var e=Vu(t,!1).trim(),r=t.baseURI;return r&&"about:blank"!=r||(r=window.location.href),r?new URL(e,r).href:e}function x_(t){return Om(t)}var w_=nl(t_,{Pair:function(t,e){var r=ol({},J_,t,e,this);if(!r)return;var n=r.key;if(n&&"normal"==n){var i=r.styleUrl;i&&(e[e.length-1]=i);var o=r.Style;o&&(e[e.length-1]=o)}}});function S_(t,e){return ol(void 0,w_,t,e,this)}var T_=nl(t_,{Icon:Ju((function(t,e){var r=ol({},F_,t,e);return r||null})),color:Ju(v_),heading:Ju(Om),hotSpot:Ju((function(t){var e,r=t.getAttribute("xunits"),n=t.getAttribute("yunits");return e="insetPixels"!==r?"insetPixels"!==n?Yl:Wl:"insetPixels"!==n?Vl:ql,{x:parseFloat(t.getAttribute("x")),xunits:e_[r],y:parseFloat(t.getAttribute("y")),yunits:e_[n],origin:e}})),scale:Ju(x_)});var E_=nl(t_,{color:Ju(v_),scale:Ju(x_)});var C_=nl(t_,{color:Ju(v_),width:Ju(Om)});var P_=nl(t_,{color:Ju(v_),fill:Ju(Cm),outline:Ju(Cm)});var R_=nl(t_,{coordinates:Ku(__)});function O_(t,e){return ol(null,R_,t,e)}var I_=nl(Qv,{Track:Zu(M_)});var L_=nl(t_,{when:function(t,e){var r=e[e.length-1].whens,n=Vu(t,!1),i=Date.parse(n);r.push(isNaN(i)?0:i)}},nl(Qv,{coord:function(t,e){var r=e[e.length-1].flatCoordinates,n=Vu(t,!1),i=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(n);if(i){var o=parseFloat(i[1]),a=parseFloat(i[2]),s=parseFloat(i[3]);r.push(o,a,s,0)}else r.push(0,0,0,0)}}));function M_(t,e){var r=ol({flatCoordinates:[],whens:[]},L_,t,e);if(r){for(var n=r.flatCoordinates,i=r.whens,o=0,a=Math.min(n.length,i.length);o<a;++o)n[4*o+3]=i[o];return new Cd(n,gt)}}var F_=nl(t_,{href:Ju(b_)},nl(Qv,{x:Ju(Om),y:Ju(Om),w:Ju(Om),h:Ju(Om)}));var A_=nl(t_,{coordinates:Ku(__)});function k_(t,e){return ol(null,A_,t,e)}var N_=nl(t_,{extrude:Ju(Cm),tessellate:Ju(Cm),altitudeMode:Ju(Fm)});function j_(t,e){var r=ol({},N_,t,e),n=k_(t,e);if(n){var i=new Cd(n,ft);return i.setProperties(r,!0),i}}function G_(t,e){var r=ol({},N_,t,e),n=k_(t,e);if(n){var i=new Ln(n,ft,[n.length]);return i.setProperties(r,!0),i}}var D_=nl(t_,{LineString:Zu(j_),LinearRing:Zu(G_),MultiGeometry:Zu(z_),Point:Zu(U_),Polygon:Zu(Y_)});function z_(t,e){var r,n=ol([],D_,t,e);if(!n)return null;if(0===n.length)return new Bg(n);for(var i=!0,o=n[0].getType(),a=1,s=n.length;a<s;++a)if(n[a].getType()!=o){i=!1;break}if(i){var u=void 0,l=void 0;if(o==yt.POINT){var h=n[0];u=h.getLayout(),l=h.getFlatCoordinates();for(a=1,s=n.length;a<s;++a)m(l,n[a].getFlatCoordinates());q_(r=new qd(l,u),n)}else o==yt.LINE_STRING?q_(r=new Vd(n),n):o==yt.POLYGON?q_(r=new Kd(n),n):o==yt.GEOMETRY_COLLECTION?r=new Bg(n):lt(!1,37)}else r=new Bg(n);return r}function U_(t,e){var r=ol({},N_,t,e),n=k_(t,e);if(n){var i=new gn(n,ft);return i.setProperties(r,!0),i}}var B_=nl(t_,{innerBoundaryIs:function(t,e){var r=ol(void 0,eb,t,e);if(r){e[e.length-1].push(r)}},outerBoundaryIs:function(t,e){var r=ol(void 0,rb,t,e);if(r){e[e.length-1][0]=r}}});function Y_(t,e){var r=ol({},N_,t,e),n=ol([null],B_,t,e);if(n&&n[0]){for(var i=n[0],o=[i.length],a=1,s=n.length;a<s;++a)m(i,n[a]),o.push(i.length);var u=new Ln(i,ft,o);return u.setProperties(r,!0),u}}var V_=nl(t_,{IconStyle:function(t,e){var r=ol({},T_,t,e);if(r){var n,i,o,a,s=e[e.length-1],u="Icon"in r?r.Icon:{},l=!("Icon"in r)||Object.keys(u).length>0,h=u.href;h?n=h:l&&(n=zv);var c,p=Yl,f=r.hotSpot;f?(i=[f.x,f.y],o=f.xunits,a=f.yunits,p=f.origin):n===zv?(i=Nv,o=jv,a=Gv):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(n)&&(i=[.5,0],o=Ul,a=Ul);var d,g=u.x,y=u.y;void 0!==g&&void 0!==y&&(c=[g,y]);var m,v=u.w,_=u.h;void 0!==v&&void 0!==_&&(d=[v,_]);var b=r.heading;void 0!==b&&(m=Re(b));var x=r.scale,w=r.color;if(l){n==zv&&(d=Dv,void 0===x&&(x=Uv));var S=new rh({anchor:i,anchorOrigin:p,anchorXUnits:o,anchorYUnits:a,crossOrigin:this.crossOrigin_,offset:c,offsetOrigin:Yl,rotation:m,scale:x,size:d,src:n,color:w});s.imageStyle=S}else s.imageStyle=l_}},LabelStyle:function(t,e){var r=ol({},E_,t,e);if(r){var n=e[e.length-1],i=new ph({fill:new zl({color:"color"in r?r.color:kv}),scale:r.scale});n.textStyle=i}},LineStyle:function(t,e){var r=ol({},C_,t,e);if(r){var n=e[e.length-1],i=new nh({color:"color"in r?r.color:kv,width:"width"in r?r.width:1});n.strokeStyle=i}},PolyStyle:function(t,e){var r=ol({},P_,t,e);if(r){var n=e[e.length-1],i=new zl({color:"color"in r?r.color:kv});n.fillStyle=i;var o=r.fill;void 0!==o&&(n.fill=o);var a=r.outline;void 0!==a&&(n.outline=a)}}});function W_(t,e){var r=ol({},V_,t,e,this);if(!r)return null;var n,i="fillStyle"in r?r.fillStyle:u_,o=r.fill;void 0===o||o||(i=null),"imageStyle"in r?r.imageStyle!=l_&&(n=r.imageStyle):n=h_;var a="textStyle"in r?r.textStyle:f_,s="strokeStyle"in r?r.strokeStyle:p_,u=r.outline;return void 0===u||u?[new lh({fill:i,image:n,stroke:s,text:a,zIndex:void 0})]:[new lh({geometry:function(t){var e=t.getGeometry(),r=e.getType();return r===yt.GEOMETRY_COLLECTION?new Bg(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e!==yt.POLYGON&&e!==yt.MULTI_POLYGON}))):r!==yt.POLYGON&&r!==yt.MULTI_POLYGON?e:void 0},fill:i,image:n,stroke:s,text:a,zIndex:void 0}),new lh({geometry:function(t){var e=t.getGeometry(),r=e.getType();return r===yt.GEOMETRY_COLLECTION?new Bg(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.POLYGON||e===yt.MULTI_POLYGON}))):r===yt.POLYGON||r===yt.MULTI_POLYGON?e:void 0},fill:i,stroke:null,zIndex:void 0})]}function q_(t,e){var r,n,i,o=e.length,a=new Array(e.length),s=new Array(e.length),u=new Array(e.length);r=!1,n=!1,i=!1;for(var l=0;l<o;++l){var h=e[l];a[l]=h.get("extrude"),s[l]=h.get("tessellate"),u[l]=h.get("altitudeMode"),r=r||void 0!==a[l],n=n||void 0!==s[l],i=i||u[l]}r&&t.set("extrude",a),n&&t.set("tessellate",s),i&&t.set("altitudeMode",u)}var X_=nl(t_,{displayName:Ju(Fm),value:Ju(Fm)});var Z_=nl(t_,{Data:function(t,e){var r=t.getAttribute("name");il(X_,t,e);var n=e[e.length-1];r&&n.displayName?n[r]={value:n.value,displayName:n.displayName,toString:function(){return n.value}}:null!==r?n[r]=n.value:null!==n.displayName&&(n[n.displayName]=n.value),delete n.value},SchemaData:function(t,e){il($_,t,e)}});function K_(t,e){il(Z_,t,e)}function H_(t,e){il(o_,t,e)}var J_=nl(t_,{Style:Ju(W_),key:Ju(Fm),styleUrl:Ju(b_)});var $_=nl(t_,{SimpleData:function(t,e){var r=t.getAttribute("name");if(null!==r){var n=Fm(t);e[e.length-1][r]=n}}});var Q_=nl(t_,{altitudeMode:Ju(Fm),minAltitude:Ju(Om),maxAltitude:Ju(Om),north:Ju(Om),south:Ju(Om),east:Ju(Om),west:Ju(Om)});var tb=nl(t_,{minLodPixels:Ju(Om),maxLodPixels:Ju(Om),minFadeExtent:Ju(Om),maxFadeExtent:Ju(Om)});var eb=nl(t_,{LinearRing:Ku(O_)});var rb=nl(t_,{LinearRing:Ku(O_)});function nb(t,e){for(var r=ni(e),n=[255*(4==r.length?r[3]:1),r[2],r[1],r[0]],i=0;i<4;++i){var o=Math.floor(n[i]).toString(16);n[i]=1==o.length?"0"+o:o}jm(t,n.join(""))}var ib=nl(t_,{Data:$u((function(t,e,r){t.setAttribute("name",e.name);var n={node:t},i=e.value;"object"==typeof i?(null!==i&&i.displayName&&sl(n,ib,el,[i.displayName],r,["displayName"]),null!==i&&i.value&&sl(n,ib,el,[i.value],r,["value"])):sl(n,ib,el,[i],r,["value"])})),value:$u((function(t,e){jm(t,e)})),displayName:$u((function(t,e){!function(t,e){t.appendChild(hl().createCDATASection(e))}(t,e)}))});var ob=nl(t_,{Placemark:$u(Ib)}),ab=function(t,e,r){return Yu(e[e.length-1].node.namespaceURI,"Placemark")};var sb=tl("Data");var ub=nl(t_,["href"],nl(Qv,["x","y","w","h"])),lb=nl(t_,{href:$u(jm)},nl(Qv,{x:$u(km),y:$u(km),w:$u(km),h:$u(km)})),hb=function(t,e,r){return Yu(Qv[0],"gx:"+r)};var cb=nl(t_,["scale","heading","Icon","color","hotSpot"]),pb=nl(t_,{Icon:$u((function(t,e,r){var n={node:t},i=r[r.length-1].node,o=ub[i.namespaceURI],a=rl(e,o);sl(n,lb,el,a,r,o),a=rl(e,o=ub[Qv[0]]),sl(n,lb,hb,a,r,o)})),color:$u(nb),heading:$u(km),hotSpot:$u((function(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",e.xunits),t.setAttribute("yunits",e.yunits)})),scale:$u(zb)});var fb=nl(t_,["color","scale"]),db=nl(t_,{color:$u(nb),scale:$u(zb)});var gb=nl(t_,["color","width"]),yb=nl(t_,{color:$u(nb),width:$u(km)});var mb={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},vb=function(t,e,r){if(t)return Yu(e[e.length-1].node.namespaceURI,mb[t.getType()])},_b=tl("Point"),bb=tl("LineString"),xb=tl("LinearRing"),wb=tl("Polygon"),Sb=nl(t_,{LineString:$u(Fb),Point:$u(Fb),Polygon:$u(Gb),GeometryCollection:$u(Tb)});function Tb(t,e,r){var n,i={node:t},o=e.getType(),a=[];o===yt.GEOMETRY_COLLECTION?(e.getGeometriesArrayRecursive().forEach((function(t){var e=t.getType();e===yt.MULTI_POINT?a=a.concat(t.getPoints()):e===yt.MULTI_LINE_STRING?a=a.concat(t.getLineStrings()):e===yt.MULTI_POLYGON?a=a.concat(t.getPolygons()):e===yt.POINT||e===yt.LINE_STRING||e===yt.POLYGON?a.push(t):lt(!1,39)})),n=vb):o===yt.MULTI_POINT?(a=e.getPoints(),n=_b):o===yt.MULTI_LINE_STRING?(a=e.getLineStrings(),n=bb):o===yt.MULTI_POLYGON?(a=e.getPolygons(),n=wb):lt(!1,39),sl(i,Sb,n,a,r)}var Eb=nl(t_,{LinearRing:$u(Fb)});function Cb(t,e,r){sl({node:t},Eb,xb,[e],r)}var Pb=nl(t_,{ExtendedData:$u((function(t,e,r){for(var n={node:t},i=e.names,o=e.values,a=i.length,s=0;s<a;s++)sl(n,ib,sb,[{name:i[s],value:o[s]}],r)})),MultiGeometry:$u(Tb),LineString:$u(Fb),LinearRing:$u(Fb),Point:$u(Fb),Polygon:$u(Gb),Style:$u((function(t,e,r){var n={node:t},i={};if(e.pointStyles.length){var o=e.pointStyles[0].getText();o&&(i.LabelStyle=o);var a=e.pointStyles[0].getImage();a&&"function"==typeof a.getSrc&&(i.IconStyle=a)}if(e.lineStyles.length){(s=e.lineStyles[0].getStroke())&&(i.LineStyle=s)}if(e.polyStyles.length){var s;(s=e.polyStyles[0].getStroke())&&!i.LineStyle&&(i.LineStyle=s),i.PolyStyle=e.polyStyles[0]}var u=r[r.length-1].node,l=Ub[u.namespaceURI],h=rl(i,l);sl(n,Bb,el,h,r,l)})),address:$u(jm),description:$u(jm),name:$u(jm),open:$u(Am),phoneNumber:$u(jm),styleUrl:$u(jm),visibility:$u(Am)}),Rb=nl(t_,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),Ob=tl("ExtendedData");function Ib(t,e,r){var n={node:t};e.getId()&&t.setAttribute("id",e.getId());var i=e.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[e.getGeometryName()]=1;var a=Object.keys(i||{}).sort().filter((function(t){return!o[t]})),s=e.getStyleFunction();if(s){var u=s(e,0);if(u){var l=Array.isArray(u)?u:[u],h=l;if(e.getGeometry()&&(h=l.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return n===yt.GEOMETRY_COLLECTION?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.POINT||e===yt.MULTI_POINT})).length:n===yt.POINT||n===yt.MULTI_POINT}}))),this.writeStyles_){var c=l,p=l;e.getGeometry()&&(c=l.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return n===yt.GEOMETRY_COLLECTION?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.LINE_STRING||e===yt.MULTI_LINE_STRING})).length:n===yt.LINE_STRING||n===yt.MULTI_LINE_STRING}})),p=l.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return n===yt.GEOMETRY_COLLECTION?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===yt.POLYGON||e===yt.MULTI_POLYGON})).length:n===yt.POLYGON||n===yt.MULTI_POLYGON}}))),i.Style={pointStyles:h,lineStyles:c,polyStyles:p}}if(h.length&&void 0===i.name){var f=h[0].getText();f&&(i.name=f.getText())}}}var d=r[r.length-1].node,g=Rb[d.namespaceURI],y=rl(i,g);if(sl(n,Pb,el,y,r,g),a.length>0){var m=rl(i,a);sl(n,Pb,Ob,[{names:a,values:m}],r)}var v=r[0],_=e.getGeometry();_&&(_=Ud(_,!0,v)),sl(n,Pb,vb,[_],r)}var Lb=nl(t_,["extrude","tessellate","altitudeMode","coordinates"]),Mb=nl(t_,{extrude:$u(Am),tessellate:$u(Am),altitudeMode:$u(jm),coordinates:$u((function(t,e,r){var n,i=r[r.length-1],o=i.layout,a=i.stride;o==pt||o==dt?n=2:o==ft||o==gt?n=3:lt(!1,34);var s=e.length,u="";if(s>0){u+=e[0];for(var l=1;l<n;++l)u+=","+e[l];for(var h=a;h<s;h+=a){u+=" "+e[h];for(l=1;l<n;++l)u+=","+e[h+l]}}jm(t,u)}))});function Fb(t,e,r){var n=e.getFlatCoordinates(),i={node:t};i.layout=e.getLayout(),i.stride=e.getStride();var o=e.getProperties();o.coordinates=n;var a=r[r.length-1].node,s=Lb[a.namespaceURI],u=rl(o,s);sl(i,Mb,el,u,r,s)}var Ab=nl(t_,["color","fill","outline"]),kb=nl(t_,{outerBoundaryIs:$u(Cb),innerBoundaryIs:$u(Cb)}),Nb=tl("innerBoundaryIs"),jb=tl("outerBoundaryIs");function Gb(t,e,r){var n=e.getLinearRings(),i=n.shift(),o={node:t};sl(o,kb,Nb,n,r),sl(o,kb,jb,[i],r)}var Db=nl(t_,{color:$u(nb),fill:$u(Am),outline:$u(Am)});function zb(t,e){km(t,Math.round(1e6*e)/1e6)}var Ub=nl(t_,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Bb=nl(t_,{IconStyle:$u((function(t,e,r){var n={node:t},i={},o=e.getSrc(),a=e.getSize(),s=e.getImageSize(),u={href:o};if(a){u.w=a[0],u.h=a[1];var l=e.getAnchor(),h=e.getOrigin();if(h&&s&&0!==h[0]&&h[1]!==a[1]&&(u.x=h[0],u.y=s[1]-(h[1]+a[1])),l&&(l[0]!==a[0]/2||l[1]!==a[1]/2)){var c={x:l[0],xunits:Bl,y:a[1]-l[1],yunits:Bl};i.hotSpot=c}}i.Icon=u;var p=e.getScale();1!==p&&(i.scale=p);var f=e.getRotation();0!==f&&(i.heading=f);var d=e.getColor();d&&(i.color=d);var g=r[r.length-1].node,y=cb[g.namespaceURI],m=rl(i,y);sl(n,pb,el,m,r,y)})),LabelStyle:$u((function(t,e,r){var n={node:t},i={},o=e.getFill();o&&(i.color=o.getColor());var a=e.getScale();a&&1!==a&&(i.scale=a);var s=r[r.length-1].node,u=fb[s.namespaceURI],l=rl(i,u);sl(n,db,el,l,r,u)})),LineStyle:$u((function(t,e,r){var n={node:t},i={color:e.getColor(),width:Number(e.getWidth())||1},o=r[r.length-1].node,a=gb[o.namespaceURI],s=rl(i,a);sl(n,yb,el,s,r,a)})),PolyStyle:$u((function(t,e,r){var n={node:t},i=e.getFill(),o=e.getStroke(),a={color:i?i.getColor():void 0,fill:!!i&&void 0,outline:!!o&&void 0},s=r[r.length-1].node,u=Ab[s.namespaceURI],l=rl(a,u);sl(n,Db,el,l,r,u)}))});var Yb=m_,Vb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wb=[null],qb=nl(Wb,{nd:function(t,e){e[e.length-1].ndrefs.push(t.getAttribute("ref"))},tag:Hb}),Xb=nl(Wb,{node:function(t,e){var r=e[0],n=e[e.length-1],i=t.getAttribute("id"),o=[parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))];n.nodes[i]=o;var a=ol({tags:{}},Kb,t,e);if(!P(a.tags)){var s=new gn(o);Ud(s,!1,r);var u=new ct(s);u.setId(i),u.setProperties(a.tags,!0),n.features.push(u)}},way:function(t,e){var r=ol({id:t.getAttribute("id"),ndrefs:[],tags:{}},qb,t,e);e[e.length-1].ways.push(r)}}),Zb=function(t){function e(){var e=t.call(this)||this;return e.dataProjection=yr("EPSG:4326"),e}return Vb(e,t),e.prototype.readFeaturesFromNode=function(t,e){var r=this.getReadOptions(t,e);if("osm"==t.localName){for(var n=ol({nodes:{},ways:[],features:[]},Xb,t,[r]),i=0;i<n.ways.length;i++){for(var o=n.ways[i],a=[],s=0,u=o.ndrefs.length;s<u;s++){m(a,n.nodes[o.ndrefs[s]])}var l=void 0;Ud(l=o.ndrefs[0]==o.ndrefs[o.ndrefs.length-1]?new Ln(a,pt,[a.length]):new Cd(a,pt),!1,r);var h=new ct(l);h.setId(o.id),h.setProperties(o.tags,!0),n.features.push(h)}if(n.features)return n.features}return[]},e}(bm),Kb=nl(Wb,{tag:Hb});function Hb(t,e){e[e.length-1].tags[t.getAttribute("k")]=t.getAttribute("v")}var Jb=Zb;function $b(t,e,r,n,i,o){var a,s;void 0!==i?(a=i,s=void 0!==o?o:0):(a=[],s=0);for(var u=e;u<r;){var l=t[u++];a[s++]=t[u++],a[s++]=l;for(var h=2;h<n;++h)a[s++]=t[u++]}return a.length=s,a}var Qb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function tx(t,e,r){var n,i=r||1e5,o=new Array(e);for(n=0;n<e;++n)o[n]=0;for(var a=0,s=t.length;a<s;)for(n=0;n<e;++n,++a){var u=t[a],l=u-o[n];o[n]=u,t[a]=l}return rx(t,i)}function ex(t,e,r){var n,i=r||1e5,o=new Array(e);for(n=0;n<e;++n)o[n]=0;for(var a=nx(t,i),s=0,u=a.length;s<u;)for(n=0;n<e;++n,++s)o[n]+=a[s],a[s]=o[n];return a}function rx(t,e){for(var r=e||1e5,n=0,i=t.length;n<i;++n)t[n]=Math.round(t[n]*r);return function(t){for(var e=0,r=t.length;e<r;++e){var n=t[e];t[e]=n<0?~(n<<1):n<<1}return function(t){for(var e="",r=0,n=t.length;r<n;++r)e+=ix(t[r]);return e}(t)}(t)}function nx(t,e){for(var r=e||1e5,n=function(t){for(var e=function(t){for(var e=[],r=0,n=0,i=0,o=t.length;i<o;++i){var a=t.charCodeAt(i)-63;r|=(31&a)<<n,a<32?(e.push(r),r=0,n=0):n+=5}return e}(t),r=0,n=e.length;r<n;++r){var i=e[r];e[r]=1&i?~(i>>1):i>>1}return e}(t),i=0,o=n.length;i<o;++i)n[i]/=r;return n}function ix(t){for(var e,r="";t>=32;)e=63+(32|31&t),r+=String.fromCharCode(e),t>>=5;return e=t+63,r+=String.fromCharCode(e)}var ox=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.dataProjection=yr("EPSG:4326"),r.factor_=n.factor?n.factor:1e5,r.geometryLayout_=n.geometryLayout?n.geometryLayout:pt,r}return Qb(e,t),e.prototype.readFeatureFromText=function(t,e){var r=this.readGeometryFromText(t,e);return new ct(r)},e.prototype.readFeaturesFromText=function(t,e){return[this.readFeatureFromText(t,e)]},e.prototype.readGeometryFromText=function(t,e){var r=Wr(this.geometryLayout_),n=ex(t,r,this.factor_);$b(n,0,n.length,r,n);var i=sn(n,0,n.length,r);return Ud(new Cd(i,this.geometryLayout_),!1,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){var r=t.getGeometry();return r?this.writeGeometryText(r,e):(lt(!1,40),"")},e.prototype.writeFeaturesText=function(t,e){return this.writeFeatureText(t[0],e)},e.prototype.writeGeometryText=function(t,e){var r=(t=Ud(t,!0,this.adaptOptions(e))).getFlatCoordinates(),n=t.getStride();return $b(r,0,r.length,n,r),tx(r,n,this.factor_)},e}(Bv),ax=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sx=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.layerName_=n.layerName,r.layers_=n.layers?n.layers:null,r.dataProjection=yr(n.dataProjection?n.dataProjection:"EPSG:4326"),r}return ax(e,t),e.prototype.readFeaturesFromObject=function(t,e){if("Topology"==t.type){var r=t,n=void 0,i=null,o=null;r.transform&&(i=(n=r.transform).scale,o=n.translate);var a=r.arcs;n&&function(t,e,r){for(var n=0,i=t.length;n<i;++n)px(t[n],e,r)}(a,i,o);var s=[],u=r.objects,l=this.layerName_,h=void 0;for(var c in u)this.layers_&&-1==this.layers_.indexOf(c)||("GeometryCollection"===u[c].type?(h=u[c],s.push.apply(s,hx(h,a,i,o,l,c,e))):(h=u[c],s.push(cx(h,a,i,o,l,c,e))));return s}return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(Wg),ux={Point:function(t,e,r){var n=t.coordinates;e&&r&&fx(n,e,r);return new gn(n)},LineString:function(t,e){var r=lx(t.arcs,e);return new Cd(r)},Polygon:function(t,e){for(var r=[],n=0,i=t.arcs.length;n<i;++n)r[n]=lx(t.arcs[n],e);return new Ln(r)},MultiPoint:function(t,e,r){var n=t.coordinates;if(e&&r)for(var i=0,o=n.length;i<o;++i)fx(n[i],e,r);return new qd(n)},MultiLineString:function(t,e){for(var r=[],n=0,i=t.arcs.length;n<i;++n)r[n]=lx(t.arcs[n],e);return new Vd(r)},MultiPolygon:function(t,e){for(var r=[],n=0,i=t.arcs.length;n<i;++n){for(var o=t.arcs[n],a=[],s=0,u=o.length;s<u;++s)a[s]=lx(o[s],e);r[n]=a}return new Kd(r)}};function lx(t,e){for(var r,n,i=[],o=0,a=t.length;o<a;++o)r=t[o],o>0&&i.pop(),n=r>=0?e[r]:e[~r].slice().reverse(),i.push.apply(i,n);for(var s=0,u=i.length;s<u;++s)i[s]=i[s].slice();return i}function hx(t,e,r,n,i,o,a){for(var s=t.geometries,u=[],l=0,h=s.length;l<h;++l)u[l]=cx(s[l],e,r,n,i,o,a);return u}function cx(t,e,r,n,i,o,a){var s,u=t.type,l=ux[u];s="Point"===u||"MultiPoint"===u?l(t,r,n):l(t,e);var h=new ct;h.setGeometry(Ud(s,!1,a)),void 0!==t.id&&h.setId(t.id);var c=t.properties;return i&&(c||(c={}),c[i]=o),c&&h.setProperties(c,!0),h}function px(t,e,r){for(var n=0,i=0,o=0,a=t.length;o<a;++o){var s=t[o];n+=s[0],i+=s[1],s[0]=n,s[1]=i,fx(s,e,r)}}function fx(t,e,r){t[0]=t[0]*e[0]+r[0],t[1]=t[1]*e[1]+r[1]}var dx=sx,gx=function(){function t(t){this.tagName_=t}return t.prototype.getTagName=function(){return this.tagName_},t}(),yx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),mx=function(t){function e(e,r){var n=t.call(this,e)||this;return n.conditions=r,lt(n.conditions.length>=2,57),n}return yx(e,t),e}(gx),vx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_x=function(t){function e(e){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return vx(e,t),e}(mx),bx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),xx=function(t){function e(e,r,n){var i=t.call(this,"BBOX")||this;if(i.geometryName=e,i.extent=r,4!==r.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return i.srsName=n,i}return bx(e,t),e}(gx),wx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sx=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.geometryName=r||"the_geom",o.geometry=n,o.srsName=i,o}return wx(e,t),e}(gx),Tx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ex=function(t){function e(e,r,n){return t.call(this,"Contains",e,r,n)||this}return Tx(e,t),e}(Sx),Cx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Px=function(t){function e(e,r){var n=t.call(this,e)||this;return n.propertyName=r,n}return Cx(e,t),e}(gx),Rx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ox=function(t){function e(e,r,n){var i=t.call(this,"During",e)||this;return i.begin=r,i.end=n,i}return Rx(e,t),e}(Px),Ix=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lx=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.expression=n,o.matchCase=i,o}return Ix(e,t),e}(Px),Mx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fx=function(t){function e(e,r,n){return t.call(this,"PropertyIsEqualTo",e,r,n)||this}return Mx(e,t),e}(Lx),Ax=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),kx=function(t){function e(e,r){return t.call(this,"PropertyIsGreaterThan",e,r)||this}return Ax(e,t),e}(Lx),Nx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jx=function(t){function e(e,r){return t.call(this,"PropertyIsGreaterThanOrEqualTo",e,r)||this}return Nx(e,t),e}(Lx),Gx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Dx=function(t){function e(e,r,n){return t.call(this,"Intersects",e,r,n)||this}return Gx(e,t),e}(Sx),zx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ux=function(t){function e(e,r,n){var i=t.call(this,"PropertyIsBetween",e)||this;return i.lowerBoundary=r,i.upperBoundary=n,i}return zx(e,t),e}(Px),Bx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yx=function(t){function e(e,r,n,i,o,a){var s=t.call(this,"PropertyIsLike",e)||this;return s.pattern=r,s.wildCard=void 0!==n?n:"*",s.singleChar=void 0!==i?i:".",s.escapeChar=void 0!==o?o:"!",s.matchCase=a,s}return Bx(e,t),e}(Px),Vx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wx=function(t){function e(e){return t.call(this,"PropertyIsNull",e)||this}return Vx(e,t),e}(Px),qx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xx=function(t){function e(e,r){return t.call(this,"PropertyIsLessThan",e,r)||this}return qx(e,t),e}(Lx),Zx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kx=function(t){function e(e,r){return t.call(this,"PropertyIsLessThanOrEqualTo",e,r)||this}return Zx(e,t),e}(Lx),Hx=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jx=function(t){function e(e){var r=t.call(this,"Not")||this;return r.condition=e,r}return Hx(e,t),e}(gx),$x=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qx=function(t){function e(e,r,n){return t.call(this,"PropertyIsNotEqualTo",e,r,n)||this}return $x(e,t),e}(Lx),tw=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ew=function(t){function e(e){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return tw(e,t),e}(mx),rw=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nw=function(t){function e(e,r,n){return t.call(this,"Within",e,r,n)||this}return rw(e,t),e}(Sx);function iw(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(_x,e))}function ow(t,e,r){return new xx(t,e,r)}var aw=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sw={"http://www.opengis.net/gml":{boundedBy:Ju(Em.prototype.readGeometryElement,"bounds")}},uw={"http://www.opengis.net/wfs":{totalInserted:Ju(Lm),totalUpdated:Ju(Lm),totalDeleted:Ju(Lm)}},lw={"http://www.opengis.net/wfs":{TransactionSummary:Ju((function(t,e){return ol({},uw,t,e)}),"transactionSummary"),InsertResults:Ju((function(t,e){return ol([],vw,t,e)}),"insertIds")}},hw={"http://www.opengis.net/wfs":{PropertyName:$u(jm)}},cw={"http://www.opengis.net/wfs":{Insert:$u((function(t,e,r){var n=r[r.length-1],i=n.featureType,o=n.featureNS,a=n.gmlVersion,s=Yu(o,i);t.appendChild(s),2===a?Xm.prototype.writeFeatureElement(s,e,r):Um.prototype.writeFeatureElement(s,e,r)})),Update:$u((function(t,e,r){var n=r[r.length-1];lt(void 0!==e.getId(),27);var i=n.featureType,o=n.featurePrefix,a=n.featureNS,s=bw(o,i),u=e.getGeometryName();t.setAttribute("typeName",s),t.setAttributeNS(pw,"xmlns:"+o,a);var l=e.getId();if(void 0!==l){for(var h=e.getKeys(),c=[],p=0,f=h.length;p<f;p++){var d=e.get(h[p]);if(void 0!==d){var g=h[p];d&&"function"==typeof d.getSimplifiedGeometry&&(g=u),c.push({name:g,value:d})}}sl({gmlVersion:n.gmlVersion,node:t,hasZ:n.hasZ,srsName:n.srsName},cw,tl("Property"),c,r),_w(t,l,r)}})),Delete:$u((function(t,e,r){var n=r[r.length-1];lt(void 0!==e.getId(),26);var i=n.featureType,o=n.featurePrefix,a=n.featureNS,s=bw(o,i);t.setAttribute("typeName",s),t.setAttributeNS(pw,"xmlns:"+o,a);var u=e.getId();void 0!==u&&_w(t,u,r)})),Property:$u((function(t,e,r){var n=Yu(dw,"Name"),i=r[r.length-1].gmlVersion;if(t.appendChild(n),jm(n,e.name),void 0!==e.value&&null!==e.value){var o=Yu(dw,"Value");t.appendChild(o),e.value&&"function"==typeof e.value.getSimplifiedGeometry?2===i?Xm.prototype.writeGeometryElement(o,e.value,r):Um.prototype.writeGeometryElement(o,e.value,r):jm(o,e.value)}})),Native:$u((function(t,e,r){e.vendorId&&t.setAttribute("vendorId",e.vendorId);void 0!==e.safeToIgnore&&t.setAttribute("safeToIgnore",String(e.safeToIgnore));void 0!==e.value&&jm(t,e.value)}))}},pw="http://www.w3.org/2000/xmlns/",fw="http://www.opengis.net/ogc",dw="http://www.opengis.net/wfs",gw={"1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},yw=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.featureType_=n.featureType,r.featureNS_=n.featureNS,r.gmlFormat_=n.gmlFormat?n.gmlFormat:new Um,r.schemaLocation_=n.schemaLocation?n.schemaLocation:gw["1.1.0"],r}return aw(e,t),e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,e){var r={node:t};T(r,{featureType:this.featureType_,featureNS:this.featureNS_}),T(r,this.getReadOptions(t,e||{}));var n=[r];this.gmlFormat_.FEATURE_COLLECTION_PARSERS[wm].featureMember=Zu(Em.prototype.readFeaturesInternal);var i=ol([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,n,this.gmlFormat_);return i||(i=[]),i},e.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var e=qu(t);return this.readTransactionResponseFromDocument(e)}return Wu(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},e.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var e=qu(t);return this.readFeatureCollectionMetadataFromDocument(e)}return Wu(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var e={},r=Mm(t.getAttribute("numberOfFeatures"));return e.numberOfFeatures=r,ol(e,sw,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)},e.prototype.readTransactionResponseFromNode=function(t){return ol({},lw,t,[])},e.prototype.writeGetFeature=function(t){var e,r=Yu(dw,"GetFeature");if(r.setAttribute("service","WFS"),r.setAttribute("version","1.1.0"),t&&(t.handle&&r.setAttribute("handle",t.handle),t.outputFormat&&r.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&r.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&r.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&r.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&r.setAttribute("count",String(t.count)),void 0!==t.viewParams&&r.setAttribute("viewParams",t.viewParams),e=t.filter,t.bbox)){lt(t.geometryName,12);var n=ow(t.geometryName,t.bbox,t.srsName);e=e?iw(e,n):n}r.setAttributeNS(Bu,"xsi:schemaLocation",this.schemaLocation_);var i={node:r};return T(i,{srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,geometryName:t.geometryName,filter:e,propertyNames:t.propertyNames?t.propertyNames:[]}),lt(Array.isArray(t.featureTypes),11),function(t,e,r){var n=r[r.length-1],i=T({},n);i.node=t,sl(i,xw,tl("Query"),e,r)}(r,t.featureTypes,[i]),r},e.prototype.writeTransaction=function(t,e,r,n){var i,o,a=[],s=Yu(dw,"Transaction"),u=n.version?n.version:"1.1.0",l="1.0.0"===u?2:3;s.setAttribute("service","WFS"),s.setAttribute("version",u),n&&(i=n.gmlOptions?n.gmlOptions:{},n.handle&&s.setAttribute("handle",n.handle));var h=gw[u];s.setAttributeNS(Bu,"xsi:schemaLocation",h);var c=n.featurePrefix?n.featurePrefix:"feature";return t&&(o=T({node:s},{featureNS:n.featureNS,featureType:n.featureType,featurePrefix:c,gmlVersion:l,hasZ:n.hasZ,srsName:n.srsName}),T(o,i),sl(o,cw,tl("Insert"),t,a)),e&&(o=T({node:s},{featureNS:n.featureNS,featureType:n.featureType,featurePrefix:c,gmlVersion:l,hasZ:n.hasZ,srsName:n.srsName}),T(o,i),sl(o,cw,tl("Update"),e,a)),r&&sl({node:s,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:c,gmlVersion:l,srsName:n.srsName},cw,tl("Delete"),r,a),n.nativeElements&&sl({node:s,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:c,gmlVersion:l,srsName:n.srsName},cw,tl("Native"),n.nativeElements,a),s},e.prototype.readProjectionFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var e=(t=t.firstElementChild.firstElementChild).firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){var r=[{}];return this.gmlFormat_.readGeometryElement(e,r),yr(r.pop().srsName)}return null},e}(bm);var mw={"http://www.opengis.net/ogc":{FeatureId:Zu((function(t,e){return t.getAttribute("fid")}))}};var vw={"http://www.opengis.net/wfs":{Feature:function(t,e){il(mw,t,e)}}};function _w(t,e,r){var n=Yu(fw,"Filter"),i=Yu(fw,"FeatureId");n.appendChild(i),i.setAttribute("fid",e),t.appendChild(n)}function bw(t,e){var r=(t=t||"feature")+":";return 0===e.indexOf(r)?e:r+e}var xw={"http://www.opengis.net/wfs":{Query:$u((function(t,e,r){var n,i=r[r.length-1],o=i.featurePrefix,a=i.featureNS,s=i.propertyNames,u=i.srsName;n=o?bw(o,e):e;t.setAttribute("typeName",n),u&&t.setAttribute("srsName",u);a&&t.setAttributeNS(pw,"xmlns:"+o,a);var l=T({},i);l.node=t,sl(l,hw,tl("PropertyName"),s,r);var h=i.filter;if(h){var c=Yu(fw,"Filter");t.appendChild(c),ww(c,h,r)}}))},"http://www.opengis.net/ogc":{During:$u((function(t,e,r){var n=Yu("http://www.opengis.net/fes","ValueReference");jm(n,e.propertyName),t.appendChild(n);var i=Yu(wm,"TimePeriod");t.appendChild(i);var o=Yu(wm,"begin");i.appendChild(o),Rw(o,e.begin);var a=Yu(wm,"end");i.appendChild(a),Rw(a,e.end)})),And:$u(Sw),Or:$u(Sw),Not:$u((function(t,e,r){var n={node:t},i=e.condition;sl(n,xw,tl(i.getTagName()),[i],r)})),BBOX:$u((function(t,e,r){r[r.length-1].srsName=e.srsName,Cw(t,e.geometryName),Um.prototype.writeGeometryElement(t,e.extent,r)})),Contains:$u((function(t,e,r){r[r.length-1].srsName=e.srsName,Cw(t,e.geometryName),Um.prototype.writeGeometryElement(t,e.geometry,r)})),Intersects:$u((function(t,e,r){r[r.length-1].srsName=e.srsName,Cw(t,e.geometryName),Um.prototype.writeGeometryElement(t,e.geometry,r)})),Within:$u((function(t,e,r){r[r.length-1].srsName=e.srsName,Cw(t,e.geometryName),Um.prototype.writeGeometryElement(t,e.geometry,r)})),PropertyIsEqualTo:$u(Tw),PropertyIsNotEqualTo:$u(Tw),PropertyIsLessThan:$u(Tw),PropertyIsLessThanOrEqualTo:$u(Tw),PropertyIsGreaterThan:$u(Tw),PropertyIsGreaterThanOrEqualTo:$u(Tw),PropertyIsNull:$u((function(t,e,r){Cw(t,e.propertyName)})),PropertyIsBetween:$u((function(t,e,r){Cw(t,e.propertyName);var n=Yu(fw,"LowerBoundary");t.appendChild(n),Pw(n,""+e.lowerBoundary);var i=Yu(fw,"UpperBoundary");t.appendChild(i),Pw(i,""+e.upperBoundary)})),PropertyIsLike:$u((function(t,e,r){t.setAttribute("wildCard",e.wildCard),t.setAttribute("singleChar",e.singleChar),t.setAttribute("escapeChar",e.escapeChar),void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString());Cw(t,e.propertyName),Pw(t,""+e.pattern)}))}};function ww(t,e,r){sl({node:t},xw,tl(e.getTagName()),[e],r)}function Sw(t,e,r){for(var n={node:t},i=e.conditions,o=0,a=i.length;o<a;++o){var s=i[o];sl(n,xw,tl(s.getTagName()),[s],r)}}function Tw(t,e,r){void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),Cw(t,e.propertyName),Pw(t,""+e.expression)}function Ew(t,e,r){var n=Yu(fw,t);jm(n,r),e.appendChild(n)}function Cw(t,e){Ew("PropertyName",t,e)}function Pw(t,e){Ew("Literal",t,e)}function Rw(t,e){var r=Yu(wm,"TimeInstant");t.appendChild(r);var n=Yu(wm,"timePosition");r.appendChild(n),jm(n,e)}var Ow=yw,Iw=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lw={POINT:gn,LINESTRING:Cd,POLYGON:Ln,MULTIPOINT:qd,MULTILINESTRING:Vd,MULTIPOLYGON:Kd},Mw=1,Fw=2,Aw=3,kw=4,Nw=5,jw=6,Gw={};for(var Dw in yt)Gw[Dw]=yt[Dw].toUpperCase();var zw=function(){function t(t){this.wkt=t,this.index_=-1}return t.prototype.isAlpha_=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.isNumeric_=function(t,e){return t>="0"&&t<="9"||"."==t&&!(void 0!==e&&e)},t.prototype.isWhiteSpace_=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},t.prototype.nextToken=function(){var t,e=this.nextChar_(),r=this.index_,n=e;if("("==e)t=Fw;else if(","==e)t=Nw;else if(")"==e)t=Aw;else if(this.isNumeric_(e)||"-"==e)t=kw,n=this.readNumber_();else if(this.isAlpha_(e))t=Mw,n=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);t=jw}return{position:r,value:n,type:t}},t.prototype.readNumber_=function(){var t,e=this.index_,r=!1,n=!1;do{"."==t?r=!0:"e"!=t&&"E"!=t||(n=!0),t=this.nextChar_()}while(this.isNumeric_(t,r)||!n&&("e"==t||"E"==t)||n&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))},t.prototype.readText_=function(){var t,e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()},t}(),Uw=function(){function t(t){this.lexer_=t,this.token_,this.layout_=pt}return t.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},t.prototype.isTokenType=function(t){return this.token_.type==t},t.prototype.match=function(t){var e=this.isTokenType(t);return e&&this.consume_(),e},t.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},t.prototype.parseGeometryLayout_=function(){var t=pt,e=this.token_;if(this.isTokenType(Mw)){var r=e.value;"Z"===r?t=ft:"M"===r?t=dt:"ZM"===r&&(t=gt),t!==pt&&this.consume_()}return t},t.prototype.parseGeometryCollectionText_=function(){if(this.match(Fw)){var t=[];do{t.push(this.parseGeometry_())}while(this.match(Nw));if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parsePointText_=function(){if(this.match(Fw)){var t=this.parsePoint_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())},t.prototype.parseLineStringText_=function(){if(this.match(Fw)){var t=this.parsePointList_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parsePolygonText_=function(){if(this.match(Fw)){var t=this.parseLineStringTextList_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPointText_=function(){if(this.match(Fw)){var t=void 0;if(t=this.token_.type==Fw?this.parsePointTextList_():this.parsePointList_(),this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiLineStringText_=function(){if(this.match(Fw)){var t=this.parseLineStringTextList_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPolygonText_=function(){if(this.match(Fw)){var t=this.parsePolygonTextList_();if(this.match(Aw))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parsePoint_=function(){for(var t=[],e=this.layout_.length,r=0;r<e;++r){var n=this.token_;if(!this.match(kw))break;t.push(n.value)}if(t.length==e)return t;throw new Error(this.formatErrorMessage_())},t.prototype.parsePointList_=function(){for(var t=[this.parsePoint_()];this.match(Nw);)t.push(this.parsePoint_());return t},t.prototype.parsePointTextList_=function(){for(var t=[this.parsePointText_()];this.match(Nw);)t.push(this.parsePointText_());return t},t.prototype.parseLineStringTextList_=function(){for(var t=[this.parseLineStringText_()];this.match(Nw);)t.push(this.parseLineStringText_());return t},t.prototype.parsePolygonTextList_=function(){for(var t=[this.parsePolygonText_()];this.match(Nw);)t.push(this.parsePolygonText_());return t},t.prototype.isEmptyGeometry_=function(){var t=this.isTokenType(Mw)&&"EMPTY"==this.token_.value;return t&&this.consume_(),t},t.prototype.formatErrorMessage_=function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"},t.prototype.parseGeometry_=function(){var t=this.token_;if(this.match(Mw)){var e=t.value;if(this.layout_=this.parseGeometryLayout_(),"GEOMETRYCOLLECTION"==e){var r=this.parseGeometryCollectionText_();return new Bg(r)}var n=Lw[e];if(!n)throw new Error("Invalid geometry type: "+e);var i=void 0;switch(e){case"POINT":i=this.parsePointText_();break;case"LINESTRING":i=this.parseLineStringText_();break;case"POLYGON":i=this.parsePolygonText_();break;case"MULTIPOINT":i=this.parseMultiPointText_();break;case"MULTILINESTRING":i=this.parseMultiLineStringText_();break;case"MULTIPOLYGON":i=this.parseMultiPolygonText_();break;default:throw new Error("Invalid geometry type: "+e)}return i||(i=n===Lw.POINT?[NaN,NaN]:[]),new n(i,this.layout_)}throw new Error(this.formatErrorMessage_())},t}(),Bw=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.splitCollection_=void 0!==n.splitCollection&&n.splitCollection,r}return Iw(e,t),e.prototype.parse_=function(t){var e=new zw(t);return new Uw(e).parse()},e.prototype.readFeatureFromText=function(t,e){var r=this.readGeometryFromText(t,e);if(r){var n=new ct;return n.setGeometry(r),n}return null},e.prototype.readFeaturesFromText=function(t,e){for(var r=[],n=this.readGeometryFromText(t,e),i=[],o=0,a=(r=this.splitCollection_&&n.getType()==yt.GEOMETRY_COLLECTION?n.getGeometriesArray():[n]).length;o<a;++o){var s=new ct;s.setGeometry(r[o]),i.push(s)}return i},e.prototype.readGeometryFromText=function(t,e){var r=this.parse_(t);return r?Ud(r,!1,e):null},e.prototype.writeFeatureText=function(t,e){var r=t.getGeometry();return r?this.writeGeometryText(r,e):""},e.prototype.writeFeaturesText=function(t,e){if(1==t.length)return this.writeFeatureText(t[0],e);for(var r=[],n=0,i=t.length;n<i;++n)r.push(t[n].getGeometry());var o=new Bg(r);return this.writeGeometryText(o,e)},e.prototype.writeGeometryText=function(t,e){return Xw(Ud(t,!0,e))},e}(Bv);function Yw(t){var e=t.getCoordinates();return 0===e.length?"":e.join(" ")}function Vw(t){for(var e=t.getCoordinates(),r=[],n=0,i=e.length;n<i;++n)r.push(e[n].join(" "));return r.join(",")}function Ww(t){for(var e=[],r=t.getLinearRings(),n=0,i=r.length;n<i;++n)e.push("("+Vw(r[n])+")");return e.join(",")}var qw={Point:Yw,LineString:Vw,Polygon:Ww,MultiPoint:function(t){for(var e=[],r=t.getPoints(),n=0,i=r.length;n<i;++n)e.push("("+Yw(r[n])+")");return e.join(",")},MultiLineString:function(t){for(var e=[],r=t.getLineStrings(),n=0,i=r.length;n<i;++n)e.push("("+Vw(r[n])+")");return e.join(",")},MultiPolygon:function(t){for(var e=[],r=t.getPolygons(),n=0,i=r.length;n<i;++n)e.push("("+Ww(r[n])+")");return e.join(",")},GeometryCollection:function(t){for(var e=[],r=t.getGeometries(),n=0,i=r.length;n<i;++n)e.push(Xw(r[n]));return e.join(",")}};function Xw(t){var e=t.getType(),r=(0,qw[e])(t);if(e=e.toUpperCase(),"function"==typeof t.getFlatCoordinates){var n=function(t){var e=t.getLayout(),r="";return e!==ft&&e!==gt||(r+="Z"),e!==dt&&e!==gt||(r+="M"),r}(t);n.length>0&&(e+=" "+n)}return 0===r.length?e+" EMPTY":e+"("+r+")"}var Zw=Bw,Kw=function(){function t(){}return t.prototype.read=function(t){if(t){if("string"==typeof t){var e=qu(t);return this.readFromDocument(e)}return Wu(t)?this.readFromDocument(t):this.readFromNode(t)}return null},t.prototype.readFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFromNode(e);return null},t.prototype.readFromNode=function(t){},t}();function Hw(t){return t.getAttributeNS("http://www.w3.org/1999/xlink","href")}var Jw=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$w=[null,"http://www.opengis.net/wms"],Qw=nl($w,{Service:Ju((function(t,e){return ol({},rS,t,e)})),Capability:Ju((function(t,e){return ol({},tS,t,e)}))}),tS=nl($w,{Request:Ju((function(t,e){return ol({},hS,t,e)})),Exception:Ju((function(t,e){return ol([],aS,t,e)})),Layer:Ju((function(t,e){return ol({},sS,t,e)}))}),eS=function(t){function e(){var e=t.call(this)||this;return e.version=void 0,e}return Jw(e,t),e.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var e=ol({version:this.version},Qw,t,[]);return e||null},e}(Kw),rS=nl($w,{Name:Ju(Fm),Title:Ju(Fm),Abstract:Ju(Fm),KeywordList:Ju(bS),OnlineResource:Ju(Hw),ContactInformation:Ju((function(t,e){return ol({},nS,t,e)})),Fees:Ju(Fm),AccessConstraints:Ju(Fm),LayerLimit:Ju(Lm),MaxWidth:Ju(Lm),MaxHeight:Ju(Lm)}),nS=nl($w,{ContactPersonPrimary:Ju((function(t,e){return ol({},iS,t,e)})),ContactPosition:Ju(Fm),ContactAddress:Ju((function(t,e){return ol({},oS,t,e)})),ContactVoiceTelephone:Ju(Fm),ContactFacsimileTelephone:Ju(Fm),ContactElectronicMailAddress:Ju(Fm)}),iS=nl($w,{ContactPerson:Ju(Fm),ContactOrganization:Ju(Fm)}),oS=nl($w,{AddressType:Ju(Fm),Address:Ju(Fm),City:Ju(Fm),StateOrProvince:Ju(Fm),PostCode:Ju(Fm),Country:Ju(Fm)}),aS=nl($w,{Format:Zu(Fm)}),sS=nl($w,{Name:Ju(Fm),Title:Ju(Fm),Abstract:Ju(Fm),KeywordList:Ju(bS),CRS:Hu(Fm),EX_GeographicBoundingBox:Ju((function(t,e){var r=ol({},lS,t,e);if(!r)return;var n=r.westBoundLongitude,i=r.southBoundLatitude,o=r.eastBoundLongitude,a=r.northBoundLatitude;if(void 0===n||void 0===i||void 0===o||void 0===a)return;return[n,i,o,a]})),BoundingBox:Hu((function(t,e){var r=[Im(t.getAttribute("minx")),Im(t.getAttribute("miny")),Im(t.getAttribute("maxx")),Im(t.getAttribute("maxy"))],n=[Im(t.getAttribute("resx")),Im(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:r,res:n}})),Dimension:Hu((function(t,e){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:Pm(t.getAttribute("multipleValues")),nearestValue:Pm(t.getAttribute("nearestValue")),current:Pm(t.getAttribute("current")),values:Fm(t)}})),Attribution:Ju((function(t,e){return ol({},uS,t,e)})),AuthorityURL:Hu((function(t,e){var r=mS(t,e);if(r)return r.name=t.getAttribute("name"),r;return})),Identifier:Hu(Fm),MetadataURL:Hu((function(t,e){var r=mS(t,e);if(r)return r.type=t.getAttribute("type"),r;return})),DataURL:Hu(mS),FeatureListURL:Hu(mS),Style:Hu((function(t,e){return ol({},dS,t,e)})),MinScaleDenominator:Ju(Om),MaxScaleDenominator:Ju(Om),Layer:Hu((function(t,e){var r=e[e.length-1],n=ol({},sS,t,e);if(!n)return;var i=Pm(t.getAttribute("queryable"));void 0===i&&(i=r.queryable);n.queryable=void 0!==i&&i;var o=Mm(t.getAttribute("cascaded"));void 0===o&&(o=r.cascaded);n.cascaded=o;var a=Pm(t.getAttribute("opaque"));void 0===a&&(a=r.opaque);n.opaque=void 0!==a&&a;var s=Pm(t.getAttribute("noSubsets"));void 0===s&&(s=r.noSubsets);n.noSubsets=void 0!==s&&s;var u=Im(t.getAttribute("fixedWidth"));u||(u=r.fixedWidth);n.fixedWidth=u;var l=Im(t.getAttribute("fixedHeight"));l||(l=r.fixedHeight);n.fixedHeight=l,["Style","CRS","AuthorityURL"].forEach((function(t){if(t in r){var e=n[t]||[];n[t]=e.concat(r[t])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(t){if(!(t in n)){var e=r[t];n[t]=e}})),n}))}),uS=nl($w,{Title:Ju(Fm),OnlineResource:Ju(Hw),LogoURL:Ju(_S)}),lS=nl($w,{westBoundLongitude:Ju(Om),eastBoundLongitude:Ju(Om),southBoundLatitude:Ju(Om),northBoundLatitude:Ju(Om)}),hS=nl($w,{GetCapabilities:Ju(vS),GetMap:Ju(vS),GetFeatureInfo:Ju(vS)}),cS=nl($w,{Format:Hu(Fm),DCPType:Hu((function(t,e){return ol({},pS,t,e)}))}),pS=nl($w,{HTTP:Ju((function(t,e){return ol({},fS,t,e)}))}),fS=nl($w,{Get:Ju(mS),Post:Ju(mS)}),dS=nl($w,{Name:Ju(Fm),Title:Ju(Fm),Abstract:Ju(Fm),LegendURL:Hu(_S),StyleSheetURL:Ju(mS),StyleURL:Ju(mS)}),gS=nl($w,{Format:Ju(Fm),OnlineResource:Ju(Hw)}),yS=nl($w,{Keyword:Zu(Fm)});function mS(t,e){return ol({},gS,t,e)}function vS(t,e){return ol({},cS,t,e)}function _S(t,e){var r=mS(t,e);if(r){var n=[Mm(t.getAttribute("width")),Mm(t.getAttribute("height"))];return r.size=n,r}}function bS(t,e){return ol([],yS,t,e)}var xS=eS,wS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),SS=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.featureNS_="http://mapserver.gis.umn.edu/mapserver",r.gmlFormat_=new Xm,r.layers_=n.layers?n.layers:null,r}return wS(e,t),e.prototype.getLayers=function(){return this.layers_},e.prototype.setLayers=function(t){this.layers_=t},e.prototype.readFeatures_=function(t,e){t.setAttribute("namespaceURI",this.featureNS_);var r=t.localName,n=[];if(0===t.childNodes.length)return n;if("msGMLOutput"==r)for(var i=0,o=t.childNodes.length;i<o;i++){var a=t.childNodes[i];if(a.nodeType===Node.ELEMENT_NODE){var s=a,u=e[0],l=s.localName.replace("_layer","");if(!this.layers_||d(this.layers_,l)){var h=l+"_feature";u.featureType=h,u.featureNS=this.featureNS_;var c={};c[h]=Zu(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var p=nl([u.featureNS,null],c);s.setAttribute("namespaceURI",this.featureNS_);var f=ol([],p,s,e,this.gmlFormat_);f&&m(n,f)}}}if("FeatureCollection"==r){var g=ol([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);g&&(n=g)}return n},e.prototype.readFeaturesFromNode=function(t,e){var r={};return e&&T(r,this.getReadOptions(t,e)),this.readFeatures_(t,[r])},e}(bm),TS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ES=[null,"http://www.opengis.net/ows/1.1"],CS=nl(ES,{ServiceIdentification:Ju((function(t,e){return ol({},DS,t,e)})),ServiceProvider:Ju((function(t,e){return ol({},zS,t,e)})),OperationsMetadata:Ju((function(t,e){return ol({},kS,t,e)}))}),PS=function(t){function e(){return t.call(this)||this}return TS(e,t),e.prototype.readFromNode=function(t){var e=ol({},CS,t,[]);return e||null},e}(Kw),RS=nl(ES,{DeliveryPoint:Ju(Fm),City:Ju(Fm),AdministrativeArea:Ju(Fm),PostalCode:Ju(Fm),Country:Ju(Fm),ElectronicMailAddress:Ju(Fm)}),OS=nl(ES,{Value:Hu((function(t,e){return Fm(t)}))}),IS=nl(ES,{AllowedValues:Ju((function(t,e){return ol({},OS,t,e)}))}),LS=nl(ES,{Phone:Ju((function(t,e){return ol({},NS,t,e)})),Address:Ju((function(t,e){return ol({},RS,t,e)}))}),MS=nl(ES,{HTTP:Ju((function(t,e){return ol({},FS,t,e)}))}),FS=nl(ES,{Get:Hu((function(t,e){var r=Hw(t);if(!r)return;return ol({href:r},jS,t,e)})),Post:void 0}),AS=nl(ES,{DCP:Ju((function(t,e){return ol({},MS,t,e)}))}),kS=nl(ES,{Operation:function(t,e){var r=t.getAttribute("name"),n=ol({},AS,t,e);if(!n)return;e[e.length-1][r]=n}}),NS=nl(ES,{Voice:Ju(Fm),Facsimile:Ju(Fm)}),jS=nl(ES,{Constraint:Hu((function(t,e){var r=t.getAttribute("name");if(!r)return;return ol({name:r},IS,t,e)}))}),GS=nl(ES,{IndividualName:Ju(Fm),PositionName:Ju(Fm),ContactInfo:Ju((function(t,e){return ol({},LS,t,e)}))}),DS=nl(ES,{Abstract:Ju(Fm),AccessConstraints:Ju(Fm),Fees:Ju(Fm),Title:Ju(Fm),ServiceTypeVersion:Ju(Fm),ServiceType:Ju(Fm)}),zS=nl(ES,{ProviderName:Ju(Fm),ProviderSite:Ju(Hw),ServiceContact:Ju((function(t,e){return ol({},GS,t,e)}))});var US=PS,BS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),YS=[null,"http://www.opengis.net/wmts/1.0"],VS=[null,"http://www.opengis.net/ows/1.1"],WS=nl(YS,{Contents:Ju((function(t,e){return ol({},XS,t,e)}))}),qS=function(t){function e(){var e=t.call(this)||this;return e.owsParser_=new US,e}return BS(e,t),e.prototype.readFromNode=function(t){var e=t.getAttribute("version");e&&(e=e.trim());var r=this.owsParser_.readFromNode(t);return r?(r.version=e,(r=ol(r,WS,t,[]))||null):null},e}(Kw),XS=nl(YS,{Layer:Hu((function(t,e){return ol({},ZS,t,e)})),TileMatrixSet:Hu((function(t,e){return ol({},eT,t,e)}))}),ZS=nl(YS,{Style:Hu((function(t,e){var r=ol({},KS,t,e);if(!r)return;var n="true"===t.getAttribute("isDefault");return r.isDefault=n,r})),Format:Hu(Fm),TileMatrixSetLink:Hu((function(t,e){return ol({},HS,t,e)})),Dimension:Hu((function(t,e){return ol({},QS,t,e)})),ResourceURL:Hu((function(t,e){var r=t.getAttribute("format"),n=t.getAttribute("template"),i=t.getAttribute("resourceType"),o={};r&&(o.format=r);n&&(o.template=n);i&&(o.resourceType=i);return o}))},nl(VS,{Title:Ju(Fm),Abstract:Ju(Fm),WGS84BoundingBox:Ju((function(t,e){var r=ol([],tT,t,e);if(2!=r.length)return;return Dt(r)})),Identifier:Ju(Fm)})),KS=nl(YS,{LegendURL:Hu((function(t,e){var r={};return r.format=t.getAttribute("format"),r.href=Hw(t),r}))},nl(VS,{Title:Ju(Fm),Identifier:Ju(Fm)})),HS=nl(YS,{TileMatrixSet:Ju(Fm),TileMatrixSetLimits:Ju((function(t,e){return ol([],JS,t,e)}))}),JS=nl(YS,{TileMatrixLimits:Zu((function(t,e){return ol({},$S,t,e)}))}),$S=nl(YS,{TileMatrix:Ju(Fm),MinTileRow:Ju(Lm),MaxTileRow:Ju(Lm),MinTileCol:Ju(Lm),MaxTileCol:Ju(Lm)}),QS=nl(YS,{Default:Ju(Fm),Value:Hu(Fm)},nl(VS,{Identifier:Ju(Fm)})),tT=nl(VS,{LowerCorner:Zu(nT),UpperCorner:Zu(nT)}),eT=nl(YS,{WellKnownScaleSet:Ju(Fm),TileMatrix:Hu((function(t,e){return ol({},rT,t,e)}))},nl(VS,{SupportedCRS:Ju(Fm),Identifier:Ju(Fm)})),rT=nl(YS,{TopLeftCorner:Ju(nT),ScaleDenominator:Ju(Om),TileWidth:Ju(Lm),TileHeight:Ju(Lm),MatrixWidth:Ju(Lm),MatrixHeight:Ju(Lm)},nl(VS,{Identifier:Ju(Fm)}));function nT(t,e){var r=Fm(t).split(/\s+/);if(r&&2==r.length){var n=+r[0],i=+r[1];if(!isNaN(n)&&!isNaN(i))return[n,i]}}var iT=qS,oT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),aT=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],sT="enterfullscreen",uT="leavefullscreen";function lT(){var t=document.body;return!!(t.webkitRequestFullscreen||t.msRequestFullscreen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled)}function hT(){return!!(document.webkitIsFullScreen||document.msFullscreenElement||document.fullscreenElement)}function cT(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}var pT=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),target:n.target})||this).cssClassName_=void 0!==n.className?n.className:"ol-full-screen";var i=void 0!==n.label?n.label:"⤢";r.labelNode_="string"==typeof i?document.createTextNode(i):i;var o=void 0!==n.labelActive?n.labelActive:"×";r.labelActiveNode_="string"==typeof o?document.createTextNode(o):o,r.button_=document.createElement("button");var a=n.tipLabel?n.tipLabel:"Toggle full-screen";r.setClassName_(r.button_,hT()),r.button_.setAttribute("type","button"),r.button_.title=a,r.button_.appendChild(r.labelNode_),r.button_.addEventListener(A,r.handleClick_.bind(r),!1);var s=r.cssClassName_+" ol-unselectable ol-control "+(lT()?"":"ol-unsupported"),u=r.element;return u.className=s,u.appendChild(r.button_),r.keys_=void 0!==n.keys&&n.keys,r.source_=n.source,r}return oT(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){if(lT()){var t=this.getMap();if(t)if(hT())document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();else{var e=void 0;e=this.source_?"string"==typeof this.source_?document.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():cT(t)}(e):cT(e)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();hT()?(this.setClassName_(this.button_,!0),Wi(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(sT)):(this.setClassName_(this.button_,!1),Wi(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(uT)),t&&t.updateSize()},e.prototype.setClassName_=function(t,e){var r=this.cssClassName_+"-true",n=this.cssClassName_+"-false",i=e?r:n;t.classList.remove(r),t.classList.remove(n),t.classList.add(i)},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e)for(var r=0,n=aT.length;r<n;++r)this.listenerKeys.push(W(document,aT[r],this.handleFullScreenChange_,this))},e}(Va),fT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),dT=function(t){function e(e){var r=this,n=e||{},i=document.createElement("div");return i.className=void 0!==n.className?n.className:"ol-mouse-position",(r=t.call(this,{element:i,render:n.render,target:n.target})||this).addEventListener(et("projection"),r.handleProjectionChanged_),n.coordinateFormat&&r.setCoordinateFormat(n.coordinateFormat),n.projection&&r.setProjection(n.projection),r.undefinedHTML_=void 0!==n.undefinedHTML?n.undefinedHTML:"&#160;",r.renderOnMouseOut_=!!r.undefinedHTML_,r.renderedHTML_=i.innerHTML,r.mapProjection_=null,r.transform_=null,r}return fT(e,t),e.prototype.handleProjectionChanged_=function(){this.transform_=null},e.prototype.getCoordinateFormat=function(){return this.get("coordinateFormat")},e.prototype.getProjection=function(){return this.get("projection")},e.prototype.handleMouseMove=function(t){var e=this.getMap();this.updateHTML_(e.getEventPixel(t))},e.prototype.handleMouseOut=function(t){this.updateHTML_(null)},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e){var r=e.getViewport();this.listenerKeys.push(W(r,Jo,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(W(r,ta,this.handleMouseOut,this))}},e.prototype.setCoordinateFormat=function(t){this.set("coordinateFormat",t)},e.prototype.setProjection=function(t){this.set("projection",yr(t))},e.prototype.updateHTML_=function(t){var e=this.undefinedHTML_;if(t&&this.mapProjection_){if(!this.transform_){var r=this.getProjection();this.transform_=r?Tr(this.mapProjection_,r):dr}var n=this.getMap().getCoordinateFromPixelInternal(t);if(n){var i=Mr();i&&(this.transform_=Tr(this.mapProjection_,i)),this.transform_(n,n);var o=this.getCoordinateFormat();e=o?o(n):n.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)},e.prototype.render=function(t){var e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null},e}(Va),gT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return gT(e,t),e.prototype.createRenderer=function(){return new Bo(this)},e}(Ba),mT=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).boundHandleRotationChanged_=r.handleRotationChanged_.bind(r),r.collapsed_=void 0===n.collapsed||n.collapsed,r.collapsible_=void 0===n.collapsible||n.collapsible,r.collapsible_||(r.collapsed_=!1),r.rotateWithView_=void 0!==n.rotateWithView&&n.rotateWithView,r.viewExtent_=void 0;var i=void 0!==n.className?n.className:"ol-overviewmap",o=void 0!==n.tipLabel?n.tipLabel:"Overview map",a=void 0!==n.collapseLabel?n.collapseLabel:"«";"string"==typeof a?(r.collapseLabel_=document.createElement("span"),r.collapseLabel_.textContent=a):r.collapseLabel_=a;var s=void 0!==n.label?n.label:"»";"string"==typeof s?(r.label_=document.createElement("span"),r.label_.textContent=s):r.label_=s;var u=r.collapsible_&&!r.collapsed_?r.collapseLabel_:r.label_,l=document.createElement("button");l.setAttribute("type","button"),l.title=o,l.appendChild(u),l.addEventListener(A,r.handleClick_.bind(r),!1),r.ovmapDiv_=document.createElement("div"),r.ovmapDiv_.className="ol-overviewmap-map",r.view_=n.view,r.ovmap_=new yT({view:n.view});var h=r.ovmap_;n.layers&&n.layers.forEach((function(t){h.addLayer(t)}));var c=document.createElement("div");c.className="ol-overviewmap-box",c.style.boxSizing="border-box",r.boxOverlay_=new gu({position:[0,0],positioning:iu,element:c}),r.ovmap_.addOverlay(r.boxOverlay_);var p=i+" ol-unselectable ol-control"+(r.collapsed_&&r.collapsible_?" ol-collapsed":"")+(r.collapsible_?"":" ol-uncollapsible"),f=r.element;f.className=p,f.appendChild(r.ovmapDiv_),f.appendChild(l);var d=r,g=r.boxOverlay_,y=r.boxOverlay_.getElement(),m=function(t){var e,r={clientX:(e=t).clientX,clientY:e.clientY},n=h.getEventCoordinateInternal(r);g.setPosition(n)},v=function(t){var e=h.getEventCoordinateInternal(t);d.getMap().getView().setCenterInternal(e),window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",v)};return y.addEventListener("mousedown",(function(){window.addEventListener("mousemove",m),window.addEventListener("mouseup",v)})),r}return gT(e,t),e.prototype.setMap=function(e){var r=this.getMap();if(e!==r){if(r){var n=r.getView();n&&this.unbindView_(n),this.ovmap_.setTarget(null)}if(t.prototype.setMap.call(this,e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(W(e,c,this.handleMapPropertyChange_,this));var i=e.getView();i&&(this.bindView_(i),i.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_()))}}},e.prototype.handleMapPropertyChange_=function(t){if(t.key===la){var e=t.oldValue;e&&this.unbindView_(e);var r=this.getMap().getView();this.bindView_(r)}},e.prototype.bindView_=function(t){if(!this.view_){var e=new ja({projection:t.getProjection()});this.ovmap_.setView(e)}t.addEventListener(et(wa),this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeEventListener(et(wa),this.boundHandleRotationChanged_)},e.prototype.handleRotationChanged_=function(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},e.prototype.validateExtent_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var r=t.getSize(),n=t.getView().calculateExtentInternal(r);if(!this.viewExtent_||!$t(n,this.viewExtent_)){this.viewExtent_=n;var i=e.getSize(),o=e.getView().calculateExtentInternal(i),a=e.getPixelFromCoordinateInternal(fe(n)),s=e.getPixelFromCoordinateInternal(se(n)),u=Math.abs(a[0]-s[0]),l=Math.abs(a[1]-s[1]),h=i[0],c=i[1];u<.1*h||l<.1*c||u>.75*h||l>.75*c?this.resetExtent_():Vt(o,n)||this.recenter_()}}},e.prototype.resetExtent_=function(){var t=this.getMap(),e=this.ovmap_,r=t.getSize(),n=t.getView().calculateExtentInternal(r),i=e.getView(),o=Math.log(7.5)/Math.LN2;ve(n,1/(.1*Math.pow(2,o/2))),i.fitInternal(Fn(n))},e.prototype.recenter_=function(){var t=this.getMap(),e=this.ovmap_,r=t.getView();e.getView().setCenterInternal(r.getCenterInternal())},e.prototype.updateBox_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var r=t.getSize(),n=t.getView(),i=e.getView(),o=this.rotateWithView_?0:-n.getRotation(),a=this.boxOverlay_,s=this.boxOverlay_.getElement(),u=n.getCenterInternal(),l=n.getResolution(),h=i.getResolution(),c=r[0]*l/h,p=r[1]*l/h;if(a.setPosition(u),s){s.style.width=c+"px",s.style.height=p+"px";var f="rotate("+o+"rad)";s.style.transform=f}}},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?Wi(this.collapseLabel_,this.label_):Wi(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),q(t,na,(function(t){this.updateBox_()}),this)}},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.getRotateWithView=function(){return this.rotateWithView_},e.prototype.setRotateWithView=function(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},e.prototype.getOverviewMap=function(){return this.ovmap_},e.prototype.render=function(t){this.validateExtent_(),this.updateBox_()},e}(Va),vT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_T="degrees",bT="imperial",xT="nautical",wT="metric",ST="us",TT=[1,2,5],ET=function(t){function e(e){var r=this,n=e||{},i=void 0!==n.className?n.className:n.bar?"ol-scale-bar":"ol-scale-line";return(r=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).innerElement_=document.createElement("div"),r.innerElement_.className=i+"-inner",r.element.className=i+" ol-unselectable",r.element.appendChild(r.innerElement_),r.viewState_=null,r.minWidth_=void 0!==n.minWidth?n.minWidth:64,r.renderedVisible_=!1,r.renderedWidth_=void 0,r.renderedHTML_="",r.addEventListener(et("units"),r.handleUnitsChanged_),r.setUnits(n.units||wT),r.scaleBar_=n.bar||!1,r.scaleBarSteps_=n.steps||4,r.scaleBarText_=n.text||!1,r.dpi_=n.dpi||void 0,r}return vT(e,t),e.prototype.getUnits=function(){return this.get("units")},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set("units",t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,r=t.projection,n=this.getUnits(),i=n==_T?_t.DEGREES:_t.METERS,o=mr(r,t.resolution,e,i),a=this.minWidth_*(this.dpi_||25.4/.28)/(25.4/.28),s=a*o,u="";if(n==_T){var l=vt[_t.DEGREES];(s*=l)<l/60?(u="″",o*=3600):s<l?(u="′",o*=60):u="°"}else n==bT?s<.9144?(u="in",o/=.0254):s<1609.344?(u="ft",o/=.3048):(u="mi",o/=1609.344):n==xT?(o/=1852,u="nm"):n==wT?s<.001?(u="μm",o*=1e6):s<1?(u="mm",o*=1e3):s<1e3?u="m":(u="km",o/=1e3):n==ST?s<.9144?(u="in",o*=39.37):s<1609.344?(u="ft",o/=.30480061):(u="mi",o/=1609.3472):lt(!1,33);for(var h,c,p,f,d=3*Math.floor(Math.log(a*o)/Math.log(10));;){p=Math.floor(d/3);var g=Math.pow(10,p);if(h=TT[(d%3+3)%3]*g,c=Math.round(h/o),isNaN(c))return this.element.style.display="none",void(this.renderedVisible_=!1);if(c>=a)break;++d}f=this.scaleBar_?this.createScaleBar(c,h,u):h.toFixed(p<0?-p:0)+" "+u,this.renderedHTML_!=f&&(this.innerElement_.innerHTML=f,this.renderedHTML_=f),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,r){for(var n="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),i=[],o=t/this.scaleBarSteps_,a="#ffffff",s=0;s<this.scaleBarSteps_;s++)0===s&&i.push(this.createMarker("absolute",s)),i.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "+a+';"></div>'+this.createMarker("relative",s)+(s%2==0||2===this.scaleBarSteps_?this.createStepText(s,t,!1,e,r):"")+"</div>"),s===this.scaleBarSteps_-1&&i.push(this.createStepText(s+1,t,!0,e,r)),a="#ffffff"===a?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+n+"</div>":"")+i.join("")+"</div>"},e.prototype.createMarker=function(t,e){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},e.prototype.createStepText=function(t,e,r,n,i){var o=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+i);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:e/this.scaleBarSteps_*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:e/this.scaleBarSteps_*2)+"px;left: "+(r?e+"px":"unset")+';">'+o+"</div>"},e.prototype.getScaleForResolution=function(){var t=mr(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center),e=this.dpi_||25.4/.28,r=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*r*39.37*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(Va),CT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),PT=0,RT=1,OT=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),render:n.render})||this).dragListenerKeys_=[],r.currentResolution_=void 0,r.direction_=PT,r.dragging_,r.heightLimit_=0,r.widthLimit_=0,r.startX_,r.startY_,r.thumbSize_=null,r.sliderInitialized_=!1,r.duration_=void 0!==n.duration?n.duration:200;var i=void 0!==n.className?n.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=i+"-thumb ol-unselectable";var a=r.element;return a.className=i+" ol-unselectable ol-control",a.appendChild(o),a.addEventListener($o,r.handleDraggerStart_.bind(r),!1),a.addEventListener(Jo,r.handleDraggerDrag_.bind(r),!1),a.addEventListener(Qo,r.handleDraggerEnd_.bind(r),!1),a.addEventListener(A,r.handleContainerClick_.bind(r),!1),o.addEventListener(A,l,!1),r}return CT(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e&&e.render()},e.prototype.initSlider_=function(){var t=this.element,e=t.offsetWidth,r=t.offsetHeight;if(0===e&&0===r)return this.sliderInitialized_=!1;var n=t.firstElementChild,i=getComputedStyle(n),o=n.offsetWidth+parseFloat(i.marginRight)+parseFloat(i.marginLeft),a=n.offsetHeight+parseFloat(i.marginTop)+parseFloat(i.marginBottom);return this.thumbSize_=[o,a],e>r?(this.direction_=RT,this.widthLimit_=e-o):(this.direction_=PT,this.heightLimit_=r-a),this.sliderInitialized_=!0},e.prototype.handleContainerClick_=function(t){var e=this.getMap().getView(),r=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(r),i=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:i,duration:this.duration_,easing:La})},e.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){var r=this.handleDraggerDrag_,n=this.handleDraggerEnd_;this.dragListenerKeys_.push(W(document,Jo,r,this),W(document,Qo,n,this))}}},e.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var e=t.clientX-this.startX_,r=t.clientY-this.startY_,n=this.getRelativePosition_(e,r);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}},e.prototype.handleDraggerEnd_=function(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(X),this.dragListenerKeys_.length=0)},e.prototype.setThumbPosition_=function(t){var e=this.getPositionForResolution_(t),r=this.element.firstElementChild;this.direction_==RT?r.style.left=this.widthLimit_*e+"px":r.style.top=this.heightLimit_*e+"px"},e.prototype.getRelativePosition_=function(t,e){return we(this.direction_===RT?t/this.widthLimit_:e/this.heightLimit_,0,1)},e.prototype.getResolutionForPosition_=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},e.prototype.getPositionForResolution_=function(t){return we(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)},e.prototype.render=function(t){if(t.frameState&&(this.sliderInitialized_||this.initSlider_())){var e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}},e}(Va),IT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),LT=function(t){function e(e){var r=this,n=e||{};(r=t.call(this,{element:document.createElement("div"),target:n.target})||this).extent=n.extent?n.extent:null;var i=void 0!==n.className?n.className:"ol-zoom-extent",o=void 0!==n.label?n.label:"E",a=void 0!==n.tipLabel?n.tipLabel:"Fit to extent",s=document.createElement("button");s.setAttribute("type","button"),s.title=a,s.appendChild("string"==typeof o?document.createTextNode(o):o),s.addEventListener(A,r.handleClick_.bind(r),!1);var u=i+" ol-unselectable ol-control",l=r.element;return l.className=u,l.appendChild(s),r}return IT(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Fn(e))},e}(Va),MT={array:{},color:{},colorlike:{},control:{},coordinate:{},easing:{},events:{}};MT.events.condition={},MT.extent={},MT.featureloader={},MT.format={},MT.format.filter={},MT.geom={},MT.has={},MT.interaction={},MT.layer={},MT.loadingstrategy={},MT.proj={},MT.proj.Units={},MT.proj.proj4={},MT.render={},MT.render.canvas={},MT.renderer={},MT.renderer.canvas={},MT.renderer.webgl={},MT.size={},MT.source={},MT.sphere={},MT.style={},MT.style.IconImageCache={},MT.tilegrid={},MT.transform={},MT.util={},MT.webgl={},MT.xml={},MT.Collection=ut,MT.Feature=ct,MT.Geolocation=Zn,MT.Kinetic=Kn,MT.Map=Qs,MT.Object=rt,MT.Observable=H,MT.Observable.unByKey=K,MT.Overlay=gu,MT.PluggableMap=Ba,MT.View=ja,MT.array.stableSort=function(t,e){var r,n=t.length,i=Array(t.length);for(r=0;r<n;r++)i[r]={index:r,value:t[r]};for(i.sort((function(t,r){return e(t.value,r.value)||t.index-r.index})),r=0;r<t.length;r++)t[r]=i[r].value},MT.color.asArray=ni,MT.color.asString=$n,MT.colorlike.asColorLike=Fi,MT.control.Attribution=qa,MT.control.Control=Va,MT.control.FullScreen=pT,MT.control.MousePosition=dT,MT.control.OverviewMap=mT,MT.control.Rotate=Za,MT.control.ScaleLine=ET,MT.control.Zoom=Ha,MT.control.ZoomSlider=OT,MT.control.ZoomToExtent=LT,MT.control.defaults=Ja,MT.coordinate.add=tr,MT.coordinate.createStringXY=function(t){return function(e){return hr(e,t)}},MT.coordinate.format=nr,MT.coordinate.rotate=or,MT.coordinate.toStringHDMS=function(t,e){return t?rr("NS",t[1],e)+" "+rr("EW",t[0],e):""},MT.coordinate.toStringXY=hr,MT.easing.easeIn=Ia,MT.easing.easeOut=La,MT.easing.inAndOut=Ma,MT.easing.linear=Fa,MT.easing.upAndDown=function(t){return t<.5?Ma(2*t):1-Ma(2*(t-.5))},MT.events.condition.altKeyOnly=us,MT.events.condition.altShiftKeysOnly=ls,MT.events.condition.always=ps,MT.events.condition.click=function(t){return t.type==Ho.CLICK},MT.events.condition.doubleClick=function(t){return t.type==Ho.DBLCLICK},MT.events.condition.focus=hs,MT.events.condition.mouseOnly=_s,MT.events.condition.never=ds,MT.events.condition.noModifierKeys=ys,MT.events.condition.penOnly=function(t){var e=t.originalEvent;return lt(void 0!==e,56),"pen"===e.pointerType},MT.events.condition.platformModifierKeyOnly=function(t){var e=t.originalEvent;return!e.altKey&&(ji?e.metaKey:e.ctrlKey)&&!e.shiftKey},MT.events.condition.pointerMove=function(t){return"pointermove"==t.type},MT.events.condition.primaryAction=bs,MT.events.condition.shiftKeyOnly=ms,MT.events.condition.singleClick=gs,MT.events.condition.targetNotEditable=vs,MT.events.condition.touchOnly=function(t){var e=t.originalEvent;return lt(void 0!==e,56),"touch"===e.pointerType},MT.extent.applyTransform=_e,MT.extent.boundingExtent=Dt,MT.extent.buffer=zt,MT.extent.containsCoordinate=Yt,MT.extent.containsExtent=Vt,MT.extent.containsXY=Wt,MT.extent.createEmpty=Xt,MT.extent.equals=$t,MT.extent.extend=Qt,MT.extent.getArea=oe,MT.extent.getBottomLeft=ae,MT.extent.getBottomRight=se,MT.extent.getCenter=ue,MT.extent.getHeight=ce,MT.extent.getIntersection=pe,MT.extent.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},MT.extent.getTopLeft=fe,MT.extent.getTopRight=de,MT.extent.getWidth=ge,MT.extent.intersects=ye,MT.extent.isEmpty=me,MT.featureloader.setWithCredentials=function(t){bu=t},MT.featureloader.xhr=wu,MT.format.EsriJSON=vm,MT.format.Feature=zd,MT.format.GML=Ym,MT.format.GML2=Xm,MT.format.GML3=Um,MT.format.GML32=Hm,MT.format.GPX=Mv,MT.format.GeoJSON=Hg,MT.format.IGC=Jv,MT.format.IIIFInfo=Rc,MT.format.KML=Yb,MT.format.MVT=ag,MT.format.OSMXML=Jb,MT.format.Polyline=ox,MT.format.Polyline.decodeDeltas=ex,MT.format.Polyline.decodeFloats=nx,MT.format.Polyline.encodeDeltas=tx,MT.format.Polyline.encodeFloats=rx,MT.format.TopoJSON=dx,MT.format.WFS=Ow,MT.format.WFS.writeFilter=function(t){var e=Yu(fw,"Filter");return ww(e,t,[]),e},MT.format.WKT=Zw,MT.format.WMSCapabilities=xS,MT.format.WMSGetFeatureInfo=SS,MT.format.WMTSCapabilities=iT,MT.format.filter.Bbox=xx,MT.format.filter.Contains=Ex,MT.format.filter.During=Ox,MT.format.filter.EqualTo=Fx,MT.format.filter.GreaterThan=kx,MT.format.filter.GreaterThanOrEqualTo=jx,MT.format.filter.Intersects=Dx,MT.format.filter.IsBetween=Ux,MT.format.filter.IsLike=Yx,MT.format.filter.IsNull=Wx,MT.format.filter.LessThan=Xx,MT.format.filter.LessThanOrEqualTo=Kx,MT.format.filter.Not=Jx,MT.format.filter.NotEqualTo=Qx,MT.format.filter.Or=ew,MT.format.filter.Within=nw,MT.format.filter.and=iw,MT.format.filter.bbox=ow,MT.format.filter.between=function(t,e,r){return new Ux(t,e,r)},MT.format.filter.contains=function(t,e,r){return new Ex(t,e,r)},MT.format.filter.during=function(t,e,r){return new Ox(t,e,r)},MT.format.filter.equalTo=function(t,e,r){return new Fx(t,e,r)},MT.format.filter.greaterThan=function(t,e){return new kx(t,e)},MT.format.filter.greaterThanOrEqualTo=function(t,e){return new jx(t,e)},MT.format.filter.intersects=function(t,e,r){return new Dx(t,e,r)},MT.format.filter.isNull=function(t){return new Wx(t)},MT.format.filter.lessThan=function(t,e){return new Xx(t,e)},MT.format.filter.lessThanOrEqualTo=function(t,e){return new Kx(t,e)},MT.format.filter.like=function(t,e,r,n,i,o){return new Yx(t,e,r,n,i,o)},MT.format.filter.not=function(t){return new Jx(t)},MT.format.filter.notEqualTo=function(t,e,r){return new Qx(t,e,r)},MT.format.filter.or=function(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(ew,e))},MT.format.filter.within=function(t,e,r){return new nw(t,e,r)},MT.geom.Circle=wy,MT.geom.Geometry=Yr,MT.geom.GeometryCollection=Bg,MT.geom.LineString=Cd,MT.geom.LinearRing=fn,MT.geom.MultiLineString=Vd,MT.geom.MultiPoint=qd,MT.geom.MultiPolygon=Kd,MT.geom.Point=gn,MT.geom.Polygon=Ln,MT.geom.Polygon.circular=Mn,MT.geom.Polygon.fromCircle=An,MT.geom.Polygon.fromExtent=Fn,MT.geom.SimpleGeometry=qr,MT.has.DEVICE_PIXEL_RATIO=Gi,MT.interaction.DoubleClickZoom=ns,MT.interaction.DragAndDrop=my,MT.interaction.DragBox=Ms,MT.interaction.DragPan=ws,MT.interaction.DragRotate=Ts,MT.interaction.DragRotateAndZoom=_y,MT.interaction.DragZoom=As,MT.interaction.Draw=My,MT.interaction.Draw.createBox=function(){return function(t,e,r){var n=Dt(t.map((function(t){return Ar(t,r)}))),i=[[ae(n),se(n),de(n),fe(n),ae(n)]],o=e;o?o.setCoordinates(i):o=new Ln(i);var a=Mr();return a&&o.transform(r,a),o}},MT.interaction.Draw.createRegularPolygon=function(t,e){return function(r,n,i){var o=Ar(r[0],i),a=Ar(r[1],i),s=Math.sqrt(sr(o,a)),u=n||An(new wy(o),t),l=e;if(!e){var h=a[0]-o[0],c=a[1]-o[1];l=Math.atan(c/h)-(h<0?Math.PI:0)}kn(u,o,s,l);var p=Mr();return p&&u.transform(i,p),u}},MT.interaction.Extent=Dy,MT.interaction.Interaction=es,MT.interaction.KeyboardPan=zs,MT.interaction.KeyboardZoom=Bs,MT.interaction.Modify=Ky,MT.interaction.MouseWheelZoom=qs,MT.interaction.PinchRotate=Zs,MT.interaction.PinchZoom=Hs,MT.interaction.Pointer=as,MT.interaction.Select=tm,MT.interaction.Snap=im,MT.interaction.Translate=hm,MT.interaction.defaults=Js,MT.layer.Base=_i,MT.layer.BaseImage=lp,MT.layer.BaseTile=xp,MT.layer.BaseVector=xf,MT.layer.Graticule=Fd,MT.layer.Group=Wo,MT.layer.Heatmap=Dd,MT.layer.Image=mp,MT.layer.Layer=Li,MT.layer.MapboxVector=cy,MT.layer.Tile=Cp,MT.layer.Vector=Rd,MT.layer.VectorImage=fy,MT.layer.VectorTile=ug,MT.loadingstrategy.all=Su,MT.loadingstrategy.bbox=function(t,e){return[t]},MT.loadingstrategy.tile=function(t){return function(e,r){var n=t.getZForResolution(r),i=t.getTileRangeForExtentAndZ(e,n),o=[],a=[n,0,0];for(a[1]=i.minX;a[1]<=i.maxX;++a[1])for(a[2]=i.minY;a[2]<=i.maxY;++a[2])o.push(t.getTileCoordExtent(a));return o}},MT.proj.Projection=xe,MT.proj.Units.METERS_PER_UNIT=vt,MT.proj.addCoordinateTransforms=xr,MT.proj.addEquivalentProjections=vr,MT.proj.addProjection=gr,MT.proj.equivalent=Sr,MT.proj.fromLonLat=wr,MT.proj.get=yr,MT.proj.getPointResolution=mr,MT.proj.getTransform=Er,MT.proj.proj4.register=function(t){var e,r,n=Object.keys(t.defs),i=n.length;for(e=0;e<i;++e){var o=n[e];if(!yr(o)){var a=t.defs(o);gr(new xe({code:o,axisOrientation:a.axis,metersPerUnit:a.to_meter,units:a.units}))}}for(e=0;e<i;++e){var s=n[e],u=yr(s);for(r=0;r<i;++r){var l=n[r],h=yr(l);if(!Xe(s,l)){var c=t.defs(s),p=t.defs(l);if(c===p)vr([u,h]);else{var f=t(T({},c,{axis:void 0}),T({},p,{axis:void 0}));xr(u,h,jr(u,h,f.forward),jr(h,u,f.inverse))}}}}},MT.proj.toLonLat=function(t,e){var r=Cr(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=r[0];return(n<-180||n>180)&&(r[0]=Oe(n+180,360)-180),r},MT.proj.transform=Cr,MT.proj.transformExtent=Pr,MT.render.VectorContext=Mi,MT.render.canvas.labelCache=to,MT.render.getRenderPixel=function(t,e){var r=e.slice(0);return Tt(t.inversePixelTransform.slice(),r),r},MT.render.getVectorContext=Ao,MT.render.toContext=function(t,e){var r=t.canvas,n=e||{},i=n.pixelRatio||Gi,o=n.size;o&&(r.width=o[0]*i,r.height=o[1]*i,r.style.width=o[0]+"px",r.style.height=o[1]+"px");var a=[0,0,r.width,r.height],s=Et([1,0,0,1,0,0],i,i);return new mo(t,i,a,s,0)},MT.renderer.Composite=Bo,MT.renderer.canvas.ImageLayer=gp,MT.renderer.canvas.TileLayer=Tp,MT.renderer.canvas.VectorImageLayer=gd,MT.renderer.canvas.VectorLayer=fd,MT.renderer.canvas.VectorTileLayer=wd,MT.renderer.webgl.PointsLayer=Of,MT.size.toSize=za,MT.source.BingMaps=Jh,MT.source.CartoDB=ec,MT.source.Cluster=fc,MT.source.IIIF=Lc,MT.source.Image=zc,MT.source.ImageArcGISRest=Yc,MT.source.ImageCanvas=Xc,MT.source.ImageMapGuide=Kc,MT.source.ImageStatic=Jc,MT.source.ImageWMS=ip,MT.source.OSM=sp,MT.source.OSM.ATTRIBUTION=ap,MT.source.Raster=Bp,MT.source.Source=Ah,MT.source.Stamen=Xp,MT.source.Tile=Gh,MT.source.TileArcGISRest=Kp,MT.source.TileDebug=$p,MT.source.TileImage=Zh,MT.source.TileJSON=tf,MT.source.TileWMS=rf,MT.source.UTFGrid=af,MT.source.Vector=cc,MT.source.VectorTile=ff,MT.source.WMTS=vf,MT.source.WMTS.optionsFromCapabilities=function(t,e){var r=v(t.Contents.Layer,(function(t,r,n){return t.Identifier==e.layer}));if(null===r)return null;var n,i=t.Contents.TileMatrixSet;(n=r.TileMatrixSetLink.length>1?b(r.TileMatrixSetLink,"projection"in e?function(t,r,n){var o=v(i,(function(e){return e.Identifier==t.TileMatrixSet})).SupportedCRS,a=yr(o.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||yr(o),s=yr(e.projection);return a&&s?Sr(a,s):o==e.projection}:function(t,r,n){return t.TileMatrixSet==e.matrixSet}):0)<0&&(n=0);var o=r.TileMatrixSetLink[n].TileMatrixSet,a=r.TileMatrixSetLink[n].TileMatrixSetLimits,s=r.Format[0];"format"in e&&(s=e.format),(n=b(r.Style,(function(t,r,n){return"style"in e?t.Title==e.style:t.isDefault})))<0&&(n=0);var u=r.Style[n].Identifier,l={};"Dimension"in r&&r.Dimension.forEach((function(t,e,r){var n=t.Identifier,i=t.Default;void 0===i&&(i=t.Value[0]),l[n]=i}));var h,c=v(t.Contents.TileMatrixSet,(function(t,e,r){return t.Identifier==o})),p=c.SupportedCRS;if(p&&(h=yr(p.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||yr(p)),"projection"in e){var f=yr(e.projection);f&&(h&&!Sr(f,h)||(h=f))}var g="ne"==h.getAxisOrientation().substr(0,2),y=c.TileMatrix[0],m={MinTileCol:0,MinTileRow:0,MaxTileCol:y.MatrixWidth-1,MaxTileRow:y.MatrixHeight-1};a&&(m=a[a.length-1],y=v(c.TileMatrix,(function(t){return t.Identifier===m.TileMatrix})));var _=28e-5*y.ScaleDenominator/h.getMetersPerUnit(),x=g?[y.TopLeftCorner[1],y.TopLeftCorner[0]]:y.TopLeftCorner,w=y.TileWidth*_,S=y.TileHeight*_,T=[x[0]+w*m.MinTileCol,x[1]-S*(1+m.MaxTileRow),x[0]+w*(1+m.MaxTileCol),x[1]-S*m.MinTileRow];null===h.getExtent()&&h.setExtent(T);var E=Al(c,T,a),C=[],P=e.requestEncoding;if(P=void 0!==P?P:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var R=t.OperationsMetadata.GetTile.DCP.HTTP.Get,O=0,I=R.length;O<I;++O)if(R[O].Constraint){var L=v(R[O].Constraint,(function(t){return"GetEncoding"==t.name})).AllowedValues.Value;if(""===P&&(P=L[0]),P!==gf)break;d(L,gf)&&C.push(R[O].href)}else R[O].href&&(P=gf,C.push(R[O].href));return 0===C.length&&(P=yf,r.ResourceURL.forEach((function(t){"tile"===t.resourceType&&(s=t.format,C.push(t.template))}))),{urls:C,layer:e.layer,matrixSet:o,format:s,projection:h,requestEncoding:P,tileGrid:E,style:u,dimensions:l,wrapX:!1,crossOrigin:e.crossOrigin}},MT.source.XYZ=Qh,MT.source.Zoomify=vc,MT.sphere.getArea=function t(e,r){var n=r||{},i=n.radius||6371008.8,o=n.projection||"EPSG:3857",a=e.getType();a!==yt.GEOMETRY_COLLECTION&&(e=e.clone().transform(o,"EPSG:4326"));var s,u,l,h,c,p,f=0;switch(a){case yt.POINT:case yt.MULTI_POINT:case yt.LINE_STRING:case yt.MULTI_LINE_STRING:case yt.LINEAR_RING:break;case yt.POLYGON:for(s=e.getCoordinates(),f=Math.abs(He(s[0],i)),l=1,h=s.length;l<h;++l)f-=Math.abs(He(s[l],i));break;case yt.MULTI_POLYGON:for(l=0,h=(s=e.getCoordinates()).length;l<h;++l)for(u=s[l],f+=Math.abs(He(u[0],i)),c=1,p=u.length;c<p;++c)f-=Math.abs(He(u[c],i));break;case yt.GEOMETRY_COLLECTION:var d=e.getGeometries();for(l=0,h=d.length;l<h;++l)f+=t(d[l],r);break;default:throw new Error("Unsupported geometry type: "+a)}return f},MT.sphere.getDistance=Ze,MT.sphere.getLength=function t(e,r){var n=r||{},i=n.radius||6371008.8,o=n.projection||"EPSG:3857",a=e.getType();a!==yt.GEOMETRY_COLLECTION&&(e=e.clone().transform(o,"EPSG:4326"));var s,u,l,h,c,p,f=0;switch(a){case yt.POINT:case yt.MULTI_POINT:break;case yt.LINE_STRING:case yt.LINEAR_RING:f=Ke(s=e.getCoordinates(),i);break;case yt.MULTI_LINE_STRING:case yt.POLYGON:for(l=0,h=(s=e.getCoordinates()).length;l<h;++l)f+=Ke(s[l],i);break;case yt.MULTI_POLYGON:for(l=0,h=(s=e.getCoordinates()).length;l<h;++l)for(c=0,p=(u=s[l]).length;c<p;++c)f+=Ke(u[c],i);break;case yt.GEOMETRY_COLLECTION:var d=e.getGeometries();for(l=0,h=d.length;l<h;++l)f+=t(d[l],r);break;default:throw new Error("Unsupported geometry type: "+a)}return f},MT.style.Circle=Dl,MT.style.Fill=zl,MT.style.Icon=rh,MT.style.IconImageCache.shared=ui,MT.style.Image=kl,MT.style.RegularShape=jl,MT.style.Stroke=nh,MT.style.Style=lh,MT.style.Text=ph,MT.tilegrid.TileGrid=Fu,MT.tilegrid.WMTS=Fl,MT.tilegrid.WMTS.createFromCapabilitiesMatrixSet=Al,MT.tilegrid.createXYZ=ku,MT.transform.composeCssTransform=function(t,e,r,n,i,o,a){return Rt(Ct([1,0,0,1,0,0],t,e,r,n,i,o,a))},MT.util.getUid=o,MT.webgl.ARRAY_BUFFER=34962,MT.webgl.Buffer=fl,MT.webgl.DYNAMIC_DRAW=35048,MT.webgl.ELEMENT_ARRAY_BUFFER=34963,MT.webgl.Helper=Rl,MT.webgl.Helper.computeAttributesStride=Cl,MT.webgl.PostProcessingPass=yl,MT.webgl.RenderTarget=Il,MT.webgl.STATIC_DRAW=35044,MT.webgl.STREAM_DRAW=35040,MT.xml.getAllTextContent=Vu,MT.xml.parse=qu,MT.xml.registerDocument=function(t){ll=t},MT.xml.registerXMLSerializer=function(t){ul=t};e.default=MT}]).default}));;var isInitMap=function(fn){if(typeof fn!=="undefined"){fn()}};function addMapJsScript(){isInitMap();}
var CommonOpenLayer=function(projection_project,projection_osm){};CommonOpenLayer.latLng=function(lat,lng){return ol.proj.transform([lng,lat],'EPSG:4326','EPSG:3857')};CommonOpenLayer.polygonToString=function(polygon){var string=[];for(var i=0;i<polygon.length;i++){var point=ol.proj.transform(polygon[i],'EPSG:3857','EPSG:4326')
string.push(point[0]+' '+point[1]);}
return string.join(',')};CommonOpenLayer.stringToPolygon=function(string){var polygon=string.split(",");var result=[];for(var i=0;i<polygon.length;i++){var point=polygon[i].split(" ");result.push(CommonOpenLayer.latLng(parseFloat(point[1]),parseFloat(point[0])));}
return result};;var PolygonOpenLayer=function(map,opt_values){this.map_=map;this.source_=null;this.layer_=null;this.draw_=null;this.modify_=null;this.addLayer();};PolygonOpenLayer.prototype.addLayer=function(){this.source_=new ol.source.Vector();this.layer_=new ol.layer.Vector({source:this.source_,style:this.getStyle()});this.map_.addLayer(this.layer_);};PolygonOpenLayer.prototype.modify=function(){this.modify_=new ol.interaction.Modify({source:this.source_,style:this.getStyle()});this.map_.addInteraction(this.modify_);};PolygonOpenLayer.prototype.draw=function(){var this_=this;this.reset();this.modify();this.draw_=new ol.interaction.Draw({source:this.source_,type:"Polygon",style:this.getStyle('create')});this.map_.addInteraction(this.draw_);this_.source_.once(['addfeature'],function(evt){this_.draw_.setActive(false)});};PolygonOpenLayer.prototype.cancelDraw=function(){this.map_.removeInteraction(this.modify_);this.map_.removeInteraction(this.draw_);};PolygonOpenLayer.prototype.reset=function(){this.cancelDraw();this.delete();};PolygonOpenLayer.prototype.onChange=function(callback){return this.source_.on(['addfeature','changefeature'],function(evt){callback(evt.feature.getGeometry().getCoordinates())});};PolygonOpenLayer.prototype.onDelete=function(callback){return this.source_.on(['removefeature','clear'],function(evt){callback()});};PolygonOpenLayer.prototype.create=function(polygon,editable){this.reset();if(editable){this.modify();}
var feature=new ol.Feature({geometry:new ol.geom.Polygon([CommonOpenLayer.stringToPolygon(polygon)])});this.source_.addFeature(feature);this.map_.getView().fit(this.source_.getExtent());};PolygonOpenLayer.prototype.delete=function(){this.source_.clear();};PolygonOpenLayer.prototype.getStyle=function(mode){return function(feature,resolution){var fill_color=[0,0,0,0.2];var border_color=[0,153,255,1];var width=3;var type=feature.getGeometry().getType();if(type==='Polygon'||type==='MultiPolygon'){if(mode!=='create'){return[new ol.style.Style({fill:new ol.style.Fill({color:fill_color}),stroke:new ol.style.Stroke({color:border_color,width:width})})];}else{return[new ol.style.Style({fill:new ol.style.Fill({color:fill_color})})];}}else if(type==='LineString'||type==='MultiLineString'){return[new ol.style.Style({stroke:new ol.style.Stroke({color:fill_color,width:width+2})}),new ol.style.Style({stroke:new ol.style.Stroke({color:border_color,width:width})})]}else if(type==='Point'||type==='MultiPoint'){return[new ol.style.Style({image:new ol.style.Circle({radius:width*2,fill:new ol.style.Fill({color:border_color}),stroke:new ol.style.Stroke({color:fill_color,width:width/2})}),zIndex:Infinity})]}}};PolygonOpenLayer.prototype.getMap=function(){return this.map_;};PolygonOpenLayer.prototype.resized=function(){this.getMap().updateSize();};;var MoteurMap=function(options){this.map_=null;var options=options||{};this.mapInitLatitude_=options['initLatitude']||null;this.mapInitLongitude_=options['initLongitude']||null;this.mapInitZoom_=options['initZoom']||null;this.init();};MoteurMap.prototype.init=function(){if(this.map_===null){var raster=new ol.layer.Tile({source:new ol.source.TileJSON({url:jsData.openlayer_url_tiles,crossOrigin:'anonymous'})});var map=new ol.Map({layers:[raster],target:document.getElementById('myMap'),view:new ol.View({center:CommonOpenLayer.latLng(this.mapInitLatitude_,this.mapInitLongitude_),zoom:this.mapInitZoom_})});this.map_=new PolygonOpenLayer(map);}};MoteurMap.prototype.cancelDrawPolygon=function(){this.map_.reset();};MoteurMap.prototype.createPolygon=function(string){this.map_.create(string)};MoteurMap.prototype.startPolygon=function(){this.map_.draw();};MoteurMap.prototype.mapCenter=function(){this.map_.getMap().getView().setCenter(CommonOpenLayer.latLng(this.mapInitLatitude_,this.mapInitLongitude_));this.map_.getMap().getView().setZoom(this.mapInitZoom_);};MoteurMap.prototype.bindEvent=function(callback,txt_secteur){var this_=this;this.map_.onChange(function(polygon){if($(".block-moteur>div>div:visible input[name=id_polygon]").val()===""){var polygon_path=CommonOpenLayer.polygonToString(polygon[0]);$.ajax({type:'POST',url:'/setpolygon.php',data:{polygon:polygon_path},success:function(data){if(data){this_.map_.cancelDraw();callback(data,txt_secteur,true);}}});}});this.map_.onDelete(function(){callback("","",false);});};;var myMap=null;var polymyMap=null;isInitMap(function(){$(".block-moteur  input[name='localisation']").localisationcomplete({source:function(request,response){$.ajax({url:"/liste-villes.php",dataType:"json",data:{s:request.term,n:10,d:this.element.attr("data-departements"),p:this.element.attr("data-pays")},success:function(data){response($.map(data,function(item){return item;}));}});},select:function(){$(".block-moteur>div>div:visible input[name='id_polygon']").val("");if(myMap!==null){myMap.cancelDrawPolygon(true);}},minLength:2,delay:500});$(".deleteLocalisation").click(function(){$(".block-moteur>div>div:visible input[name='id_polygon']").val('');$(".block-moteur>div>div:visible input[name='localisation']").val('');$(this).hide();if(myMap!==null){myMap.cancelDrawPolygon(true);}});$('.showmap').magnificPopup({mainClass:'mfp-with-zoom',callbacks:{open:function(){if(myMap===null){var setInput=function(polygon_string,nom_secteur,show_btn_delete){$(".block-moteur>div>div:visible input[name='id_polygon']").val(polygon_string);$(".block-moteur>div>div:visible input[name='localisation']").val(nom_secteur);if(show_btn_delete){$(".block-moteur>div>div:visible .deleteLocalisation").show();}else{$(".block-moteur>div>div:visible .deleteLocalisation").hide();}};myMap=new MoteurMap({initLatitude:default_latitude,initLongitude:default_longitude,initZoom:default_zoom});myMap.bindEvent(setInput,txt_secteur);}
if($(".block-moteur>div>div:visible input[name=id_polygon]").length>0&&$(".block-moteur>div>div:visible input[name=id_polygon]").val()!==""){$.ajax({type:'POST',url:'/getpolygon.php',data:{id:$(".block-moteur>div>div:visible input[name=id_polygon]").val()},success:function(data){if(data.length>0){myMap.cancelDrawPolygon(true);myMap.createPolygon(data);}}});}else{myMap.cancelDrawPolygon(true);myMap.mapCenter();}}}});$(".block-moteur>div>div").each(function(){if($("input[name=id_polygon]",this).length>0&&$("input[name=id_polygon]",this).val()!==""){$("input[name='localisation']",this).val(txt_secteur);}
if($("input[name='localisation']",this).length>0&&$("input[name='localisation']",this).val()===""){$(".deleteLocalisation",this).hide();}else{$(".deleteLocalisation",this).show();}
$("input[name='localisation']",this).change(function(){if($(this).is(':visible')&&$(this).length>0&&$(this).val()!==""){$(".deleteLocalisation").show();}else{$(".deleteLocalisation").hide();}})});$('#closePolygon').click(function(e){$.magnificPopup.close();});$('#drawPolygon').click(function(){myMap.startPolygon();return false;});});$(document).ready(function(){var date_dispo=$(".date_dispo_div");if(date_dispo){$("input[name=categorie]").on("change",function(){if(this.defaultValue==="location"){date_dispo.removeClass("date_dispo_hidden");}
else{date_dispo.addClass("date_dispo_hidden");}});}
addMapJsScript();});;$(document).ready(function(){var _selectedText="";if(lang=="fr"){_selectedText="# option(s) sélectionnée(s)";_noneSelectedText="Sélectionnez vos options";}else if(lang=="pt"){_selectedText="# selecionado";_noneSelectedText="Selecione as opções";}else{_selectedText="# selected";_noneSelectedText="Select options";}
$("#jforms_locsaisonniere_recherchelocsaisonniere_prestation_complementaire,#jforms_locsaisonniere_recherchelocsaisonniere_destination").multiselect({header:false,maxWidth:"auto",selectedText:_selectedText,noneSelectedText:_noneSelectedText});});;$(document).ready(function(){$('.moteur-reference').hide();if(isOnIndex()){var first_item=($(this).find($('input[name="categorie"]')).val().toLowerCase());$('p.moteur-'+first_item).addClass('accordeon-active');check_input_offre('moteur-vente');}
$('.categorie_div  > span').each(function(){var val_item=$(this).find($('input[name="categorie"]')).val().toLowerCase();if(val_item=='vente'||val_item=='location'||val_item=='viager'){$('p.moteur-'+val_item).show();}});if(($(".reference_div > input").length>0)){$('p.moteur-reference').show();}
$(".moteur_items > p").click(function(){$(".moteur_items > p").removeClass('accordeon-active');$($(this)).addClass('accordeon-active');$(".accordion").children().hide();var classList=$(this).attr('class').split(" ");$.each(classList,function(index,item){var regex=new RegExp("^(moteur-([a-z]+))","i");var match=regex.exec(item);if(match){var class_div=match[1];check_input_offre(class_div);if(class_div=='moteur-vente'||class_div=='moteur-location'||class_div=='moteur-viager'){class_div='moteur-offre';}
$('.div-'+class_div).show();}});});});function check_input_offre(class_div)
{var categorie=class_div.split("-")[1];$(".categorie_div span input").each(function(){if(($(this).attr('value'))==categorie){$(this).prop('checked','true');$(this).trigger('change');if(categorie!='location'){$(".date_dispo_div").addClass('date_dispo_hidden');}}});}
function isOnIndex(){return $('body').hasClass('wbs-siteaccueil');};(function($){var defaults={element:'body',type:"warning",template:'<div data-notify="container" class="jelix-msg"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">&times;</button><span data-notify="message">{1}</span></div>'};var Stringformat=function(){var args=arguments;var str=arguments[0];return str.replace(/(\{\{\d\}\}|\{\d\})/g,function(str){if(str.substring(0,2)==="{{")return str;var num=parseInt(str.match(/\d/)[0]);return args[num+1];});};function Notify(element,content,options){var contentObj={content:{message:typeof content==='object'?content.message:content}};options=$.extend(true,{},contentObj,options);this.settings=$.extend(true,{},defaults,options);this._defaults=defaults;if($('[data-notify="container"]')){this.close();this.init();}else{this.init();}}
$.extend(Notify.prototype,{init:function(){var self=this;var content=this.settings.content;var color='#f3d1a3';switch(this.settings.type){case"error":color='#e4a6a1';break;case"success":color='#bddcb9';break;}
var styles={position:'fixed',width:'90%',margin:'0 auto',left:'0',right:'0',display:'block',padding:'20px 60px 20px 60px',borderRadius:'5px',top:'30px',background:color,zIndex:'1099'};var styleBtn={position:'absolute',right:'40px',background:'transparent',border:'0',color:'#828282',margin:'auto 0',top:'0',bottom:'0',fontSize:'29px',height:'35px'};this.$ele=Stringformat(this.settings.template,this.settings.type,content.message);this.notify={$ele:this.$ele,close:function(){self.close();}};$(this.settings.element).append(this.$ele);$('[data-notify="container"]').css(styles);$('[data-notify="dismiss"]').css(styleBtn);$('[data-notify="message"]').addClass('jelix-msg-item-'+self.settings.type);$('[data-notify="dismiss"]').click(function(){self.close();})},close:function(){$('[data-notify="container"]').remove();}});$.notify=function(content,options){var plugin=new Notify(this,content,options);return plugin.notify;};})(jQuery);;$(document).ready(function(){(function(jFormsJQ){var c,c2;jFormsJQ.selectFillUrl='/forms/getdata';jFormsJQ.config={locale:'fr_FR',basePath:'/',jqueryPath:'/static/jelix/jquery/',jqueryFile:'$jelix/jquery/jquery.min.js',jelixWWWPath:'/static/jelix/'};jFormsJQ.tForm=new jFormsJQForm('jforms_webcontact_formbase','webcontact~formbase','contactsimpleoffre826276');jFormsJQ.tForm.setErrorDecorator(new jFormsJQErrorDecoratorHtml());jFormsJQ.declareForm(jFormsJQ.tForm);c=new jFormsJQControlString('civilite','Civilité');c.errRequired='La saisie de "Civilité" est obligatoire';c.errInvalid='La saisie de "Civilité" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('nom','Nom');c.maxLength='100';c.required=true;c.errRequired='La saisie de "Nom" est obligatoire';c.errInvalid='La saisie de "Nom" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('prenom','Prénom');c.maxLength='100';c.required=true;c.errRequired='La saisie de "Prénom" est obligatoire';c.errInvalid='La saisie de "Prénom" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('email','Email');c.regexp=/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]+$/;c.required=true;c.errRequired='La saisie de "Email" est obligatoire';c.errInvalid='La saisie de "Email" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('telephone','Téléphone');c.maxLength='30';c.regexp=/^[0-9\-\+\(\)\. ]+$/;c.errRequired='La saisie de "Téléphone" est obligatoire';c.errInvalid='La saisie de "Téléphone" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('mobile','Mobile');c.maxLength='30';c.regexp=/^[0-9\-\+\(\)\. ]+$/;c.errRequired='La saisie de "Mobile" est obligatoire';c.errInvalid='La saisie de "Mobile" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('telephoneprofessionnel','Tél. professionnel');c.maxLength='30';c.regexp=/^[0-9\-\+\(\)\. ]+$/;c.errRequired='La saisie de "Tél. professionnel" est obligatoire';c.errInvalid='La saisie de "Tél. professionnel" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('adresse','Adresse');c.maxLength='100';c.errRequired='La saisie de "Adresse" est obligatoire';c.errInvalid='La saisie de "Adresse" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('adresse2','Complément d\'adresse');c.maxLength='100';c.errRequired='La saisie de "Complément d\'adresse" est obligatoire';c.errInvalid='La saisie de "Complément d\'adresse" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlAutocomplete('ville','Ville');c.pathJson='/wliste-villes.php';c.nbMaxItemShow=10;c.limitItamTags=null;jforms_autocomplete(c,jFormsJQ.config);c.errRequired='La saisie de "Ville" est obligatoire';c.errInvalid='La saisie de "Ville" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('codepostal','Code postal');c.maxLength='10';c.errRequired='La saisie de "Code postal" est obligatoire';c.errInvalid='La saisie de "Code postal" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('pays','Pays');c.maxLength='100';c.errRequired='La saisie de "Pays" est obligatoire';c.errInvalid='La saisie de "Pays" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('message','Message');c.maxLength='4000';c.required=true;c.errRequired='La saisie de "Message" est obligatoire';c.errInvalid='La saisie de "Message" est invalide ((4000 caractères maximum))';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlBoolean('newsletter','Je souhaite recevoir la newsletter de l’agence');c.errRequired='La saisie de "Je souhaite recevoir la newsletter de l’agence" est obligatoire';c.errInvalid='La saisie de "Je souhaite recevoir la newsletter de l’agence" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlBoolean('gdpr','J\'accepte que les informations recueillies sur ce formulaire soient enregistrées dans un fichier informatisé par votre société pour la gestion de la clientèle.');$('#gdpr-gdpr-link').magnificPopup({type:'ajax',mainClass:'mfp-gdpr',callbacks:{parseAjax:function(mfpResponse){mfpResponse.data=$(mfpResponse.data).find('#gdpr-popin');}}});c.required=true;c.errRequired='Vous devez accepter les conditions obligatoires';c.errInvalid='La saisie de "J\'accepte que les informations recueillies sur ce formulaire soient enregistrées dans un fichier informatisé par votre société pour la gestion de la clientèle." est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlRecaptchabtn('submitbtn','Envoyer');jFormsJQ.tForm.addControl(c);window.onsubmitbtnSubmit=function(t){jFormsJQ.getForm('jforms_webcontact_formbase').getControl('submitbtn').setToken(t);jQuery('#jforms_webcontact_formbase').submit();};if(typeof addHandlerWebContact==="function"){addHandlerWebContact(jFormsJQ);}
if(typeof $("#jforms_webcontact_formbase").initWebContactForm==="function"){$("#jforms_webcontact_formbase").initWebContactForm();}})(jFormsJQ);});$(document).ready(function(){(function(jFormsJQ){var c,c2;jFormsJQ.selectFillUrl='/forms/getdata';jFormsJQ.config={locale:'fr_FR',basePath:'/',jqueryPath:'/static/jelix/jquery/',jqueryFile:'$jelix/jquery/jquery.min.js',jelixWWWPath:'/static/jelix/'};jFormsJQ.tForm=new jFormsJQForm('jforms_offre_recherche','offre~recherche','0');jFormsJQ.tForm.setErrorDecorator(new jFormsJQErrorDecoratorHtml());jFormsJQ.declareForm(jFormsJQ.tForm);c=new jFormsJQControlString('categorie','Categorie');c.errRequired='La saisie de "Categorie" est obligatoire';c.errInvalid='La saisie de "Categorie" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('type_bien','Type de biens');c.errRequired='La saisie de "Type de biens" est obligatoire';c.errInvalid='La saisie de "Type de biens" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('nb_pieces','Nombre de pièces');c.errRequired='La saisie de "Nombre de pièces" est obligatoire';c.errInvalid='La saisie de "Nombre de pièces" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('surface','Surface');c.errRequired='La saisie de "Surface" est obligatoire';c.errInvalid='La saisie de "Surface" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('budget','Budget');c.errRequired='La saisie de "Budget" est obligatoire';c.errInvalid='La saisie de "Budget" est invalide';jFormsJQ.tForm.addControl(c);c=new jFormsJQControlString('localisation','Ville/Secteur');c.errRequired='La saisie de "Ville/Secteur" est obligatoire';c.errInvalid='La saisie de "Ville/Secteur" est invalide';jFormsJQ.tForm.addControl(c);if(typeof addHandlerWebContact==="function"){addHandlerWebContact(jFormsJQ);}
if(typeof $("#jforms_offre_recherche").initWebContactForm==="function"){$("#jforms_offre_recherche").initWebContactForm();}})(jFormsJQ);});