PageSourceSearch

https://medical42.ru/bitrix/cache/js/ru/simai.framework/template_7…6a48b2cb129a54d044a1_v1.js?1648459380642862

js medical42.ru collected 2026-10-02 17:52:16 UTC 642,862 bytes, 9,790 lines download raw bytes

1
2; /* Start:"a:4:{s:4:"full";s:70:"/simai/asset/lazysizes/lazysizes-5.1.0/lazysizes.min.js?16484588047057";s:6:"source";s:55:"/simai/asset/lazysizes/lazysizes-5.1.0/lazysizes.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3/*! lazysizes - v5.1.0 */
4!function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}("undefined"!=typeof window?window:{},function(a,b){"use strict";var c,d;if(function(){var b,c={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};d=a.lazySizesConfig||a.lazysizesConfig||{};for(b in c)b in d||(d[b]=c[b])}(),!b||!b.getElementsByClassName)return{init:function(){},cfg:d,noSupport:!0};var e=b.documentElement,f=a.Date,g=a.HTMLPictureElement,h="addEventListener",i="getAttribute",j=a[h],k=a.setTimeout,l=a.requestAnimationFrame||k,m=a.requestIdleCallback,n=/^picture$/i,o=["load","error","lazyincluded","_lazyloaded"],p={},q=Array.prototype.forEach,r=function(a,b){return p[b]||(p[b]=new RegExp("(\\s|^)"+b+"(\\s|$)")),p[b].test(a[i]("class")||"")&&p[b]},s=function(a,b){r(a,b)||a.setAttribute("class",(a[i]("class")||"").trim()+" "+b)},t=function(a,b){var c;(c=r(a,b))&&a.setAttribute("class",(a[i]("class")||"").replace(c," "))},u=function(a,b,c){var d=c?h:"removeEventListener";c&&u(a,b),o.forEach(function(c){a[d](c,b)})},v=function(a,d,e,f,g){var h=b.createEvent("Event");return e||(e={}),e.instance=c,h.initEvent(d,!f,!g),h.detail=e,a.dispatchEvent(h),h},w=function(b,c){var e;!g&&(e=a.picturefill||d.pf)?(c&&c.src&&!b[i]("srcset")&&b.setAttribute("srcset",c.src),e({reevaluate:!0,elements:[b]})):c&&c.src&&(b.src=c.src)},x=function(a,b){return(getComputedStyle(a,null)||{})[b]},y=function(a,b,c){for(c=c||a.offsetWidth;c<d.minSize&&b&&!a._lazysizesWidth;)c=b.offsetWidth,b=b.parentNode;return c},z=function(){var a,c,d=[],e=[],f=d,g=function(){var b=f;for(f=d.length?e:d,a=!0,c=!1;b.length;)b.shift()();a=!1},h=function(d,e){a&&!e?d.apply(this,arguments):(f.push(d),c||(c=!0,(b.hidden?k:l)(g)))};return h._lsFlush=g,h}(),A=function(a,b){return b?function(){z(a)}:function(){var b=this,c=arguments;z(function(){a.apply(b,c)})}},B=function(a){var b,c=0,e=d.throttleDelay,g=d.ricTimeout,h=function(){b=!1,c=f.now(),a()},i=m&&g>49?function(){m(h,{timeout:g}),g!==d.ricTimeout&&(g=d.ricTimeout)}:A(function(){k(h)},!0);return function(a){var d;(a=!0===a)&&(g=33),b||(b=!0,d=e-(f.now()-c),d<0&&(d=0),a||d<9?i():k(i,d))}},C=function(a){var b,c,d=99,e=function(){b=null,a()},g=function(){var a=f.now()-c;a<d?k(g,d-a):(m||e)(e)};return function(){c=f.now(),b||(b=k(g,d))}},D=function(){var g,l,m,o,p,y,D,F,G,H,I,J,K=/^img$/i,L=/^iframe$/i,M="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),N=0,O=0,P=0,Q=-1,R=function(a){P--,(!a||P<0||!a.target)&&(P=0)},S=function(a){return null==J&&(J="hidden"==x(b.body,"visibility")),J||"hidden"!=x(a.parentNode,"visibility")&&"hidden"!=x(a,"visibility")},T=function(a,c){var d,f=a,g=S(a);for(F-=c,I+=c,G-=c,H+=c;g&&(f=f.offsetParent)&&f!=b.body&&f!=e;)(g=(x(f,"opacity")||1)>0)&&"visible"!=x(f,"overflow")&&(d=f.getBoundingClientRect(),g=H>d.left&&G<d.right&&I>d.top-1&&F<d.bottom+1);return g},U=function(){var a,f,h,j,k,m,n,p,q,r,s,t,u=c.elements;if((o=d.loadMode)&&P<8&&(a=u.length)){for(f=0,Q++;f<a;f++)if(u[f]&&!u[f]._lazyRace)if(!M||c.prematureUnveil&&c.prematureUnveil(u[f]))aa(u[f]);else if((p=u[f][i]("data-expand"))&&(m=1*p)||(m=O),r||(r=!d.expand||d.expand<1?e.clientHeight>500&&e.clientWidth>500?500:370:d.expand,c._defEx=r,s=r*d.expFactor,t=d.hFac,J=null,O<s&&P<1&&Q>2&&o>2&&!b.hidden?(O=s,Q=0):O=o>1&&Q>1&&P<6?r:N),q!==m&&(y=innerWidth+m*t,D=innerHeight+m,n=-1*m,q=m),h=u[f].getBoundingClientRect(),(I=h.bottom)>=n&&(F=h.top)<=D&&(H=h.right)>=n*t&&(G=h.left)<=y&&(I||H||G||F)&&(d.loadHidden||S(u[f]))&&(l&&P<3&&!p&&(o<3||Q<4)||T(u[f],m))){if(aa(u[f]),k=!0,P>9)break}else!k&&l&&!j&&P<4&&Q<4&&o>
42&&(g[0]||d.preloadAfterLoad)&&(g[0]||!p&&(I||H||G||F||"auto"!=u[f][i](d.sizesAttr)))&&(j=g[0]||u[f]);j&&!k&&aa(j)}},V=B(U),W=function(a){var b=a.target;if(b._lazyCache)return void delete b._lazyCache;R(a),s(b,d.loadedClass),t(b,d.loadingClass),u(b,Y),v(b,"lazyloaded")},X=A(W),Y=function(a){X({target:a.target})},Z=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},$=function(a){var b,c=a[i](d.srcsetAttr);(b=d.customMedia[a[i]("data-media")||a[i]("media")])&&a.setAttribute("media",b),c&&a.setAttribute("srcset",c)},_=A(function(a,b,c,e,f){var g,h,j,l,o,p;(o=v(a,"lazybeforeunveil",b)).defaultPrevented||(e&&(c?s(a,d.autosizesClass):a.setAttribute("sizes",e)),h=a[i](d.srcsetAttr),g=a[i](d.srcAttr),f&&(j=a.parentNode,l=j&&n.test(j.nodeName||"")),p=b.firesLoad||"src"in a&&(h||g||l),o={target:a},s(a,d.loadingClass),p&&(clearTimeout(m),m=k(R,2500),u(a,Y,!0)),l&&q.call(j.getElementsByTagName("source"),$),h?a.setAttribute("srcset",h):g&&!l&&(L.test(a.nodeName)?Z(a,g):a.src=g),f&&(h||l)&&w(a,{src:g})),a._lazyRace&&delete a._lazyRace,t(a,d.lazyClass),z(function(){var b=a.complete&&a.naturalWidth>1;p&&!b||(b&&s(a,"ls-is-cached"),W(o),a._lazyCache=!0,k(function(){"_lazyCache"in a&&delete a._lazyCache},9)),"lazy"==a.loading&&P--},!0)}),aa=function(a){if(!a._lazyRace){var b,c=K.test(a.nodeName),e=c&&(a[i](d.sizesAttr)||a[i]("sizes")),f="auto"==e;(!f&&l||!c||!a[i]("src")&&!a.srcset||a.complete||r(a,d.errorClass)||!r(a,d.lazyClass))&&(b=v(a,"lazyunveilread").detail,f&&E.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,P++,_(a,b,f,e,c))}},ba=C(function(){d.loadMode=3,V()}),ca=function(){3==d.loadMode&&(d.loadMode=2),ba()},da=function(){if(!l){if(f.now()-p<999)return void k(da,999);l=!0,d.loadMode=3,V(),j("scroll",ca,!0)}};return{_:function(){p=f.now(),c.elements=b.getElementsByClassName(d.lazyClass),g=b.getElementsByClassName(d.lazyClass+" "+d.preloadClass),j("scroll",V,!0),j("resize",V,!0),a.MutationObserver?new MutationObserver(V).observe(e,{childList:!0,subtree:!0,attributes:!0}):(e[h]("DOMNodeInserted",V,!0),e[h]("DOMAttrModified",V,!0),setInterval(V,999)),j("hashchange",V,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(a){b[h](a,V,!0)}),/d$|^c/.test(b.readyState)?da():(j("load",da),b[h]("DOMContentLoaded",V),k(da,2e4)),c.elements.length?(U(),z._lsFlush()):V()},checkElems:V,unveil:aa,_aLSL:ca}}(),E=function(){var a,c=A(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),n.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;f<g;f++)e[f].setAttribute("sizes",d);c.detail.dataAttr||w(a,c.detail)}),e=function(a,b,d){var e,f=a.parentNode;f&&(d=y(a,f,d),e=v(a,"lazybeforesizes",{width:d,dataAttr:!!b}),e.defaultPrevented||(d=e.detail.width)&&d!==a._lazysizesWidth&&c(a,f,e,d))},f=function(){var b,c=a.length;if(c)for(b=0;b<c;b++)e(a[b])},g=C(f);return{_:function(){a=b.getElementsByClassName(d.autosizesClass),j("resize",g)},checkElems:g,updateElem:e}}(),F=function(){!F.i&&b.getElementsByClassName&&(F.i=!0,E._(),D._())};return k(function(){d.init&&F()}),c={cfg:d,autoSizer:E,loader:D,init:F,uP:w,aC:s,rC:t,hC:r,fire:v,gW:y,rAF:z}});
5/* End */
6;
7; /* Start:"a:4:{s:4:"full";s:87:"/simai/asset/lazysizes/lazysizes-5.1.0/plugins/respimg/ls.respimg.min.js?16484588043683";s:6:"source";s:72:"/simai/asset/lazysizes/lazysizes-5.1.0/plugins/respimg/ls.respimg.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
8/*! lazysizes - v5.1.0 */
9!function(a,b){if(a){var c=function(){b(a.lazySizes),a.removeEventListener("lazyunveilread",c,!0)};b=b.bind(null,a,a.document),"object"==typeof module&&module.exports?b(require("lazysizes")):a.lazySizes?c():a.addEventListener("lazyunveilread",c,!0)}}("undefined"!=typeof window?window:0,function(a,b,c){"use strict";var d,e=c.cfg,f=b.createElement("img"),g="sizes"in f&&"srcset"in f,h=/\s+\d+h/g,i=function(){var a=/\s+(\d+)(w|h)\s+(\d+)(w|h)/,d=Array.prototype.forEach;return function(){var f=b.createElement("img"),g=function(b){var c,d,f=b.getAttribute(e.srcsetAttr);f&&(d=f.match(a))&&(c="w"==d[2]?d[1]/d[3]:d[3]/d[1],c&&b.setAttribute("data-aspectratio",c),b.setAttribute(e.srcsetAttr,f.replace(h,"")))}
9,i=function(a){if(a.detail.instance==c){var b=a.target.parentNode;b&&"PICTURE"==b.nodeName&&d.call(b.getElementsByTagName("source"),g),g(a.target)}},j=function(){f.currentSrc&&b.removeEventListener("lazybeforeunveil",i)};b.addEventListener("lazybeforeunveil",i),f.onload=j,f.onerror=j,f.srcset="data:,a 1w 1h",f.complete&&j()}}();if(e.supportsType||(e.supportsType=function(a){return!a}),a.HTMLPictureElement&&g)return void(!c.hasHDescriptorFix&&b.msElementsFromPoint&&(c.hasHDescriptorFix=!0,i()));a.picturefill||e.pf||(e.pf=function(b){var c,e;if(!a.picturefill)for(c=0,e=b.elements.length;c<e;c++)d(b.elements[c])},d=function(){var f=function(a,b){return a.w-b.w},i=/^\s*\d+\.*\d*px\s*$/,j=function(a){var b,c,d=a.length,e=a[d-1],f=0;for(f;f<d;f++)if(e=a[f],e.d=e.w/a.w,e.d>=a.d){!e.cached&&(b=a[f-1])&&b.d>a.d-.13*Math.pow(a.d,2.2)&&(c=Math.pow(b.d-.6,1.6),b.cached&&(b.d+=.15*c),b.d+(e.d-a.d)*c>a.d&&(e=b));break}return e},k=function(){var a,b=/(([^,\s].[^\s]+)\s+(\d+)w)/g,c=/\s/,d=function(b,c,d,e){a.push({c:c,u:d,w:1*e})};return function(e){return a=[],e=e.trim(),e.replace(h,"").replace(b,d),a.length||!e||c.test(e)||a.push({c:e,u:e,w:99}),a}}(),l=function(){l.init||(l.init=!0,addEventListener("resize",function(){var a,c=b.getElementsByClassName("lazymatchmedia"),e=function(){var a,b;for(a=0,b=c.length;a<b;a++)d(c[a])};return function(){clearTimeout(a),a=setTimeout(e,66)}}()))},m=function(b,d){var f,g=b.getAttribute("srcset")||b.getAttribute(e.srcsetAttr);!g&&d&&(g=b._lazypolyfill?b._lazypolyfill._set:b.getAttribute(e.srcAttr)||b.getAttribute("src")),b._lazypolyfill&&b._lazypolyfill._set==g||(f=k(g||""),d&&b.parentNode&&(f.isPicture="PICTURE"==b.parentNode.nodeName.toUpperCase(),f.isPicture&&a.matchMedia&&(c.aC(b,"lazymatchmedia"),l())),f._set=g,Object.defineProperty(b,"_lazypolyfill",{value:f,writable:!0}))},n=function(b){var d=a.devicePixelRatio||1,e=c.getX&&c.getX(b);return Math.min(e||d,2.5,d)},o=function(b){return a.matchMedia?(o=function(a){return!a||(matchMedia(a)||{}).matches})(b):!b},p=function(a){var b,d,g,h,k,l,p;if(h=a,m(h,!0),k=h._lazypolyfill,k.isPicture)for(d=0,b=a.parentNode.getElementsByTagName("source"),g=b.length;d<g;d++)if(e.supportsType(b[d].getAttribute("type"),a)&&o(b[d].getAttribute("media"))){h=b[d],m(h),k=h._lazypolyfill;break}return k.length>1?(p=h.getAttribute("sizes")||"",p=i.test(p)&&parseInt(p,10)||c.gW(a,a.parentNode),k.d=n(a),!k.src||!k.w||k.w<p?(k.w=p,l=j(k.sort(f)),k.src=l):l=k.src):l=k[0],l},q=function(a){if(!g||!a.parentNode||"PICTURE"==a.parentNode.nodeName.toUpperCase()){var b=p(a);b&&b.u&&a._lazypolyfill.cur!=b.u&&(a._lazypolyfill.cur=b.u,b.cached=!0,a.setAttribute(e.srcAttr,b.u),a.setAttribute("src",b.u))}};return q.parse=k,q}(),e.loadedClass&&e.loadingClass&&function(){var a=[];['img[sizes$="px"][srcset].',"picture > img:not([srcset])."].forEach(function(b){a.push(b+e.loadedClass),a.push(b+e.loadingClass)}),e.pf({elements:b.querySelectorAll(a.join(", "))})}())});
10/* End */
11;
12; /* Start:"a:4:{s:4:"full";s:95:"/simai/asset/lazysizes/lazysizes-5.1.0/plugins/unveilhooks/ls.unveilhooks.min.js?16484588041466";s:6:"source";s:80:"/simai/asset/lazysizes/lazysizes-5.1.0/plugins/unveilhooks/ls.unveilhooks.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
13/*! lazysizes - v5.1.0 */
14!function(a,b){var c=function(){b(a.lazySizes),a.removeEventListener("lazyunveilread",c,!0)};b=b.bind(null,a,a.document),"object"==typeof module&&module.exports?b(require("lazysizes")):a.lazySizes?c():a.addEventListener("lazyunveilread",c,!0)}(window,function(a,b,c){"use strict";function d(a,c){if(!g[a]){var d=b.createElement(c?"link":"script"),e=b.getElementsByTagName("script")[0];c?(d.rel="stylesheet",d.href=a):d.src=a,g[a]=!0,g[d.src||d.href]=!0,e.parentNode.insertBefore(d,e)}}var e,f,g={};b.addEventListener&&(f=/\(|\)|\s|'/,e=function(a,c){var d=b.createElement("img");d.onload=function(){d.onload=null,d.onerror=null,d=null,c()},d.onerror=d.onload,d.src=a,d&&d.complete&&d.onload&&d.onload()},addEventListener("lazybeforeunveil",function(a){if(a.detail.instance==c){var b,g,h,i;a.defaultPrevented||("none"==a.target.preload&&(a.target.preload="auto"),b=a.target.getAttribute("data-link"),b&&d(b,!0),b=a.target.getAttribute("data-script"),b&&d(b),b=a.target.getAttribute("data-require"),b&&(c.cfg.requireJs?c.cfg.requireJs([b]):d(b)),h=a.target.getAttribute("data-bg"),h&&(a.detail.firesLoad=!0,g=function(){a.target.style.backgroundImage="url("+(f.test(h)?JSON.stringify(h):h)+")",a.detail.firesLoad=!1,c.fire(a.target,"_lazyloaded",{},!0,!0)},e(h,g)),(i=a.target.getAttribute("data-poster"))&&(a.detail.firesLoad=!0,g=function(){a.target.poster=i,a.detail.firesLoad=!1,c.fire(a.target,"_lazyloaded",{},!0,!0)},e(i,g)))}},!1))});
15/* End */
16;
17; /* Start:"a:4:{s:4:"full";s:62:"/simai/asset/jquery/jquery-3.3.1/jquery.min.js?164845880486927";s:6:"source";s:46:"/simai/asset/jquery/jquery-3.3.1/jquery.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
vendor: 86,927 bytes, lines 18-19
18/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
19!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});
vendor: 834 bytes, lines 20-27
20
21/* End */
22;
23; /* Start:"a:4:{s:4:"full";s:66:"/simai/asset/popper/popper-1.14.5/js/popper.min.js?164845880420611";s:6:"source";s:50:"/simai/asset/popper/popper-1.14.5/js/popper.min.js";s:3:"min";s:50:"/simai/asset/popper/popper-1.14.5/js/popper.min.js";s:3:"map";s:54:"/simai/asset/popper/popper-1.14.5/js/popper.min.js.map";}"*/
24/*
25 Copyright (C) Federico Zivolo 2018
26 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
27 */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return t?n[t]:n}
vendor: 18,670 bytes, line 27
27function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}function r(e){return 11===e?re:10===e?pe:re||pe}function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent||null;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TH','TD','TABLE'].indexOf(n.nodeName)&&'static'===t(n,'position')?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if(e!==l&&t!==l||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',n=e.nodeName;if('BODY'===n||'HTML'===n){var i=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||i;return r[o]}return e[o]}function f(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=l(t,'top'),i=l(t,'left'),r=o?-1:1;return e.top+=n*r,e.bottom+=n*r,e.left+=i*r,e.right+=i*r,e}function m(e,t){var o='x'===t?'Left':'Top',n='Left'==o?'Right':'Bottom';return parseFloat(e['border'+o+'Width'],10)+parseFloat(e['border'+n+'Width'],10)}function h(e,t,o,n){return J(t['offset'+e],t['scroll'+e],o['client'+e],o['offset'+e],o['scroll'+e],r(10)?parseInt(o['offset'+e])+parseInt(n['margin'+('Height'===e?'Top':'Left')])+parseInt(n['margin'+('Height'===e?'Bottom':'Right')]):0)}function c(e){var t=e.body,o=e.documentElement,n=r(10)&&getComputedStyle(o);return{height:h('Height',t,o,n),width:h('Width',t,o,n)}}function g(e){return le({},e,{right:e.left+e.width,bottom:e.top+e.height})}function u(e){var o={};try{if(r(10)){o=e.getBoundingClientRect();var n=l(e,'top'),i=l(e,'left');o.top+=n,o.left+=i,o.bottom+=n,o.right+=i}else o=e.getBoundingClientRect()}catch(t){}var p={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},s='HTML'===e.nodeName?c(e.ownerDocument):{},d=s.width||e.clientWidth||p.right-p.left,a=s.height||e.clientHeight||p.bottom-p.top,f=e.offsetWidth-d,h=e.offsetHeight-a;if(f||h){var u=t(e);f-=m(u,'x'),h-=m(u,'y'),p.width-=f,p.height-=h}return g(p)}function b(e,o){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],p=r(10),s='HTML'===o.nodeName,d=u(e),a=u(o),l=n(e),m=t(o),h=parseFloat(m.borderTopWidth,10),c=parseFloat(m.borderLeftWidth,10);i&&s&&(a.top=J(a.top,0),a.left=J(a.left,0));var b=g({top:d.top-a.top-h,left:d.left-a.left-c,width:d.width,height:d.height});if(b.marginTop=0,b.marginLeft=0,!p&&s){var y=parseFloat(m.marginTop,10),w=parseFloat(m.marginLeft,10);b.top-=h-y,b.bottom-=h-y,b.left-=c-w,b.right-=c-w,b.marginTop=y,b.marginLeft=w}return(p&&!i?o.contains(l):o===l&&'BODY'!==l.nodeName)&&(b=f(b,o)),b}function y(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=e.ownerDocument.documentElement,n=b(e,o),i=J(o.clientWidth,window.innerWidth||0),r=J(o.clientHeight,window.innerHeight||0),p=t?0:l(o),s=t?0:l(o,'left'),d={top:p-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:r};return g(d)}function w(e){var n=e.nodeName;return'BODY'===n||'HTML'===n?!1:'fixed'===t(e,'position')||w(o(e))}function E(e){if(!e||!e.parentElement||r())return document.documentElement;for(var o=e.parentElement;o&&'none'===t(o,'transform');)o=o.parentElement;return o||document.documentElement}function v(e,t,i,r){var p=4<arguments.length&&void 0!==arguments[4]&&arguments[4],s={top:0,left:0},d=p?E(e):a(e,t);if('viewport'===r)s=y(d,p);else{var l;'scrollParent'===r?(l=n(o(t)),'BODY'===l.nodeName&&(l=e.ownerDocument.documentElement)):'window'===r?l=e.ownerDocument.documentElement:l=r;var f=b(l,d,p);if('HTML'===l.nodeName&&!w(d)){var m=c(e.ownerDocument),h=m.height,g=m.width;s.top+=f.top-f.marginTop,s.bottom=h+f.top,s.left+=f.left-f.marginLeft,s.right=g+f.left}else s=f}i=i||0;var u='number'==typeof i;return s.left+=u?i:i.left||0,s.top+=u?i:i.top||0,s.right-=u?i:i.right||0,s.bottom-=u?i:i.bottom||0,s}function x(e){var t=e.width,o=e.height;return t*o}function O(e,t,o,n,i){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var p=v(o,n,r,i),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return le({key:e},s[e],{area:x(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,n=e.height;return t>=o.clientWidth&&n>=o.clientHeight}),l=0<a.length?a[0].key:d[0].key,f=e.split('-')[1];return l+(f?'-'+f:'')}function L(e,t,o){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,i=n?E(t):a(t,o);return b(o,i,n)}function S(e){var t=e.ownerDocument.defaultView,o=t.getComputedStyle(e),n=parseFloat(o.marginTop)+parseFloat(o.marginBottom),i=parseFloat(o.marginLeft)+parseFloat(o.marginRight),r={width:e.offsetWidth+i,height:e.offsetHeight+n};return r}function T(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function D(e,t,o){o=o.split('-')[0];var n=S(e),i={width:n.width,height:n.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width',a=r?'width':'height';return i[p]=t[p]+t[d]/2-n[d]/2,i[s]=o===s?t[s]-n[a]:t[T(s)],i}function C(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function N(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var n=C(e,function(e){return e[t]===o});return e.indexOf(n)}function P(t,o,n){var i=void 0===n?t:t.slice(0,N(t,'name',n));return i.forEach(function(t){t['function']&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var n=t['function']||t.fn;t.enabled&&e(n)&&(o.offsets.popper=g(o.offsets.popper),o.offsets.reference=g(o.offsets.reference),o=n(o,t))}),o}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=O(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=D(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?'fixed':'absolute',e=P(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some(function(e){var o=e.name,n=e.enabled;return n&&o===t})}function H(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof document.body.style[r])return r}return null}function B(){return this.state.isDestroyed=!0,W(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.position='',this.popper.style.top='',this.popper.style.left='',this.popper.style.right='',this.popper.style.bottom='',this.popper.style.willChange='',this.popper.style[H('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function A(e){var t=e.ownerDocument;return t?t.defaultView:window}function M(e,t,o,i){var r='BODY'===e.nodeName,p=r?e.ownerDocument.defaultView:e;p.addEventListener(t,o,{passive:!0}),r||M(n(p.parentNode),t,o,i),i.push(p)}function F(e,t,o,i){o.updateBound=i,A(e).addEventListener('resize',o.updateBound,{passive:!0});var r=n(e);return M(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function I(){this.state.eventsEnabled||(this.state=F(this.reference,this.options,this.state,this.scheduleUpdate))}function R(e,t){return A(e).removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function U(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=R(this.reference,this.state))}function Y(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function V(e,t){Object.keys(t).forEach(function(o){var n='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&Y(t[o])&&(n='px'),e.style[o]=t[o]+n})}function j(e,t){Object.keys(t).forEach(function(o){var n=t[o];!1===n?e.removeAttribute(o):e.setAttribute(o,t[o])})}function q(e,t,o){var n=C(e,function(e){var o=e.name;return o===t}),i=!!n&&e.some(function(e){return e.name===o&&e.enabled&&e.order<n.order});if(!i){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return i}function K(e){return'end'===e?'start':'start'===e?'end':e}function G(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=me.indexOf(e),n=me.slice(o+1).concat(me.slice(0,o));return t?n.reverse():n}function z(e,t,o,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+i[1],p=i[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p){case'%p':s=o;break;case'%':case'%r':default:s=n;}var d=g(s);return d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?J(document.documentElement.clientHeight,window.innerHeight||0):J(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return r}function _(e,t,o,n){var i=[0,0],r=-1!==['right','left'].indexOf(n),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(C(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,n){var i=(1===n?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return z(e,i,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,n){Y(o)&&(i[t]+=o*('-'===e[n-1]?-1:1))})}),i}function X(e,t){var o,n=t.offset,i=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=i.split('-')[0];return o=Y(+n)?[+n,0]:_(n,p,s,d),'left'===d?(p.top+=o[0],p.left-=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e}for(var Q=Math.min,Z=Math.round,$=Math.floor,J=Math.max,ee='undefined'!=typeof window&&'undefined'!=typeof document,te=['Edge','Trident','Firefox'],oe=0,ne=0;ne<te.length;ne+=1)if(ee&&0<=navigator.userAgent.indexOf(te[ne])){oe=1;break}var i=ee&&window.Promise,ie=i?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},oe))}},re=ee&&!!(window.MSInputMethodContext&&document.documentMode),pe=ee&&/MSIE 10/.test(navigator.userAgent),se=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},de=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),ae=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},le=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var n in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},fe=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],me=fe.slice(3),he={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},ce=function(){function t(o,n){var i=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};se(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=ie(this.update.bind(this)),this.options=le({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o&&o.jquery?o[0]:o,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(le({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){i.options.modifiers[e]=le({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return le({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return de(t,[{key:'update',value:function(){return k.call(this)}},{key:'destroy',value:function(){return B.call(this)}},{key:'enableEventListeners',value:function(){return I.call(this)}},{key:'disableEventListeners',value:function(){return U.call(this)}}]),t}();return ce.Utils=('undefined'==typeof window?global:window).PopperUtils,ce.placements=fe,ce.Defaults={placement:'bottom',positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],n=t.split('-')[1];if(n){var i=e.offsets,r=i.reference,p=i.popper,s=-1!==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',l={start:ae({},d,r[d]),end:ae({},d,r[d]+r[a]-p[a])};e.offsets.popper=le({},p,l[n])}return e}},offset:{order:200,enabled:!0,fn:X,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||p(e.instance.popper);e.instance.reference===o&&(o=p(o));var n=H('transform'),i=e.instance.popper.style,r=i.top,s=i.left,d=i[n];i.top='',i.left='',i[n]='';var a=v(e.instance.popper,e.instance.reference,t.padding,o,e.positionFixed);i.top=r,i.left=s,i[n]=d,t.boundaries=a;var l=t.priority,f=e.offsets.popper,m={primary:function(e){var o=f[e];return f[e]<a[e]&&!t.escapeWithReference&&(o=J(f[e],a[e])),ae({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=f[o];return f[e]>a[e]&&!t.escapeWithReference&&(n=Q(f[o],a[e]-('right'===e?f.width:f.height))),ae({},o,n)}};return l.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';f=le({},f,m[t](e))}),e.offsets.popper=f,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split('-')[0],r=$,p=-1!==['top','bottom'].indexOf(i),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]<r(n[d])&&(e.offsets.popper[d]=r(n[d])-o[a]),o[d]>r(n[s])&&(e.offsets.popper[d]=r(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var n;if(!q(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',c=a?'bottom':'right',u=S(i)[l];d[c]-u<s[m]&&(e.offsets.popper[m]-=s[m]-(d[c]-u)),d[m]+u>s[c]&&(e.offsets.popper[m]+=d[m]+u-s[c]),e.offsets.popper=g(e.offsets.popper);var b=d[m]+d[l]/2-u/2,y=t(e.instance.popper),w=parseFloat(y['margin'+f],10),E=parseFloat(y['border'+f+'Width'],10),v=b-e.offsets.popper[m]-w-E;return v=J(Q(s[l]-u,v),0),e.arrowElement=i,e.offsets.arrow=(n={},ae(n,m,Z(v)),ae(n,h,''),n),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split('-')[0],i=T(n),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case he.FLIP:p=[n,i];break;case he.CLOCKWISE:p=G(n);break;case he.COUNTERCLOCKWISE:p=G(n,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(n!==s||p.length===d+1)return e;n=e.placement.split('-')[0],i=T(n);var a=e.offsets.popper,l=e.offsets.reference,f=$,m='left'===n&&f(a.right)>f(l.left)||'right'===n&&f(a.left)<f(l.right)||'top'===n&&f(a.bottom)>f(l.top)||'bottom'===n&&f(a.top)<f(l.bottom),h=f(a.left)<f(o.left),c=f(a.right)>f(o.right),g=f(a.top)<f(o.top),u=f(a.bottom)>f(o.bottom),b='left'===n&&h||'right'===n&&c||'top'===n&&g||'bottom'===n&&u,y=-1!==['top','bottom'].indexOf(n),w=!!t.flipVariations&&(y&&'start'===r&&h||y&&'end'===r&&c||!y&&'start'===r&&g||!y&&'end'===r&&u);(m||b||w)&&(e.flipped=!0,(m||b)&&(n=p[d+1]),w&&(r=K(r)),e.placement=n+(r?'-'+r:''),e.offsets.popper=le({},e.offsets.popper,D(e.instance.popper,e.offsets.reference,e.placement)),e=P(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],n=e.offsets,i=n.popper,r=n.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return i[p?'left':'top']=r[o]-(s?i[p?'width':'height']:0),e.placement=T(t),e.offsets.popper=g(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!q(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=C(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,n=t.y,i=e.offsets.popper,r=C(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;
27void 0!==r&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,d,a=void 0===r?t.gpuAcceleration:r,l=p(e.instance.popper),f=u(l),m={position:i.position},h={left:$(i.left),top:Z(i.top),bottom:Z(i.bottom),right:$(i.right)},c='bottom'===o?'top':'bottom',g='right'===n?'left':'right',b=H('transform');if(d='bottom'==c?'HTML'===l.nodeName?-l.clientHeight+h.bottom:-f.height+h.bottom:h.top,s='right'==g?'HTML'===l.nodeName?-l.clientWidth+h.right:-f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[g]=0,m.willChange='transform';else{var y='bottom'==c?-1:1,w='right'==g?-1:1;m[c]=d*y,m[g]=s*w,m.willChange=c+', '+g}var E={"x-placement":e.placement};return e.attributes=le({},E,e.attributes),e.styles=le({},m,e.styles),e.arrowStyles=le({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return V(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&V(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,n,i){var r=L(i,t,e,o.positionFixed),p=O(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),V(t,{position:o.positionFixed?'fixed':'absolute'}),o},gpuAcceleration:void 0}}},ce});
28/* End */
29;
30; /* Start:"a:4:{s:4:"full";s:75:"/simai/asset/simai.framework/sf4.master/core/js/sf-full.js?1648458804252549";s:6:"source";s:58:"/simai/asset/simai.framework/sf4.master/core/js/sf-full.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
31/*!
32 * Waves v0.7.5
33 * http://fian.my.id/Waves
34 *
35 * Copyright 2014-2016 Alfiana E. Sibuea and other contributors
36 * Released under the MIT license
37 * https://github.com/fians/Waves/blob/master/LICENSE
38 */
39
40;
41(function (window, factory) {
42    'use strict';
43
44    // AMD. Register as an anonymous module.  Wrap in function so we have access
45    // to root via `this`.
46    if (typeof define === 'function' && define.amd) {
47        define([], function () {
48            return factory.apply(window);
49        });
50    }
51
52    // Node. Does not work with strict CommonJS, but only CommonJS-like
53    // environments that support module.exports, like Node.
54    else if (typeof exports === 'object') {
55        module.exports = factory.call(window);
56    }
57
58    // Browser globals.
59    else {
60        window.Waves = factory.call(window);
61    }
62})(typeof global === 'object' ? global : this, function () {
63    'use strict';
64
65    var Waves = Waves || {};
66    var $$ = document.querySelectorAll.bind(document);
67    var toString = Object.prototype.toString;
68    var isTouchAvailable = 'ontouchstart' in window;
69
70
71    // Find exact position of element
72    function isWindow(obj) {
73        return obj !== null && obj === obj.window;
74    }
75
76    function getWindow(elem) {
77        return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;
78    }
79
80    function isObject(value) {
81        var type = typeof value;
82        return type === 'function' || type === 'object' && !!value;
83    }
84
85    function isDOMNode(obj) {
86        return isObject(obj) && obj.nodeType > 0;
87    }
88
89    function getWavesElements(nodes) {
90        var stringRepr = toString.call(nodes);
91
92        if (stringRepr === '[object String]') {
93            return $$(nodes);
94        } else if (isObject(nodes) && /^\[object (Array|HTMLCollection|NodeList|Object)\]$/.test(stringRepr) && nodes.hasOwnProperty('length')) {
95            return nodes;
96        } else if (isDOMNode(nodes)) {
97            return [nodes];
98        }
99
100        return [];
101    }
102
103    function offset(elem) {
104        var docElem, win,
105            box = {
106                top: 0,
107                left: 0
108            },
109            doc = elem && elem.ownerDocument;
110
111        docElem = doc.documentElement;
112
113        if (typeof elem.getBoundingClientRect !== typeof undefined) {
114            box = elem.getBoundingClientRect();
115        }
116        win = getWindow(doc);
117        return {
118            top: box.top + win.pageYOffset - docElem.clientTop,
119            left: box.left + win.pageXOffset - docElem.clientLeft
120        };
121    }
122
123    function convertStyle(styleObj) {
124        var style = '';
125
126        for (var prop in styleObj) {
127            if (styleObj.hasOwnProperty(prop)) {
128                style += (prop + ':' + styleObj[prop] + ';');
129            }
130        }
131
132        return style;
133    }
134
135    var Effect = {
136
137        // Effect duration
138        duration: 750,
139
140        // Effect delay (check for scroll before showing effect)
141        delay: 200,
142
143        show: function (e, element, velocity) {
144
145            // Disable right click
146            if (e.button === 2) {
147                return false;
148            }
149
150            element = element || this;
151
152            // Create ripple
153            var ripple = document.createElement('div');
154            ripple.className = 'waves-ripple waves-rippling';
155            element.appendChild(ripple);
156
157            // Get click coordinate and element width
158            var pos = offset(element);
159            var relativeY = 0;
160            var relativeX = 0;
vendor: 9,413 bytes, lines 161-438
161            // Support for touch devices
162            if ('touches' in e && e.touches.length) {
163                relativeY = (e.touches[0].pageY - pos.top);
164                relativeX = (e.touches[0].pageX - pos.left);
165            }
166            //Normal case
167            else {
168                relativeY = (e.pageY - pos.top);
169                relativeX = (e.pageX - pos.left);
170            }
171            // Support for synthetic events
172            relativeX = relativeX >= 0 ? relativeX : 0;
173            relativeY = relativeY >= 0 ? relativeY : 0;
174
175            var scale = 'scale(' + ((element.clientWidth / 100) * 3) + ')';
176            var translate = 'translate(0,0)';
177
178            if (velocity) {
179                translate = 'translate(' + (velocity.x) + 'px, ' + (velocity.y) + 'px)';
180            }
181
182            // Attach data to element
183            ripple.setAttribute('data-hold', Date.now());
184            ripple.setAttribute('data-x', relativeX);
185            ripple.setAttribute('data-y', relativeY);
186            ripple.setAttribute('data-scale', scale);
187            ripple.setAttribute('data-translate', translate);
188
189            // Set ripple position
190            var rippleStyle = {
191                top: relativeY + 'px',
192                left: relativeX + 'px'
193            };
194
195            ripple.classList.add('waves-notransition');
196            ripple.setAttribute('style', convertStyle(rippleStyle));
197            ripple.classList.remove('waves-notransition');
198
199            // Scale the ripple
200            rippleStyle['-webkit-transform'] = scale + ' ' + translate;
201            rippleStyle['-moz-transform'] = scale + ' ' + translate;
202            rippleStyle['-ms-transform'] = scale + ' ' + translate;
203            rippleStyle['-o-transform'] = scale + ' ' + translate;
204            rippleStyle.transform = scale + ' ' + translate;
205            rippleStyle.opacity = '1';
206
207            var duration = e.type === 'mousemove' ? 2500 : Effect.duration;
208            rippleStyle['-webkit-transition-duration'] = duration + 'ms';
209            rippleStyle['-moz-transition-duration'] = duration + 'ms';
210            rippleStyle['-o-transition-duration'] = duration + 'ms';
211            rippleStyle['transition-duration'] = duration + 'ms';
212
213            ripple.setAttribute('style', convertStyle(rippleStyle));
214        },
215
216        hide: function (e, element) {
217            element = element || this;
218
219            var ripples = element.getElementsByClassName('waves-rippling');
220
221            for (var i = 0, len = ripples.length; i < len; i++) {
222                removeRipple(e, element, ripples[i]);
223            }
224        }
225    };
226
227    /**
228     * Collection of wrapper for HTML element that only have single tag
229     * like <input> and <img>
230     */
231    var TagWrapper = {
232
233        // Wrap <input> tag so it can perform the effect
234        input: function (element) {
235
236            /*var parent = element.parentNode;
237
238            // If input already have parent just pass through
239            if (parent.tagName.toLowerCase() === 'i' && parent.classList.contains('waves-effect')) {
240                return;
241            }
242
243            // Put element class and style to the specified parent
244            var wrapper = document.createElement('i');
245            wrapper.className = element.className + ' waves-input-wrapper';
246            element.className = 'waves-button-input';
247
248            // Put element as child
249            parent.replaceChild(wrapper, element);
250            wrapper.appendChild(element);
251
252            // Apply element color and background color to wrapper
253            var elementStyle = window.getComputedStyle(element, null);
254            var color = elementStyle.color;
255            var backgroundColor = elementStyle.backgroundColor;
256
257            wrapper.setAttribute('style', 'color:' + color + ';background:' + backgroundColor);
258            element.setAttribute('style', 'background-color:rgba(0,0,0,0);');*/
259
260        },
261
262        // Wrap <img> tag so it can perform the effect
263        img: function (element) {
264
265            var parent = element.parentNode;
266
267            // If input already have parent just pass through
268            if (parent.tagName.toLowerCase() === 'i' && parent.classList.contains('waves-effect')) {
269                return;
270            }
271
272            // Put element as child
273            var wrapper = document.createElement('i');
274            parent.replaceChild(wrapper, element);
275            wrapper.appendChild(element);
276
277        }
278    };
279
280    /**
281     * Hide the effect and remove the ripple. Must be
282     * a separate function to pass the JSLint...
283     */
284    function removeRipple(e, el, ripple) {
285
286        // Check if the ripple still exist
287        if (!ripple) {
288            return;
289        }
290
291        ripple.classList.remove('waves-rippling');
292
293        var relativeX = ripple.getAttribute('data-x');
294        var relativeY = ripple.getAttribute('data-y');
295        var scale = ripple.getAttribute('data-scale');
296        var translate = ripple.getAttribute('data-translate');
297
298        // Get delay beetween mousedown and mouse leave
299        var diff = Date.now() - Number(ripple.getAttribute('data-hold'));
300        var delay = 350 - diff;
301
302        if (delay < 0) {
303            delay = 0;
304        }
305
306        if (e.type === 'mousemove') {
307            delay = 150;
308        }
309
310        // Fade out ripple after delay
311        var duration = e.type === 'mousemove' ? 2500 : Effect.duration;
312
313        setTimeout(function () {
314
315            var style = {
316                top: relativeY + 'px',
317                left: relativeX + 'px',
318                opacity: '0',
319
320                // Duration
321                '-webkit-transition-duration': duration + 'ms',
322                '-moz-transition-duration': duration + 'ms',
323                '-o-transition-duration': duration + 'ms',
324                'transition-duration': duration + 'ms',
325                '-webkit-transform': scale + ' ' + translate,
326                '-moz-transform': scale + ' ' + translate,
327                '-ms-transform': scale + ' ' + translate,
328                '-o-transform': scale + ' ' + translate,
329                'transform': scale + ' ' + translate
330            };
331
332            ripple.setAttribute('style', convertStyle(style));
333
334            setTimeout(function () {
335                try {
336                    el.removeChild(ripple);
337                } catch (e) {
338                    return false;
339                }
340            }, duration);
341
342        }, delay);
343    }
344
345
346    /**
347     * Disable mousedown event for 500ms during and after touch
348     */
349    var TouchHandler = {
350
351        /* uses an integer rather than bool so there's no issues with
352         * needing to clear timeouts if another touch event occurred
353         * within the 500ms. Cannot mouseup between touchstart and
354         * touchend, nor in the 500ms after touchend. */
355        touches: 0,
356
357        allowEvent: function (e) {
358
359            var allow = true;
360
361            if (/^(mousedown|mousemove)$/.test(e.type) && TouchHandler.touches) {
362                allow = false;
363            }
364
365            return allow;
366        },
367        registerEvent: function (e) {
368            var eType = e.type;
369
370            if (eType === 'touchstart') {
371
372                TouchHandler.touches += 1; // push
373
374            } else if (/^(touchend|touchcancel)$/.test(eType)) {
375
376                setTimeout(function () {
377                    if (TouchHandler.touches) {
378                        TouchHandler.touches -= 1; // pop after 500ms
379                    }
380                }, 500);
381
382            }
383        }
384    };
385
386
387    /**
388     * Delegated click handler for .waves-effect element.
389     * returns null when .waves-effect element not in "click tree"
390     */
391    function getWavesEffectElement(e) {
392
393        if (TouchHandler.allowEvent(e) === false) {
394            return null;
395        }
396
397        var element = null;
398        var target = e.target || e.srcElement;
399
400        while (target.parentElement !== null) {
401            if (target.classList.contains('waves-effect') && (!(target instanceof SVGElement))) {
402                element = target;
403                break;
404            }
405            target = target.parentElement;
406        }
407
408        return element;
409    }
410
411    /**
412     * Bubble the click and show effect if .waves-effect elem was found
413     */
414    function showEffect(e) {
415
416        // Disable effect if element has "disabled" property on it
417        // In some cases, the event is not triggered by the current element
418        // if (e.target.getAttribute('disabled') !== null) {
419        //     return;
420        // }
421
422        var element = getWavesEffectElement(e);
423
424        if (element !== null) {
425
426            // Make it sure the element has either disabled property, disabled attribute or 'disabled' class
427            if (element.disabled || element.getAttribute('disabled') || element.classList.contains('disabled')) {
428                return;
429            }
430
431            TouchHandler.registerEvent(e);
432
433            if (e.type === 'touchstart' && Effect.delay) {
434
435                var hidden = false;
436
437                var timer = setTimeout(function () {
438                    timer = null;
439                    Effect.show(e, element);
440                }, Effect.delay);
441
442                var hideEffect = function (hideEvent) {
443
444                    // if touch hasn't moved, and effect not yet started: start effect now
445                    if (timer) {
446                        clearTimeout(timer);
447                        timer = null;
448                        Effect.show(e, element);
449                    }
450                    if (!hidden) {
451                        hidden = true;
452                        Effect.hide(hideEvent, element);
453                    }
454                };
455
456                var touchMove = function (moveEvent) {
457                    if (timer) {
458                        clearTimeout(timer);
459                        timer = null;
460                    }
461                    hideEffect(moveEvent);
462                };
463
464                element.addEventListener('touchmove', touchMove, false);
465                element.addEventListener('touchend', hideEffect, false);
466                element.addEventListener('touchcancel', hideEffect, false);
467
468            } else {
469
vendor: 4,126 bytes, lines 470-603
470                Effect.show(e, element);
471
472                if (isTouchAvailable) {
473                    element.addEventListener('touchend', Effect.hide, false);
474                    element.addEventListener('touchcancel', Effect.hide, false);
475                }
476
477                element.addEventListener('mouseup', Effect.hide, false);
478                element.addEventListener('mouseleave', Effect.hide, false);
479            }
480        }
481    }
482
483    Waves.init = function (options) {
484        var body = document.body;
485
486        options = options || {};
487
488        if ('duration' in options) {
489            Effect.duration = options.duration;
490        }
491
492        if ('delay' in options) {
493            Effect.delay = options.delay;
494        }
495
496        if (isTouchAvailable) {
497            body.addEventListener('touchstart', showEffect, false);
498            body.addEventListener('touchcancel', TouchHandler.registerEvent, false);
499            body.addEventListener('touchend', TouchHandler.registerEvent, false);
500        }
501
502        body.addEventListener('mousedown', showEffect, false);
503    };
504
505
506    /**
507     * Attach Waves to dynamically loaded inputs, or add .waves-effect and other
508     * waves classes to a set of elements. Set drag to true if the ripple mouseover
509     * or skimming effect should be applied to the elements.
510     */
511    Waves.attach = function (elements, classes) {
512
513        elements = getWavesElements(elements);
514
515        if (toString.call(classes) === '[object Array]') {
516            classes = classes.join(' ');
517        }
518
519        classes = classes ? ' ' + classes : '';
520
521        var element, tagName;
522
523        for (var i = 0, len = elements.length; i < len; i++) {
524
525            element = elements[i];
526            tagName = element.tagName.toLowerCase();
527
528            if (['input', 'img'].indexOf(tagName) !== -1) {
529                TagWrapper[tagName](element);
530                element = element.parentElement;
531            }
532
533            if (element.className.indexOf('waves-effect') === -1) {
534                element.className += ' waves-effect' + classes;
535            }
536        }
537    };
538
539
540    /**
541     * Cause a ripple to appear in an element via code.
542     */
543    Waves.ripple = function (elements, options) {
544        elements = getWavesElements(elements);
545        var elementsLen = elements.length;
546
547        options = options || {};
548        options.wait = options.wait || 0;
549        options.position = options.position || null; // default = centre of element
550
551
552        if (elementsLen) {
553            var element, pos, off, centre = {},
554                i = 0;
555            var mousedown = {
556                type: 'mousedown',
557                button: 1
558            };
559            var hideRipple = function (mouseup, element) {
560                return function () {
561                    Effect.hide(mouseup, element);
562                };
563            };
564
565            for (; i < elementsLen; i++) {
566                element = elements[i];
567                pos = options.position || {
568                    x: element.clientWidth / 2,
569                    y: element.clientHeight / 2
570                };
571
572                off = offset(element);
573                centre.x = off.left + pos.x;
574                centre.y = off.top + pos.y;
575
576                mousedown.pageX = centre.x;
577                mousedown.pageY = centre.y;
578
579                Effect.show(mousedown, element);
580
581                if (options.wait >= 0 && options.wait !== null) {
582                    var mouseup = {
583                        type: 'mouseup',
584                        button: 1
585                    };
586
587                    setTimeout(hideRipple(mouseup, element), options.wait);
588                }
589            }
590        }
591    };
592
593    /**
594     * Remove all ripples from an element.
595     */
596    Waves.calm = function (elements) {
597        elements = getWavesElements(elements);
598        var mouseup = {
599            type: 'mouseup',
600            button: 1
601        };
602
603        for (var i = 0, len = elements.length; i < len; i++) {
604            Effect.hide(mouseup, elements[i]);
605        }
606    };
607
608    /**
609     * Deprecated API fallback
610     */
611    Waves.displayEffect = function (options) {
612        console.error('Waves.displayEffect() has been deprecated and will be removed in future version. Please use Waves.init() to initialize Waves effect');
613        Waves.init(options);
614    };
615
616    return Waves;
617});
618window.onload = function() {
619    //Initialization
620    Waves.attach('.wave', ['waves-effect']);	
621	Waves.attach('.btn-flat', ['waves-effect']);
622    Waves.attach('.pagination .page-item .page-link', ['waves-effect']);
623    Waves.attach('.btn', ['waves-light']);
624    Waves.attach('.view .mask', ['waves-light']);
625    Waves.attach('.wave-light', ['waves-light']);
626    Waves.attach('.navbar-nav a, .nav-icons li a, .navbar form, .nav-tabs .nav-item', ['waves-light']);
627    Waves.attach('.navbar-brand', ['waves-light']);
628    Waves.attach('.pager li a', ['waves-light']);
629    Waves.init();
630}
631
632document.addEventListener('DOMContentLoaded', function() {
633    //Initialization
634    Waves.attach('.wave', ['waves-effect']);	
635	Waves.attach('.btn-flat', ['waves-effect']);
636    Waves.attach('.pagination .page-item .page-link', ['waves-effect']);
637    Waves.attach('.btn', ['waves-light']);
638    Waves.attach('.view .mask', ['waves-light']);
639    Waves.attach('.wave-light', ['waves-light']);
640    Waves.attach('.navbar-nav a, .nav-icons li a, .navbar form, .nav-tabs .nav-item', ['waves-light']);
641    Waves.attach('.navbar-brand', ['waves-light']);
642    Waves.attach('.pager li a', ['waves-light']);
643    Waves.init();
644});
645var WOW = function (properties) {
646
647  var config = properties || {};
648
649  this._boxClass = config.boxClass || 'wow';
650  this._animateClass = config.animateClass || 'animated',
651  this._offset = config.offset || 0,
652  this._mobile = (config.mobile === undefined) ? true : false;
653  this._live = (config.live === undefined) ? true : false;
654
655  this._seoFixEnabled = (config.seoFixEnabled === undefined) ? true : false;
656  this._animationDuration = config.animationDuration || "1s";
657  this._animationDelay = config.animationDelay || "0s";
658
659  this._initStorageVariables();
660
661};
662
663WOW.prototype._initStorageVariables = function () {
664
665  this._animation = [];
666  this._boxes = [];
667  this._cleanupBoxListener = [];
668  this._cleanupBoxVisibleListener = [];
669
670};
671
672WOW.prototype.init = function () {
673
674  if (!this._mobile && this._isMobile()) {
675    return;
676  }
677
678  this._eachBoxInit(this._prepareBox.bind(this));
679
680  this._startWow();
681
682};
683
684WOW.prototype._isMobile = function () {
685  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
686};
687
688
689WOW.prototype._eachBoxInit = function (each) {
690
691  var boxes = document.getElementsByClassName(this._boxClass);
692
693  for (var i = 0; i < boxes.length; i++) {
694
695    (function (i) {
696      each(boxes[i], i);
697    })(i);
698
699  }
700
701};
702
703WOW.prototype._prepareBox = function (box) {
704
705  var index = this._boxes.push(box) - 1;
706  this._animation[index] = {
707    animationName: box.style.animationName || window.getComputedStyle(box, null).animationName
708  };
709  box.style.animationName = 'none';
710  box.style.visibility = 'hidden';
711
712};
713
714WOW.prototype._startWow = function () {
715
716  if (this._live) {
717    this._checkForChanges();
718  }
719  if (this._scrollY() === 0 && this._seoFixEnabled) {
720    this._seoFix();
721  }
722
723  this._appearInView();
724
725  this._scrollHandler();
726
727};
728
729WOW.prototype._scrollY = function () {
730
731  if (this._isInt(window.pageYOffset)) {
732    return window.pageYOffset;
733  }
734  if (this._isInt(document.documentElement.scrollTop)) {
735    return document.documentElement.scrollTop;
736  }
737  if (this._isInt(document.body.scrollTop)) {
738    return document.body.scrollTop;
739  }
740
741};
742
743WOW.prototype._isInt = function(value) {
744  return typeof value === 'number' && 
745    isFinite(value) && 
746    Math.floor(value) === value;
747};
748
749WOW.prototype._seoFix = function () {
750
751  this._showNotInView();
752
753};
754
755
756WOW.prototype._appear = function (box, i) {
757
758  var animationState = box.style.animationPlayState || box.style.WebkitAnimationPlayState;
759
760  if (box.className.indexOf(this._animateClass) === -1) {
761
762    delete this._boxes[i];
763
764    this._onStartAnimation(box, i);
765    this._onStopAnimation(box, i);
766
767    this._animate(box, i, this._getAnimationConfig(box));
768
769  }
770
771};
772
773WOW.prototype._onStartAnimation = function (box, i) {
774  
775  this._cleanupBoxVisibleListener[i] = this._boxVisible.bind(this, box, i);
776    
777  box.addEventListener('animationstart', this._cleanupBoxVisibleListener[i]);
778  box.addEventListener('webkitAnimationStart', this._cleanupBoxVisibleListener[i]);
779
780};
781
782WOW.prototype._onStopAnimation = function (box, i) {
783
784  this._cleanupBoxListener[i] = this._cleanupBox.bind(this, box, i);
785
786  box.addEventListener('animationend', this._cleanupBoxListener[i]);
787  box.addEventListener('webkitAnimationEnd', this._cleanupBoxListener[i]);
788
789};
790
791WOW.prototype._getAnimationConfig = function (box) {
792
793  return {
794
795    delay: this._getDelay(box),
796    duration: this._getDuration(box),
797    iterations: this._getIterations(box)
798      
799  }
800
801};
802
803WOW.prototype._getDelay = function (box) {
804
805  return box.getAttribute('data-wow-delay') || this._animationDelay;
806
807};
808
809WOW.prototype._getDuration = function (box) {
810
811  return box.getAttribute('data-wow-duration') || this._animationDuration;
812
813};
814
815WOW.prototype._getIterations = function (box) {
816
817  return box.getAttribute('data-wow-iteration') || 
818    box.style.animationIterationCount || 
819    window.getComputedStyle(box, null).animationIterationCount || 
820    1;
821
822};
823
824WOW.prototype._animate = function (box, i, config) {
825
826  box.style.animationDelay = config.delay;
827  box.style.animationDuration = config.duration;
828  box.style.animationIterationCount = config.iterations;
829  box.style.animationName = this._animation[i].animationName;
830  box.className += (' ' + this._animateClass);
831
832};
833
834WOW.prototype._boxVisible = function (box, i) {
835
836  box.style.visibility = 'visible';
837
838  box.removeEventListener('animationstart', this._cleanupBoxVisibleListener[i]);
839  box.removeEventListener('webkitAnimationStart', this._cleanupBoxVisibleListener[i]);
840
841  delete this._cleanupBoxVisibleListener[i];
842
843};
844
845WOW.prototype._cleanupBox = function (box, i) {
846
847  box.style.animationDelay = '';
848  box.style.animationDuration = '';
849  box.style.animationIterationCount = '';
850  box.style.animationName = 'none';
851
852  this._cleanupClass(box);
853
854  box.removeEventListener('animationend', this._cleanupBoxListener[i]);
855  box.removeEventListener('webkitAnimationEnd', this._cleanupBoxListener[i]);
856
857  delete this._cleanupBoxListener[i];
858
859};
860
861WOW.prototype._cleanupClass = function (box) {
862
863  var classArray = box.className.split(' ');
864  var animateIndex = classArray.indexOf(this._animateClass);
865
866  if (animateIndex !== -1) {
867
868    classArray.splice(animateIndex, 1);
869    box.className = classArray.join(' ');
870    
871  }
872
873};
874
875WOW.prototype._eachBox = function (each) {
876
877  for (var i = 0; i < this._boxes.length; i++) {
878
879    var box = this._boxes[i];
880
881    if (box) {
882
883      (function (i) {
884         each(this._boxes[i], i);
885      }.bind(this))(i);
886      
887    }
888
889  }
890
891};
892
893WOW.prototype._scrollHandler = function () {
894
895  this._hideSeoFixListener = this._hideSeoFix.bind(this);
896
897  window.addEventListener('scroll', this._hideSeoFixListener);
898  window.addEventListener('scroll', this._appearInView.bind(this));
899  window.addEventListener('resize', this._appearInView.bind(this));
900
901};
902
903WOW.prototype._hideSeoFix = function () {
904  
905  window.removeEventListener('scroll', this._hideSeoFixListener);
906  delete this._hideSeoFixListener;
907
908  this._eachBox(function (box, i) {
909
910    if (!this._isInView(box)) {
911      box.style.visibility = "hidden";
912    }
913
914  }.bind(this));
915
916};
917
918WOW.prototype._appearInView = function () {
919
920  this._eachBox(function (box, i) {
921    this._animateBox(box, i);
922  }.bind(this));
923
924};
925
926WOW.prototype._animateBox = function (box, i) {
927
928  if (this._isInView(box)) {
929    delete this._boxes[i];
930    this._appear(box, i);
931  }
932
933};
934
935WOW.prototype._showNotInView = function () {
936
937  this._eachBox(function (box, i) {
938    this._makeVisible(box, i);
939  }.bind(this));
940
941};
942
943WOW.prototype._makeVisible = function (box, i) {
944
945  if (!this._isInView(box)) {
946    this._boxes[i].style.visibility = 'visible';
947  }
948
949};
950
951WOW.prototype._isInView = function (box) {
952
953  var offset = box.getAttribute('data-wow-offset') || this._offset;
954  var boxTopOffset = this._getElementOffset(box);
955
956  var triggerOffset = boxTopOffset + ~~offset;
957
958  var bottomPosition = window.innerHeight + this._scrollY();
959
960  return triggerOffset <= bottomPosition && (triggerOffset === 0 ? 10 : triggerOffset) >= this._scrollY();
961
962};
963
964WOW.prototype._getElementOffset = function (box) {
965
966  var clientRect = box.getBoundingClientRect();
967
968  var body = document.body;
969
970  var scrollTop = this._scrollY();
971  var clientTop = document.documentElement.clientTop || body.clientTop || 0;
972
973  var top  = clientRect.top +  scrollTop - clientTop;
974
975  return Math.round(top);
976
977};
978
979WOW.prototype._checkForChanges = function () {
980
981  var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
982
983  var observer = new MutationObserver(this._mutations.bind(this));
984
985  var config = {
986    childList: true,
987    subtree: true
988  };
989  window.onload = function() {
990    observer.observe(document.body, config);
991  }
992};
993
994WOW.prototype._mutations = function (mutations) {
995  
996  mutations.forEach(function (mutation) {
997
998    for (var i = 0; i < mutation.addedNodes.length; i++) {
999      this.doSync(mutation.addedNodes[i]);
1000    }
1001
1002  }.bind(this));
1003
1004};
1005
1006WOW.prototype.doSync = function (node) {
1007  if (typeof node.className == "string") {
1008    var classes = node.className.split(' ');
1009    if (classes.indexOf(this._boxClass) !== -1) {
1010      this._prepareBox(node);
1011    }
1012  }
1013};
1014
1015window.addEventListener("DOMContentLoaded", function(e) {
1016  new WOW().init();
1017});
1018$(document).on('lazybeforeunveil', function(e){
1019    var ajax = $(e.target).data('ajax');
1020    if(ajax){
1021        $(e.target).load(ajax);
1022    }
1023});
1024try {
1025    window.SF = SF || {};
1026} catch (error) {
1027    window.SF = {};    
1028}
1029/*============================= */
1030
1031SF.Methods = function() {
1032
1033    /**
1034     * extend() - 
1035     * @param {*} defaults 
1036     * @param {*} options 
1037     */
1038    this.extend = function(defaults, options) {
1039        for(var key in options)
1040            if(options.hasOwnProperty(key))
1041                if(Object.prototype.toString.call(options[key]) == '[object Object]')
1042                    this.extend(defaults[key], options[key]);
1043                else defaults[key] = options[key];
1044        return defaults;
1045    }
1046
1047    /**
1048     * Поиск наивысшего z-index в документе
1049     */
1050    this.topZIndex = function() {
1051        var e = document.querySelectorAll('*'),
1052            z = 1,
1053            style = '';
1054        for(var k = 0; k < e.length; k++) {
1055            style = getComputedStyle(e[k]);
1056            if(parseInt(style.zIndex) > z)
1057                z = parseInt(style.zIndex);
1058        }
1059        return z;
1060    }
1061
1062    this.topZIndexElement = function(el) {
1063        var z = 1,
1064            e = false,
1065            style = '';
1066        for(var k = 0; k < el.length; k++) {
1067            style = getComputedStyle(el[k]);
1068            if(parseInt(style.zIndex) > z) {
1069                z = parseInt(style.zIndex);
1070                e = el[k];
1071            }
1072        }
1073        return e;
1074    }
1075
1076    /**
1077     * 
1078     */
1079    this.includeScript = function(path) {
1080        var s = document.createElement('script');
1081        s.src = path;
1082        document.querySelector('head').appendChild(s);
1083    }
1084    
1085    this.addcss = function(path) {
1086        var l = document.createElement('link');
1087        l.rel = 'stylesheet';
1088        l.href = path;
1089        document.querySelector('head').appendChild(l);
1090        return l;
1091    }
1092
1093    /**
1094     * 
1095     */
1096    this.cookies = {
1097        /**
1098         * get() - получить куки
1099         */
1100        get: function(name) {
1101            if(document.cookie.length > 0) {
1102                var start = document.cookie.indexOf(name + '=');
1103                if(start != -1) {
1104                    start = start + name.length + 1;
1105                    var end = document.cookie.indexOf(';', start);
1106                    if(end == -1) end = document.cookie.length;
1107                    return encodeURI(document.cookie.substring(start, end));
1108                }
1109            }
1110            return '';
1111        },
1112        /**
1113         * set() - установить куки
1114         */
1115        set: function(name, value, expiredays) {
1116            var exdate = new Date();
1117            exdate.setDate(exdate.getDate() + expiredays);
1118            document.cookie = name + '=' + decodeURI(value) +
1119                ((expiredays == null) ? '' : '; expires=' + exdate.toUTCString()) + '; path=/';
1120        },
1121        /**
1122         * check() - Проверка установлен ли параметр куки
1123         */
1124        check: function(name) {
1125            name = this.cookie.get(name);
1126            if(name != null && name != '') return true;
1127            else return false;
1128        }
1129    }
1130
1131
1132    this.bytelength = function(str) {
1133        var count = 0,
1134            ch = 0;
1135        for(var k = 0; k < str.length; k++) {
1136            ch = str.charCodeAt(k);
1137            if(ch <= 127) count++;
1138            else if(ch <= 2047) count += 2;
1139            else if(ch <= 65535) count += 3;
1140            else if(ch <= 2097151) count += 4;
1141            else if(ch <= 67108863) count += 5;
1142            else count += 6;
1143        }
1144        return count;
1145    }
1146
1147    this.bytelengthlimit = function(str, limit) {
1148        var count = 0,
1149            ch = 0,
1150            strlimit = '',
1151            flaglimit = false,
1152            result = [];
1153        for(var k = 0; k < str.length; k++) {
1154            ch = str.charCodeAt(k);
1155            if(count <= limit) {
1156                flaglimit = true;
1157            }
1158            strlimit += str[k];
1159            if(ch <= 127) count++;
1160            else if(ch <= 2047) count += 2;
1161            else if(ch <= 65535) count += 3;
1162            else if(ch <= 2097151) count += 4;
1163            else if(ch <= 67108863) count += 5;
1164            else count += 6;
1165
1166            if((count > limit && flaglimit) || (flaglimit && k == str.length - 1)) {
1167                //console.log(strlimit)
1168                result.push(strlimit);
1169                strlimit = '';
1170                count = 0;
1171                flaglimit = false;
1172            }
1173        }
1174        //console.log(result.length)
1175        if(result.length > 0) {
1176            //result.push(strlimit);
1177            return result;
1178        } else {
1179            result.push(strlimit);
1180            return result;
1181        }
1182    }
1183}
1184SF.send = function(event, element) {
1185    if(document.createEvent){
1186        var e = document.createEvent('Events');
1187        e.initEvent(event, true, false);
1188    }
1189    else if(document.createEventObject()) {
1190        var e = document.createEventObject();
1191    }
1192    else return;
1193
1194    if(element.dispatchEvent)
1195        element.dispatchEvent(e);
1196    else if(element.fireEvent) element.fireEvent(event, e);
1197}
1198
1199SF.receive = function(event, el, handler) {
1200    if(window.addEventListener)
1201        el.addEventListener(event, handler, false);
1202    else if(window.attachEvent)
1203        el.attachEvent(event, handler);
1204}
1205
1206/*============================= */
1207SF.Events = function() {
1208
1209    /**
1210     * Метод send() - Отправляет событие
1211     * @param {*} event 
1212     */
1213    this.send = function(event, element) {
1214        if(document.createEvent){
1215            var e = document.createEvent('Events');
1216            e.initEvent(event, true, false);
1217        }
1218        else if(document.createEventObject()) {
1219            var e = document.createEventObject();
1220        }
1221        else return;
1222    
1223        if(element.dispatchEvent)
1224            element.dispatchEvent(e);
1225        else if(element.fireEvent) element.fireEvent(event, e);
1226    }
1227
1228    /**
1229     * Метод receive() - регистрирует обработчик события
1230     * @param {*} event 
1231     * @param {*} handler 
1232     */
1233    this.receive = function(event, el, handler) {
1234        if(window.addEventListener)
1235            el.addEventListener(event, handler, false);
1236        else if(window.attachEvent)
1237            el.attachEvent(event, handler);
1238    }
1239
1240    /**
1241     * hotkey() - функция обработки нажатия нескольких клавиш и выполнения фукций обработчика
1242     * @param {*} handler - функтция обработчик события нажатия клавиш
1243     * @param {*} далее может следовать любое количество кодов сочетания клавиш в
1244     * кавычках ("17")
1245     */
1246    this.hotkey = function(handler) {
1247        var codes = [].slice.call(arguments, 1),
1248            pressed = {}; 
1249        document.addEventListener('keydown', function(e) {
1250            e = e || window.event;
1251            pressed[e.keyCode] = true;
1252            for (var i = 0; i < codes.length; i++)
1253                if (!pressed[codes[i]]) return;
1254            pressed = {};
1255            handler();
1256        });
1257        document.addEventListener('keyup',function(e) {
1258            e = e || window.event;
1259            delete pressed[e.keyCode];
1260        });
1261    }
1262
1263    /**
1264     * quickkey() - функция обработки нажатия клавиши и выполнения функции обработчика
1265     * @param {*} handler - функция обработчик события нажатия клавиши 
1266     * @param {*} key - клавиша после нажатия которой срабатывает функция обрботчик
1267     */
1268    this.quickkey = function(handler, key) {
1269        addEventListener('keydown', function(e) {
1270            if(e.keyCode == key)
1271                handler(e);
1272        });
1273    }
1274
1275    SF.Methods.call(this);
1276}
1277
1278SF.Parameters = function() {
1279    /**
1280     * newparams - генерация новых параметров
1281     */
1282    this.newparams = function() {
1283        return this.params;
1284    }
1285    
1286    /**
1287     * Обновление существующих параметров
1288     * @param {*} el 
1289     */
1290    this.updateparams = function(el) {
1291        var par = el.params,
1292            mod = par.modifier,
1293            data = par.data;
1294        for(var key in mod) {
1295            mod[key] = el.hasAttribute(data[key]) ? mod[key] + ' ' + el.getAttribute(data[key]) : mod[key];
1296        }
1297    }
1298
1299// ================ CONSTRUCTOR ================ //
1300    this.params = {
1301        ajax: {
1302            events: {
1303                init: 'ajaxinit',
1304                load: 'endcontentload',
1305            },
1306            method: 'GET',
1307            type: 'html',
1308            timeout: 0,
1309            async: true,
1310            emulateOnload: true,
1311            cache: true
1312        },
1313        controller: {
1314
1315        },
1316        search: {
1317    
1318        },
1319        provider: {
1320            
1321        },
1322        blocks: {
1323            special: {
1324                cookies: {
1325                    specialfont: 'default',
1326                    specialstate: 'off',
1327                    specialcolor: 'specialwhite',
1328                    specialkegl: '16',
1329                    specialinterval: '1.0',
1330                    specialkerning: 'normal',
1331                    specialimage: 'off',
1332                    specialup: 'down',
1333                    specialsound: 'off',
1334                },
1335                events: {
1336                    init: 'specialinit',
1337                    create: 'specialcreate',
1338                    open: 'specialopen',
1339                    close: 'specialoff',
1340                    up: 'specialup',
1341                    soundon: 'specialsoundon',
1342                    soundoff: 'specialsoundoff',
1343                    defaultsetting: 'specialdefaultsetting',
1344                // События панели Special
1345                    fontsans: 'specialfontsans',
1346                    fontserif: 'specialfontserif',
1347                    fontmono: 'specialfontmono',
1348                    keglmore: 'specialkeglmore',
1349                    keglless: 'specialkeglless',
1350                    intervalone: 'specialintervalone',
1351                    intervalhalf: 'specialintervalhalf',
1352                    intervaltwo: 'specialintervaltwo',
1353                    imageoff: 'specialimageoff',
1354                    imageblack: 'specialimageblack',
1355                    imagecolor: 'specialimagecolor',
1356                    imagecolor: 'specialimagecolor',
1357                    colorwhite: 'specialcolorwhite',
1358                    colorblack: 'specialcolorblack',
1359                    coloryellow: 'specialcoloryellow',
1360                    colorblue: 'specialcolorblue',
1361                    colorgreen: 'specialcolorgreen',
1362                    kerningnormal: 'specialkerningnormal',
1363                    kerningmiddle: 'specialkerningmiddle',
1364                    kerningbig: 'specialkerningbig',
1365                },
1366                data: {
1367                    init: 'sf-special',
1368                    panel: 'sf-special-panel',
1369                    kegl: 'sf-special-kegl',
1370                    interval: 'sf-special-interval',
1371                    color: 'sf-special-color',
1372                    img: 'sf-special-img',
1373                    on: 'sf-special-on',
1374                },
1375                attributes: {
1376
1377                },
1378                modifier: {
1379                    panel: 'special-panel d-flex align-items-start justify-content-center flex-wrap flex-row w-100 bb-1',
1380                    font: 'd-flex align-items-center justify-content-center flex-column p-3',
1381                    kegl: 'd-flex align-items-center justify-content-center flex-column p-3',
1382                    interval: "d-flex align-items-center justify-content-center flex-column p-3",
1383                    kerning: 'd-flex align-items-center justify-content-center flex-column p-3',
1384                    color: "d-flex align-items-center justify-content-center flex-column p-3",
1385                    img: "d-flex align-items-center justify-content-center flex-column p-3",
1386                    onoff: "d-flex align-items-center justify-content-center flex-column p-3",
1387                    sound: "d-flex align-items-center justify-content-center flex-column p-3",                    
1388                    black: 'sf-special-black',
1389                    white: 'sf-special-white',
1390                    yellow: 'sf-special-yellow',
1391                    blue: 'sf-special-blue',
1392                    green: 'sf-special-green',
1393                    // Путь до стилей
1394                    specialwhite: '/simai/asset/simai.framework/sf4.master/plugin/special/css/white.min.css',
1395                    specialblack: '/simai/asset/simai.framework/sf4.master/plugin/special/css/black.min.css',
1396                    specialyellow: '/simai/asset/simai.framework/sf4.master/plugin/special/css/yellow.min.css',
1397                    specialblue: '/simai/asset/simai.framework/sf4.master/plugin/special/css/blue.min.css',
1398                    specialgreen: '/simai/asset/simai.framework/sf4.master/plugin/special/css/green.min.css',
1399                    specialsoundscript: 'https://webasr.yandex.net/jsapi/v1/webspeechkit.js',
1400                },
1401            },
1402            modal: {
1403                load: '<div class="sf-progress"><div class="sf-progress-animation"></div></div>',
1404                events: {
1405                    init: 'modalinit',
1406                    create: "modalcreate",
1407                    open: 'modalopen',
1408                    close: 'modalclose',
1409                },
1410                data: {
1411                    init: 'sf-modal',
1412                    src: 'sf-src',
1413                    modal: 'sf-modal-modifier',
1414                    content: 'sf-content-modifier',
1415                    close: "sf-close-modifier",
1416                    overlay: 'sf-overlay-modifier',
1417                    blur: 'sf-blur',
1418                    iframe: 'sf-iframe',
1419                },
1420                attributes: {
1421                    overlay: 'sf-modal-overlay',
1422                    load: 'sf-modal-loadanimation',
1423                    modal: 'sf-modal-area',
1424                    content: 'sf-modal-content',
1425                    close: 'sf-modal-close',
1426                    number: 'sf-modal-number'
1427                },
1428                modifier: {
1429                    src: '',
1430                    service: 'sf-service-bottom-area',
1431                    container: 'sf-modal-container',
1432                    overlay: 'sf-modal-overlay',
1433                    load: 'sf-modal-load',
1434                    modal: 'sf-modal-area',
1435                    content: 'sf-modal-content sf-scroll',
1436                    close: 'sf-close',
1437                    blur: 'blur',
1438                    page: 'sf-pagewrap-area',
1439                },
1440            },
1441            ajaxload: {
1442                load: '<div class="sf-progress"><div class="sf-progress-animation"></div></div>',
1443                events: {
1444                    init: 'ajaxloadinit',
1445                    cancel: 'ajaxloadcanceltrack',
1446                    create: 'ajaxloadcreate',
1447                },
1448                data: {
1449                    init: 'sf-ajaxload',
1450                    src: 'sf-src',
1451                    cancel: 'sf-canceltrack',
1452                    loaded: 'sf-ajaxloaded',
1453                },
1454                attributes: {
1455
1456                },
1457                modifier: {
1458                    src: '',
1459                },
1460            }
1461        },
1462    }
1463// ================ END CONSTRUCTOR ================ //
1464}
1465SF.Controller = function() {
1466    // Constructor
1467
1468        this.stack = stack;
1469        var _this = this;
1470
1471        // Подключение модулей
1472        SF.Events.call(this);
1473        SF.Search.call(this);
1474        SF.Blocks.call(this);
1475        SF.Provider.call(this);
1476        //SF.Property.call(this);
1477
1478        if(this.el) {
1479            this.send('blocksstart', this.el);
1480        } else {
1481            
1482            if(this.stack.ev('specialinit')) {
1483
1484                this.receive('specialinit', window, function(e) {
1485                    new SF.Special(e.target, e.target.params);
1486                });
1487                this.stack.events.push('specialinit');
1488            }
1489
1490            if(this.stack.ev('searchend')) {
1491                this.receive('searchend', window, function(e) {
1492                    _this.send('blocksstart', e.target);
1493                });
1494                this.send('searchstart', window);
1495                this.stack.events.push('searchend');
1496
1497            }
1498        }
1499
1500    // end Constructor    
1501}
1502/**
1503 * Search модуль поиска инициализаций т.е. поиска элементов вызывающих определенные блоки/компоненты    
1504 */
1505SF.Search = function() {
1506    /**
1507     * Search uninitialized Modal Window
1508     * Поиск неинициализированных модальных окон
1509     */
1510    this.search = function() {
1511        var el = document.body.querySelectorAll('*');   // Поиск всех элементов в DOM-дереве
1512        for(var j = 0; j < el.length; j++) {    // Обход найденых элементов
1513            var par = new SF.Parameters();
1514            var params = par.newparams();         // Новые параметры
1515            for(var key in params.blocks) {    // Проверка
1516                var init = el[j],
1517                    block = params.blocks[key];
1518                if(init.hasAttribute(block.data.init)) {    // Проверяем есть ли у элемента инициализация блока
1519                    var i = 0;
1520                    for(var k = 0; k < this.stack.el.length; k++)   // Проверяем был ли инициализированн текущий элемен ранее
1521                        if(this.stack.el[k] == init) i++;
1522                    if(i == 0) {
1523                        init.blocks = key;          // Записываем наименование блока
1524                        init.params = block;  // Присваиваем инициализатору список стандратных параметров
1525                        par.updateparams(init);
1526                        this.send('searchend', init); // Отправка сигнала (события) на элемент для дальнейшего построения
1527                    }
1528                }
1529            }
1530        }
1531    }
1532
1533    this.searchModal = function(element) {
1534        var el = element.querySelectorAll('[sf-modal]');   // Поиск всех элементов в DOM-дереве
1535        for(var j = 0; j < el.length; j++) {    // Обход найденых элементов
1536            var par = new SF.Parameters();
1537            var params = par.newparams();         // Новые параметры
1538            for(var key in params.blocks) {    // Проверка
1539                var init = el[j],
1540                    block = params.blocks[key];
1541                if(init.hasAttribute(block.data.init)) {    // Проверяем есть ли у элемента инициализация блока
1542                    var i = 0;
1543                    for(var k = 0; k < this.stack.el.length; k++)   // Проверяем был ли инициализированн текущий элемен ранее
1544                        if(this.stack.el[k] == init) i++;
1545                    if(i == 0) {
1546                        init.blocks = key;          // Записываем наименование блока
1547                        init.params = block;  // Присваиваем инициализатору список стандратных параметров
1548                        par.updateparams(init);
1549                        this.send('searchend', init); // Отправка сигнала (события) на элемент для дальнейшего построения
1550                    }
1551                }
1552            }
1553        }
1554    }
1555
1556
1557    this.searchdata = function(content) {
1558        var el = content.querySelectorAll('*');   // Поиск всех элементов в DOM-дереве
1559        for(var j = 0; j < el.length; j++) {    // Обход найденых элементов
1560            var par = new SF.Parameters();
1561            var params = par.newparams();         // Новые параметры
1562            for(var key in params.blocks) {    // Проверка
1563                var init = el[j],
1564                    block = params.blocks[key];
1565                if(init.hasAttribute(block.data.init)) {    // Проверяем есть ли у элемента инициализация блока
1566                    var i = 0;
1567                    for(var k = 0; k < this.stack.el.length; k++)   // Проверяем был ли инициализированн текущий элемен ранее
1568                        if(this.stack.el[k] == init) i++;
1569                    if(i == 0) {
1570                        init.blocks = key;          // Записываем наименование блока
1571                        init.params = block;  // Присваиваем инициализатору список стандратных параметров
1572                        par.updateparams(init);
1573                        this.send('searchend', init); // Отправка сигнала (события) на элемент для дальнейшего построения
1574                    }
1575                }
1576            }
1577        }
1578    }
1579
1580    // ================ CONSTRUCTOR ================ //
1581        var _this = this;
1582        if(this.stack.ev('searchstart')) {
1583            this.receive('searchstart', window, function(e) { 
1584                _this.search();
1585            });
1586            this.receive('searchstartmodal', window, function(e) { 
1587                _this.searchModal(document);
1588            });
1589            this.stack.events.push('searchstart');
1590        }
1591    // ================ END CONSTRUCTOR ================ //    
1592}
1593/**
1594 * Blocks - модуль распределения обязанностей
1595 */
1596SF.Blocks = function() {
1597    var _this = this;
1598
1599    if(this.stack.ev('providerend')) {
1600        this.receive('providerend', window, function(e) {
1601            _this.send(e.target.event, e.target);
1602        });
1603        this.stack.events.push('providerend');
1604    }
1605
1606    if(this.stack.ev('blocksstart')) {
1607        this.receive('blocksstart', window, function(e) {
1608            _this.send('providerstart', e.target);
1609        });
1610        this.stack.events.push('blocksstart')
1611    }
1612
1613    
1614}
1615/**
1616 * ProviderDom - модуль создания блоков, другими словами поставщик блоков/компонентов
1617 */
1618SF.Provider = function() {
1619
1620    this.special = function(e) {
1621
1622        function selectcolor() {
1623            switch(_this.cookies.get('specialcolor')) {
1624                case 'specialwhite':
1625                    return BX.message("SF_SPECIAL__SPECIAL_WHITE");
1626                case 'specialblack': 
1627                    return BX.message("SF_SPECIAL__SPECIAL_BLACK");
1628                case 'specialyellow':
1629                    return BX.message("SF_SPECIAL__SPECIAL_YELLOW");
1630                case 'specialblue':
1631                    return BX.message("SF_SPECIAL__SPECIAL_BLUE");
1632                case 'specialgreen':
1633                    return BX.message("SF_SPECIAL__SPECIAL_GREEN");
1634            }
1635            return BX.message("SF_SPECIAL__SPECIAL_WHITE");
1636        }
1637
1638        function selectkegl() {
1639            var v = _this.cookies.get('specialkegl');
1640            if(v != '') return v + BX.message("SF_SPECIAL__SPECIAL_KEGL");
1641            else return BX.message("SF_SPECIAL__KEGL_16");
1642        }
1643
1644        function selectkerning() {
1645            switch(_this.cookies.get('specialkerning')) {
1646                case 'normal':
1647                    return BX.message("SF_SPECIAL__KERNING_NORMAL");
1648                case 'middle':
1649                    return BX.message("SF_SPECIAL__KERNING_MIDDLE");
1650                case 'big':
1651                    return BX.message("SF_SPECIAL__KERNING_BIG");
1652            }
1653            return BX.message("SF_SPECIAL__KERNING_NORMAL");
1654        }
1655
1656        function selectimg() {
1657            switch(_this.cookies.get('specialimage')) {
1658                case 'off':
1659                    return BX.message("SF_SPECIAL__IMG_OFF");
1660                case 'onblack':
1661                    return BX.message("SF_SPECIAL__IMG_ON_BLACK");
1662                case 'oncolor':
1663                    return BX.message("SF_SPECIAL__IMG_ON_COLOR");
1664            }
1665            return BX.message("SF_SPECIAL__IMG_ON_COLOR");
1666        }
1667
1668        function changeStateAlt(state)
1669        {
1670            
1671          if(state == 'off')
1672          {
1673            document.querySelectorAll('.sf-special-hidden').forEach((elem) => {
1674              elem.classList.remove('sf-special-hidden'); 
1675              elem.classList.add('sf-special-show')
1676            });
1677          } else if(state == 'onblack' || state == 'oncolor') {
1678            document.querySelectorAll('.sf-special-show').forEach((elem) => {
1679              elem.classList.add('sf-special-hidden'); 
1680              elem.classList.remove('sf-special-show');
1681            });
1682          }
1683        } 
1684        
1685        function selectinterval() {
1686            switch(_this.cookies.get('specialinterval')) {
1687                case '1.0':
1688                    return BX.message("SF_SPECIAL__INTERVAL_1_0");
1689                case '1.5':
1690                    return BX.message("SF_SPECIAL__INTERVAL_1_5");
1691                case '2.0':
1692                    return BX.message("SF_SPECIAL__INTERVAL_2_0");
1693            }
1694            return BX.message("SF_SPECIAL__INTERVAL_1_0");
1695        }
1696
1697        function addbtn(btn, param) {
1698            btn.className = param.class;
1699            btn.style.backgroundColor = param.background;
1700            btn.style.borderColor = 'black';
1701            btn.style.color = param.border;
1702            btn.style.fontSize = param.font;
1703            btn.innerHTML = param.text;
1704            btn.title = param.title;
1705        }
1706
1707        function selectfont() {
1708            //console.log(_this.cookies.get('specialfont'));
1709            switch(_this.cookies.get('specialfont')) {
1710                case 'default':
1711                    return BX.message("SF_SPECIAL__FONT_DEFAULT");
1712                case 'sans':
1713                    return BX.message("SF_SPECIAL__FONT_SANS");
1714                case 'serif':
1715                    return BX.message("SF_SPECIAL__FONT_SERIF");
1716                case 'mono':
1717                    return BX.message("SF_SPECIAL__FONT_MONO");
1718            }
1719            return BX.message("SF_SPECIAL__FONT_DEFAULT");
1720        }
1721
1722        function selectsound() {
1723            switch(_this.cookies.get('specialsound')) {
1724                case 'on':
1725                    return BX.message("SF_SPECIAL__SOUND_ON");
1726                case 'off':
1727                    return BX.message("SF_SPECIAL__SOUND_OFF");
1728                default:
1729                    return BX.message("SF_SPECIAL__SOUND_OFF");
1730            }
1731        }
1732
1733        var _this = this,
1734            par = e.target.params,
1735            el = e.target;
1736
1737        var panel = {
1738            font: {
1739                name: {},
1740                content: {
1741                    btnsans: {},    // Arial
1742                    btnserif: {},   // Times New Roman
1743                    btnmono: {},    // Courier New
1744                },
1745                status: {},
1746            },
1747            kegl: {
1748                name: {},
1749                content: {
1750                    btnmore: {},
1751                    btnless: {},
1752                },
1753                status: {},
1754            },
1755            interval: {
1756                name: {},
1757                content: {
1758                    btnone: {},
1759                    btnhalf: {},
1760                    btntwo: {},
1761                },
1762                status: {},
1763            },
1764            kerning: {
1765                name: {},
1766                content: {
1767                    btnnormal: {},
1768                    btnmiddle: {},
1769                    btnbig: {},
1770                },
1771                status: {},
1772            },
1773            color: {
1774                name: {},
1775                content: {
1776                    btnwhite: {},
1777                    btnblack: {},
1778                    btnyellow: {},
1779                    btnblue: {},
1780                    btngreen: {},
1781                },
1782                status: {},
1783            },
1784            img: {
1785                name: {},
1786                content: {
1787                    btnoff: {},
1788                    btnbw: {},
1789                    btncolor: {},
1790                },
1791                status: {},
1792            },
1793            sound: {
1794                name: {},
1795                content: {
1796                    btnon:{},
1797                    btnoff: {},
1798                },
1799                status: {},
1800                play: {},
1801            },
1802            onoff: {
1803                name: {},
1804                content: {
1805                    btnup: {},
1806                    btndefault: {},
1807                    btnonoff: {},
1808                },
1809                status: {},
1810            },
1811        };
1812
1813        panel = document.createElement('nav');
1814
1815        panel.className = par.modifier.panel;
1816        panel.setAttribute('sf-special-panel', '');
1817        panel.style.backgroundColor = "#FFFFFF";
1818        panel.style.position = 'relative';
1819        panel.style.transition = 'margin-top 1s ease';
1820
1821        panel.font = document.createElement('div');
1822        panel.font.className = par.modifier.font;
1823
1824        panel.font.name = document.createElement('div');
1825        panel.font.content = document.createElement('div');
1826        panel.font.status = document.createElement('div');
1827
1828        panel.font.name.classList.add('font-text', 'mb-2');
1829        panel.font.name.style.color = 'rgba(0,0,0, 0.87)';
1830        panel.font.name.innerHTML = BX.message("SF_SPECIAL__FONT");
1831
1832        panel.font.appendChild(panel.font.name);
1833
1834        panel.font.content.classList.add('font-content', 'btn-group');
1835        panel.font.content.btnsans = document.createElement('button');
1836        panel.font.content.btnserif = document.createElement('button');
1837        panel.font.content.btnmono = document.createElement('button');
1838
1839        addbtn(
1840            panel.font.content.btnsans,
1841            {
1842                class: 'btn btn-outline px-3',
1843                background: 'white',
1844                border: 'black',
1845                font: '14px',
1846                text: 'Arial',
1847                title: BX.message("SF_SPECIAL__BTN_SANS_ARIAL"),
1848            }
1849        );
1850
1851        panel.font.content.btnsans.addEventListener('click', function(e) {
1852            _this.send(par.events.fontsans, panel.font.content.btnsans);
1853            panel.font.status.innerHTML = BX.message("SF_SPECIAL__BTN_SANS");
1854        });
1855
1856        addbtn(
1857            panel.font.content.btnserif,
1858            {
1859                class: 'btn btn-outline px-3',
1860                background: 'white',
1861                border: 'black',
1862                font: '14px',
1863                text: 'Times',
1864                title: BX.message("SF_SPECIAL__BTN_SERIF_TIMES"),
1865            }
1866        );
1867
1868        panel.font.content.btnserif.addEventListener('click', function(e) {
1869            _this.send(par.events.fontserif, panel.font.content.btnserif);
1870            panel.font.status.innerHTML = BX.message("SF_SPECIAL__BTN_SERIF");
1871        });
1872
1873        addbtn(
1874            panel.font.content.btnmono,
1875            {
1876                class: 'btn btn-outline px-3',
1877                background: 'white',
1878                border: 'black',
1879                font: '14px',
1880                text: 'Courier',
1881                title: BX.message("SF_SPECIAL__BTN_MONO_COURIER"),
1882            }
1883        );
1884
1885        panel.font.content.btnmono.addEventListener('click', function(e) {
1886            _this.send(par.events.fontmono, panel.font.content.btnmono);
1887            panel.font.status.innerHTML = BX.message("SF_SPECIAL__BTN_MONO");
1888        });
1889
1890
1891        panel.font.status.classList.add('status-text', 'mt-2');
1892        panel.font.status.style.color = 'rgba(0,0,0, 0.87)';
1893        panel.font.status.innerHTML = selectfont();
1894
1895        panel.font.content.appendChild(panel.font.content.btnsans);
1896        panel.font.content.appendChild(panel.font.content.btnserif);
1897        panel.font.content.appendChild(panel.font.content.btnmono);
1898
1899        panel.font.appendChild(panel.font.content);
1900        panel.font.appendChild(panel.font.status);
1901        panel.appendChild(panel.font);
1902
1903        // #endregion Font
1904
1905        panel.kegl = document.createElement('div');
1906        panel.kegl.className = par.modifier.kegl;
1907
1908        panel.kegl.name = document.createElement('div');
1909        panel.kegl.content = document.createElement('div');
1910        panel.kegl.status = document.createElement('div');
1911
1912        panel.kegl.name.classList.add('kegl-text', 'mb-2');
1913        panel.kegl.name.style.color = 'rgba(0,0,0,0.87)';
1914        panel.kegl.name.innerHTML = BX.message("SF_SPECIAL__KEGL");
1915
1916        panel.kegl.appendChild(panel.kegl.name);
1917
1918        panel.kegl.content.classList.add('kegl-content', 'btn-group');
1919
1920        panel.kegl.content.btnmore = document.createElement('button');
1921        panel.kegl.content.btnless = document.createElement('button');
1922
1923        addbtn(
1924            panel.kegl.content.btnmore,
1925            {
1926                class: 'btn btn-outline px-3',
1927                background: 'white',
1928                border: 'black',
1929                font: '14px',
1930                text: 'A-',
1931                title: BX.message("SF_SPECIAL__BTN_MORE"),
1932            }
1933        );
1934        panel.kegl.content.btnmore.addEventListener('click', function(e) {
1935            _this.send(par.events.keglmore, panel.kegl.content.btnmore);
1936            panel.kegl.status.innerHTML = selectkegl();            
1937        });
1938        addbtn(
1939            panel.kegl.content.btnless,
1940            {
1941                class: 'btn btn-outline px-3',
1942                background: 'white',
1943                border: 'black',
1944                font: '14px',
1945                text: 'A+',
1946                title: BX.message("SF_SPECIAL__BTN_LESS"),
1947            }
1948        );
1949        panel.kegl.content.btnless.addEventListener('click', function(e) {
1950            _this.send(par.events.keglless, panel.kegl.content.btnless);
1951            panel.kegl.status.innerHTML = selectkegl();
1952        });
1953
1954        panel.kegl.status.classList.add('status-text', 'mt-2');
1955        panel.kegl.status.style.color = 'rgba(0,0,0, 0.87)';
1956        panel.kegl.status.innerHTML = selectkegl();
1957
1958
1959        panel.kegl.content.appendChild(panel.kegl.content.btnmore);
1960        panel.kegl.content.appendChild(panel.kegl.content.btnless)
1961        panel.kegl.appendChild(panel.kegl.content);
1962        panel.kegl.appendChild(panel.kegl.status);
1963        panel.appendChild(panel.kegl);
1964
1965        // #region Kerning ===========================
1966            panel.kerning = document.createElement('div');
1967            panel.kerning.className = par.modifier.kerning;
1968            panel.kerning.name = document.createElement('div');
1969            panel.kerning.content = document.createElement('div');
1970            panel.kerning.status = document.createElement('div');
1971
1972            panel.kerning.name.classList.add('name-text', 'mb-2');
1973            panel.kerning.name.style.color = 'rgba(0,0,0,0.87)';
1974            panel.kerning.name.innerHTML = BX.message("SF_SPECIAL__KERNING");
1975            
1976            panel.kerning.appendChild(panel.kerning.name);
1977
1978            panel.kerning.content.classList.add('kerning-content', 'btn-group');
1979
1980            panel.kerning.status.classList.add('status-text', 'mt-2');
1981            panel.kerning.status.style.color = 'rgba(0,0,0,0.87)';
1982            panel.kerning.status.innerHTML = selectkerning();
1983
1984            panel.kerning.content.btnnormal = document.createElement('button');
1985            panel.kerning.content.btnmiddle = document.createElement('button');
1986            panel.kerning.content.btnbig = document.createElement('button');
1987
1988            addbtn(
1989                panel.kerning.content.btnnormal,
1990                {
1991                    class: 'btn btn-outline px-3',
1992                    background: 'white',
1993                    border: 'black',
1994                    font: '14px',
1995                    text: '1.0',
1996                    title: BX.message("SF_SPECIAL__BTN_NORMAL")
1997                }
1998            );
1999    
2000            panel.kerning.content.btnnormal.addEventListener('click', function(e) {
2001                _this.send(par.events.kerningnormal, panel.kerning.content.btnnormal);
2002                panel.kerning.status.innerHTML = selectkerning();            
2003            });
2004
2005            addbtn(
2006                panel.kerning.content.btnmiddle,
2007                {
2008                    class: 'btn btn-outline px-3',
2009                    background: 'white',
2010                    border: 'black',
2011                    font: '14px',
2012                    text: '1.5',
2013                    title: BX.message("SF_SPECIAL__BTN_MIDDLE"),
2014                }
2015            );
2016    
2017            panel.kerning.content.btnmiddle.addEventListener('click', function(e) {
2018                _this.send(par.events.kerningmiddle, panel.kerning.content.btnmiddle);
2019                panel.kerning.status.innerHTML = selectkerning();            
2020            });
2021
2022            addbtn(
2023                panel.kerning.content.btnbig,
2024                {
2025                    class: 'btn btn-outline px-3',
2026                    background: 'white',
2027                    border: 'black',
2028                    font: '14px',
2029                    text: '2.0',
2030                    title: BX.message("SF_SPECIAL__BTN_BIG")
2031                }
2032            );
2033    
2034            panel.kerning.content.btnbig.addEventListener('click', function(e) {
2035                _this.send(par.events.kerningbig, panel.kerning.content.btnbig);
2036                panel.kerning.status.innerHTML = selectkerning();            
2037            });
2038
2039            panel.kerning.content.appendChild(panel.kerning.content.btnnormal);
2040            panel.kerning.content.appendChild(panel.kerning.content.btnmiddle);
2041            panel.kerning.content.appendChild(panel.kerning.content.btnbig);
2042            panel.kerning.appendChild(panel.kerning.content);
2043            panel.kerning.appendChild(panel.kerning.status);
2044            panel.appendChild(panel.kerning);
2045        // #endregion ===========================
2046        
2047        panel.interval = document.createElement('div');
2048        panel.interval.className = par.modifier.interval;
2049        panel.interval.name = document.createElement('div');
2050        panel.interval.name.classList.add('kegl-text', 'mb-2');
2051        panel.interval.name.style.color = 'rgba(0,0,0,0.87)';
2052        panel.interval.name.innerHTML = BX.message("SF_SPECIAL__INTERVAL");;
2053
2054        panel.interval.appendChild(panel.interval.name);
2055
2056        panel.interval.content = document.createElement('div');
2057        panel.interval.status = document.createElement('div');
2058        panel.interval.content.classList.add('interval-content', 'btn-group');
2059        
2060        panel.interval.content.btnone = document.createElement('button');
2061        panel.interval.content.btnhalf = document.createElement('button');
2062        panel.interval.content.btntwo = document.createElement('button');
2063
2064        addbtn(
2065            panel.interval.content.btnone,
2066            {
2067                class: 'btn btn-outline px-3',
2068                background: 'white',
2069                border: 'black',
2070                font: '14px',
2071                text: '1.0',
2072                title: BX.message("SF_SPECIAL__BTN_ONE"),
2073            }
2074        );
2075
2076        panel.interval.content.btnone.addEventListener('click', function(e) {
2077            _this.send(par.events.intervalone, panel.interval.content.btnone);
2078            panel.interval.status.innerHTML = selectinterval();            
2079        });
2080
2081        addbtn(
2082            panel.interval.content.btnhalf,
2083            {
2084                class: 'btn btn-outline px-3',
2085                background: 'white',
2086                border: 'black',
2087                font: '14px',
2088                text: '1.5',
2089                title: BX.message("SF_SPECIAL__BTN_HALF"),
2090            }
2091        );
2092
2093        panel.interval.content.btnhalf.addEventListener('click', function(e) {
2094            _this.send(par.events.intervalhalf, panel.interval.content.btnhalf);
2095            panel.interval.status.innerHTML = selectinterval();            
2096        });
2097
2098        addbtn(
2099            panel.interval.content.btntwo,
2100            {
2101                class: 'btn btn-outline px-3',
2102                background: 'white',
2103                border: 'black',
2104                font: '14px',
2105                text: '2.0',
2106                title: BX.message("SF_SPECIAL__BTN_TWO"),
2107            }
2108        );
2109
2110        panel.interval.content.btntwo.addEventListener('click', function(e) {
2111            _this.send(par.events.intervaltwo, panel.interval.content.btntwo);
2112            panel.interval.status.innerHTML = selectinterval();
2113        });
2114
2115        panel.interval.status.classList.add('status-text', 'mt-2');
2116        panel.interval.status.style.color = 'rgba(0,0,0, 0.87)';
2117        panel.interval.status.innerHTML = selectinterval(); 
2118
2119        panel.interval.content.appendChild(panel.interval.content.btnone);
2120        panel.interval.content.appendChild(panel.interval.content.btnhalf);
2121        panel.interval.content.appendChild(panel.interval.content.btntwo);
2122        panel.interval.appendChild(panel.interval.content);
2123        panel.interval.appendChild(panel.interval.status);
2124        panel.appendChild(panel.interval);
2125
2126        // =================================
2127        
2128        panel.color = document.createElement('div');
2129
2130        panel.color.className = par.modifier.color;
2131
2132        panel.color.name = document.createElement('div');
2133        panel.color.name.classList.add('color-text', 'mb-2');
2134        panel.color.name.style.color = 'rgba(0,0,0,0.87)';
2135        panel.color.name.innerHTML = BX.message("SF_SPECIAL__COLOR");
2136
2137        panel.color.appendChild(panel.color.name);
2138
2139        panel.color.content = document.createElement('div');
2140        panel.color.status = document.createElement('div');
2141
2142        panel.color.content.classList.add('color-content', 'btn-group');
2143
2144
2145        panel.color.status.classList.add('status-text', 'mt-2');
2146        panel.color.status.style.color = 'rgba(0,0,0, 0.87)';
2147
2148        panel.color.status.innerHTML = selectcolor() + BX.message("SF_SPECIAL__SCHEMA");
2149
2150        // #region Кнопки управления цветовой схемой
2151        
2152        panel.color.content.btnwhite = document.createElement('button');
2153        panel.color.content.btnblack = document.createElement('button');
2154        panel.color.content.btnyellow = document.createElement('button');
2155        panel.color.content.btnblue = document.createElement('button');
2156        panel.color.content.btngreen = document.createElement('button');
2157
2158        addbtn(
2159            panel.color.content.btnwhite,
2160            {
2161                class: 'btn btn-outline px-2',
2162                background: 'white',
2163                border: 'black',
2164                font: '14px',
2165                text: 'C',
2166                title: BX.message("SF_SPECIAL__BTN_WHITE"),
2167            }
2168        );
2169
2170        panel.color.content.btnwhite.addEventListener('click', function(e) {
2171            if(_this.cookies.get('specialcolor') != par.events.colorwhite) {
2172                _this.send(par.events.colorwhite, e.target);
2173                panel.color.status.innerHTML = selectcolor() + BX.message("SF_SPECIAL__SCHEMA");
2174            }
2175        });
2176
2177        addbtn(
2178            panel.color.content.btnblack,
2179            {
2180                class: 'btn btn-outline px-2',
2181                background: 'black',
2182                border: 'white',
2183                font: '14px',
2184                text: 'C',
2185                title: BX.message("SF_SPECIAL__BTN_BLACK"),
2186            }
2187        );
2188
2189        panel.color.content.btnblack.addEventListener('click', function(e) {
2190            if(_this.cookies.get('specialcolor') != par.events.colorblack) {
2191                _this.send(par.events.colorblack, e.target);
2192                panel.color.status.innerHTML = selectcolor() + BX.message("SF_SPECIAL__SCHEMA");
2193            }
2194        });
2195
2196        addbtn(
2197            panel.color.content.btnyellow,
2198            {
2199                class: 'btn btn-outline px-2',
2200                background: '#FF0',
2201                border: 'black',
2202                font: '14px',
2203                text: 'C',
2204                title: BX.message("SF_SPECIAL__BTN_YELLOW"),
2205            }
2206        );
2207
2208        panel.color.content.btnyellow.addEventListener('click', function(e) {
2209            if(_this.cookies.get('specialcolor') != par.events.coloryellow) {
2210                _this.send(par.events.coloryellow, e.target);
2211                panel.color.status.innerHTML = selectcolor() + BX.message("SF_SPECIAL__SCHEMA");                
2212            }
2213        });
2214
2215        addbtn(
2216            panel.color.content.btnblue,
2217            {
2218                class: 'btn btn-outline px-2',
2219                background: '#9fd7ff',
2220                border: 'black',
2221                font: '14px',
2222                text: 'C',
2223                title: BX.message("SF_SPECIAL__BTN_BLUE"),
2224            }
2225        );
2226        panel.color.content.btnblue.addEventListener('click', function(e) {
2227            if(_this.cookies.get('specialcolor') != par.events.colorblue) {
2228                _this.send(par.events.colorblue, e.target);
2229                panel.color.status.innerHTML = selectcolor() + BX.message("SF_SPECIAL__SCHEMA");
2230            }
2231        });
2232        addbtn(
2233            panel.color.content.btngreen,
2234            {
2235                class: 'btn btn-outline px-2',
2236                background: 'black',
2237                border: '#a9dd38',
2238                font: '14px',
2239                text: 'C',
2240                title: BX.message("SF_SPECIAL__BTN_GREEN"),
2241            }
2242        );
2243
2244        panel.color.content.btngreen.addEventListener('click', function(e) {
2245            if(_this.cookies.get('specialcolor') != par.events.colorgreen) {
2246                _this.send(par.events.colorgreen, e.target);
2247                panel.color.status.innerHTML = selectcolor() + BX.message("SF_SPECIAL__SCHEMA");
2248            }                
2249        });
2250
2251        panel.color.content.appendChild(panel.color.content.btnwhite);
2252        panel.color.content.appendChild(panel.color.content.btnblack);
2253        panel.color.content.appendChild(panel.color.content.btnyellow);
2254        panel.color.content.appendChild(panel.color.content.btnblue);
2255        panel.color.content.appendChild(panel.color.content.btngreen);
2256
2257        // #endregion
2258
2259
2260        panel.color.appendChild(panel.color.content);
2261        panel.color.appendChild(panel.color.status);
2262        panel.appendChild(panel.color);
2263
2264        // #region Image =================================
2265        panel.img = document.createElement('div');
2266
2267        panel.img.className = par.modifier.img;
2268
2269        panel.img.name = document.createElement('div');
2270        panel.img.name.classList.add('color-text', 'mb-2');
2271        panel.img.name.style.color = 'rgba(0,0,0,0.87)';
2272        panel.img.name.innerHTML = BX.message("SF_SPECIAL__IMG");
2273
2274        panel.img.appendChild(panel.img.name);
2275
2276        panel.img.content = document.createElement('div');
2277
2278        panel.img.status = document.createElement('div');
2279        panel.img.status.classList.add('status-text', 'mt-2');
2280        panel.img.status.style.color = 'rgba(0,0,0,0.87)';
2281
2282        panel.img.status.innerHTML = selectimg();
2283
2284
2285        panel.img.content.classList.add('img-content', 'btn-group');
2286        
2287        panel.img.content.btnoff = document.createElement('button');
2288        panel.img.content.btnbw = document.createElement('button');
2289        panel.img.content.btncolor = document.createElement('button');
2290
2291        addbtn(
2292            panel.img.content.btnoff,
2293            {
2294                class: 'btn btn-outline px-3',
2295                background: 'white',
2296                border: 'black',
2297                font: '14px',
2298                text: BX.message("SF_SPECIAL__BTN_OFF_TEXT"),
2299                title: BX.message("SF_SPECIAL__BTN_OFF"),
2300            }
2301        );
2302        panel.img.content.btnoff.addEventListener('click', function(e) {
2303            _this.send(par.events.imageoff, panel.img.content.btnoff);
2304            panel.img.status.innerHTML = selectimg();
2305            changeStateAlt('off');
2306        });
2307        addbtn(
2308            panel.img.content.btnbw,
2309            {
2310                class: 'btn btn-outline px-3',
2311                background: 'white',
2312                border: 'black',
2313                font: '14px',
2314                text: BX.message("SF_SPECIAL__BTN_BW_TEXT"),
2315                title: BX.message("SF_SPECIAL__IMG_BTN_BW"),
2316            }
2317        );
2318        panel.img.content.btnbw.addEventListener('click', function(e) {
2319            _this.send(par.events.imageblack, panel.img.content.btnbw);
2320            panel.img.status.innerHTML = selectimg();
2321            changeStateAlt('onblack');
2322        });
2323        addbtn(
2324            panel.img.content.btncolor,
2325            {
2326                class: 'btn btn-outline px-3',
2327                background: 'white',
2328                border: 'black',
2329                font: '14px',
2330                text: BX.message("SF_SPECIAL__IMG_BTN_COLOR_TEXT"),
2331                title: BX.message("SF_SPECIAL__IMG_BTN_COLOR"),
2332            }
2333        );
2334        panel.img.content.btncolor.addEventListener('click', function(e) {
2335            _this.send(par.events.imagecolor, panel.img.content.btncolor);
2336            panel.img.status.innerHTML = selectimg();
2337            changeStateAlt('oncolor');
2338        });
2339        panel.img.content.appendChild(panel.img.content.btnoff);
2340        panel.img.content.appendChild(panel.img.content.btnbw);
2341        panel.img.content.appendChild(panel.img.content.btncolor);
2342
2343
2344        panel.img.appendChild(panel.img.content);
2345        panel.img.appendChild(panel.img.status);
2346        panel.appendChild(panel.img);
2347
2348        // =================================
2349        
2350        /*
2351            sound: {
2352                name: {},
2353                content: {
2354                    btnon:{},
2355                    btnoff: {},
2356                },
2357                status: {},
2358            },
2359        */
2360        /*if(_this.getproperty('special_speech') == 'Y') {
2361            
2362            panel.sound = document.createElement('div');
2363            panel.sound.className = par.modifier.sound;
2364    
2365            // ========== name
2366            panel.sound.name = document.createElement('div');
2367            panel.sound.name.classList.add('sound-text', 'mb-2')
2368            panel.sound.name.style.color = 'rgba(0,0,0,0.87)';
2369            panel.sound.name.innerHTML = 'Звук';
2370    
2371            panel.sound.appendChild(panel.sound.name);
2372            // ===========
2373            panel.sound.content = document.createElement('div');
2374            panel.sound.content.classList.add('sound-content', 'btn-group');
2375            panel.sound.content.btnon = document.createElement('button');
2376            panel.sound.content.btnoff = document.createElement('button');
2377    
2378            addbtn(
2379                panel.sound.content.btnon,
2380                {
2381                    class: 'btn btn-outline px-3',
2382                    background: 'white',
2383                    border: 'black',
2384                    font: '14px',
2385                    text: 'Вкл',
2386                    title: "Включить озвучивание текста",
2387                }
2388            );
2389    
2390            panel.sound.content.btnon.addEventListener('click', function(e) {
2391                _this.send(par.events.soundon, panel);
2392                panel.sound.status.innerHTML = selectsound();            
2393            });
2394    
2395            addbtn(
2396                panel.sound.content.btnoff,
2397                {
2398                    class: 'btn btn-outline px-3',
2399                    background: 'white',
2400                    border: 'black',
2401                    font: '14px',
2402                    text: 'Выкл',
2403                    title: "Выключить озвучивание текста",
2404                }
2405            );
2406    
2407            panel.sound.content.btnoff.addEventListener('click', function(e) {
2408                _this.send(par.events.soundoff, panel);
2409                panel.sound.status.innerHTML = selectsound();
2410            });
2411    
2412            // ===========
2413            panel.sound.status = document.createElement('div');
2414            panel.sound.status.classList.add('status-text', 'mt-2');
2415            panel.sound.status.style.color = 'rgba(0,0,0,0.87)';
2416            panel.sound.status.innerHTML = selectsound();
2417            // ===========
2418    
2419            panel.sound.content.appendChild(panel.sound.content.btnon);
2420            panel.sound.content.appendChild(panel.sound.content.btnoff);
2421    
2422            panel.sound.appendChild(panel.sound.content);
2423            panel.sound.appendChild(panel.sound.status);
2424            panel.appendChild(panel.sound);
2425    
2426            this.includeScript(par.modifier.specialsoundscript);
2427        }*/
2428
2429
2430
2431        // =================================
2432
2433        panel.onoff = document.createElement('div');
2434
2435        panel.onoff.className = par.modifier.onoff;
2436
2437        panel.onoff.name = document.createElement('div');
2438        panel.onoff.name.classList.add('onoff-text', 'mb-2');
2439        panel.onoff.name.style.color = 'rgba(0,0,0,0.87)';
2440        panel.onoff.name.innerHTML = BX.message("SF_SPECIAL__PANEL");
2441
2442        panel.onoff.appendChild(panel.onoff.name);
2443
2444        panel.onoff.content = document.createElement('div');
2445        panel.onoff.content.classList.add('onoff-content', 'btn-group');
2446        
2447        panel.onoff.content.btnup = document.createElement('button');
2448        panel.onoff.content.btndefault = document.createElement('button');
2449        panel.onoff.content.btnonoff = document.createElement('button');
2450
2451
2452        addbtn(
2453            panel.onoff.content.btndefault,
2454            {
2455                class: 'btn btn-outline px-3',
2456                background: 'white',
2457                border: 'black',
2458                font: '14px',
2459                text: '<i class="fas fa-sync-alt" style="color:black!important"></i>',
2460                title: BX.message("SF_SPECIAL__BTN_DEFAULT"),
2461            }
2462        );
2463
2464        panel.onoff.content.btndefault.addEventListener('click', function(e) {
2465            _this.send(par.events.defaultsetting, panel);
2466        });
2467
2468        addbtn(
2469            panel.onoff.content.btnonoff,
2470            {
2471                class: 'btn btn-outline px-3',
2472                background: 'white',
2473                border: 'black',
2474                font: '14px',
2475                text: BX.message("SF_SPECIAL__BTN_OFF_TEXT"),
2476                title: BX.message("SF_SPECIAL__BTN_OFF"),
2477            }
2478        );
2479
2480        panel.onoff.content.btnonoff.addEventListener('click', function(e) {
2481            _this.send(par.events.close, panel);
2482            changeStateAlt('onblack'); 
2483        });
2484
2485        addbtn(
2486            panel.onoff.content.btnup,
2487            {
2488                class: 'btn btn-outline px-3',
2489                background: 'white',
2490                border: 'black',
2491                font: '14px',
2492                text: '<i class="far fa-angle-up" style="color:black!important"></i>',
2493                title: BX.message("SF_SPECIAL__BTN_UP"),
2494            }
2495        )
2496
2497        panel.onoff.content.btnup.style.position = 'absolute';
2498        panel.onoff.content.btnup.style.bottom = '0';
2499        panel.onoff.content.btnup.style.right = '0';
2500        panel.onoff.content.btnup.style.borderBottom = '0 solid black';
2501        panel.onoff.content.btnup.style.borderRadius = '0';
2502        panel.onoff.content.btnup.style.zIndex = '10';
2503
2504        if(_this.cookies.get('specialup') == 'down') {
2505            panel.style.marginTop = '-' + panel.clientHeight + 'px';
2506            panel.onoff.content.btnup.style.bottom = '-' + panel.onoff.content.btnup.clientHeight + 'px';
2507            panel.onoff.content.btnup.style.transform = 'rotate(180deg)';
2508            _this.cookies.set('specialup', 'up', 7);
2509        } else {
2510            panel.style.marginTop = '0';
2511            panel.onoff.content.btnup.style.bottom = '0';
2512            panel.onoff.content.btnup.style.transform = 'rotate(0deg)';
2513            _this.cookies.set('specialup', 'down', 7);
2514        }
2515
2516        panel.onoff.content.btnup.addEventListener('click', function(e) {
2517            _this.send(par.events.up, panel);
2518        });
2519
2520        panel.onoff.content.appendChild(panel.onoff.content.btndefault);
2521        panel.onoff.content.appendChild(panel.onoff.content.btnonoff);
2522
2523        panel.onoff.appendChild(panel.onoff.content);
2524        panel.appendChild(panel.onoff);
2525        panel.appendChild(panel.onoff.content.btnup);
2526
2527        // #endregion =================================
2528
2529        return panel;
2530    }
2531
2532    // #endregion Panel Special
2533
2534    /**
2535     * 
2536     * @param {*} e 
2537     */
2538    this.modal = function(e) {
2539        var overlay = {
2540            load: {},
2541            area: {
2542                content: {},
2543                close: {},
2544            },
2545        },
2546        _this = this,
2547        par = e.target.params,
2548        page = document.body.querySelector('.sf-pagewrap-area'),
2549        el = e.target;
2550
2551        overlay = document.createElement('div');
2552        overlay.load = document.createElement('div');
2553        overlay.load.innerHTML = par.load;
2554        overlay.area = document.createElement('div');
2555        overlay.area.content = document.createElement('div');
2556        overlay.area.close = document.createElement('button');
2557
2558        overlay.load.setAttribute(par.attributes.load, '');
2559        overlay.className = par.modifier.overlay;
2560        overlay.style.display = 'flex';
2561        overlay.load.style.position = 'fixed';
2562        overlay.load.style.top = '0';
2563        overlay.load.style.left = '0';
2564        overlay.load.style.width = '100%';
2565        overlay.setAttribute(par.attributes.overlay, '');
2566
2567        overlay.addEventListener('click', function(e) {
2568            if(e.target.hasAttribute(par.attributes.overlay))
2569                _this.send(par.events.close, overlay);
2570        });
2571
2572        overlay.classList = par.modifier.overlay;
2573        overlay.setAttribute(par.data.src, par.modifier.src);
2574        overlay.style.zIndex = this.topZIndex() + 1;
2575        
2576        overlay.area.setAttribute(par.attributes.modal, '');
2577        overlay.area.className = par.modifier.modal;
2578        overlay.area.content.setAttribute(par.attributes.content, '');
2579        overlay.area.content.className = par.modifier.content;
2580        overlay.area.style.opacity = '0';
2581        overlay.area.appendChild(overlay.area.content);
2582
2583        overlay.area.close.addEventListener('click', function(e) {
2584            _this.send(par.events.close, overlay);
2585        });
2586
2587        overlay.area.close.setAttribute(par.attributes.close, '');
2588        overlay.area.close.className = par.modifier.close;
2589        overlay.area.appendChild(overlay.area.close);
2590        overlay.appendChild(overlay.load);
2591        overlay.appendChild(overlay.area);
2592
2593        // Событие происходит перед открытием окна
2594        this.receive(par.events.open, overlay, function(e) {
2595            overlay.style.display = 'flex';
2596            document.body.style.overflow = 'hidden';
2597
2598            try {
2599                if(el.hasAttribute(par.data.blur) || (par.attributes.blur != null && par.attributes.blur != undefined)) {
2600                    //console.log(page)
2601                    if(page !== null && page !== undefined) {
2602                        //console.log(par.modifier.blur)
2603                        page.classList.add(par.modifier.blur.replace(" ", ''));
2604                    }
2605                }
2606            } catch(exp) {
2607                
2608            }
2609
2610            
2611        });
2612
2613        // Событие происходит перед закрытием окна
2614        this.receive(par.events.close, overlay, function(e) {
2615            if(overlay.parentNode != null) {
2616                overlay.area.style.opacity = '0';
2617                overlay.area.content.innerHTML = '';
2618                overlay.load.style.display = 'flex';
2619                overlay.parentNode.removeChild(overlay);
2620            }
2621            document.body.style.overflow = 'auto';
2622            try {
2623                if(el.hasAttribute(par.data.blur) || (par.attributes.blur != null && par.attributes.blur != undefined))
2624                if(page !== null && page !== undefined)
2625                    page.classList.remove(par.modifier.blur.replace(" ", ""));
2626            } catch(exp) {
2627
2628            }
2629            
2630        });
2631        
2632        return overlay;
2633    }
2634
2635    this.iframe = function(e) {
2636        /*var overlay = {
2637            load: {},
2638            area: {
2639                content: {},
2640                close: {},
2641            },
2642        },
2643        _this = this,
2644        page= document.body.querySelector('.sf-pagewrap-area'),
2645        el = e.target;*/
2646        var overlay = {
2647            load: {},
2648            area: {
2649                content: {},
2650                close: {},
2651            },
2652        },
2653        _this = this,
2654        par = e.target.params,
2655        page = document.body.querySelector('.sf-pagewrap-area'),
2656        el = e.target;
2657
2658
2659
2660        overlay = document.createElement('div');
2661        overlay.load = document.createElement('div');
2662        overlay.load.innerHTML = par.load;
2663        overlay.area = document.createElement('div');
2664        overlay.area.content = document.createElement('iframe');
2665        overlay.area.content.src = par.modifier.src;
2666        overlay.area.close = document.createElement('button');
2667
2668        overlay.load.setAttribute(par.attributes.load, '');
2669        overlay.load.className = par.modifier.load;
2670        overlay.load.style.position = 'fixed';
2671        overlay.load.style.top = '0';
2672        overlay.load.style.left = '0';
2673        overlay.load.style.width = '100%';
2674        overlay.setAttribute(par.attributes.overlay, '');
2675
2676        overlay.addEventListener('click', function(e) {    
2677            if(e.target.hasAttribute(par.attributes.overlay))
2678                _this.send(par.events.close, overlay);
2679            /*console.log(par.attributes.overlay)           
2680            if(el.hasAttribute(par.attributes.overlay)) {
2681                console.log(overlay)
2682                overlay.parenNode.removeChild(overlay);
2683                document.body.style.overflow = 'auto';
2684                if(el.hasAttribute(par.data.blur) || par.attributes.blur)
2685                    if(page !== null && page !== undefined)
2686                        page.classList.remove(par.modifier.opt);
2687            }*/
2688        });
2689
2690        overlay.classList = par.modifier.overlay;
2691        overlay.setAttribute(par.data.src, par.modifier.src);
2692        overlay.style.zIndex = this.topZIndex() + 1;
2693
2694        overlay.area.setAttribute(par.attributes.content, "");
2695        overlay.area.className = par.modifier.modal;
2696        overlay.area.content.setAttribute(par.attributes.content, "");
2697        overlay.area.content.className = par.modifier.content;
2698        overlay.area.style.opacity = "0";
2699        overlay.area.appendChild(overlay.area.content);
2700
2701        /*overlay.area.close.addEventListener('click', function(e) {
2702            overlay.parenNode.removeChild(overlay);
2703            document.body.style.overflowY = 'auto';
2704            if(el.hasAttribute(par.data.blur) || par.attributes.blur)
2705                if(page !== null && page !== undefined)
2706                    page.classList.remove(par.modifier.blur);
2707         });*/
2708
2709         overlay.area.close.addEventListener('click', function(e) {
2710            _this.send(par.events.close, overlay);
2711        });
2712
2713
2714         overlay.area.close.setAttribute(par.attributes.close, '');
2715         overlay.area.close.className = par.modifier.close;
2716         overlay.area.appendChild(overlay.area.close);
2717         overlay.appendChild(overlay.load);
2718         overlay.appendChild(overlay.area);
2719
2720         this.receive(par.events.open, el || window, function(e) {
2721            overlay.style.opacity = 1;
2722            document.body.style.overflow = 'hidden';
2723            overlay.style.display = 'flex';
2724            if(el.hasAttribute(par.data.blur) || par.attributes.blur)
2725                if(page !== null && page !== undefined)
2726                    page.classList.add(par.modifier.blur);
2727         });
2728
2729         this.receive(par.events.close, overlay, function(e) {
2730            if(overlay.parentNode != null) {
2731                overlay.area.style.opacity = '0';
2732                overlay.area.content.innerHTML = '';
2733                overlay.load.style.display = 'flex';
2734                overlay.parentNode.removeChild(overlay);
2735            }
2736            document.body.style.overflow = 'auto';
2737            if(el.hasAttribute(par.data.blur) || par.attributes.blur)
2738                if(page !== null && page !== undefined)
2739                    page.classList.add(par.modifier.blur);
2740         });
2741
2742         /*if(el.hasAttribute(par.data.blur) || par.attributes.blur)
2743            if(page !== null && page !== undefined)
2744                page.classList.add(par.modifier.blur);*/
2745        
2746        this.send(par.events.open, el);
2747        return overlay;
2748    }
2749
2750    this.providercreate = function(e) {
2751        var b = e.target.blocks,
2752            el = e.target,
2753            par = el.params;
2754        switch(b) {
2755            case 'modal':
2756                el.modal = this.modal(e);
2757                el.event = par.events.init;
2758                this.send("providerend", el);
2759                break;
2760            case "special":
2761                el.special = this.special(e);
2762                el.event = par.events.init;
2763                this.send('providerend', el);
2764                break;
2765            case 'ajaxload':
2766                el.event = par.events.init;
2767                this.send('providerend', el);
2768                break;
2769        }
2770    }
2771
2772    var _this = this;
2773
2774    if(this.stack.ev('providerstart')) {
2775        this.receive('providerstart', window, function(e) {
2776            _this.providercreate(e);
2777        });
2778        this.stack.events.push('providerstart');        
2779    }
2780
2781}
2782SF.Modal = function(el, opt) {
2783
2784    this.createNew = function(e) {
2785        var par = new SF.Parameters(),
2786            modPar = par.newparams();
2787        window.blocks = 'modal';
2788        window.params = this.extend(modPar.blocks.modal, window.params);
2789        e.target.blocks = 'modal';
2790        e.target.params = this.extend(modPar.blocks.modal, window.params);
2791        e.target.modal = _this.modal(e);
2792        window.modal = _this.modal(e);
2793        _this.create(e);
2794    }
2795
2796    this.create = function(e) {
2797        //console.log(e.target)
2798        var modal = e.target.modal,
2799            el = e.target,
2800            container = null,
2801            opt = el.params;
2802        
2803            try {
2804                if(el.hasAttribute(opt.data.iframe))
2805                modal = this.iframe(e);
2806            } catch(ex) {
2807
2808            }
2809        
2810
2811        //console.log(modal)
2812
2813        var service = document.body.querySelector('.sf-service-bottom-area');
2814
2815        if(service == null || service == undefined) {
2816            service = document.createElement('div');
2817            service.classList.add(el.params.modifier.service);
2818            document.body.appendChild(service);
2819        } else container = service.querySelector('.sf-modal-container');
2820
2821        if(container == null || container == undefined) {
2822            container = document.createElement('section');
2823            container.setAttribute('modal-container', '');
2824            container.className = opt.modifier.container;
2825        }
2826        //console.log(container)
2827        try {
2828            container.appendChild(modal);
2829        } catch(ex) {
2830            container.innerHTML = modal;
2831        }
2832        
2833        service.appendChild(container);
2834
2835        setTimeout(function() {
2836            if(modal.hasAttribute(el.params.data.src)) {
2837                var link = modal.getAttribute(el.params.data.src).replace(" ", '');
2838
2839                function simbol(ch) {
2840                    var str = 'abcdefghijklmnopqrstuvwxyz',
2841                        i = 0;
2842                    for(var k = 0; k < str.length; k++)
2843                        if(str[k] == ch) i++;
2844                    if(i > 0) return true;
2845                    else return false;
2846                }
2847                if(link != null && link != '') {
2848                    if(link[0] == '.' && simbol(link[1])) {
2849
2850                        modal.area.content.appendChild(document.body.querySelector(link).cloneNode(true));
2851                        _this.searchdata(modal.area.content);
2852                        modal.load.style.display = 'none';
2853                        modal.area.style.opacity = '1';
2854                        _this.send(el.params.events.open, modal);
2855    
2856                    } else if(link[0] == '#') {
2857                        modal.area.content.appendChild(document.body.querySelector(link).cloneNode(true));
2858                        _this.searchdata(modal.area.content);
2859                        modal.load.style.display = 'none';
2860                        modal.area.style.opacity = '1';
2861                        _this.send(el.params.events.open, modal);
2862                    } else if(link[0] == '[') {
2863                        modal.area.content.appendChild(document.body.querySelector(link).cloneNode(true));
2864                        _this.searchdata(modal.area.content);
2865                        modal.load.style.display = 'none';
2866                        modal.area.style.opacity = '1';
2867                        _this.send(el.params.events.open, modal);
2868                    } else {
2869
2870                        BX.ajax.post(
2871                            modal.getAttribute(el.params.data.src),
2872                            '',
2873                            function (data) {
2874                                try {
2875                                    if(el.hasAttribute(opt.data.iframe)) {
2876                                        //modal.area.content.contentWindow.document.body.innerHTML = data;
2877                                    } else modal.area.content.innerHTML = data;
2878                                } catch(ex) {
2879                                    modal.area.content.innerHTML = data;
2880                                }
2881
2882                                _this.searchdata(modal.area.content);
2883                                modal.load.style.display = 'none';
2884                                modal.area.style.opacity = '1';
2885                                _this.send(el.params.events.open, modal);
2886                            }
2887                        );
2888                    }
2889                } else {
2890                    modal.area.content.innerHTML = '<div class="w-100 h-100"><h6 class="c-red">Error</h6></div>';
2891                    _this.searchdata(modal.area.content);
2892                    modal.load.style.display = 'none';
2893                    modal.area.style.opacity = '1';
2894                    _this.send(el.params.events.open, modal);
2895                }
2896            }
2897
2898        }, 1000);
2899    }
2900
2901    // ====== CONSTRUCTOR ====== //
2902
2903        SF.Events.call(this)
2904
2905        this.el = el;
2906        this.stack = stack;
2907        var _this = this,
2908            par = new SF.Parameters(),
2909            param = par.newparams(),
2910            plugin = this.extend(param.blocks.modal, opt);
2911
2912        if(this.el) {
2913            this.el.blocks = 'modal';
2914            this.el.params = plugin;
2915        }
2916        
2917        this.receive(plugin.events.init, window, function(e) {
2918            var ev = e;
2919            ev.target.addEventListener('click', function(e) {
2920                e.preventDefault();
2921                _this.create(ev);
2922            });
2923        });
2924
2925        this.receive(plugin.events.create, window, function(e) {
2926            _this.createNew(e);
2927        });
2928
2929        // Закрываем окно клавишей Escpe
2930        this.quickkey(function(e) {
2931            var overlay = _this.topZIndexElement(document.body.querySelectorAll('.sf-modal-overlay'));
2932            _this.send('modalclose', overlay);
2933        }, 27);
2934
2935        /*window.addEventListener('click', function(e) {
2936            if(e.target.hasAttribute('sf-modal')) {
2937                if(e.target.params == undefined || e.target.params == null)
2938                    _this.send(plugin.events.create, e.target);
2939            }
2940        })*/
2941
2942        SF.Controller.call(this);
2943
2944    // ====== END CONSTRUCTOR ====== //
2945
2946}
2947SF.Special = function(el, opt) {
2948    // #region Method
2949        this.updateparam = function(param) {
2950            for(var key in param)
2951                if(_this.cookies.get(key))
2952                    param[key] = _this.cookies.get(key);
2953            return param;
2954        }
2955    // #endregion
2956    // ====== CONSTRUCTOR ====== //
2957        SF.Events.call(this);
2958        //SF.Property.call(this);
2959
2960        this.el = el;
2961        var _this = this,
2962            par = new SF.Parameters(),
2963            param = par.newparams(),
2964            plugin = this.extend(param.blocks.special, opt);
2965        
2966        this.stack = stack; 
2967        var html = document.querySelector('html'),
2968            body = document.body,
2969            service = body.querySelector('.sf-service-top-area');
2970        
2971        if(this.el) {
2972            this.el.blocks = 'special';
2973            this.el.params = plugin;
2974        }
2975
2976        plugin.cookies = this.updateparam(plugin.cookies);
2977
2978        if(this.stack.ev(plugin.events.close)) {
2979            this.receive(plugin.events.close, window, function(e) {
2980                var panel = e.target;
2981                panel.parentNode.removeChild(panel);
2982                _this.el.linkcss.parentNode.removeChild(_this.el.linkcss);
2983                _this.send(plugin.events.soundoff, window);
2984                _this.cookies.set('specialstate', 'off', 7);
2985            });
2986            this.stack.events.push(plugin.events.close);
2987        }
2988
2989        if(this.stack.ev(plugin.events.open)) {
2990            this.receive(plugin.events.open, window, function(e) {
2991
2992                _this.cookies.set('specialstate', 'on', 7);
2993                _this.updateparam(plugin.cookies);              
2994                service.insertBefore(_this.el.special, service.firstChild);
2995                html.classList.add('special');
2996
2997
2998                switch(plugin.cookies.specialfont) {
2999                    case 'sans':
3000                        _this.send(plugin.events.fontsans, e.target);
3001                        break;
3002                    case 'serif':
3003                        _this.send(plugin.events.fontserif, e.target);
3004                        break;
3005                    case 'mono':
3006                        _this.send(plugin.events.fontmono, e.target);
3007                        break;
3008                }
3009
3010                switch(plugin.cookies.specialkerning) {
3011                    case 'normal':
3012                        _this.send(plugin.events.kerningnormal, e.target);
3013                        break;
3014                    case 'middle':
3015                        _this.send(plugin.events.kerningmiddle, e.target);
3016                        break;
3017                    case 'big':
3018                        _this.send(plugin.events.kerningbig, e.target);
3019                        break;
3020                }
3021
3022                switch(plugin.cookies.specialinterval) {
3023                    case '1.0':
3024                        _this.send(plugin.events.intervalone, e.target);
3025                        break;
3026                    case '1.5':
3027                        _this.send(plugin.events.intervalhalf, e.target);
3028                        break;
3029                    case '2.0':
3030                        _this.send(plugin.events.intervaltwo, e.target);
3031                        break;
3032                }
3033                html.style.fontSize = plugin.cookies.specialkegl + 'px';
3034                body.style.fontSize = plugin.cookies.specialkegl + 'px';
3035                switch(plugin.cookies.specialimage) {
3036                    case 'off':
3037                        html.classList.add('special-img-none');
3038                        html.classList.remove('special-img-black');
3039                        _this.cookies.set('specialimage', 'off', 7);
3040                        break;
3041                    case 'oncolor':
3042                        html.classList.remove('special-img-none');
3043                        html.classList.remove('special-img-black');
3044                        _this.cookies.set('specialimage', 'oncolor', 7);
3045                        break;
3046                    case 'onblack':
3047                        html.classList.add('special-img-black');
3048                        html.classList.remove('special-img-none');
3049                        _this.cookies.set('specialimage', 'onblack', 7);
3050                        break;
3051                }
3052                _this.el.linkcss = _this.addcss(plugin.modifier[plugin.cookies.specialcolor]);
3053
3054                var stateImage = _this.cookies.get('specialimage');
3055                if(stateImage == 'off')
3056                {
3057                  document.querySelectorAll('.sf-special-hidden').forEach((elem) => {
3058                    elem.classList.remove('sf-special-hidden'); 
3059                    elem.classList.add('sf-special-show')
3060                  });
3061                } else if(stateImage == 'onblack' || stateImage == 'oncolor') {
3062                  document.querySelectorAll('.sf-special-show').forEach((elem) => {
3063                    elem.classList.add('sf-special-hidden'); 
3064                    elem.classList.remove('sf-special-show');
3065                  });
3066                }
3067                
3068                var panel = document.body.querySelector('[sf-special-panel]');
3069                if(plugin.cookies.specialsound == 'on')
3070                    _this.send(plugin.events.soundon, panel);
3071                //_this.send(plugin.events.up, panel);
3072            });
3073            this.stack.events.push(plugin.events.open);
3074        }
3075
3076        // #region Font
3077
3078        if(this.stack.ev(plugin.events.fontsans)) {
3079            this.receive(plugin.events.fontsans, window, function(e) {
3080                html.classList.add('special-font-sans');
3081                html.classList.remove('special-font-serif');
3082                html.classList.remove('special-font-mono');
3083                _this.cookies.set('specialfont', 'sans', 7);
3084            });
3085            this.stack.events.push(plugin.events.fontsans);
3086        }
3087
3088        if(this.stack.ev(plugin.events.fontserif)) {
3089            this.receive(plugin.events.fontserif, window, function(e) {
3090                html.classList.remove('special-font-sans');
3091                html.classList.add('special-font-serif');
3092                html.classList.remove('special-font-mono');
3093                _this.cookies.set('specialfont', 'serif', 7);
3094            });
3095            this.stack.events.push(plugin.events.fontserif);
3096        }
3097
3098        if(this.stack.ev(plugin.events.fontmono)) {
3099            this.receive(plugin.events.fontmono, window, function(e) {
3100                html.classList.remove('special-font-sans');
3101                html.classList.remove('special-font-serif');
3102                html.classList.add('special-font-mono');
3103                _this.cookies.set('specialfont', 'mono', 7);
3104            });
3105            this.stack.events.push(plugin.events.fontmono);
3106        }
3107
3108        // #endregion Font
3109
3110        if(this.stack.ev(plugin.events.keglless)) {
3111            this.receive(plugin.events.keglless, window, function(e) {
3112                _this.updateparam(plugin.cookies);
3113                if(plugin.cookies.specialkegl < 24) {
3114                    var kegl = Number(plugin.cookies.specialkegl);
3115                    kegl++;
3116                    html.style.fontSize = kegl + 'px';
3117                    body.style.fontSize = kegl + 'px';
3118                    _this.cookies.set('specialkegl', kegl, 7);
3119                }
3120            });
3121            this.stack.events.push(plugin.events.keglless);
3122        }
3123
3124        if(this.stack.ev(plugin.events.keglmore)) {
3125            this.receive(plugin.events.keglmore, window, function(e) {
3126                _this.updateparam(plugin.cookies);
3127                if(plugin.cookies.specialkegl > 14) {
3128                    var kegl = Number(plugin.cookies.specialkegl);
3129                    kegl--;
3130                    html.style.fontSize = kegl + 'px';
3131                    body.style.fontSize = kegl + 'px';
3132                    _this.cookies.set('specialkegl', kegl, 7);
3133                }
3134            });
3135            this.stack.events.push(plugin.events.keglmore);
3136        }
3137
3138    // Kerning
3139        if(this.stack.ev(plugin.events.kerningnormal)) {
3140            this.receive(plugin.events.kerningnormal, window, function(e) {
3141                _this.updateparam(plugin.cookies);
3142                html.classList.remove('special-kerning-middle');
3143                html.classList.remove('special-kerning-big');
3144                _this.cookies.set('specialkerning', 'normal', 7);
3145            });
3146            this.stack.events.push(plugin.events.kerningnormal);
3147        }
3148        //
3149        if(this.stack.ev(plugin.events.kerningmiddle)) {
3150            this.receive(plugin.events.kerningmiddle, window, function(e) {
3151                _this.updateparam(plugin.cookies);
3152                html.classList.add('special-kerning-middle');
3153                html.classList.remove('special-kerning-big');
3154                _this.cookies.set('specialkerning', 'middle', 7);
3155            });
3156            this.stack.events.push(plugin.events.kerningmiddle);
3157        }
3158        if(this.stack.ev(plugin.events.kerningbig)) {
3159            this.receive(plugin.events.kerningbig, window, function(e) {
3160                _this.updateparam(plugin.cookies);
3161                html.classList.remove('special-kerning-middle');
3162                html.classList.add('special-kerning-big');
3163                _this.cookies.set('specialkerning', 'big', 7);
3164            });
3165            this.stack.events.push(plugin.events.kerningbig);
3166        }
3167    //===========
3168
3169    // Interval Увеличение интервала текста
3170        if(this.stack.ev(plugin.events.intervalone)) {
3171            this.receive(plugin.events.intervalone, window, function(e) {
3172                _this.updateparam(plugin.cookies);
3173                html.classList.remove('special-interval-15');
3174                html.classList.remove('special-inerval-20');
3175                _this.cookies.set('specialinterval', '1', 7);
3176            });
3177            this.stack.events.push(plugin.events.intervalone);
3178        }
3179
3180        if(this.stack.ev(plugin.events.intervalhalf)) {
3181            this.receive(plugin.events.intervalhalf, window, function(e) {
3182                _this.updateparam(plugin.cookies);
3183                html.classList.add('special-interval-15');
3184                html.classList.remove('special-inerval-20');
3185                _this.cookies.set('specialinterval', '1.5', 7);
3186            });
3187            this.stack.events.push(plugin.events.intervalhalf);
3188        }
3189
3190        if(this.stack.ev(plugin.events.intervaltwo)) {
3191            this.receive(plugin.events.intervaltwo, window, function(e) {
3192                _this.updateparam(plugin.cookies);
3193                html.classList.remove('special-interval-15');
3194                html.classList.add('special-inerval-20');
3195                _this.cookies.set('specialinterval', '2.0', 7);
3196            });
3197            this.stack.events.push(plugin.events.intervaltwo);
3198        }
3199    // =======================================================
3200        if(this.stack.ev(plugin.events.imagecolor)) {
3201            this.receive(plugin.events.imagecolor, window, function(e) {
3202                _this.updateparam(plugin.cookies);
3203                html.classList.remove('special-img-none');
3204                html.classList.remove('special-img-black');
3205                _this.cookies.set('specialimage', 'oncolor', 7);
3206            });
3207            this.stack.events.push(plugin.events.imagecolor);            
3208        }
3209
3210        if(this.stack.ev(plugin.events.imageblack)) {
3211            this.receive(plugin.events.imageblack, window, function(e) {
3212                _this.updateparam(plugin.cookies);
3213                html.classList.remove('special-img-none');
3214                html.classList.add('special-img-black');
3215                _this.cookies.set('specialimage', 'onblack', 7);
3216            });
3217            this.stack.events.push(plugin.events.imageblack);            
3218        }
3219
3220        if(this.stack.ev(plugin.events.imageoff)) {
3221            this.receive(plugin.events.imageoff, window, function(e) {
3222                _this.updateparam(plugin.cookies);
3223                html.classList.add('special-img-none');
3224                html.classList.remove('special-img-black');
3225                _this.cookies.set('specialimage', 'off', 7);
3226            });
3227            this.stack.events.push(plugin.events.imageoff);
3228        }
3229
3230
3231    // ============================================
3232
3233        if(this.stack.ev(plugin.events.colorwhite)) {
3234            this.receive(plugin.events.colorwhite, window, function(e) {
3235                _this.updateparam(plugin.cookies);
3236                service.insertBefore(_this.el.special, service.firstChild);
3237                html.classList.add('special');
3238                _this.el.linkcss.parentNode.removeChild(_this.el.linkcss);
3239                _this.el.linkcss = _this.addcss(plugin.modifier.specialwhite);
3240                _this.cookies.set('specialcolor', 'specialwhite', 7);
3241            });
3242            this.stack.events.push(plugin.events.colorwhite);
3243        }
3244
3245        if(this.stack.ev(plugin.events.colorblack)) {
3246            this.receive(plugin.events.colorblack, window, function(e) {
3247                //var service = document.body.querySelector('.sf-service-top-area');
3248                service.insertBefore(_this.el.special, service.firstChild);
3249                html.classList.add('special');
3250                _this.el.linkcss.parentNode.removeChild(_this.el.linkcss);
3251                _this.el.linkcss = _this.addcss(plugin.modifier.specialblack);
3252                _this.cookies.set('specialcolor', 'specialblack', 7);
3253            });
3254            this.stack.events.push(plugin.events.colorblack);
3255        }
3256
3257        if(this.stack.ev(plugin.events.coloryellow)) {
3258            this.receive(plugin.events.coloryellow, window, function(e) {
3259                //var service = document.body.querySelector('.sf-service-top-area');
3260                service.insertBefore(_this.el.special, service.firstChild);
3261                html.classList.add('special');
3262                _this.el.linkcss.parentNode.removeChild(_this.el.linkcss);
3263                _this.el.linkcss = _this.addcss(plugin.modifier.specialyellow);
3264                _this.cookies.set('specialcolor', 'specialyellow', 7);
3265            });
3266            this.stack.events.push(plugin.events.coloryellow);
3267        }
3268
3269        if(this.stack.ev(plugin.events.colorblue)) {
3270            this.receive(plugin.events.colorblue, window, function(e) {
3271                //var service = document.body.querySelector('.sf-service-top-area');
3272                service.insertBefore(_this.el.special, service.firstChild);
3273                html.classList.add('special');
3274                _this.el.linkcss.parentNode.removeChild(_this.el.linkcss);
3275                _this.el.linkcss = _this.addcss(plugin.modifier.specialblue);
3276                _this.cookies.set('specialcolor', 'specialblue', 7);
3277            });
3278            this.stack.events.push(plugin.events.colorblue);
3279        }
3280
3281        if(this.stack.ev(plugin.events.colorgreen)) {
3282            this.receive(plugin.events.colorgreen, window, function(e) {
3283                service.insertBefore(_this.el.special, service.firstChild);
3284                html.classList.add('special');
3285                _this.el.linkcss.parentNode.removeChild(_this.el.linkcss);
3286                _this.el.linkcss = _this.addcss(plugin.modifier.specialgreen);
3287                _this.cookies.set('specialcolor', 'specialgreen', 7);
3288            });
3289            this.stack.events.push(plugin.events.colorgreen);
3290        }
3291
3292
3293        if(this.stack.ev(plugin.events.soundoff)) {
3294            this.receive(plugin.events.soundoff, window, function(e) {
3295                var btnplay = document.body.querySelectorAll('[sf-play]');
3296                for(var k = 0; k < btnplay.length; k++)
3297                    btnplay[k].parentNode.removeChild(btnplay[k]);
3298                _this.cookies.set('specialsound', 'off', 7);
3299            });
3300            this.stack.events.push(plugin.events.soundoff);
3301        }
3302        // end Sound
3303
3304        if(this.stack.ev(plugin.events.defaultsetting)) {
3305            this.receive(plugin.events.defaultsetting, window, function(e) {
3306                var o  = new SF.Parameters().newparams(),
3307                    p = o.blocks.special,
3308                    panel = e.target;
3309
3310                html.classList.remove('special-font-sans');
3311                html.classList.remove('special-font-serif');
3312                html.classList.remove('special-font-mono');
3313                panel.font.status.innerHTML = BX.message("SF_SPECIAL__FONT_DEFAULT");
3314
3315                _this.cookies.set('specialfont', p.cookies.specialfont, 7);
3316
3317                html.style.fontSize = p.cookies.specialkegl + 'px';
3318                panel.kegl.status.innerHTML = p.cookies.specialkegl + BX.message("SF_SPECIAL__SPECIAL_KEGL");
3319                _this.cookies.set('specialkegl', p.cookies.specialkegl, 7);
3320
3321                html.classList.remove('special-kerning-middle');
3322                html.classList.remove('special-kerning-big');
3323                _this.cookies.set('specialkerning', p.cookies.specialkerning, 7);
3324                panel.kerning.status.innerHTML = BX.message("SF_SPECIAL__KERNING_NORMAL");
3325
3326                html.classList.remove('special-interval-15');
3327                html.classList.remove('special-inerval-20');
3328                _this.cookies.set('specialinterval', '1.0', 7);
3329                panel.interval.status.innerHTML = BX.message("SF_SPECIAL__INTERVAL_1_0");
3330
3331                if( _this.el.linkcss.parentNode) {
3332                    _this.el.linkcss.parentNode.removeChild(_this.el.linkcss);
3333                }
3334
3335                _this.el.linkcss = _this.addcss(p.modifier.specialwhite);
3336                _this.cookies.set('specialcolor', p.cookies.specialcolor);
3337
3338                panel.color.status.innerHTML = BX.message("SF_SPECIAL__BTN_WHITE");
3339
3340                panel.img.status.innerHTML = BX.message("SF_SPECIAL__IMG_ON_COLOR");
3341                html.classList.remove('special-img-none');
3342                html.classList.remove('special-img-black');
3343                _this.cookies.set('specialimage', 'on', 7);
3344            });
3345            this.stack.events.push(plugin.events.defaultsetting);
3346        }
3347
3348        if(this.stack.ev(plugin.events.up)) {
3349            this.receive(plugin.events.up, window, function(e) {
3350                var panel = e.target;
3351                if(_this.cookies.get('specialup') == 'down') {
3352                    panel.style.marginTop = '-' + panel.clientHeight + 'px';
3353                    panel.onoff.content.btnup.style.bottom = '-' + panel.onoff.content.btnup.clientHeight + 'px';
3354                    panel.onoff.content.btnup.style.transform = 'rotate(180deg)';
3355                    _this.cookies.set('specialup', 'up', 7);
3356                } else {
3357                    panel.style.marginTop = '0';
3358                    panel.onoff.content.btnup.style.bottom = '0';
3359                    panel.onoff.content.btnup.style.transform = 'rotate(0deg)';
3360                    _this.cookies.set('specialup', 'down', 7);
3361                }
3362            });
3363            this.stack.events.push(plugin.events.up);
3364        }
3365
3366    // ============================================
3367
3368        if(plugin.cookies.specialstate == 'off') {
3369            _this.el.addEventListener('click', function(e) {
3370                e.preventDefault();
3371                switch(_this.cookies.get('specialstate')) {
3372                    case 'off':
3373                        _this.send(_this.el.params.events.open, _this.el);
3374                        break;
3375                    case 'on':
3376                        var panel = document.body.querySelector('[sf-special-panel]');
3377                        panel.parentNode.removeChild(panel);
3378                        _this.el.linkcss.parentNode.removeChild(_this.el.linkcss);
3379                        _this.cookies.set('specialstate', 'off', 7);
3380                        break;
3381                    default: 
3382                        _this.send(_this.el.params.events.open, _this.el);
3383                        break;
3384                }
3385            });
3386        } else {
3387            _this.updateparam(plugin.cookies);
3388            _this.send(plugin.events.open, window);
3389            _this.el.addEventListener('click', function(e) {
3390                switch(_this.cookies.get('specialstate')) {
3391                    case 'off':
3392                        _this.send(_this.el.params.events.open, _this.el);
3393                        break;
3394                    case 'on':
3395                        var panel = document.body.querySelector('[sf-special-panel]');
3396                        panel.parentNode.removeChild(panel);
3397                        _this.el.linkcss.parentNode.removeChild(_this.el.linkcss);
3398                        _this.cookies.set('specialstate', 'off', 7);
3399                        break;
3400                    default: 
3401                        _this.send(_this.el.params.events.open, _this.el);
3402                        break;
3403                }
3404            });
3405        }
3406        
3407        
3408    // ====== END CONSTRUCTOR ====== //    
3409}
3410SF.AjaxLoad = function(el, opt) {
3411
3412    SF.Events.call(this);
3413
3414    this.el = el;
3415    var _this = this,
3416        par = new SF.Parameters(),
3417        param = par.newparams(),
3418        plugin = this.extend(param.blocks.ajaxload, opt);
3419
3420        this.stack = stack;
3421
3422        if(this.el) {
3423            this.el.blocks = 'ajaxload';
3424            this.el.params = plugin;
3425        }
3426
3427        this.receive(plugin.events.init, window, function(e) {
3428            var el = e.target,
3429                interval = setInterval(_this.checklayer, 1000, el);
3430            _this.receive(plugin.events.cancel, el, function(e) {
3431                clearInterval(interval);
3432            })
3433        })
3434
3435        this.receive(plugin.events.create, window, function(e) {
3436            _this.send('ajaxloadinit', e.target);
3437        })
3438
3439        this.checklayer = function(el) {
3440            var comp = getComputedStyle(el);
3441
3442            if(el.getAttribute(plugin.data.loaded) !== 'loaded' && comp.display !== 'none') {
3443                el.setAttribute(plugin.data.loaded, 'loaded');
3444                el.innerHTML = plugin.load;
3445                setTimeout(function(){
3446                    BX.ajax.post(
3447                        el.getAttribute(plugin.data.src),
3448                        '',
3449                        function (data) {
3450                            el.innerHTML = data;
3451                            el.load.style.display = 'none';
3452                        }
3453                    );
3454                }, 1000);
3455                
3456            } else el.setAttribute(plugin.data.loaded, '');
3457
3458            if(el.hasAttribute(plugin.data.cancel) && el.getAttribute(plugin.data.loaded) == 'loaded')
3459                _this.send(plugin.events.cancel, el);
3460        }
3461}
3462SF.Controller.Stack = {
3463    el: [],
3464    events: [],
3465    log: [],
3466}
3467
3468var stack = SF.Controller.Stack;
3469
3470SF.Controller.Stack.extend = function(def, options) {
3471    var i = 0;
3472    for(var key in options) {
3473        if(def.length > 0)
3474            for(var k = 0; k < def.length; k++)
3475                if(def[k] == options[key]) i++;
3476        if(i == 0) def.push(options[key]);
3477        i = 0;
3478    }
3479    return def;
3480}
3481
3482
3483SF.Controller.Stack.addevents = function(events) {
3484    var e = this.stack.events,
3485        i = 0;
3486    for(var k = 0; k < e.length; k++)
3487       if(e[k] == events) i++;
3488    if(i == 0) e.push(events);
3489}
3490
3491SF.Controller.Stack.ev = function(ev) {
3492    var e = this.events,
3493        i = 0;
3494    for(var k = 0; k < e.length; k++)
3495        if(e[k] == ev) i++;
3496    if(i === 0) return true;
3497    else return false;
3498}
3499window.addEventListener('DOMContentLoaded', function(e) {
3500    new SF.AjaxLoad();
3501    new SF.Modal();
3502
3503    
3504
3505    /*var callback = function(allmutations) {
3506        allmutations.map( function(mr) {
3507            var mt = 'Тип изменения: ' + mr.type;  // записываем тип изменения
3508            mt += 'Измененный элемент: ' + mr.target; // записываем измененный элемент.
3509            var event = setInterval(function(e) {
3510                SF.send('searchstartmodal', window);
3511                clearInterval(event);
3512            }, 1000);
3513            //_this.send('searchstartmodal', window)
3514            //console.log( mr.target );
3515            //SF.send('searchstartmodal', mr.target);
3516        });
3517    
3518    }, mo = new MutationObserver(callback),
3519    options = {
3520        // обязательный параметр: наблюдаем за добавлением и удалением дочерних элементов.
3521        'childList': true,
3522        // наблюдаем за добавлением и удалением дочерних элементов любого уровня вложенности.
3523        'subtree': true
3524    }
3525    mo.observe(document.body, options);*/
3526});
3527;( function( window ) {
3528	
3529	'use strict';
3530
3531	function extend( a, b ) {
3532		for( var key in b ) { 
3533			if( b.hasOwnProperty( key ) ) {
3534				a[key] = b[key];
3535			}
3536		}
3537		return a;
3538	}
3539
3540	function sfTab( el, options ) {
3541		this.el = el;
3542		this.options = extend( {}, this.options );
3543  		extend( this.options, options );
3544  		this._init();
3545	}
3546
3547	sfTab.prototype.options = {
3548		start : 0
3549	};
3550
3551	sfTab.prototype._init = function() {
3552		// tabs elems
3553		this.tabs = [].slice.call( this.el.querySelectorAll( 'nav > ul > li' ) );
3554		// content items
3555		this.items = [].slice.call( this.el.querySelectorAll( '.sf-tab-content > section' ) );
3556		// current index
3557		this.current = -1;
3558		// init events
3559		this._initEvents();
3560	};
3561
3562	sfTab.prototype._initEvents = function() {
3563		var self = this;
3564		this.tabs.forEach( function( tab, idx ) {
3565			tab.addEventListener( 'click', function( ev ) {
3566				ev.preventDefault();
3567				for(var i = 0; i < self.tabs.length; i++) {
3568					self.tabs[i].classList.remove('active');
3569					self.items[i].classList.remove('active');
3570				}
3571				self._show( idx );
3572			});
3573		});
3574	};
3575
3576	sfTab.prototype._show = function( idx ) {
3577		if( this.current >= 0 ) {
3578			this.tabs[ this.current ].classList.remove('active');
3579			this.items[ this.current ].classList.remove('active');
3580		}
3581		// change current
3582		if(idx != null) {
3583			this.current = idx;
3584			this.tabs[idx].classList.add('active');
3585			this.items[idx].classList.add('active');
3586		}
3587		
3588	};
3589
3590	// add to global namespace
3591	window.sfTab = sfTab;
3592
3593})( window );
3594
3595
3596
3597    ;(function() {
3598        window.addEventListener('DOMContentLoaded', function() {
3599			[].slice.call( document.querySelectorAll( '.sf-tab' ) ).forEach( function( el ) {
3600				new sfTab( el );
3601			});
3602		});
3603    })();
3604
3605'use strict';
3606/*
3607 * 32 avalable animation effects (from jQuery UI).
3608 * More info: https://api.jqueryui.com/easings/
3609 * 
3610 * linear
3611 * swing
3612 * easeInQuad
3613 * easeOutQuad
3614 * easeInOutQuad
3615 * easeInCubic
3616 * easeOutCubic
3617 * easeInOutCubic
3618 * easeInQuart
3619 * easeOutQuart
3620 * easeInOutQuart
3621 * easeInQuint
3622 * easeOutQuint
3623 * easeInOutQuint
3624 * easeInExpo
3625 * easeOutExpo
3626 * easeInOutExpo
3627 * easeInSine
3628 * easeOutSine
3629 * easeInOutSine
3630 * easeInCirc
3631 * easeOutCirc
3632 * easeInOutCirc
3633 * easeInElastic
3634 * easeOutElastic
3635 * easeInOutElastic
3636 * easeInBack
3637 * easeOutBack
3638 * easeInOutBack
3639 * easeInBounce
3640 * easeOutBounce
3641 * easeInOutBounce
3642 */
3643
3644(function ($) {
3645
3646    function goTop() {
3647        var top =  Math.max(document.body.scrollTop,document.documentElement.scrollTop),
3648            t;
3649        if(top > 0) {
3650            window.scrollBy(0, -10);
3651            t = setTimeout('goTop()', 10);
3652        } else clearTimeout(t);
3653        return false;
3654    }
3655
3656    $(document).ready(function () {
3657
3658        var btn = document.querySelector('.sf-up');
3659        if(btn != null) {
3660            var animationEasing = btn.getAttribute('data-animation'),
3661                scrollSpeed = btn.getAttribute('data-speed');
3662                scrollOffset = btn.getAttribute('data-offset');
3663
3664            $(window).scroll(function () {
3665                var currentScrollTop = $(window).scrollTop();
3666                if (currentScrollTop > scrollOffset) {
3667                    $('.sf-up').addClass('active');
3668                } else {
3669                    $('.sf-up').removeClass('active');
3670                }
3671            });
3672
3673
3674
3675            $('.sf-up').on("click", function (e) {
3676                e.preventDefault();
3677                var currentScrollTop = $(window).scrollTop();
3678                var animationTime = Math.round((currentScrollTop * 1000) / scrollSpeed);
3679                
3680                document.documentElement.style.transitionProperty = 'all';
3681                document.documentElement.style.transitionDuration = '0.8s';
3682                document.documentElement.style.transitionTimingFunction = 'ease';
3683                
3684                (function goTop() {
3685                    
3686                if (window.pageYOffset !== 0) {
3687                    window.scrollBy(0, -10);
3688                    setTimeout(goTop, 1);
3689                }
3690        
3691                })();
3692                $("html, body").animate({
3693                    scrollTop: 0
3694                }, scrollSpeed);
3695            });
3696
3697
3698
3699        }
3700    });
3701}(jQuery));
3702
3703setInterval(function () {
3704    var className = $('.sf-up').attr('class');
3705    if(className != null) {
3706        $('.usage .current-class').text(className.replace('active', ''));
3707        $('.usage .current-animation').text($('.animationEasing.active').data('value'));
3708        $('.usage .current-css').text($('#sf-up-style').attr('href'));
3709    }
3710}, 200);
3711$(document).ready(function() {
3712    function isParent(el) {
3713       if(el) {
3714           if(el.classList.contains('hide-show')) {
3715               return el
3716           } else {
3717               if(el.parentNode) return isParent(el.parentNode)
3718           }
3719       }
3720   }
3721   $('.hide-show-btn').on('click', function (e) {
3722       e.preventDefault();
3723       var el = isParent(e.currentTarget),
3724           target = e.currentTarget;
3725       if(el) {
3726           if(target.classList.contains('hide')) {
3727               el.classList.add('hidden')
3728           } else if(target.classList.contains('show')){
3729               el.classList.remove('hidden')
3730           }
3731       }
3732   });
3733});
3734/** Form 5 */
3735'use strict';
3736
3737/* FORMS */
3738(function ($) {
3739  $(document).ready(function () {
3740
3741    // Text based inputs
3742    var input_selector = ['text', 'password', 'email', 'url', 'tel', 'time', 'month', 'week', 'number', 'datetime', 'search', 'search-md', 'file'].map(function (selector) {
3743      return 'input[type=' + selector + ']';
3744    }).join(', ') + ', textarea';
3745
3746    var text_area_selector = 'textarea';
3747
3748    var update_text_fields = function update_text_fields($input) {
3749      var $form = $input.parent('.sf-form');
3750      var $labelAndIcon = $input.siblings('label, i');
3751      var hasValue = $input.val().length;
3752      var hasPlaceholder = $input.attr('placeholder');
3753      var label = $input.parent().hasClass('sf-form-label');
3754      // let isValid     = $input.validity.badInput === true;
3755      var addOrRemove = (hasValue || (hasPlaceholder && label) ? 'add' : 'remove') + 'Class';
3756
3757      $labelAndIcon[addOrRemove]('active');
3758      $input[addOrRemove]('active');
3759      $form[addOrRemove]('active');
3760    };
3761
3762    var validate_field = function validate_field($input) {
3763
3764      if ($input.hasClass('validate')) {
3765        var value = $input.val();
3766        var noValue = !value.length;
3767        var isValid = !$input[0].validity.badInput;
3768
3769        if (noValue && isValid) {
3770          $input.removeClass('valid').removeClass('invalid');
3771        } else {
3772          var valid = $input.is(':valid');
3773          var length = Number($input.attr('length')) || 0;
3774
3775          if (valid && (!length || length > value.length)) {
3776            $input.removeClass('invalid').addClass('valid');
3777          } else {
3778            $input.removeClass('valid').addClass('invalid');
3779          }
3780        }
3781      }
3782    };
3783
3784    var textarea_auto_resize = function textarea_auto_resize() {
3785
3786      var $textarea = $(undefined);
3787      if ($textarea.val().length) {
3788        var _$hiddenDiv = $('.hiddendiv');
3789        var fontFamily = $textarea.css('font-family');
3790        var fontSize = $textarea.css('font-size');
3791
3792        if (fontSize) {
3793          _$hiddenDiv.css('font-size', fontSize);
3794        }
3795        if (fontFamily) {
3796          _$hiddenDiv.css('font-family', fontFamily);
3797        }
3798        if ($textarea.attr('wrap') === 'off') {
3799          _$hiddenDiv.css('overflow-wrap', 'normal').css('white-space', 'pre');
3800        }
3801
3802        _$hiddenDiv.text($textarea.val() + '\n');
3803        var content = _$hiddenDiv.html().replace(/\n/g, '<br>');
3804        _$hiddenDiv.html(content);
3805
3806        // When textarea is hidden, width goes crazy.
3807        // Approximate with half of window size
3808        _$hiddenDiv.css('width', $textarea.is(':visible') ? $textarea.width() : $(window).width() / 2);
3809        $textarea.css('height', _$hiddenDiv.height());
3810      }
3811    };
3812
3813    // Set active on labels and icons (DOM ready scope);
3814    $(input_selector).each(function (index, input) {
3815      var $this = $(input);
3816      var $labelAndIcon = $this.siblings('label, i');
3817      //var par = $this.parent().hasClass('sf-form-label');
3818      //console.log($par)
3819      update_text_fields($this);
3820      var isValid = input.validity.badInput; // pure js
3821      //console.log($this)
3822      if (isValid && par == true) {
3823        //console.log(par)
3824        $labelAndIcon.addClass('active');
3825      }
3826    });
3827
3828    // Add active when element has focus
3829    $(document).on('focus', input_selector, function (e) {
3830      $(e.target).siblings('label, i').addClass('active');
3831      $(e.target).addClass('sf-form-focus');
3832    });
3833
3834    // Remove active on blur when not needed or invalid
3835    $(document).on('blur', input_selector, function (e) {
3836      var $this = $(e.target);
3837      var noValue = !$this.val();
3838      var invalid = !e.target.validity.badInput;
3839      var noPlaceholder = $this.attr('placeholder') === undefined;
3840
3841      if (noValue && invalid) {
3842        $this.siblings('label, i').removeClass('active');
3843      }
3844      $this.removeClass('sf-form-focus');
3845
3846      validate_field($this);
3847    });
3848
3849    // Add active if form auto complete
3850    $(document).on('change', input_selector, function (e) {
3851      var $this = $(e.target);
3852      update_text_fields($this);
3853      validate_field($this);
3854    });
3855
3856    // Handle HTML5 autofocus
3857    $('input[autofocus]').siblings('label, i').addClass('active');
3858
3859    // HTML form reset
3860    $(document).on('reset', function (e) {
3861      var $formReset = $(e.target);
3862      if ($formReset.is('form')) {
3863
3864        var $formInputs = $formReset.find(input_selector);
3865        // Reset inputs
3866        $formInputs.removeClass('valid').removeClass('invalid').each(function (index, input) {
3867          var $this = $(input);
3868          var noDefaultValue = !$this.val();
3869          var noPlaceholder = !$this.attr('placeholder');
3870          if (noDefaultValue) {
3871            $this.siblings('label, i').removeClass('active');
3872          }
3873        });
3874      }
3875    });
3876
3877    // Textarea auto extend
3878    if ($('textarea').length) {
3879      var init = function init() {
3880        var text = $('textarea');
3881        text.each(function () {
3882          var _this = this;
3883          function resize() {
3884            _this.style.height = 'auto';
3885            _this.style.height = _this.scrollHeight + 'px';
3886          }
3887          /* 0-timeout to get the already changed text */
3888          function delayedResize() {
3889            window.setTimeout(resize, 0);
3890          }
3891          observe(_this, 'change', resize);
3892          observe(_this, 'cut', delayedResize);
3893          observe(_this, 'paste', delayedResize);
3894          observe(_this, 'drop', delayedResize);
3895          observe(_this, 'keydown', delayedResize);
3896          resize();
3897        });
3898      };
3899
3900      var observe;
3901      if (window.attachEvent) {
3902        observe = function observe(element, event, handler) {
3903          element.attachEvent('on' + event, handler);
3904        };
3905      } else {
3906        observe = function observe(element, event, handler) {
3907          element.addEventListener(event, handler, false);
3908        };
3909      }
3910
3911      init();
3912    }
3913
3914    // Textarea Auto Resize
3915    if (!$('.hiddendiv').first().length) {
3916      $hiddenDiv = $('<div class="hiddendiv common"></div>');
3917      $('body').append($hiddenDiv);
3918    }
3919	
3920    if($("body").is("text_area_selector")){
3921       $(text_area_selector).each(textarea_auto_resize);
3922       $('body').on('keyup keydown', text_area_selector, textarea_auto_resize);
3923    }
3924  });
3925})(jQuery);
3926'use strict';
3927
3928(function($) {
3929
3930  $.fn.rkmd_rangeSlider = function() {
3931    var self, slider_width, slider_offset, curnt, sliderContinuous, sliderDiscrete, range, slider;
3932    self             = $(this);
3933    slider_width     = self.outerWidth();
3934    slider_offset    = self.offset().left;
3935
3936    sliderContinuous = $('.sf-form-range');
3937    sliderDiscrete   = $('.range-led');
3938
3939    //if(!this.classList.contain('range-led')) {
3940
3941      sliderContinuous.each(function(i, v) {
3942        if(!this.classList.contains('range-led')) {
3943          curnt         = $(this);
3944          curnt.append(sliderContinuous_tmplt());
3945          range         = curnt.find('input[type="range"]');
3946          slider        = curnt.find('.axis');
3947          slider_fill   = slider.find('.axis-segment');
3948          slider_handle = slider.find('.axis-pin');
3949
3950          var range_val = range.val();
3951          slider_fill.css('width', range_val +'%');
3952          slider_handle.css('left', range_val +'%');
3953        } else {
3954          //sliderDiscrete.each(function(i, v) {
3955            curnt         = $(this);
3956            curnt.append(sliderDiscrete_tmplt());
3957            range         = curnt.find('input[type="range"]');
3958            slider        = curnt.find('.axis');
3959            slider_fill   = slider.find('.axis-segment');
3960            slider_handle = slider.find('.axis-pin');
3961            slider_label  = slider.find('.axis-count');
3962    
3963            var range_val = parseInt(range.val());
3964            slider_fill.css('width', range_val +'%');
3965            slider_handle.css('left', range_val +'%');
3966            slider_label.find('span').text(range_val);
3967          //});
3968        }
3969      });
3970    //}
3971
3972    /*if(self.hasClass('range-led') === true) {
3973
3974      
3975    }*/
3976
3977    self.on('mousedown', '.axis-pin', function(e) {
3978      if(e.button === 2) {
3979        return false;
3980      }
3981
3982      var parents       = $(this).parents('.sf-form-range');
3983      var slider_width  = parents.outerWidth();
3984      var slider_offset = parents.offset().left;
3985      var check_range   = parents.find('input[type="range"]').is(':disabled');
3986
3987      if(check_range === true) {
3988        return false;
3989      }
3990
3991      if(parents.hasClass('range-led') === true) {
3992        $(this).addClass('is-active');
3993      }
3994      var handlers = {
3995        mousemove: function(e) {
3996          var slider_new_width = e.pageX - slider_offset;
3997
3998          if(slider_new_width <= slider_width && !(slider_new_width < '0')) {
3999            slider_move(parents, slider_new_width, slider_width);
4000          }
4001        },
4002        mouseup: function(e) {
4003          $(this).off(handlers);
4004
4005          if(parents.hasClass('range-led') === true) {
4006            parents.find('.is-active').removeClass('is-active');
4007          }
4008        }
4009      };
4010      $(document).on(handlers);
4011    });
4012
4013    self.on('mousedown', '.axis', function(e) {
4014      if(e.button === 2) {
4015        return false;
4016      }
4017
4018      var parents       = $(this).parents('.sf-form-range');
4019      var slider_width  = parents.outerWidth();
4020      var slider_offset = parents.offset().left;
4021      var check_range   = parents.find('input[type="range"]').is(':disabled');
4022
4023      if(check_range === true) {
4024        return false;
4025      }
4026
4027      var slider_new_width = e.pageX - slider_offset;
4028      if(slider_new_width <= slider_width && !(slider_new_width < '0')) {
4029        slider_move(parents, slider_new_width, slider_width);
4030      }
4031
4032      var handlers = {
4033        mouseup: function(e) {
4034          $(this).off(handlers);
4035        }
4036      };
4037      $(document).on(handlers);
4038
4039    });
4040  };
4041
4042  function sliderContinuous_tmplt() {
4043    var tmplt = '<div class="axis">' +
4044        '<div class="axis-segment"></div>' +
4045        '<div class="axis-pin"></div>' +
4046        '</div>';
4047
4048    return tmplt;
4049  }
4050  function sliderDiscrete_tmplt() {
4051    var tmplt = '<div class="axis">' +
4052        '<div class="axis-segment"></div>' +
4053        '<div class="axis-pin"><div class="axis-count"><span>0</span></div></div>' +
4054        '</div>';
4055
4056    return tmplt;
4057  }
4058  function slider_move(parents, newW, sliderW) {
4059    var slider_new_val = parseInt(Math.round(newW / sliderW * 100));
4060
4061    var slider_fill    = parents.find('.axis-segment');
4062    var slider_handle  = parents.find('.axis-pin');
4063    var range          = parents.find('input[type="range"]');
4064
4065    slider_fill.css('width', slider_new_val +'%');
4066    slider_handle.css({
4067      'left': slider_new_val +'%',
4068      'transition': 'none',
4069      '-webkit-transition': 'none',
4070      '-moz-transition': 'none'
4071    });
4072
4073    range.val(slider_new_val);
4074
4075    if(parents.hasClass('range-led') === true) {
4076      parents.find('.axis-pin span').text(slider_new_val);
4077    }
4078  }
4079
4080}(jQuery));
4081
4082
4083$(document).ready(function() {
4084  var el = document.body.querySelectorAll('.sf-form-range');
4085  if(el.length > 0)
4086    $('.sf-form-range').rkmd_rangeSlider();
4087});
4088'use strict';
4089
4090/** *****************
4091*  File input     *
4092******************/
4093/*(function ($) {
4094  
4095
4096  $(document).on('change', '.sf-form-file-input', function (e) {
4097    var $this = $(e.target);
4098    var $file_field = $this.closest('.file-field');
4099    var $path_input = $file_field.find('input.file-path');
4100    var files = $this[0].files;
4101    var file_names = [];
4102
4103    for (var i = 0; i < files.length; i++) {
4104      var file_name = files[i].name;
4105      file_names.push(file_name);
4106    }
4107
4108    $path_input.val(file_names.join(', '));
4109    $path_input.trigger('change');
4110  });
4111})(jQuery);*/
4112
4113window.addEventListener("DOMContentLoaded", function(e) {
4114  var sf_file = document.querySelectorAll('.sf-form-file-input');
4115  if(sf_file) {
4116    for(var k = 0; k < sf_file.length; k++) {
4117      var el = sf_file[k];
4118      if(el) {
4119        el.addEventListener('change', function(e) {
4120          var el = e.currentTarget,
4121            files = el.files,
4122            label = el.nextElementSibling,
4123            strFile = [];
4124            
4125          for(var k = 0; k < files.length; k++) strFile.push(files[k].name);
4126
4127          if(label) {
4128            if(strFile.length > 0) {
4129              if(label.tagName == "INPUT")
4130                label.setAttribute('value', strFile.join(', '));
4131              else {
4132                label.value = strFile.join(', ');
4133                label.style.height = label.scrollHeight + 'px';
4134              }
4135              label.classList.add('active')
4136            }
4137          }
4138        })
4139      }
4140    }
4141  }
4142})
4143'use strict';
4144
4145/* CHARACTER COUNTER */
4146
4147(function ($) {
4148
4149  $.fn.characterCounter = function () {
4150    return this.each(function () {
4151
4152      var itHasLengthAttribute = $(this).attr('length') !== undefined;
4153
4154      if (itHasLengthAttribute) {
4155        $(this).on('input', updateCounter);
4156        $(this).on('focus', updateCounter);
4157        $(this).on('blur', removeCounterElement);
4158
4159        addCounterElement($(this));
4160      }
4161    });
4162  };
4163
4164  function updateCounter() {
4165    var maxLength = Number($(this).attr('length'));
4166    var actualLength = Number($(this).val().length);
4167    var isValidLength = actualLength <= maxLength;
4168
4169    $(this).parent().find('span[class="character-counter"]').html(actualLength + '/' + maxLength);
4170
4171    addInputStyle(isValidLength, $(this));
4172  }
4173
4174  function addCounterElement($input) {
4175    var $counterElement = $('<span/>').addClass('character-counter').css('float', 'right').css('font-size', '12px').css('height', 1);
4176
4177    $input.parent().append($counterElement);
4178  }
4179
4180  function removeCounterElement() {
4181    $(this).parent().find('span[class="character-counter"]').html('');
4182  }
4183
4184  function addInputStyle(isValidLength, $input) {
4185    var inputHasInvalidClass = $input.hasClass('invalid');
4186    if (isValidLength && inputHasInvalidClass) {
4187      $input.removeClass('invalid');
4188    } else if (!isValidLength && !inputHasInvalidClass) {
4189      $input.removeClass('valid');
4190      $input.addClass('invalid');
4191    }
4192  }
4193
4194  $(document).ready(function () {
4195    $('input, textarea').characterCounter();
4196  });
4197})(jQuery);
4198'use strict';
4199
4200/*(function ($) {
4201
4202  $.fn.material_select = function (callback) {
4203    $(this).each(function () {
4204      var $select = $(this);
4205
4206      if ($select.hasClass('browser-default')) {
4207        return; // Continue to next (return false breaks out of entire loop)
4208      }
4209
4210      var multiple = Boolean($select.attr('multiple')),
4211          lastID = $select.data('select-id'); // Tear down structure if Select needs to be rebuilt
4212
4213      if (lastID) {
4214        $select.parent().find('span.caret').remove();
4215        $select.parent().find('input').remove();
4216
4217        $select.unwrap();
4218        $('ul#select-options-' + lastID).remove();
4219      }
4220
4221      // If destroying the select, remove the selelct-id and reset it to it's uninitialized state.
4222      if (callback === 'destroy') {
4223        $select.data('select-id', null).removeClass('initialized');
4224        return;
4225      }
4226
4227      var uniqueID = guid(); // Materialize.guid();
4228      $select.data('select-id', uniqueID);
4229      var wrapper = $('<div class="select-wrapper"></div>');
4230      wrapper.addClass($select.attr('class'));
4231      var options = $('<ul id="select-options-' + uniqueID + '" class="dropdown-content select-dropdown ' + (multiple ? 'multiple-select-dropdown' : '') + '"></ul>'),
4232          selectChildren = $select.children('option, optgroup'),
4233          valuesSelected = [],
4234          optionsHover = false;
4235
4236      var label = $select.find('option:selected').html() || $select.find('option:first').html() || '';
4237
4238      // Added to search
4239      var applySeachInList = function applySeachInList() {
4240
4241        var ul = $(this).closest('ul');
4242        var searchValue = $(this).val();
4243        var options = ul.find('li').find('span.filtrable');
4244
4245        options.each(function () {
4246          if (typeof this.outerHTML === 'string') {
4247            var liValue = this.textContent.toLowerCase();
4248
4249            if (liValue.indexOf(searchValue.toLowerCase()) === -1) {
4250              $(this).hide();
4251              $(this).parent().hide();
4252            } else {
4253              $(this).show();
4254              $(this).parent().show();
4255            }
4256          }
4257        });
4258      };
4259
4260      // Added to search
4261      var setSearchableOption = function setSearchableOption() {
4262        var placeholder = $select.attr('searchable');
4263        var element = $('<span class="search-wrap"><div class="md-form"><input type="text" class="search form-control" placeholder="' + placeholder + '"></div></span>');
4264        options.append(element);
4265        element.find('.search').keyup(applySeachInList);
4266      };
4267
4268      // Added to search
4269      var searchable = Boolean($select.attr('searchable'));
4270
4271      // Added to search
4272      if (searchable) {
4273        setSearchableOption();
4274      }
4275
4276      // Function that renders and appends the option taking into
4277      // account type and possible image icon.
4278      var appendOptionWithIcon = function appendOptionWithIcon(select, option, type) {
4279        // Add disabled attr if disabled
4280        var disabledClass = option.is(':disabled') ? 'disabled ' : '';
4281        var optgroupClass = type === 'optgroup-option' ? 'optgroup-option ' : '';
4282
4283        // add icons
4284        var icon_url = option.data('icon');
4285        var classes = option.attr('class');
4286        if (icon_url) {
4287          var classString = '';
4288          if (classes) {
4289            classString = ' class="' + classes + '"';
4290          }
4291
4292          // Check for multiple type.
4293          if (type === 'multiple') {
4294            options.append($('<li class="' + disabledClass + '"><img alt="" src="' + icon_url + '"' + classString + '><span class="filtrable"><input class="form-check-input" type="checkbox"' + disabledClass + '/><label></label>' + option.html() + '</span></li>'));
4295          } else {
4296            options.append($('<li class="' + disabledClass + optgroupClass + '"><img alt="" src="' + icon_url + '"' + classString + '><span class="filtrable">' + option.html() + '</span></li>'));
4297          }
4298          return true;
4299        }
4300
4301        // Check for multiple type.
4302        if (type === 'multiple') {
4303          options.append($('<li class="' + disabledClass + '"><span class="filtrable"><input class="form-check-input" type="checkbox"' + disabledClass + '/><label></label>' + option.html() + '</span></li>'));
4304        } else {
4305          options.append($('<li class="' + disabledClass + optgroupClass + '"><span class="filtrable">' + option.html() + '</span></li>'));
4306        }
4307      };
4308
4309      if (selectChildren.length) {
4310        selectChildren.each(function () {
4311          if ($(this).is('option')) {
4312            // Direct descendant option.
4313            if (multiple) {
4314              appendOptionWithIcon($select, $(this), 'multiple');
4315            } else {
4316              appendOptionWithIcon($select, $(this));
4317            }
4318          } else if ($(this).is('optgroup')) {
4319            // Optgroup.
4320            var selectOptions = $(this).children('option');
4321            options.append($('<li class="optgroup"><span>' + $(this).attr('label') + '</span></li>'));
4322
4323            selectOptions.each(function () {
4324              appendOptionWithIcon($select, $(this), 'optgroup-option');
4325            });
4326          }
4327        });
4328      }
4329
4330      // Check for optgroups
4331      var optgroup = false;
4332      if ($select.find('optgroup').length) {
4333        optgroup = true;
4334      }
4335
4336      // Added to save
4337      var saveSelect = $select.parent().find('button.btn-save');
4338      var setSaveOption = function setSaveOption() {
4339        options.append(saveSelect);
4340      };
4341
4342      // Save click trigger
4343      if (saveSelect.length) {
4344        setSaveOption();
4345        saveSelect.on('click', function () {
4346          $('input.select-dropdown').trigger('close');
4347        });
4348      }
4349
4350      options.find('li:not(.optgroup)').each(function (i) {
4351        $(this).click(function (e) {
4352          // Check if option element is disabled
4353          if (!$(this).hasClass('disabled') && !$(this).hasClass('optgroup')) {
4354            var selected = true;
4355
4356            if (multiple) {
4357              $('input[type="checkbox"]', this).prop('checked', function (i, v) {
4358                return !v;
4359              });
4360              if (searchable) {
4361                if (optgroup) {
4362                  selected = toggleEntryFromArray(valuesSelected, $(this).index() - $(this).prevAll('.optgroup').length - 1, $select);
4363                } else {
4364                  selected = toggleEntryFromArray(valuesSelected, $(this).index() - 1, $select);
4365                }
4366              } else if (optgroup) {
4367                selected = toggleEntryFromArray(valuesSelected, $(this).index() - $(this).prevAll('.optgroup').length, $select);
4368              } else {
4369                selected = toggleEntryFromArray(valuesSelected, $(this).index(), $select);
4370              }
4371              $newSelect.trigger('focus');
4372            } else {
4373              options.find('li').removeClass('active');
4374              $(this).toggleClass('active');
4375              $newSelect.val($(this).text());
4376            }
4377
4378            activateOption(options, $(this));
4379            $select.find('option').eq(i).prop('selected', selected);
4380            // Trigger onchange() event
4381            $select.trigger('change');
4382            if (typeof callback !== 'undefined') {
4383              callback();
4384            }
4385          }
4386
4387          e.stopPropagation();
4388        });
4389      });
4390
4391      // Wrap Elements
4392      $select.wrap(wrapper);
4393      // Add Select Display Element
4394      var dropdownIcon = $('<span class="caret">&#9660;</span>');
4395      if ($select.is(':disabled')) {
4396        dropdownIcon.addClass('disabled');
4397      }
4398
4399      // escape double quotes
4400      var sanitizedLabelHtml = label.replace(/"/g, '&quot;');
4401
4402      var $newSelect = $('<input type="text" class="select-dropdown" readonly="true" ' + ($select.is(':disabled') ? 'disabled' : '') + ' data-activates="select-options-' + uniqueID + '" value="' + s
4402anitizedLabelHtml + '"/>');
4403      $select.before($newSelect);
4404      $newSelect.before(dropdownIcon);
4405
4406      $newSelect.after(options);
4407      // Check if section element is disabled
4408      if (!$select.is(':disabled')) {
4409        $newSelect.dropdown({
4410          hover: false,
4411          closeOnClick: false
4412        });
4413      }
4414
4415      // Copy tabindex
4416      if ($select.attr('tabindex')) {
4417        $($newSelect[0]).attr('tabindex', $select.attr('tabindex'));
4418      }
4419
4420      $select.addClass('initialized');
4421
4422      $newSelect.on({
4423        focus: function focus() {
4424          if ($('ul.select-dropdown').not(options[0]).is(':visible')) {
4425            $('input.select-dropdown').trigger('close');
4426          }
4427          if (!options.is(':visible')) {
4428            $(this).trigger('open', ['focus']);
4429            var _label = $(this).val();
4430            var selectedOption = options.find('li').filter(function () {
4431              return $(this).text().toLowerCase() === _label.toLowerCase();
4432            })[0];
4433            activateOption(options, selectedOption);
4434          }
4435        },
4436        click: function click(e) {
4437          e.stopPropagation();
4438        }
4439      });
4440
4441      // Changed to search to treat search
4442      $newSelect.on('blur', function () {
4443
4444        if (!multiple && !searchable) {
4445          $(this).trigger('close');
4446        }
4447        options.find('li.selected').removeClass('selected');
4448      });
4449
4450      // Added to search
4451      if (!multiple && searchable) {
4452        options.find('li').on('click', function () {
4453          $newSelect.trigger('close');
4454        });
4455      }
4456
4457      options.hover(function () {
4458        optionsHover = true;
4459      }, function () {
4460        optionsHover = false;
4461      });
4462
4463      // if select is wrapped in modal prevent hiding
4464      options.on('mousedown', function (e) {
4465        if ($('.modal-content').find(options).length) {
4466          if (this.scrollHeight > this.offsetHeight) {
4467            e.preventDefault();
4468          }
4469        }
4470      });
4471
4472      // Changed to search to treat search
4473      $(window).on({
4474        click: function click() {
4475          (multiple || searchable) && (optionsHover || $newSelect.trigger('close'));
4476        }
4477      });
4478
4479      // Add initial multiple selections.
4480      if (multiple) {
4481        $select.find('option:selected:not(:disabled)').each(function () {
4482          var index = $(this).index();
4483
4484          toggleEntryFromArray(valuesSelected, index, $select);
4485          options.find('li').eq(index).find(':checkbox').prop('checked', true);
4486        });
4487      }
4488
4489      // Make option as selected and scroll to selected position
4490      var activateOption = function activateOption(collection, newOption) {
4491        if (newOption) {
4492          collection.find('li.selected').removeClass('selected');
4493          var option = $(newOption);
4494          option.addClass('selected');
4495          // commented because it causes problems in multiselect with many options
4496          // options.scrollTo(option)
4497        }
4498      };
4499
4500      // Allow user to search by typing
4501      // this array is cleared after 1 second
4502      var filterQuery = [],
4503          onKeyDown = function onKeyDown(e) {
4504        // TAB - switch to another input
4505        if (e.which == 9) {
4506          $newSelect.trigger('close');
4507          return;
4508        }
4509
4510        // ARROW DOWN WHEN SELECT IS CLOSED - open select options
4511        if (e.which == 40 && !options.is(':visible')) {
4512          $newSelect.trigger('open');
4513          return;
4514        }
4515
4516        // ENTER WHEN SELECT IS CLOSED - submit form
4517        if (e.which == 13 && !options.is(':visible')) {
4518          return;
4519        }
4520
4521        e.preventDefault();
4522
4523        // CASE WHEN USER TYPE LETTERS
4524        var letter = String.fromCharCode(e.which).toLowerCase(),
4525            nonLetters = [9, 13, 27, 38, 40];
4526        if (letter && nonLetters.indexOf(e.which) === -1) {
4527          filterQuery.push(letter);
4528
4529          var string = filterQuery.join(''),
4530              newOption = options.find('li').filter(function () {
4531            return $(this).text().toLowerCase().indexOf(string) === 0;
4532          })[0];
4533
4534          if (newOption) {
4535            activateOption(options, newOption);
4536          }
4537        }
4538
4539        // ENTER - select option and close when select options are opened
4540        if (e.which == 13) {
4541          var activeOption = options.find('li.selected:not(.disabled)')[0];
4542          if (activeOption) {
4543            $(activeOption).trigger('click');
4544            if (!multiple) {
4545              $newSelect.trigger('close');
4546            }
4547          }
4548        }
4549
4550        // ARROW DOWN - move to next not disabled option
4551        if (e.which == 40) {
4552          if (options.find('li.selected').length) {
4553            newOption = options.find('li.selected').next('li:not(.disabled)')[0];
4554          } else {
4555            newOption = options.find('li:not(.disabled)')[0];
4556          }
4557          activateOption(options, newOption);
4558        }
4559
4560        // ESC - close options
4561        if (e.which == 27) {
4562          $newSelect.trigger('close');
4563        }
4564
4565        // ARROW UP - move to previous not disabled option
4566        if (e.which == 38) {
4567          newOption = options.find('li.selected').prev('li:not(.disabled)')[0];
4568          if (newOption) {
4569            activateOption(options, newOption);
4570          }
4571        }
4572
4573        // Automaticaly clean filter query so user can search again by starting letters
4574        setTimeout(function () {
4575          filterQuery = [];
4576        }, 1000);
4577      };
4578
4579      $newSelect.on('keydown', onKeyDown);
4580    });
4581
4582    function toggleEntryFromArray(entriesArray, entryIndex, select) {
4583      var index = entriesArray.indexOf(entryIndex),
4584          notAdded = index === -1;
4585
4586      if (notAdded) {
4587        entriesArray.push(entryIndex);
4588      } else {
4589        entriesArray.splice(index, 1);
4590      }
4591
4592      select.siblings('ul.dropdown-content').find('li:not(.optgroup)').eq(entryIndex).toggleClass('active');
4593
4594      // use notAdded instead of true (to detect if the option is selected or not)
4595      select.find('option').eq(entryIndex).prop('selected', notAdded);
4596      setValueToInput(entriesArray, select);
4597
4598      return notAdded;
4599    }
4600
4601    function setValueToInput(entriesArray, select) {
4602      var value = '';
4603
4604      for (var i = 0, count = entriesArray.length; i < count; i++) {
4605        var text = select.find('option').eq(entriesArray[i]).text();
4606
4607        i === 0 ? value += text : value += ', ' + text;
4608      }
4609
4610      if (value === '') {
4611        value = select.find('option:disabled').eq(0).text();
4612      }
4613
4614      select.siblings('input.select-dropdown').val(value);
4615    }
4616    // };
4617
4618    function guid() {
4619      var d = new Date().getTime();
4620      var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
4621        var r = (d + Math.random() * 16) % 16 | 0;
4622        d = Math.floor(d / 16);
4623        return (c == 'x' ? r : r & 0x3 | 0x8).toString(16);
4624      });
4625      return uuid;
4626    }
4627  };
4628
4629
4630
4631})(jQuery);
4632
4633jQuery('select').siblings('input.select-dropdown').on('mousedown', function (e) {
4634  if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
4635    if (e.clientX >= e.target.clientWidth || e.clientY >= e.target.clientHeight) {
4636      e.preventDefault();
4637    }
4638  }
4639});
4640
4641$(document).ready(function() {
4642  $('.mdb-select').material_select();
4643});*/
4644
4645window.addEventListener('DOMContentLoaded', function(e) {
4646  var x, i, j, selElmnt, a, b, c;
4647/*look for any elements with the class "custom-select":*/
4648x = document.getElementsByClassName("sf-form-select");
4649
4650for (i = 0; i < x.length; i++) {
4651  selElmnt = x[i].getElementsByTagName("select")[0];
4652  /*for each element, create a new DIV that will act as the selected item:*/
4653  a = x[i].querySelector('label');
4654  //a.setAttribute("class", "select-selected");
4655  a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
4656  //x[i].appendChild(a);
4657  /*for each element, create a new DIV that will contain the option list:*/
4658  b = document.createElement("DIV");
4659  b.setAttribute("class", "select-items inactive");
4660  for (j = 0; j < selElmnt.length; j++) {
4661    /*for each option in the original select element,
4662    create a new DIV that will act as an option item:*/
4663    c = document.createElement("DIV");
4664    c.innerHTML = selElmnt.options[j].innerHTML;
4665    
4666    c.addEventListener("click", function(e) {
4667        /*when an item is clicked, update the original select box,
4668        and the selected item:*/
4669        var y, i, k, s, h;
4670        s = this.parentNode.parentNode.getElementsByTagName("select")[0];
4671        h = this.parentNode.parentNode.querySelector('label');
4672        for (i = 0; i < s.length; i++) {
4673          if (s.options[i].innerHTML == this.innerHTML) {
4674            s.selectedIndex = i;
4675            h.innerHTML = this.innerHTML;
4676            y = this.parentNode.getElementsByClassName("same-as-selected");
4677            for (k = 0; k < y.length; k++) {
4678              y[k].removeAttribute("class");
4679            }
4680            this.setAttribute("class", "same-as-selected");
4681            break;
4682          }
4683        }
4684        h.click();
4685    });
4686    b.appendChild(c);
4687  }
4688  x[i].appendChild(b);
4689
4690  a.addEventListener("click", function(e) {
4691      e.stopPropagation();
4692      var slc = this.parentNode.querySelector('.select-items');
4693      if(slc.classList.contains('inactive'))
4694        slc.classList.remove("inactive");
4695      else slc.classList.add('inactive')
4696      this.classList.toggle("active");
4697      this.parentNode.toggle('active');
4698  });
4699}
4700function closeAllSelect(e) {
4701  var allslc = document.body.querySelectorAll('.sf-form-select');
4702  
4703  if(e.target.parentNode !== null)
4704    var _this = e.target.parentNode.querySelector('label');
4705
4706  for(var k = 0; k < allslc.length; k++) {
4707    var slc = allslc[k],
4708      label = slc.querySelector('label'),
4709      opt = slc.querySelector('.select-items');
4710      if(label != _this) {
4711        label.classList.remove('active');
4712        opt.classList.add('inactive');
4713      }
4714  }
4715}
4716document.addEventListener("click", closeAllSelect);
4717});
4718Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
4719
4720  function _defineProperties(target, props) {
4721    for (var i = 0; i < props.length; i++) {
4722      var descriptor = props[i];
4723      descriptor.enumerable = descriptor.enumerable || false;
4724      descriptor.configurable = true;
4725      if ("value" in descriptor) descriptor.writable = true;
4726      Object.defineProperty(target, descriptor.key, descriptor);
4727    }
4728  }
4729
4730  function _createClass(Constructor, protoProps, staticProps) {
4731    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
4732    if (staticProps) _defineProperties(Constructor, staticProps);
4733    return Constructor;
4734  }
4735
4736  function _defineProperty(obj, key, value) {
4737    if (key in obj) {
4738      Object.defineProperty(obj, key, {
4739        value: value,
4740        enumerable: true,
4741        configurable: true,
4742        writable: true
4743      });
4744    } else {
4745      obj[key] = value;
4746    }
4747
4748    return obj;
4749  }
4750
4751  function _objectSpread(target) {
4752    for (var i = 1; i < arguments.length; i++) {
4753      var source = arguments[i] != null ? arguments[i] : {};
4754      var ownKeys = Object.keys(source);
4755
4756      if (typeof Object.getOwnPropertySymbols === 'function') {
4757        ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
4758          return Object.getOwnPropertyDescriptor(source, sym).enumerable;
4759        }));
4760      }
4761
4762      ownKeys.forEach(function (key) {
4763        _defineProperty(target, key, source[key]);
4764      });
4765    }
4766
4767    return target;
4768  }
4769
4770  function _inheritsLoose(subClass, superClass) {
4771    subClass.prototype = Object.create(superClass.prototype);
4772    subClass.prototype.constructor = subClass;
4773    subClass.__proto__ = superClass;
4774  }
4775/**
4776   * --------------------------------------------------------------------------
4777   * Bootstrap (v4.3.1): util/index.js
4778   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4779   * --------------------------------------------------------------------------
4780   */
4781  var MAX_UID = 1000000;
4782  var MILLISECONDS_MULTIPLIER = 1000;
4783  var TRANSITION_END = 'transitionend';
4784  var _window = window,
4785      jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
4786
4787  var toType = function toType(obj) {
4788    return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
4789  };
4790  /**
4791   * --------------------------------------------------------------------------
4792   * Public Util Api
4793   * --------------------------------------------------------------------------
4794   */
4795
4796
4797  var getUID = function getUID(prefix) {
4798    do {
4799      // eslint-disable-next-line no-bitwise
4800      prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
4801    } while (document.getElementById(prefix));
4802
4803    return prefix;
4804  };
4805
4806  var getSelectorFromElement = function getSelectorFromElement(element) {
4807    var selector = element.getAttribute('data-target');
4808
4809    if (!selector || selector === '#') {
4810      var hrefAttr = element.getAttribute('href');
4811      selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
4812    }
4813
4814    try {
4815      return document.querySelector(selector) ? selector : null;
4816    } catch (error) {
4817      return null;
4818    }
4819  };
4820
4821  var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
4822    if (!element) {
4823      return 0;
4824    } // Get transition-duration of the element
4825
4826
4827    var _window$getComputedSt = window.getComputedStyle(element),
4828        transitionDuration = _window$getComputedSt.transitionDuration,
4829        transitionDelay = _window$getComputedSt.transitionDelay;
4830
4831    var floatTransitionDuration = parseFloat(transitionDuration);
4832    var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
4833
4834    if (!floatTransitionDuration && !floatTransitionDelay) {
4835      return 0;
4836    } // If multiple durations are defined, take the first
4837
4838
4839    transitionDuration = transitionDuration.split(',')[0];
4840    transitionDelay = transitionDelay.split(',')[0];
4841    return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
4842  };
4843
4844  var triggerTransitionEnd = function triggerTransitionEnd(element) {
4845    element.dispatchEvent(new Event(TRANSITION_END));
4846  };
4847
4848  var isElement = function isElement(obj) {
4849    return (obj[0] || obj).nodeType;
4850  };
4851
4852  var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
4853    var called = false;
4854    var durationPadding = 5;
4855    var emulatedDuration = duration + durationPadding;
4856
4857    function listener() {
4858      called = true;
4859      element.removeEventListener(TRANSITION_END, listener);
4860    }
4861
4862    element.addEventListener(TRANSITION_END, listener);
4863    setTimeout(function () {
4864      if (!called) {
4865        triggerTransitionEnd(element);
4866      }
4867    }, emulatedDuration);
4868  };
4869
4870  var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
4871    Object.keys(configTypes).forEach(function (property) {
4872      var expectedTypes = configTypes[property];
4873      var value = config[property];
4874      var valueType = value && isElement(value) ? 'element' : toType(value);
4875
4876      if (!new RegExp(expectedTypes).test(valueType)) {
4877        throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
4878      }
4879    });
4880  };
4881
4882  var makeArray = function makeArray(nodeList) {
4883    if (!nodeList) {
4884      return [];
4885    }
4886
4887    return [].slice.call(nodeList);
4888  };
4889
4890  var isVisible = function isVisible(element) {
4891    if (!element) {
4892      return false;
4893    }
4894
4895    if (element.style && element.parentNode && element.parentNode.style) {
4896      return element.style.display !== 'none' && element.parentNode.style.display !== 'none' && element.style.visibility !== 'hidden';
4897    }
4898
4899    return false;
4900  };
4901
4902  var findShadowRoot = function findShadowRoot(element) {
4903    if (!document.documentElement.attachShadow) {
4904      return null;
4905    } // Can find the shadow root otherwise it'll return the document
4906
4907
4908    if (typeof element.getRootNode === 'function') {
4909      var root = element.getRootNode();
4910      return root instanceof ShadowRoot ? root : null;
4911    }
4912
4913    if (element instanceof ShadowRoot) {
4914      return element;
4915    } // when we don't find a shadow root
4916
4917
4918    if (!element.parentNode) {
4919      return null;
4920    }
4921
4922    return findShadowRoot(element.parentNode);
4923  }; // eslint-disable-next-line no-empty-function
4924
4925
4926  var noop = function noop() {
4927    return function () {};
4928  };
4929
4930  var reflow = function reflow(element) {
4931    return element.offsetHeight;
4932  };
4933/**
4934   * --------------------------------------------------------------------------
4935   * Bootstrap (v4.3.1): dom/data.js
4936   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4937   * --------------------------------------------------------------------------
4938   */
4939
4940  /**
4941   * ------------------------------------------------------------------------
4942   * Constants
4943   * ------------------------------------------------------------------------
4944   */
4945  var mapData = function () {
4946    var storeData = {};
4947    var id = 1;
4948    return {
4949      set: function set(element, key, data) {
4950        if (typeof element.key === 'undefined') {
4951          element.key = {
4952            key: key,
4953            id: id
4954          };
4955          id++;
4956        }
4957
4958        storeData[element.key.id] = data;
4959      },
4960      get: function get(element, key) {
4961        if (!element || typeof element.key === 'undefined') {
4962          return null;
4963        }
4964
4965        var keyProperties = element.key;
4966
4967        if (keyProperties.key === key) {
4968          return storeData[keyProperties.id];
4969        }
4970
4971        return null;
4972      },
4973      delete: function _delete(element, key) {
4974        if (typeof element.key === 'undefined') {
4975          return;
4976        }
4977
4978        var keyProperties = element.key;
4979
4980        if (keyProperties.key === key) {
4981          delete storeData[keyProperties.id];
4982          delete element.key;
4983        }
4984      }
4985    };
4986  }();
4987
4988  var Data = {
4989    setData: function setData(instance, key, data) {
4990      mapData.set(instance, key, data);
4991    },
4992    getData: function getData(instance, key) {
4993      return mapData.get(instance, key);
4994    },
4995    removeData: function removeData(instance, key) {
4996      mapData.delete(instance, key);
4997    }
4998  };
4999/**
5000   * --------------------------------------------------------------------------
5001   * Bootstrap (v4.3.1): dom/polyfill.js
5002   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5003   * --------------------------------------------------------------------------
5004   */
5005  /* istanbul ignore next */
5006
5007  var Polyfill = function () {
5008    // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
5009    var defaultPreventedPreservedOnDispatch = function () {
5010      var e = new CustomEvent('Bootstrap', {
5011        cancelable: true
5012      });
5013      var element = document.createElement('div');
5014      element.addEventListener('Bootstrap', function () {
5015        return null;
5016      });
5017      e.preventDefault();
5018      element.dispatchEvent(e);
5019      return e.defaultPrevented;
5020    }();
5021
5022    var find = Element.prototype.querySelectorAll;
5023    var findOne = Element.prototype.querySelector;
5024    var scopeSelectorRegex = /:scope\b/;
5025
5026    var supportScopeQuery = function () {
5027      var element = document.createElement('div');
5028
5029      try {
5030        element.querySelectorAll(':scope *');
5031      } catch (error) {
5032        return false;
5033      }
5034
5035      return true;
5036    }();
5037
5038    if (!supportScopeQuery) {
5039      find = function find(selector) {
5040        if (!scopeSelectorRegex.test(selector)) {
5041          return this.querySelectorAll(selector);
5042        }
5043
5044        var hasId = Boolean(this.id);
5045
5046        if (!hasId) {
5047          this.id = getUID('scope');
5048        }
5049
5050        var nodeList = null;
5051
5052        try {
5053          selector = selector.replace(scopeSelectorRegex, "#" + this.id);
5054          nodeList = this.querySelectorAll(selector);
5055        } finally {
5056          if (!hasId) {
5057            this.removeAttribute('id');
5058          }
5059        }
5060
5061        return nodeList;
5062      };
5063
5064      findOne = function findOne(selector) {
5065        if (!scopeSelectorRegex.test(selector)) {
5066          return this.querySelector(selector);
5067        }
5068
5069        var matches = find.call(this, selector);
5070
5071        if (typeof matches[0] !== 'undefined') {
5072          return matches[0];
5073        }
5074
5075        return null;
5076      };
5077    }
5078
5079    return {
5080      defaultPreventedPreservedOnDispatch: defaultPreventedPreservedOnDispatch,
5081      find: find,
5082      findOne: findOne
5083    };
5084  }();
5085/**
5086   * --------------------------------------------------------------------------
5087   * Bootstrap (v4.3.1): dom/eventHandler.js
5088   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5089   * --------------------------------------------------------------------------
5090   */
5091  /**
5092   * ------------------------------------------------------------------------
5093   * Constants
5094   * ------------------------------------------------------------------------
5095   */
5096
5097  var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
5098  var stripNameRegex = /\..*/;
5099  var keyEventRegex = /^key/;
5100  var stripUidRegex = /::\d+$/;
5101  var eventRegistry = {}; // Events storage
5102
5103  var uidEvent = 1;
5104  var customEvents = {
5105    mouseenter: 'mouseover',
5106    mouseleave: 'mouseout'
5107  };
5108  var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
5109  /**
5110   * ------------------------------------------------------------------------
5111   * Private methods
5112   * ------------------------------------------------------------------------
5113   */
5114
5115  function getUidEvent(element, uid) {
5116    return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
5117  }
5118
5119  function getEvent(element) {
5120    var uid = getUidEvent(element);
5121    element.uidEvent = uid;
5122    eventRegistry[uid] = eventRegistry[uid] || {};
5123    return eventRegistry[uid];
5124  }
5125
5126  function fixEvent(event, element) {
5127    // Add which for key events
5128    if (event.which === null && keyEventRegex.test(event.type)) {
5129      event.which = event.charCode === null ? event.keyCode : event.charCode;
5130    }
5131
5132    event.delegateTarget = element;
5133  }
5134
5135  function bootstrapHandler(element, fn) {
5136    return function handler(event) {
5137      fixEvent(event, element);
5138
5139      if (handler.oneOff) {
5140        EventHandler.off(element, event.type, fn);
5141      }
5142
5143      return fn.apply(element, [event]);
5144    };
5145  }
5146
5147  function bootstrapDelegationHandler(element, selector, fn) {
5148    return function handler(event) {
5149      var domElements = element.querySelectorAll(selector);
5150
5151      for (var target = event.target; target && target !== this; target = target.parentNode) {
5152        for (var i = domElements.length; i--;) {
5153          if (domElements[i] === target) {
5154            fixEvent(event, target);
5155
5156            if (handler.oneOff) {
5157              EventHandler.off(element, event.type, fn);
5158            }
5159
5160            return fn.apply(target, [event]);
5161          }
5162        }
5163      } // To please ESLint
5164
5165
5166      return null;
5167    };
5168  }
5169
5170  function findHandler(events, handler, delegationSelector) {
5171    if (delegationSelector === void 0) {
5172      delegationSelector = null;
5173    }
5174
5175    var uidList = Object.keys(events);
5176
5177    for (var i = 0; i < uidList.length; i++) {
5178      var uid = uidList[i];
5179      var event = events[uid];
5180
5181      if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
5182        return events[uid];
5183      }
5184    }
5185
5186    return null;
5187  }
5188
5189  function normalizeParams(originalTypeEvent, handler, delegationFn) {
5190    var delegation = typeof handler === 'string';
5191    var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
5192
5193    var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
5194    var custom = customEvents[typeEvent];
5195
5196    if (custom) {
5197      typeEvent = custom;
5198    }
5199
5200    var isNative = nativeEvents.indexOf(typeEvent) > -1;
5201
5202    if (!isNative) {
5203      typeEvent = originalTypeEvent;
5204    }
5205
5206    return [delegation, originalHandler, typeEvent];
5207  }
5208
5209  function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
5210    if (typeof originalTypeEvent !== 'string' || !element) {
5211      return;
5212    }
5213
5214    if (!handler) {
5215      handler = delegationFn;
5216      delegationFn = null;
5217    }
5218
5219    var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
5220        delegation = _normalizeParams[0],
5221        originalHandler = _normalizeParams[1],
5222        typeEvent = _normalizeParams[2];
5223
5224    var events = getEvent(element);
5225    var handlers = events[typeEvent] || (events[typeEvent] = {});
5226    var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
5227
5228    if (previousFn) {
5229      previousFn.oneOff = previousFn.oneOff && oneOff;
5230      return;
5231    }
5232
5233    var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
5234    var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
5235    fn.delegationSelector = delegation ? handler : null;
5236    fn.originalHandler = originalHandler;
5237    fn.oneOff = oneOff;
5238    fn.uidEvent = uid;
5239    handlers[uid] = fn;
5240    element.addEventListener(typeEvent, fn, delegation);
5241  }
5242
5243  function removeHandler(element, events, typeEvent, handler, delegationSelector) {
5244    var fn = findHandler(events[typeEvent], handler, delegationSelector);
5245
5246    if (fn === null) {
5247      return;
5248    }
5249
5250    element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
5251    delete events[typeEvent][fn.uidEvent];
5252  }
5253
5254  function removeNamespacedHandlers(element, events, typeEvent, namespace) {
5255    var storeElementEvent = events[typeEvent] || {};
5256    Object.keys(storeElementEvent).forEach(function (handlerKey) {
5257      if (handlerKey.indexOf(namespace) > -1) {
5258        var event = storeElementEvent[handlerKey];
5259        removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
5260      }
5261    });
5262  }
5263
5264  var EventHandler = {
5265    on: function on(element, event, handler, delegationFn) {
5266      addHandler(element, event, handler, delegationFn, false);
5267    },
5268    one: function one(element, event, handler, delegationFn) {
5269      addHandler(element, event, handler, delegationFn, true);
5270    },
5271    off: function off(element, originalTypeEvent, handler, delegationFn) {
5272      if (typeof originalTypeEvent !== 'string' || !element) {
5273        return;
5274      }
5275
5276      var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
5277          delegation = _normalizeParams2[0],
5278          originalHandler = _normalizeParams2[1],
5279          typeEvent = _normalizeParams2[2];
5280
5281      var inNamespace = typeEvent !== originalTypeEvent;
5282      var events = getEvent(element);
5283      var isNamespace = originalTypeEvent.charAt(0) === '.';
5284
5285      if (typeof originalHandler !== 'undefined') {
5286        // Simplest case: handler is passed, remove that listener ONLY.
5287        if (!events || !events[typeEvent]) {
5288          return;
5289        }
5290
5291        removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
5292        return;
5293      }
5294
5295      if (isNamespace) {
5296        Object.keys(events).forEach(function (elementEvent) {
5297          removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.substr(1));
5298        });
5299      }
5300
5301      var storeElementEvent = events[typeEvent] || {};
5302      Object.keys(storeElementEvent).forEach(function (keyHandlers) {
5303        var handlerKey = keyHandlers.replace(stripUidRegex, '');
5304
5305        if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
5306          var event = storeElementEvent[keyHandlers];
5307          removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
5308        }
5309      });
5310    },
5311    trigger: function trigger(element, event, args) {
5312      if (typeof event !== 'string' || !element) {
5313        return null;
5314      }
5315
5316      var typeEvent = event.replace(stripNameRegex, '');
5317      var inNamespace = event !== typeEvent;
5318      var isNative = nativeEvents.indexOf(typeEvent) > -1;
5319      var jQueryEvent;
5320      var bubbles = true;
5321      var nativeDispatch = true;
5322      var defaultPrevented = false;
5323      var evt = null;
5324
5325      if (inNamespace && typeof jQuery !== 'undefined') {
5326        jQueryEvent = jQuery.Event(event, args);
5327        jQuery(element).trigger(jQueryEvent);
5328        bubbles = !jQueryEvent.isPropagationStopped();
5329        nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
5330        defaultPrevented = jQueryEvent.isDefaultPrevented();
5331      }
5332
5333      if (isNative) {
5334        evt = document.createEvent('HTMLEvents');
5335        evt.initEvent(typeEvent, bubbles, true);
5336      } else {
5337        evt = new CustomEvent(event, {
5338          bubbles: bubbles,
5339          cancelable: true
5340        });
5341      } // merge custom informations in our event
5342
5343
5344      if (typeof args !== 'undefined') {
5345        Object.keys(args).forEach(function (key) {
5346          Object.defineProperty(evt, key, {
5347            get: function get() {
5348              return args[key];
5349            }
5350          });
5351        });
5352      }
5353
5354      if (defaultPrevented) {
5355        evt.preventDefault();
5356
5357        if (!Polyfill.defaultPreventedPreservedOnDispatch) {
5358          Object.defineProperty(evt, 'defaultPrevented', {
5359            get: function get() {
5360              return true;
5361            }
5362          });
5363        }
5364      }
5365
5366      if (nativeDispatch) {
5367        element.dispatchEvent(evt);
5368      }
5369
5370      if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
5371        jQueryEvent.preventDefault();
5372      }
5373
5374      return evt;
5375    }
5376  };
5377  /**
5378   * --------------------------------------------------------------------------
5379   * Bootstrap (v4.3.1): dom/selectorEngine.js
5380   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5381   * --------------------------------------------------------------------------
5382   */
5383  /**
5384   * ------------------------------------------------------------------------
5385   * Constants
5386   * ------------------------------------------------------------------------
5387   */
5388
5389  var findFn = Polyfill.find,
5390      _findOne = Polyfill.findOne;
5391  var NODE_TEXT = 3;
5392  var SelectorEngine = {
5393    matches: function matches(element, selector) {
5394      return element.matches(selector);
5395    },
5396    find: function find(selector, element) {
5397      if (element === void 0) {
5398        element = document.documentElement;
5399      }
5400
5401      if (typeof selector !== 'string') {
5402        return null;
5403      }
5404
5405      return findFn.call(element, selector);
5406    },
5407    findOne: function findOne(selector, element) {
5408      if (element === void 0) {
5409        element = document.documentElement;
5410      }
5411
5412      if (typeof selector !== 'string') {
5413        return null;
5414      }
5415
5416      return _findOne.call(element, selector);
5417    },
5418    children: function children(element, selector) {
5419      var _this = this;
5420
5421      if (typeof selector !== 'string') {
5422        return null;
5423      }
5424
5425      var children = makeArray(element.children);
5426      return children.filter(function (child) {
5427        return _this.matches(child, selector);
5428      });
5429    },
5430    parents: function parents(element, selector) {
5431      if (typeof selector !== 'string') {
5432        return null;
5433      }
5434
5435      var parents = [];
5436      var ancestor = element.parentNode;
5437
5438      while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
5439        if (this.matches(ancestor, selector)) {
5440          parents.push(ancestor);
5441        }
5442
5443        ancestor = ancestor.parentNode;
5444      }
5445
5446      return parents;
5447    },
5448    closest: function closest(element, selector) {
5449      if (typeof selector !== 'string') {
5450        return null;
5451      }
5452
5453      return element.closest(selector);
5454    },
5455    prev: function prev(element, selector) {
5456      if (typeof selector !== 'string') {
5457        return null;
5458      }
5459
5460      var siblings = [];
5461      var previous = element.previousSibling;
5462
5463      while (previous && previous.nodeType === Node.ELEMENT_NODE && previous.nodeType !== NODE_TEXT) {
5464        if (this.matches(previous, selector)) {
5465          siblings.push(previous);
5466        }
5467
5468        previous = previous.previousSibling;
5469      }
5470
5471      return siblings;
5472    }
5473  };
5474
5475  /**
5476   * ------------------------------------------------------------------------
5477   * Constants
5478   * ------------------------------------------------------------------------
5479   */
5480
5481  var NAME = 'alert';
5482  var VERSION = '4.3.1';
5483  var DATA_KEY = 'bs.alert';
5484  var EVENT_KEY = "." + DATA_KEY;
5485  var DATA_API_KEY = '.data-api';
5486  var Selector = {
5487    DISMISS: '[data-dismiss="alert"]'
5488  };
5489  var Event$1 = {
5490    CLOSE: "close" + EVENT_KEY,
5491    CLOSED: "closed" + EVENT_KEY,
5492    CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
5493  };
5494var ClassName = {
5495  ALERT: 'alert',
5496  FADE: 'fade',
5497  SHOW: 'show'
5498  /**
5499   * ------------------------------------------------------------------------
5500   * Class Definition
5501   * ------------------------------------------------------------------------
5502   */
5503
5504};
5505
5506var Alert =
5507/*#__PURE__*/
5508function () {
5509  function Alert(element) {
5510    this._element = element;
5511
5512    if (this._element) {
5513      Data.setData(element, DATA_KEY, this);
5514    }
5515  } // Getters
5516
5517
5518  var _proto = Alert.prototype;
5519
5520  // Public
5521  _proto.close = function close(element) {
5522    var rootElement = this._element;
5523
5524    if (element) {
5525      rootElement = this._getRootElement(element);
5526    }
5527
5528    var customEvent = this._triggerCloseEvent(rootElement);
5529
5530    if (customEvent === null || customEvent.defaultPrevented) {
5531      return;
5532    }
5533
5534    this._removeElement(rootElement);
5535  };
5536
5537  _proto.dispose = function dispose() {
5538    Data.removeData(this._element, DATA_KEY);
5539    this._element = null;
5540  } // Private
5541  ;
5542
5543  _proto._getRootElement = function _getRootElement(element) {
5544    var selector = getSelectorFromElement(element);
5545    var parent = false;
5546
5547    if (selector) {
5548      parent = SelectorEngine.findOne(selector);
5549    }
5550
5551    if (!parent) {
5552      parent = SelectorEngine.closest(element, "." + ClassName.ALERT);
5553    }
5554
5555    return parent;
5556  };
5557
5558  _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
5559    return EventHandler.trigger(element, Event$1.CLOSE);
5560  };
5561
5562  _proto._removeElement = function _removeElement(element) {
5563    var _this = this;
5564
5565    element.classList.remove(ClassName.SHOW);
5566
5567    if (!element.classList.contains(ClassName.FADE)) {
5568      this._destroyElement(element);
5569
5570      return;
5571    }
5572
5573    var transitionDuration = getTransitionDurationFromElement(element);
5574    EventHandler.one(element, TRANSITION_END, function (event) {
5575      return _this._destroyElement(element, event);
5576    });
5577    emulateTransitionEnd(element, transitionDuration);
5578  };
5579
5580  _proto._destroyElement = function _destroyElement(element) {
5581    if (element.parentNode) {
5582      element.parentNode.removeChild(element);
5583    }
5584
5585    EventHandler.trigger(element, Event$1.CLOSED);
5586  } // Static
5587  ;
5588
5589  Alert._jQueryInterface = function _jQueryInterface(config) {
5590    return this.each(function () {
5591      var data = Data.getData(this, DATA_KEY);
5592
5593      if (!data) {
5594        data = new Alert(this);
5595      }
5596
5597      if (config === 'close') {
5598        data[config](this);
5599      }
5600    });
5601  };
5602
5603  Alert._handleDismiss = function _handleDismiss(alertInstance) {
5604    return function (event) {
5605      if (event) {
5606        event.preventDefault();
5607      }
5608
5609      alertInstance.close(this);
5610    };
5611  };
5612
5613  Alert._getInstance = function _getInstance(element) {
5614    return Data.getData(element, DATA_KEY);
5615  };
5616
5617  _createClass(Alert, null, [{
5618    key: "VERSION",
5619    get: function get() {
5620      return VERSION;
5621    }
5622  }]);
5623
5624  return Alert;
5625}();
5626/**
5627 * ------------------------------------------------------------------------
5628 * Data Api implementation
5629 * ------------------------------------------------------------------------
5630 */
5631
5632
5633EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
5634/**
5635 * ------------------------------------------------------------------------
5636 * jQuery
5637 * ------------------------------------------------------------------------
5638 * add .alert to jQuery only if jQuery is present
5639 */
5640
5641if (typeof jQuery !== 'undefined') {
5642  var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
5643  jQuery.fn[NAME] = Alert._jQueryInterface;
5644  jQuery.fn[NAME].Constructor = Alert;
5645
5646  jQuery.fn[NAME].noConflict = function () {
5647    jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
5648    return Alert._jQueryInterface;
5649  };
5650}
5651/**
5652   * ------------------------------------------------------------------------
5653   * Constants
5654   * ------------------------------------------------------------------------
5655   */
5656
5657  var NAME$1 = 'button';
5658  var VERSION$1 = '4.3.1';
5659  var DATA_KEY$1 = 'bs.button';
5660  var EVENT_KEY$1 = "." + DATA_KEY$1;
5661  var DATA_API_KEY$1 = '.data-api';
5662  var ClassName$1 = {
5663    ACTIVE: 'active',
5664    BUTTON: 'btn',
5665    FOCUS: 'focus'
5666  };
5667  var Selector$1 = {
5668    DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
5669    DATA_TOGGLE: '[data-toggle="buttons"]',
5670    INPUT: 'input:not([type="hidden"])',
5671    ACTIVE: '.active',
5672    BUTTON: '.btn'
5673  };
5674  var Event$2 = {
5675    CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1,
5676    FOCUS_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1,
5677    BLUR_DATA_API: "blur" + EVENT_KEY$1 + DATA_API_KEY$1
5678    /**
5679     * ------------------------------------------------------------------------
5680     * Class Definition
5681     * ------------------------------------------------------------------------
5682     */
5683
5684  };
5685
5686  var Button =
5687  /*#__PURE__*/
5688  function () {
5689    function Button(element) {
5690      this._element = element;
5691      Data.setData(element, DATA_KEY$1, this);
5692    } // Getters
5693
5694
5695    var _proto = Button.prototype;
5696
5697    // Public
5698    _proto.toggle = function toggle() {
5699      var triggerChangeEvent = true;
5700      var addAriaPressed = true;
5701      var rootElement = SelectorEngine.closest(this._element, Selector$1.DATA_TOGGLE);
5702
5703      if (rootElement) {
5704        var input = SelectorEngine.findOne(Selector$1.INPUT, this._element);
5705
5706        if (input) {
5707          if (input.type === 'radio') {
5708            if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) {
5709              triggerChangeEvent = false;
5710            } else {
5711              var activeElement = SelectorEngine.findOne(Selector$1.ACTIVE, rootElement);
5712
5713              if (activeElement) {
5714                activeElement.classList.remove(ClassName$1.ACTIVE);
5715              }
5716            }
5717          }
5718
5719          if (triggerChangeEvent) {
5720            if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
5721              return;
5722            }
5723
5724            input.checked = !this._element.classList.contains(ClassName$1.ACTIVE);
5725            EventHandler.trigger(input, 'change');
5726          }
5727
5728          input.focus();
5729          addAriaPressed = false;
5730        }
5731      }
5732
5733      if (addAriaPressed) {
5734        this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE));
5735      }
5736
5737      if (triggerChangeEvent) {
5738        this._element.classList.toggle(ClassName$1.ACTIVE);
5739      }
5740    };
5741
5742    _proto.dispose = function dispose() {
5743      Data.removeData(this._element, DATA_KEY$1);
5744      this._element = null;
5745    } // Static
5746    ;
5747
5748    Button._jQueryInterface = function _jQueryInterface(config) {
5749      return this.each(function () {
5750        var data = Data.getData(this, DATA_KEY$1);
5751
5752        if (!data) {
5753          data = new Button(this);
5754        }
5755
5756        if (config === 'toggle') {
5757          data[config]();
5758        }
5759      });
5760    };
5761
5762    Button._getInstance = function _getInstance(element) {
5763      return Data.getData(element, DATA_KEY$1);
5764    };
5765
5766    _createClass(Button, null, [{
5767      key: "VERSION",
5768      get: function get() {
5769        return VERSION$1;
5770      }
5771    }]);
5772
5773    return Button;
5774  }();
5775  /**
5776   * ------------------------------------------------------------------------
5777   * Data Api implementation
5778   * ------------------------------------------------------------------------
5779   */
5780
5781
5782  EventHandler.on(document, Event$2.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
5783    event.preventDefault();
5784    var button = event.target;
5785
5786    if (!button.classList.contains(ClassName$1.BUTTON)) {
5787      button = SelectorEngine.closest(button, Selector$1.BUTTON);
5788    }
5789
5790    var data = Data.getData(button, DATA_KEY$1);
5791
5792    if (!data) {
5793      data = new Button(button);
5794      Data.setData(button, DATA_KEY$1, data);
5795    }
5796
5797    data.toggle();
5798  });
5799  EventHandler.on(document, Event$2.FOCUS_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
5800    var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
5801    button.classList.add(ClassName$1.FOCUS);
5802  });
5803  EventHandler.on(document, Event$2.BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
5804    var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
5805    button.classList.remove(ClassName$1.FOCUS);
5806  });
5807  /**
5808   * ------------------------------------------------------------------------
5809   * jQuery
5810   * ------------------------------------------------------------------------
5811   * add .button to jQuery only if jQuery is present
5812   */
5813
5814  if (typeof jQuery !== 'undefined') {
5815    var JQUERY_NO_CONFLICT$1 = jQuery.fn[NAME$1];
5816    jQuery.fn[NAME$1] = Button._jQueryInterface;
5817    jQuery.fn[NAME$1].Constructor = Button;
5818
5819    jQuery.fn[NAME$1].noConflict = function () {
5820      jQuery.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
5821      return Button._jQueryInterface;
5822    };
5823  }
5824/**
5825   * --------------------------------------------------------------------------
5826   * Bootstrap (v4.3.1): dom/manipulator.js
5827   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5828   * --------------------------------------------------------------------------
5829   */
5830  function normalizeData(val) {
5831    if (val === 'true') {
5832      return true;
5833    }
5834
5835    if (val === 'false') {
5836      return false;
5837    }
5838
5839    if (val === Number(val).toString()) {
5840      return Number(val);
5841    }
5842
5843    if (val === '' || val === 'null') {
5844      return null;
5845    }
5846
5847    return val;
5848  }
5849
5850  function normalizeDataKey(key) {
5851    return key.replace(/[A-Z]/g, function (chr) {
5852      return chr.toLowerCase();
5853    });
5854  }
5855
5856  var Manipulator = {
5857    setDataAttribute: function setDataAttribute(element, key, value) {
5858      element.setAttribute("data-" + normalizeDataKey(key), value);
5859    },
5860    removeDataAttribute: function removeDataAttribute(element, key) {
5861      element.removeAttribute("data-" + normalizeDataKey(key));
5862    },
5863    getDataAttributes: function getDataAttributes(element) {
5864      if (!element) {
5865        return {};
5866      }
5867
5868      var attributes = _objectSpread({}, element.dataset);
5869
5870      Object.keys(attributes).forEach(function (key) {
5871        attributes[key] = normalizeData(attributes[key]);
5872      });
5873      return attributes;
5874    },
5875    getDataAttribute: function getDataAttribute(element, key) {
5876      return normalizeData(element.getAttribute("data-" + normalizeDataKey(key)));
5877    },
5878    offset: function offset(element) {
5879      var rect = element.getBoundingClientRect();
5880      return {
5881        top: rect.top + document.body.scrollTop,
5882        left: rect.left + document.body.scrollLeft
5883      };
5884    },
5885    position: function position(element) {
5886      return {
5887        top: element.offsetTop,
5888        left: element.offsetLeft
5889      };
5890    },
5891    toggleClass: function toggleClass(element, className) {
5892      if (!element) {
5893        return;
5894      }
5895
5896      if (element.classList.contains(className)) {
5897        element.classList.remove(className);
5898      } else {
5899        element.classList.add(className);
5900      }
5901    }
5902  };
5903/**
5904   * ------------------------------------------------------------------------
5905   * Constants
5906   * ------------------------------------------------------------------------
5907   */
5908
5909  var NAME$4 = 'dropdown';
5910  var VERSION$4 = '4.3.1';
5911  var DATA_KEY$4 = 'bs.dropdown';
5912  var EVENT_KEY$4 = "." + DATA_KEY$4;
5913  var DATA_API_KEY$4 = '.data-api';
5914  var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
5915
5916  var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
5917
5918  var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
5919
5920  var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
5921
5922  var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
5923
5924  var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
5925
5926  var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
5927  var Event$5 = {
5928    HIDE: "hide" + EVENT_KEY$4,
5929    HIDDEN: "hidden" + EVENT_KEY$4,
5930    SHOW: "show" + EVENT_KEY$4,
5931    SHOWN: "shown" + EVENT_KEY$4,
5932    CLICK: "click" + EVENT_KEY$4,
5933    CLICK_DATA_API: "click" + EVENT_KEY$4 + DATA_API_KEY$4,
5934    KEYDOWN_DATA_API: "keydown" + EVENT_KEY$4 + DATA_API_KEY$4,
5935    KEYUP_DATA_API: "keyup" + EVENT_KEY$4 + DATA_API_KEY$4
5936  };
5937  var ClassName$4 = {
5938    DISABLED: 'disabled',
5939    SHOW: 'show',
5940    DROPUP: 'dropup',
5941    DROPRIGHT: 'dropright',
5942    DROPLEFT: 'dropleft',
5943    MENURIGHT: 'dropdown-menu-right',
5944    POSITION_STATIC: 'position-static'
5945  };
5946  var Selector$4 = {
5947    DATA_TOGGLE: '[data-toggle="dropdown"]',
5948    FORM_CHILD: '.dropdown form',
5949    MENU: '.dropdown-menu',
5950    NAVBAR_NAV: '.navbar-nav',
5951    VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
5952  };
5953  var AttachmentMap = {
5954    TOP: 'top-start',
5955    TOPEND: 'top-end',
5956    BOTTOM: 'bottom-start',
5957    BOTTOMEND: 'bottom-end',
5958    RIGHT: 'right-start',
5959    RIGHTEND: 'right-end',
5960    LEFT: 'left-start',
5961    LEFTEND: 'left-end'
5962  };
5963  var Default$2 = {
5964    offset: 0,
5965    flip: true,
5966    boundary: 'scrollParent',
5967    reference: 'toggle',
5968    display: 'dynamic'
5969  };
5970  var DefaultType$2 = {
5971    offset: '(number|string|function)',
5972    flip: 'boolean',
5973    boundary: '(string|element)',
5974    reference: '(string|element)',
5975    display: 'string'
5976    /**
5977     * ------------------------------------------------------------------------
5978     * Class Definition
5979     * ------------------------------------------------------------------------
5980     */
5981
5982  };
5983
5984  var Dropdown =
5985  /*#__PURE__*/
5986  function () {
5987    function Dropdown(element, config) {
5988      this._element = element;
5989      this._popper = null;
5990      this._config = this._getConfig(config);
5991      this._menu = this._getMenuElement();
5992      this._inNavbar = this._detectNavbar();
5993
5994      this._addEventListeners();
5995
5996      Data.setData(element, DATA_KEY$4, this);
5997    } // Getters
5998
5999
6000    var _proto = Dropdown.prototype;
6001
6002    // Public
6003    _proto.toggle = function toggle() {
6004      if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED)) {
6005        return;
6006      }
6007
6008      var parent = Dropdown._getParentFromElement(this._element);
6009
6010      var isActive = this._menu.classList.contains(ClassName$4.SHOW);
6011
6012      Dropdown._clearMenus();
6013
6014      if (isActive) {
6015        return;
6016      }
6017
6018      var relatedTarget = {
6019        relatedTarget: this._element
6020      };
6021      var showEvent = EventHandler.trigger(parent, Event$5.SHOW, relatedTarget);
6022
6023      if (showEvent.defaultPrevented) {
6024        return;
6025      } // Disable totally Popper.js for Dropdown in Navbar
6026
6027
6028      if (!this._inNavbar) {
6029        /**
6030         * Check for Popper dependency
6031         * Popper - https://popper.js.org
6032         */
6033        if (typeof Popper === 'undefined') {
6034          throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org)');
6035        }
6036
6037        var referenceElement = this._element;
6038
6039        if (this._config.reference === 'parent') {
6040          referenceElement = parent;
6041        } else if (isElement(this._config.reference)) {
6042          referenceElement = this._config.reference; // Check if it's jQuery element
6043
6044          if (typeof this._config.reference.jquery !== 'undefined') {
6045            referenceElement = this._config.reference[0];
6046          }
6047        } // If boundary is not `scrollParent`, then set position to `static`
6048        // to allow the menu to "escape" the scroll parent's boundaries
6049        // https://github.com/twbs/bootstrap/issues/24251
6050
6051
6052        if (this._config.boundary !== 'scrollParent') {
6053          parent.classList.add(ClassName$4.POSITION_STATIC);
6054        }
6055
6056        this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
6057      } // If this is a touch-enabled device we add extra
6058      // empty mouseover listeners to the body's immediate children;
6059      // only needed because of broken event delegation on iOS
6060      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
6061
6062
6063      if ('ontouchstart' in document.documentElement && !makeArray(SelectorEngine.closest(parent, Selector$4.NAVBAR_NAV)).length) {
6064        makeArray(document.body.children).forEach(function (elem) {
6065          return EventHandler.on(elem, 'mouseover', null, noop());
6066        });
6067      }
6068
6069      this._element.focus();
6070
6071      this._element.setAttribute('aria-expanded', true);
6072
6073      Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
6074      Manipulator.toggleClass(parent, ClassName$4.SHOW);
6075      EventHandler.trigger(parent, Event$5.SHOWN, relatedTarget);
6076    };
6077
6078    _proto.show = function show() {
6079      if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED) || this._menu.classList.contains(ClassName$4.SHOW)) {
6080        return;
6081      }
6082
6083      var parent = Dropdown._getParentFromElement(this._element);
6084
6085      var relatedTarget = {
6086        relatedTarget: this._element
6087      };
6088      var showEvent = EventHandler.trigger(parent, Event$5.SHOW, relatedTarget);
6089
6090      if (showEvent.defaultPrevented) {
6091        return;
6092      }
6093
6094      Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
6095      Manipulator.toggleClass(parent, ClassName$4.SHOW);
6096      EventHandler.trigger(parent, Event$5.SHOWN, relatedTarget);
6097    };
6098
6099    _proto.hide = function hide() {
6100      if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED) || !this._menu.classList.contains(ClassName$4.SHOW)) {
6101        return;
6102      }
6103
6104      var parent = Dropdown._getParentFromElement(this._element);
6105
6106      var relatedTarget = {
6107        relatedTarget: this._element
6108      };
6109      var hideEvent = EventHandler.trigger(parent, Event$5.HIDE, relatedTarget);
6110
6111      if (hideEvent.defaultPrevented) {
6112        return;
6113      }
6114
6115      Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
6116      Manipulator.toggleClass(parent, ClassName$4.SHOW);
6117      EventHandler.trigger(parent, Event$5.HIDDEN, relatedTarget);
6118    };
6119
6120    _proto.dispose = function dispose() {
6121      Data.removeData(this._element, DATA_KEY$4);
6122      EventHandler.off(this._element, EVENT_KEY$4);
6123      this._element = null;
6124      this._menu = null;
6125
6126      if (this._popper !== null) {
6127        this._popper.destroy();
6128
6129        this._popper = null;
6130      }
6131    };
6132
6133    _proto.update = function update() {
6134      this._inNavbar = this._detectNavbar();
6135
6136      if (this._popper !== null) {
6137        this._popper.scheduleUpdate();
6138      }
6139    } // Private
6140    ;
6141
6142    _proto._addEventListeners = function _addEventListeners() {
6143      var _this = this;
6144
6145      EventHandler.on(this._element, Event$5.CLICK, function (event) {
6146        event.preventDefault();
6147        event.stopPropagation();
6148
6149        _this.toggle();
6150      });
6151    };
6152
6153    _proto._getConfig = function _getConfig(config) {
6154      config = _objectSpread({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);
6155      typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
6156      return config;
6157    };
6158
6159    _proto._getMenuElement = function _getMenuElement() {
6160      if (!this._menu) {
6161        var parent = Dropdown._getParentFromElement(this._element);
6162
6163        if (parent) {
6164          this._menu = SelectorEngine.findOne(Selector$4.MENU, parent);
6165        }
6166      }
6167
6168      return this._menu;
6169    };
6170
6171    _proto._getPlacement = function _getPlacement() {
6172      var parentDropdown = this._element.parentNode;
6173      var placement = AttachmentMap.BOTTOM; // Handle dropup
6174
6175      if (parentDropdown.classList.contains(ClassName$4.DROPUP)) {
6176        placement = AttachmentMap.TOP;
6177
6178        if (this._menu.classList.contains(ClassName$4.MENURIGHT)) {
6179          placement = AttachmentMap.TOPEND;
6180        }
6181      } else if (parentDropdown.classList.contains(ClassName$4.DROPRIGHT)) {
6182        placement = AttachmentMap.RIGHT;
6183      } else if (parentDropdown.classList.contains(ClassName$4.DROPLEFT)) {
6184        placement = AttachmentMap.LEFT;
6185      } else if (this._menu.classList.contains(ClassName$4.MENURIGHT)) {
6186        placement = AttachmentMap.BOTTOMEND;
6187      }
6188
6189      return placement;
6190    };
6191
6192    _proto._detectNavbar = function _detectNavbar() {
6193      return Boolean(SelectorEngine.closest(this._element, '.navbar'));
6194    };
6195
6196    _proto._getOffset = function _getOffset() {
6197      var _this2 = this;
6198
6199      var offset = {};
6200
6201      if (typeof this._config.offset === 'function') {
6202        offset.fn = function (data) {
6203          data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
6204          return data;
6205        };
6206      } else {
6207        offset.offset = this._config.offset;
6208      }
6209
6210      return offset;
6211    };
6212
6213    _proto._getPopperConfig = function _getPopperConfig() {
6214      var popperConfig = {
6215        placement: this._getPlacement(),
6216        modifiers: {
6217          offset: this._getOffset(),
6218          flip: {
6219            enabled: this._config.flip
6220          },
6221          preventOverflow: {
6222            boundariesElement: this._config.boundary
6223          }
6224        } // Disable Popper.js if we have a static display
6225
6226      };
6227
6228      if (this._config.display === 'static') {
6229        popperConfig.modifiers.applyStyle = {
6230          enabled: false
6231        };
6232      }
6233
6234      return popperConfig;
6235    } // Static
6236    ;
6237
6238    Dropdown._dropdownInterface = function _dropdownInterface(element, config) {
6239      var data = Data.getData(element, DATA_KEY$4);
6240
6241      var _config = typeof config === 'object' ? config : null;
6242
6243      if (!data) {
6244        data = new Dropdown(element, _config);
6245      }
6246
6247      if (typeof config === 'string') {
6248        if (typeof data[config] === 'undefined') {
6249          throw new TypeError("No method named \"" + config + "\"");
6250        }
6251
6252        data[config]();
6253      }
6254    };
6255
6256    Dropdown._jQueryInterface = function _jQueryInterface(config) {
6257      return this.each(function () {
6258        Dropdown._dropdownInterface(this, config);
6259      });
6260    };
6261
6262    Dropdown._clearMenus = function _clearMenus(event) {
6263      if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
6264        return;
6265      }
6266
6267      var toggles = makeArray(SelectorEngine.find(Selector$4.DATA_TOGGLE));
6268
6269      for (var i = 0, len = toggles.length; i < len; i++) {
6270        var parent = Dropdown._getParentFromElement(toggles[i]);
6271
6272        var context = Data.getData(toggles[i], DATA_KEY$4);
6273        var relatedTarget = {
6274          relatedTarget: toggles[i]
6275        };
6276
6277        if (event && event.type === 'click') {
6278          relatedTarget.clickEvent = event;
6279        }
6280
6281        if (!context) {
6282          continue;
6283        }
6284
6285        var dropdownMenu = context._menu;
6286
6287        if (!parent.classList.contains(ClassName$4.SHOW)) {
6288          continue;
6289        }
6290
6291        if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && parent.contains(event.target)) {
6292          continue;
6293        }
6294
6295        var hideEvent = EventHandler.trigger(parent, Event$5.HIDE, relatedTarget);
6296
6297        if (hideEvent.defaultPrevented) {
6298          continue;
6299        } // If this is a touch-enabled device we remove the extra
6300        // empty mouseover listeners we added for iOS support
6301
6302
6303        if ('ontouchstart' in document.documentElement) {
6304          makeArray(document.body.children).forEach(function (elem) {
6305            return EventHandler.off(elem, 'mouseover', null, noop());
6306          });
6307        }
6308
6309        toggles[i].setAttribute('aria-expanded', 'false');
6310        dropdownMenu.classList.remove(ClassName$4.SHOW);
6311        parent.classList.remove(ClassName$4.SHOW);
6312        EventHandler.trigger(parent, Event$5.HIDDEN, relatedTarget);
6313      }
6314    };
6315
6316    Dropdown._getParentFromElement = function _getParentFromElement(element) {
6317      var parent;
6318      var selector = getSelectorFromElement(element);
6319
6320      if (selector) {
6321        parent = SelectorEngine.findOne(selector);
6322      }
6323
6324      return parent || element.parentNode;
6325    };
6326
6327    Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
6328      // If not input/textarea:
6329      //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
6330      // If input/textarea:
6331      //  - If space key => not a dropdown command
6332      //  - If key is other than escape
6333      //    - If key is not up or down => not a dropdown command
6334      //    - If trigger inside the menu => not a dropdown command
6335      if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || SelectorEngine.closest(event.target, Selector$4.MENU)) : !REGEXP_KEYDOWN.test(event.which)) {
6336        return;
6337      }
6338
6339      event.preventDefault();
6340      event.stopPropagation();
6341
6342      if (this.disabled || this.classList.contains(ClassName$4.DISABLED)) {
6343        return;
6344      }
6345
6346      var parent = Dropdown._getParentFromElement(this);
6347
6348      var isActive = parent.classList.contains(ClassName$4.SHOW);
6349
6350      if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
6351        if (event.which === ESCAPE_KEYCODE) {
6352          EventHandler.trigger(SelectorEngine.findOne(Selector$4.DATA_TOGGLE, parent), 'focus');
6353        }
6354
6355        Dropdown._clearMenus();
6356
6357        return;
6358      }
6359
6360      var items = makeArray(SelectorEngine.find(Selector$4.VISIBLE_ITEMS, parent));
6361
6362      if (!items.length) {
6363        return;
6364      }
6365
6366      var index = items.indexOf(event.target);
6367
6368      if (event.which === ARROW_UP_KEYCODE && index > 0) {
6369        // Up
6370        index--;
6371      }
6372
6373      if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
6374        // Down
6375        index++;
6376      }
6377
6378      if (index < 0) {
6379        index = 0;
6380      }
6381
6382      items[index].focus();
6383    };
6384
6385    Dropdown._getInstance = function _getInstance(element) {
6386      return Data.getData(element, DATA_KEY$4);
6387    };
6388
6389    _createClass(Dropdown, null, [{
6390      key: "VERSION",
6391      get: function get() {
6392        return VERSION$4;
6393      }
6394    }, {
6395      key: "Default",
6396      get: function get() {
6397        return Default$2;
6398      }
6399    }, {
6400      key: "DefaultType",
6401      get: function get() {
6402        return DefaultType$2;
6403      }
6404    }]);
6405
6406    return Dropdown;
6407  }();
6408  /**
6409   * ------------------------------------------------------------------------
6410   * Data Api implementation
6411   * ------------------------------------------------------------------------
6412   */
6413
6414
6415  EventHandler.on(document, Event$5.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler);
6416  EventHandler.on(document, Event$5.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler);
6417  EventHandler.on(document, Event$5.CLICK_DATA_API, Dropdown._clearMenus);
6418  EventHandler.on(document, Event$5.KEYUP_DATA_API, Dropdown._clearMenus);
6419  EventHandler.on(document, Event$5.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) {
6420    event.preventDefault();
6421    event.stopPropagation();
6422
6423    Dropdown._dropdownInterface(this, 'toggle');
6424  });
6425  EventHandler.on(document, Event$5.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {
6426    return e.stopPropagation();
6427  });
6428  /**
6429   * ------------------------------------------------------------------------
6430   * jQuery
6431   * ------------------------------------------------------------------------
6432   * add .dropdown to jQuery only if jQuery is present
6433   */
6434
6435  if (typeof jQuery !== 'undefined') {
6436    var JQUERY_NO_CONFLICT$4 = jQuery.fn[NAME$4];
6437    jQuery.fn[NAME$4] = Dropdown._jQueryInterface;
6438    jQuery.fn[NAME$4].Constructor = Dropdown;
6439
6440    jQuery.fn[NAME$4].noConflict = function () {
6441      jQuery.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
6442      return Dropdown._jQueryInterface;
6443    };
6444  }
6445/**
6446   * --------------------------------------------------------------------------
6447   * Bootstrap (v4.3.1): util/sanitizer.js
6448   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6449   * --------------------------------------------------------------------------
6450   */
6451  var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
6452  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
6453  /**
6454   * A pattern that recognizes a commonly useful subset of URLs that are safe.
6455   *
6456   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
6457   */
6458
6459  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
6460  /**
6461   * A pattern that matches safe data URLs. Only matches image, video and audio types.
6462   *
6463   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
6464   */
6465
6466  var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
6467
6468  var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
6469    var attrName = attr.nodeName.toLowerCase();
6470
6471    if (allowedAttributeList.indexOf(attrName) !== -1) {
6472      if (uriAttrs.indexOf(attrName) !== -1) {
6473        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
6474      }
6475
6476      return true;
6477    }
6478
6479    var regExp = allowedAttributeList.filter(function (attrRegex) {
6480      return attrRegex instanceof RegExp;
6481    }); // Check if a regular expression validates the attribute.
6482
6483    for (var i = 0, l = regExp.length; i < l; i++) {
6484      if (attrName.match(regExp[i])) {
6485        return true;
6486      }
6487    }
6488
6489    return false;
6490  };
6491
6492  var DefaultWhitelist = {
6493    // Global attributes allowed on any supplied element below.
6494    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
6495    a: ['target', 'href', 'title', 'rel'],
6496    area: [],
6497    b: [],
6498    br: [],
6499    col: [],
6500    code: [],
6501    div: [],
6502    em: [],
6503    hr: [],
6504    h1: [],
6505    h2: [],
6506    h3: [],
6507    h4: [],
6508    h5: [],
6509    h6: [],
6510    i: [],
6511    img: ['src', 'alt', 'title', 'width', 'height'],
6512    li: [],
6513    ol: [],
6514    p: [],
6515    pre: [],
6516    s: [],
6517    small: [],
6518    span: [],
6519    sub: [],
6520    sup: [],
6521    strong: [],
6522    u: [],
6523    ul: []
6524  };
6525  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
6526    if (!unsafeHtml.length) {
6527      return unsafeHtml;
6528    }
6529
6530    if (sanitizeFn && typeof sanitizeFn === 'function') {
6531      return sanitizeFn(unsafeHtml);
6532    }
6533
6534    var domParser = new window.DOMParser();
6535    var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
6536    var whitelistKeys = Object.keys(whiteList);
6537    var elements = makeArray(createdDocument.body.querySelectorAll('*'));
6538
6539    var _loop = function _loop(i, len) {
6540      var el = elements[i];
6541      var elName = el.nodeName.toLowerCase();
6542
6543      if (whitelistKeys.indexOf(elName) === -1) {
6544        el.parentNode.removeChild(el);
6545        return "continue";
6546      }
6547
6548      var attributeList = makeArray(el.attributes);
6549      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
6550      attributeList.forEach(function (attr) {
6551        if (!allowedAttribute(attr, whitelistedAttributes)) {
6552          el.removeAttribute(attr.nodeName);
6553        }
6554      });
6555    };
6556
6557    for (var i = 0, len = elements.length; i < len; i++) {
6558      var _ret = _loop(i, len);
6559
6560      if (_ret === "continue") continue;
6561    }
6562
6563    return createdDocument.body.innerHTML;
6564  }
6565/**
6566   * ------------------------------------------------------------------------
6567   * Constants
6568   * ------------------------------------------------------------------------
6569   */
6570
6571  var NAME$6 = 'tooltip';
6572  var VERSION$6 = '4.3.1';
6573  var DATA_KEY$6 = 'bs.tooltip';
6574  var EVENT_KEY$6 = "." + DATA_KEY$6;
6575  var CLASS_PREFIX = 'bs-tooltip';
6576  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
6577  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
6578  var DefaultType$4 = {
6579    animation: 'boolean',
6580    template: 'string',
6581    title: '(string|element|function)',
6582    trigger: 'string',
6583    delay: '(number|object)',
6584    html: 'boolean',
6585    selector: '(string|boolean)',
6586    placement: '(string|function)',
6587    offset: '(number|string|function)',
6588    container: '(string|element|boolean)',
6589    fallbackPlacement: '(string|array)',
6590    boundary: '(string|element)',
6591    sanitize: 'boolean',
6592    sanitizeFn: '(null|function)',
6593    whiteList: 'object'
6594  };
6595  var AttachmentMap$1 = {
6596    AUTO: 'auto',
6597    TOP: 'top',
6598    RIGHT: 'right',
6599    BOTTOM: 'bottom',
6600    LEFT: 'left'
6601  };
6602  var Default$4 = {
6603    animation: true,
6604    template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
6605    trigger: 'hover focus',
6606    title: '',
6607    delay: 0,
6608    html: false,
6609    selector: false,
6610    placement: 'top',
6611    offset: 0,
6612    container: false,
6613    fallbackPlacement: 'flip',
6614    boundary: 'scrollParent',
6615    sanitize: true,
6616    sanitizeFn: null,
6617    whiteList: DefaultWhitelist
6618  };
6619  var HoverState = {
6620    SHOW: 'show',
6621    OUT: 'out'
6622  };
6623  var Event$7 = {
6624    HIDE: "hide" + EVENT_KEY$6,
6625    HIDDEN: "hidden" + EVENT_KEY$6,
6626    SHOW: "show" + EVENT_KEY$6,
6627    SHOWN: "shown" + EVENT_KEY$6,
6628    INSERTED: "inserted" + EVENT_KEY$6,
6629    CLICK: "click" + EVENT_KEY$6,
6630    FOCUSIN: "focusin" + EVENT_KEY$6,
6631    FOCUSOUT: "focusout" + EVENT_KEY$6,
6632    MOUSEENTER: "mouseenter" + EVENT_KEY$6,
6633    MOUSELEAVE: "mouseleave" + EVENT_KEY$6
6634  };
6635  var ClassName$6 = {
6636    FADE: 'fade',
6637    SHOW: 'show'
6638  };
6639  var Selector$6 = {
6640    TOOLTIP_INNER: '.tooltip-inner',
6641    TOOLTIP_ARROW: '.tooltip-arrow'
6642  };
6643  var Trigger = {
6644    HOVER: 'hover',
6645    FOCUS: 'focus',
6646    CLICK: 'click',
6647    MANUAL: 'manual'
6648    /**
6649     * ------------------------------------------------------------------------
6650     * Class Definition
6651     * ------------------------------------------------------------------------
6652     */
6653
6654  };
6655
6656  var Tooltip =
6657  /*#__PURE__*/
6658  function () {
6659    function Tooltip(element, config) {
6660      /**
6661       * Check for Popper dependency
6662       * Popper - https://popper.js.org
6663       */
6664      if (typeof Popper === 'undefined') {
6665        throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
6666      } // private
6667
6668
6669      this._isEnabled = true;
6670      this._timeout = 0;
6671      this._hoverState = '';
6672      this._activeTrigger = {};
6673      this._popper = null; // Protected
6674
6675      this.element = element;
6676      this.config = this._getConfig(config);
6677      this.tip = null;
6678
6679      this._setListeners();
6680
6681      Data.setData(element, this.constructor.DATA_KEY, this);
6682    } // Getters
6683
6684
6685    var _proto = Tooltip.prototype;
6686
6687    // Public
6688    _proto.enable = function enable() {
6689      this._isEnabled = true;
6690    };
6691
6692    _proto.disable = function disable() {
6693      this._isEnabled = false;
6694    };
6695
6696    _proto.toggleEnabled = function toggleEnabled() {
6697      this._isEnabled = !this._isEnabled;
6698    };
6699
6700    _proto.toggle = function toggle(event) {
6701      if (!this._isEnabled) {
6702        return;
6703      }
6704
6705      if (event) {
6706        var dataKey = this.constructor.DATA_KEY;
6707        var context = Data.getData(event.delegateTarget, dataKey);
6708
6709        if (!context) {
6710          context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
6711          Data.setData(event.delegateTarget, dataKey, context);
6712        }
6713
6714        context._activeTrigger.click = !context._activeTrigger.click;
6715
6716        if (context._isWithActiveTrigger()) {
6717          context._enter(null, context);
6718        } else {
6719          context._leave(null, context);
6720        }
6721      } else {
6722        if (this.getTipElement().classList.contains(ClassName$6.SHOW)) {
6723          this._leave(null, this);
6724
6725          return;
6726        }
6727
6728        this._enter(null, this);
6729      }
6730    };
6731
6732    _proto.dispose = function dispose() {
6733      clearTimeout(this._timeout);
6734      Data.removeData(this.element, this.constructor.DATA_KEY);
6735      EventHandler.off(this.element, this.constructor.EVENT_KEY);
6736      EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal');
6737
6738      if (this.tip) {
6739        this.tip.parentNode.removeChild(this.tip);
6740      }
6741
6742      this._isEnabled = null;
6743      this._timeout = null;
6744      this._hoverState = null;
6745      this._activeTrigger = null;
6746
6747      if (this._popper !== null) {
6748        this._popper.destroy();
6749      }
6750
6751      this._popper = null;
6752      this.element = null;
6753      this.config = null;
6754      this.tip = null;
6755    };
6756
6757    _proto.show = function show() {
6758      var _this = this;
6759
6760      if (this.element.style.display === 'none') {
6761        throw new Error('Please use show on visible elements');
6762      }
6763
6764      if (this.isWithContent() && this._isEnabled) {
6765        var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
6766        var shadowRoot = findShadowRoot(this.element);
6767        var isInTheDom = shadowRoot === null ? this.element.ownerDocument.documentElement.contains(this.element) : shadowRoot.contains(this.element);
6768
6769        if (showEvent.defaultPrevented || !isInTheDom) {
6770          return;
6771        }
6772
6773        var tip = this.getTipElement();
6774        var tipId = getUID(this.constructor.NAME);
6775        tip.setAttribute('id', tipId);
6776        this.element.setAttribute('aria-describedby', tipId);
6777        this.setContent();
6778
6779        if (this.config.animation) {
6780          tip.classList.add(ClassName$6.FADE);
6781        }
6782
6783        var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
6784
6785        var attachment = this._getAttachment(placement);
6786
6787        this.addAttachmentClass(attachment);
6788
6789        var container = this._getContainer();
6790
6791        Data.setData(tip, this.constructor.DATA_KEY, this);
6792
6793        if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
6794          container.appendChild(tip);
6795        }
6796
6797        EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
6798        this._popper = new Popper(this.element, tip, {
6799          placement: attachment,
6800          modifiers: {
6801            offset: this._getOffset(),
6802            flip: {
6803              behavior: this.config.fallbackPlacement
6804            },
6805            arrow: {
6806              element: Selector$6.TOOLTIP_ARROW
6807            },
6808            preventOverflow: {
6809              boundariesElement: this.config.boundary
6810            }
6811          },
6812          onCreate: function onCreate(data) {
6813            if (data.originalPlacement !== data.placement) {
6814              _this._handlePopperPlacementChange(data);
6815            }
6816          },
6817          onUpdate: function onUpdate(data) {
6818            return _this._handlePopperPlacementChange(data);
6819          }
6820        });
6821        tip.classList.add(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
6822        // empty mouseover listeners to the body's immediate children;
6823        // only needed because of broken event delegation on iOS
6824        // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
6825
6826        if ('ontouchstart' in document.documentElement) {
6827          makeArray(document.body.children).forEach(function (element) {
6828            EventHandler.on(element, 'mouseover', noop());
6829          });
6830        }
6831
6832        var complete = function complete() {
6833          if (_this.config.animation) {
6834            _this._fixTransition();
6835          }
6836
6837          var prevHoverState = _this._hoverState;
6838          _this._hoverState = null;
6839          EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
6840
6841          if (prevHoverState === HoverState.OUT) {
6842            _this._leave(null, _this);
6843          }
6844        };
6845
6846        if (this.tip.classList.contains(ClassName$6.FADE)) {
6847          var transitionDuration = getTransitionDurationFromElement(this.tip);
6848          EventHandler.one(this.tip, TRANSITION_END, complete);
6849          emulateTransitionEnd(this.tip, transitionDuration);
6850        } else {
6851          complete();
6852        }
6853      }
6854    };
6855
6856    _proto.hide = function hide(callback) {
6857      var _this2 = this;
6858
6859      var tip = this.getTipElement();
6860
6861      var complete = function complete() {
6862        if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
6863          tip.parentNode.removeChild(tip);
6864        }
6865
6866        _this2._cleanTipClass();
6867
6868        _this2.element.removeAttribute('aria-describedby');
6869
6870        EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
6871
6872        if (_this2._popper !== null) {
6873          _this2._popper.destroy();
6874        }
6875
6876        if (callback) {
6877          callback();
6878        }
6879      };
6880
6881      var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
6882
6883      if (hideEvent.defaultPrevented) {
6884        return;
6885      }
6886
6887      tip.classList.remove(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra
6888      // empty mouseover listeners we added for iOS support
6889
6890      if ('ontouchstart' in document.documentElement) {
6891        makeArray(document.body.children).forEach(function (element) {
6892          return EventHandler.off(element, 'mouseover', noop);
6893        });
6894      }
6895
6896      this._activeTrigger[Trigger.CLICK] = false;
6897      this._activeTrigger[Trigger.FOCUS] = false;
6898      this._activeTrigger[Trigger.HOVER] = false;
6899
6900      if (this.tip.classList.contains(ClassName$6.FADE)) {
6901        var transitionDuration = getTransitionDurationFromElement(tip);
6902        EventHandler.one(tip, TRANSITION_END, complete);
6903        emulateTransitionEnd(tip, transitionDuration);
6904      } else {
6905        complete();
6906      }
6907
6908      this._hoverState = '';
6909    };
6910
6911    _proto.update = function update() {
6912      if (this._popper !== null) {
6913        this._popper.scheduleUpdate();
6914      }
6915    } // Protected
6916    ;
6917
6918    _proto.isWithContent = function isWithContent() {
6919      return Boolean(this.getTitle());
6920    };
6921
6922    _proto.addAttachmentClass = function addAttachmentClass(attachment) {
6923      this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
6924    };
6925
6926    _proto.getTipElement = function getTipElement() {
6927      if (this.tip) {
6928        return this.tip;
6929      }
6930
6931      var element = document.createElement('div');
6932      element.innerHTML = this.config.template;
6933      this.tip = element.children[0];
6934      return this.tip;
6935    };
6936
6937    _proto.setContent = function setContent() {
6938      var tip = this.getTipElement();
6939      this.setElementContent(SelectorEngine.findOne(Selector$6.TOOLTIP_INNER, tip), this.getTitle());
6940      tip.classList.remove(ClassName$6.FADE);
6941      tip.classList.remove(ClassName$6.SHOW);
6942    };
6943
6944    _proto.setElementContent = function setElementContent(element, content) {
6945      if (element === null) {
6946        return;
6947      }
6948
6949      if (typeof content === 'object' && (content.nodeType || content.jquery)) {
6950        if (content.jquery) {
6951          content = content[0];
6952        } // content is a DOM node or a jQuery
6953
6954
6955        if (this.config.html) {
6956          if (content.parentNode !== element) {
6957            element.innerHTML = '';
6958            element.appendChild(content);
6959          }
6960        } else {
6961          element.innerText = content.textContent;
6962        }
6963
6964        return;
6965      }
6966
6967      if (this.config.html) {
6968        if (this.config.sanitize) {
6969          content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
6970        }
6971
6972        element.innerHTML = content;
6973      } else {
6974        element.innerText = content;
6975      }
6976    };
6977
6978    _proto.getTitle = function getTitle() {
6979      var title = this.element.getAttribute('data-original-title');
6980
6981      if (!title) {
6982        title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
6983      }
6984
6985      return title;
6986    } // Private
6987    ;
6988
6989    _proto._getOffset = function _getOffset() {
6990      var _this3 = this;
6991
6992      var offset = {};
6993
6994      if (typeof this.config.offset === 'function') {
6995        offset.fn = function (data) {
6996          data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {});
6997          return data;
6998        };
6999      } else {
7000        offset.offset = this.config.offset;
7001      }
7002
7003      return offset;
7004    };
7005
7006    _proto._getContainer = function _getContainer() {
7007      if (this.config.container === false) {
7008        return document.body;
7009      }
7010
7011      if (isElement(this.config.container)) {
7012        return this.config.container;
7013      }
7014
7015      return SelectorEngine.findOne(this.config.container);
7016    };
7017
7018    _proto._getAttachment = function _getAttachment(placement) {
7019      return AttachmentMap$1[placement.toUpperCase()];
7020    };
7021
7022    _proto._setListeners = function _setListeners() {
7023      var _this4 = this;
7024
7025      var triggers = this.config.trigger.split(' ');
7026      triggers.forEach(function (trigger) {
7027        if (trigger === 'click') {
7028          EventHandler.on(_this4.element, _this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
7029            return _this4.toggle(event);
7030          });
7031        } else if (trigger !== Trigger.MANUAL) {
7032          var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
7033          var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
7034          EventHandler.on(_this4.element, eventIn, _this4.config.selector, function (event) {
7035            return _this4._enter(event);
7036          });
7037          EventHandler.on(_this4.element, eventOut, _this4.config.selector, function (event) {
7038            return _this4._leave(event);
7039          });
7040        }
7041      });
7042      EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', function () {
7043        if (_this4.element) {
7044          _this4.hide();
7045        }
7046      });
7047
7048      if (this.config.selector) {
7049        this.config = _objectSpread({}, this.config, {
7050          trigger: 'manual',
7051          selector: ''
7052        });
7053      } else {
7054        this._fixTitle();
7055      }
7056    };
7057
7058    _proto._fixTitle = function _fixTitle() {
7059      var titleType = typeof this.element.getAttribute('data-original-title');
7060
7061      if (this.element.getAttribute('title') || titleType !== 'string') {
7062        this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
7063        this.element.setAttribute('title', '');
7064      }
7065    };
7066
7067    _proto._enter = function _enter(event, context) {
7068      var dataKey = this.constructor.DATA_KEY;
7069      context = context || Data.getData(event.delegateTarget, dataKey);
7070
7071      if (!context) {
7072        context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
7073        Data.setData(event.delegateTarget, dataKey, context);
7074      }
7075
7076      if (event) {
7077        context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
7078      }
7079
7080      if (context.getTipElement().classList.contains(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
7081        context._hoverState = HoverState.SHOW;
7082        return;
7083      }
7084
7085      clearTimeout(context._timeout);
7086      context._hoverState = HoverState.SHOW;
7087
7088      if (!context.config.delay || !context.config.delay.show) {
7089        context.show();
7090        return;
7091      }
7092
7093      context._timeout = setTimeout(function () {
7094        if (context._hoverState === HoverState.SHOW) {
7095          context.show();
7096        }
7097      }, context.config.delay.show);
7098    };
7099
7100    _proto._leave = function _leave(event, context) {
7101      var dataKey = this.constructor.DATA_KEY;
7102      context = context || Data.getData(event.delegateTarget, dataKey);
7103
7104      if (!context) {
7105        context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
7106        Data.setData(event.delegateTarget, dataKey, context);
7107      }
7108
7109      if (event) {
7110        context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
7111      }
7112
7113      if (context._isWithActiveTrigger()) {
7114        return;
7115      }
7116
7117      clearTimeout(context._timeout);
7118      context._hoverState = HoverState.OUT;
7119
7120      if (!context.config.delay || !context.config.delay.hide) {
7121        context.hide();
7122        return;
7123      }
7124
7125      context._timeout = setTimeout(function () {
7126        if (context._hoverState === HoverState.OUT) {
7127          context.hide();
7128        }
7129      }, context.config.delay.hide);
7130    };
7131
7132    _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
7133      for (var trigger in this._activeTrigger) {
7134        if (this._activeTrigger[trigger]) {
7135          return true;
7136        }
7137      }
7138
7139      return false;
7140    };
7141
7142    _proto._getConfig = function _getConfig(config) {
7143      var dataAttributes = Manipulator.getDataAttributes(this.element);
7144      Object.keys(dataAttributes).forEach(function (dataAttr) {
7145        if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
7146          delete dataAttributes[dataAttr];
7147        }
7148      });
7149
7150      if (config && typeof config.container === 'object' && config.container.jquery) {
7151        config.container = config.container[0];
7152      }
7153
7154      config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
7155
7156      if (typeof config.delay === 'number') {
7157        config.delay = {
7158          show: config.delay,
7159          hide: config.delay
7160        };
7161      }
7162
7163      if (typeof config.title === 'number') {
7164        config.title = config.title.toString();
7165      }
7166
7167      if (typeof config.content === 'number') {
7168        config.content = config.content.toString();
7169      }
7170
7171      typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
7172
7173      if (config.sanitize) {
7174        config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
7175      }
7176
7177      return config;
7178    };
7179
7180    _proto._getDelegateConfig = function _getDelegateConfig() {
7181      var config = {};
7182
7183      if (this.config) {
7184        for (var key in this.config) {
7185          if (this.constructor.Default[key] !== this.config[key]) {
7186            config[key] = this.config[key];
7187          }
7188        }
7189      }
7190
7191      return config;
7192    };
7193
7194    _proto._cleanTipClass = function _cleanTipClass() {
7195      var tip = this.getTipElement();
7196      var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
7197
7198      if (tabClass !== null && tabClass.length) {
7199        tabClass.map(function (token) {
7200          return token.trim();
7201        }
7201).forEach(function (tClass) {
7202          return tip.classList.remove(tClass);
7203        });
7204      }
7205    };
7206
7207    _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
7208      var popperInstance = popperData.instance;
7209      this.tip = popperInstance.popper;
7210
7211      this._cleanTipClass();
7212
7213      this.addAttachmentClass(this._getAttachment(popperData.placement));
7214    };
7215
7216    _proto._fixTransition = function _fixTransition() {
7217      var tip = this.getTipElement();
7218      var initConfigAnimation = this.config.animation;
7219
7220      if (tip.getAttribute('x-placement') !== null) {
7221        return;
7222      }
7223
7224      tip.classList.remove(ClassName$6.FADE);
7225      this.config.animation = false;
7226      this.hide();
7227      this.show();
7228      this.config.animation = initConfigAnimation;
7229    } // Static
7230    ;
7231
7232    Tooltip._jQueryInterface = function _jQueryInterface(config) {
7233      return this.each(function () {
7234        var data = Data.getData(this, DATA_KEY$6);
7235
7236        var _config = typeof config === 'object' && config;
7237
7238        if (!data && /dispose|hide/.test(config)) {
7239          return;
7240        }
7241
7242        if (!data) {
7243          data = new Tooltip(this, _config);
7244        }
7245
7246        if (typeof config === 'string') {
7247          if (typeof data[config] === 'undefined') {
7248            throw new TypeError("No method named \"" + config + "\"");
7249          }
7250
7251          data[config]();
7252        }
7253      });
7254    };
7255
7256    Tooltip._getInstance = function _getInstance(element) {
7257      return Data.getData(element, DATA_KEY$6);
7258    };
7259
7260    _createClass(Tooltip, null, [{
7261      key: "VERSION",
7262      get: function get() {
7263        return VERSION$6;
7264      }
7265    }, {
7266      key: "Default",
7267      get: function get() {
7268        return Default$4;
7269      }
7270    }, {
7271      key: "NAME",
7272      get: function get() {
7273        return NAME$6;
7274      }
7275    }, {
7276      key: "DATA_KEY",
7277      get: function get() {
7278        return DATA_KEY$6;
7279      }
7280    }, {
7281      key: "Event",
7282      get: function get() {
7283        return Event$7;
7284      }
7285    }, {
7286      key: "EVENT_KEY",
7287      get: function get() {
7288        return EVENT_KEY$6;
7289      }
7290    }, {
7291      key: "DefaultType",
7292      get: function get() {
7293        return DefaultType$4;
7294      }
7295    }]);
7296
7297    return Tooltip;
7298  }();
7299  /**
7300   * ------------------------------------------------------------------------
7301   * jQuery
7302   * ------------------------------------------------------------------------
7303   * add .tooltip to jQuery only if jQuery is present
7304   */
7305
7306
7307  if (typeof jQuery !== 'undefined') {
7308    var JQUERY_NO_CONFLICT$6 = jQuery.fn[NAME$6];
7309    jQuery.fn[NAME$6] = Tooltip._jQueryInterface;
7310    jQuery.fn[NAME$6].Constructor = Tooltip;
7311
7312    jQuery.fn[NAME$6].noConflict = function () {
7313      jQuery.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
7314      return Tooltip._jQueryInterface;
7315    };
7316  }
7317/**
7318   * ------------------------------------------------------------------------
7319   * Constants
7320   * ------------------------------------------------------------------------
7321   */
7322
7323  var NAME$7 = 'popover';
7324  var VERSION$7 = '4.3.1';
7325  var DATA_KEY$7 = 'bs.popover';
7326  var EVENT_KEY$7 = "." + DATA_KEY$7;
7327  var CLASS_PREFIX$1 = 'bs-popover';
7328  var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
7329
7330  var Default$5 = _objectSpread({}, Tooltip.Default, {
7331    placement: 'right',
7332    trigger: 'click',
7333    content: '',
7334    template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
7335  });
7336
7337  var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, {
7338    content: '(string|element|function)'
7339  });
7340
7341  var ClassName$7 = {
7342    FADE: 'fade',
7343    SHOW: 'show'
7344  };
7345  var Selector$7 = {
7346    TITLE: '.popover-header',
7347    CONTENT: '.popover-body'
7348  };
7349  var Event$8 = {
7350    HIDE: "hide" + EVENT_KEY$7,
7351    HIDDEN: "hidden" + EVENT_KEY$7,
7352    SHOW: "show" + EVENT_KEY$7,
7353    SHOWN: "shown" + EVENT_KEY$7,
7354    INSERTED: "inserted" + EVENT_KEY$7,
7355    CLICK: "click" + EVENT_KEY$7,
7356    FOCUSIN: "focusin" + EVENT_KEY$7,
7357    FOCUSOUT: "focusout" + EVENT_KEY$7,
7358    MOUSEENTER: "mouseenter" + EVENT_KEY$7,
7359    MOUSELEAVE: "mouseleave" + EVENT_KEY$7
7360    /**
7361     * ------------------------------------------------------------------------
7362     * Class Definition
7363     * ------------------------------------------------------------------------
7364     */
7365
7366  };
7367
7368  var Popover =
7369  /*#__PURE__*/
7370  function (_Tooltip) {
7371    _inheritsLoose(Popover, _Tooltip);
7372
7373    function Popover() {
7374      return _Tooltip.apply(this, arguments) || this;
7375    }
7376
7377    var _proto = Popover.prototype;
7378
7379    // Overrides
7380    _proto.isWithContent = function isWithContent() {
7381      return this.getTitle() || this._getContent();
7382    };
7383
7384    _proto.addAttachmentClass = function addAttachmentClass(attachment) {
7385      this.getTipElement().classList.add(CLASS_PREFIX$1 + "-" + attachment);
7386    };
7387
7388    _proto.setContent = function setContent() {
7389      var tip = this.getTipElement(); // we use append for html objects to maintain js events
7390
7391      this.setElementContent(SelectorEngine.findOne(Selector$7.TITLE, tip), this.getTitle());
7392
7393      var content = this._getContent();
7394
7395      if (typeof content === 'function') {
7396        content = content.call(this.element);
7397      }
7398
7399      this.setElementContent(SelectorEngine.findOne(Selector$7.CONTENT, tip), content);
7400      tip.classList.remove(ClassName$7.FADE);
7401      tip.classList.remove(ClassName$7.SHOW);
7402    } // Private
7403    ;
7404
7405    _proto._getContent = function _getContent() {
7406      return this.element.getAttribute('data-content') || this.config.content;
7407    };
7408
7409    _proto._cleanTipClass = function _cleanTipClass() {
7410      var tip = this.getTipElement();
7411      var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
7412
7413      if (tabClass !== null && tabClass.length > 0) {
7414        tabClass.map(function (token) {
7415          return token.trim();
7416        }
7416).forEach(function (tClass) {
7417          return tip.classList.remove(tClass);
7418        });
7419      }
7420    } // Static
7421    ;
7422
7423    Popover._jQueryInterface = function _jQueryInterface(config) {
7424      return this.each(function () {
7425        var data = Data.getData(this, DATA_KEY$7);
7426
7427        var _config = typeof config === 'object' ? config : null;
7428
7429        if (!data && /dispose|hide/.test(config)) {
7430          return;
7431        }
7432
7433        if (!data) {
7434          data = new Popover(this, _config);
7435          Data.setData(this, DATA_KEY$7, data);
7436        }
7437
7438        if (typeof config === 'string') {
7439          if (typeof data[config] === 'undefined') {
7440            throw new TypeError("No method named \"" + config + "\"");
7441          }
7442
7443          data[config]();
7444        }
7445      });
7446    };
7447
7448    Popover._getInstance = function _getInstance(element) {
7449      return Data.getData(element, DATA_KEY$7);
7450    };
7451
7452    _createClass(Popover, null, [{
7453      key: "VERSION",
7454      // Getters
7455      get: function get() {
7456        return VERSION$7;
7457      }
7458    }, {
7459      key: "Default",
7460      get: function get() {
7461        return Default$5;
7462      }
7463    }, {
7464      key: "NAME",
7465      get: function get() {
7466        return NAME$7;
7467      }
7468    }, {
7469      key: "DATA_KEY",
7470      get: function get() {
7471        return DATA_KEY$7;
7472      }
7473    }, {
7474      key: "Event",
7475      get: function get() {
7476        return Event$8;
7477      }
7478    }, {
7479      key: "EVENT_KEY",
7480      get: function get() {
7481        return EVENT_KEY$7;
7482      }
7483    }, {
7484      key: "DefaultType",
7485      get: function get() {
7486        return DefaultType$5;
7487      }
7488    }]);
7489
7490    return Popover;
7491  }(Tooltip);
7492  /**
7493   * ------------------------------------------------------------------------
7494   * jQuery
7495   * ------------------------------------------------------------------------
7496   */
7497
7498
7499  if (typeof jQuery !== 'undefined') {
7500    var JQUERY_NO_CONFLICT$7 = jQuery.fn[NAME$7];
7501    jQuery.fn[NAME$7] = Popover._jQueryInterface;
7502    jQuery.fn[NAME$7].Constructor = Popover;
7503
7504    jQuery.fn[NAME$7].noConflict = function () {
7505      jQuery.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
7506      return Popover._jQueryInterface;
7507    };
7508  }
7509  /**
7510   * --------------------------------------------------------------------------
7511   * Bootstrap (v4.3.1): index.umd.js
7512   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7513   * --------------------------------------------------------------------------
7514   */
7515
7516   /**
7517      var index_umd = {
7518    Alert: Alert,
7519    Button: Button,
7520    Carousel: Carousel,
7521    Collapse: Collapse,
7522    Dropdown: Dropdown,
7523    Modal: Modal,
7524    Popover: Popover,
7525    ScrollSpy: ScrollSpy,
7526    Tab: Tab,
7527    //Toast: Toast,
7528    Tooltip: Tooltip
7529  };
7530    */
7531  var index_umd = {
7532    Alert: Alert,
7533    Button: Button,
7534    Dropdown: Dropdown,
7535    Popover: Popover,
7536    Tooltip: Tooltip
7537  };
7538/* End */
7539;
7540; /* Start:"a:4:{s:4:"full";s:86:"/simai/asset/simai.framework/sf4.master/plugin/navigation/js/sf-nav.js?164845880431859";s:6:"source";s:70:"/simai/asset/simai.framework/sf4.master/plugin/navigation/js/sf-nav.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
7541;(function($, window, document, undefined) {
7542
7543    //alert('Основной SCRIPT');
7544    //alert('Основной SCRIPT');
7545    //test
7546// ========= DEFAULTS PARAMS ========= //
7547
7548    $.sfNavMulti = function(element, options) {
7549// ========= DEFAULTS PARAMS ========= //
7550        var defaults = {
7551            mobileWidth: 768,
7552            overlay: true,
7553            overlayColor: "rgba(0, 0, 0, 0.7)",
7554            hideScrollBar: true,
7555            offCanvasSide: 'left',
7556            onInit: function() {},
7557            onShowOffCanvas: function() {},
7558            onHideOffCanvas: function() {},
7559    // ================ horisonatal navigation transformMenu ================ //
7560            transformInit: false,
7561            transformThreshold: 1,
7562            transformCutoff: 0,
7563            iconMenu: '<i class="far fa-ellipsis-h fa-lg" aria-hidden="true"></i>',
7564    // ================ end flexMenu ================ //
7565            fixedInit: false,
7566            fixedId: '#sf-nav-id',
7567            topSpace: 0,
7568    // ================ end flexMenu ================ //            
7569            leftFlag: false,
7570//============== TOP ==============//
7571            transformFlag: true,
7572            transformPaddingOne: 'p-3',
7573            transformPaddingLower: 'p-2',
7574            transformTheme: 'theme-dark',
7575            transformEffectHover: 'underline',
7576            fullScreenFlag: true,
7577            fullScreenTheme: 'theme-dark',
7578            fixedFlag:true,
7579            fixedClass: 'nav-fixed',
7580            mobileFlag:true,
7581            transferHeadingItem: false,
7582            searchContainer: false,
7583            horizontalSubmenu: false,
7584			positionY:false,
7585        };
7586// ========= PLUGIN EVENTS ========= //
7587        var plugin = this,
7588            widthW = 0,
7589            heightW = 0;           
7590        plugin.settings = {};
7591        var $element = $(element), element = element;
7592        // PLUGIN INIT
7593        plugin.init = function() {
7594            //window.addEventListener('DOMContentLoaded', function() {
7595                plugin.settings = $.extend({}, defaults, options);
7596            if(plugin.settings.leftFlag)
7597                leftCatalog();
7598            else {
7599                var section = $(element).find('.center-section');
7600                if(!section.find('> ul.nav-items').hasClass('flex-wrap'))
7601                    section.find('> ul.nav-items').addClass('flex-wrap');
7602                if(section.hasClass('overflow-hidden'))
7603                    section.removeClass('overflow-hidden');
7604                section.attr('style', '');
7605
7606                $(element).find('.btn-mobile').on('click touchend', function(e) {
7607                    e.stopPropagation();
7608                    e.preventDefault();
7609                    plugin.showOffcanvas();
7610                    mobileMode();
7611                    document.body.style.overflow = 'hidden';
7612                });
7613
7614                $(element).find('.sf-close').on('click touchend', function() {
7615                    plugin.hideOffcanvas();
7616                    document.body.style.overflow = 'auto';
7617                });
7618
7619                if(plugin.settings.fullScreenFlag) {
7620                    $(element).find(".btn-full-screen").on('click touchend', function() {
7621                        fullScreenMode();
7622                        plugin.showNav();
7623                    });
7624                }
7625
7626                $(element).find(".btn-search, .sf-close").on("click touchend keyup", function(e) {
7627                    e.stopPropagation(); 
7628                    e.preventDefault();
7629                    var code = e.keyCode || e.which;
7630                    if(e.type === "click" || e.type === "touchend" || (e.type === "keyup" && code == 13))
7631                        plugin.toggleSearch();
7632                    else if(code == 9) $(e.target).blur();
7633                    
7634                });
7635                
7636                if(plugin.settings.transformFlag) {
7637                    widthW = windowWidth();
7638                    heightW = windowHeight();
7639                    
7640                    function resizeInit() {
7641
7642                        if(windowWidth() < widthW || windowHeight() < heightW) {
7643                            transformMode(true);                                
7644                            transformMode(false);                        
7645                        } else if(windowWidth() > widthW || windowHeight() > heightW) {
7646                            transformMode(true);
7647                            transformMode(false);
7648                        }  
7649                        else {                           
7650                            transformMode(false); 
7651                        }                  
7652                        widthW = windowWidth();
7653                        heightW = windowHeight();
7654
7655                        if(plugin.settings.horizontalSubmenu) {
7656                            //horizontalMode();
7657                        }
7658                    }
7659                    setTimeout(resizeInit, 3000); //resizeInit();
7660                    
7661                    $(window).resize(resizeInit);
7662                }
7663                if(plugin.settings.fixedFlag) fixedMode();
7664                if(plugin.settings.overlay) $(element).append('<div class="nav-overlay"></div>');
7665                if(plugin.settings.transferHeadingItem) transferItem();
7666
7667                if(plugin.settings.horizontalSubmenu) {
7668                    //horizontalMode();
7669                }
7670                
7671            }
7672            //});
7673            
7674
7675        };
7676
7677        var transferItem = function() {
7678            $(element).find('.transfer-item').css('white-space', 'normal');
7679        }
7680
7681        // show the overlay panel
7682        var showOverlay = function(){
7683            if(plugin.settings.hideScrollBar) $("body").addClass("no-scroll");
7684            
7685            if(plugin.settings.overlay){
7686                $(element).find(".nav-overlay")
7687                    .css("background-color", plugin.settings.overlayColor)
7688                    .fadeIn(300)
7689                    .on("click touchend", function(){
7690                        plugin.hideOffcanvas();
7691                         document.body.style.overflow = 'auto';                   
7692                    });
7693            }
7694        };
7695        
7696        // hide the overlay panel
7697        var hideOverlay = function(){
7698            if(plugin.settings.hideScrollBar){
7699                $("body").removeClass("no-scroll");
7700            }
7701            if(plugin.settings.overlay){
7702                $(element).find(".nav-overlay").fadeOut(400);
7703            }
7704        };
7705 
7706        // show offcanvas
7707        plugin.showOffcanvas = function(){
7708            showOverlay();
7709            if(plugin.settings.offCanvasSide == "left"){
7710                $(element).find(".center-section").css("transition-property", "left").addClass("open-mobile");
7711                
7712                var mobileWidth = windowWidth();
7713
7714                var textMenu = $('ul.transform-submenu').html();
7715                var navMenu = $('ul.transform-submenu > li');
7716                var textMenu2 = $('ul.nav-menu').slice(0, (navMenu.length - 1)).html();
7717                if(textMenu) {
7718                    $('ul.transform-submenu').html('');
7719                    $('ul.transform-submenu').html(textMenu2 + textMenu);
7720                    $('.transform-submenu').detach() 
7721                } 
7722                else textMenu = $('ul.transform-submenu').html();
7723            }
7724            else $(element).find(".center-section").css("transition-property", "right").addClass("open-mobile");
7725        };
7726        
7727        // hide offcanvas 
7728        plugin.hideOffcanvas = function() {          
7729            $(element).find(".center-section").removeClass("open-mobile")
7730                .on("webkitTransitionEnd moztransitionend transitionend oTransitionEnd", function(){
7731                    $(element).find(".center-section")
7732                        .css("transition-property", "none")
7733                        .off();
7734            });
7735
7736            $(element).find(".mobile-level").removeClass("open-mobile")
7737                .on("webkitTransitionEnd moztransitionend transitionend oTransitionEnd", function(){
7738                    $(element).find(".mobile-level")
7739                        .css("transition-property", "none")
7740                        .off();
7741            });
7742            hideOverlay();
7743        };
7744        
7745        // toggle offcanvas
7746        plugin.toggleOffcanvas = function(){
7747            if(windowWidth() <= plugin.settings.mobileBreakpoint){
7748                if($(element).find(".center-section").hasClass("open-mobile")) plugin.hideOffcanvas();
7749                else plugin.showOffcanvas();
7750            }
7751        };
7752        
7753        // show/hide the search form
7754        plugin.toggleSearch = function(){
7755            if($(element).find(".nav-search").find("form").css("display") == "none"){
7756                $(element).find(".nav-search").find("form").css('display', 'flex');
7757                $(element).find(".nav-search").find("input").focus();
7758                if(plugin.settings.searchContainer) $(element).css('position', 'relative');
7759            }
7760            else{
7761                $(element).find(".nav-search").find("form").css('display', 'none');
7762                $(element).find(".nav-search").find("input").blur();
7763                if(plugin.settings.searchContainer) $(element).css('position', 'static');
7764            }
7765        };
7766// ========= FULL.SCREEN.MENU ========= //
7767        var fullScreenMode = function() {
7768            plugin.showNav = function() {
7769                $('.sf-nav-full-screen').addClass(plugin.settings.animation).fadeIn(300, function(){
7770                    $('html,body').css('overflow', 'hidden');
7771                });
7772                adjustMenuPadding();
7773            }
7774
7775            var subElement = function(el) {
7776                var strSubLevel = '';
7777                $subElem = $(el).children('div.mobile-level').children('ul.submenu-items');
7778
7779                if($subElem.length > 0) {
7780                    //console.log($subElem.children('li')[0]);
7781                    var index = 0;
7782                    $subElem.children('li').each(function() {
7783                        if(index != 0) {
7784                            $subLevelUp = $(this);
7785                            if($(this).find('ul.submenu-items').length > 0) {
7786
7787                            }
7788                            strSubLevel += '<li>' + $(this).html().substr(0, ($(this).html().indexOf('</span>', 0) + 7)) + '</span>';
7789                            if($subLevelUp.children('div.mobile-level').children('ul.submenu-items').length > 0) {
7790                                strSubLevel += '<span class="submenu-indicator item-icon"><i class="fal fa-angle-down" aria-hidden="true"></i></span></a>'
7791                                            + '<ul class="sf-full-screen-sub-level">' + subElement($subLevelUp) + '</ul></li>'
7792                            } else strSubLevel += '</a></li>';
7793                        }
7794                         index++;
7795                    });
7796
7797                    strSubLevel += '</li>';
7798
7799                    return strSubLevel;
7800                }
7801                return strSubLevel;
7802            }
7803
7804            plugin.initFullScreen = function() {
7805                var fullScreenWindow = '<div class="sf-nav-full-screen ' + plugin.settings.fullScreenTheme + '">'
7806                                    + '<div class="sf-nav-full-screen-header">';
7807
7808                $strE = $(element).find('.left-section').find('.nav-brand');
7809                if($strE.length > 0) {
7810                    fullScreenWindow += '<div class="sf-nav-full-screen-brand">' + $strE[0].outerHTML + '</div>';
7811                }
7812                fullScreenWindow += '<button class="sf-close t-1 sf-close-center"></button>';
7813                fullScreenWindow += '</div><div class="sf-nav-full-screen-content">'
7814                                + '<div class="sf-nav-full-screen-lists sf-scroll">';
7815
7816                $(element).children('section.center-section')
7817                            .children('ul.nav-items')
7818                            .find('> li').each(function() {
7819                                var  trans = this.querySelector('a.btn-transform');
7820                                if(trans != null) {
7821                                    $(this).children('ul.transform-submenu').find('> li').each(function() {
7822                                        var tagLi = '<ul class="sf-nav-full-screen-list">'
7823                                            + '<li class="sf-nav-full-screen-list-header">'
7824                                            + $(this).html().substr(0, ($(this).html().indexOf('</span>', 0) + 7))
7825                                            + '</span></a></li>';
7826                                        $flagSubL = $(this);
7827                                        tagLi += subElement($flagSubL);
7828                                        tagLi += '</ul>';
7829                                        fullScreenWindow += tagLi;
7830                                    });
7831                                } else {
7832                                    var tagLi = '<ul class="sf-nav-full-screen-list">'
7833                                        + '<li class="sf-n
7833av-full-screen-list-header">'
7834                                        + $(this).html().substr(0, ($(this).html().indexOf('</span>', 0) + 7))
7835                                        + '</span></a></li>';
7836                                    $flagSubL = $(this);
7837                                    tagLi += subElement($flagSubL);
7838                                    tagLi += '</ul>';
7839                                    fullScreenWindow += tagLi;
7840                                }
7841                            });
7842                      fullScreenWindow += '</div></div></div>';
7843                      $('body').append(fullScreenWindow); 
7844            };
7845
7846            plugin.initEvents = function() {
7847                var opts = this.settings;
7848                $elem = $('.sf-nav-full-screen-lists');
7849                $elem.children("ul").find("span.item-icon").bind("click touchend", function(e){
7850                    
7851                    e.stopPropagation(); 
7852                    e.preventDefault();
7853    
7854                    if($(this).parent().siblings('.sf-full-screen-sub-level').length > 0) {
7855                        if($(this).parent().siblings('.sf-full-screen-sub-level').css("display") == "none") {
7856                            $(this).parent().siblings('.sf-full-screen-sub-level').css("display", 'flex');
7857                            $(this).addClass("submenu-indicator-minus");
7858                            return false;
7859                        }
7860                        else $(this).parent().siblings('.sf-full-screen-sub-level').css("display", 'none');
7861                        if($(this).hasClass("submenu-indicator-minus")) $(this).removeClass("submenu-indicator-minus");
7862                    }
7863                });
7864            };
7865            
7866            plugin.hideNav = function() {
7867                $('.sf-nav-full-screen').removeClass('zoom').fadeOut('300');
7868                $('html,body').css('overflow', 'auto');  
7869            }
7870            
7871            var buttonHideNav = function() {
7872                $('.sf-nav-full-screen').children('.sf-nav-full-screen-header').children(".sf-close").on("click touchend", function() {
7873                    plugin.hideNav();
7874                });
7875            }
7876    
7877            var adjustMenuPadding = function() {
7878                var contentHeight = $(element).find(".sf-nav-full-screen-content").innerHeight();
7879                var innerElementsHeight = $(element).find(".full-screen-nav-menu, .sf-nav-full-screen-lists, .full-screen-nav-boxes, .full-screen-nav-circles, .full-screen-nav-general").innerHeight();
7880                if(innerElementsHeight > contentHeight){
7881                    $(element).find(".sf-nav-full-screen-content").css("padding-top", contentDefaultPaddingTop);
7882                }
7883                else{
7884                    $(element).find(".sf-nav-full-screen-content").css("padding-top", (contentHeight - innerElementsHeight) / 2);
7885                }
7886            }
7887
7888            plugin.initFullScreen();
7889            plugin.initEvents();
7890            buttonHideNav();
7891
7892            $(window).resize(function(){
7893                adjustMenuPadding();
7894            });
7895            
7896        }
7897// ========= END FULL.SCREEN.MENU ========= //
7898// ========= FLEX.MENU ========= //
7899        var transformMode = function(undo) {
7900            var $this = $(element).children('.center-section').children('ul'),
7901            $items = $this.find('> li'),
7902            $firstItem = $items.first(),
7903            $lastItem = $items.last(),
7904            numItems = $this.find('li').length,
7905            firstItemTop = Math.floor($firstItem.offset().top),
7906            firstItemHeight = Math.floor($firstItem.outerHeight(true)),
7907            $lastChild,
7908            keepLooking,
7909            $moreItem,
7910            $moreLink,
7911            numToRemove,
7912            allInPopup = false,
7913            $menu,
7914            i;
7915
7916            function needsMenu($itemOfInterest) {
7917                if($itemOfInterest !== undefined) {
7918                    if((Math.ceil($itemOfInterest.offset().top)) >= (firstItemTop + firstItemHeight))
7919                        return true;
7920                    else return false;
7921                } else return false;
7922                
7923            }
7924            if(needsMenu($lastItem) && numItems > plugin.settings.transformThreshold && !undo && $this.is(':visible')) {
7925                if(windowWidth() > plugin.settings.mobileWidth) {
7926                    var $popup = $('<ul class="transform-submenu nav-dropdown nav-submenu m-0 p-0 flex-column mobile-level ' + plugin.settings.transformTheme + '"></ul>');
7927                    $popup.addClass('');
7928                    for(i = numItems; i > 1; i--) {
7929                        $lastChild = $this.find('> li:last-child');
7930                        keepLooking = (needsMenu($lastChild));
7931                        if((i - 1) <= plugin.settings.transformCutoff) {
7932                            $(this.children().get().reverse()).appendTo($popup);
7933                            allInPopup = true;
7934                            break;
7935                        }
7936                        if(!keepLooking) {
7937                            break;
7938                        } else {
7939                            $lastChild.appendTo($popup);
7940                        }
7941                    }
7942                    if(allInPopup) {
7943                        $this.append('<li class="menu-item nav-item transform-allInPopup"><a href="#" class="btn-transform ' +
7944                            plugin.settings.transformEffectHover + ' ' + plugin.settings.transformPaddingOne + '">' + 
7945                            plugin.settings.iconMenu + '</a></li>');
7946                    } else {
7947                        $this.append('<li class="menu-item nav-item"><a href="#" class="btn-transform item-link ' +
7948                                    plugin.settings.transformEffectHover + ' ' + plugin.settings.transformPaddingOne + '"><span class="item-icon">' + 
7949                                    plugin.settings.iconMenu + '</span></a></li>');
7950                    }
7951                    $moreItem = $this.find('> li.menu-item');//.find('.mobile-level');
7952
7953                    if(needsMenu($moreItem)) {
7954                        $this.find('> li:nth-last-child(2)').appendTo($popup);
7955                    }
7956
7957                    $popup.children().each(function(i, li) {
7958                        $popup.prepend(li);
7959                    });
7960                    $moreItem.append($popup);
7961                    $moreLink = $this.find('> li.menu-item > a');
7962                    $moreLink.click(function(e) {
7963                        var $activeMenus,
7964                            $menusToCollapse;
7965                        $activeMenus = $('li.menu-item.active');
7966                        $menusToCollapse = $activeMenus.not($moreItem);
7967                        $menusToCollapse.removeClass('active').find('> ul').css('display', 'none');
7968                        $popup.toggle();
7969                        $moreItem.toggleClass('active');
7970                        e.preventDefault();
7971                    });
7972                }
7973                else if(windowWidth() <= (plugin.settings.mobileWidth)) {
7974                    $menu = $this.find('ul.transform-submenu');
7975                    numToRemove = $menu.find('li').length;
7976                    for(i = 1; i <= numToRemove; i++) {
7977                        $menu.find('> li:first-child').appendTo($this);
7978                    }
7979                    $menu.remove();
7980                    $this.find('> li.menu-item').remove();
7981                }
7982            }
7983            else if (undo && $this.find('ul.transform-submenu')) {
7984                if(windowWidth() > (plugin.settings.mobileWidth)) {
7985                    $menu = $this.find('ul.transform-submenu');
7986                    numToRemove = $menu.find('li').length;
7987                    for(i = 1; i <= numToRemove; i++) {
7988                        $menu.find('> li:first-child').appendTo($this);
7989                    }
7990                    $menu.remove();
7991                    $this.find('> li.menu-item').remove();
7992                }
7993            }
7994        };
7995        // ========= FIXED.MENU ========= //
7996        var fixedMode = function() {
7997
7998            var navF = document.querySelector(plugin.settings.fixedId),
7999                location = navF.getBoundingClientRect(),
8000                locationStart = plugin.settings.topSpace ? plugin.settings.topSpace : 0,
8001                classF = plugin.settings.fixedClass ? new String(plugin.settings.fixedClass) : "fixed-top";
8002                classF += " transition";
8003                var arrClassF = classF.split(" "),
8004                lastScroll = 0;
8005            
8006
8007            if(location.y < locationStart) {
8008                for(var k = 0; k < arrClassF.length; k++) navF.classList.add(arrClassF[k]);
8009                navF.style.top = 0;
8010            } else for(var k = 0; k < arrClassF.length; k++) navF.classList.remove(arrClassF[k]);
8011
8012            document.addEventListener("scroll", function(e) {
8013                var location = navF.getBoundingClientRect(),
8014                    locationContainer = navF.parentNode.getBoundingClientRect();
8015                if(location.y < locationStart) {
8016                    for(var k = 0; k < arrClassF.length; k++) navF.classList.add(arrClassF[k]);
8017                    navF.style.top = '0';
8018                } else if(location.y <= locationContainer.y) for(var k = 0; k < arrClassF.length; k++) navF.classList.remove(arrClassF[k]);
8019
8020            
8021            });
8022        };
8023
8024        var leftCatalog = function() {
8025            $(element).children("ul").find("span.submenu-indicator").bind("click touchend", function(e) {
8026                e.stopPropagation(); 
8027                e.preventDefault();
8028                if($(this).parent().siblings('div.catalog-submenu').children(".submenu").length > 0) {
8029                    if($(this).parent().siblings('div.catalog-submenu').children(".submenu").css("display") == "none") {
8030                        $(this).parent().siblings('div.catalog-submenu').children(".submenu").css('display', 'block');
8031                        $(this).parent().parent().parent().children(".submenu").css('display', 'none');
8032                        $(this).parent().parent().parent().children(".submenu").siblings("a").removeClass("submenu-indicator-minus");
8033                        $(this).parent().parent().parent().children(".submenu").siblings("a").children('i').css('transform', 'rotate(-90deg)');
8034                        $(this).children('i').css('transform', 'rotate(0deg)');
8035                        $(this).addClass("submenu-indicator-minus");
8036                        return false;
8037                    }
8038                    else {
8039                        $(this).parent().siblings('div.catalog-submenu').children(".submenu").delay(0).slideUp(0);
8040                    }
8041                    if($(this).hasClass("submenu-indicator-minus")) {
8042                        $(this).removeClass("submenu-indicator-minus");
8043                        $(this).children('i').css('transform', 'rotate(-90deg)');
8044                    }
8045                }
8046            });
8047        }
8048
8049//========== ========= //
8050        
8051// ========= END FIXED.MENU ========= //
8052// ========= MOBILE.PUSH.MENU ========= //
8053        var mobileMode = function() {
8054            var $this = $(element),
8055                $level = $this.find('> .mobile-level'),
8056                i = 0;
8057            function initEventClick(el, levelM) {
8058                if($(el).attr('data-level') === levelM) {
8059
8060                $(el).parent().parent().find('> li').find('> a').each(function() {
8061                        if(this.querySelector('.item-icon')) {
8062							
8063							 $(this).on('click touchstart', function(e) {
8064                                 plugin.settings.positionY = $(this).position().top;
8065                            });
8066							
8067                            $(this).on('click touchend', function(e) {
8068                                e.stopPropagation();
8069                                e.preventDefault();
8070								if(Math.abs(plugin.settings.positionY - $(this).position().top)<10){
8071									
8072									var mLevel = this.parentNode.querySelector('.mobile-level');
8073									mLevel.style.transitionProperty = 'left';
8074									mLevel.classList.add('open-mobile');
8075									var back = function() {
8076										$(mLevel).removeClass("open-mobile")
8077											.on("webkitTransitionEnd moztransitionend transitionend oTransitionEnd", function(){
8078												$(element).find(".mobile-level")
8079													.off();
8080										});
8081									}
8082									mLevel.querySelector('a').addEventListener('click', back);
8083									
8084							    }
8085                            });
8086                        }
8087                    });
8088                    
8089                }
8090            }
8091
8092            function levelInc(i, el) {
8093                i++;
8094                var levelSub = $(el).children('ul')
8095                    .children('li')
8096                    .children('.mobile-level');
8097                if(levelSub.length > 0) {
8098                    $(levelSub).attr('data-level', 'level-mobile-' + i);
8099                    $(levelSub).each(function() {
8100                        levelInc(i, this);
8101                    });
8102                    initEventClick(levelSub, 'level-mobile-' + i);                    
8103                }
8104                return 0;
8105            }
8106
8107            if($level.length > 0) {
8108                $level.each(function() {
8109                    i++;
8110                    $(this).attr('data-level', 'level-mobile-' + i);
8111                    /*if(this.classList.contains('d-flex')) {
8112                        this.classList.remove('d-flex');
8113                        $(this).children('ul').removeClass('container');
8114                    }*/
8115                    levelInc(i, this);
8116                });
8117            }
8118
8119
8120        };
8121
8122        /*var horizontalMode = function() {
8123
8124            var ul = $(element).find('.nav-submenu');
8125            var ulT = $(element).find('.transform-submenu');
8126
8127            var ulHeight = ulT.height() || 0;
8128
8129            $(ul).each(function() {
8130                if($(this).height() > ulHeight) ulHeight = $(this).height();
8131            });
8132
8133
8134            if(windowWidth() > 767) {
8135
8136                if(ulT !== undefined)
8137                    $(ulT).css('height', ulHeight);
8138
8139                    $(ul).each(function() {
8140                        $(this).css('height', ulHeight);
8141                    });
8142
8143                
8144
8145                var $this = $(element),
8146                    $level = $this.find('> .mobile-level'),
8147                    i = 0;
8148
8149                function initEventClick(el, levelM) {
8150                    if($(el).attr('data-level') == levelM && $(el).attr('data-level') !== 'level-mobile-1') {
8151                        var dataLevel = $(el).parent().parent();
8152                        
8153                        if($(dataLevel).attr('data-level') !== 'level-mobile-1') {
8154
8155                            $(dataLevel).find('> li').find('> a').each(function() {
8156
8157                                $(this).on('click touchend', function(e) {
8158                                    e.stopPropagation();
8159                                    e.preventDefault();
8160                                    var mLevel = this.parentNode.querySelector('.mobile-level');
8161                                    mLevel.style.transitionProperty = 'left';
8162                                    mLevel.classList.add('open-horizontal');
8163                                    var back = function() {
8164                                        $(mLevel).removeClass("open-horizontal")
8165                                            .on("webkitTransitionEnd moztransitionend transitionend oTransitionEnd", function(){
8166                                                $(element).find(".mobile-level")
8167                                                    .off();
8168                                        });
8169                                    }
8170                                    mLevel.querySelector('a').addEventListener('click', back);
8171                                });
8172
8173                            });
8174                        }
8175                        else {
8176                            $(dataLevel).find('> li').find('> a').each(function() {
8177                                $(this).unbind('click');
8178                            });
8179                        }
8180
8181                        
8182                    }
8183                }
8184
8185                function levelInc(i, el) {
8186                    i++;
8187                    if($(el).hasClass('transform-submenu')) {
8188                        var levelSub = $(el).children('li')
8189                            .children('.mobile-level');
8190                        $(el).attr('data-level', 'level-mobile-' + (i - 1));
8191                    } else {
8192                        var levelSub = $(el).children('ul')
8193                            .children('li')
8194                            .children('.mobile-level');
8195                        $(el).find('> ul').attr('data-level', 'level-mobile-' + (i - 1));
8196                    }
8197                    
8198
8199                    if(levelSub.length > 0) {
8200                        $(levelSub).attr('data-level', 'level-mobile-' + i);
8201                        $(levelSub).each(function() {
8202                            levelInc(i, this);
8203                        });
8204                        initEventClick(levelSub, 'level-mobile-' + i);                    
8205                    }
8206                    return 0;
8207                }
8208
8209                if($level.length > 0) {
8210                    $level.each(function() {
8211                        i++;
8212                        $(this).attr('data-level', 'level-mobile-' + i);
8213                        levelInc(i, this);
8214                    });
8215                }
8216
8217            } else {
8218                if(ulT !== undefined)
8219                    $(ulT).css('heigth', '100%');
8220                $(ul).each(function() {
8221                    $(this).css('height', '100%');
8222                });
8223            }
8224
8225        };*/
8226// ========= END MOBILE.PUSH.MENU ========= //
8227
8228// =========  WINDOW WIDTH ========= //
8229        var windowWidth = function() {
8230            return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
8231        };
8232// =========  WINDOW HEIGHT ========= //
8233        var windowHeight = function() {
8234            return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
8235        };
8236
8237        plugin.init();
8238    };
8239
8240    $.fn.sfNavMulti = function(options) {
8241        return this.each(function() {
8242            if(undefined === $(this).data('sfNavMulti')) {
8243                var plugin = new $.sfNavMulti(this, options);
8244                $(this).data('sfNavMulti', plugin);
8245            }
8246        });
8247    };
8248
8249})(jQuery, window, document);
8250/* End */
8251;
8252; /* Start:"a:4:{s:4:"full";s:79:"/simai/asset/fancybox/fancybox.master/js/jquery.fancybox.min.js?164845880467881";s:6:"source";s:63:"/simai/asset/fancybox/fancybox.master/js/jquery.fancybox.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
8253// ==================================================
8254// fancyBox v3.5.2
8255//
8256// Licensed GPLv3 for open source use
8257// or fancyBox Commercial License for commercial use
8258//
8259// http://fancyapps.com/fancybox/
8260// Copyright 2018 fancyApps
8261//
8262// ==================================================
8263!function(t,e,n,o){"use strict";function a(t,e){var o,a,i,s=[],r=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=h(t.data.options,e)),o=e.$target||n(t.currentTarget).trigger("blur"),i=n.fancybox.getInstance(),i&&i.$trigger&&i.$trigger.is(o)||(e.selector?s=n(e.selector):(a=o.attr("data-fancybox")||"",a?(s=t.data?t.data.items:[],s=s.length?s.filter('[data-fancybox="'+a+'"]'):n('[data-fancybox="'+a+'"]')):s=[o]),r=n(s).index(o),r<0&&(r=0),i=n.fancybox.open(s,e,r),i.$trigger=o))}if(t.console=t.console||{info:function(t){}}
vendor: 4,684 bytes, line 8263
8263,n){if(n.fn.fancybox)return void console.info("fancyBox already initialized");var i={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schliessen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/>
8263 Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Maßstab"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),u=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),f=function(){var t,n=e.createElement("fakeelement"),a={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in a)if(n.style[t]!==o)return a[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},h=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&&(o[t]=e)}),o},g=function(t){var o,a;return!(!t||t.ownerDocument!==e)&&(n(".fancybox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},a=e.elementFromPoint(o.x,o.y)===t,n(".fancybox-container").css("pointer-events",""),a)},b=function(t,e,o){var a=this;a.opts=h({index:o},n.fancybox.defaults),n.isPlainObject(e)&&(a.opts=h(a.opts,e)),n.fancybox.isMobile&&(a.opts=h(a.opts,a.opts.mobile)),a.id=a.opts.id||++c,a.currIndex=parseInt(a.opts.index,10)||0,a.prevIndex=null,a.prevPos=null,a.currPos=0,a.firstRun=!0,a.group=[],a.slides={},a.addContent(t),a.group.length&&a.init()};n.extend(b.prototype,{init:function(){var o,a,i=this,s=i.group[i.currIndex],r=s.opts;r.closeExisting&&n.fancybox.close(!0),n("body").addClass("fancybox-active"),!n.fancybox.getInstance()&&r.hideScrollbar!==!1&&!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(n("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(t.innerWidth-e.documentElement.clientWidth)+"px;}</style>"),n("body").addClass("compensate-for-scrollbar")),a="",n.each(r.buttons,function(t,e){a+=r.btnTpl[e]||""}),o=n(i.translate(i,r.baseTpl.replace("{{buttons}}",a).replace("{{arrows}}",r.btnTpl.arrowLeft+r.btnTpl.arrowRight))).attr("id","fancybox-container-"+i.id).addClass(r.baseClass).data("FancyBox",i).appendTo(r.parentEl),i.$refs={container:o},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){i.$refs[t]=o.find(".fancybox-"+t)}),i.trigger("onInit"),i.activate(),i.jumpTo(i.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){var a=n[e];return a===o?t:a})},addContent:function(t){var e,a=this,i=n.makeArray(t);n.each(i,function(t,e){var i,s,r,c,l,d={},u={};n.isPlainObject(e)?(d=e,u=e.opts||e):"object"===n.type(e)&&n(e).length?(i=n(e),u=i.data()||{},u=n.extend(!0,{},u,u.options),u.$orig=i,d.src=a.opts.src||u.src||i.attr("href"),d.type||d.src||(d.type="inline",d.src=e)):d={type:"html",src:e+""},d.opts=n.extend(!0,{},a.opts,u),n.isArray(u.buttons)&&(d.opts.buttons=u.buttons),n.fancybox.isMobile&&d.opts.mobile&&(d.opts=h(d.opts,d.opts.mobile)),s=d.type||d.opts.type,c=d.src||"",!s&&c&&((r=c.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(s="video",d.opts.video.format||(d.opts.video.format="video/"+("ogv"===r[1]?"ogg":r[1]))):c.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":c.match(/\.(pdf)((\?|#).*)?$/i)?(s="iframe",d=n.extend(!0,d,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===c.charAt(0)&&(s="inline")),s?d.type=s:a.trigger("objectNeedsType",d),d.contentType||(d.contentType=n.inArray(d.type,["html","inline","ajax"])>-1?"html":d.type),d.index=a.group.length,"auto"==d.opts.smallBtn&&(d.opts.smallBtn=n.inArray(d.type,["html","inline","ajax"])>-1),"auto"===d.opts.toolbar&&(d.opts.toolbar=!d.opts.smallBtn),d.$thumb=d.opts.$thumb||null,d.opts.$trigger&&d.index===a.opts.index&&(d.$thumb=d.opts.$trigger.find("img:first"),d.$thumb.length&&(d.opts.$orig=d.opts.$trigger)),d.$thumb&&d.$thumb.length||!d.opts.$orig||(d.$thumb=d.opts.$orig.find("img:first")),d.$thumb&&!d.$thumb.length&&(d.$thumb=null),d.thumb=d.opts.thumb||(d.$thumb?d.$thumb[0].src:null),"function"===n.type(d.opts.caption)&&(d.opts.caption=d.opts.caption.apply(e,[a,d])),"function"===n.type(a.opts.caption)&&(d.opts.caption=a.opts.caption.apply(e,[a,d])),d.opts.caption instanceof n||(d.opts.caption=d.opts.caption===o?"":d.opts.caption+""),"ajax"===d.type&&(l=c.split(/\s+/,2),l.length>1&&(d.src=l.shift(),d.opts.filter=l.shift())),d.opts.modal&&(d.opts=n.extend(!0,d.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),a.group.push(d)}),Object.keys(a.slides).length&&(a.updateControls(),e=a.Thumbs,e&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next()}).on("click.fb","[data-fancybox-zoom]",function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(e.requestId&&u(e.requestId),e.requestId=d(function(){e.update(t)})):(e.current&&"iframe"===e.current.type&&e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t)},n.fancybox.isMobile?600:250))}
vendor: 53,749 bytes, lines 8263-8265
8263),r.on("keydown.fb",function(t){var o=n.fancybox?n.fancybox.getInstance():null,a=o.current,i=t.keyCode||t.which;if(9==i)return void(a.opts.trapFocus&&e.focus(t));if(!(!a.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is("input")||n(t.target).is("textarea")))return 8===i||27===i?(t.preventDefault(),void e.close(t)):37===i||38===i?(t.preventDefault(),void e.previous()):39===i||40===i?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,i)}),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1}),e.idleInterval=t.setInterval(function(){e.idleSecondsCounter++,e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var a,i,s,r,c,l,d,u,f,h=this,g=h.group.length;if(!(h.isDragging||h.isClosing||h.isAnimating&&h.firstRun)){if(t=parseInt(t,10),s=h.current?h.current.opts.loop:h.opts.loop,!s&&(t<0||t>=g))return!1;if(a=h.firstRun=!Object.keys(h.slides).length,c=h.current,h.prevIndex=h.currIndex,h.prevPos=h.currPos,r=h.createSlide(t),g>1&&((s||r.index<g-1)&&h.createSlide(t+1),(s||r.index>0)&&h.createSlide(t-1)),h.current=r,h.currIndex=r.index,h.currPos=r.pos,h.trigger("beforeShow",a),h.updateControls(),r.forcedDuration=o,n.isNumeric(e)?r.forcedDuration=e:e=r.opts[a?"animationDuration":"transitionDuration"],e=parseInt(e,10),i=h.isMoved(r),r.$slide.addClass("fancybox-slide--current"),a)return r.opts.animationEffect&&e&&h.$refs.container.css("transition-duration",e+"ms"),h.$refs.container.addClass("fancybox-is-open").trigger("focus"),h.loadSlide(r),void h.preload("image");l=n.fancybox.getTranslate(c.$slide),d=n.fancybox.getTranslate(h.$refs.stage),n.each(h.slides,function(t,e){n.fancybox.stop(e.$slide,!0)}),c.pos!==r.pos&&(c.isComplete=!1),c.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),i?(f=l.left-(c.pos*l.width+c.pos*c.opts.gutter),n.each(h.slides,function(t,o){o.$slide.removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")});var a=o.pos*l.width+o.pos*o.opts.gutter;n.fancybox.setTranslate(o.$slide,{top:0,left:a-d.left+f}),o.pos!==r.pos&&o.$slide.addClass("fancybox-slide--"+(o.pos>r.pos?"next":"previous")),p(o.$slide),n.fancybox.animate(o.$slide,{top:0,left:(o.pos-r.pos)*l.width+(o.pos-r.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===h.currPos&&h.complete()})})):e&&r.opts.transitionEffect&&(u="fancybox-animated fancybox-fx-"+r.opts.transitionEffect,c.$slide.addClass("fancybox-slide--"+(c.pos>r.pos?"next":"previous")),n.fancybox.animate(c.$slide,u,e,function(){c.$slide.removeClass(u).removeClass("fancybox-slide--next fancybox-slide--previous")},!1)),r.isLoaded?h.revealContent(r):h.loadSlide(r),h.preload("image")}},createSlide:function(t){var e,o,a=this;return o=t%a.group.length,o=o<0?a.group.length+o:o,!a.slides[t]&&a.group[o]&&(e=n('<div class="fancybox-slide"></div>').appendTo(a.$refs.stage),a.slides[t]=n.extend(!0,{},a.group[o],{pos:t,$slide:e,isLoaded:!1}),a.updateSlide(a.slides[t])),a.slides[t]},scaleToActual:function(t,e,a){var i,s,r,c,l,d=this,u=d.current,f=u.$content,p=n.fancybox.getTranslate(u.$slide).width,h=n.fancybox.getTranslate(u.$slide).height,g=u.width,b=u.height;d.isAnimating||d.isMoved()||!f||"image"!=u.type||!u.isLoaded||u.hasError||(d.isAnimating=!0,n.fancybox.stop(f),t=t===o?.5*p:t,e=e===o?.5*h:e,i=n.fancybox.getTranslate(f),i.top-=n.fancybox.getTranslate(u.$slide).top,i.left-=n.fancybox.getTranslate(u.$slide).left,c=g/i.width,l=b/i.height,s=.5*p-.5*g,r=.5*h-.5*b,g>p&&(s=i.left*c-(t*c-t),s>0&&(s=0),s<p-g&&(s=p-g)),b>h&&(r=i.top*l-(e*l-e),r>0&&(r=0),r<h-b&&(r=h-b)),d.updateCursor(g,b),n.fancybox.animate(f,{top:r,left:s,scaleX:c,scaleY:l},a||330,function(){d.isAnimating=!1}),d.SlideShow&&d.SlideShow.isActive&&d.SlideShow.stop())},scaleToFit:function(t){var e,o=this,a=o.current,i=a.$content;o.isAnimating||o.isMoved()||!i||"image"!=a.type||!a.isLoaded||a.hasError||(o.isAnimating=!0,n.fancybox.stop(i),e=o.getFitPos(a),o.updateCursor(e.width,e.height),n.fancybox.animate(i,{top:e.top,left:e.left,scaleX:e.width/i.width(),scaleY:e.height/i.height()},t||330,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,o,a,i,s=this,r=t.$content,c=t.$slide,l=t.width||t.opts.width,d=t.height||t.opts.height,u={};return!!(t.isLoaded&&r&&r.length)&&(e=n.fancybox.getTranslate(s.$refs.stage).width,o=n.fancybox.getTranslate(s.$refs.stage).height,e-=parseFloat(c.css("paddingLeft"))+parseFloat(c.css("paddingRight"))+parseFloat(r.css("marginLeft"))+parseFloat(r.css("marginRight")),o-=parseFloat(c.css("paddingTop"))+parseFloat(c.css("paddingBottom"))+parseFloat(r.css("marginTop"))+parseFloat(r.css("marginBottom")),l&&d||(l=e,d=o),a=Math.min(1,e/l,o/d),l=a*l,d=a*d,l>e-.5&&(l=e),d>o-.5&&(d=o),"image"===t.type?(u.top=Math.floor(.5*(o-d))+parseFloat(c.css("paddingTop")),u.left=Math.floor(.5*(e-l))+parseFloat(c.css("paddingLeft"))):"video"===t.contentType&&(i=t.opts.width&&t.opts.height?l/d:t.opts.ratio||16/9,d>l/i?d=l/i:l>d*i&&(l=d*i)),u.width=l,u.height=d,u)},update:function(t){var e=this;n.each(e.slides,function(n,o){e.updateSlide(o,t)})},updateSlide:function(t,e){var o=this,a=t&&t.$content,i=t.width||t.opts.width,s=t.height||t.opts.height,r=t.$slide;o.adjustCaption(t),a&&(i||s||"video"===t.contentType)&&!t.hasError&&(n.fancybox.stop(a),n.fancybox.setTranslate(a,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),r.length&&(r.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",r.get(0).scrollHeight>r.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,a=e.current,i=a.$slide;!e.isClosing&&a&&(i.siblings().css({transform:"",opacity:""}),i.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),n.fancybox.animate(i,{top:0,left:0,opacity:1},t===o?0:t,function(){i.css({transform:"",opacity:""}),a.isComplete||e.complete()},!1))},isMoved:function(t){var e,o,a=t||this.current;return!!a&&(o=n.fancybox.getTranslate(this.$refs.stage),e=n.fancybox.getTranslate(a.$slide),!a.$slide.hasClass("fancybox-animated")&&(Math.abs(e.top-o.top)>.5||Math.abs(e.left-o.left)>.5))},updateCursor:function(t,e){var o,a,i=this,s=i.current,r=i.$refs.container;s&&!i.isClosing&&i.Guestures&&(r.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),o=i.canPan(t,e),a=!!o||i.isZoomable(),r.toggleClass("fancybox-is-zoomable",a),n("[data-fancybox-zoom]").prop("disabled",!a),o?r.addClass("fancybox-can-pan"):a&&("zoom"===s.opts.clickContent||n.isFunction(s.opts.clickContent)&&"zoom"==s.opts.clickContent(s))?r.addClass("fancybox-can-zoomIn"):s.opts.touch&&(s.opts.touch.vertical||i.group.length>1)&&"video"!==s.contentType&&r.addClass("fancybox-can-swipe"))},isZoomable:function(){var t,e=this,n=e.current;if(n&&!e.isClosing&&"image"===n.type&&!n.hasError){if(!n.isLoaded)return!0;if(t=e.getFitPos(n),t&&(n.width>t.width||n.height>t.height))return!0}return!1},isScaledDown:function(t,e){var a=this,i=!1,s=a.current,r=s.$content;return t!==o&&e!==o?i=t<s.width&&e<s.height:r&&(i=n.fancybox.getTranslate(r),i=i.width<s.width&&i.height<s.height),i},canPan:function(t,e){var a=this,i=a.current,s=null,r=!1;return"image"===i.type&&(i.isComplete||t&&e)&&!i.hasError&&(r=a.getFitPos(i),t!==o&&e!==o?s={width:t,height:e}:i.isComplete&&(s=n.fancybox.getTranslate(i.$content)),s&&r&&(r=Math.abs(s.width-r.width)>1.5||Math.abs(s.height-r.height)>1.5)),r},loadSlide:function(t){var e,o,a,i=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,i.trigger("beforeLoad",t)===!1)return t.isLoading=!1,!1;switch(e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":i.setImage(t);break;case"iframe":i.setIframe(t);break;case"html":i.setContent(t,t.src||t.content);break;case"video":i.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":n(t.src).length?i.setContent(t,n(t.src)):i.setError(t);break;case"ajax":i.showLoading(t),a=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&i.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&i.setError(t)}})),o.one("onReset",function(){a.abort()});break;default:i.setError(t)}return!0}},setImage:function(t){var o,a=this;setTimeout(function(){var e=t.$image;a.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||a.showLoading(t)},50),a.checkSrcset(t),t.$content=n('<div class="fancybox-content"></div>').addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")),t.opts.preload!==!1&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,o=e.createElement("img"),o.onerror=function(){n(this).remove(),t.$ghost=null},o.onload=function(){a.afterLoad(t)},t.$ghost=n(o).addClass("fancybox-image").appendTo(t.$content).attr("src",t.thumb)),a.setBigImage(t)},checkSrcset:function(e){var n,o,a,i,s=e.opts.srcset||e.opts.image.srcset;if(s){a=t.devicePixelRatio||1,i=t.innerWidth*a,o=s.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);return 0===n?e.url=t:void(o&&(e.value=o,e.postfix=t[t.length-1]))}),e}),o.sort(function(t,e){return t.value-e.value});for(var r=0;r<o.length;r++){var c=o[r];if("w"===c.postfix&&c.value>=i||"x"===c.postfix&&c.value>=a){n=c;break}}!n&&o.length&&(n=o[o.length-1]),n&&(e.src=n.url,e.width&&e.height&&"w"==n.postfix&&(e.height=e.width/e.height*n.value,e.width=n.value),e.opts.srcset=s)}},setBigImage:function(t){var o=this,a=e.createElement("img"),i=n(a);t.$image=i.one("error",function(){o.setError(t)}).one("load",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&&(e=t.opts.sizes,e&&"auto"!==e||(e=(t.width/t.height>1&&s.width()/s.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),i.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!o.isClosing&&t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(a.complete||"complete"==a.readyState)&&i.naturalWidth&&i.naturalHeight?i.trigger("load"):a.error&&i.trigger("error")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),a=parseInt(t.opts.height,10);t.width=e,t.height=n,o>0&&(t.width=o,t.height=Math.floor(o*n/e)),a>0&&(t.width=Math.floor(a*e/n),t.height=a)},setIframe:function(t){var e,a=this,i=t.opts.iframe,s=t.$slide;n.fancybox.isMobile&&(i.css.overflow="scroll"),t.$content=n('<div class="fancybox-content'+(i.preload?" fancybox-is-hidden":"")+'"></div>').css(i.css).appendTo(s),s.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=n(i.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(a.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),a.afterLoad(t)}),s.on("refresh.fb",function(){var n,a,r=t.$content,c=i.css.width,l=i.css.height;if(1===e[0].isReady){try{n=e.contents(),a=n.find("body")}catch(t){}a&&a.length&&a.children().length&&(s.css("overflow","visible"),r.css({width:"100%","max-width":"100%",height:"9999px"}),c===o&&(c=Math.ceil(Math.max(a[0].clientWidth,a.outerWidth(!0)))),r.css("width",c?c:"").css("max-width",""),l===o&&(l=Math.ceil(Math.max(a[0].clientHeight,a.outerHeight(!0)))),r.css("height",l?l:""),s.css("overflow","auto")),r.removeClass("fancybox-is-hidden")}})):a.afterLoad(t),e.attr("src",t.src),s.one("onReset",function(){try{n(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}n(this).off("refresh.fb").empty(),t.isLoaded=!1,t.isRevealed=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&&n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&&e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&&e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=n("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("<div>").append(n.trim(e)).contents()),t.opts.filter&&(e=n("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),n(e).appendTo(t.$slide),n(e).is("video,audio")&&(n(e).addClass("fancybox-video"),n(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||n(e).attr("width"),t.opts.height=t.opts.height||n(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){var e=this;t=t||e.current,t&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){var e=this;t=t||e.current,t&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('<div class="fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,n=t||e.current,o=n.opts.caption,a=e.$refs.caption,i=!1;n.opts.preventCaptionOverlap&&o&&o.length&&(n.pos!==e.currPos?(a=a.clone().empty().appendTo(a.parent()),a.html(o),i=a.outerHeight(!0),a.empty().remove()):e.$caption&&(i=e.$caption.outerHeight(!0)),n.$slide.css("padding-bottom",i||""))},adjustLayout:function(t){var e,n,o,a,i=this,s=t||i.current;s.isLoaded&&s.opts.disableLayoutFix!==!0&&(s.$content.css("margin-bottom",""),s.$content.outerHeight()>s.$slide.height()+.5&&(o=s.$slide[0].style["padding-bottom"],a=s.$slide.css("padding-bottom"),parseFloat(a)>0&&(e=s.$slide[0].scrollHeight,s.$slide.css("padding-bottom",0),Math.abs(e-s.$slide[0].scrollHeight)<1&&(n=a),s.$slide.css("padding-bottom",o))),s.$content.css("margin-bottom",n))},revealContent:function(t){var e,a,i,s,r=this,c=t.$slide,l=!1,d=!1,u=r.isMoved(t),f=t.isRevealed;return t.isRevealed=!0,e=t.opts[r.firstRun?"animationEffect":"transitionEffect"],i=t.opts[r.firstRun?"animationDuration":"transitionDuration"],i=parseInt(t.forcedDuration===o?i:t.forcedDuration,10),!u&&t.pos===r.currPos&&i||(e=!1),"zoom"===e&&(t.pos===r.currPos&&i&&"image"===t.type&&!t.hasError&&(d=r.getThumbPos(t))?l=r.getFitPos(t):e="fade"),"zoom"===e?(r.isAnimating=!0,l.scaleX=l.width/d.width,l.scaleY=l.height/d.height,s=t.opts.zoomOpacity,"auto"==s&&(s=Math.abs(t.width/t.height-d.width/d.height)>.1),s&&(d.opacity=.1,l.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),d),p(t.$content),void n.fancybox.animate(t.$content,l,i,function(){r.isAnimating=!1,r.complete()})):(r.updateSlide(t),e?(n.fancybox.stop(c),a="fancybox-slide--"+(t.pos>=r.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,c.addClass(a).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),p(c),"image"!==t.type&&t.$content.hide().show(0),void n.fancybox.animate(c,"fancybox-slide--current",i,function(){c.removeClass(a).css({transform:"",opacity:""}),t.pos===r.currPos&&r.complete()},!0)):(t.$content.removeClass("fancybox-is-hidden"),f||!u||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===r.currPos&&r.complete())))},getThumbPos:function(t){var e,o,a,i,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&&(e=n.fancybox.getTranslate(c),o=parseFloat(c.css("border-top-width")||0),a=parseFloat(c.css("border-right-width")||0),i=parseFloat(c.css("border-bottom-width")||0),s=parseFloat(c.css("border-left-width")||0),r={top:e.top+o,left:e.left+s,width:e.width-a-s,height:e.height-o-i,scaleX:1,scaleY:1},e.width>0&&e.height>0&&r)},complete:function(){var t,e=this,o=e.current,a={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),p(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?a[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),e.slides=a),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&"html"===o.contentType&&(t=o.$content.find("input[autofocus]:enabled:visible:first"),t.length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n))},focus:function(t,o){var a,i,s=this,r=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");s.isClosing||(a=!t&&s.current&&s.current.isComplete?s.current.$slide.find("*:visible"+(o?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible"),a=a.filter(r).filter(function(){return"hidden"!==n(this).css("visibility")&&!n(this).hasClass("disabled")}),a.length?(i=a.index(e.activeElement),t&&t.shiftKey?(i<0||0==i)&&(t.preventDefault(),a.eq(a.length-1).trigger("focus")):(i<0||i==a.length-1)&&(t&&t.preventDefault(),a.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"))},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,a,i,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t)};return!u.isClosing&&(u.isClosing=!0,u.trigger("beforeClose",t)===!1?(u.isClosing=!1,d(function(){u.update()}),!1):(u.removeEvents(),i=f.$content,o=f.opts.animationEffect,a=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),t!==!0?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger("onReset").remove(),a&&u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",a+"ms"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),"zoom"!==o||i&&a&&"image"===f.type&&!u.isMoved()&&!f.hasError&&(l=u.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(i),s=n.fancybox.getTranslate(i),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity,"auto"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(i,c),p(i),n.fancybox.animate(i,l,a,h),!0):(o&&a?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,a,h):t===!0?setTimeout(h,a):h(),
8264!0)))},cleanUp:function(e){var o,a,i,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(r&&r.length&&r.is(":visible")||(r=s.$trigger),r&&r.length&&(a=t.scrollX,i=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(i).scrollLeft(a))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,a=Array.prototype.slice.call(arguments,1),i=this,s=e&&e.opts?e:i.current;return s?a.unshift(s):s=i,a.unshift(i),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,a)),o===!1?o:void("afterClose"!==t&&i.$refs?i.$refs.container.trigger(t+".fb",a):r.trigger(t+".fb",a))},updateControls:function(){var t=this,o=t.current,a=o.index,i=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),t.$caption=r&&r.length?s.html(r):null,t.hasHiddenControls||t.isIdle||t.showControls(),i.find("[data-fancybox-count]").html(t.group.length),i.find("[data-fancybox-index]").html(a+1),i.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&&a<=0),i.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&&a>=t.group.length-1),"image"===o.type?i.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&&i.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&&e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.5.2",defaults:i,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),t===!0&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",a={};if(t&&e)return e.left===o&&e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&&e.scaleY!==o?n+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==o&&(n+=" scaleX("+e.scaleX+")"),n.length&&(a.transform=n),e.opacity!==o&&(a.opacity=e.opacity),e.width!==o&&(a.width=e.width),e.height!==o&&(a.height=e.height),t.css(a)},animate:function(t,e,a,i,s){var r,c=this;n.isFunction(a)&&(i=a,a=null),c.stop(t),r=c.getTranslate(t),t.on(f,function(l){(!l||!l.originalEvent||t.is(l.originalEvent.target)&&"z-index"!=l.originalEvent.propertyName)&&(c.stop(t),n.isNumeric(a)&&t.css("transition-duration",""),n.isPlainObject(e)?e.scaleX!==o&&e.scaleY!==o&&c.setTranslate(t,{top:e.top,left:e.left,width:r.width*e.scaleX,height:r.height*e.scaleY,scaleX:1,scaleY:1}):s!==!0&&t.removeClass(e),n.isFunction(i)&&i(l))}),n.isNumeric(a)&&t.css("transition-duration",a+"ms"),n.isPlainObject(e)?(e.scaleX!==o&&e.scaleY!==o&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f)},a+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},a):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},a),this},r.on("click.fb-start","[data-fancybox]",a),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=".fancybox-button",e="fancybox-focus",o=null;r.on("mousedown mouseup focus blur",t,function(a){switch(a.type){case"mousedown":o=n(this);break;case"mouseup":o=null;break;case"focusin":n(t).removeClass(e),n(this).is(o)||n(this).is("[disabled]")||n(this).addClass(e);break;case"focusout":n(t).removeClass(e)}})}()}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube-nocookie.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},n=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e};t(document).on("objectNeedsType.fb",function(o,a,i){var s,r,c,l,d,u,f,p=i.src||"",h=!1;s=t.extend(!0,{},e,i.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var a=0;a<d.length;++a){var s=d[a].split("=",2);2==s.length&&(u[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return l=t.extend(!0,{},o.params,i.opts[e],u),p="function"===t.type(o.url)?o.url.call(this,c,l,i):n(o.url,c,l),r="function"===t.type(o.thumb)?o.thumb.call(this,c,l,i):n(o.thumb,c),"youtube"===e?p=p.replace(/&t=((\d+)m)?(\d+)s/,function(t,e,n,o){return"&start="+((n?60*parseInt(n,10):0)+parseInt(o,10))}):"vimeo"===e&&(p=p.replace("&%23","#")),!1}}),h?(i.opts.thumb||i.opts.$thumb&&i.opts.$thumb.length||(i.opts.thumb=r),"iframe"===h&&(i.opts=t.extend(!0,i.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(i,{type:h,src:p,origSrc:i.src,contentSource:f,contentType:"image"===h?"image":"gmap_place"==f||"gmap_search"==f?"map":"video"})):p&&(i.type=i.opts.defaultType)});var o={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,n=this;return this[t].loaded?void setTimeout(function(){n.done(t)}):void(this[t].loading||(this[t].loading=!0,e=document.createElement("script"),e.type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){n[t].loaded=!0,n.done(t)}:e.onload=function(){n[t].loaded=!0,n.done(t)},document.body.appendChild(e)))},done:function(e){var n,o,a;"youtube"===e&&delete window.onYouTubeIframeAPIReady,n=t.fancybox.getInstance(),n&&(o=n.current.$content.find("iframe"),"youtube"===e&&void 0!==YT&&YT?a=new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&n.next()}}}):"vimeo"===e&&void 0!==Vimeo&&Vimeo&&(a=new Vimeo.Player(o),a.on("ended",function(){n.next()})))}};t(document).on({"afterShow.fb":function(t,e,n){e.group.length>1&&("youtube"===n.contentSource||"vimeo"===n.contentSource)&&o.load(n.contentSource)}})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),a=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),i=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,a=o.length;e<a;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],a=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,i=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return a||i},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),n(e).off(".fb.touch"),t.requestId&&(a(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},d.prototype.ontouchstart=function(o){var a=this,c=n(o.target),d=a.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&a.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass("fancybox-animated"))return o.stopPropagation(),void o.preventDefault();a.realPoints=a.startPoints=i(o),a.startPoints.length&&(u.touch&&o.stopPropagation(),a.startEvent=o,a.canTap=!0,a.$target=c,a.$content=p,a.opts=u.opts.touch,a.isPanning=!1,a.isSwiping=!1,a.isZooming=!1,a.isScrolling=!1,a.canPan=d.canPan(),a.startTime=(new Date).getTime(),a.distanceX=a.distanceY=a.distance=0,a.canvasWidth=Math.round(f[0].clientWidth),a.canvasHeight=Math.round(f[0].clientHeight),a.contentLastPos=null,a.contentStartPos=n.fancybox.getTranslate(a.$content)||{top:0,left:0},a.sliderStartPos=n.fancybox.getTranslate(f),a.stagePos=n.fancybox.getTranslate(d.$refs.stage),a.sliderStartPos.top-=a.stagePos.top,a.sliderStartPos.left-=a.stagePos.left,a.contentStartPos.top-=a.stagePos.top,a.contentStartPos.left-=a.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(a,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(a,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",a.onscroll,!0),((a.opts||a.canPan)&&(c.is(a.$stage)||a.$stage.find(c).length)||(c.is(".fancybox-image")&&o.preventDefault(),n.fancybox.isMobile&&c.hasClass("fancybox-caption")))&&(a.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&a.isScrollable||o.preventDefault(),(1===a.startPoints.length||u.hasError)&&(a.canPan?(n.fancybox.stop(a.$content),a.isPanning=!0):a.isSwiping=!0,a.$container.addClass("fancybox-is-grabbing")),2===a.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(a.canTap=!1,a.isSwiping=!1,a.isPanning=!1,a.isZooming=!0,n.fancybox.stop(a.$content),a.centerPointStartX=.5*(a.startPoints[0].x+a.startPoints[1].x)-n(t).scrollLeft(),a.centerPointStartY=.5*(a.startPoints[0].y+a.startPoints[1].y)-n(t).scrollTop(),a.percentageOfImageAtPinchPointX=(a.centerPointStartX-a.contentStartPos.left)/a.contentStartPos.width,a.percentageOfImageAtPinchPointY=(a.centerPointStartY-a.contentStartPos.top)/a.contentStartPos.height,a.startDistanceBetweenFingers=s(a.startPoints[0],a.startPoints[1]))))}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=i(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&e.isSwiping===!0||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var i,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(c!==!0)"x"==c&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:"x"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&&(a(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,r.group.length<2&&s.opts.vertical?s.isSwiping="y":r.isDragging||s.opts.vertical===!1||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(i=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=i>45&&i<135?"y":"x"),"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,a;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),a=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&&(s.sliderStartPos.top=o.top-a.top,s.sliderStartPos.left=o.left-a.left),n.fancybox.setTranslate(e.$slide,{top:o.top-a.top,left:o.left-a.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;return s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5)?void(t.startPoints=t.newPoints):(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&a(t.requestId),void(t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})))},d.prototype.limitMovement=function(){var t,e,n,o,a,i,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return a=h>r?f+l:f,i=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&a>t&&(a=t-1+Math.pow(-t+f+l,.8)||0),l<0&&a<n&&(a=n+1-Math.pow(n-f-l,.8)||0),d>0&&i>e&&(i=e-1+Math.pow(-e+p+d,.8)||0),d<0&&i<o&&(i=o+1-Math.pow(o-p-d,.8)||0),{top:i,left:a}},d.prototype.limitPosition=function(t,e,n,o){var a=this,i=a.canvasWidth,s=a.canvasHeight;return n>i?(t=t>0?0:t,t=t<i-n?i-n:t):t=Math.max(0,i/2-n/2),o>s?(e=e>0?0:e,e=e<s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},d.prototype.onZoom=function(){var e=this,i=e.contentStartPos,r=i.width,c=i.height,l=i.left,d=i.top,u=s(e.newPoints[0],e.newPoints[1]),f=u/e.startDistanceBetweenFingers,p=Math.floor(r*f),h=Math.floor(c*f),g=(r-p)*e.percentageOfImageAtPinchPointX,b=(c-h)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),v=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=m-e.centerPointStartX,x=v-e.centerPointStartY,w=l+(g+y),$=d+(b+x),S={top:$,left:w,scaleX:f,scaleY:f};e.canTap=!1,e.newWidth=p,e.newHeight=h,e.contentLastPos=S,e.requestId&&a(e.requestId),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},d.prototype.ontouchend=function(t){var o=this,s=o.isSwiping,r=o.isPanning,c=o.isZooming,l=o.isScrolling;return o.endPoints=i(t),o.dMs=Math.max((new Date).getTime()-o.startTime,1),o.$container.removeClass("fancybox-is-grabbing"),n(e).off(".fb.touch"),e.removeEventListener("scroll",o.onscroll,!0),o.requestId&&(a(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.isScrolling=!1,o.instance.isDragging=!1,o.canTap?o.onTap(t):(o.speed=100,o.velocityX=o.distanceX/o.dMs*.5,o.velocityY=o.distanceY/o.dMs*.5,void(r?o.endPanning():c?o.endZooming():o.endSwiping(s,l)))},d.prototype.endSwiping=function(t,e){var o=this,a=!1,i=o.instance.group.length,s=Math.abs(o.distanceX),r="x"==t&&i>1&&(o.dMs>130&&s>10||s>50),c=300;o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),a=o.instance.close(!0,250)):r&&o.distanceX>0?a=o.instance.previous(c):r&&o.distanceX<0&&(a=o.instance.next(c)),a!==!1||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,a=this;a.contentLastPos&&(a.opts.momentum===!1||a.dMs>350?(t=a.contentLastPos.left,e=a.contentLastPos.top):(t=a.contentLastPos.left+500*a.velocityX,e=a.contentLastPos.top+500*a.velocityY),o=a.limitPosition(t,e,a.contentStartPos.width,a.contentStartPos.height),o.width=a.contentStartPos.width,o.height=a.contentStartPos.height,n.fancybox.animate(a.$content,o,330))},d.prototype.endZooming=function(){var t,e,o,a,i=this,s=i.instance.current,r=i.newWidth,c=i.newHeight;i.contentLastPos&&(t=i.contentLastPos.left,e=i.contentLastPos.top,a={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(i.$content,a),r<i.canvasWidth&&c<i.canvasHeight?i.instance.scaleToFit(150):r>s.width||c>s.height?i.instance.scaleToActual(i.centerPointStartX,i.centerPointStartY,150):(o=i.limitPosition(t,e,r,c),n.fancybox.animate(i.$content,o,150)))},d.prototype.onTap=function(e){var o,a=this,s=n(e.target),r=a.instance,c=r.current,l=e&&i(e)||a.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-a.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-a.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(a.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(a.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(a.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(a.tapped){if(clearTimeout(a.tapped),a.tapped=null,Math.abs(d-a.tapX)>50||Math.abs(u-a.tapY)>50)return this;f("dblclick"+o)}else a.tapX=d,a.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?a.tapped=setTimeout(function(){a.tapped=null,r.isAnimating||f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),n.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('<div class="fancybox-progress"></div>').appendTo(n.$refs.inner))},set:function(t){var n=this,o=n.instance,a=o.current;a&&(t===!0||a.opts.loop||o.currIndex<o.group.length-1)?n.isActive&&"video"!==a.contentType&&(n.$progress&&e.fancybox.animate(n.$progress.show(),{scaleX:1},a.opts.slideShow.speed),n.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},a.opts.slideShow.speed)):(n.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null,t.$progress&&t.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var a=e&&e.SlideShow;o?a&&n.opts.slideShow.autoStart&&a.start():a&&a.isActive&&a.clear()},"afterShow.fb":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.fb":function(n,o,a,i,s){var r=o&&o.SlideShow;!r||!a.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(i.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on("visibilitychange",function(){var n=e.fancybox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,jQuery),function(t,e){"use strict";var n=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n={},o=0;o<e.length;o++){var a=e[o];if(a&&a[1]in t){for(var i=0;i<a.length;i++)n[e[0][i]]=a[i];return n}}return!1}();if(n){var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.current.$content.css("transition","none"),n.isAnimating=!1,n.update(!0,!0,0)),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var a;return n?void(e&&e.group[e.currIndex].opts.fullScreen?(a=e.$refs.container,a.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&e.opts.fullScreen.autoStart===!0&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()):void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,n,o,a){e&&e.FullScreen&&70===a&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs",o=n+"-active";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var a=function(t){this.init(t)};e.extend(a.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var a=0,i=n.length;a<i&&(n[a].thumb&&o++,!(o>1));a++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this,a=o.instance,i=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('<div class="'+n+" "+n+"-"+o.opts.axis+'"></div>').appendTo(a.$refs.container.find(i).addBack().filter(i)),o.$grid.on("click","a",function(){a.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('<div class="'+n+'__list">').appendTo(o.$grid)),e.each(a.group,function(e,n){t=n.thumb,t||"image"!==n.type||(t=n.src),s.push('<a href="javascript:;" tabindex="0" data-index="'+e+'"'+(t&&t.length?' style="background-image:url('+t+')"':'class="fancybox-thumbs-missing"')+"></a>")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+a.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,a=this,i=a.$list,s=a.$grid;a.instance.current&&(e=i.children().removeClass(o).filter('[data-index="'+a.instance.current.index+'"]').addClass(o),n=e.position(),"y"===a.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===a.opts.axis&&(n.left<s.scrollLeft()||n.left>s.scrollLeft()+(s.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new a(e),n.isActive&&n.opts.autoStart===!0&&n.show())},"beforeShow.fb":function(t,e,n,o){var a=e&&e.Thumbs;a&&a.isVisible&&a.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,a){var i=e&&e.Thumbs;i&&i.isActive&&71===a&&(o.preventDefault(),i.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&n.opts.hideOnClose!==!1&&n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location},tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'
8265}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,a=e.fancybox.getInstance(),i=a.current||null;i&&("function"===e.type(i.opts.share.url)&&(t=i.opts.share.url.apply(i,[a,i])),o=i.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===i.type?encodeURIComponent(i.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,a.$caption?encodeURIComponent(a.$caption.text()):""),e.fancybox.open({src:a.translate(a,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){a.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})}
8265,mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,a=n.join("-");return{hash:e,index:o<1?1:o,gallery:a}}function a(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function i(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""),""!==n&&n)}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)}),n(function(){n.fancybox.defaults.hash!==!1&&(n(e).on({"onInit.fb":function(t,e){var n,a;e.group[e.currIndex].opts.hash!==!1&&(n=o(),a=i(e),a&&n.gallery&&a==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,a,s){var r;a&&a.opts.hash!==!1&&(r=i(o),r&&(o.currentHash=r+(o.group.length>1?"-"+(a.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300))))},"beforeClose.fb":function(n,o,a){a.opts.hash!==!1&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var a=n(o).data("FancyBox");if(a&&a.currentHash)return e=a,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&a(t)}),setTimeout(function(){n.fancybox.getInstance()||a(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,a=(new Date).getTime();e.group.length<2||o.opts.wheel===!1||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,a-n<250||(n=a,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
8266/* End */
8267;
8268; /* Start:"a:4:{s:4:"full";s:66:"/simai/asset/swiper/swiper-4.4.2/js/swiper.min.js?1648458804124740";s:6:"source";s:49:"/simai/asset/swiper/swiper-4.4.2/js/swiper.min.js";s:3:"min";s:49:"/simai/asset/swiper/swiper-4.4.2/js/swiper.min.js";s:3:"map";s:53:"/simai/asset/swiper/swiper-4.4.2/js/swiper.min.js.map";}"*/
8269/**
8270 * Swiper 4.4.2
8271 * Most modern mobile touch slider and framework with hardware accelerated transitions
8272 * http://www.idangero.us/swiper/
8273 *
8274 * Copyright 2014-2018 Vladimir Kharlampidi
8275 *
8276 * Released under the MIT License
8277 *
8278 * Released on: November 1, 2018
8279 */
8280!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Swiper=t()}(this,function(){"use strict";var f="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,Y="undefined"==typeof window?{document:f,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,l=function(e){for(var t=0;t<e.length;t+=1)this[t]=e[t];return this.length=e.length,this};function L(e,t){var a=[],i=0;if(e&&!t&&e instanceof l)return e;if(e)if("string"==typeof e){var s,r,n=e.trim();if(0<=n.indexOf("<")&&0<=n.indexOf(">")){var o="div";for(0===n.indexOf("<li")&&(o="ul"),0===n.indexOf("<tr")&&(o="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(o="tr"),0===n.indexOf("<tbody")&&(o="table"),0===n.indexOf("<option")&&(o="select"),(r=f.createElement(o)).innerHTML=n,i=0;i<r.childNodes.length;i+=1)a.push(r.childNodes[i])}else for(s=t||"#"!==e[0]||e.match(/[ .<>:~]/)?(t||f).querySelectorAll(e.trim()):[f.getElementById(e.trim().split("#")[1])],i=0;i<s.length;i+=1)s[i]&&a.push(s[i])}else if(e.nodeType||e===Y||e===f)a.push(e);else if(0<e.length&&e[0].nodeType)for(i=0;i<e.length;i+=1)a.push(e[i]);return new l(a)}function r(e){for(var t=[],a=0;a<e.length;
vendor: 11,829 bytes, line 8280
8280a+=1)-1===t.indexOf(e[a])&&t.push(e[a]);return t}L.fn=l.prototype,L.Class=l,L.Dom7=l;var t={addClass:function(e){if(void 0===e)return this;for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.add(t[a]);return this},removeClass:function(e){for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.remove(t[a]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.toggle(t[a]);return this},attr:function(e,t){var a=arguments;if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var i=0;i<this.length;i+=1)if(2===a.length)this[i].setAttribute(e,t);else for(var s in e)this[i][s]=e[s],this[i].setAttribute(s,e[s]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},data:function(e,t){var a;if(void 0!==t){for(var i=0;i<this.length;i+=1)(a=this[i]).dom7ElementDataStorage||(a.dom7ElementDataStorage={}),a.dom7ElementDataStorage[e]=t;return this}if(a=this[0]){if(a.dom7ElementDataStorage&&e in a.dom7ElementDataStorage)return a.dom7ElementDataStorage[e];var s=a.getAttribute("data-"+e);return s||void 0}},transform:function(e){for(var t=0;t<this.length;t+=1){var a=this[t].style;a.webkitTransform=e,a.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t+=1){var a=this[t].style;a.webkitTransitionDuration=e,a.transitionDuration=e}return this},on:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var i=t[0],r=t[1],n=t[2],s=t[3];function o(e){var t=e.target;if(t){var a=e.target.dom7EventData||[];if(a.indexOf(e)<0&&a.unshift(e),L(t).is(r))n.apply(t,a);else for(var i=L(t).parents(),s=0;s<i.length;s+=1)L(i[s]).is(r)&&n.apply(i[s],a)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"==typeof t[1]&&(i=(e=t)[0],n=e[1],s=e[2],r=void 0),s||(s=!1);for(var d,p=i.split(" "),c=0;c<this.length;c+=1){var u=this[c];if(r)for(d=0;d<p.length;d+=1){var h=p[d];u.dom7LiveListeners||(u.dom7LiveListeners={}),u.dom7LiveListeners[h]||(u.dom7LiveListeners[h]=[]),u.dom7LiveListeners[h].push({listener:n,proxyListener:o}),u.addEventListener(h,o,s)}else for(d=0;d<p.length;d+=1){var v=p[d];u.dom7Listeners||(u.dom7Listeners={}),u.dom7Listeners[v]||(u.dom7Listeners[v]=[]),u.dom7Listeners[v].push({listener:n,proxyListener:l}),u.addEventListener(v,l,s)}}return this},off:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var i=t[0],s=t[1],r=t[2],n=t[3];"function"==typeof t[1]&&(i=(e=t)[0],r=e[1],n=e[2],s=void 0),n||(n=!1);for(var o=i.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],p=0;p<this.length;p+=1){var c=this[p],u=void 0;if(!s&&c.dom7Listeners?u=c.dom7Listeners[d]:s&&c.dom7LiveListeners&&(u=c.dom7LiveListeners[d]),u&&u.length)for(var h=u.length-1;0<=h;h-=1){var v=u[h];r&&v.listener===r?(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1)):r||(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1))}}return this},trigger:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=e[0].split(" "),i=e[1],s=0;s<a.length;s+=1)for(var r=a[s],n=0;n<this.length;n+=1){var o=this[n],l=void 0;try{l=new Y.CustomEvent(r,{detail:i,bubbles:!0,cancelable:!0})}catch(e){(l=f.createEvent("Event")).initEvent(r,!0,!0),l.detail=i}o.dom7EventData=e.filter(function(e,t){return 0<t}),o.dispatchEvent(l),o.dom7EventData=[],delete o.dom7EventData}return this},transitionEnd:function(t){var a,i=["webkitTransitionEnd","transitionend"],s=this;function r(e){if(e.target===this)for(t.call(this,e),a=0;a<i.length;a+=1)s.off(i[a],r)}if(t)for(a=0;a<i.length;a+=1)s.on(i[a],r);return this},outerWidth:function(e){if(0<this.length){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(0<this.length){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(0<this.length){var e=this[0],t=e.getBoundingClientRect(),a=f.body,i=e.clientTop||a.clientTop||0,s=e.clientLeft||a.clientLeft||0,r=e===Y?Y.scrollY:e.scrollTop,n=e===Y?Y.scrollX:e.scrollLeft;return{top:t.top+r-i,left:t.left+n-s}}return null},css:function(e,t){var a;if(1===arguments.length){if("string"!=typeof e){for(a=0;a<this.length;a+=1)for(var i in e)this[a].style[i]=e[i];return this}if(this[0])return Y.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(a=0;a<this.length;a+=1)this[a].style[e]=t;return this}return this},each:function(e){if(!e)return this;for(var t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){var t,a,i=this[0];if(!i||void 0===e)return!1;if("string"==typeof e){if(i.matches)return i.matches(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);for(t=L(e),a=0;a<t.length;a+=1)if(t[a]===i)return!0;return!1}if(e===f)return i===f;if(e===Y)return i===Y;if(e.nodeType||e instanceof l){for(t=e.nodeType?[e]:e,a=0;a<t.length;a+=1)if(t[a]===i)return!0;return!1}return!1},index:function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;var t,a=this.length;return new l(a-1<e?[]:e<0?(t=a+e)<0?[]:[this[t]]:[this[e]])},append:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];for(var i=0;i<t.length;i+=1){e=t[i];for(var s=0;s<this.length;s+=1)if("string"==typeof e){var r=f.createElement("div");for(r.innerHTML=e;r.firstChild;)this[s].appendChild(r.firstChild)}else if(e instanceof l)for(var n=0;n<e.length;n+=1)this[s].appendChild(e[n]);else this[s].appendChild(e)}return this},prepend:function(e){var t,a;for(t=0;t<this.length;t+=1)if("string"==typeof e){var i=f.createElement("div");for(i.innerHTML=e,a=i.childNodes.length-1;0<=a;a-=1)this[t].insertBefore(i.childNodes[a],this[t].childNodes[0])}else if(e instanceof l)for(a=0;a<e.length;a+=1)this[t].insertBefore(e[a],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},next:function(e){return 0<this.length?e?this[0].nextElementSibling&&L(this[0].nextElementSibling).is(e)?new l([this[0].nextElementSibling]):new l([]):this[0].nextElementSibling?new l([this[0].nextElementSibling]):new l([]):new l([])},nextAll:function(e){var t=[],a=this[0];if(!a)return new l([]);for(;a.nextElementSibling;){var i=a.nextElementSibling;e?L(i).is(e)&&t.push(i):t.push(i),a=i}return new l(t)},prev:function(e){if(0<this.length){var t=this[0];return e?t.previousElementSibling&&L(t.previousElementSibling).is(e)?new l([t.previousElementSibling]):new l([]):t.previousElementSibling?new l([t.previousElementSibling]):new l([])}return new l([])},prevAll:function(e){var t=[],a=this[0];if(!a)return new l([]);for(;a.previousElementSibling;){var i=a.previousElementSibling;e?L(i).is(e)&&t.push(i):t.push(i),a=i}return new l(t)},parent:function(e){for(var t=[],a=0;a<this.length;a+=1)null!==this[a].parentNode&&(e?L(this[a].parentNode).is(e)&&t.push(this[a].parentNode):t.push(this[a].parentNode));return L(r(t))},parents:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].parentNode;i;)e?L(i).is(e)&&t.push(i):t.push(i),i=i.parentNode;return L(r(t))},closest:function(e){var t=this;return void 0===e?new l([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].querySelectorAll(e),s=0;s<i.length;s+=1)t.push(i[s]);return new l(t)},children:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].childNodes,s=0;s<i.length;s+=1)e?1===i[s].nodeType&&L(i[s]).is(e)&&t.push(i[s]):1===i[s].nodeType&&t.push(i[s]);return new l(r(t))},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,i;for(a=0;a<e.length;a+=1){var s=L(e[a]);for(i=0;i<s.length;i+=1)this[this.length]=s[i],this.length+=1}return this},styles:function(){return this[0]?Y.getComputedStyle(this[0],null):{}}};Object.keys(t).forEach(function(e){L.fn[e]=t[e]});var e,a,i,V={deleteProps:function(e){var t=e;Object.keys(t).forEach(function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,t){var a,i,s;void 0===t&&(t="x");var r=Y.getComputedStyle(e,null);return Y.WebKitCSSMatrix?(6<(i=r.transform||r.webkitTransform).split(",").length&&(i=i.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),s=new Y.WebKitCSSMatrix("none"===i?"":i)):a=(s=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(i=Y.WebKitCSSMatrix?s.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=Y.WebKitCSSMatrix?s.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0},parseUrlQuery:function(e){var t,a,i,s,r={},n=e||Y.location.href;if("string"==typeof n&&n.length)for(s=(a=(n=-1<n.indexOf("?")?n.replace(/\S*\?/,""):"").split("&").filter(function(e){return""!==e})).length,t=0;t<s;t+=1)i=a[t].replace(/#\S+/g,"").split("="),r[decodeURIComponent(i[0])]=void 0===i[1]?void 0:decodeURIComponent(i[1])||"";return r},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=Object(e[0]),i=1;i<e.length;i+=1){var s=e[i];if(null!=s)for(var r=Object.keys(Object(s)),n=0,o=r.length;n<o;n+=1){var l=r[n],d=Object.getOwnPropertyDescriptor(s,l);void 0!==d&&d.enumerable&&(V.isObject(a[l])&&V.isObject(s[l])?V.extend(a[l],s[l]):!V.isObject(a[l])&&V.isObject(s[l])?(a[l]={},V.extend(a[l],s[l])):a[l]=s[l])}}return a}},F=(i=f.createElement("div"),{touch:Y.Modernizr&&!0===Y.Modernizr.touch||!!("ontouchstart"in Y||Y.DocumentTouch&&f instanceof Y.DocumentTouch),pointerEvents:!!(Y.navigator.pointerEnabled||Y.PointerEvent||"maxTouchPoints"in Y.navigator),prefixedPointerEvents:!!Y.navigator.msPointerEnabled,transition:(a=i.style,"transition"in a||"webkitTransition"in a||"MozTransition"in a),transforms3d:Y.Modernizr&&!0===Y.Modernizr.csstransforms3d||(e=i.style,"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e),flexbox:function(){for(var e=i.style,t="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),a=0;a<t.length;a+=1)if(t[a]in e)return!0;return!1}(),observer:"MutationObserver"in Y||"WebkitMutationObserver"in Y,passiveListener:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});Y.addEventListener("testPassiveListener",null,t)}catch(e){}return e}(),gestures:"ongesturestart"in Y}),s=function(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={}
8280,t.params&&t.params.on&&Object.keys(t.params.on).forEach(function(e){t.on(e,t.params.on[e])})},n={components:{configurable:!0}};s.prototype.on=function(e,t,a){var i=this;if("function"!=typeof t)return i;var s=a?"unshift":"push";return e.split(" ").forEach(function(e){i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][s](t)}),i},s.prototype.once=function(i,s,e){var r=this;if("function"!=typeof s)return r;return r.on(i,function e(){for(var t=[],a=arguments.length;a--;)t[a]=arguments[a];s.apply(r,t),r.off(i,e)},e)},s.prototype.off=function(e,i){var s=this;return s.eventsListeners&&e.split(" ").forEach(function(a){void 0===i?s.eventsListeners[a]=[]:s.eventsListeners[a]&&s.eventsListeners[a].length&&s.eventsListeners[a].forEach(function(e,t){e===i&&s.eventsListeners[a].splice(t,1)})}),s},s.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,i,s,r=this;return r.eventsListeners&&("string"==typeof e[0]||Array.isArray(e[0])?(a=e[0],i=e.slice(1,e.length),s=r):(a=e[0].events,i=e[0].data,s=e[0].context||r),(Array.isArray(a)?a:a.split(" ")).forEach(function(e){if(r.eventsListeners&&r.eventsListeners[e]){var t=[];r.eventsListeners[e].forEach(function(e){t.push(e)}),t.forEach(function(e){e.apply(s,i)})}})),r},s.prototype.useModulesParams=function(a){var i=this;i.modules&&Object.keys(i.modules).forEach(function(e){var t=i.modules[e];t.params&&V.extend(a,t.params)})},s.prototype.useModules=function(i){void 0===i&&(i={});var s=this;s.modules&&Object.keys(s.modules).forEach(function(e){var a=s.modules[e],t=i[e]||{};a.instance&&Object.keys(a.instance).forEach(function(e){var t=a.instance[e];s[e]="function"==typeof t?t.bind(s):t}
vendor: 67,364 bytes, line 8280
8280),a.on&&s.on&&Object.keys(a.on).forEach(function(e){s.on(e,a.on[e])}),a.create&&a.create.bind(s)(t)})},n.components.set=function(e){this.use&&this.use(e)},s.installModule=function(t){for(var e=[],a=arguments.length-1;0<a--;)e[a]=arguments[a+1];var i=this;i.prototype.modules||(i.prototype.modules={});var s=t.name||Object.keys(i.prototype.modules).length+"_"+V.now();return(i.prototype.modules[s]=t).proto&&Object.keys(t.proto).forEach(function(e){i.prototype[e]=t.proto[e]}),t.static&&Object.keys(t.static).forEach(function(e){i[e]=t.static[e]}),t.install&&t.install.apply(i,e),i},s.use=function(e){for(var t=[],a=arguments.length-1;0<a--;)t[a]=arguments[a+1];var i=this;return Array.isArray(e)?(e.forEach(function(e){return i.installModule(e)}),i):i.installModule.apply(i,[e].concat(t))},Object.defineProperties(s,n);var o={updateSize:function(){var e,t,a=this,i=a.$el;e=void 0!==a.params.width?a.params.width:i[0].clientWidth,t=void 0!==a.params.height?a.params.height:i[0].clientHeight,0===e&&a.isHorizontal()||0===t&&a.isVertical()||(e=e-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),t=t-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),V.extend(a,{width:e,height:t,size:a.isHorizontal()?e:t}))},updateSlides:function(){var e=this,t=e.params,a=e.$wrapperEl,i=e.size,s=e.rtlTranslate,r=e.wrongRTL,n=e.virtual&&t.virtual.enabled,o=n?e.virtual.slides.length:e.slides.length,l=a.children("."+e.params.slideClass),d=n?e.virtual.slides.length:l.length,p=[],c=[],u=[],h=t.slidesOffsetBefore;"function"==typeof h&&(h=t.slidesOffsetBefore.call(e));var v=t.slidesOffsetAfter;"function"==typeof v&&(v=t.slidesOffsetAfter.call(e));var f=e.snapGrid.length,m=e.snapGrid.length,g=t.spaceBetween,b=-h,w=0,y=0;if(void 0!==i){var x,T;"string"==typeof g&&0<=g.indexOf("%")&&(g=parseFloat(g.replace("%",""))/100*i),e.virtualSize=-g,s?l.css({marginLeft:"",marginTop:""}):l.css({marginRight:"",marginBottom:""}),1<t.slidesPerColumn&&(x=Math.floor(d/t.slidesPerColumn)===d/e.params.slidesPerColumn?d:Math.ceil(d/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&&"row"===t.slidesPerColumnFill&&(x=Math.max(x,t.slidesPerView*t.slidesPerColumn)));for(var E,S=t.slidesPerColumn,C=x/S,M=C-(t.slidesPerColumn*C-d),k=0;k<d;k+=1){T=0;var P=l.eq(k);if(1<t.slidesPerColumn){var z=void 0,$=void 0,L=void 0;"column"===t.slidesPerColumnFill?(L=k-($=Math.floor(k/S))*S,(M<$||$===M&&L===S-1)&&S<=(L+=1)&&(L=0,$+=1),z=$+L*x/S,P.css({"-webkit-box-ordinal-group":z,"-moz-box-ordinal-group":z,"-ms-flex-order":z,"-webkit-order":z,order:z})):$=k-(L=Math.floor(k/C))*C,P.css("margin-"+(e.isHorizontal()?"top":"left"),0!==L&&t.spaceBetween&&t.spaceBetween+"px").attr("data-swiper-column",$).attr("data-swiper-row",L)}if("none"!==P.css("display")){if("auto"===t.slidesPerView){var I=Y.getComputedStyle(P[0],null),D=P[0].style.transform,O=P[0].style.webkitTransform;D&&(P[0].style.transform="none"),O&&(P[0].style.webkitTransform="none"),T=t.roundLengths?e.isHorizontal()?P.outerWidth(!0):P.outerHeight(!0):e.isHorizontal()?parseFloat(I.getPropertyValue("width"))+parseFloat(I.getPropertyValue("margin-left"))+parseFloat(I.getPropertyValue("margin-right")):parseFloat(I.getPropertyValue("height"))+parseFloat(I.getPropertyValue("margin-top"))+parseFloat(I.getPropertyValue("margin-bottom")),D&&(P[0].style.transform=D),O&&(P[0].style.webkitTransform=O),t.roundLengths&&(T=Math.floor(T))}else T=(i-(t.slidesPerView-1)*g)/t.slidesPerView,t.roundLengths&&(T=Math.floor(T)),l[k]&&(e.isHorizontal()?l[k].style.width=T+"px":l[k].style.height=T+"px");l[k]&&(l[k].swiperSlideSize=T),u.push(T),t.centeredSlides?(b=b+T/2+w/2+g,0===w&&0!==k&&(b=b-i/2-g),0===k&&(b=b-i/2-g),Math.abs(b)<.001&&(b=0),t.roundLengths&&(b=Math.floor(b)),y%t.slidesPerGroup==0&&p.push(b),c.push(b)):(t.roundLengths&&(b=Math.floor(b)),y%t.slidesPerGroup==0&&p.push(b),c.push(b),b=b+T+g),e.virtualSize+=T+g,w=T,y+=1}}if(e.virtualSize=Math.max(e.virtualSize,i)+v,s&&r&&("slide"===t.effect||"coverflow"===t.effect)&&a.css({width:e.virtualSize+t.spaceBetween+"px"}),F.flexbox&&!t.setWrapperSize||(e.isHorizontal()?a.css({width:e.virtualSize+t.spaceBetween+"px"}):a.css({height:e.virtualSize+t.spaceBetween+"px"})),1<t.slidesPerColumn&&(e.virtualSize=(T+t.spaceBetween)*x,e.virtualSize=Math.ceil(e.virtualSize/t.slidesPerColumn)-t.spaceBetween,e.isHorizontal()?a.css({width:e.virtualSize+t.spaceBetween+"px"}):a.css({height:e.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){E=[];for(var A=0;A<p.length;A+=1){var N=p[A];t.roundLengths&&(N=Math.floor(N)),p[A]<e.virtualSize+p[0]&&E.push(N)}p=E}if(!t.centeredSlides){E=[];for(var H=0;H<p.length;H+=1){var G=p[H];t.roundLengths&&(G=Math.floor(G)),p[H]<=e.virtualSize-i&&E.push(G)}p=E,1<Math.floor(e.virtualSize-i)-Math.floor(p[p.length-1])&&p.push(e.virtualSize-i)}if(0===p.length&&(p=[0]),0!==t.spaceBetween&&(e.isHorizontal()?s?l.css({marginLeft:g+"px"}):l.css({marginRight:g+"px"}):l.css({marginBottom:g+"px"})),t.centerInsufficientSlides){var B=0;if(u.forEach(function(e){B+=e+(t.spaceBetween?t.spaceBetween:0)}),(B-=t.spaceBetween)<i){var X=(i-B)/2;p.forEach(function(e,t){p[t]=e-X}),c.forEach(function(e,t){c[t]=e+X})}}V.extend(e,{slides:l,snapGrid:p,slidesGrid:c,slidesSizesGrid:u}),d!==o&&e.emit("slidesLengthChange"),p.length!==f&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),c.length!==m&&e.emit("slidesGridLengthChange"),(t.watchSlidesProgress||t.watchSlidesVisibility)&&e.updateSlidesOffset()}},updateAutoHeight:function(e){var t,a=this,i=[],s=0;if("number"==typeof e?a.setTransition(e):!0===e&&a.setTransition(a.params.speed),"auto"!==a.params.slidesPerView&&1<a.params.slidesPerView)for(t=0;t<Math.ceil(a.params.slidesPerView);t+=1){var r=a.activeIndex+t;if(r>a.slides.length)break;i.push(a.slides.eq(r)[0])}else i.push(a.slides.eq(a.activeIndex)[0]);for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var n=i[t].offsetHeight;s=s<n?n:s}s&&a.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,a=t.params,i=t.slides,s=t.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();var r=-e;s&&(r=e),i.removeClass(a.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(var n=0;n<i.length;n+=1){var o=i[n],l=(r+(a.centeredSlides?t.minTranslate():0)-o.swiperSlideOffset)/(o.swiperSlideSize+a.spaceBetween);if(a.watchSlidesVisibility){var d=-(r-o.swiperSlideOffset),p=d+t.slidesSizesGrid[n];(0<=d&&d<t.size||0<p&&p<=t.size||d<=0&&p>=t.size)&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(n),i.eq(n).addClass(a.slideVisibleClass))}o.progress=s?-l:l}t.visibleSlides=L(t.visibleSlides)}},updateProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,a=t.params,i=t.maxTranslate()-t.minTranslate(),s=t.progress,r=t.isBeginning,n=t.isEnd,o=r,l=n;0===i?n=r=!(s=0):(r=(s=(e-t.minTranslate())/i)<=0,n=1<=s),V.extend(t,{progress:s,isBeginning:r,isEnd:n}),(a.watchSlidesProgress||a.watchSlidesVisibility)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),n&&!l&&t.emit("reachEnd toEdge"),(o&&!r||l&&!n)&&t.emit("fromEdge"),t.emit("progress",s)},updateSlidesClasses:function(){var e,t=this,a=t.slides,i=t.params,s=t.$wrapperEl,r=t.activeIndex,n=t.realIndex,o=t.virtual&&i.virtual.enabled;a.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=o?t.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+r+'"]'):a.eq(r)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass));var l=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===l.length&&(l=a.eq(0)).addClass(i.slideNextClass);var d=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===d.length&&(d=a.eq(-1)).addClass(i.slidePrevClass),i.loop&&(l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),d.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t,a=this,i=a.rtlTranslate?a.translate:-a.translate,s=a.slidesGrid,r=a.snapGrid,n=a.params,o=a.activeIndex,l=a.realIndex,d=a.snapIndex,p=e;if(void 0===p){for(var c=0;c<s.length;c+=1)void 0!==s[c+1]?i>=s[c]&&i<s[c+1]-(s[c+1]-s[c])/2?p=c:i>=s[c]&&i<s[c+1]&&(p=c+1):i>=s[c]&&(p=c);n.normalizeSlideIndex&&(p<0||void 0===p)&&(p=0)}if((t=0<=r.indexOf(i)?r.indexOf(i):Math.floor(p/n.slidesPerGroup))>=r.length&&(t=r.length-1),p!==o){var u=parseInt(a.slides.eq(p).attr("data-swiper-slide-index")||p,10);V.extend(a,{snapIndex:t,realIndex:u,previousIndex:o,activeIndex:p}),a.emit("activeIndexChange"),a.emit("snapIndexChange"),l!==u&&a.emit("realIndexChange"),a.emit("slideChange")}else t!==d&&(a.snapIndex=t,a.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this,a=t.params,i=L(e.target).closest("."+a.slideClass)[0],s=!1;if(i)for(var r=0;r<t.slides.length;r+=1)t.slides[r]===i&&(s=!0);if(!i||!s)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=i,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(L(i).attr("data-swiper-slide-index"),10):t.clickedIndex=L(i).index(),a.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}};var d={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this.params,a=this.rtlTranslate,i=this.translate,s=this.$wrapperEl;if(t.virtualTranslate)return a?-i:i;var r=V.getTranslate(s[0],e);return a&&(r=-r),r||0},setTranslate:function(e,t){var a=this,i=a.rtlTranslate,s=a.params,r=a.$wrapperEl,n=a.progress,o=0,l=0;a.isHorizontal()?o=i?-e:e:l=e,s.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),s.virtualTranslate||(F.transforms3d?r.transform("translate3d("+o+"px, "+l+"px, 0px)"):r.transform("translate("+o+"px, "+l+"px)")),a.previousTranslate=a.translate,a.translate=a.isHorizontal()?o:l;var d=a.maxTranslate()-a.minTranslate();(0===d?0:(e-a.minTranslate())/d)!==n&&a.updateProgress(e),a.emit("setTranslate",a.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}};var p={setTransition:function(e,t){this.$wrapperEl.transition(e),this.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);var a=this,i=a.activeIndex,s=a.params,r=a.previousIndex;s.autoHeight&&a.updateAutoHeight();var n=t;if(n||(n=r<i?"next":i<r?"prev":"reset"),a.emit("transitionStart"),e&&i!==r){if("reset"===n)return void a.emit("slideResetTransitionStart");a.emit("slideChangeTransitionStart"),"next"===n?a.emit("slideNextTransitionStart"):a.emit("slidePrevTransitionStart")}},transitionEnd:function(e,t){void 0===e&&(e=!0);var a=this,i=a.activeIndex,s=a.previousIndex;a.animating=!1,a.setTransition(0);var r=t;if(r||(r=s<i?"next":i<s?"prev":"reset"),a.emit("transitionEnd"),e&&i!==s){if("reset"===r)return void a.emit("slideResetTransitionEnd");a.emit("slideChangeTransitionEnd"),"next"===r?a.emit("slideNextTransitionEnd"):a.emit("slidePrevTransitionEnd")}}};var c={slideTo:function(e,t,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0);var s=this,r=e;r<0&&(r=0);var n=s.params,o=s.snapGrid,l=s.slidesGrid,d=s.previousIndex,p=s.activeIndex,c=s.rtlTranslate;if(s.animating&&n.preventInteractionOnTransition)return!1;var u=Math.floor(r/n.slidesPerGroup);u>=o.length&&(u=o.length-1),(p||n.initialSlide||0)===(d||0)&&a&&s.emit("beforeSlideChangeStart");var h,v=-o[u];if(s.updateProgress(v),n.normalizeSlideIndex)for(var f=0;f<l.length;f+=1)-Math.floor(100*v)>=Math.floor(100*l[f])&&(r=f);if(s.initialized&&r!==p){if(!s.allowSlideNext&&v<s.translate&&v<s.minTranslate())return!1;if(!s.allowSlidePrev&&v>s.translate&&v>s.maxTranslate()&&(p||0)!==r)return!1}return h=p<r?"next":r<p?"prev":"reset",c&&-v===s.translate||!c&&v===s.translate?(s.updateActiveIndex(r),n.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==n.effect&&s.setTranslate(v),"reset"!==h&&(s.transitionStart(a,h),s.transitionEnd(a,h)),!1):(0!==t&&F.transition?(s.setTransition(t),s.setTranslate(v),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,h),s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.$wrapperEl[0].removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(a,h))}),s.$wrapperEl[0].addEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd))):(s.setTransition(0),s.setTranslate(v),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,h),s.transitionEnd(a,h)),!0)},slideToLoop:function(e,t,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0);var s=e;return this.params.loop&&(s+=this.loopedSlides),this.slideTo(s,t,a,i)},slideNext:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.params,r=i.animating;return s.loop?!r&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)):i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)},slidePrev:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.params,r=i.animating,n=i.snapGrid,o=i.slidesGrid,l=i.rtlTranslate;if(s.loop){if(r)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}function d(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var p,c=d(l?i.translate:-i.translate),u=n.map(function(e){return d(e)}),h=(o.map(function(e){return d(e)}),n[u.indexOf(c)],n[u.indexOf(c)-1]);return void 0!==h&&(p=o.indexOf(h))<0&&(p=i.activeIndex-1),i.slideTo(p,e,t,a)},slideReset:function(e,t,a){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,a)},slideToClosest:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.activeIndex,r=Math.floor(s/i.params.slidesPerGroup);if(r<i.snapGrid.length-1){var n=i.rtlTranslate?i.translate:-i.translate,o=i.snapGrid[r];(i.snapGrid[r+1]-o)/2<n-o&&(s=i.params.slidesPerGroup)}return i.slideTo(s,e,t,a)},slideToClickedSlide:function(){var e,t=this,a=t.params,i=t.$wrapperEl,s="auto"===a.slidesPerView?t.slidesPerViewDynamic():a.slidesPerView,r=t.clickedIndex;if(a.loop){if(t.animating)return;e=parseInt(L(t.clickedSlide).attr("data-swiper-slide-index"),10),a.centeredSlides?r<t.loopedSlides-s/2||r>t.slides.length-t.loopedSlides+s/2?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),V.nextTick(function(){t.slideTo(r)})):t.slideTo(r):r>t.slides.length-s?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),V.nextTick(function(){t.slideTo(r)})):t.slideTo(r)}else t.slideTo(r)}};var u={loopCreate:function(){var i=this,e=i.params,t=i.$wrapperEl;t.children("."+e.slideClass+"."+e.slideDuplicateClass).remove();var s=t.children("."+e.slideClass);if(e.loopFillGroupWithBlank){var a=e.slidesPerGroup-s.length%e.slidesPerGroup;if(a!==e.slidesPerGroup){for(var r=0;r<a;r+=1){var n=L(f.createElement("div")).addClass(e.slideClass+" "+e.slideBlankClass);t.append(n)}s=t.children("."+e.slideClass)}}"auto"!==e.slidesPerView||e.loopedSlides||(e.loopedSlides=s.length),i.loopedSlides=parseInt(e.loopedSlides||e.slidesPerView,10),i.loopedSlides+=e.loopAdditionalSlides,i.loopedSlides>s.length&&(i.loopedSlides=s.length);var o=[],l=[];s.each(function(e,t){var a=L(t);e<i.loopedSlides&&l.push(t),e<s.length&&e>=s.length-i.loopedSlides&&o.push(t),a.attr("data-swiper-slide-index",e)});for(var d=0;d<l.length;d+=1)t.append(L(l[d].cloneNode(!0)).addClass(e.slideDuplicateClass));for(var p=o.length-1;0<=p;p-=1)t.prepend(L(o[p].cloneNode(!0)).addClass(e.slideDuplicateClass))},loopFix:function(){var e,t=this,a=t.params,i=t.activeIndex,s=t.slides,r=t.loopedSlides,n=t.allowSlidePrev,o=t.allowSlideNext,l=t.snapGrid,d=t.rtlTranslate;t.allowSlidePrev=!0,t.allowSlideNext=!0;var p=-l[i]-t.getTranslate();i<r?(e=s.length-3*r+i,e+=r,t.slideTo(e,0,!1,!0)&&0!==p&&t.setTranslate((d?-t.translate:t.translate)-p)):("auto"===a.slidesPerView&&2*r<=i||i>=s.length-r)&&(e=-s.length+i+r,e+=r,t.slideTo(e,0,!1,!0)&&0!==p&&t.setTranslate((d?-t.translate:t.translate)-p));t.allowSlidePrev=n,t.allowSlideNext=o},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,a=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass).remove(),a.removeAttr("data-swiper-slide-index")}};var h={setGrabCursor:function(e){if(!(F.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){F.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}};var v={appendSlide:function(e){var t=this,a=t.$wrapperEl,i=t.params;if(i.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s<e.length;s+=1)e[s]&&a.append(e[s]);else a.append(e);i.loop&&t.loopCreate(),i.observer&&F.observer||t.update()},prependSlide:function(e){var t=this,a=t.params,i=t.$wrapperEl,s=t.activeIndex;a.loop&&t.loopDestroy();var r=s+1;if("object"==typeof e&&"length"in e){for(var n=0;n<e.length;n+=1)e[n]&&i.prepend(e[n]);r=s+e.length}else i.prepend(e);a.loop&&t.loopCreate(),a.observer&&F.observer||t.update(),t.slideTo(r,0,!1)},addSlide:function(e,t){var a=this,i=a.$wrapperEl,s=a.params,r=a.activeIndex;s.loop&&(r-=a.loopedSlides,a.loopDestroy(),a.slides=i.children("."+s.slideClass));var n=a.slides.length;if(e<=0)a.prependSlide(t);else if(n<=e)a.appendSlide(t);else{for(var o=e<r?r+1:r,l=[],d=n-1;e<=d;d-=1){var p=a.slides.eq(d);p.remove(),l.unshift(p)}if("object"==typeof t&&"length"in t){for(var c=0;c<t.length;c+=1)t[c]&&i.append(t[c]);o=e<r?r+t.length:r}else i.append(t);for(var u=0;u<l.length;u+=1)i.append(l[u]);s.loop&&a.loopCreate(),s.observer&&F.observer||a.update(),s.loop?a.slideTo(o+a.loopedSlides,0,!1):a.slideTo(o,0,!1)}},removeSlide:function(e){var t=this,a=t.params,i=t.$wrapperEl,s=t.activeIndex;a.loop&&(s-=t.loopedSlides,t.loopDestroy(),t.slides=i.children("."+a.slideClass));var r,n=s;if("object"==typeof e&&"length"in e){for(var o=0;o<e.length;o+=1)r=e[o],t.slides[r]&&t.slides.eq(r).remove(),r<n&&(n-=1);n=Math.max(n,0)}else r=e,t.slides[r]&&t.slides.eq(r).remove(),r<n&&(n-=1),n=Math.max(n,0);a.loop&&t.loopCreate(),a.observer&&F.observer||t.update(),a.loop?t.slideTo(n+t.loopedSlides,0,!1):t.slideTo(n,0,!1)},removeAllSlides:function(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},m=function(){var e=Y.navigator.userAgent,t={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:Y.cordova||Y.phonegap,phonegap:Y.cordova||Y.phonegap},a=e.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),s=e.match(/(iPad).*OS\s([\d_]+)/),r=e.match(/(iPod)(.*OS\s([\d_]+))?/),n=!s&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(a&&(t.os="windows",t.osVersion=a[2],t.windows=!0),i&&!a&&(t.os="android",t.osVersion=i[2],t.android=!0,t.androidChrome=0<=e.toLowerCase().indexOf("chrome")),(s||n||r)&&(t.os="ios",t.ios=!0),n&&!r&&(t.osVersion=n[2].replace(/_/g,"."),t.iphone=!0),s&&(t.osVersion=s[2].replace(/_/g,"."),t.ipad=!0),r&&(t.osVersion=r[3]?r[3].replace(/_/g,"."):null,t.iphone=!0),t.ios&&t.osVersion&&0<=e.indexOf("Version/")&&"10"===t.osVersion.split(".")[0]&&(t.osVersion=e.toLowerCase().split("version/")[1].split(" ")[0]),t.desktop=!(t.os||t.android||t.webView),t.webView=(n||s||r)&&e.match(/.*AppleWebKit(?!.*Safari)/i),t.os&&"ios"===t.os){var o=t.osVersion.split("."),l=f.querySelector('meta[name="viewport"]');t.minimalUi=!t.webView&&(r||n)&&(1*o[0]==7?1<=1*o[1]:7<1*o[0])&&l&&0<=l.getAttribute("content").indexOf("minimal-ui")}return t.pixelRatio=Y.devicePixelRatio||1,t}();function g(){var e=this,t=e.params,a=e.el;if(!a||0!==a.offsetWidth){t.breakpoints&&e.setBreakpoint();var i=e.allowSlideNext,s=e.allowSlidePrev,r=e.snapGrid;if(e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),t.freeMode){var n=Math.min(Math.max(e.translate,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses(),t.autoHeight&&e.updateAutoHeight()}else e.updateSlidesClasses(),("auto"===t.slidesPerView||1<t.slidesPerView)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);e.allowSlidePrev=s,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}var b={attachEvents:function(){var e=this,t=e.params,a=e.touchEvents,i=e.el,s=e.wrapperEl;e.onTouchStart=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches;if(!t.animating||!i.preventInteractionOnTransition){var r=e;if(r.originalEvent&&(r=r.originalEvent),a.isTouchEvent="touchstart"===r.type,(a.isTouchEvent||!("which"in r)||3!==r.which)&&!(!a.isTouchEvent&&"button"in r&&0<r.button||a.isTouched&&a.isMoved))if(i.noSwiping&&L(r.target).closest(i.noSwipingSelector?i.noSwipingSelector:"."+i.noSwipingClass)[0])t.allowClick=!0;else if(!i.swipeHandler||L(r).closest(i.swipeHandler)[0]){s.currentX="touchstart"===r.type?r.targetTouches[0].pageX:r.pageX,s.currentY="touchstart"===r.type?r.targetTouches[0].pageY:r.pageY;var n=s.currentX,o=s.currentY,l=i.edgeSwipeDetection||i.iOSEdgeSwipeDetection,d=i.edgeSwipeThreshold||i.iOSEdgeSwipeThreshold;if(!l||!(n<=d||n>=Y.screen.width-d)){if(V.extend(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=n,s.startY=o,a.touchStartTime=V.now(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,0<i.threshold&&(a.allowThresholdMove=!1),"touchstart"!==r.type){var p=!0;L(r.target).is(a.formElements)&&(p=!1),f.activeElement&&L(f.activeElement).is(a.formElements)&&f.activeElement!==r.target&&f.activeElement.blur();var c=p&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||c)&&r.preventDefault()}t.emit("touchStart",r)}}}}.bind(e),e.onTouchMove=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=e;if(n.originalEvent&&(n=n.originalEvent),a.isTouched){if(!a.isTouchEvent||"mousemove"!==n.type){var o="touchmove"===n.type?n.targetTouches[0].pageX:n.pageX,l="touchmove"===n.type?n.targetTouches[0].pageY:n.pageY;if(n.preventedByNestedSwiper)return s.startX=o,void(s.startY=l);if(!t.allowTouchMove)return t.allowClick=!1,void(a.isTouched&&(V.extend(s,{startX:o,startY:l,currentX:o,currentY:l}),a.touchStartTime=V.now()));if(a.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(t.isVertical()){if(l<s.startY&&t.translate<=t.maxTranslate()||l>s.startY&&t.translate>=t.minTranslate())return a.isTouched=!1,void(a.isMoved=!1)}else if(o<s.startX&&t.translate<=t.maxTranslate()||o>s.startX&&t.translate>=t.minTranslate())return;if(a.isTouchEvent&&f.activeElement&&n.target===f.activeElement&&L(n.target).is(a.formElements))return a.isMoved=!0,void(t.allowClick=!1);if(a.allowTouchCallbacks&&t.emit("touchMove",n),!(n.targetTouches&&1<n.targetTouches.length)){s.currentX=o,s.currentY=l;var d,p=s.currentX-s.startX,c=s.currentY-s.startY;if(!(t.params.threshold&&Math.sqrt(Math.pow(p,2)+Math.pow(c,2))<t.params.threshold))if(void 0===a.isScrolling&&(t.isHorizontal()&&s.currentY===s.startY||t.isVertical()&&s.currentX===s.startX?a.isScrolling=!1:25<=p*p+c*c&&(d=180*Math.atan2(Math.abs(c),Math.abs(p))/Math.PI,a.isScrolling=t.isHorizontal()?d>i.touchAngle:90-d>i.touchAngle)),a.isScrolling&&t.emit("touchMoveOpposite",n),void 0===a.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(a.startMoving=!0)),a.isScrolling)a.isTouched=!1;else if(a.startMoving){t.allowClick=!1,n.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&n.stopPropagation(),a.isMoved||(i.loop&&t.loopFix(),a.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&&t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),a.allowMomentumBounce=!1,!i.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",n)),t.emit("sliderMove",n),a.isMoved=!0;var u=t.isHorizontal()?p:c;s.diff=u,u*=i.touchRatio,r&&(u=-u),t.swipeDirection=0<u?"prev":"next",a.currentTranslate=u+a.startTranslate;var h=!0,v=i.resistanceRatio;if(i.touchReleaseOnEdges&&(v=0),0<u&&a.currentTranslate>t.minTranslate()?(h=!1,i.resistance&&(a.currentTranslate=t.minTranslate()-1+Math.pow(-t.minTranslate()+a.startTranslate+u,v))):u<0&&a.currentTranslate<t.maxTranslate()&&(h=!1,i.resistance&&(a.currentTranslate=t.maxTranslate()+1-Math.pow(t.maxTranslate()-a.startTranslate-u,v))),h&&(n.preventedByNestedSwiper=!0),!t.allowSlideNext&&"next"===t.swipeDirection&&a.currentTranslate<a.startTranslate&&(a.currentTranslate=a.startTranslate),!t.allowSlidePrev&&"prev"===t.swipeDirection&&a.currentTranslate>a.startTranslate&&(a.currentTranslate=a.startTranslate),0<i.threshold){if(!(Math.abs(u)>i.threshold||a.allowThresholdMove))return void(a.currentTranslate=a.startTranslate);if(!a.allowThresholdMove)return a.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,a.currentTranslate=a.startTranslate,void(s.diff=t.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(t.updateActiveIndex(),t.updateSlidesClasses()),i.freeMode&&(0===a.velocities.length&&a.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:a.touchStartTime}),a.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:V.now()})),t.updateProgress(a.currentTranslate),t.setTranslate(a.currentTranslate))}}}}else a.startMoving&&a.isScrolling&&t.emit("touchMoveOpposite",n)}.bind(e),e.onTouchEnd=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),a.allowTouchCallbacks&&t.emit("touchEnd",d),a.allowTouchCallbacks=!1,!a.isTouched)return a.isMoved&&i.grabCursor&&t.setGrabCursor(!1),a.isMoved=!1,void(a.startMoving=!1);i.grabCursor&&a.isMoved&&a.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var p,c=V.now(),u=c-a.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap",d),u<300&&300<c-a.lastClickTime&&(a.clickTimeout&&clearTimeout(a.clickTimeout),a.clickTimeout=V.nextTick(function(){t&&!t.destroyed&&t.emit("click",d)},300)),u<300&&c-a.lastClickTime<300&&(a.clickTimeout&&clearTimeout(a.clickTimeout),t.emit("doubleTap",d))),a.lastClickTime=V.now(),V.nextTick(function(){t.destroyed||(t.allowClick=!0)}),!a.isTouched||!a.isMoved||!t.swipeDirection||0===s.diff||a.currentTranslate===a.startTranslate)return a.isTouched=!1,a.isMoved=!1,void(a.startMoving=!1);if(a.isTouched=!1,a.isMoved=!1,a.startMoving=!1,p=i.followFinger?r?t.translate:-t.translate:-a.currentTranslate,i.freeMode){if(p<-t.minTranslate())return void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(i.freeModeMomentum){if(1<a.velocities.length){var h=a.velocities.pop(),v=a.velocities.pop(),f=h.position-v.position,m=h.time-v.time;t.velocity=f/m,t.velocity/=2,Math.abs(t.velocity)<i.freeModeMinimumVelocity&&(t.velocity=0),(150<m||300<V.now()-h.time)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeModeMomentumVelocityRatio,a.velocities.length=0;var g=1e3*i.freeModeMomentumRatio,b=t.velocity*g,w=t.translate+b;r&&(w=-w);var y,x,T=!1,E=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;if(w<t.maxTranslate())i.freeModeMomentumBounce?(w+t.maxTranslate()<-E&&(w=t.maxTranslate()-E),y=t.maxTranslate(),T=!0,a.allowMomentumBounce=!0):w=t.maxTranslate(),i.loop&&i.centeredSlides&&(x=!0);else if(w>t.minTranslate())i.freeModeMomentumBounce?(w-t.minTranslate()>E&&(w=t.minTranslate()+E),y=t.minTranslate(),T=!0,a.allowMomentumBounce=!0):w=t.minTranslate(),i.loop&&i.centeredSlides&&(x=!0);else if(i.freeModeSticky){for(var S,C=0;C<l.length;C+=1)if(l[C]>-w){S=C;break}w=-(w=Math.abs(l[S]-w)<Math.abs(l[S-1]-w)||"next"===t.swipeDirection?l[S]:l[S-1])}if(x&&t.once("transitionEnd",function(){t.loopFix()}),0!==t.velocity)g=r?Math.abs((-w-t.translate)/t.velocity):Math.abs((w-t.translate)/t.velocity);else if(i.freeModeSticky)return void t.slideToClosest();i.freeModeMomentumBounce&&T?(t.updateProgress(y),t.setTransition(g),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&a.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(i.speed),t.setTranslate(y),n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))})):t.velocity?(t.updateProgress(w),t.setTransition(g),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(w),t.updateActiveIndex(),t.updateSlidesClasses()}else if(i.freeModeSticky)return void t.slideToClosest();(!i.freeModeMomentum||u>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var M=0,k=t.slidesSizesGrid[0],P=0;P<o.length;P+=i.slidesPerGroup)void 0!==o[P+i.slidesPerGroup]?p>=o[P]&&p<o[P+i.slidesPerGroup]&&(k=o[(M=P)+i.slidesPerGroup]-o[P]):p>=o[P]&&(M=P,k=o[o.length-1]-o[o.length-2]);var z=(p-o[M])/k;if(u>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(z>=i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M)),"prev"===t.swipeDirection&&(z>1-i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(M+i.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(M)}}}.bind(e),e.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(e);var r="container"===t.touchEventsTarget?i:s,n=!!t.nested;if(F.touch||!F.pointerEvents&&!F.prefixedPointerEvents){if(F.touch){var o=!("touchstart"!==a.start||!F.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.addEventListener(a.start,e.onTouchStart,o),r.addEventListener(a.move,e.onTouchMove,F.passiveListener?{passive:!1,capture:n}:n),r.addEventListener(a.end,e.onTouchEnd,o)}(t.simulateTouch&&!m.ios&&!m.android||t.simulateTouch&&!F.touch&&m.ios)&&(r.addEventListener("mousedown",e.onTouchStart,!1),f.addEventListener("mousemove",e.onTouchMove,n),f.addEventListener("mouseup",e.onTouchEnd,!1))}else r.addEventListener(a.start,e.onTouchStart,!1),f.addEventListener(a.move,e.onTouchMove,n),f.addEventListener(a.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.addEventListener("click",e.onClick,!0),e.on(m.ios||m.android?"resize orientationchange observerUpdate":"resize observerUpdate",g,!0)},detachEvents:function(){var e=this,t=e.params,a=e.touchEvents,i=e.el,s=e.wrapperEl,r="container"===t.touchEventsTarget?i:s,n=!!t.nested;if(F.touch||!F.pointerEvents&&!F.prefixedPointerEvents){if(F.touch){var o=!("onTouchStart"!==a.start||!F.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.removeEventListener(a.start,e.onTouchStart,o),r.removeEventListener(a.move,e.onTouchMove,n),r.removeEventListener(a.end,e.onTouchEnd,o)}(t.simulateTouch&&!m.ios&&!m.android||t.simulateTouch&&!F.touch&&m.ios)&&(r.removeEventListener("mousedown",e.onTouchStart,!1),f.removeEventListener("mousemove",e.onTouchMove,n),f.removeEventListener("mouseup",e.onTouchEnd,!1))}else r.removeEventListener(a.start,e.onTouchStart,!1),f.removeEventListener(a.move,e.onTouchMove,n),f.removeEventListener(a.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.removeEventListener("click",e.onClick,!0),e.off(m.ios||m.android?"resize orientationchange observerUpdate":"resize observerUpdate",g)}};var w,y={setBreakpoint:function(){var e=this,t=e.activeIndex,a=e.initialized,i=e.loopedSlides;void 0===i&&(i=0);var s=e.params,r=s.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var n=e.getBreakpoint(r);if(n&&e.currentBreakpoint!==n){var o=n in r?r[n]:void 0;o&&["slidesPerView","spaceBetween","slidesPerGroup"].forEach(function(e){var t=o[e];void 0!==t&&(o[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")});var l=o||e.originalParams,d=s.loop&&l.slidesPerView!==s.slidesPerView;V.extend(e.params,l),V.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=n,d&&a&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-i+e.loopedSlides,0,!1)),e.emit("breakpoint",l)}}},getBreakpoint:function(e){if(e){var t=!1,a=[];Object.keys(e).forEach(function(e){a.push(e)}),a.sort(function(e,t){return parseInt(e,10)-parseInt(t,10)});for(var i=0;i<a.length;i+=1){var s=a[i];this.params.breakpointsInverse?s<=Y.innerWidth&&(t=s):s>=Y.innerWidth&&!t&&(t=s)}return t||"max"}}},I={isIE:!!Y.navigator.userAgent.match(/Trident/g)||!!Y.navigator.userAgent.match(/MSIE/g),isEdge:!!Y.navigator.userAgent.match(/Edge/g),isSafari:(w=Y.navigator.userAgent.toLowerCase(),0<=w.indexOf("safari")&&w.indexOf("chrome")<0&&w.indexOf("android")<0),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(Y.navigator.userAgent)};var x={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsInverse:!1,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!0,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,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:!0},T={update:o,translate:d,transition:p,slide:c,loop:u,grabCursor:h,manipulation:v,events:b,breakpoints:y,checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked;e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),t&&t!==e.isLocked&&(e.isEnd=!1,e.navigation.update())}},classes:{addClasses:function(){var t=this.classNames,a=this.params,e=this.rtl,i=this.$el,s=[];s.push(a.direction),a.freeMode&&s.push("free-mode"),F.flexbox||s.push("no-flexbox"),a.autoHeight&&s.push("autoheight"),e&&s.push("rtl"),1<a.slidesPerColumn&&s.push("multirow"),m.android&&s.push("android"),m.ios&&s.push("ios"),(I.isIE||I.isEdge)&&(F.pointerEvents||F.prefixedPointerEvents)&&s.push("wp8-"+a.direction),s.forEach(function(e){t.push(a.containerModifierClass+e)}),i.addClass(t.join(" "))},removeClasses:function(){var e=this.$el,t=this.classNames;e.removeClass(t.join(" "))}},images:{loadImage:function(e,t,a,i,s,r){var n;function o(){r&&r()}e.complete&&s?o():t?((n=new Y.Image).onload=o,n.onerror=o,i&&(n.sizes=i),a&&(n.srcset=a),t&&(n.src=t)):o()},preloadImages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var a=0;a<e.imagesToLoad.length;a+=1){var i=e.imagesToLoad[a];e.loadImage(i,i.currentSrc||i.getAttribute("src"),i.srcset||i.getAttribute("srcset"),i.sizes||i.getAttribute("sizes"),!0,t)}}}},E={},S=function(u){function h(){for(var e,t,s,a=[],i=arguments.length;i--;)a[i]=arguments[i];1===a.length&&a[0].constructor&&a[0].constructor===Object?s=a[0]:(t=(e=a)[0],s=e[1]),s||(s={}),s=V.extend({},s),t&&!s.el&&(s.el=t),u.call(this,s),Object.keys(T).forEach(function(t){Object.keys(T[t]).forEach(function(e){h.prototype[e]||(h.prototype[e]=T[t][e])})});var r=this;void 0===r.modules&&(r.modules={}),Object.keys(r.modules).forEach(function(e){var t=r.modules[e];if(t.params){var a=Object.keys(t.params)[0],i=t.params[a];if("object"!=typeof i||null===i)return;if(!(a in s&&"enabled"in i))return;!0===s[a]&&(s[a]={enabled:!0}),"object"!=typeof s[a]||"enabled"in s[a]||(s[a].enabled=!0),s[a]||(s[a]={enabled:!1})}});var n=V.extend({},x);r.useModulesParams(n),r.params=V.extend({},n,E,s),r.originalParams=V.extend({},r.params),r.passedParams=V.extend({},s);var o=(r.$=L)(r.params.el);if(t=o[0]){if(1<o.length){var l=[];return o.each(function(e,t){var a=V.extend({},s,{el:t});l.push(new h(a))}),l}t.swiper=r,o.data("swiper",r);var d,p,c=o.children("."+r.params.wrapperClass);return V.extend(r,{$el:o,el:t,$wrapperEl:c,wrapperEl:c[0],classNames:[],slides:L(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===r.params.direction},isVertical:function(){return"vertical"===r.params.direction},rtl:"rtl"===t.dir.toLowerCase()||"rtl"===o.css("direction"),rtlTranslate:"horizontal"===r.params.direction&&("rtl"===t.dir.toLowerCase()||"rtl"===o.css("direction")),wrongRTL:"-webkit-box"===c.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEvents:(d=["touchstart","touchmove","touchend"],p=["mousedown","mousemove","mouseup"],F.pointerEvents?p=["pointerdown","pointermove","pointerup"]:F.prefixedPointerEvents&&(p=["MSPointerDown","MSPointerMove","MSPointerUp"]),r.touchEventsTouch={start:d[0],move:d[1],end:d[2]},r.touchEventsDesktop={start:p[0],move:p[1],end:p[2]},F.touch||!r.params.simulateTouch?r.touchEventsTouch:r.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video",lastClickTime:V.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.useModules(),r.params.init&&r.init(),r}}u&&(h.__proto__=u);var e={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return((h.prototype=Object.create(u&&u.prototype)).constructor=h).prototype.slidesPerViewDynamic=function(){var e=this,t=e.params,a=e.slides,i=e.slidesGrid,s=e.size,r=e.activeIndex,n=1;if(t.centeredSlides){for(var o,l=a[r].swiperSlideSize,d=r+1;d<a.length;d+=1)a[d]&&!o&&(n+=1,s<(l+=a[d].swiperSlideSize)&&(o=!0));for(var p=r-1;0<=p;p-=1)a[p]&&!o&&(n+=1,s<(l+=a[p].swiperSlideSize)&&(o=!0))}else for(var c=r+1;c<a.length;c+=1)i[c]-i[r]<s&&(n+=1);return n},h.prototype.update=function(){var a=this;if(a&&!a.destroyed){var e=a.snapGrid,t=a.params;t.breakpoints&&a.setBreakpoint(),a.updateSize(),a.updateSlides(),a.updateProgress(),a.updateSlidesClasses(),a.params.freeMode?(i(),a.params.autoHeight&&a.updateAutoHeight()):(("auto"===a.params.slidesPerView||1<a.params.slidesPerView)&&a.isEnd&&!a.params.centeredSlides?a.slideTo(a.slides.length-1,0,!1,!0):a.slideTo(a.activeIndex,0,!1,!0))||i(),t.watchOverflow&&e!==a.snapGrid&&a.checkOverflow(),a.emit("update")}function i(){var e=a.rtlTranslate?-1*a.translate:a.translate,t=Math.min(Math.max(e,a.maxTranslate()),a.minTranslate());a.setTranslate(t),a.updateActiveIndex(),a.updateSlidesClasses()}},h.prototype.init=function(){var e=this;e.initialized||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit),e.attachEvents(),e.initialized=!0,e.emit("init"))},h.prototype.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var a=this,i=a.params,s=a.$el,r=a.$wrapperEl,n=a.slides;return void 0===a.params||a.destroyed||(a.emit("beforeDestroy"),a.initialized=!1,a.detachEvents(),i.loop&&a.loopDestroy(),t&&(a.removeClasses(),s.removeAttr("style"),r.removeAttr("style"),n&&n.length&&n.removeClass([i.slideVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")),a.emit("destroy"),Object.keys(a.eventsListeners).forEach(function(e){a.off(e)}),!1!==e&&(a.$el[0].swiper=null,a.$el.data("swiper",null),V.deleteProps(a)),a.destroyed=!0),null},h.extendDefaults=function(e){V.extend(E,e)},e.extendedDefaults.get=function(){return E},e.defaults.get=function(){return x},e.Class.get=function(){return u},e.$.get=function(){return L},Object.defineProperties(h,e),h}(s),C={name:"device",proto:{device:m},static:{device:m}},M={name:"support",proto:{support:F},static:{support:F}},k={name:"browser",proto:{browser:I},static:{browser:I}},P={name:"resize",create:function(){var e=this;V.extend(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){Y.addEventListener("resize",this.resize.resizeHandler),Y.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy:function(){Y.removeEventListener("resize",this.resize.resizeHandler),Y.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}},z={func:Y.MutationObserver||Y.WebkitMutationObserver,attach:function(e,t){void 0===t&&(t={});var a=this,i=new z.func(function(e){if(1!==e.length){var t=function(){a.emit("observerUpdate",e[0])};Y.requestAnimationFrame?Y.requestAnimationFrame(t):Y.setTimeout(t,0)}else a.emit("observerUpdate",e[0])});i.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),a.observer.observers.push(i)},init:function(){var e=this;if(F.observer&&e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),a=0;a<t.length;a+=1)e.observer.attach(t[a]);e.observer.attach(e.$el[0],{childList:!1}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach(function(e){e.disconnect()}),this.observer.observers=[]}},$={name:"observer",params:{observer:!1,observeParents:!1},create:function(){V.extend(this,{observer:{init:z.init.bind(this),attach:z.attach.bind(this),destroy:z.destroy.bind(this),observers:[]}})},on:{init:function(){this.observer.init()},destroy:function(){this.observer.destroy()}}},D={update:function(e){var t=this,a=t.params,i=a.slidesPerView,s=a.slidesPerGroup,r=a.centeredSlides,n=t.params.virtual,o=n.addSlidesBefore,l=n.addSlidesAfter,d=t.virtual,p=d.from,c=d.to,u=d.slides,h=d.slidesGrid,v=d.renderSlide,f=d.offset;t.updateActiveIndex();var m,g,b,w=t.activeIndex||0;m=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",r?(g=Math.floor(i/2)+s+o,b=Math.floor(i/2)+s+l):(g=i+(s-1)+o,b=s+l);var y=Math.max((w||0)-b,0),x=Math.min((w||0)+g,u.length-1),T=(t.slidesGrid[y]||0)-(t.slidesGrid[0]||0);function E(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(V.extend(t.virtual,{from:y,to:x,offset:T,slidesGrid:t.slidesGrid}),p===y&&c===x&&!e)return t.slidesGrid!==h&&T!==f&&t.slides.css(m,T+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:T,from:y,to:x,slides:function(){for(var e=[],t=y;t<=x;t+=1)e.push(u[t]);return e}()}),void E();var S=[],C=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var M=p;M<=c;M+=1)(M<y||x<M)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+M+'"]').remove();for(var k=0;k<u.length;k+=1)y<=k&&k<=x&&(void 0===c||e?C.push(k):(c<k&&C.push(k),k<p&&S.push(k)));C.forEach(function(e){t.$wrapperEl.append(v(u[e],e))}),S.sort(function(e,t){return t-e}).forEach(function(e){t.$wrapperEl.prepend(v(u[e],e))}),t.$wrapperEl.children(".swiper-slide").css(m,T+"px"),E()},renderSlide:function(e,t){var a=this,i=a.params.virtual;if(i.cache&&a.virtual.cache[t])return a.virtual.cache[t];var s=i.renderSlide?L(i.renderSlide.call(a,e,t)):L('<div class="'+a.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),i.cache&&(a.virtual.cache[t]=s),s},appendSlide:function(e){this.virtual.slides.push(e),this.virtual.update(!0)},prependSlide:function(e){var t=this;if(t.virtual.slides.unshift(e),t.params.virtual.cache){var a=t.virtual.cache,i={};Object.keys(a).forEach(function(e){i[e+1]=a[e]}),t.virtual.cache=i}t.virtual.update(!0),t.slideNext(0)}},O={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,addSlidesBefore:0,addSlidesAfter:0}},create:function(){var e=this;V.extend(e,{virtual:{update:D.update.bind(e),appendSlide:D.appendSlide.bind(e),prependSlide:D.prependSlide.bind(e),renderSlide:D.renderSlide.bind(e),slides:e.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){var e=this;if(e.params.virtual.enabled){e.classNames.push(e.params.containerModifierClass+"virtual");var t={watchSlidesProgress:!0};V.extend(e.params,t),V.extend(e.originalParams,t),e.params.initialSlide||e.virtual.update()}},setTranslate:function(){this.params.virtual.enabled&&this.virtual.update()}}},A={handle:function(e){var t=this,a=t.rtlTranslate,i=e;i.originalEvent&&(i=i.originalEvent);var s=i.keyCode||i.charCode;if(!t.allowSlideNext&&(t.isHorizontal()&&39===s||t.isVertical()&&40===s))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&37===s||t.isVertical()&&38===s))return!1;if(!(i.shiftKey||i.altKey||i.ctrlKey||i.metaKey||f.activeElement&&f.activeElement.nodeName&&("input"===f.activeElement.nodeName.toLowerCase()||"textarea"===f.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(37===s||39===s||38===s||40===s)){var r=!1;if(0<t.$el.parents("."+t.params.slideClass).length&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var n=Y.innerWidth,o=Y.innerHeight,l=t.$el.offset();a&&(l.left-=t.$el[0].scrollLeft);for(var d=[[l.left,l.top],[l.left+t.width,l.top],[l.left,l.top+t.height],[l.left+t.width,l.top+t.height]],p=0;p<d.length;p+=1){var c=d[p];0<=c[0]&&c[0]<=n&&0<=c[1]&&c[1]<=o&&(r=!0)}if(!r)return}t.isHorizontal()?(37!==s&&39!==s||(i.preventDefault?i.preventDefault():i.returnValue=!1),(39===s&&!a||37===s&&a)&&t.slideNext(),(37===s&&!a||39===s&&a)&&t.slidePrev()):(38!==s&&40!==s||(i.preventDefault?i.preventDefault():i.returnValue=!1),40===s&&t.slideNext(),38===s&&t.slidePrev()),t.emit("keyPress",s)}},enable:function(){this.keyboard.enabled||(L(f).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&&(L(f).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},N={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create:function(){V.extend(this,{keyboard:{enabled:!1,enable:A.enable.bind(this),disable:A.disable.bind(this),handle:A.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}};var H={lastScrollTime:V.now(),event:-1<Y.navigator.userAgent.indexOf("firefox")?"DOMMouseScroll":function(){var e="onwheel",t=e in f;if(!t){var a=f.createElement("div");a.setAttribute(e,"return;"),t="function"==typeof a[e]}return!t&&f.implementation&&f.implementation.hasFeature&&!0!==f.implementation.hasFeature("","")&&(t=f.implementation.hasFeature("Events.wheel","3.0")),t}()?"wheel":"mousewheel",normalize:function(e){var t=0,a=0,i=0,s=0;return"detail"in e&&(a=e.detail),"wheelDelta"in e&&(a=-e.wheelDelta/120),"wheelDeltaY"in e&&(a=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=a,a=0),i=10*t,s=10*a,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(1===e.deltaMode?(i*=40,s*=40):(i*=800,s*=800)),i&&!t&&(t=i<1?-1:1),s&&!a&&(a=s<1?-1:1),{spinX:t,spinY:a,pixelX:i,pixelY:s}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,a=this,i=a.params.mousewheel;if(!a.mouseEntered&&!i.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var s=0,r=a.rtlTranslate?-1:1,n=H.normalize(t);if(i.forceToAxis)if(a.isHorizontal()){if(!(Math.abs(n.pixelX)>Math.abs(n.pixelY)))return!0;s=n.pixelX*r}else{if(!(Math.abs(n.pixelY)>Math.abs(n.pixelX)))return!0;s=n.pixelY}else s=Math.abs(n.pixelX)>Math.abs(n.pixelY)?-n.pixelX*r:-n.pixelY;if(0===s)return!0;if(i.invert&&(s=-s),a.params.freeMode){a.params.loop&&a.loopFix();var o=a.getTranslate()+s*i.sensitivity,l=a.isBeginning,d=a.isEnd;if(o>=a.minTranslate()&&(o=a.minTranslate()),o<=a.maxTranslate()&&(o=a.maxTranslate()),a.setTransition(0),a.setTranslate(o),a.updateProgress(),a.updateActiveIndex(),a.updateSlidesClasses(),(!l&&a.isBeginning||!d&&a.isEnd)&&a.updateSlidesClasses(),a.params.freeModeSticky&&(clearTimeout(a.mousewheel.timeout),a.mousewheel.timeout=V.nextTick(function(){a.slideToClosest()},300)),a.emit("scroll",t),a.params.autoplay&&a.params.autoplayDisableOnInteraction&&a.autoplay.stop(),o===a.minTranslate()||o===a.maxTranslate())return!0}else{if(60<V.now()-a.mousewheel.lastScrollTime)if(s<0)if(a.isEnd&&!a.params.loop||a.animating){if(i.releaseOnEdges)return!0}else a.slideNext(),a.emit("scroll",t);else if(a.isBeginning&&!a.params.loop||a.animating){if(i.releaseOnEdges)return!0}else a.slidePrev(),a.emit("scroll",t);a.mousewheel.lastScrollTime=(new Y.Date).getTime()}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},enable:function(){var e=this;if(!H.event)return!1;if(e.mousewheel.enabled)return!1;var t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=L(e.params.mousewheel.eventsTarged)),t.on("mouseenter",e.mousewheel.handleMouseEnter),t.on("mouseleave",e.mousewheel.handleMouseLeave),t.on(H.event,e.mousewheel.handle),e.mousewheel.enabled=!0},disable:function(){var e=this;if(!H.event)return!1;if(!e.mousewheel.enabled)return!1;var t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=L(e.params.mousewheel.eventsTarged)),t.off(H.event,e.mousewheel.handle),!(e.mousewheel.enabled=!1)}},G={update:function(){var e=this,t=e.params.navigation;if(!e.params.loop){var a=e.navigation,i=a.$nextEl,s=a.$prevEl;s&&0<s.length&&(e.isBeginning?s.addClass(t.disabledClass):s.removeClass(t.disabledClass),s[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass)),i&&0<i.length&&(e.isEnd?i.addClass(t.disabledClass):i.removeClass(t.disabledClass),i[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick:function(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init:function(){var e,t,a=this,i=a.params.navigation;(i.nextEl||i.prevEl)&&(i.nextEl&&(e=L(i.nextEl),a.params.uniqueNavElements&&"string"==typeof i.nextEl&&1<e.length&&1===a.$el.find(i.nextEl).length&&(e=a.$el.find(i.nextEl))),i.prevEl&&(t=L(i.prevEl),a.params.uniqueNavElements&&"string"==typeof i.prevEl&&1<t.length&&1===a.$el.find(i.prevEl).length&&(t=a.$el.find(i.prevEl))),e&&0<e.length&&e.on("click",a.navigation.onNextClick),t&&0<t.length&&t.on("click",a.navigation.onPrevClick),V.extend(a.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this,t=e.navigation,a=t.$nextEl,i=t.$prevEl;a&&a.length&&(a.off("click",e.navigation.onNextClick),a.removeClass(e.params.navigation.disabledClass)),i&&i.length&&(i.off("click",e.navigation.onPrevClick),i.removeClass(e.params.navigation.disabledClass))}},B={update:function(){var e=this,t=e.rtl,s=e.params.pagination;if(s.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var r,a=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el,n=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((r=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))>a-1-2*e.loopedSlides&&(r-=a-2*e.loopedSlides),n-1<r&&(r-=n),r<0&&"bullets"!==e.params.paginationType&&(r=n+r)):r=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===s.type&&e.pagination.bullets&&0<e.pagination.bullets.length){var o,l,d,p=e.pagination.bullets;if(s.dynamicBullets&&(e.pagination.bulletSize=p.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),i.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(s.dynamicMainBullets+4)+"px"),1<s.dynamicMainBullets&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=r-e.previousIndex,e.pagination.dynamicBulletIndex>s.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=s.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),o=r-e.pagination.dynamicBulletIndex,d=((l=o+(Math.min(p.length,s.dynamicMainBullets)-1))+o)/2),p.removeClass(s.bulletActiveClass+" "+s.bulletActiveClass+"-next "+s.bulletActiveClass+"-next-next "+s.bulletActiveClass+"-prev "+s.bulletActiveClass+"-prev-prev "+s.bulletActiveClass+"-main"),1<i.length)p.each(function(e,t){var a=L(t),i=a.index();i===r&&a.addClass(s.bulletActiveClass),s.dynamicBullets&&(o<=i&&i<=l&&a.addClass(s.bulletActiveClass+"-main"),i===o&&a.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),i===l&&a.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next"))});else if(p.eq(r).addClass(s.bulletActiveClass),s.dynamicBullets){for(var c=p.eq(o),u=p.eq(l),h=o;h<=l;h+=1)p.eq(h).addClass(s.bulletActiveClass+"-main");c.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),u.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next")}if(s.dynamicBullets){var v=Math.min(p.length,s.dynamicMainBullets+4),f=(e.pagination.bulletSize*v-e.pagination.bulletSize)/2-d*e.pagination.bulletSize,m=t?"right":"left";p.css(e.isHorizontal()?m:"top",f+"px")}}if("fraction"===s.type&&(i.find("."+s.currentClass).text(s.formatFractionCurrent(r+1)),i.find("."+s.totalClass).text(s.formatFractionTotal(n))),"progressbar"===s.type){var g;g=s.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var b=(r+1)/n,w=1,y=1;"horizontal"===g?w=b:y=b,i.find("."+s.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+w+") scaleY("+y+")").transition(e.params.speed)}"custom"===s.type&&s.renderCustom?(i.html(s.renderCustom(e,r+1,n)),e.emit("paginationRender",e,i[0])):e.emit("paginationUpdate",e,i[0]),i[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](s.lockClass)}},render:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var a=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el,s="";if("bullets"===t.type){for(var r=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length,n=0;n<r;n+=1)t.renderBullet?s+=t.renderBullet.call(e,n,t.bulletClass):s+="<"+t.bulletElement+' class="'+t.bulletClass+'"></'+t.bulletElement+">";i.html(s),e.pagination.bullets=i.find("."+t.bulletClass)}"fraction"===t.type&&(s=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'<span class="'+t.currentClass+'"></span> / <span class="'+t.totalClass+'"></span>',i.html(s)),"progressbar"===t.type&&(s=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'<span class="'+t.progressbarFillClass+'"></span>',i.html(s)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var a=this,e=a.params.pagination;if(e.el){var t=L(e.el);0!==t.length&&(a.params.uniqueNavElements&&"string"==typeof e.el&&1<t.length&&1===a.$el.find(e.el).length&&(t=a.$el.find(e.el)),"bullets"===e.type&&e.clickable&&t.addClass(e.clickableClass),t.addClass(e.modifierClass+e.type),"bullets"===e.type&&e.dynamicBullets&&(t.addClass(""+e.modifierClass+e.type+"-dynamic"),a.pagination.dynamicBulletIndex=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&t.addClass(e.progressbarOppositeClass),e.clickable&&t.on("click","."+e.bulletClass,function(e){e.preventDefault();var t=L(this).index()*a.params.slidesPerGroup;a.params.loop&&(t+=a.loopedSlides),a.slideTo(t)}),V.extend(a.pagination,{$el:t,el:t[0]}))}},destroy:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var a=e.pagination.$el;a.removeClass(t.hiddenClass),a.removeClass(t.modifierClass+t.type),e.pagination.bullets&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&a.off("click","."+t.bulletClass)}}},X={setTranslate:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,a=e.rtlTranslate,i=e.progress,s=t.dragSize,r=t.trackSize,n=t.$dragEl,o=t.$el,l=e.params.scrollbar,d=s,p=(r-s)*i;a?0<(p=-p)?(d=s-p,p=0):r<-p+s&&(d=r+p):p<0?(d=s+p,p=0):r<p+s&&(d=r-p),e.isHorizontal()?(F.transforms3d?n.transform("translate3d("+p+"px, 0, 0)"):n.transform("translateX("+p+"px)"),n[0].style.width=d+"px"):(F.transforms3d?n.transform("translate3d(0px, "+p+"px, 0)"):n.transform("translateY("+p+"px)"),n[0].style.height=d+"px"),l.hide&&(clearTimeout(e.scrollbar.timeout),o[0].style.opacity=1,e.scrollbar.timeout=setTimeout(function(){o[0].style.opacity=0,o.transition(400)},1e3))}},setTransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,a=t.$dragEl,i=t.$el;a[0].style.width="",a[0].style.height="";var s,r=e.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,n=e.size/e.virtualSize,o=n*(r/e.size);s="auto"===e.params.scrollbar.dragSize?r*n:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?a[0].style.width=s+"px":a[0].style.height=s+"px",i[0].style.display=1<=n?"none":"",e.params.scrollbarHide&&(i[0].style.opacity=0),V.extend(t,{trackSize:r,divider:n,moveDivider:o,dragSize:s}),t.$el[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},setDragPosition:function(e){var t,a=this,i=a.scrollbar,s=a.rtlTranslate,r=i.$el,n=i.dragSize,o=i.trackSize;t=((a.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY)-r.offset()[a.isHorizontal()?"left":"top"]-n/2)/(o-n),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var l=a.minTranslate()+(a.maxTranslate()-a.minTranslate())*t;a.updateProgress(l),a.setTranslate(l),a.updateActiveIndex(),a.updateSlidesClasses()},onDragStart:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar,s=t.$wrapperEl,r=i.$el,n=i.$dragEl;t.scrollbar.isTouched=!0,e.preventDefault(),e.stopPropagation(),s.transition(100),n.transition(100),i.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),r.transition(0),a.hide&&r.css("opacity",1),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this.scrollbar,a=this.$wrapperEl,i=t.$el,s=t.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),a.transition(0),i.transition(0),s.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,a.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=V.nextTick(function(){i.css("opacity",0),i.transition(400)},1e3)),t.emit("scrollbarDragEnd",e),a.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.touchEventsTouch,i=e.touchEventsDesktop,s=e.params,r=t.$el[0],n=!(!F.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},o=!(!F.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};F.touch?(r.addEventListener(a.start,e.scrollbar.onDragStart,n),r.addEventListener(a.move,e.scrollbar.onDragMove,n),r.addEventListener(a.end,e.scrollbar.onDragEnd,o)):(r.addEventListener(i.start,e.scrollbar.onDragStart,n),f.addEventListener(i.move,e.scrollbar.onDragMove,n),f.addEventListener(i.end,e.scrollbar.onDragEnd,o))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.touchEventsTouch,i=e.touchEventsDesktop,s=e.params,r=t.$el[0],n=!(!F.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},o=!(!F.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};F.touch?(r.removeEventListener(a.start,e.scrollbar.onDragStart,n),r.removeEventListener(a.move,e.scrollbar.onDragMove,n),r.removeEventListener(a.end,e.scrollbar.onDragEnd,o)):(r.removeEventListener(i.start,e.scrollbar.onDragStart,n),f.removeEventListener(i.move,e.scrollbar.onDragMove,n),f.removeEventListener(i.end,e.scrollbar.onDragEnd,o))}},init:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.$el,i=e.params.scrollbar,s=L(i.el);e.params.uniqueNavElements&&"string"==typeof i.el&&1<s.length&&1===a.find(i.el).length&&(s=a.find(i.el));var r=s.find("."+e.params.scrollbar.dragClass);0===r.length&&(r=L('<div class="'+e.params.scrollbar.dragClass+'"></div>'),s.append(r)),V.extend(t,{$el:s,el:s[0],$dragEl:r,dragEl:r[0]}),i.draggable&&t.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},R={setTransform:function(e,t){var a=this.rtl,i=L(e),s=a?-1:1,r=i.attr("data-swiper-parallax")||"0",n=i.attr("data-swiper-parallax-x"),o=i.attr("data-swiper-parallax-y"),l=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(n||o?(n=n||"0",o=o||"0"):this.isHorizontal()?(n=r,o="0"):(o=r,n="0"),n=0<=n.indexOf("%")?parseInt(n,10)*t*s+"%":n*t*s+"px",o=0<=o.indexOf("%")?parseInt(o,10)*t+"%":o*t+"px",null!=d){var p=d-(d-1)*(1-Math.abs(t));i[0].style.opacity=p}if(null==l)i.transform("translate3d("+n+", "+o+", 0px)");else{var c=l-(l-1)*(1-Math.abs(t));i.transform("translate3d("+n+", "+o+", 0px) scale("+c+")")}},setTranslate:function(){var i=this,e=i.$el,t=i.slides,s=i.progress,r=i.snapGrid;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(e,t){i.parallax.setTransform(t,s)}),t.each(function(e,t){var a=t.progress;1<i.params.slidesPerGroup&&"auto"!==i.params.slidesPerView&&(a+=Math.ceil(e/2)-s*(r.length-1)),a=Math.min(Math.max(a,-1),1),L(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(e,t){i.parallax.setTransform(t,a)})})},setTransition:function(s){void 0===s&&(s=this.params.speed);this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(e,t){var a=L(t),i=parseInt(a.attr("data-swiper-parallax-duration"),10)||s;0===s&&(i=0),a.transition(i)})}},q={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,a=e.targetTouches[0].pageY,i=e.targetTouches[1].pageX,s=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(i-t,2)+Math.pow(s-a,2))},onGestureStart:function(e){var t=this,a=t.params.zoom,i=t.zoom,s=i.gesture;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!F.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,s.scaleStart=q.getDistanceBetweenTouches(e)}s.$slideEl&&s.$slideEl.length||(s.$slideEl=L(e.target).closest(".swiper-slide"),0===s.$slideEl.length&&(s.$slideEl=t.slides.eq(t.activeIndex)),s.$imageEl=s.$slideEl.find("img, svg, canvas"),s.$imageWrapEl=s.$imageEl.parent("."+a.containerClass),s.maxRatio=s.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,0!==s.$imageWrapEl.length)?(s.$imageEl.transition(0),t.zoom.isScaling=!0):s.$imageEl=void 0},onGestureChange:function(e){var t=this.params.zoom,a=this.zoom,i=a.gesture;if(!F.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.fakeGestureMoved=!0,i.scaleMove=q.getDistanceBetweenTouches(e)}i.$imageEl&&0!==i.$imageEl.length&&(F.gestures?this.zoom.scale=e.scale*a.currentScale:a.scale=i.scaleMove/i.scaleStart*a.currentScale,a.scale>i.maxRatio&&(a.scale=i.maxRatio-1+Math.pow(a.scale-i.maxRatio+1,.5)),a.scale<t.minRatio&&(a.scale=t.minRatio+1-Math.pow(t.minRatio-a.scale+1,.5)),i.$imageEl.transform("translate3d(0,
82800,0) scale("+a.scale+")"))},onGestureEnd:function(e){var t=this.params.zoom,a=this.zoom,i=a.gesture;if(!F.gestures){if(!a.fakeGestureTouched||!a.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!m.android)return;a.fakeGestureTouched=!1,a.fakeGestureMoved=!1}i.$imageEl&&0!==i.$imageEl.length&&(a.scale=Math.max(Math.min(a.scale,i.maxRatio),t.minRatio),i.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(i.$slideEl=void 0))},onTouchStart:function(e){var t=this.zoom,a=t.gesture,i=t.image;a.$imageEl&&0!==a.$imageEl.length&&(i.isTouched||(m.android&&e.preventDefault(),i.isTouched=!0,i.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,i.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this,a=t.zoom,i=a.gesture,s=a.image,r=a.velocity;if(i.$imageEl&&0!==i.$imageEl.length&&(t.allowClick=!1,s.isTouched&&i.$slideEl)){s.isMoved||(s.width=i.$imageEl[0].offsetWidth,s.height=i.$imageEl[0].offsetHeight,s.startX=V.getTranslate(i.$imageWrapEl[0],"x")||0,s.startY=V.getTranslate(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0),t.rtl&&(s.startX=-s.startX,s.startY=-s.startY));var n=s.width*a.scale,o=s.height*a.scale;if(!(n<i.slideWidth&&o<i.slideHeight)){if(s.minX=Math.min(i.slideWidth/2-n/2,0),s.maxX=-s.minX,s.minY=Math.min(i.slideHeight/2-o/2,0),s.maxY=-s.minY,s.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!s.isMoved&&!a.isScaling){if(t.isHorizontal()&&(Math.floor(s.minX)===Math.floor(s.startX)&&s.touchesCurrent.x<s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&&s.touchesCurrent.x>s.touchesStart.x))return void(s.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.y<s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&&s.touchesCurrent.y>s.touchesStart.y))return void(s.isTouched=!1)}e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentX<s.minX&&(s.currentX=s.minX+1-Math.pow(s.minX-s.currentX+1,.8)),s.currentX>s.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentY<s.minY&&(s.currentY=s.minY+1-Math.pow(s.minY-s.currentY+1,.8)),s.currentY>s.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),r.prevPositionX||(r.prevPositionX=s.touchesCurrent.x),r.prevPositionY||(r.prevPositionY=s.touchesCurrent.y),r.prevTime||(r.prevTime=Date.now()),r.x=(s.touchesCurrent.x-r.prevPositionX)/(Date.now()-r.prevTime)/2,r.y=(s.touchesCurrent.y-r.prevPositionY)/(Date.now()-r.prevTime)/2,Math.abs(s.touchesCurrent.x-r.prevPositionX)<2&&(r.x=0),Math.abs(s.touchesCurrent.y-r.prevPositionY)<2&&(r.y=0),r.prevPositionX=s.touchesCurrent.x,r.prevPositionY=s.touchesCurrent.y,r.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,a=e.image,i=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!a.isTouched||!a.isMoved)return a.isTouched=!1,void(a.isMoved=!1);a.isTouched=!1,a.isMoved=!1;var s=300,r=300,n=i.x*s,o=a.currentX+n,l=i.y*r,d=a.currentY+l;0!==i.x&&(s=Math.abs((o-a.currentX)/i.x)),0!==i.y&&(r=Math.abs((d-a.currentY)/i.y));var p=Math.max(s,r);a.currentX=o,a.currentY=d;var c=a.width*e.scale,u=a.height*e.scale;a.minX=Math.min(t.slideWidth/2-c/2,0),a.maxX=-a.minX,a.minY=Math.min(t.slideHeight/2-u/2,0),a.maxY=-a.minY,a.currentX=Math.max(Math.min(a.currentX,a.maxX),a.minX),a.currentY=Math.max(Math.min(a.currentY,a.maxY),a.minY),t.$imageWrapEl.transition(p).transform("translate3d("+a.currentX+"px, "+a.currentY+"px,0)")}},onTransitionEnd:function(){var e=this.zoom,t=e.gesture;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl.transform("translate3d(0,0,0) scale(1)"),t.$imageWrapEl.transform("translate3d(0,
82800,0)"),t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0,e.scale=1,e.currentScale=1)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,a,i,s,r,n,o,l,d,p,c,u,h,v,f,m,g=this,b=g.zoom,w=g.params.zoom,y=b.gesture,x=b.image;(y.$slideEl||(y.$slideEl=g.clickedSlide?L(g.clickedSlide):g.slides.eq(g.activeIndex),y.$imageEl=y.$slideEl.find("img, svg, canvas"),y.$imageWrapEl=y.$imageEl.parent("."+w.containerClass)),y.$imageEl&&0!==y.$imageEl.length)&&(y.$slideEl.addClass(""+w.zoomedSlideClass),void 0===x.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,a="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=x.touchesStart.x,a=x.touchesStart.y),b.scale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,b.currentScale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(f=y.$slideEl[0].offsetWidth,m=y.$slideEl[0].offsetHeight,i=y.$slideEl.offset().left+f/2-t,s=y.$slideEl.offset().top+m/2-a,o=y.$imageEl[0].offsetWidth,l=y.$imageEl[0].offsetHeight,d=o*b.scale,p=l*b.scale,h=-(c=Math.min(f/2-d/2,0)),v=-(u=Math.min(m/2-p/2,0)),(r=i*b.scale)<c&&(r=c),h<r&&(r=h),(n=s*b.scale)<u&&(n=u),v<n&&(n=v)):n=r=0,y.$imageWrapEl.transition(300).transform("translate3d("+r+"px, "+n+"px,0)"),y.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+b.scale+")"))},out:function(){var e=this,t=e.zoom,a=e.params.zoom,i=t.gesture;i.$slideEl||(i.$slideEl=e.clickedSlide?L(e.clickedSlide):e.slides.eq(e.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas"),i.$imageWrapEl=i.$imageEl.parent("."+a.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(t.scale=1,t.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+a.zoomedSlideClass),i.$slideEl=void 0)},enable:function(){var e=this,t=e.zoom;if(!t.enabled){t.enabled=!0;var a=!("touchstart"!==e.touchEvents.start||!F.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};F.gestures?(e.$wrapperEl.on("gesturestart",".swiper-slide",t.onGestureStart,a),e.$wrapperEl.on("gesturechange",".swiper-slide",t.onGestureChange,a),e.$wrapperEl.on("gestureend",".swiper-slide",t.onGestureEnd,a)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,".swiper-slide",t.onGestureStart,a),e.$wrapperEl.on(e.touchEvents.move,".swiper-slide",t.onGestureChange,a),e.$wrapperEl.on(e.touchEvents.end,".swiper-slide",t.onGestureEnd,a)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){e.zoom.enabled=!1;var a=!("touchstart"!==e.touchEvents.start||!F.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};F.gestures?(e.$wrapperEl.off("gesturestart",".swiper-slide",t.onGestureStart,a),e.$wrapperEl.off("gesturechange",".swiper-slide",t.onGestureChange,a),e.$wrapperEl.off("gestureend",".swiper-slide",t.onGestureEnd,a)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,".swiper-slide",t.onGestureStart,a),e.$wrapperEl.off(e.touchEvents.move,".swiper-slide",t.onGestureChange,a),e.$wrapperEl.off(e.touchEvents.end,".swiper-slide",t.onGestureEnd,a)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)}}},W={loadInSlide:function(e,l){void 0===l&&(l=!0);var d=this,p=d.params.lazy;if(void 0!==e&&0!==d.slides.length){var c=d.virtual&&d.params.virtual.enabled?d.$wrapperEl.children("."+d.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):d.slides.eq(e),t=c.find("."+p.elementClass+":not(."+p.loadedClass+"):not(."+p.loadingClass+")");!c.hasClass(p.elementClass)||c.hasClass(p.loadedClass)||c.hasClass(p.loadingClass)||(t=t.add(c[0])),0!==t.length&&t.each(function(e,t){var i=L(t);i.addClass(p.loadingClass);var s=i.attr("data-background"),r=i.attr("data-src"),n=i.attr("data-srcset"),o=i.attr("data-sizes");d.loadImage(i[0],r||s,n,o,!1,function(){if(null!=d&&d&&(!d||d.params)&&!d.destroyed){if(s?(i.css("background-image",'url("'+s+'")'),i.removeAttr("data-background")):(n&&(i.attr("srcset",n
vendor: 5,169 bytes, line 8280
8280),i.removeAttr("data-srcset")),o&&(i.attr("sizes",o),i.removeAttr("data-sizes")),r&&(i.attr("src",r),i.removeAttr("data-src"))),i.addClass(p.loadedClass).removeClass(p.loadingClass),c.find("."+p.preloaderClass).remove(),d.params.loop&&l){var e=c.attr("data-swiper-slide-index");if(c.hasClass(d.params.slideDuplicateClass)){var t=d.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+d.params.slideDuplicateClass+")");d.lazy.loadInSlide(t.index(),!1)}else{var a=d.$wrapperEl.children("."+d.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');d.lazy.loadInSlide(a.index(),!1)}}d.emit("lazyImageReady",c[0],i[0])}}),d.emit("lazyImageLoad",c[0],i[0])})}},load:function(){var i=this,t=i.$wrapperEl,a=i.params,s=i.slides,e=i.activeIndex,r=i.virtual&&a.virtual.enabled,n=a.lazy,o=a.slidesPerView;function l(e){if(r){if(t.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(s[e])return!0;return!1}function d(e){return r?L(e).attr("data-swiper-slide-index"):L(e).index()}if("auto"===o&&(o=0),i.lazy.initialImageLoaded||(i.lazy.initialImageLoaded=!0),i.params.watchSlidesVisibility)t.children("."+a.slideVisibleClass).each(function(e,t){var a=r?L(t).attr("data-swiper-slide-index"):L(t).index();i.lazy.loadInSlide(a)});else if(1<o)for(var p=e;p<e+o;p+=1)l(p)&&i.lazy.loadInSlide(p);else i.lazy.loadInSlide(e);if(n.loadPrevNext)if(1<o||n.loadPrevNextAmount&&1<n.loadPrevNextAmount){for(var c=n.loadPrevNextAmount,u=o,h=Math.min(e+u+Math.max(c,u),s.length),v=Math.max(e-Math.max(u,c),0),f=e+o;f<h;f+=1)l(f)&&i.lazy.loadInSlide(f);for(var m=v;m<e;m+=1)l(m)&&i.lazy.loadInSlide(m)}else{var g=t.children("."+a.slideNextClass);0<g.length&&i.lazy.loadInSlide(d(g));var b=t.children("."+a.slidePrevClass);0<b.length&&i.lazy.loadInSlide(d(b))}}},j={LinearSpline:function(e,t){var a,i,s,r,n,o=function(e,t){for(i=-1,a=e.length;1<a-i;)e[s=a+i>>1]<=t?i=s:a=s;return a};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=o(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new j.LinearSpline(t.slidesGrid,e.slidesGrid):new j.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var a,i,s=this,r=s.controller.control;function n(e){var t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&&(s.controller.getInterpolateFunction(e),i=-s.controller.spline.interpolate(-t)),i&&"container"!==s.params.controller.by||(a=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),i=(t-s.minTranslate())*a+e.minTranslate()),s.params.controller.inverse&&(i=e.maxTranslate()-i),e.updateProgress(i),e.setTranslate(i,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o<r.length;o+=1)r[o]!==t&&r[o]instanceof S&&n(r[o]);else r instanceof S&&t!==r&&n(r)},setTransition:function(t,e){var a,i=this,s=i.controller.control;function r(e){e.setTransition(t,i),0!==t&&(e.transitionStart(),e.params.autoHeight&&V.nextTick(function(){e.updateAutoHeight()}),e.$wrapperEl.transitionEnd(function(){s&&(e.params.loop&&"slide"===i.params.controller.by&&e.loopFix(),e.transitionEnd())}))}if(Array.isArray(s))for(a=0;a<s.length;a+=1)s[a]!==e&&s[a]instanceof S&&r(s[a]);else s instanceof S&&e!==s&&r(s)}},U={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},addElRole:function(e,t){return e.attr("role",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){var t=this,a=t.params.a11y;if(13===e.keyCode){var i=L(e.target);t.navigation&&t.navigation.$nextEl&&i.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(a.lastSlideMessage):t.a11y.notify(a.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&i.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(a.firstSlideMessage):t.a11y.notify(a.prevSlideMessage)),t.pagination&&i.is("."+t.params.pagination.bulletClass)&&i[0].click()}},notify:function(e){var t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation:function(){var e=this;if(!e.params.loop){var t=e.navigation,a=t.$nextEl,i=t.$prevEl;i&&0<i.length&&(e.isBeginning?e.a11y.disableEl(i):e.a11y.enableEl(i)),a&&0<a.length&&(e.isEnd?e.a11y.disableEl(a):e.a11y.enableEl(a))}},updatePagination:function(){var i=this,s=i.params.a11y;i.pagination&&i.params.pagination.clickable&&i.pagination.bullets&&i.pagination.bullets.length&&i.pagination.bullets.each(function(e,t){var a=L(t);i.a11y.makeElFocusable(a),i.a11y.addElRole(a,"button"),i.a11y.addElLabel(a,s.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},init:function(){var e=this;e.$el.append(e.a11y.liveRegion);var t,a,i=e.params.a11y;e.navigation&&e.navigation.$nextEl&&(t=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(a=e.navigation.$prevEl),t&&(e.a11y.makeElFocusable(t),e.a11y.addElRole(t,"button"),e.a11y.addElLabel(t,i.nextSlideMessage),t.on("key
8280down",e.a11y.onEnterKey)),a&&(e.a11y.makeElFocusable(a),e.a11y.addElRole(a,"button"),e.a11y.addElLabel(a,i.prevSlideMessage),a.on("keydown",e.a11y.onEnterKey)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)},destroy:function(){var e,t,a=this;a.a11y.liveRegion&&0<a.a11y.liveRegion.length&&a.a11y.liveRegion.remove(),a.navigation&&a.navigation.$nextEl&&(e=a.navigation.$nextEl),a.navigation&&a.navigation.$prevEl&&(t=a.navigation.$prevEl),e&&e.off("keydown",a.a11y.onEnterKey),t&&t.off("keydown",a.a11y.onEnterKey),a.pagination&&a.params.pagination.clickable&&a.pagination.bullets&&a.pagination.bullets.length&&a.pagination.$el.off("keydown","."+a.params.pagination.bulletClass,a.a11y.onEnterKey)}},K={init:function(){var e=this;if(e.params.history){if(!Y.history||!Y.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var t=e.history;t.initialized=!0,t.paths=K.getPathValues(),(t.paths.key||t.paths.value)&&(t.scrollToSlide(0,t.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||Y.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){this.params.history.replaceState||Y.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=K.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(){var e=Y.location.pathname.slice(1).split("/").filter(function(e){return""!==e}),t=e.length;return{key:e[t-2],value:e[t-1]}},setHistory:function(e,t){if(this.history.initialized&&this.params.history.enabled){var a=this.slides.eq(t),i=K.slugify(a.attr("data-history"));Y.location.pathname.includes(e)||(i=e+"/"+i);var s=Y.history.state;s&&s.value===i||(this.params.history.replaceState?Y.history.replaceState({value:i},null,i):Y.history.pushState({value:i},null,i))}},slugify:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,a){var i=this;if(t)for(var s=0,r=i.slides.length;s<r;s+=1){var n=i.slides.eq(s);if(K.slugify(n.attr("data-history"))===t&&!n.hasClass(i.params.slideDuplicateClass)){var o=n.index();i.slideTo(o,e,a)}}else i.slideTo(0,e,a)}},_={onHashCange:function(){var e=this,t=f.location.hash.replace("#","");if(t!==e.slides.eq(e.activeIndex).attr("data-hash")){var a=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+t+'"]').index();if(void 0===a)return;e.slideTo(a)}},setHash:function(){var e=this;if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&Y.history&&Y.history.replaceState)Y.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||"");else{var t=e.slides.eq(e.activeIndex),a=t.attr("data-hash")||t.attr("data-history");f.location.hash=a||""}},init:function(){var e=this;if(!(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)){e.hashNavigation.initialized=!0;var t=f.location.hash.replace("#","");if(t)for(var a=0,i=e.slides.length;a<i;a+=1){var s=e.slides.eq(a);if((s.attr("data-hash")||s.attr("data-history"))===t&&!s.hasClass(e.params.slideDuplicateClass)){var r=s.index();e.slideTo(r,0,e.params.runCallbacksOnInit,!0)}}e.params.hashNavigation.watchState&&L(Y).on("hashchange",e.hashNavigation.onHashCange)}},destroy:function(){this.params.hashNavigation.watchState&&L(Y).off("hashchange",this.hashNavigation.onHashCange)}},Z={run:function(){var e=this,t=e.slides.eq(e.activeIndex),a=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(a=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),e.autoplay.timeout=V.nextTick(function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,
vendor: 17,719 bytes, line 8280
8280!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay"))},a)},start:function(){var e=this;return void 0===e.autoplay.timeout&&(!e.autoplay.running&&(e.autoplay.running=!0,e.emit("autoplayStart"),e.autoplay.run(),!0))},stop:function(){var e=this;return!!e.autoplay.running&&(void 0!==e.autoplay.timeout&&(e.autoplay.timeout&&(clearTimeout(e.autoplay.timeout),e.autoplay.timeout=void 0),e.autoplay.running=!1,e.emit("autoplayStop"),!0))},pause:function(e){var t=this;t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?(t.$wrapperEl[0].addEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].addEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd)):(t.autoplay.paused=!1,t.autoplay.run())))}},Q={setTranslate:function(){for(var e=this,t=e.slides,a=0;a<t.length;a+=1){var i=e.slides.eq(a),s=-i[0].swiperSlideOffset;e.params.virtualTranslate||(s-=e.translate);var r=0;e.isHorizontal()||(r=s,s=0);var n=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(i[0].progress),0):1+Math.min(Math.max(i[0].progress,-1),0);i.css({opacity:n}).transform("translate3d("+s+"px, "+r+"px, 0px)")}},setTransition:function(e){var a=this,t=a.slides,i=a.$wrapperEl;if(t.transition(e),a.params.virtualTranslate&&0!==e){var s=!1;t.transitionEnd(function(){if(!s&&a&&!a.destroyed){s=!0,a.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t<e.length;t+=1)i.trigger(e[t])}})}}},J={setTranslate:function(){var e,t=this,a=t.$el,i=t.$wrapperEl,s=t.slides,r=t.width,n=t.height,o=t.rtlTranslate,l=t.size,d=t.params.cubeEffect,p=t.isHorizontal(),c=t.virtual&&t.params.virtual.enabled,u=0;d.shadow&&(p?(0===(e=i.find(".swiper-cube-shadow")).length&&(e=L('<div class="swiper-cube-shadow"></div>'),i.append(e)),e.css({height:r+"px"})):0===(e=a.find(".swiper-cube-shadow")).length&&(e=L('<div class="swiper-cube-shadow"></div>'),a.append(e)));for(var h=0;h<s.length;h+=1){var v=s.eq(h),f=h;c&&(f=parseInt(v.attr("data-swiper-slide-index"),10));var m=90*f,g=Math.floor(m/360);o&&(m=-m,g=Math.floor(-m/360));var b=Math.max(Math.min(v[0].progress,1),-1),w=0,y=0,x=0;f%4==0?(w=4*-g*l,x=0):(f-1)%4==0?(w=0,x=4*-g*l):(f-2)%4==0?(w=l+4*g*l,x=l):(f-3)%4==0&&(w=-l,x=3*l+4*l*g),o&&(w=-w),p||(y=w,w=0);var T="rotateX("+(p?0:-m)+"deg) rotateY("+(p?m:0)+"deg) translate3d("+w+"px, "+y+"px, "+x+"px)";if(b<=1&&-1<b&&(u=90*f+90*b,o&&(u=90*-f-90*b)),v.transform(T),d.slideShadows){var E=p?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=p?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===E.length&&(E=L('<div class="swiper-slide-shadow-'+(p?"left":"top")+'"></div>'),v.append(E)),0===S.length&&(S=L('<div class="swiper-slide-shadow-'+(p?"right":"bottom")+'"></div>'),v.append(S)),E.length&&(E[0].style.opacity=Math.max(-b,0)),S.length&&(S[0].style.opacity=Math.max(b,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),d.shadow)if(p)e.transform("translate3d(0px, "+(r/2+d.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+d.shadowScale+")");else{var C=Math.abs(u)-90*Math.floor(Math.abs(u)/90),M=1.5-(Math.sin(2*C*Math.PI/360)/2+Math.cos(2*C*Math.PI/360)/2),k=d.shadowScale,P=d.shadowScale/M,z=d.shadowOffset;e.transform("scale3d("+k+", 1, "+P+") translate3d(0px, "+(n/2+z)+"px, "+-n/2/P+"px) rotateX(-90deg)")}var $=I.isSafari||I.isUiWebView?-l/2:0;i.transform("translate3d(0px,0,"+$+"px) rotateX("+(t.isHorizontal()?0:u)+"deg) rotateY("+(t.isHorizontal()?-u:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},ee={setTranslate:function(){for(var e=this,t=e.slides,a=e.rtlTranslate,i=0;i<t.length;i+=1){var s=t.eq(i),r=s[0].progress;e.params.flipEffect.limitRotation&&(r=Math.max(Math.min(s[0].progress,1),-1));var n=-180*r,o=0,l=-s[0].swiperSlideOffset,d=0;if(e.isHorizontal()?a&&(n=-n):(d=l,o=-n,n=l=0),s[0].style.zIndex=-Math.abs(Math.round(r))+t.length,e.params.flipEffect.slideShadows){var p=e.isHorizontal()?s.find(".swiper-slide-shadow-left"):s.find(".swiper-slide-shadow-top"),c=e.isHorizontal()?s.find(".swiper-slide-shadow-right"):s.find(".swiper-slide-shadow-bottom");0===p.length&&(p=L('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"></div>'),s.append(p)),0===c.length&&(c=L('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"></div>'),s.append(c)),p.length&&(p[0].style.opacity=Math.max(-r,0)),c.length&&(c[0].style.opacity=Math.max(r,0))}s.transform("translate3d("+l+"px, "+d+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(e){var a=this,t=a.slides,i=a.activeIndex,s=a.$wrapperEl;if(t.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),a.params.virtualTranslate&&0!==e){var r=!1;t.eq(i).transitionEnd(function(){if(!r&&a&&!a.destroyed){r=!0,a.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t<e.length;t+=1)s.trigger(e[t])}})}}},te={setTranslate:function(){for(var e=this,t=e.width,a=e.height,i=e.slides,s=e.$wrapperEl,r=e.slidesSizesGrid,n=e.params.coverflowEffect,o=e.isHorizontal(),l=e.translate,d=o?t/2-l:a/2-l,p=o?n.rotate:-n.rotate,c=n.depth,u=0,h=i.length;u<h;u+=1){var v=i.eq(u),f=r[u],m=(d-v[0].swiperSlideOffset-f/2)/f*n.modifier,g=o?p*m:0,b=o?0:p*m,w=-c*Math.abs(m),y=o?0:n.stretch*m,x=o?n.stretch*m:0;Math.abs(x)<.001&&(x=0),Math.abs(y)<.001&&(y=0),Math.abs(w)<.001&&(w=0),Math.abs(g)<.001&&(g=0),Math.abs(b)<.001&&(b=0);var T="translate3d("+x+"px,"+y+"px,"+w+"px)  rotateX("+b+"deg) rotateY("+g+"deg)";if(v.transform(T),v[0].style.zIndex=1-Math.abs(Math.round(m)),n.slideShadows){var E=o?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=o?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===E.length&&(E=L('<div class="swiper-slide-shadow-'+(o?"left":"top")+'"></div>'),v.append(E)),0===S.length&&(S=L('<div class="swiper-slide-shadow-'+(o?"right":"bottom")+'"></div>'),v.append(S)),E.length&&(E[0].style.opacity=0<m?m:0),S.length&&(S[0].style.opacity=0<-m?-m:0)}}(F.pointerEvents||F.prefixedPointerEvents)&&(s[0].style.perspectiveOrigin=d+"px 50%")},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},ae={init:function(){var e=this,t=e.params.thumbs,a=e.constructor;t.swiper instanceof a?(e.thumbs.swiper=t.swiper,V.extend(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),V.extend(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):V.isObject(t.swiper)&&(e.thumbs.swiper=new a(V.extend({},t.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick)},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var a=t.clickedIndex,i=t.clickedSlide;if(!(i&&L(i).hasClass(e.params.thumbs.slideThumbActiveClass)||null==a)){var s;if(s=t.params.loop?parseInt(L(t.clickedSlide).attr("data-swiper-slide-index"),10):a,e.params.loop){var r=e.activeIndex;e.slides.eq(r).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,r=e.activeIndex);var n=e.slides.eq(r).prevAll('[data-swiper-slide-index="'+s+'"]').eq(0).index(),o=e.slides.eq(r).nextAll('[data-swiper-slide-index="'+s+'"]').eq(0).index();s=void 0===n?o:void 0===o?n:o-r<r-n?o:n}e.slideTo(s)}}},update:function(e){var t=this,a=t.thumbs.swiper;if(a){var i="auto"===a.params.slidesPerView?a.slidesPerViewDynamic():a.params.slidesPerView;if(t.realIndex!==a.realIndex){var s,r=a.activeIndex;if(a.params.loop){a.slides.eq(r).hasClass(a.params.slideDuplicateClass)&&(a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft,r=a.activeIndex);var n=a.slides.eq(r).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),o=a.slides.eq(r).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index();s=void 0===n?o:void 0===o?n:o-r==r-n?r:o-r<r-n?o:n}else s=t.realIndex;a.visibleSlidesIndexes.indexOf(s)<0&&(a.params.centeredSlides?s=r<s?s-Math.floor(i/2)+1:s+Math.floor(i/2)-1:r<s&&(s=s-i+1),a.slideTo(s,e?0:void 0))}var l=1,d=t.params.thumbs.slideThumbActiveClass;if(1<t.params.slidesPerView&&!t.params.centeredSlides&&(l=t.params.slidesPerView),a.slides.removeClass(d),a.params.loop)for(var p=0;p<l;p+=1)a.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+p)+'"]').addClass(d);else for(var c=0;c<l;c+=1)a.slides.eq(t.realIndex+c).addClass(d)}}},ie=[C,M,k,P,$,O,N,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){var e=this;V.extend(e,{mousewheel:{enabled:!1,enable:H.enable.bind(e),disable:H.disable.bind(e),handle:H.handle.bind(e),handleMouseEnter:H.handleMouseEnter.bind(e),handleMouseLeave:H.handleMouseLeave.bind(e),lastScrollTime:V.now()}})},on:{init:function(){this.params.mousewheel.enabled&&this.mousewheel.enable()},destroy:function(){this.mousewheel.enabled&&this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){var e=this;V.extend(e,{navigation:{init:G.init.bind(e),update:G.update.bind(e),destroy:G.destroy.bind(e),onNextClick:G.onNextClick.bind(e),onPrevClick:G.onPrevClick.bind(e)}})},on:{init:function(){this.navigation.init(),this.navigation.update()},toEdge:function(){this.navigation.update()},fromEdge:function(){this.navigation.update()},destroy:function(){this.navigation.destroy()},click:function(e){var t=this.navigation,a=t.$nextEl,i=t.$prevEl;!this.params.navigation.hideOnClick||L(e.target).is(i)||L(e.target).is(a)||(a&&a.toggleClass(this.params.navigation.hiddenClass),i&&i.toggleClass(this.params.navigation.hiddenClass))}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},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(){var e=this;V.extend(e,{pagination:{init:B.init.bind(e),render:B.render.bind(e),update:B.update.bind(e),destroy:B.destroy.bind(e),dynamicBulletIndex:0}})},on:{init:function(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange:function(){this.params.loop?this.pagination.update():void 0===this.snapIndex&&this.pagination.update()},snapIndexChange:function(){this.params.loop||this.pagination.update()},slidesLengthChange:function(){this.params.loop&&(this.pagination.render(),this.pagination.update())},snapGridLengthChange:function(){this.params.loop||(this.pagination.render(),this.pagination.update())},destroy:function(){this.pagination.destroy()},click:function(e){var t=this;t.params.pagination.el&&t.params.pagination.hideOnClick&&0<t.pagination.$el.length&&!L(e.target).hasClass(t.params.pagination.bulletClass)&&t.pagination.$el.toggleClass(t.params.pagination.hiddenClass)}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){var e=this;V.extend(e,{scrollbar:{init:X.init.bind(e),destroy:X.destroy.bind(e),updateSize:X.updateSize.bind(e),setTranslate:X.setTranslate.bind(e),setTransition:X.setTransition.bind(e),enableDraggable:X.enableDraggable.bind(e),disableDraggable:X.disableDraggable.bind(e),setDragPosition:X.setDragPosition.bind(e),onDragStart:X.onDragStart.bind(e),onDragMove:X.onDragMove.bind(e),onDragEnd:X.onDragEnd.bind(e),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update:function(){this.scrollbar.updateSize()},resize:function(){this.scrollbar.updateSize()},observerUpdate:function(){this.scrollbar.updateSize()},setTranslate:function(){this.scrollbar.setTranslate()},setTransition:function(e){this.scrollbar.setTransition(e)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){V.extend(this,{parallax:{setTransform:R.setTransform.bind(this),setTranslate:R.setTranslate.bind(this),setTransition:R.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},init:function(){this.params.parallax&&this.parallax.setTranslate()},setTranslate:function(){this.params.parallax&&this.parallax.setTranslate()},setTransition:function(e){this.params.parallax&&this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var t=this,a={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach(function(e){a[e]=q[e].bind(t)}),V.extend(t,{zoom:a})},on:{init:function(){this.params.zoom.enabled&&this.zoom.enable()},destroy:function(){this.zoom.disable()},touchStart:function(e){this.zoom.enabled&&this.zoom.onTouchStart(e)},touchEnd:function(e){this.zoom.enabled&&this.zoom.onTouchEnd(e)},doubleTap:function(e){this.params.zoom.enabled&&this.zoom.enabled&&this.params.zoom.toggle&&this.zoom.toggle(e)},transitionEnd:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){V.extend(this,{lazy:{initialImageLoaded:!1,load:W.load.bind(this),loadInSlide:W.loadInSlide.bind(this)}})},on:{beforeInit:function(){this.params.lazy.enabled&&this.params.preloadImages&&(this.params.preloadImages=!1)},init:function(){this.params.lazy.enabled&&!this.params.loop&&0===this.params.initialSlide&&this.lazy.load()},scroll:function(){this.params.freeMode&&!this.params.freeModeSticky&&this.lazy.load()},resize:function(){this.params.lazy.enabled&&this.lazy.load()},scrollbarDragMove:function(){this.params.lazy.enabled&&this.lazy.load()},transitionStart:function(){var e=this;e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd:function(){this.params.lazy.enabled&&!this.params.lazy.loadOnTransitionStart&&this.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){var e=this;V.extend(e,{controller:{control:e.params.controller.control,getInterpolateFunction:j.getInterpolateFunction.bind(e),setTranslate:j.setTranslate.bind(e),setTransition:j.setTransition.bind(e)}})},on:{update:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},resize:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},observerUpdate:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},setTranslate:function(e,t){this.controller.control&&this.controller.setTranslate(e,t)},setTransition:function(e,t){this.controller.control&&this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,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}}"}},create:function(){var t=this;V.extend(t,{a11y:{liveRegion:L('<span class="'+t.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')}}
8280),Object.keys(U).forEach(function(e){t.a11y[e]=U[e].bind(t)})},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){var e=this;V.extend(e,{history:{init:K.init.bind(e),setHistory:K.setHistory.bind(e),setHistoryPopState:K.setHistoryPopState.bind(e),scrollToSlide:K.scrollToSlide.bind(e),destroy:K.destroy.bind(e)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionEnd:function(){this.history.initialized&&this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){var e=this;V.extend(e,{hashNavigation:{initialized:!1,init:_.init.bind(e),destroy:_.destroy.bind(e),setHash:_.setHash.bind(e),onHashCange:_.onHashCange.bind(e)}})},on:{init:function(){this.params.hashNavigation.enabled&&this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&&this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&&this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var t=this;V.extend(t,{autoplay:{running:!1,paused:!1,run:Z.run.bind(t),start:Z.start.bind(t),stop:Z.stop.bind(t),pause:Z.pause.bind(t),onTransitionEnd:function(e){t&&!t.destroyed&&t.$wrapperEl&&e.target===this&&(t.$wrapperEl[0].removeEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].removeEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&this.autoplay.start()},beforeTransitionStart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},destroy:function(){this.autoplay.running&&this.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){V.extend(this,{fadeEffect:{setTranslate:Q.setTranslate.bind(this),setTransition:Q.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};V.extend(e.params,t),V.extend(e.originalParams,t)}},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){V.extend(this,{cubeEffect:{setTranslate:J.setTranslate.bind(this),setTransition:J.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};V.extend(e.params,t),V.extend(e.originalParams,t)}},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){V.extend(this,{flipEffect:{setTranslate:ee.setTranslate.bind(this),setTransition:ee.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};V.extend(e.params,t),V.extend(e.originalParams,t)}},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){V.extend(this,{coverflowEffect:{setTranslate:te.setTranslate.bind(this),setTransition:te.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){V.extend(this,{thumbs:{swiper:null,init:ae.init.bind(this),update:ae.update.bind(this),onThumbClick:ae.onThumbClick.bind(this)}})},on:{beforeInit:function(){var e=this.params.thumbs;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate:function(){this.thumbs.swiper&&this.thumbs.update()},setTransition:function(e){var t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];return void 0===S.use&&(S.use=S.Class.use,S.installModule=S.Class.installModule),S.use(ie),S});
8281/* End */
8282;
8283; /* Start:"a:4:{s:4:"full";s:53:"/simai/asset/simai.special/js/voice.js?16484588042800";s:6:"source";s:38:"/simai/asset/simai.special/js/voice.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
8284"use strict";
8285
8286/* вызов события при выделении текста */
8287
8288var speakText = function(event) {
8289  // поиск всех кнопок с классом voice на странице
8290  var isButton = document.getElementsByClassName("voice");
8291 
8292  /* получаем выделенный текст  */
8293  var selObj = window.getSelection();
8294  var utterance = new SpeechSynthesisUtterance(selObj);
8295  utterance.lang = "ru-RU";
8296
8297  /* создание кнопки на странице  */
8298  var addButton = document.createElement("button");
8299  var icon = document.createElement("i");
8300  var tag = event.target.tagName;
8301
8302  /* кнопка для прекращения озвучивания текста */
8303  const stopSpeakButton = document.querySelector(".stopSpeak");
8304
8305  /* если выделен текст и нету  кнопки */
8306  if (selObj.toString().length > 2 && !(tag === "BUTTON" || tag === "svg" || tag === "path") && isButton.length < 1) {
8307    /* кнопка для чтения */
8308    addButton.className = "voice";
8309    icon.className = "fas fa-volume-up";
8310    stopSpeakButton.addEventListener("click", function () {
8311      speechSynthesis.pause();
8312      stopSpeakButton.style.display = "none";
8313      addButton.style.display = "block";
8314    });
8315
8316    /* получаем позицию, где произошел клик */
8317    addButton.style.top = event.pageY + 60 + 'px';
8318    addButton.style.left = event.pageX - 20 + 'px';
8319
8320    /* добавление кнопки в DOM-дерево */
8321    document.body.appendChild(addButton);
8322    addButton.appendChild(icon);
8323
8324    /* событие на кнопке */
8325    addButton.addEventListener("click", function () {
8326      /* озвучиваем выделенный текст */
8327      speechSynthesis.resume();
8328      speechSynthesis.speak(utterance);
8329      /* скрываем кнопку воспроизведения */
8330      addButton.style.display = "none";
8331
8332      /* Показываем кнопку прекращения озвучки */
8333      stopSpeakButton.style.display = "block";
8334      stopSpeakButton.style.top = event.pageY + 60 + 'px';
8335      stopSpeakButton.style.left = event.pageX - 20 + 'px';
8336    });
8337
8338  } else if (selObj.toString().length < 2)  {
8339    /* Удаление кнопки  */
8340    for (var i = 0; i < isButton.length; i++) {
8341      document.body.removeChild(isButton[i]);
8342    }
8343    stopSpeakButton.style.display = "none";
8344    /* Остановить чтение текста */
8345    selObj = "";
8346    speechSynthesis.cancel();
8347  }
8348};
8349
8350if (navigator.userAgent.search(/MSIE/) > 0 || navigator.userAgent.search(/NET CLR /) > 0) {
8351  console.log("Internet Explorer не поддерживает чтение текста!");
8352} else {
8353  document.addEventListener("click", speakText);
8354}
8355
8356/* End */
8357;
8358; /* Start:"a:4:{s:4:"full";s:75:"/ru/simai.data/grid/block/header/translate.yandex/script.js?164845880313414";s:6:"source";s:59:"/ru/simai.data/grid/block/header/translate.yandex/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
8359;(function (win, doc, nav, params, namespace, undefined) {
8360    'use strict';
8361
8362    var util = {
8363        keycode: {
8364            ESCAPE: 27
8365        },
8366        getRequest: function () {
8367            if (win.XDomainRequest) {
8368                return new win.XDomainRequest();
8369            }
8370            if (win.XMLHttpRequest) {
8371                return new win.XMLHttpRequest();
8372            }
8373            return null;
8374        },
8375        loadScript: function (src, parent, callback) {
8376            var script = doc.createElement('script');
8377            script.src = src;
8378
8379            script.addEventListener('load', function onLoad() {
8380                this.removeEventListener('load', onLoad, false);
8381                callback();
8382            }, false);
8383
8384            parent.appendChild(script);
8385        },
8386        loadResource: function (url, callback) {
8387            var request = this.getRequest();
8388
8389            if (!request) {
8390                return null;
8391            }
8392
8393            request.onload = function () {
8394                callback(this.responseText);
8395            };
8396            request.open('GET', url, true);
8397
8398            win.setTimeout(function () {
8399                request.send();
8400            }, 0);
8401
8402            return request;
8403        },
8404        getStyleList: function (element) {
8405            var value = element.getAttribute('class');
8406            if (!value) {
8407                return [];
8408            }
8409            return value.replace(/\s+/g, ' ').trim().split(' ');
8410        },
8411        hasStyleName: function (element, name) {
8412            var list = this.getStyleList(element);
8413            return !!list.length && list.indexOf(name) >= 0;
8414        },
8415        addStyleName: function (element, name) {
8416            var list = this.getStyleList(element);
8417            list.push(name);
8418            element.setAttribute('class', list.join(' '));
8419        },
8420        removeStyleName: function (element, name) {
8421            var list = this.getStyleList(element), index = list.indexOf(name);
8422            if (index >= 0) {
8423                list.splice(index, 1);
8424                element.setAttribute('class', list.join(' '));
8425            }
8426        },
8427        isSupportedBrowser: function () {
8428            return 'localStorage' in win &&
8429                   'querySelector' in doc &&
8430                   'addEventListener' in win &&
8431                   'getComputedStyle' in win && doc.compatMode === 'CSS1Compat';
8432        }
8433    };
8434
8435    params.widgetId = "sfWidget";
8436    params.pageLang = "ru";
8437    params.widgetTheme = "dark";
8438    params.autoMode = false;
8439
8440    // Button
8441
8442    var Button = function Button(element, contentElement) {
8443        var self = this;
8444
8445        element.addEventListener('click', function (event) {
8446            self.onClick(event);
8447        }, false);
8448
8449        this._element = element;
8450        this._contentElement = contentElement || this._element;
8451    };
8452
8453    Button.prototype.onClick = function () {};
8454
8455    Button.prototype.setText = function (text) {
8456        this._contentElement.textContent = text;
8457        return this;
8458    };
8459
8460    // Select
8461
8462    var Select = function Select(form, itemName) {
8463        var self = this;
8464
8465        form.reset();
8466
8467        form.addEventListener('click', function (event) {
8468            var target = event.target;
8469            if ('value' in target) {
8470                self.onSelect(target.getAttribute('sf-lang'));
8471            }
8472        }, false);
8473
8474        form.addEventListener('change', function (event) {
8475            var target = event.target;
8476            if (target.checked) {
8477                self.onChange(target.getAttribute('sf-lang'));
8478            }
8479        }, false);
8480
8481        this._form = form;
8482        this._itemName = itemName;
8483    };
8484
8485    Select.prototype.onSelect = function () {};
8486
8487    Select.prototype.onChange = function () {};
8488
8489    Select.prototype.isHidden = function () {
8490        return this._form.hasAttribute('hidden');
8491    };
8492
8493    Select.prototype.getItems = function () {
8494        return this._form[this._itemName] || [];
8495    };
8496
8497    Select.prototype.getValue = function () {
8498        var i, n, items = this.getItems();
8499        for (i = 0, n = items.length; i < n; i++) {
8500            if (items[i].checked) {
8501                return items[i].value;
8502            }
8503        }
8504        return '';
8505    };
8506
8507    Select.prototype.setValue = function (value) {
8508        var i, n, items = this.getItems();
8509        if (value === this.getValue()) {
8510            return this;
8511        }
8512        for (i = 0, n = items.length; i < n; i++) {
8513            if (items[i].value === value) {
8514                items[i].checked = true;
8515                this.onChange(value);
8516                break;
8517            }
8518        }
8519        return this;
8520    };
8521
8522    Select.prototype.setHidden = function (hidden) {
8523        hidden = !!hidden;
8524        if (hidden !== this.isHidden()) {
8525            this._form[(hidden ? 'set' : 'remove') + 'Attribute']('hidden', '');
8526            this.onHiddenChange(hidden);
8527        }
8528        return this;
8529    };
8530
8531    Select.prototype.onHiddenChange = function () {};
8532
8533    // Widget
8534
8535    var Widget = function Widget(options) {
8536        var self = this,
8537            active,
8538            select = options.select,
8539            element = options.element,
8540            storage = options.storage,
8541            autoMode = options.autoMode,
8542            pageLang = options.pageLang,
8543            userLang = options.userLang,
8544            translator = options.translator,
8545            leftButton = options.leftButton,
8546            rightButton = options.rightButton,
8547            closeButton = options.closeButton,
8548            defaultLang;
8549
8550        this._element = element;
8551        this._pageLang = pageLang;
8552        this._translator = translator;
8553
8554        this.onStateChange = function (name, enable) {
8555            if (name === 'active') {
8556                storage.setValue('active', enable);
8557            }
8558        };
8559
8560        select.onSelect = function (lang) {
8561            this.setHidden(true);
8562            self.translate(lang);
8563        };
8564
8565        select.onChange = function (lang) {
8566            storage.setValue('lang', lang);
8567            rightButton.setText(lang);
8568            self.setState('invalid', lang === pageLang);
8569        };
8570
8571        select.onHiddenChange = function (hidden) {
8572            var docElem = doc.documentElement, formRect;
8573            self.setState('expanded', !hidden);
8574            if (!hidden) {
8575                self.setState('right', false)
8576                    .setState('bottom', false);
8577                element.focus();
8578                formRect = this._form.getBoundingClientRect();
8579
8580                if (formRect.right + (win.pageXOffset || docElem.scrollLeft) + 1 >= Math.max(docElem.clientWidth, docElem.scrollWidth)) {
8581                    self.setState('right', true);
8582                }
8583
8584                if (formRect.bottom + (win.pageYOffset || docElem.scrollTop) + 1 >= Math.max(docElem.clientHeight, docElem.scrollHeight)) {
8585                    self.setState('bottom', true);
8586                }
8587            }
8588        };
8589
8590        element.addEventListener('blur', function () {
8591            select.setHidden(true);
8592        }, false);
8593
8594        element.addEventListener('keydown', function (event) {
8595            switch (event.keyCode) {
8596                case util.keycode.ESCAPE:
8597                    select.setHidden(true);
8598                    break;
8599            }
8600        }, false);
8601
8602        translator.on('error', function () {
8603            this.abort();
8604            self.setState('busy', false)
8605                .setState('error', true);
8606        });
8607
8608        translator.on('progress', function (progress) {
8609            switch (progress) {
8610                case 0:
8611                    self.setState('busy', true)
8612                        .setState('active', true);
8613                    break;
8614
8615                case 100:
8616                    self.setState('done', true)
8617                        .setState('busy', false);
8618                    break;
8619            }
8620        });
8621
8622        leftButton.onClick = function () {
8623            select.setHidden(true);
8624            self.translate(select.getValue());
8625        };
8626
8627        rightButton.onClick = function () {
8628            if (self.hasState('active')) {
8629                translator.undo();
8630                self.setState('busy', false)
8631                    .setState('done', false)
8632                    .setState('error', false)
8633                    .setState('active', false);
8634                    this.setText(userLang);
8635                    select.setValue(userLang)
8636            } else {
8637                select.setHidden(!select.isHidden());
8638            }
8639        };
8640
8641        closeButton.onClick = function () {
8642            select.setHidden(true);
8643        };
8644
8645        defaultLang = storage.getValue('lang') || userLang;
8646
8647        if (defaultLang) {
8648            select.setValue(defaultLang);
8649            active = storage.getValue('active');
8650            if (active || (autoMode && active === undefined)) {
8651                this.translate(defaultLang);
8652            }
8653        }
8654    };
8655
8656    Widget.prototype.hasState = function (name) {
8657        return util.hasStyleName(this._element, '__' + name);
8658    };
8659
8660    Widget.prototype.setState = function (name, enable) {
8661        var hasState = this.hasState(name);
8662        enable = !!enable;
8663        if (enable === hasState) {
8664            return this;
8665        }
8666        util[(enable ? 'add' : 'remove') + 'StyleName'](
8667            this._element, '__' + name
8668        );
8669        this.onStateChange(name, enable);
8670        return this;
8671    };
8672
8673    Widget.prototype.translate = function (targetLang) {
8674        if (targetLang && !this.hasState('active')) {
8675            this._translator.translate(this._pageLang, targetLang);
8676        }
8677        return this;
8678    };
8679
8680    Widget.prototype.onStateChange = function () {};
8681
8682    // Storage
8683
8684    var Storage = function Storage(name) {
8685        this._name = name;
8686        try {
8687            this._data = win.JSON.parse(win.localStorage[name]);
8688        } catch (error) {
8689            this._data = {};
8690        }
8691    };
8692
8693    Storage.prototype.getValue = function (prop) {
8694        return this._data[prop];
8695    };
8696
8697    Storage.prototype.setValue = function (prop, value) {
8698        this._data[prop] = value;
8699        try {
8700            win.localStorage[this._name] = win.JSON.stringify(this._data);
8701        } catch (error) {}
8702    };
8703
8704    var wrapper = document.querySelector('#'+params.widgetId);
8705
8706    if (!util.isSupportedBrowser()) {
8707        return false;
8708    }
8709
8710    //var scr_r = document.currentScript;
8711    //scr_r.src
8712    //console.log(wrapper.getAttribute("sf-tmp-translate"))
8713    /*patch_s = patch_s.split('/script.js')[0];
8714    patch_s += "/";*/
8715
8716    
8717
8718    var initWidget = function() {
8719        var wrapper = document.querySelector('#'+params.widgetId);
8720        var patch_s = wrapper.getAttribute("sf-tmp-translate");
8721        util.loadScript('https://yastatic.net/s3/translate/v19.3.6/js/tr_page.js',wrapper, function () {
8722            util.loadResource(patch_s + 'yandex.php',
8723                function (responseText) {
8724                    var element;
8725
8726                    if (!responseText) {
8727                        return;
8728                    }
8729
8730                    wrapper.innerHTML = responseText;
8731                    element = wrapper.querySelector('.__translate');
8732                    if (params.widgetTheme) {
8733                        element.setAttribute('data-theme', params.widgetTheme);
8734                    }
8735
8736                    new Widget({
8737                        select: new Select(element.querySelector('.__lang'), 'yt-lang'),
8738                        element: element,
8739                        storage: new Storage('__translate'),
8740                        autoMode: params.autoMode === 'true',
8741                        pageLang: params.pageLang,
8742                        userLang: (nav.language || nav.userLanguage || '').split('-')[0],
8743                        translator: new namespace.PageTranslator({
8744                            srv: 'tr-url-widget',
8745                            sid: 'f4444017.5c9f6bad.c12b78e5',
8746                            url: 'https://translate.yandex.net/api/v1/tr.json/translate',
8747                            autoSync: true,
8748                            maxPortionLength: 600
8749                        }),
8750                        leftButton: new Button(element.querySelector('.__left')),
8751                        rightButton: new Button(
8752                            element.querySelector('.__right'),
8753                            element.querySelector('.__right > .__text')
8754                        ),
8755                        closeButton: new Button(element.querySelector('.__close'))
8756                    });
8757                }
8758            );
8759        });
8760    };
8761
8762    if (doc.readyState === 'complete' || doc.readyState === 'interactive') {
8763       initWidget();
8764    } else {
8765        window.addEventListener('DOMContentLoaded', function(e) {
8766            initWidget()
8767        });
8768    }
8769    
8770})(this, this.document, this.navigator, {"widgetId":"","pageLang":"","autoMode":"","widgetTheme":""}, this.yt = this.yt || {});
8771/* End */
8772;
8773; /* Start:"a:4:{s:4:"full";s:63:"/bitrix/components/bitrix/search.title/script.js?16484589029847";s:6:"source";s:48:"/bitrix/components/bitrix/search.title/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
8774function JCTitleSearch(arParams)
8775{
8776	var _this = this;
8777
8778	this.arParams = {
8779		'AJAX_PAGE': arParams.AJAX_PAGE,
8780		'CONTAINER_ID': arParams.CONTAINER_ID,
8781		'INPUT_ID': arParams.INPUT_ID,
8782		'MIN_QUERY_LEN': parseInt(arParams.MIN_QUERY_LEN)
8783	};
8784	if(arParams.WAIT_IMAGE)
8785		this.arParams.WAIT_IMAGE = arParams.WAIT_IMAGE;
8786	if(arParams.MIN_QUERY_LEN <= 0)
8787		arParams.MIN_QUERY_LEN = 1;
8788
8789	this.cache = [];
8790	this.cache_key = null;
8791
8792	this.startText = '';
8793	this.running = false;
8794	this.runningCall = false;
8795	this.currentRow = -1;
8796	this.RESULT = null;
8797	this.CONTAINER = null;
8798	this.INPUT = null;
8799	this.WAIT = null;
8800
8801	this.ShowResult = function(result)
8802	{
8803		if(BX.type.isString(result))
8804		{
8805			_this.RESULT.innerHTML = result;
8806		}
8807
8808		_this.RESULT.style.display = _this.RESULT.innerHTML !== '' ? 'block' : 'none';
8809		var pos = _this.adjustResultNode();
8810
8811		//adjust left column to be an outline
8812		var res_pos;
8813		var th;
8814		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
8815		if(tbl)
8816		{
8817			th = BX.findChild(tbl, {'tag':'th'}, true);
8818		}
8819
8820		if(th)
8821		{
8822			var tbl_pos = BX.pos(tbl);
8823			tbl_pos.width = tbl_pos.right - tbl_pos.left;
8824
8825			var th_pos = BX.pos(th);
8826			th_pos.width = th_pos.right - th_pos.left;
8827			th.style.width = th_pos.width + 'px';
8828
8829			_this.RESULT.style.width = (pos.width + th_pos.width) + 'px';
8830
8831			//Move table to left by width of the first column
8832			_this.RESULT.style.left = (pos.left - th_pos.width - 1)+ 'px';
8833
8834			//Shrink table when it's too wide
8835			if((tbl_pos.width - th_pos.width) > pos.width)
8836				_this.RESULT.style.width = (pos.width + th_pos.width -1) + 'px';
8837
8838			//Check if table is too wide and shrink result div to it's width
8839			tbl_pos = BX.pos(tbl);
8840			res_pos = BX.pos(_this.RESULT);
8841			if(res_pos.right > tbl_pos.right)
8842			{
8843				_this.RESULT.style.width = (tbl_pos.right - tbl_pos.left) + 'px';
8844			}
8845		}
8846
8847		var fade;
8848		if(tbl) fade = BX.findChild(_this.RESULT, {'class':'title-search-fader'}, true);
8849		if(fade && th)
8850		{
8851			res_pos = BX.pos(_this.RESULT);
8852			fade.style.left = (res_pos.right - res_pos.left - 18) + 'px';
8853			fade.style.width = 18 + 'px';
8854			fade.style.top = 0 + 'px';
8855			fade.style.height = (res_pos.bottom - res_pos.top) + 'px';
8856			fade.style.display = 'block';
8857		}
8858	};
8859
8860	this.onKeyPress = function(keyCode)
8861	{
8862		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
8863		if(!tbl)
8864			return false;
8865
8866		var i;
8867		var cnt = tbl.rows.length;
8868
8869		switch (keyCode)
8870		{
8871		case 27: // escape key - close search div
8872			_this.RESULT.style.display = 'none';
8873			_this.currentRow = -1;
8874			_this.UnSelectAll();
8875		return true;
8876
8877		case 40: // down key - navigate down on search results
8878			if(_this.RESULT.style.display == 'none')
8879				_this.RESULT.style.display = 'block';
8880
8881			var first = -1;
8882			for(i = 0; i < cnt; i++)
8883			{
8884				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
8885				{
8886					if(first == -1)
8887						first = i;
8888
8889					if(_this.currentRow < i)
8890					{
8891						_this.currentRow = i;
8892						break;
8893					}
8894					else if(tbl.rows[i].className == 'title-search-selected')
8895					{
8896						tbl.rows[i].className = '';
8897					}
8898				}
8899			}
8900
8901			if(i == cnt && _this.currentRow != i)
8902				_this.currentRow = first;
8903
8904			tbl.rows[_this.currentRow].className = 'title-search-selected';
8905		return true;
8906
8907		case 38: // up key - navigate up on search results
8908			if(_this.RESULT.style.display == 'none')
8909				_this.RESULT.style.display = 'block';
8910
8911			var last = -1;
8912			for(i = cnt-1; i >= 0; i--)
8913			{
8914				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
8915				{
8916					if(last == -1)
8917						last = i;
8918
8919					if(_this.currentRow > i)
8920					{
8921						_this.currentRow = i;
8922						break;
8923					}
8924					else if(tbl.rows[i].className == 'title-search-selected')
8925					{
8926						tbl.rows[i].className = '';
8927					}
8928				}
8929			}
8930
8931			if(i < 0 && _this.currentRow != i)
8932				_this.currentRow = last;
8933
8934			tbl.rows[_this.currentRow].className = 'title-search-selected';
8935		return true;
8936
8937		case 13: // enter key - choose current search result
8938			if(_this.RESULT.style.display == 'block')
8939			{
8940				for(i = 0; i < cnt; i++)
8941				{
8942					if(_this.currentRow == i)
8943					{
8944						if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
8945						{
8946							var a = BX.findChild(tbl.rows[i], {'tag':'a'}, true);
8947							if(a)
8948							{
8949								window.location = a.href;
8950								return true;
8951							}
8952						}
8953					}
8954				}
8955			}
8956		return false;
8957		}
8958
8959		return false;
8960	};
8961
8962	this.onTimeout = function()
8963	{
8964		_this.onChange(function(){
8965			setTimeout(_this.onTimeout, 500);
8966		});
8967	};
8968
8969	this.onChange = function(callback)
8970	{
8971		if (_this.running)
8972		{
8973			_this.runningCall = true;
8974			return;
8975		}
8976		_this.running = true;
8977
8978		if(_this.INPUT.value != _this.oldValue && _this.INPUT.value != _this.startText)
8979		{
8980			_this.oldValue = _this.INPUT.value;
8981			if(_this.INPUT.value.length >= _this.arParams.MIN_QUERY_LEN)
8982			{
8983				_this.cache_key = _this.arParams.INPUT_ID + '|' + _this.INPUT.value;
8984				if(_this.cache[_this.cache_key] == null)
8985				{
8986					if(_this.WAIT)
8987					{
8988						var pos = BX.pos(_this.INPUT);
8989						var height = (pos.bottom - pos.top)-2;
8990						_this.WAIT.style.top = (pos.top+1) + 'px';
8991						_this.WAIT.style.height = height + 'px';
8992						_this.WAIT.style.width = height + 'px';
8993						_this.WAIT.style.left = (pos.right - height + 2) + 'px';
8994						_this.WAIT.style.display = 'block';
8995					}
8996
8997					BX.ajax.post(
8998						_this.arParams.AJAX_PAGE,
8999						{
9000							'ajax_call':'y',
9001							'INPUT_ID':_this.arParams.INPUT_ID,
9002							'q':_this.INPUT.value,
9003							'l':_this.arParams.MIN_QUERY_LEN
9004						},
9005						function(result)
9006						{
9007							_this.cache[_this.cache_key] = result;
9008							_this.ShowResult(result);
9009							_this.currentRow = -1;
9010							_this.EnableMouseEvents();
9011							if(_this.WAIT)
9012								_this.WAIT.style.display = 'none';
9013							if (!!callback)
9014								callback();
9015							_this.running = false;
9016							if (_this.runningCall)
9017							{
9018								_this.runningCall = false;
9019								_this.onChange();
9020							}
9021						}
9022					);
9023					return;
9024				}
9025				else
9026				{
9027					_this.ShowResult(_this.cache[_this.cache_key]);
9028					_this.currentRow = -1;
9029					_this.EnableMouseEvents();
9030				}
9031			}
9032			else
9033			{
9034				_this.RESULT.style.display = 'none';
9035				_this.currentRow = -1;
9036				_this.UnSelectAll();
9037			}
9038		}
9039		if (!!callback)
9040			callback();
9041		_this.running = false;
9042	};
9043
9044	this.onScroll = function ()
9045	{
9046		if(BX.type.isElementNode(_this.RESULT)
9047			&& _this.RESULT.style.display !== "none"
9048			&& _this.RESULT.innerHTML !== ''
9049		)
9050		{
9051			_this.adjustResultNode();
9052		}
9053	};
9054
9055	this.UnSelectAll = function()
9056	{
9057		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
9058		if(tbl)
9059		{
9060			var cnt = tbl.rows.length;
9061			for(var i = 0; i < cnt; i++)
9062				tbl.rows[i].className = '';
9063		}
9064	};
9065
9066	this.EnableMouseEvents = function()
9067	{
9068		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
9069		if(tbl)
9070		{
9071			var cnt = tbl.rows.length;
9072			for(var i = 0; i < cnt; i++)
9073				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
9074				{
9075					tbl.rows[i].id = 'row_' + i;
9076					tbl.rows[i].onmouseover = function (e) {
9077						if(_this.currentRow != this.id.substr(4))
9078						{
9079							_this.UnSelectAll();
9080							this.className = 'title-search-selected';
9081							_this.currentRow = this.id.substr(4);
9082						}
9083					};
9084					tbl.rows[i].onmouseout = function (e) {
9085						this.className = '';
9086						_this.currentRow = -1;
9087					};
9088				}
9089		}
9090	};
9091
9092	this.onFocusLost = function(hide)
9093	{
9094		setTimeout(function(){_this.RESULT.style.display = 'none';}, 250);
9095	};
9096
9097	this.onFocusGain = function()
9098	{
9099		if(_this.RESULT.innerHTML.length)
9100			_this.ShowResult();
9101	};
9102
9103	this.onKeyDown = function(e)
9104	{
9105		if(!e)
9106			e = window.event;
9107
9108		if (_this.RESULT.style.display == 'block')
9109		{
9110			if(_this.onKeyPress(e.keyCode))
9111				return BX.PreventDefault(e);
9112		}
9113	};
9114
9115	this.adjustResultNode = function()
9116	{
9117		if(!(BX.type.isElementNode(_this.RESULT)
9118			&& BX.type.isElementNode(_this.CONTAINER))
9119		)
9120		{
9121			return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
9122		}
9123
9124		var pos = BX.pos(_this.CONTAINER);
9125
9126		_this.RESULT.style.position = 'absolute';
9127		_this.RESULT.style.top = (pos.bottom + 2) + 'px';
9128		_this.RESULT.style.left = pos.left + 'px';
9129		_this.RESULT.style.width = pos.width + 'px';
9130
9131		return pos;
9132	};
9133
9134	this._onContainerLayoutChange = function()
9135	{
9136		if(BX.type.isElementNode(_this.RESULT)
9137			&& _this.RESULT.style.display !== "none"
9138			&& _this.RESULT.innerHTML !== ''
9139		)
9140		{
9141			_this.adjustResultNode();
9142		}
9143	};
9144	this.Init = function()
9145	{
9146		this.CONTAINER = document.getElementById(this.arParams.CONTAINER_ID);
9147		BX.addCustomEvent(this.CONTAINER, "OnNodeLayoutChange", this._onContainerLayoutChange);
9148
9149		this.RESULT = document.body.appendChild(document.createElement("DIV"));
9150		this.RESULT.className = 'title-search-result';
9151		this.INPUT = document.getElementById(this.arParams.INPUT_ID);
9152		this.startText = this.oldValue = this.INPUT.value;
9153		BX.bind(this.INPUT, 'focus', function() {_this.onFocusGain()});
9154		BX.bind(this.INPUT, 'blur', function() {_this.onFocusLost()});
9155		this.INPUT.onkeydown = this.onKeyDown;
9156
9157		if(this.arParams.WAIT_IMAGE)
9158		{
9159			this.WAIT = document.body.appendChild(document.createElement("DIV"));
9160			this.WAIT.style.backgroundImage = "url('" + this.arParams.WAIT_IMAGE + "')";
9161			if(!BX.browser.IsIE())
9162				this.WAIT.style.backgroundRepeat = 'none';
9163			this.WAIT.style.display = 'none';
9164			this.WAIT.style.position = 'absolute';
9165			this.WAIT.style.zIndex = '1100';
9166		}
9167
9168		BX.bind(this.INPUT, 'bxchange', function() {_this.onChange()});
9169
9170		var fixedParent = BX.findParent(this.CONTAINER, BX.is_fixed);
9171		if(BX.type.isElementNode(fixedParent))
9172		{
9173			BX.bind(window, 'scroll', BX.throttle(this.onScroll, 100, this));
9174		}
9175	};
9176	BX.ready(function (){_this.Init(arParams)});
9177}
9178
9179/* End */
9180;
9181; /* Start:"a:4:{s:4:"full";
9181s:101:"/bitrix/templates/simai.framework/components/bitrix/search.title/nav.search/script.js?164845890011063";s:6:"source";s:85:"/bitrix/templates/simai.framework/components/bitrix/search.title/nav.search/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
9182function JCTitleSearch(arParams)
9183{
9184	var _this = this;
9185
9186	this.arParams = {
9187		'AJAX_PAGE': arParams.AJAX_PAGE,
9188		'CONTAINER_ID': arParams.CONTAINER_ID,
9189		'INPUT_ID': arParams.INPUT_ID,
9190		'MIN_QUERY_LEN': parseInt(arParams.MIN_QUERY_LEN)
9191	};
9192	if(arParams.WAIT_IMAGE)
9193		this.arParams.WAIT_IMAGE = arParams.WAIT_IMAGE;
9194	if(arParams.MIN_QUERY_LEN <= 0)
9195		arParams.MIN_QUERY_LEN = 1;
9196
9197	this.cache = [];
9198	this.cache_key = null;
9199
9200	this.startText = '';
9201	this.running = false;
9202	this.currentRow = -1;
9203	this.RESULT = null;
9204	this.CONTAINER = null;
9205	this.INPUT = null;
9206	this.WAIT = null;
9207
9208	this.ShowResult = function(result)
9209	{
9210		if(BX.type.isString(result))
9211		{
9212			_this.RESULT.innerHTML = result;
9213		}
9214
9215		_this.RESULT.style.display = _this.RESULT.innerHTML !== '' ? 'block' : 'none';
9216		var pos = _this.adjustResultNode();
9217
9218		//adjust left column to be an outline
9219		var res_pos;
9220		var th;
9221		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'nav-live-search'}, true);
9222		if(tbl)
9223		{
9224			th = BX.findChild(tbl, {'tag':'th'}, true);
9225		}
9226
9227		if(th)
9228		{
9229			var tbl_pos = BX.pos(tbl);
9230			tbl_pos.width = tbl_pos.right - tbl_pos.left;
9231
9232			var th_pos = BX.pos(th);
9233			th_pos.width = th_pos.right - th_pos.left;
9234			th.style.width = th_pos.width + 'px';
9235
9236			_this.RESULT.style.width = (pos.width + th_pos.width) + 'px';
9237
9238			//Move table to left by width of the first column
9239			_this.RESULT.style.left = (pos.left - th_pos.width - 1)+ 'px';
9240
9241			//Shrink table when it's too wide
9242			if((tbl_pos.width - th_pos.width) > pos.width)
9243				_this.RESULT.style.width = (pos.width + th_pos.width -1) + 'px';
9244
9245			//Check if table is too wide and shrink result div to it's width
9246			tbl_pos = BX.pos(tbl);
9247			res_pos = BX.pos(_this.RESULT);
9248			if(res_pos.right > tbl_pos.right)
9249			{
9250				_this.RESULT.style.width = (tbl_pos.right - tbl_pos.left) + 'px';
9251			}
9252		}
9253
9254		var fade;
9255		if(tbl) fade = BX.findChild(_this.RESULT, {'class':'title-search-fader'}, true);
9256		if(fade && th)
9257		{
9258			res_pos = BX.pos(_this.RESULT);
9259			fade.style.left = (res_pos.right - res_pos.left - 18) + 'px';
9260			fade.style.width = 18 + 'px';
9261			fade.style.top = 0 + 'px';
9262			fade.style.height = (res_pos.bottom - res_pos.top) + 'px';
9263			fade.style.display = 'block';
9264		}
9265	};
9266
9267	this.onKeyPress = function(keyCode)
9268	{
9269		var tbl = BX.findChild(_this.CONTAINER, {'tag':'div','class':'search-res'}, true);
9270		if(!tbl)
9271			return false;
9272
9273		var i;
9274		var cnt = tbl.childNodes.length;
9275
9276		//console.log(keyCode)
9277		if(keyCode == '13') {
9278
9279			//if(_this.CONTAINER.style.display == 'block') {
9280				for(i = 0; i < cnt; i++)
9281				{
9282					if(_this.currentRow == i)
9283					{
9284						//console.log(tbl.childNodes[i])
9285						if(!BX.findChild(tbl.childNodes[i], {'class':'title-search-separator'}, true))
9286						{
9287							var a = BX.findChild(tbl.childNodes[i], {'tag':'a'}, true);
9288							if(a)
9289							{
9290								window.location = a.href;
9291								return true;
9292							}
9293						}
9294					}
9295				}
9296			//}
9297			return false;
9298		}
9299		/*var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'nav-live-search'}, true);
9300		if(!tbl)
9301			return false;
9302
9303		var i;
9304		var cnt = tbl.rows.length;*/
9305
9306		switch (keyCode)
9307		{
9308		case 27: // escape key - close search div
9309			_this.RESULT.style.display = 'none';
9310			_this.currentRow = -1;
9311			_this.UnSelectAll();
9312		return true; 
9313
9314		case 40: // down key - navigate down on search results
9315			if(_this.RESULT.style.display == 'none')
9316				_this.RESULT.style.display = 'block';
9317
9318			var first = -1;
9319			for(i = 0; i < cnt; i++)
9320			{
9321				if(!BX.findChild(tbl.childNodes[i], {'class':'title-search-separator'}, true))
9322				{
9323					if(first == -1)
9324						first = i;
9325
9326					if(_this.currentRow < i)
9327					{
9328						_this.currentRow = i;
9329						break;
9330					}
9331					else if(tbl.childNodes[i].className == 'title-search-selected')
9332					{
9333						tbl.childNodes[i].backgroundColor = 'transparent';
9334						tbl.childNodes[i].className = 'live-search-result nav-live-search';
9335					}
9336					//console.log(tbl)
9337				}
9338			}
9339
9340			if(i == cnt && _this.currentRow != i)
9341				_this.currentRow = first;
9342
9343			tbl.childNodes[_this.currentRow].style.backgroundColor = 'rgba(0,0,0,0.12)';
9344			tbl.childNodes[_this.currentRow].style.boxShadow = 'none';
9345			tbl.childNodes[_this.currentRow].className = 'live-search-result nav-live-search title-search-selected';
9346		return true;
9347
9348		case 38: // up key - navigate up on search results
9349			if(_this.RESULT.style.display == 'none')
9350				_this.RESULT.style.display = 'block';
9351
9352			var last = -1;
9353			for(i = cnt-1; i >= 0; i--)
9354			{
9355				if(!BX.findChild(tbl.childNodes[i], {'class':'title-search-separator'}, true))
9356				{
9357					if(last == -1)
9358						last = i;
9359
9360					if(_this.currentRow > i)
9361					{
9362						_this.currentRow = i;
9363						break;
9364					}
9365					else if(tbl.childNodes[i].className == 'title-search-selected')
9366					{
9367						tbl.childNodes[i].backgroundColor = 'transparent';
9368
9369						tbl.childNodes[i].className = 'live-search-result nav-live-search';
9370					}
9371				}
9372			}
9373
9374			if(i < 0 && _this.currentRow != i)
9375				_this.currentRow = last;
9376
9377			tbl.childNodes[_this.currentRow].style.backgroundColor = 'rgba(0,0,0,0.12)';
9378			tbl.childNodes[_this.currentRow].style.boxShadow = 'none';
9379
9380			tbl.childNodes[_this.currentRow].className = 'live-search-result nav-live-search title-search-selected';
9381		return true;
9382
9383		case '13': // enter key - choose current search result
9384			if(_this.RESULT.style.display == 'block')
9385			{
9386				for(i = 0; i < cnt; i++)
9387				{
9388					if(_this.currentRow == i)
9389					{
9390						if(!BX.findChild(tbl.childNodes[i], {'class':'title-search-separator'}, true))
9391						{
9392							var a = BX.findChild(tbl.childNodes[i], {'tag':'a'}, true);
9393							if(a)
9394							{
9395								window.location = a.href;
9396								return true;
9397							}
9398						}
9399					}
9400				}
9401			}
9402		return false;
9403		}
9404
9405		return false;
9406	};
9407
9408	this.onTimeout = function()
9409	{
9410		_this.onChange(function(){
9411			setTimeout(_this.onTimeout, 500);
9412		});
9413	};
9414
9415	this.onChange = function(callback)
9416	{
9417		if (_this.running)
9418			return;
9419		_this.running = true;
9420
9421		if(_this.INPUT.value != _this.oldValue && _this.INPUT.value != _this.startText)
9422		{
9423			_this.oldValue = _this.INPUT.value;
9424			if(_this.INPUT.value.length >= _this.arParams.MIN_QUERY_LEN)
9425			{
9426				_this.cache_key = _this.arParams.INPUT_ID + '|' + _this.INPUT.value;
9427				if(_this.cache[_this.cache_key] == null)
9428				{
9429					if(_this.WAIT)
9430					{
9431						var pos = BX.pos(_this.INPUT);
9432						var height = (pos.bottom - pos.top)-2;
9433						_this.WAIT.style.top = (pos.top+1) + 'px';
9434						_this.WAIT.style.height = height + 'px';
9435						_this.WAIT.style.width = height + 'px';
9436						_this.WAIT.style.left = (pos.right - height + 2) + 'px';
9437						_this.WAIT.style.display = 'block';
9438					}
9439
9440					BX.ajax.post(
9441						_this.arParams.AJAX_PAGE,
9442						{
9443							'ajax_call':'y',
9444							'INPUT_ID':_this.arParams.INPUT_ID,
9445							'q':_this.INPUT.value,
9446							'l':_this.arParams.MIN_QUERY_LEN
9447						},
9448						function(result)
9449						{
9450							_this.cache[_this.cache_key] = result;
9451							_this.ShowResult(result);
9452							_this.currentRow = -1;
9453							_this.EnableMouseEvents();
9454							if(_this.WAIT)
9455								_this.WAIT.style.display = 'none';
9456							if (!!callback)
9457								callback();
9458							_this.running = false;
9459						}
9460					);
9461					return;
9462				}
9463				else
9464				{
9465					_this.ShowResult(_this.cache[_this.cache_key]);
9466					_this.currentRow = -1;
9467					_this.EnableMouseEvents();
9468				}
9469			}
9470			else
9471			{
9472				_this.RESULT.style.display = 'none';
9473				_this.currentRow = -1;
9474				_this.UnSelectAll();
9475			}
9476		}
9477		if (!!callback)
9478			callback();
9479		_this.running = false;
9480	};
9481
9482	this.onScroll = function ()
9483	{
9484		if(BX.type.isElementNode(_this.RESULT)
9485			&& _this.RESULT.style.display !== "none"
9486			&& _this.RESULT.innerHTML !== ''
9487		)
9488		{
9489			_this.adjustResultNode();
9490		}
9491	};
9492
9493	this.UnSelectAll = function()
9494	{
9495		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'nav-live-search'}, true);
9496		if(tbl)
9497		{
9498			var cnt = tbl.rows.length;
9499			for(var i = 0; i < cnt; i++)
9500				tbl.rows[i].className = '';
9501		}
9502	};
9503
9504	this.EnableMouseEvents = function()
9505	{
9506		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'nav-live-search'}, true);
9507		if(tbl)
9508		{
9509			var cnt = tbl.rows.length;
9510			for(var i = 0; i < cnt; i++)
9511				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
9512				{
9513					tbl.rows[i].id = 'row_' + i;
9514					tbl.rows[i].onmouseover = function (e) {
9515						if(_this.currentRow != this.id.substr(4))
9516						{
9517							_this.UnSelectAll();
9518							this.className = 'title-search-selected';
9519							_this.currentRow = this.id.substr(4);
9520						}
9521					};
9522					tbl.rows[i].onmouseout = function (e) {
9523						this.className = '';
9524						_this.currentRow = -1;
9525					};
9526				}
9527		}
9528	};
9529
9530	this.onFocusLost = function(hide)
9531	{
9532		setTimeout(function(){_this.RESULT.style.display = 'none';}, 250);
9533	};
9534
9535	this.onFocusGain = function()
9536	{
9537		if(_this.RESULT.innerHTML.length)
9538			_this.ShowResult();
9539	};
9540
9541	this.onKeyDown = function(e)
9542	{
9543		if(!e)
9544			e = window.event;
9545
9546		if (_this.RESULT.style.display == 'block')
9547		{
9548			if(_this.onKeyPress(e.keyCode))
9549			{
9550				return BX.PreventDefault(e);
9551			}
9552				
9553		}
9554	};
9555
9556	this.adjustResultNode = function()
9557	{
9558		if(!(BX.type.isElementNode(_this.RESULT)
9559			&& BX.type.isElementNode(_this.CONTAINER))
9560		)
9561		{
9562			return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
9563		}
9564
9565		var pos = BX.pos(_this.CONTAINER);
9566
9567		_this.RESULT.style.position = 'absolute';
9568		_this.RESULT.style.top = (pos.bottom + 2) + 'px';
9569		_this.RESULT.style.left = pos.left + 'px';
9570		_this.RESULT.style.width = pos.width + 'px';
9571
9572		return pos;
9573	};
9574
9575	this._onContainerLayoutChange = function()
9576	{
9577		if(BX.type.isElementNode(_this.RESULT)
9578			&& _this.RESULT.style.display !== "none"
9579			&& _this.RESULT.innerHTML !== ''
9580		)
9581		{
9582			_this.adjustResultNode();
9583		}
9584	};
9585	this.Init = function()
9586	{
9587		this.CONTAINER = document.getElementById(this.arParams.CONTAINER_ID);
9588		BX.addCustomEvent(this.CONTAINER, "OnNodeLayoutChange", this._onContainerLayoutChange);
9589
9590		//this.RESULT = document.body.appendChild(document.createElement("DIV"));
9591
9592		this.RESULT = this.CONTAINER.appendChild(document.createElement("DIV"));
9593
9594		this.RESULT.className = 'nav-live-search search-res';
9595		this.INPUT = document.getElementById(this.arParams.INPUT_ID);
9596		this.startText = this.oldValue = this.INPUT.value;
9597		//BX.bind(this.INPUT, 'focus', function() {_this.onFocusGain()});
9598		//BX.bind(this.INPUT, 'blur', function() {_this.onFocusLost()});
9599		this.INPUT.onkeydown = this.onKeyDown;
9600
9601		
9602		if(this.arParams.WAIT_IMAGE)
9603		{
9604			this.WAIT = document.body.appendChild(document.createElement("DIV"));
9605			this.WAIT.style.backgroundImage = "url('" + this.arParams.WAIT_IMAGE + "')";
9606			if(!BX.browser.IsIE())
9607				this.WAIT.style.backgroundRepeat = 'none';
9608			this.WAIT.style.display = 'none';
9609			this.WAIT.style.position = 'absolute';
9610			this.WAIT.style.zIndex = '1100';
9611		}
9612
9613		BX.bind(this.INPUT, 'bxchange', function() {_this.onChange()});
9614
9615		var fixedParent = BX.findParent(this.CONTAINER, BX.is_fixed);
9616		if(BX.type.isElementNode(fixedParent))
9617		{
9618			BX.bind(window, 'scroll', BX.throttle(this.onScroll, 100, this));
9619		}
9620	};
9621	BX.ready(function (){_this.Init(arParams)});
9622}
9623
9624/* End */
9625;
9626; /* Start:"a:4:{s:4:"full";s:83:"/bitrix/components/simai/feedback.error/templates/.default/script.js?16484589034163";s:6:"source";s:68:"/bitrix/components/simai/feedback.error/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
9627		/*
9628		*	1 - Функция которая будет выполнена
9629		*	2 - код клавиши которая должна сработать
9630		*	3 - вторая клавиша в сочетании с первой
9631		*	4 - третья клавиша в сочетании с первой и второй
9632		*	
9633		*	Функция для обработки любого сочетания клавиш.
9634		*	Количество клавиш при нажатии которых будет выполнена Ñ
9634„ункция
9635		*	неограничено.
9636		*/
9637		function bodyEvent(func)
9638		{
9639			var codes = [].slice.call(arguments, 1);
9640			var pressed = {};
9641			
9642			document.onkeydown = function(e) {
9643			  e = e || window.event;
9644
9645			  pressed[e.keyCode] = true;
9646
9647			  for (var i = 0; i < codes.length; i++) { // проверить, все ли клавиши нажаты
9648				if (!pressed[codes[i]]) {
9649				  return;
9650				}
9651			  }
9652
9653			  pressed = {};
9654
9655			  func();
9656
9657			};
9658
9659			document.onkeyup = function(e)
9660			{
9661			  e = e || window.event;
9662
9663			  delete pressed[e.keyCode];
9664			};
9665		}
9666		
9667		
9668		function closeModalWindow()
9669		{
9670			var modalWin = document.getElementById("modal-window-home-id");
9671			modalWin.style.display = "none";
9672			//modalWin.parentNode.removeChild(modalWin);
9673		}
9674
9675
9676
9677		
9678		function modalWindow()
9679		{
9680			var modalW = document.getElementsByClassName("modal-window-home").length;
9681			if(modalW <= 1)
9682			{	
9683				var formElem = document.getElementById('elem-form');
9684				var elemStr = '<textarea class="form-sm-element message-text-submit" id="text-form" name="error_desc"' +
9685					'placeholder="Пожалуйста, опишите ошибку"></textarea>' +
9686							'<input type="hidden" name="error_message" value="' + copySelectionText() + '">' +
9687							'<input type="hidden" name="error_url" value="' + window.location + '">' +
9688							'<input type="hidden" name="error_referer" value="' + document.referrer + '">' +
9689							'<input type="hidden" name="error_useragent" value="' + navigator.userAgent + '">';
9690				formElem.innerHTML = elemStr;
9691
9692				var modalFormMess = document.getElementById('mess');
9693				var hideFormText = document.getElementById('error_message');
9694				var submitButton = document.getElementById('send');
9695				var textForm = document.getElementById('text-form');
9696				console.log(String(textForm));
9697
9698				var hideText = copySelectionText();
9699				if(hideText != '') {
9700					var str = '';
9701					if(String(hideText).length >= 120)
9702						str = '...';
9703					modalFormMess.innerHTML = String(hideText).substring(0,120) + str;
9704					submitButton.style.display = 'block';
9705					textForm.style.display = 'block';
9706					modalFormMess.style.color = 'rgba(0,0,0,.54)';
9707				}
9708				else {
9709					modalFormMess.innerHTML = 'Текст с ошибкой не выделен. Пожалуйста выделите текст с ошибкой и нажмите Ctrl+Enter';
9710					textForm.style.display = 'none';				
9711					submitButton.style.display = 'none';
9712					modalFormMess.style.color = 'rgba(255,0,0,.87)';				
9713				}
9714				var modWindow = document.getElementById("modal-window-home-id");
9715				modWindow.style.display = "flex";
9716			}
9717		}
9718		
9719		
9720		bodyEvent(modalWindow,"17","13");
9721		
9722		/*
9723		*	ФУНКЦИЯ modalWindowEsc ЗАКРЫВАЮЩАЯ МОДАЛЬНОЕ ОКНО
9724		*	ПРИ НАЖАТИИ НА КЛАВИШУ ESC
9725		*
9726		*/
9727		
9728		function modalWindowEsc(e)
9729		{
9730			if(e.keyCode == 27)
9731				closeModalWindow();
9732		}	
9733		
9734		addEventListener("keydown", modalWindowEsc);
9735
9736
9737
9738		function handlerEvents(e) {
9739			var flagObjHandler = e.target.hasAttribute('params');
9740			if(flagObjHandler) {
9741				var objHandler = e.target.getAttribute('params');
9742				switch(objHandler) {
9743					case 'close':
9744						closeModalWindow();
9745						break;
9746				}
9747			}
9748		}
9749
9750
9751
9752
9753		window.onload = function() {
9754			document.body.addEventListener('click',handlerEvents);
9755		}
9756
9757		function copySelectionText()
9758		{
9759			if(window.getSelection)
9760				strText = window.getSelection();
9761			else if(document.getSelection)
9762				strText = document.getSelection();
9763			else if(document.selection)
9764				strText = document.CDATA_SECTION_NODE.createRange().text;
9765			else return;
9766
9767			return strText;
9768		}
9769
9770		function text() {
9771			
9772		}
9773
9774/* End */
9775;; /* /simai/asset/lazysizes/lazysizes-5.1.0/lazysizes.min.js?16484588047057*/
9776; /* /simai/asset/lazysizes/lazysizes-5.1.0/plugins/respimg/ls.respimg.min.js?16484588043683*/
9777; /* /simai/asset/lazysizes/lazysizes-5.1.0/plugins/unveilhooks/ls.unveilhooks.min.js?16484588041466*/
9778; /* /simai/asset/jquery/jquery-3.3.1/jquery.min.js?164845880486927*/
9779; /* /simai/asset/popper/popper-1.14.5/js/popper.min.js?164845880420611*/
9780; /* /simai/asset/simai.framework/sf4.master/core/js/sf-full.js?1648458804252549*/
9781; /* /simai/asset/simai.framework/sf4.master/plugin/navigation/js/sf-nav.js?164845880431859*/
9782; /* /simai/asset/fancybox/fancybox.master/js/jquery.fancybox.min.js?164845880467881*/
9783; /* /simai/asset/swiper/swiper-4.4.2/js/swiper.min.js?1648458804124740*/
9784; /* /simai/asset/simai.special/js/voice.js?16484588042800*/
9785;
9785 /* /ru/simai.data/grid/block/header/translate.yandex/script.js?164845880313414*/
9786; /* /bitrix/components/bitrix/search.title/script.js?16484589029847*/
9787; /* /bitrix/templates/simai.framework/components/bitrix/search.title/nav.search/script.js?164845890011063*/
9788; /* /bitrix/components/simai/feedback.error/templates/.default/script.js?16484589034163*/
9789
9790//# sourceMappingURL=template_7e663d4cfa986a48b2cb129a54d044a1.map.js

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.