PageSourceSearch

https://moscowbookfair.ru/assets/nonfiction/js/vendors~app.js?v=1789583227

js moscowbookfair.ru collected 2026-09-24 17:57:43 UTC 381,789 bytes, 26 lines download raw bytes

vendor: 5,414 bytes, line 1
1(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";function i(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function o(e,t,n){var i=window.document.createElement(e);return t=t||"",n=n||"",i.className=t,void 0!==n&&(i.textContent=n),i}function r(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function a(e,t){return t(e)?e:e.parentNode?a(e.parentNode,t):void 0}function s(e,t){var n=o("div","numInputWrapper"),i=o("input","numInput "+e),r=o("span","arrowUp"),a=o("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==t)for(var s in t)i.setAttribute(s,t[s]);return n.appendChild(i),n.appendChild(r),n.appendChild(a),n}function l(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}n.d(t,"f",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var i=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},o=function(e){return!0===e?1:0};function r(e,t){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout((function(){return e.apply(i,o)}),t)}}var a=function(e){return e instanceof Array?e:[e]}},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return f}));var i=n(3),o=n(4),r=n(5),a=function(e){var t=e.config,n=void 0===t?o.b:t,a=e.l10n,s=void 0===a?r.b:a,l=e.isMobile,c=void 0!==l&&l;return function(e,t,o){var r=o||s;return void 0===n.formatDate||c?t.split("").map((function(t,o,a){return i.a[t]&&"\\"!==a[o-1]?i.a[t](e,r,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,r)}},s=function(e){var t=e.config,n=void 0===t?o.b:t,a=e.l10n,s=void 0===a?r.b:a;return function(e,t,r,a){if(0===e||e){var l,c=a||s,u=e;if(e instanceof Date)l=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)l=new Date(e);else if("string"==typeof e){var d=t||(n||o.b).dateFormat,h=String(e).trim();if("today"===h)l=new Date,r=!0;else if(n&&n.parseDate)l=n.parseDate(e,d);else if(/Z$/.test(h)||/GMT$/.test(h))l=new Date(e);else{for(var f=void 0,p=[],g=0,m=0,v="";g<d.length;g++){var b=d[g],y="\\"===b,w="\\"===d[g-1]||y;if(i.d[b]&&!w){v+=i.d[b];var x=new RegExp(v).exec(e);x&&(f=!0)&&p["Y"!==b?"push":"unshift"]({fn:i.c[b],val:x[++m]})}else y||(v+=".")}l=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),p.forEach((function(e){var t=e.fn,n=e.val;return l=t(l,n,c)||l})),l=f?l:void 0}}if(l instanceof Date&&!isNaN(l.getTime()))return!0===r&&l.setHours(0,0,0,0),l;n.errorHandler(new Error("Invalid date provided: "+u))}}};function l(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var c=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},u=function(e,t,n){return 3600*e+60*t+n},d=function(e){var t=Math.floor(e/3600),n=(e-3600*t)/60;return[t,n,e-3600*t-60*n]},h={DAY:864e5};function f(e){var t=e.defaultHour,n=e.defaultMinute,i=e.defaultSeconds;if(void 0!==e.minDate){var o=e.minDate.getHours(),r=e.minDate.getMinutes(),a=e.minDate.getSeconds();t<o&&(t=o),t===o&&n<r&&(n=r),t===o&&n===r&&i<a&&(i=e.minDate.getSeconds())}if(void 0!==e.maxDate){var s=e.maxDate.getHours(),l=e.maxDate.getMinutes();(t=Math.min(t,s))===s&&(n=Math.min(l,n)),t===s&&n===l&&(i=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:i}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return l}));var i=n(1),o=function(){},r=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},a={D:o,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*Object(i.c)(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var i=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(i-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:o,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:o,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},s={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"
1(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},l={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[l.w(e,t,n)]},F:function(e,t,n){return r(l.n(e,t,n)-1,!1,t)},G:function(e,t,n){return Object(i.d)(l.h(e,t,n))},H:function(e){return Object(i.d)(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[Object(i.c)(e.getHours()>11)]},M:function(e,t){return r(e.getMonth(),!0,t)},S:function(e){return Object(i.d)(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return Object(i.d)(e.getFullYear(),4)},d:function(e){return Object(i.d)(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return Object(i.d)(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return Object(i.d)(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var i=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],o={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i}));var i={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1};t.a=i},,function(e,t,n){var i;
2/*!
3 * jQuery JavaScript Library v3.7.1
4 * https://jquery.com/
5 *
6 * Copyright OpenJS Foundation and other contributors
7 * Released under the MIT license
8 * https://jquery.org/license
9 *
10 * Date: 2023-08-28T13:37Z
11 */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,o){"use strict";var r=[],a=Object.getPrototypeOf,s=r.slice,l=r.flat?function(e){return r.flat.call(e)}:function(e){return r.concat.apply([],e)},c=r.push,u=r.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,g=p.call(Object),m={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},b=function(e){return null!=e&&e===e.window}
vendor: 4,194 bytes, line 11
11,y=n.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var i,o,r=(n=n||y).createElement("script");if(r.text=e,t)for(i in w)(o=t[i]||t.getAttribute&&t.getAttribute(i))&&r.setAttribute(i,o);n.head.appendChild(r).parentNode.removeChild(r)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var C=/HTML$/i,O=function(e,t){return new O.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!v(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function M(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}O.fn=O.prototype={jquery:"3.7.1",constructor:O,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=O.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return O.each(this,e)},map:function(e){return this.pushStack(O.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(O.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(O.grep(this,(function(e,t){return t%2})))},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:c,sort:r.sort,splice:r.splice},O.extend=O.fn.extend=function(){var e,t,n,i,o,r,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)i=e[t],"__proto__"!==t&&a!==i&&(c&&i&&(O.isPlainObject(i)||(o=Array.isArray(i)))?(n=a[t],r=o&&!Array.isArray(n)?[]:o||O.isPlainObject(n)?n:{},o=!1,a[t]=O.extend(c,r,i)):void 0!==i&&(a[t]=i));return a},O.extend({expando:"jQuery"+("3.7.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]"!==h.call(e))&&(!(t=a(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===g)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){x(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,i=0;if(E(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},text:function(e){var t,n="",i=0,o=e.nodeType;if(!o)for(;t=e[i++];)n+=O.text(t);return 1===o||11===o?e.textContent:9===o?e.documentElement.textContent:3===o||4===o?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?O.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!C.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;i++)e[o++]=t[i];return e.length=o,e},grep:function(e,t,n){for(var i=[],o=0,r=e.length,a=!n;o<r;o++)!t(e[o],o)!==a&&i.push(e[o]);return i},map:function(e,t,n){var i,o,r=0,a=[];if(E(e))for(i=e.length;r<i;r++)null!=(o=t(e[r],r,n))&&a.push(o);else for(r in e)null!=(o=t(e[r],r,n))&&a.push(o);return l(a)},guid:1,support:m}),"function"==typeof Symbol&&(O.fn[Symbol.iterator]=r[Symbol.iterator]),O.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var S=r.pop,D=r.sort,A=r.splice,P="[\\x20\\t\\r\\n\\f]",k=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g");O.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var j=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function I(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}O.escapeSelector=function(e){return(e+"").replace(j,I)};var L=y,N=c;!function(){var e,t,i,o,a,l,c,d,h,p,g=N,v=O.expando,b=0,y=0,w=ee(),x=ee(),T=ee(),
vendor: 22,083 bytes, line 11
11C=ee(),E=function(e,t){return e===t&&(a=!0),0},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="(?:\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",_="\\["+P+"*("+I+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+P+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+_+")*)|.*)\\)|)",R=new RegExp(P+"+","g"),H=new RegExp("^"+P+"*,"+P+"*"),z=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),B=new RegExp(P+"|>"),q=new RegExp(F),W=new RegExp("^"+I+"$"),Y={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+_),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,U=/[+~]/,G=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),Z=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},K=function(){le()},J=he((function(e){return!0===e.disabled&&M(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{g.apply(r=s.call(L.childNodes),L.childNodes),r[L.childNodes.length].nodeType}catch(e){g={apply:function(e,t){N.apply(e,s.call(t))},call:function(e){N.apply(e,s.call(arguments,1))}}}function Q(e,t,n,i){var o,r,a,s,c,u,f,p=t&&t.ownerDocument,b=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return n;if(!i&&(le(t),t=t||l,d)){if(11!==b&&(c=$.exec(e)))if(o=c[1]){if(9===b){if(!(a=t.getElementById(o)))return n;if(a.id===o)return g.call(n,a),n}else if(p&&(a=p.getElementById(o))&&Q.contains(t,a)&&a.id===o)return g.call(n,a),n}else{if(c[2])return g.apply(n,t.getElementsByTagName(e)),n;if((o=c[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(o)),n}if(!(C[e+" "]||h&&h.test(e))){if(f=e,p=t,1===b&&(B.test(e)||z.test(e))){for((p=U.test(e)&&se(t.parentNode)||t)==t&&m.scope||((s=t.getAttribute("id"))?s=O.escapeSelector(s):t.setAttribute("id",s=v)),r=(u=ue(e)).length;r--;)u[r]=(s?"#"+s:":scope")+" "+de(u[r]);f=u.join(",")}try{return g.apply(n,p.querySelectorAll(f)),n}catch(t){C(e,!0)}finally{s===v&&t.removeAttribute("id")}}}return be(e.replace(k,"$1"),t,n,i)}function ee(){var e=[];return function n(i,o){return e.push(i+" ")>t.cacheLength&&delete n[e.shift()],n[i+" "]=o}}function te(e){return e[v]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return M(t,"input")&&t.type===e}}function oe(e){return function(t){return(M(t,"input")||M(t,"button"))&&t.type===e}}function re(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&&J(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te((function(t){return t=+t,te((function(n,i){for(var o,r=e([],n.length,t),a=r.length;a--;)n[o=r[a]]&&(n[o]=!(i[o]=n[o]))}))}))}function se(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,i=e?e.ownerDocument||e:L;return i!=l&&9===i.nodeType&&i.documentElement?(c=(l=i).documentElement,d=!O.isXMLDoc(l),p=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&L!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",K),m.getById=ne((function(e){return c.appendChild(e).id=O.expando,!l.getElementsByName||!l.getElementsByName(O.expando).length})),m.disconnectedMatch=ne((function(e){return p.call(e,"*")})),m.scope=ne((function(){return l.querySelectorAll(":scope")})),m.cssHas=ne((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),m.getById?(t.filter.ID=function(e){var t=e.replace(G,Z);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(G,Z);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n,i,o,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(o=t.getElementsByName(e),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&d)return t.getElementsByClassName(e)},h=[],ne((function(e){var t;c.appendChild(e).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+P+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+v+"-]").length||h.push("~="),e.querySelectorAll("a#"+v+"+*").length||h.push(".#.+[+~]"),e.querySelectorAll(":checked").length||h.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||h.push("\\["+P+"*name"+P+"*="+P+"*(?:''|\"\")")})),m.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),E=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!m.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==L&&Q.contains(L,e)?-1:t===l||t.ownerDocument==L&&Q.contains(L,t)?1:o?u.call(o,e)-u.call(o,t):0:4&n?-1:1)},l):l}for(e in Q.matches=function(e,t){return Q(e,null,null,t)},Q.matchesSelector=function(e,t){if(le(e),d&&!C[t+" "]&&(!h||!h.test(t)))try{var n=p.call(e,t);if(n||m.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){C(t,!0)}return Q(t,l,null,[e]).length>0},Q.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),O.contains(e,t)},Q.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var i=t.attrHandle[n.toLowerCase()],o=i&&f.call(t.attrHandle,n.toLowerCase())?i(e,n,!d):void 0;return void 0!==o?o:e.getAttribute(n)},Q.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},O.uniqueSort=function(e){var t,n=[],i=0,r=0;if(a=!m.sortStable,o=!m.sortStable&&s.call(e,0),D.call(e,E),a){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)A.call(e,n[i],1)}return o=null,e},O.fn.uniqueSort=function(){return this.pushStack(O.uniqueSort(s.apply(this)))},(t=O.expr={cacheLength:50,createPseudo:te,match:Y,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(G,Z),e[3]=(e[3]||e[4]||e[5]||"").replace(G,Z),"~="===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]||Q.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]&&Q.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=ue(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(G,Z).toLowerCase();return"*"===e?function(){return!0}:function(e){return M(e,t)}},CLASS:function(e){var t=w[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&w(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var o=Q.attr(i,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(R," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p=r!==a?"nextSibling":"previousSibling",g=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!l&&!s,w=!1;if(g){if(r){for(;p;){for(d=t;d=d[p];)if(s?M(d,m):1===d.nodeType)return!1;f=p="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?g.firstChild:g.lastChild],a&&y){for(w=(h=(c=(u=g[v]||(g[v]={}))[e]||[])[0]===b&&c[1])&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[p]||(w=h=0)||f.pop();)if(1===d.nodeType&&++w&&d===t){u[e]=[b,h,w];break}}else if(y&&(w=h=(c=(u=t[v]||(t[v]={}))[e]||[])[0]===b&&c[1]),!1===w)for(;(d=++h&&d&&d[p]||(w=h=0)||f.pop())&&(!(s?M(d,m):1===d.nodeType)||!++w||(y&&((u=d[v]||(d[v]={}))[e]=[b,w]),d!==t)););return(w-=o)===i||w%i==0&&w/i>=0}}},PSEUDO:function(e,n){var i,o=t.pseudos[e]||t.setFilters[e.toLowerCase()]||Q.error("unsupported pseudo: "+e);return o[v]?o(n):o.length>1?(i=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var i,r=o(e,n),a=r.length;a--;)e[i=u.call(e,r[a])]=!(t[i]=r[a])})):function(e){return o(e,0,i)}):o}},pseudos:{not:te((function(e){var t=[],n=[],i=ve(e.replace(k,"$1"));return i[v]?te((function(e,t,n,o){for(var r,a=i(e,null,o,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))})):function(e,o,r){return t[0]=e,i(t,null,r,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return Q(e,t).length>0}})),contains:te((function(e){return e=e.replace(G,Z),function(t){return(t.textContent||O.text(t)).indexOf(e)>-1}})),lang:te((function(e){return W.test(e||"")||Q.error("unsupported lang: "+e),e=e.replace(G,Z).toLowerCase(),function(t){var n;do{if(n=d?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(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:re(!1),disabled:re(!0),checked:function(e){return M(e,"input")&&!!e.checked||M(e,"option")&&!!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!t.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return V.test(e.nodeName)},button:function(e){return M(e,"input")&&"button"===e.type||M(e,"button")},text:function(e){var t;return M(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,n){return[n<0?n+t:n]})),even:ae((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ae((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ae((function(e,t,n){var i;for(i=n<0?n+t:n>t?t:n;--i>=0;)e.push(i);return e})),gt:ae((function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e}))}}).pseudos.nth=t.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[e]=ie(e);for(e in{submit:!0,reset:!0})t.pseudos[e]=oe(e);function ce(){}function ue(e,n){var i,o,r,a,s,l,c,u=x[e+" "];if(u)return n?0:u.slice(0);for(s=e,l=[],c=t.preFilter;s;){for(a in i&&!(o=H.exec(s))||(o&&(s=s.slice(o[0].length)||s),l.push(r=[])),i=!1,(o=z.exec(s))&&(i=o.shift(),r.push({value:i,type:o[0].replace(k," ")}),s=s.slice(i.length)),t.filter)!(o=Y[a].exec(s))||c[a]&&!(o=c[a](o))||(i=o.shift(),r.push({value:i,type:a,matches:o}),s=s.slice(i.length));if(!i)break}return n?s.length:s?Q.error(e):x(e,l).slice(0)}function de(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function he(e,t,n){var i=t.dir,o=t.next,r=o||i,a=n&&"parentNode"===r,s=y++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,l){var c,u,d=[b,s];if(l){for(;t=t[i];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||a)if(u=t[v]||(t[v]={}),o&&M(t,o))t=t[i]||t;else{if((c=u[r])&&c[0]===b&&c[1]===s)return d[2]=c[2];if(u[r]=d,d[2]=e(t,n,l))return!0}return!1}}function fe(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function pe(e,t,n,i,o){for(var r,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(r=e[s])&&(n&&!n(r,i,o)||(a.push(r),c&&t.push(s)));return a}function ge(e,t,n,i,o,r){return i&&!i[v]&&(i=ge(i)),o&&!o[v]&&(o=ge(o,r)),te((function(r,a,s,l){var c,d,h,f,p=[],m=[],v=a.length,b=r||function(e,t,n){for(var i=0,o=t.length;i<o;i++)Q(e,t[i],n);return n}(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?b:pe(b,p,e,s,l);if(n?n(y,f=o||(r?e:v||i)?[]:a,s,l):f=y,i)for(c=pe(f,m),i(c,[],s,l),d=c.length;d--;)(h=c[d])&&(f[m[d]]=!(y[m[d]]=h));if(r){if(o||e){if(o){for(c=[],d=f.length;d--;)(h=f[d])&&c.push(y[d]=h);o(null,f=[],c,l)}for(d=f.length;d--;)(h=f[d])&&(c=o?u.call(r,h):p[d])>-1&&(r[c]=!(a[c]=h))}}else f=pe(f===a?f.splice(v,f.length):f),o?o(null,a,f,l):g.apply(a,f)}))}function me(e){for(var n,o,r,a=e.length,s=t.relative[e[0].type],l=s||t.relative[" "],c=s?1:0,d=he((function(e){return e===n}),l,!0),h=he((function(e){return u.call(n,e)>-1}),l,!0),f=[function(e,t,o){var r=!s&&(o||t!=i)||((n=t).nodeType?d(e,t,o):h(e,t,o));return n=null,r}];c<a;c++)if(o=t.relative[e[c].type])f=[he(fe(f),o)];else{if((o=t.filter[e[c].type].apply(null,e[c].matches))[v]){for(r=++c;r<a&&!t.relative[e[r].type];r++);return ge(c>1&&fe(f),c>1&&de(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(k,"$1"),o,c<r&&me(e.slice(c,r)),r<a&&me(e=e.slice(r)),r<a&&de(e))}f.push(o)}return fe(f)}function ve(e,n){var o,r=[],a=[],s=T[e+" "];if(!s){for(n||(n=ue(e)),o=n.length;o--;)(s=me(n[o]))[v]?r.push(s):a.push(s);(s=T(e,function(e,n){var o=n.length>0,r=e.length>0,a=function(a,s,c,u,h){var f,p,m,v=0,y="0",w=a&&[],x=[],T=i,C=a||r&&t.find.TAG("*",h),E=b+=null==T?1:Math.random()||.1,M=C.length;for(h&&(i=s==l||s||h);y!==M&&null!=(f=C[y]);y++){if(r&&f){for(p=0,s||f.ownerDocument==l||(le(f),c=!d);m=e[p++];)if(m(f,s||l,c)){g.call(u,f);break}h&&(b=E)}o&&((f=!m&&f)&&v--,a&&w.push(f))}if(v+=y,o&&y!==v){for(p=0;m=n[p++];)m(w,x,s,c);if(a){if(v>0)for(;y--;)w[y]||x[y]||(x[y]=S.call(u));x=pe(x)}g.apply(u,x),h&&!a&&x.length>0&&v+n.length>1&&O.uniqueSort(u)}return h&&(b=E,i=T),w};return o?te(a):a}(a,r))).selector=e}return s}function be(e,n,i,o){var r,a,s,l,c,u="function"==typeof e&&e,h=!o&&ue(e=u.selector||e);if(i=i||[],1===h.length){if((a=h[0]=h[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===n.nodeType&&d&&t.relative[a[1].type]){if(!(n=(t.find.ID(s.matches[0].replace(G,Z),n)||[])[0]))return i;u&&(n=n.parentNode),e=e.slice(a.shift().value.length)}for(r=Y.needsContext.test(e)?0:a.length;r--&&(s=a[r],!t.relative[l=s.type]);)if((c=t.find[l])&&(o=c(s.matches[0].replace(G,Z),U.test(a[0].type)&&se(n.parentNode)||n))){if(a.splice(r,1),!(e=o.length&&de(a)))return g.apply(i,o),i;break}}return(u||ve(e,h))(o,n,!d,i,!n||U.test(e)&&se(n.parentNode)||n),i}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,m.sortStable=v.split("").sort(E).join("")===v,le(),m.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))})),O.find=Q,O.expr[":"]=O.expr.pseudos,O.unique=O.uniqueSort,Q.compile=ve,Q.select=be,Q.setDocument=le,Q.tokenize=ue,Q.escape=O.escapeSelector,Q.getText=O.text,Q.isXML=O.isXMLDoc,Q.selectors=O.expr,Q.support=O.support,Q.uniqueSort=O.uniqueSort}();var _=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&O(e).is(n))break;i.push(e)}return i},F=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},R=O.expr.match.needsContext,H=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(e,t,n){return v(t)?O.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?O.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?O.grep(e,(function(e){return u.call(t,e)>-1!==n})):O.filter(t,e,n)}O.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?O.find.matchesSelector(i,e)?[i]:[]:O.find.matches(e,O.grep(t,(function(e){return 1===e.nodeType})))},O.fn.extend({find:function(e){var t,n,i=this.length,o=this;if("string"!=typeof e)return this.pushStack(O(e).filter((function(){for(t=0;t<i;t++)if(O.contains(o[t],this))return!0})));for(n=this.pushStack([]),t=0;t<i;t++)O.find(e,o[t],n);return i>1?O.uniqueSort(n):n},filter:function(e){return this.pushStack(z(this,e||[],!1))},not:function(e){return this.pushStack(z(this,e||[],!0))},is:function(e){return!!z(this,"string"==typeof e&&R.test(e)?O(e):e||[],!1).length}});var B,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(O.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||B,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:q.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 O?t[0]:t,O.merge(this,O.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),H.test(i[1])&&O.isPlainObject(t))for(i in t)v(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=y.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(O):O.makeArray(e,this)}).prototype=O.fn,B=O(y);var W=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};function V(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}O.fn.extend({has:function(e){var t=O(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(O.contains(this,t[e]))return!0}))},closest:function(e,t){var n,i=0,o=this.length,r=[],a="string"!=typeof e&&O(e);if(!R.test(e))for(;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&O.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?O.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?u.call(O(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(O.uniqueSort(O.merge(this.get(),O(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),O.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return _(e,"parentNode")},parentsUntil:function(e,t,n){return _(e,"parentNode",n)},next:function(e){return V(e,"nextSibling")},prev:function(e){return V(e,"previousSibling")},nextAll:function(e){return _(e,"nextSibling")},prevAll:function(e){return _(e,"previousSibling")},nextUntil:function(e,t,n){return _(e,"nextSibling",n)},prevUntil:function(e,t,n){return _(e,"previousSibling",n)},siblings:function(e){return F((e.parentNode||{}).firstChild,e)},children:function(e){return F(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(M(e,"template")&&(e=e.content||e),O.merge([],e.childNodes))}},(function(e,t){O.fn[e]=function(n,i){var o=O.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=O.filter(i,o)),this.length>1&&(Y[e]||O.uniqueSort(o),W.test(e)&&o.reverse()),this.pushStack(o)}}));var X=/[^\x20\t\r\n\f]+/g;function $(e){return e}function U(e){throw e}function G(e,t,n,i){var o;try{e&&v(o=e.promise)?o.call(e).done(t).fail(n):e&&v(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}O.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return O.each(e.match(X)||[],(function(e,n){t[n]=!0})),t}(e):O.extend({},e);var t,n,i,o,r=[],a=[],s=-1,l=function(){for(o=o||e.once,i=t=!0;a.length;s=-1)for(n=a.shift();++s<r.length;)!1===r[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=r.length,n=!1);e.memory||(n=!1),t=!1,o&&(r=n?[]:"")},c={add:function(){return r&&(n&&!t&&(s=r.length-1,a.push(n)),function t(n){O.each(n,(function(n,i){v(i)?e.unique&&c.has(i)||r.push(i):i&&i.length&&"string"!==T(i)&&t(i)}))}(arguments),n&&!t&&l()),this},remove:function(){return O.each(arguments,(function(e,t){for(var n;(n=O.inArray(t,r,n))>-1;)r.splice(n,1),n<=s&&s--})),this},has:function(e){return e?O.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=a=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=a=[],n||t||(r=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},O.extend({Deferred:function(e){var t=[["notify","progress",O.Callbacks("memory"),O.Callbacks("memory"),2],["resolve","done",O.Callbacks("once memory"),O.Callbacks("once memory"),0,"resolved"],["reject","fail",O.Callbacks("once memory"),O.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return O.Deferred((function(n){O.each(t,(function(t,i){var o=v(e[i[4]])&&e[i[4]];r[i[1]]((function(){var e=o&&o.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,o?[e]:arguments)}))})),e=null})).promise()},then:function(e,i,o){var r=0;function a(e,t,i,o){return function(){var s=this,l=arguments,c=function(){var n,c;if(!(e<r)){if((n=i.apply(s,l))===t.promise())throw new TypeError("Thenable self
11-resolution");c=n&&("object"==typeof n||"function"==typeof n)&&n.then,v(c)?o?c.call(n,a(r,t,$,o),a(r,t,U,o)):(r++,c.call(n,a(r,t,$,o),a(r,t,U,o),a(r,t,$,t.notifyWith))):(i!==$&&(s=void 0,l=[n]),(o||t.resolveWith)(s,l))}},u=o?c:function(){try{c()}catch(n){O.Deferred.exceptionHook&&O.Deferred.exceptionHook(n,u.error),e+1>=r&&(i!==U&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?u():(O.Deferred.getErrorHook?u.error=O.Deferred.getErrorHook():O.Deferred.getStackHook&&(u.error=O.Deferred.getStackHook()),n.setTimeout(u))}}return O.Deferred((function(n){t[0][3].add(a(0,n,v(o)?o:$,n.notifyWith)),t[1][3].add(a(0,n,v(e)?e:$)),t[2][3].add(a(0,n,v(i)?i:U))})).promise()},promise:function(e){return null!=e?O.extend(e,o):o}},r={};return O.each(t,(function(e,n){var a=n[2],s=n[5];o[n[1]]=a.add,s&&a.add((function(){i=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),r[n[0]]=function(){return r[n[0]+"With"](this===r?void 0:this,arguments),this},r[n[0]+"With"]=a.fireWith})),o.promise(r),e&&e.call(r,r),r},when:function(e){var t=arguments.length,n=t,i=Array(n),o=s.call(arguments),r=O.Deferred(),a=function(e){return function(n){i[e]=this,o[e]=arguments.length>1?s.call(arguments):n,--t||r.resolveWith(i,o)}};if(t<=1&&(G(e,r.done(a(n)).resolve,r.reject,!t),"pending"===r.state()||v(o[n]&&o[n].then)))return r.then();for(;n--;)G(o[n],a(n),r.reject);return r.promise()}});var Z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;O.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Z.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},O.readyException=function(e){n.setTimeout((function(){throw e}))};var K=O.Deferred();function J(){y.removeEventListener("DOMContentLoaded",J),n.removeEventListener("load",J),O.ready()}O.fn.ready=function(e){return K.then(e).catch((function(e){O.readyException(e)})),this},O.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--O.readyWait:O.isReady)||(O.isReady=!0,!0!==e&&--O.readyWait>0||K.resolveWith(y,[O]))}}),O.ready.then=K.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?n.setTimeout(O.ready):(y.addEventListener("DOMContentLoaded",J),n.addEventListener("load",J));var Q=function(e,t,n,i,o,r,a){var s=0,l=e.length,c=null==n;if("object"===T(n))for(s in o=!0,n)Q(e,t,s,n[s],!0,r,a);else if(void 0!==i&&(o=!0,v(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(O(e),n)})),t))for(;s<l;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return o?e:c?t.call(e):l?t(e[0],n):r},ee=/^-ms-/,te=/-([a-z])/g;function ne(e,t){return t.toUpperCase()}function ie(e){return e.replace(ee,"ms-").replace(te,ne)}var oe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function re(){this.expando=O.expando+re.uid++}re.uid=1,re.prototype={cache:function(e){var t=e[this.expando];return t||(t={},oe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[ie(t)]=n;else for(i in t)o[ie(i)]=t[i];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][ie(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,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(ie):(t=ie(t))in i?[t]:t.match(X)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||O.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!O.isEmptyObject(t)}};var ae=new re,se=new re,le=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ce=/[A-Z]/g;function ue(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(ce,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:le.test(e)?JSON.parse(e):e)}(n)}catch(e){}se.set(e,t,n)}else n=void 0;return n}O.extend({hasData:function(e){return se.hasData(e)||ae.hasData(e)},data:function(e,t,n){return se.access(e,t,n)},removeData:function(e,t){se.remove(e,t)},_data:function(e,t,n){return ae.access(e,t,n)},_removeData:function(e,t){ae.remove(e,t)}}),O.fn.extend({data:function(e,t){var n,i,o,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(o=se.get(r),1===r.nodeType&&!ae.get(r,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(i=a[n].name).indexOf("data-")&&(i=ie(i.slice(5)),ue(r,i,o[i]));ae.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each((function(){se.set(this,e)})):Q(this,(function(t){var n;if(r&&void 0===t)return void 0!==(n=se.get(r,e))||void 0!==(n=ue(r,e))?n:void 0;this.each((function(){se.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){se.remove(this,e)}))}}),O.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=ae.get(e,t),n&&(!i||Array.isArray(n)?i=ae.access(e,t,O.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=O.queue(e,t),i=n.length,o=n.shift(),r=O._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,(function(){O.dequeue(e,t)}),r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae.get(e,n)||ae.access(e,n,{empty:O.Callbacks("once memory").add((function(){ae.remove(e,[t+"queue",n])}))})}}),O.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?O.queue(this[0],e):void 0===t?this:this.each((function(){var n=O.queue(this,e,t);O._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&O.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){O.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=O.Deferred(),r=this,a=this.length,s=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=ae.get(r[a],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),o.promise(t)}});var de=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,he=new RegExp("^(?:([+-])=|)("+de+")([a-z%]*)$","i"),fe=["Top","Right","Bottom","Left"],pe=y.documentElement,ge=function(e){return O.contains(e.ownerDocument,e)},me={composed:!0};pe.getRootNode&&(ge=function(e){return O.contains(e.ownerDocument,e)||e.getRootNode(me)===e.ownerDocument});var ve=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ge(e)&&"none"===O.css(e,"display")};function be(e,t,n,i){var o,r,a=20,s=i?function(){return i.cur()}:function(){return O.css(e,t,"")},l=s(),c=n&&n[3]||(O.cssNumber[t]?"":"px"),u=e.nodeType&&(O.cssNumber[t]||"px"!==c&&+l)&&he.exec(O.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;a--;)O.style(e,t,u+c),(1-r)*(1-(r=s()/l||.5))<=0&&(a=0),u/=r;u*=2,O.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}var ye={};function we(e){var t,n=e.ownerDocument,i=e.nodeName,o=ye[i];return o||(t=n.body.appendChild(n.createElement(i)),o=O.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),ye[i]=o,o)}function xe(e,t){for(var n,i,o=[],r=0,a=e.length;r<a;r++)(i=e[r]).style&&(n=i.style.display,t?("none"===n&&(o[r]=ae.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&ve(i)&&(o[r]=we(i))):"none"!==n&&(o[r]="none",ae.set(i,"display",n)));for(r=0;r<a;r++)null!=o[r]&&(e[r].style.display=o[r]);return e}O.fn.extend({show:function(){return xe(this,!0)},hide:function(){return xe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ve(this)?O(this).show():O(this).hide()}))}});var Te,Ce,Oe=/^(?:checkbox|radio)$/i,Ee=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Me=/^$|^module$|\/(?:java|ecma)script/i;Te=y.createDocumentFragment().appendChild(y.createElement("div")),(Ce=y.createElement("input")).setAttribute("type","radio"),Ce.setAttribute("checked","checked"),Ce.setAttribute("name","t"),Te.appendChild(Ce),m.checkClone
vendor: 8,921 bytes, line 11
11=Te.cloneNode(!0).cloneNode(!0).lastChild.checked,Te.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!Te.cloneNode(!0).lastChild.defaultValue,Te.innerHTML="<option></option>",m.option=!!Te.lastChild;var Se={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,"",""]};function De(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&M(e,t)?O.merge([e],n):n}function Ae(e,t){for(var n=0,i=e.length;n<i;n++)ae.set(e[n],"globalEval",!t||ae.get(t[n],"globalEval"))}Se.tbody=Se.tfoot=Se.colgroup=Se.caption=Se.thead,Se.th=Se.td,m.option||(Se.optgroup=Se.option=[1,"<select multiple='multiple'>","</select>"]);var Pe=/<|&#?\w+;/;function ke(e,t,n,i,o){for(var r,a,s,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((r=e[f])||0===r)if("object"===T(r))O.merge(h,r.nodeType?[r]:r);else if(Pe.test(r)){for(a=a||d.appendChild(t.createElement("div")),s=(Ee.exec(r)||["",""])[1].toLowerCase(),l=Se[s]||Se._default,a.innerHTML=l[1]+O.htmlPrefilter(r)+l[2],u=l[0];u--;)a=a.lastChild;O.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(r));for(d.textContent="",f=0;r=h[f++];)if(i&&O.inArray(r,i)>-1)o&&o.push(r);else if(c=ge(r),a=De(d.appendChild(r),"script"),c&&Ae(a),n)for(u=0;r=a[u++];)Me.test(r.type||"")&&n.push(r);return d}var je=/^([^.]*)(?:\.(.+)|)/;function Ie(){return!0}function Le(){return!1}function Ne(e,t,n,i,o,r){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(i=i||n,n=void 0),t)Ne(e,s,n,i,t[s],r);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=Le;else if(!o)return e;return 1===r&&(a=o,(o=function(e){return O().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=O.guid++)),e.each((function(){O.event.add(this,t,o,i,n)}))}function _e(e,t,n){n?(ae.set(e,t,!1),O.event.add(e,t,{namespace:!1,handler:function(e){var n,i=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(i)(O.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=s.call(arguments),ae.set(this,t,i),this[t](),n=ae.get(this,t),ae.set(this,t,!1),i!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else i&&(ae.set(this,t,O.event.trigger(i[0],i.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ie)}})):void 0===ae.get(e,t)&&O.event.add(e,t,Ie)}O.event={global:{},add:function(e,t,n,i,o){var r,a,s,l,c,u,d,h,f,p,g,m=ae.get(e);if(oe(e))for(n.handler&&(n=(r=n).handler,o=r.selector),o&&O.find.matchesSelector(pe,o),n.guid||(n.guid=O.guid++),(l=m.events)||(l=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return void 0!==O&&O.event.triggered!==t.type?O.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(X)||[""]).length;c--;)f=g=(s=je.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=O.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,d=O.event.special[f]||{},u=O.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&O.expr.match.needsContext.test(o),namespace:p.join(".")},r),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,p,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,u):h.push(u),O.event.global[f]=!0)},remove:function(e,t,n,i,o){var r,a,s,l,c,u,d,h,f,p,g,m=ae.hasData(e)&&ae.get(e);if(m&&(l=m.events)){for(c=(t=(t||"").match(X)||[""]).length;c--;)if(f=g=(s=je.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=O.event.special[f]||{},h=l[f=(i?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=h.length;r--;)u=h[r],!o&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(r,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||O.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)O.event.remove(e,f+t[c],n,i,!0);O.isEmptyObject(l)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,n,i,o,r,a,s=new Array(arguments.length),l=O.event.fix(e),c=(ae.get(this,"events")||Object.create(null))[l.type]||[],u=O.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(a=O.event.handlers.call(this,l,c),t=0;(o=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==r.namespace&&!l.rnamespace.test(r.namespace)||(l.handleObj=r,l.data=r.data,void 0!==(i=((O.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,s))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,i,o,r,a,s=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(r=[],a={},n=0;n<l;n++)void 0===a[o=(i=t[n]).selector+" "]&&(a[o]=i.needsContext?O(o,this).index(c)>-1:O.find(o,this,null,[c]).length),a[o]&&r.push(i);r.length&&s.push({elem:c,handlers:r})}return c=this,l<t.length&&s.push({elem:c,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(O.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(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[O.expando]?e:new O.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Oe.test(t.type)&&t.click&&M(t,"input")&&_e(t,"click",!0),!1},trigger:function(e){var t=this||e;return Oe.test(t.type)&&t.click&&M(t,"input")&&_e(t,"click"),!0},_default:function(e){var t=e.target;return Oe.test(t.type)&&t.click&&M(t,"input")&&ae.get(t,"click")||M(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},O.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},O.Event=function(e,t){if(!(this instanceof O.Event))return new O.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ie:Le,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&&O.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[O.expando]=!0},O.Event.prototype={constructor:O.Event,isDefaultPrevented:Le,isPropagationStopped:Le,isImmediatePropagationStopped:Le,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ie,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ie,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ie,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},O.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,code:!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:!0},O.event.addProp),O.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){if(y.documentMode){var n=ae.get(this,"handle"),i=O.event.fix(e);i.type="focusin"===e.type?"focus":"blur",i.isSimulated=!0,n(e),i.target===i.currentTarget&&n(i)}else O.event.simulate(t,e.target,O.event.fix(e))}O.event.special[e]={setup:function(){var i;if(_e(this,e,!0),!y.documentMode)return!1;(i=ae.get(this,t))||this.addEventListener(t,n),ae.set(this,t,(i||0)+1)},trigger:function(){return _e(this,e),!0},teardown:function(){var e;if(!y.documentMode)return!1;(e=ae.get(this,t)-1)?ae.set(this,t,e):(this.removeEventListener(t,n),ae.remove(this,t))},_default:function(t){return ae.get(t.target,e)},delegateType:t},O.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,o=y.documentMode?this:i,r=ae.get(o,t);r||(y.documentMode?this.addEventListener(t,n):i.addEventListener(e,n,!0)),ae.set(o,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,o=y.documentMode?this:i,r=ae.get(o,t)-1;r?ae.set(o,t,r):(y.documentMode?this.removeEventListener(t,n):i.removeEventListener(e,n,!0),ae.remove(o,t))}}}
vendor: 3,093 bytes, line 11
11)),O.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){O.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,o=e.relatedTarget,r=e.handleObj;return o&&(o===i||O.contains(i,o))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}})),O.fn.extend({on:function(e,t,n,i){return Ne(this,e,t,n,i)},one:function(e,t,n,i){return Ne(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,O(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Le),this.each((function(){O.event.remove(this,e,n,t)}))}});var Fe=/<script|<style|<link/i,Re=/checked\s*(?:[^=]|=\s*.checked.)/i,He=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function ze(e,t){return M(e,"table")&&M(11!==t.nodeType?t:t.firstChild,"tr")&&O(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function We(e,t){var n,i,o,r,a,s;if(1===t.nodeType){if(ae.hasData(e)&&(s=ae.get(e).events))for(o in ae.remove(t,"handle events"),s)for(n=0,i=s[o].length;n<i;n++)O.event.add(t,o,s[o][n]);se.hasData(e)&&(r=se.access(e),a=O.extend({},r),se.set(t,a))}}function Ye(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Oe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Ve(e,t,n,i){t=l(t);var o,r,a,s,c,u,d=0,h=e.length,f=h-1,p=t[0],g=v(p);if(g||h>1&&"string"==typeof p&&!m.checkClone&&Re.test(p))return e.each((function(o){var r=e.eq(o);g&&(t[0]=p.call(this,o,r.html())),Ve(r,t,n,i)}));if(h&&(r=(o=ke(t,e[0].ownerDocument,!1,e,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(s=(a=O.map(De(o,"script"),Be)).length;d<h;d++)c=o,d!==f&&(c=O.clone(c,!0,!0),s&&O.merge(a,De(c,"script"))),n.call(e[d],c,d);if(s)for(u=a[a.length-1].ownerDocument,O.map(a,qe),d=0;d<s;d++)c=a[d],Me.test(c.type||"")&&!ae.access(c,"globalEval")&&O.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?O._evalUrl&&!c.noModule&&O._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):x(c.textContent.replace(He,""),c,u))}return e}function Xe(e,t,n){for(var i,o=t?O.filter(t,e):e,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||O.cleanData(De(i)),i.parentNode&&(n&&ge(i)&&Ae(De(i,"script")),i.parentNode.removeChild(i));return e}O.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var i,o,r,a,s=e.cloneNode(!0),l=ge(e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||O.isXMLDoc(e)))for(a=De(s),i=0,o=(r=De(e)).length;i<o;i++)Ye(r[i],a[i]);if(t)if(n)for(r=r||De(e),a=a||De(s),i=0,o=r.length;i<o;i++)We(r[i],a[i]);else We(e,s);return(a=De(s,"script")).length>0&&Ae(a,!l&&De(e,"script")),s},cleanData:function(e){for(var t,n,i,o=O.event.special,r=0;void 0!==(n=e[r]);r++)if(oe(n)){if(t=n[ae.expando]){if(t.events)for(i in t.events)
vendor: 4,045 bytes, line 11
11o[i]?O.event.remove(n,i):O.removeEvent(n,i,t.handle);n[ae.expando]=void 0}n[se.expando]&&(n[se.expando]=void 0)}}}),O.fn.extend({detach:function(e){return Xe(this,e,!0)},remove:function(e){return Xe(this,e)},text:function(e){return Q(this,(function(e){return void 0===e?O.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 Ve(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ze(this,e).appendChild(e)}))},prepend:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ze(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ve(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&&(O.cleanData(De(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return O.clone(this,e,t)}))},html:function(e){return Q(this,(function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Fe.test(e)&&!Se[(Ee.exec(e)||["",""])[1].toLowerCase()]){e=O.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(O.cleanData(De(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ve(this,arguments,(function(t){var n=this.parentNode;O.inArray(this,e)<0&&(O.cleanData(De(this)),n&&n.replaceChild(t,this))}),e)}}),O.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){O.fn[e]=function(e){for(var n,i=[],o=O(e),r=o.length-1,a=0;a<=r;a++)n=a===r?this:this.clone(!0),O(o[a])[t](n),c.apply(i,n.get());return this.pushStack(i)}}));var $e=new RegExp("^("+de+")(?!px)[a-z%]+$","i"),Ue=/^--/,Ge=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},Ze=function(e,t,n){var i,o,r={};for(o in t)r[o]=e.style[o],e.style[o]=t[o];for(o in i=n.call(e),t)e.style[o]=r[o];return i},Ke=new RegExp(fe.join("|"),"i");function Je(e,t,n){var i,o,r,a,s=Ue.test(t),l=e.style;return(n=n||Ge(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(k,"$1")||void 0),""!==a||ge(e)||(a=O.style(e,t)),!m.pixelBoxStyles()&&$e.test(a)&&Ke.test(t)&&(i=l.width,o=l.minWidth,r=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=n.width,l.width=i,l.minWidth=o,l.maxWidth=r)),void 0!==a?a+"":a}function Qe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",pe.appendChild(c).appendChild(u);var e=n.getComputedStyle(u);i="1%"!==e.top,l=12===t(e.marginLeft),u.style.right="60%",a=36===t(e.right),o=36===t(e.width),u.style.position="absolute",r=12===t(u.offsetWidth/3),pe.removeChild(c),u=null}}function t(e){return Math.round(parseFloat(e))}var i,o,r,a,s,l,c=y.createElement("div"),u=y.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===u.style.backgroundClip,O.extend(m,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),r},reliableTrDimensions:function(){var e,t,i,o;return null==s&&(e=y.createElement("table"),t=y.createElement("tr"),i=y.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;
11border:1px solid",t.style.height="1px",i.style.height="9px",i.style.display="block",pe.appendChild(e).appendChild(t).appendChild(i),o=n.getComputedStyle(t),s=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===t.offsetHeight,pe.removeChild(e)),s}}))}();var et=["Webkit","Moz","ms"],tt=y.createElement("div").style,nt={};function it(e){var t=O.cssProps[e]||nt[e];return t||(e in tt?e:nt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=et.length;n--;)if((e=et[n]+t)in tt)return e}(e)||e)}var ot=/^(none|table(?!-c[ea]).+)/,rt={position:"absolute",visibility:"hidden",display:"block"},at={letterSpacing:"0",fontWeight:"400"};function st(e,t,n){var i=he.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function lt(e,t,n,i,o,r){var a="width"===t?1:0,s=0,l=0,c=0;if(n===(i?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(c+=O.css(e,n+fe[a],!0,o)),i?("content"===n&&(l-=O.css(e,"padding"+fe[a],!0,o)),"margin"!==n&&(l-=O.css(e,"border"+fe[a]+"Width",!0,o))):(l+=O.css(e,"padding"+fe[a],!0,o),"padding"!==n?l+=O.css(e,"border"+fe[a]+"Width",!0,o):s+=O.css(e,"border"+fe[a]+"Width",!0,o));return!i&&r>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-s-.5))||0),l+c}function ct(e,t,n){var i=Ge(e),o=(!m.boxSizingReliable()||n)&&"border-box"===O.css(e,"boxSizing",!1,i),r=o,a=Je(e,t,i),s="offset"+t[0].toUpperCase()+t.slice(1);if($e.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&o||!m.reliableTrDimensions()&&M(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===O.css(e,"display",!1,i))&&e.getClientRects().length&&(o="border-box"===O.css(e,"boxSizing",!1,i),(r=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+lt(e,t,n||(o?"border":"content"),r,i,a)+"px"}function ut(e,t,n,i,o){return new ut.prototype.init(e,t,n,i,o)}O.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Je(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,a,s=ie(t),l=Ue.test(t),c=e.style;if(l||(t=it(s)),a=O.cssHooks[t]||O.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(e,!1,i))?o:c[t];"string"===(r=typeof n)&&(o=he.exec(n))&&o[1]&&(n=be(e,t,o),r="number"),null!=n&&n==n&&("number"!==r||l||(n+=o&&o[3]||(O.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var o,r,a,s=ie(t);return Ue.test(t)||(t=it(s)),(a=O.cssHooks[t]||O.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=Je(e,t,i)),"normal"===o&&t in at&&(o=at[t]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),O.each(["height","width"],(function(e,t){O.cssHooks[t]={get:function(e,n,i){if(n)return!ot.test(O.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ct(e,t,i):Ze(e,rt,(function(){return ct(e,t,i)}))},set:function(e,n,i){var o,r=Ge(e),a=!m.scrollboxSize()&&"absolute"===r.position,s=(a||i)&&"border-box"===O.css(e,"boxSizing",!1,r),l=i?lt(e,t,i,s,r):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-lt(e,t,"border",!1,r)-.5)),l&&(o=he.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=O.css(e,t)),st(0,n,l)}}})),O.cssHooks.marginLeft=Qe(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-Ze(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),O.each({margin:"",padding:"",border:"Width"},(function(e,t){O.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+fe[i]+t]=r[i]||r[i-2]||r[0];return o}},"margin"!==e&&(O.cssHooks[e+t].set=st)})),O.fn.extend({css:function(e,t){return Q(this,(function(e,t,n){var i,o,r={},a=0;if(Array.isArray(t)){for(i=Ge(e),o=t.length;a<o;a++)r[t[a]]=O.css(e,t[a],!1,i);return r}return void 0!==n?O.style(e,t,n):O.css(e,t)}),e,t,arguments.length>1)}}),O.Tween=ut,ut.prototype={constructor:ut,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||O.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(O.cssNumber[n]?"":"px")},cur:function(){var e=ut.propHooks[this.prop];return e&&e.get?e.get(this):ut.propHooks._default.get(this)},run:function(e){var t,n=ut.propHooks[this.prop];return this.options.duration?this.pos=t=O.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):ut.propHooks._default.set(this),this}},ut.prototype.init.prototype=ut.prototype,ut.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=O.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){O.fx.step[e.prop]?O.fx.step[e.prop](e):1!==e.elem.nodeType||!O.cssHooks[e.prop]&&null==e.elem.style[it(e.prop)]?e.elem[e.prop]=e.now:O.style(e.elem,e.prop,e.now+e.unit)}}},ut.propHooks.scrollTop=ut.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},O.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},O.fx=ut.prototype.init,O.fx.step={};var dt,ht,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function gt(){ht&&(!1===y.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(gt):n.setTimeout(gt,O.fx.interval),O.fx.tick())}function mt(){return n.setTimeout((function(){dt=void 0})),dt=Date.now()}function vt(e,t){var n,i=0,o={height:e};for(t=t?1:0;i<4;i+=2-t)o["margin"+(n=fe[i])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function bt(e,t,n){for(var i,o=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),r=0,a=o.length;r<a;r++)if(i=o[r].call(n,t,e))return i}function yt(e,t,n){var i,o,r=0,a=yt.prefilters.length,s=O.Deferred().always((function(){delete l.elem})),l=function(){if(o)return!1;for(var t=dt||mt(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),r=0,a=c.tweens.length;r<a;r++)c.tweens[r].run(i);return s.notifyWith(e,[c,i,n]),i<1&&a?n:(a||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:O.extend({},t),opts:O.extend(!0,{specialEasing:{},easing:O.easing._default},n),originalProperties:t,originalOptions:n,startTime:dt||mt(),duration:n.duration,tweens:[],createTween:function(t,n){var i=O.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||
vendor: 28,970 bytes, line 11
11c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(!function(e,t){var n,i,o,r,a;for(n in e)if(o=t[i=ie(n)],r=e[n],Array.isArray(r)&&(o=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),(a=O.cssHooks[i])&&"expand"in a)for(n in r=a.expand(r),delete e[i],r)n in e||(e[n]=r[n],t[n]=o);else t[i]=o}(u,c.opts.specialEasing);r<a;r++)if(i=yt.prefilters[r].call(c,e,u,c.opts))return v(i.stop)&&(O._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return O.map(u,bt,c),v(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),O.fx.timer(O.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}O.Animation=O.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return be(n.elem,e,he.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(X);for(var n,i=0,o=e.length;i<o;i++)n=e[i],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,o,r,a,s,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,g=e.nodeType&&ve(e),m=ae.get(e,"fxshow");for(i in n.queue||(null==(a=O._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,O.queue(e,"fx").length||a.empty.fire()}))}))),t)if(o=t[i],ft.test(o)){if(delete t[i],r=r||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!m||void 0===m[i])continue;g=!0}f[i]=m&&m[i]||O.style(e,i)}if((l=!O.isEmptyObject(t))||!O.isEmptyObject(f))for(i in d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=m&&m.display)&&(c=ae.get(e,"display")),"none"===(u=O.css(e,"display"))&&(c?u=c:(xe([e],!0),c=e.style.display||c,u=O.css(e,"display"),xe([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===O.css(e,"float")&&(l||(h.done((function(){p.display=c})),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,f)l||(m?"hidden"in m&&(g=m.hidden):m=ae.access(e,"fxshow",{display:c}),r&&(m.hidden=!g),g&&xe([e],!0),h.done((function(){for(i in g||xe([e]),ae.remove(e,"fxshow"),f)O.style(e,i,f[i])}))),l=bt(g?m[i]:0,i,h),i in m||(m[i]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),O.speed=function(e,t,n){var i=e&&"object"==typeof e?O.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return O.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in O.fx.speeds?i.duration=O.fx.speeds[i.duration]:i.duration=O.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){v(i.old)&&i.old.call(this),i.queue&&O.dequeue(this,i.queue)},i},O.fn.extend({fadeTo:function(e,t,n,i){return this.filter(ve).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=O.isEmptyObject(e),r=O.speed(t,n,i),a=function(){var t=yt(this,O.extend({},e),r);(o||ae.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===r.queue?this.each(a):this.queue(r.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,o=null!=e&&e+"queueHooks",r=O.timers,a=ae.get(this);if(o)a[o]&&a[o].stop&&i(a[o]);else for(o in a)a[o]&&a[o].stop&&pt.test(o)&&i(a[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(n),t=!1,r.splice(o,1));!t&&n||O.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=ae.get(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=O.timers,a=i?i.length:0;for(n.finish=!0,O.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<a;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish}))}}),O.each(["toggle","show","hide"],(function(e,t){var n=O.fn[t];O.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(vt(t,!0),e,i,o)}})),O.each({slideDown:vt("show"),slideUp:vt("hide"),slideToggle:vt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){O.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}})),O.timers=[],O.fx.tick=function(){var e,t=0,n=O.timers;for(dt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||O.fx.stop(),dt=void 0},O.fx.timer=function(e){O.timers.push(e),O.fx.start()},O.fx.interval=13,O.fx.start=function(){ht||(ht=!0,gt())},O.fx.stop=function(){ht=null},O.fx.speeds={slow:600,fast:200,_default:400},O.fn.delay=function(e,t){return e=O.fx&&O.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,i){var o=n.setTimeout(t,e);i.stop=function(){n.clearTimeout(o)}}))},function(){var e=y.createElement("input"),t=y.createElement("select").appendChild(y.createElement("option"));e.type="checkbox",m.checkOn=""!==e.value,m.optSelected=t.selected,(e=y.createElement("input")).value="t",e.type="radio",m.radioValue="t"===e.value}();var wt,xt=O.expr.attrHandle;O.fn.extend({attr:function(e,t){return Q(this,O.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){O.removeAttr(this,e)}))}}),O.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?O.prop(e,t,n):(1===r&&O.isXMLDoc(e)||(o=O.attrHooks[t.toLowerCase()]||(O.expr.match.bool.test(t)?wt:void 0)),void 0!==n?null===n?void O.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:null==(i=O.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&M(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,o=t&&t.match(X);if(o&&1===e.nodeType)for(;n=o[i++];)e.removeAttribute(n)}}),wt={set:function(e,t,n){return!1===t?O.removeAttr(e,n):e.setAttribute(n,n),n}},O.each(O.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=xt[t]||O.find.attr;xt[t]=function(e,t,i){var o,r,a=t.toLowerCase();return i||(r=xt[a],xt[a]=o,o=null!=n(e,t,i)?a:null,xt[a]=r),o}}));var Tt=/^(?:input|select|textarea|button)$/i,Ct=/^(?:a|area)$/i;function Ot(e){return(e.match(X)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function Mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(X)||[]}O.fn.extend({prop:function(e,t){return Q(this,O.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[O.propFix[e]||e]}))}}),O.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&O.isXMLDoc(e)||(t=O.propFix[t]||t,o=O.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=O.find.attr(e,"tabindex");return t?parseInt(t,10):Tt.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(O.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)}}),O.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){O.propFix[this.toLowerCase()]=this})),O.fn.extend({addClass:function(e){var t,n,i,o,r,a;return v(e)?this.each((function(t){O(this).addClass(e.call(this,t,Et(this)))})):(t=Mt(e)).length?this.each((function(){if(i=Et(this),n=1===this.nodeType&&" "+Ot(i)+" "){for(r=0;r<t.length;r++)o=t[r],n.indexOf(" "+o+" ")<0&&(n+=o+" ");a=Ot(n),i!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,n,i,o,r,a;return v(e)?this.each((function(t){O(this).removeClass(e.call(this,t,Et(this)))})):arguments.length?(t=Mt(e)).length?this.each((function(){if(i=Et(this),n=1===this.nodeType&&" "+Ot(i)+" "){for(r=0;r<t.length;r++)for(o=t[r];n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");a=Ot(n),i!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,i,o,r,a=typeof e,s="string"===a||Array.isArray(e);return v(e)?this.each((function(n){O(this).toggleClass(e.call(this,n,Et(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Mt(e),this.each((function(){if(s)for(r=O(this),o=0;o<n.length;o++)i=n[o],r.hasClass(i)?r.removeClass(i):r.addClass(i);else void 0!==e&&"boolean"!==a||((i=Et(this))&&ae.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===e?"":ae.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+Ot(Et(n))+" ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g;O.fn.extend({val:function(e){var t,n,i,o=this[0];return arguments.length?(i=v(e),this.each((function(n){var o;1===this.nodeType&&(null==(o=i?e.call(this,n,O(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=O.map(o,(function(e){return null==e?"":e+""}))),(t=O.valHooks[this.type]||O.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))}))):o?(t=O.valHooks[o.type]||O.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(St,""):null==n?"":n:void 0}}),O.extend({valHooks:{option:{get:function(e){var t=O.find.attr(e,"value");return null!=t?t:Ot(O.text(e))}},select:{get:function(e){var t,n,i,o=e.options,r=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?r+1:o.length;for(i=r<0?l:a?r:0;i<l;i++)if(((n=o[i]).selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!M(n.parentNode,"optgroup"))){if(t=O(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,i,o=e.options,r=O.makeArray(t),a=o.length;a--;)((i=o[a]).selected=O.inArray(O.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),O.each(["radio","checkbox"],(function(){O.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=O.inArray(O(e).val(),t)>-1}},m.checkOn||(O.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Dt=n.location,At={guid:Date.now()},Pt=/\?/;O.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return i=t&&t.getElementsByTagName("parsererror")[0],t&&!i||O.error("Invalid XML: "+(i?O.map(i.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var kt=/^(?:focusinfocus|focusoutblur)$/,jt=function(e){e.stopPropagation()};O.extend(O.event,{trigger:function(e,t,i,o){var r,a,s,l,c,u,d,h,p=[i||y],g=f.call(e,"type")?e.type:e,m=f.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=i=i||y,3!==i.nodeType&&8!==i.nodeType&&!kt.test(g+O.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[O.expando]?e:new O.Event(g,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:O.makeArray(t,[e]),d=O.event.special[g]||{},o||!d.trigger||!1!==d.trigger.apply(i,t))){if(!o&&!d.noBubble&&!b(i)){for(l=d.delegateType||g,kt.test(l+g)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(i.ownerDocument||y)&&p.push(s.defaultView||s.parentWindow||n)}for(r=0;(a=p[r++])&&!e.isPropagationStopped();)h=a,e.type=r>1?l:d.bindType||g,(u=(ae.get(a,"events")||Object.create(null))[e.type]&&ae.get(a,"handle"))&&u.apply(a,t),(u=c&&a[c])&&u.apply&&oe(a)&&(e.result=u.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,o||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!oe(i)||c&&v(i[g])&&!b(i)&&((s=i[c])&&(i[c]=null),O.event.triggered=g,e.isPropagationStopped()&&h.addEventListener(g,jt),i[g](),e.isPropagationStopped()&&h.removeEventListener(g,jt),O.event.triggered=void 0,s&&(i[c]=s)),e.result}},simulate:function(e,t,n){var i=O.extend(new O.Event,n,{type:e,isSimulated:!0});O.event.trigger(i,null,t)}}),O.fn.extend({trigger:function(e,t){return this.each((function(){O.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return O.event.trigger(e,t,n,!0)}});var It=/\[\]$/,Lt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,_t=/^(?:input|select|textarea|keygen)/i;function Ft(e,t,n,i){var o;if(Array.isArray(t))O.each(t,(function(t,o){n||It.test(e)?i(e,o):Ft(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,i)}));else if(n||"object"!==T(t))i(e,t);else for(o in t)Ft(e+"["+o+"]",t[o],n,i)}O.param=function(e,t){var n,i=[],o=function(e,t){var n=v(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!O.isPlainObject(e))O.each(e,(function(){o(this.name,this.value)}));else for(n in e)Ft(n,e[n],t,o);return i.join("&")},O.fn.extend({serialize:function(){return O.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=O.prop(this,"elements");return e?O.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!O(this).is(":disabled")&&_t.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!Oe.test(e))})).map((function(e,t){var n=O(this).val();return null==n?null:Array.isArray(n)?O.map(n,(function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}})):{name:t.name,value:n.replace(Lt,"\r\n")}})).get()}});var Rt=/%20/g,Ht=/#.*$/,zt=/([?&])_=[^&]*/,Bt=/^(.*?):[ \t]*([^\r\n]*)$/gm,qt=/^(?:GET|HEAD)$/,Wt=/^\/\//,Yt={},Vt={},Xt="*/".concat("*"),$t=y.createElement("a");function Ut(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,r=t.toLowerCase().match(X)||[];if(v(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Gt(e,t,n,i){var o={},r=e===Vt;function a(s){var l;return o[s]=!0,O.each(e[s]||[],(function(e,s){var c=s(t,n,i);return"string"!=typeof c||r||o[c]?r?!(l=c):void 0:(t.dataTypes.unshift(c),a(c),!1)})),l}return a(t.dataTypes[0])||!o["*"]&&a("*")}function Zt(e,t){var n,i,o=O.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:i||(i={}))[n]=t[n]);return i&&O.extend(!0,e,i),e}$t.href=Dt.href,O.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Dt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xt,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":O.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Zt(Zt(e,O.ajaxSettings),t):Zt(O.ajaxSettings,e)},ajaxPrefilter:Ut(Yt),ajaxTransport:Ut(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,r,a,s,l,c,u,d,h,f=O.ajaxSetup({},t),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?O(p):O.event,m=O.Deferred(),v=O.Callbacks("once memory"),b=f.statusCode||{},w={},x={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Bt.exec(r);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?r:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),E(0,t),this}};if(m.promise(C),f.url=((e||f.url||Dt.href)+"").replace(Wt,Dt.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(X)||[""],null==f.crossDomain){l=y.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=$t.protocol+"//"+$t.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=O.param(f.data,f.traditional)),Gt(Yt,f,t,C),c)return C;for(d in(u=O.event&&f.global)&&0==O.active++&&O.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!qt.test(f.type),o=f.url.replace(Ht,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Rt,"+")):(h=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(Pt.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(zt,"$1"),h=(Pt.test(o)?"&":"?")+"_="+At.guid+++h),f.url=o+h),f.ifModified&&(O.lastModified[o]&&C.setRequestHeader("If-Modified-Since",O.lastModified[o]),O.etag[o]&&C.setRequestHeader("If-None-Match",O.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Xt+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,C,f)||c))return C.abort();if(T="abort",v.add(f.complete),C.done(f.success),C.fail(f.error),i=Gt(Vt,f,t,C)){if(C.readyState=1,u&&g.trigger("ajaxSend",[C,f]),c)return C;f.async&&f.timeout>0&&(s=n.setTimeout((function(){C.abort("timeout")}),f.timeout));try{c=!1,i.send(w,E)}catch(e){if(c)throw e;E(-1,e)}}else E(-1,"No Transport");function E(e,t,a,l){var d,h,y,w,x,T=t;c||(c=!0,s&&n.clearTimeout(s),i=void 0,r=l||"",C.readyState=e>0?4:0,d=e>=200&&e<300||304===e,a&&(w=function(e,t,n){for(var i,o,r,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(o in s)if(s[o]&&s[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){r=o;break}a||(a=o)}r=r||a}if(r)return r!==l[0]&&l.unshift(r),n[r]}(f,C,a)),!d&&O.inArray("script",f.dataTypes)>-1&&O.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(e,t,n,i){var o,r,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=c[l+" "+r]||c["* "+r]))for(o in c)if((s=o.split(" "))[1]===r&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[o]:!0!==c[o]&&(r=s[0],u.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 "+l+" to "+r}}}return{state:"success",data:t}}(f,w,C,d),d?(f.ifModified&&((x=C.getResponseHeader("Last-Modified"))&&(O.lastModified[o]=x),(x=C.getResponseHeader("etag"))&&(O.etag[o]=x)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=w.state,h=w.data,d=!(y=w.error))):(y=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",d?m.resolveWith(p,[h,T,C]):m.rejectWith(p,[C,T,y]),C.statusCode(b),b=void 0,u&&g.trigger(d?"ajaxSuccess":"ajaxError",[C,f,d?h:y]),v.fireWith(p,[C,T]),u&&(g.trigger("ajaxComplete",[C,f]),--O.active||O.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return O.get(e,t,n,"json")},getScript:function(e,t){return O.get(e,void 0,t,"script")}}),O.each(["get","post"],(function(e,t){O[t]=function(e,n,i,o){return v(n)&&(o=o||i,i=n,n=void 0),O.ajax(O.extend({url:e,type:t,dataType:o,data:n,success:i},O.isPlainObject(e)&&e))}})),O.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),O._evalUrl=function(e,t,n){return O.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){O.globalEval(e,t,n)}})},O.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=O(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){O(this).wrapInner(e.call(this,t))})):this.each((function(){var t=O(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){O(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){O(this).replaceWith(this.childNodes)})),this}}),O.expr.pseudos.hidden=function(e){return!O.expr.pseudos.visible(e)},O.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},O.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Kt={0:200,1223:204},Jt=O.ajaxSettings.xhr();m.cors=!!Jt&&"withCredentials"in Jt,m.ajax=Jt=!!Jt,O.ajaxTransport((function(e){var t,i;if(m.cors||Jt&&!e.crossDomain)return{send:function(o,r){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)s.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=i=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(Kt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),i=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&i()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),O.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),O.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 O.globalEval(e),e}}}),O.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),O.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,o){t=O("<script>").attr(e.scriptAttrs||{}).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)}),y.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Qt,en=[],tn=/(=)\?(?=&|$)|\?\?/;O.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=en.pop()||O.expando+"_"+At.guid++;return this[e]=!0,e}}),O.ajaxPrefilter("json jsonp",(function(e,t,i){var o,r,a,s=!1!==e.jsonp&&(tn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&tn.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(tn,"$1"+o):!1!==e.jsonp&&(e.url+=(Pt.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||O.error(o+" was not called"),a[0]},e.dataTypes[0]="json",r=n[o],n[o]=function(){a=arguments},i.always((function(){void 0===r?O(n).removeProp(o):n[o]=r,e[o]&&(e.jsonpCallback=t.jsonpCallback,en.push(o)),a&&v(r)&&r(a[0]),a=r=void 0})),"script"})),m.createHTMLDocument=((Qt=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Qt.childNodes.length),O.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((i=(t=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,t.head.appendChild(i)):t=y),r=!n&&[],(o=H.exec(e))?[t.createElement(o[1])]:(o=ke([e],t,r),r&&r.length&&O(r).remove(),O.merge([],o.childNodes)));var i,o,r},O.fn.load=function(e,t,n){var i,o,r,a=this,s=e.indexOf(" ");return s>-1&&(i=Ot(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&O.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done((function(e){r=arguments,a.html(i?O("<div>").append(O.parseHTML(e)).find(i):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,r||[e.responseText,t,e])}))}),this},O.expr.pseudos.animated=function(e){return O.grep(O.timers,(function(t){return e===t.elem})).length},O.offset={setOffset:function(e,t,n){var i,o,r,a,s,l,c=O.css(e,"position"),u=O(e),d={};"static"===c&&(e.style.position="relative"),s=u.offset(),r=O.css(e,"top"),l=O.css(e,"left"),("absolute"===c||"fixed"===c)&&(r+l).indexOf("auto")>-1?(a=(i=u.position()).top,o=i.left):(a=parseFloat(r)||0,o=parseFloat(l)||0),v(t)&&(t=t.call(e,n,O.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+o),"using"in t?t.using.call(e,d):u.css(d)}},O.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){O.offset.setOffset(this,e,t)}));var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],o={top:0,left:0};if("fixed"===O.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===O.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((o=O(e).offset()).top+=O.css(e,"borderTopWidth",!0),o.left+=O.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-O.css(i,"marginTop",!0),left:t.left-o.left-O.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===O.css(e,"position");)e=e.offsetParent;return e||pe}))}}),O.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;O.fn[e]=function(i){return Q(this,(function(e,i,o){var r;if(b(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===o)return r?r[t]:e[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):e[i]=o}),e,i,arguments.length)}})),O.each(["top","left"],(function(e,t){O.cssHooks[t]=Qe(m.pixelPosition,(function(e,n){if(n)return n=Je(e,t),$e.test(n)?O(e).position()[t]+"px":n}))})),O.each({Height:"height",Width:"width"},(function(e,t){O.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,i){O.fn[i]=function(o,r){var a=arguments.length&&(n||"boolean"!=typeof o),s=n||(!0===o||!0===r?"margin":"border");return Q(this,(function(t,n,o){var r;return b(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===o?O.css(t,n,s):O.style(t,n,o,s)}),t,a?o:void 0,a)}}))})),O.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){O.fn[t]=function(e){return this.on(t,e)}})),O.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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),O.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){O.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var nn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;O.proxy=function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return i=s.call(arguments,2),(o=function(){return e.apply(t||this,i.concat(s.call(arguments)))}).guid=e.guid=e.guid||O.guid++,o},O.holdReady=function(e){e?O.readyWait++:O.ready(!0)},O.isArray=Array.isArray,O.parseJSON=JSON.parse,O.nodeName=M,O.isFunction=v,O.isWindow=b,O.camelCase=ie,O.type=T,O.now=Date.now,O.isNumeric=function(e){var t=O.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},O.trim=function(e){return null==e?"":(e+"").replace(nn,"$1")},void 0===(i=function(){return O}
11.apply(t,[]))||(e.exports=i);var on=n.jQuery,rn=n.$;return O.noConflict=function(e){return n.$===O&&(n.$=rn),e&&n.jQuery===O&&(n.jQuery=on),O},void 0===o&&(n.jQuery=n.$=O),O}))},function(e,t,n){"use strict";n.r(t),n.d(t,"Carousel",(function(){return Q})),n.d(t,"Fancybox",(function(){return Tt})),n.d(t,"Panzoom",(function(){return _}));const i=(e,t=1e4)=>(e=parseFloat(e+"")||0,Math.round((e+Number.EPSILON)*t)/t),o=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;const t=e.scrollHeight>e.clientHeight,n=window.getComputedStyle(e).overflowY,i=-1!==n.indexOf("hidden"),o=-1!==n.indexOf("visible");return t&&!i&&!o},r=function(e,t){return!(!e||e===document.body||t&&e===t)&&(o(e)?e:r(e.parentElement,t))},a=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var n=document.createElement("div");t.firstChild;)n.appendChild(t.firstChild);return n}return t.firstChild},s=e=>(""+(e||"")).split(" ").filter(e=>!!e),l=(e,t,n)=>{e&&s(t).forEach(t=>{e.classList.toggle(t,n||!1)})};class c{constructor(e){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=e,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.time=Date.now()}}const u={passive:!1};class d{constructor(e,{start:t=(()=>!0),move:n=(()=>{}),end:i=(()=>{})}){Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=e,this.startCallback=t,this.moveCallback=n,this.endCallback=i;for(const e of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[e]=this[e].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,u),this.element.addEventListener("touchstart",this.onTouchStart,u),this.element.addEventListener("touchmove",this.onMove,u),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(e){if(!e.buttons||0!==e.button)return;const t=new c(e);this.currentPointers.some(e=>e.id===t.id)||this.triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(e){for(const t of Array.from(e.changedTouches||[]))this.triggerPointerStart(new c(t),e);window.addEventListener("blur",this.onWindowBlur)}onMove(e){const t=this.currentPointers.slice(),n="changedTouches"in e?Array.from(e.changedTouches||[]).map(e=>new c(e)):[new c(e)],i=[];for(const e of n){const t=this.currentPointers.findIndex(t=>t.id===e.id);t<0||(i.push(e),this.currentPointers[t]=e)}i.length&&this.moveCallback(e,this.currentPointers.slice(),t)}onPointerEnd(e){e.buttons>0&&0!==e.button||(this.triggerPointerEnd(e,new c(e)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(e){for(const t of Array.from(e.changedTouches||[]))this.triggerPointerEnd(e,new c(t))}triggerPointerStart(e,t){return!!this.startCallback(t,e,this.currentPointers.slice())&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}triggerPointerEnd(e,t){const n=this.currentPointers.findIndex(e=>e.id===t.id);n<0||(this.currentPointers.splice(n,1),this.startPointers.splice(n,1),this.endCallback(e,t,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){const e=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY}),e,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,u),this.element.removeEventListener("touchstart",this.onTouchStart,u),this.element.removeEventListener("touchmove",this.onMove,u),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}function h(e,t){return t?Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)):0}function f(e,t){return t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e}const p=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),g=(e,...t)=>{const n=t.length;for(let i=0;i<n;i++){const n=t[i]||{};
11Object.entries(n).forEach(([t,n])=>{const i=Array.isArray(n)?[]:{};e[t]||Object.assign(e,{[t]:i}),p(n)?Object.assign(e[t],g(i,n)):Array.isArray(n)?Object.assign(e,{[t]:[...n]}):Object.assign(e,{[t]:n})})}return e},m=function(e,t){return e.split(".").reduce((e,t)=>"object"==typeof e?e[t]:void 0,t)};class v{constructor(e={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(e);for(const e of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))e.startsWith("on")&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}setOptions(e){this.options=e?g({},this.constructor.defaults,e):{};for(const[e,t]of Object.entries(this.option("on")||{}))this.on(e,t)}option(e,...t){let n=m(e,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...t)),n}optionFor(e,t,n,...i){let o=m(t,e);var r;"string"!=typeof(r=o)||isNaN(r)||isNaN(parseFloat(r))||(o=parseFloat(o)),"true"===o&&(o=!0),"false"===o&&(o=!1),o&&"function"==typeof o&&(o=o.call(this,this,e,...i));let a=m(t,this.options);return a&&"function"==typeof a?o=a.call(this,this,e,...i,o):void 0===o&&(o=a),void 0===o?n:o}cn(e){const t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,(e,t,n)=>{let i="";return n?i=this.option(`${t[0]+t.toLowerCase().substring(1)}.l10n.${n}`):t&&(i=this.option("l10n."+t)),i||(i=e),i});for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}on(e,t){let n=[];"string"==typeof e?n=e.split(" "):Array.isArray(e)&&(n=e),this.events||(this.events=new Map),n.forEach(e=>{let n=this.events.get(e);n||(this.events.set(e,[]),n=[]),n.includes(t)||n.push(t),this.events.set(e,n)})}off(e,t){let n=[];"string"==typeof e?n=e.split(" "):Array.isArray(e)&&(n=e),n.forEach(e=>{const n=this.events.get(e);if(Array.isArray(n)){const e=n.indexOf(t);e>-1&&n.splice(e,1)}})}emit(e,...t){[...this.events.get(e)||[]].forEach(e=>e(this,...t)),"*"!==e&&this.emit("*",e,...t)}}Object.defineProperty(v,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.34"}),Object.defineProperty(v,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class b extends v{constructor(e={}){super(e),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(e={}){const t=new Map;for(const[n,i]of Object.entries(e)){const e=this.option(n),o=this.plugins[n];o||!1===e?o&&!1===e&&(o.detach(),delete this.plugins[n]):t.set(n,new i(this,e||{}))}for(const[e,n]of t)this.plugins[e]=n,n.attach()}detachPlugins(e){e=e||Object.keys(this.plugins);for(const t of e){const e=this.plugins[t];e&&e.detach(),delete this.plugins[t]}return this.emit("detachPlugins"),this}}var y;!function(e){e[e.Init=0]="Init",e[e.Error=1]="Error",e[e.Ready=2]="Ready",e[e.Panning=3]="Panning",e[e.Mousemove=4]="Mousemove",e[e.Destroy=5]="Destroy"}(y||(y={}));const w=["a","b","c","d","e","f"],x={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},T={content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:x},C='<circle cx="25" cy="25" r="20"></circle>
11',O='<div class="f-spinner"><svg viewBox="0 0 50 50">'+C+C+"</svg></div>",E=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,M=(e,t)=>{e&&s(t).forEach(t=>{e.classList.remove(t)})},S=(e,t)=>{e&&s(t).forEach(t=>{e.classList.add(t)})},D={a:1,b:0,c:0,d:1,e:0,f:0},A=1e4,P="mousemove",k="drag",j="content",I="auto";let L=null,N=null;class _ extends b{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===N&&(N=window.matchMedia("(hover: none)").matches),N}get isMobile(){return null===L&&(L=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),L}get panMode(){return this.options.panMode!==P||this.isTouchDevice?k:P}get panOnlyZoomed(){const e=this.options.panOnlyZoomed;return e===I?this.isTouchDevice:e}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){const{a:e,b:t}=this.current;return Math.sqrt(e*e+t*t)||1}get targetScale(){const{a:e,b:t}=this.target;return Math.sqrt(e*e+t*t)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:e}=this;return e.fullWidth/e.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:e,contentRect:t}=this,n=Math.max(e.height/t.fitHeight,e.width/t.fitWidth)||1;return Math.min(this.fullScale,n)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){const e=this.content;return!!(e&&e instanceof HTMLImageElement)&&!e.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const e of w){const t="e"==e||"f"===e?1e-4:1e-5;if(Math.abs(this.target[e]-this.current[e])>t)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(e,t={},n={}){var i;if(super(t),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:y.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},D)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},D)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!e)throw new Error("Container Element Not Found");this.container=e,this.initContent(),this.attachPlugins(Object.assign(Object.assign({}
11,_.Plugins),n)),this.emit("attachPlugins"),this.emit("init");const o=this.content;if(o.addEventListener("load",this.onLoad),o.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){e.classList.add(this.cn("isLoading"));const t=a(O);!e.contains(o)||o.parentElement instanceof HTMLPictureElement?this.spinner=e.appendChild(t):this.spinner=(null===(i=o.parentElement)||void 0===i?void 0:i.insertBefore(t,o))||null}this.emit("beforeLoad")}else queueMicrotask(()=>{this.enable()})}initContent(){const{container:e}=this,t=this.cn(j);let n=this.option(j)||e.querySelector("."+t);if(n||(n=e.querySelector("img,picture")||e.firstElementChild,n&&S(n,t)),n instanceof HTMLPictureElement&&(n=n.querySelector("img")),!n)throw new Error("No content found");this.content=n}onLoad(){const{spinner:e,container:t,state:n}=this;e&&(e.remove(),this.spinner=null),this.option("spinner")&&t.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),n===y.Init?this.enable():this.updateMetrics()}onError(){this.state!==y.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=y.Error,this.emit("error"))}getNextScale(e){const{fullScale:t,targetScale:n,coverScale:i,maxScale:o,minScale:r}=this;let a=r;switch(e){case"toggleMax":a=n-r<.5*(o-r)?o:r;break;case"toggleCover":a=n-r<.5*(i-r)?i:r;break;case"toggleZoom":a=n-r<.5*(t-r)?t:r;break;case"iterateZoom":let e=[1,t,o].sort((e,t)=>e-t),s=e.findIndex(e=>e>n+1e-5);a=e[s]||1}return a}attachObserver(){var e;const t=()=>{const{container:e,containerRect:t}=this;return Math.abs(t.width-e.getBoundingClientRect().width)>.1||Math.abs(t.height-e.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver(()=>{this.updateTimer||(t()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout(()=>{t()&&this.onResize(),this.updateTimer=null},500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))})),null===(e=this.resizeObserver)||void 0===e||e.observe(this.container)}detachObserver(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect()}attachEvents(){const{container:e}=this;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new d(e,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(P,this.onMouseMove)}detachEvents(){var e;const{container:t}=this;t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(e=this.pointerTracker)||void 0===e||e.stop(),this.pointerTracker=null,document.removeEventListener(P,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){this.setTargetForce();const e=this.friction,t=this.option("maxVelocity");for(const n of w)e?(this.velocity[n]*=1-e,t&&!this.isScaling&&(this.velocity[n]=Math.max(Math.min(this.velocity[n],t),-1*t)),this.current[n]+=this.velocity[n]):this.current[n]=this.target[n];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame(()=>this.animate()):this.stop("current")}setTargetForce(){for(const e of w)"e"===e&&this.isBouncingX||"f"===e&&this.isBouncingY||(this.velocity[e]=(1/(1-this.friction)-1)*(this.target[e]-this.current[e]))}checkBounds(e=0,t=0){const{current:n}=this,i=n.e+e,o=n.f+t,r=this.getBounds(),{x:a,y:s}=r,l=a.min,c=a.max,u=s.min,d=s.max;let h=0,f=0;return l!==1/0&&i<l?h=l-i:c!==1/0&&i>c&&(h=c-i),u!==1/0&&o<u?f=u-o:d!==1/0&&o>d&&(f=d-o),Math.abs(h)<1e-4&&(h=0),Math.abs(f)<1e-4&&(f=0),Object.assign(Object.assign({},r),{xDiff:h,yDiff:f,inBounds:!h&&!f})}clampTargetBounds(){const{target:e}=this,{x:t,y:n}=this.getBounds();t.min!==1/0&&(e.e=Math.max(e.e,t.min)),t.max!==1/0&&(e.e=Math.min(e.e,t.max)),n.min!==1/0&&(e.f=Math.max(e.f,n.min)),n.max!==1/0&&(e.f=Math.min(e.f,n.max))}calculateContentDim(e=this.current){const{content:t,contentRect:n}=this,{fitWidth:i,fitHeight:o,fullWidth:r,fullHeight:a}=n;let s=r,l=a;
11if(this.option("zoom")||0!==this.angle){const n=!(t instanceof HTMLImageElement||"none"!==window.getComputedStyle(t).maxWidth&&"none"!==window.getComputedStyle(t).maxHeight),c=n?r:i,u=n?a:o,d=this.getMatrix(e),h=new DOMPoint(0,0).matrixTransform(d),f=new DOMPoint(0+c,0).matrixTransform(d),p=new DOMPoint(0+c,0+u).matrixTransform(d),g=new DOMPoint(0,0+u).matrixTransform(d),m=Math.abs(p.x-h.x),v=Math.abs(p.y-h.y),b=Math.abs(g.x-f.x),y=Math.abs(g.y-f.y);s=Math.max(m,b),l=Math.max(v,y)}return{contentWidth:s,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===P||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:e}=this,{x:t,y:n,xDiff:i,yDiff:o}=this.checkBounds(),r=this.option("maxVelocity");let a=this.velocity.e,s=this.velocity.f;0!==i?(this.isBouncingX=!0,i*a<=0?a+=.14*i:(a=.14*i,t.min!==1/0&&(this.target.e=Math.max(e.e,t.min)),t.max!==1/0&&(this.target.e=Math.min(e.e,t.max))),r&&(a=Math.max(Math.min(a,r),-1*r))):this.isBouncingX=!1,0!==o?(this.isBouncingY=!0,o*s<=0?s+=.14*o:(s=.14*o,n.min!==1/0&&(this.target.f=Math.max(e.f,n.min)),n.max!==1/0&&(this.target.f=Math.min(e.f,n.max))),r&&(s=Math.max(Math.min(s,r),-1*r))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=a),this.isBouncingY&&(this.velocity.f=s)}enable(){const{content:e}=this,t=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);for(const e of w)this.current[e]=this.target[e]=t[e];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=y.Ready,this.emit("ready")}onClick(e){var t;"click"===e.type&&0===e.detail&&(this.dragOffset.x=0,this.dragOffset.y=0),this.isDragging&&(null===(t=this.pointerTracker)||void 0===t||t.clear(),this.trackingPoints=[],this.startDecelAnim());const n=e.target;if(!n||e.defaultPrevented)return;if(n.hasAttribute("disabled"))return e.preventDefault(),void e.stopPropagation();if((()=>{const e=window.getSelection();return e&&"Range"===e.type})()&&!n.closest("button"))return;const i=n.closest("[data-panzoom-action]"),o=n.closest("[data-panzoom-change]"),r=i||o,a=r&&E(r)?r.dataset:null;if(a){const t=a.panzoomChange,n=a.panzoomAction;if((t||n)&&e.preventDefault(),t){let n={};try{n=JSON.parse(t)}catch(e){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(n)}if(n)return void(this[n]&&this[n]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return e.preventDefault(),void e.stopPropagation();if(n.closest("[data-fancybox]"))return;const s=this.content.getBoundingClientRect(),l=this.dragStart;if(l.time&&!this.canZoomOut()&&(Math.abs(s.x-l.x)>2||Math.abs(s.y-l.y)>2))return;this.dragStart.time=0;const c=t=>{this.option("zoom",e)&&t&&"string"==typeof t&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(t)&&"function"==typeof this[t]&&(e.preventDefault(),this[t]({event:e}))},u=this.option("click",e),d=this.option("dblClick",e);d?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout(()=>{1===this.clicks?(this.emit("click",e),!e.defaultPrevented&&u&&c(u)):(this.emit("dblClick",e),e.defaultPrevented||c(d)),this.clicks=0,this.clickTimer=null},350))):(this.emit("click",e),!e.defaultPrevented&&u&&c(u))}addTrackingPoint(e){const t=this.trackingPoints.filter(e=>e.time>Date.now()-100);t.push(e),this.trackingPoints=t}onPointerDown(e,t,n){var i;if(!1===this.option("touch",e))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const o=this.content.getBoundingClientRect();if(this.dragStart={x:o.x,y:o.y,top:o.top,left:o.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===P&&this.targetScale>1)return e.preventDefault(),e.stopPropagation(),!1;const r=e.composedPath()[0];if(!n.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(r.nodeName)||r.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(i=window.getSelection())||void 0===i||i.removeAllRanges()}if("mousedown"===e.type)["A","BUTTON"].includes(r.nodeName)||e.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(t),this.emit
11("touchStart",e)),!0}onPointerMove(e,t,n){if(!1===this.option("touch",e))return;if(!this.isDragging)return;if(t.length<2&&this.panOnlyZoomed&&i(this.targetScale)<=i(this.minScale))return;if(this.emit("touchMove",e),e.defaultPrevented)return;this.addTrackingPoint(t[0]);const{content:o}=this,a=f(n[0],n[1]),s=f(t[0],t[1]);let l=0,c=0;if(t.length>1){const e=o.getBoundingClientRect();l=a.clientX-e.left-.5*e.width,c=a.clientY-e.top-.5*e.height}const u=h(n[0],n[1]),d=h(t[0],t[1]);let p=u?d/u:1,g=s.clientX-a.clientX,m=s.clientY-a.clientY;this.dragOffset.x+=g,this.dragOffset.y+=m,this.dragOffset.time=Date.now()-this.dragStart.time;let v=i(this.targetScale)===i(this.minScale)&&this.option("lockAxis");if(v&&!this.lockedAxis)if("xy"===v||"y"===v||"touchmove"===e.type){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void e.preventDefault();const t=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=t>45&&t<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,g=0,m=0}else this.lockedAxis=v;if(r(e.target,this.content)&&(v="x",this.dragOffset.y=0),v&&"xy"!==v&&this.lockedAxis!==v&&i(this.targetScale)===i(this.minScale))return;e.cancelable&&e.preventDefault(),this.container.classList.add(this.cn("isDragging"));const b=this.checkBounds(g,m);this.option("rubberband")?("x"!==this.isInfinite&&(b.xDiff>0&&g<0||b.xDiff<0&&g>0)&&(g*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*b.xDiff))),"y"!==this.isInfinite&&(b.yDiff>0&&m<0||b.yDiff<0&&m>0)&&(m*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*b.yDiff)))):(b.xDiff&&(g=0),b.yDiff&&(m=0));const y=this.targetScale,w=this.minScale,x=this.maxScale;y<.5*w&&(p=Math.max(p,w)),y>
111.5*x&&(p=Math.min(p,x)),"y"===this.lockedAxis&&i(y)===i(w)&&(g=0),"x"===this.lockedAxis&&i(y)===i(w)&&(m=0),this.applyChange({originX:l,originY:c,panX:g,panY:m,scale:p,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(e,t,n){if(n.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(t),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),r(e.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",e),this.isDragging=!1,this.lockedAxis=!1,this.state!==y.Destroy&&(e.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var e;const t=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of w)this.velocity[e]=0;this.target.e=this.current.e,this.target.f=this.current.f,M(this.container,"is-scaling"),M(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:n}=this,o=n[0],r=n[n.length-1];let a=0,s=0,l=0;r&&o&&(a=r.clientX-o.clientX,s=r.clientY-o.clientY,l=r.time-o.time);const c=(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1;1!==c&&(a*=c,s*=c);let u=0,d=0,h=0,f=0,p=this.option("decelFriction");const g=this.targetScale;if(l>0){h=Math.abs(a)>3?a/(l/30):0,f=Math.abs(s)>3?s/(l/30):0;const e=this.option("maxVelocity");e&&(h=Math.max(Math.min(h,e),-1*e),f=Math.max(Math.min(f,e),-1*e))}h&&(u=h/(1/(1-p)-1)),f&&(d=f/(1/(1-p)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&i(g)===this.minScale)&&(u=h=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&i(g)===this.minScale)&&(d=f=0);const m=this.dragOffset.x,v=this.dragOffset.y,b=this.option("dragMinThreshold")||0;Math.abs(m)<b&&Math.abs(v)<b&&(u=d=0,h=f=0),(this.option("zoom")&&(g<this.minScale-1e-5||g>this.maxScale+1e-5)||t&&!u&&!d)&&(p=.35),this.applyChange({panX:u,panY:d,friction:p}),this.emit("decel",h,f,m,v)}onWheel(e){var t=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e}));const n=Math.max(-1,Math.min(1,t));if(this.emit("wheel",e,n),this.panMode===P)return;if(e.defaultPrevented)return;const i=this.option("wheel");"pan"===i?(e.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-e.deltaX,panY:2*-e.deltaY,bounce:!1})):"zoom"===i&&!1!==this.option("zoom")&&this.zoomWithWheel(e)}onMouseMove(e){this.panWithMouse(e)}onKeydown(e){"Escape"===e.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:e,target:t,content:n,contentRect:o}=this,r=Object.assign({},D);for(const n of w){const o="e"==n||"f"===n?A:1e5;r[n]=i(e[n],o),Math.abs(t[n]-e[n])<("e"==n||"f"===n?.51:.001)&&(e[n]=t[n])}let{a:a,b:s,c:l,d:c,e:u,f:d}=r,h=`matrix(${a}, ${s}, ${l}, ${c}, ${u}, ${d})`,f=n.parentElement instanceof HTMLPictureElement?n.parentElement:n;if(this.option("transformParent")&&(f=f.parentElement||f),f.style.transform===h)return;f.style.transform=h;const{contentWidth:p,contentHeight:g}=this.calculateContentDim();o.width=p,o.height=g,this.emit("afterTransform")}updateMetrics(e=!1){var t;if(!this||this.state===y.Destroy)return;if(this.isContentLoading)return;const n=Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1),{container:o,content:r}=this,a=r instanceof HTMLImageElement,s=o.getBoundingClientRect(),l=getComputedStyle(this.container);let c=s.width*n,u=s.height*n;const d=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),h=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),f=u-d;this.containerRect={width:c,height:u,innerWidth:h,innerHeight:f};const p=parseFloat(r.dataset.width||"")||(e=>{let t=0;return t=e instanceof HTMLImageElement?e.naturalWidth:e instanceof SVGElement?e.width.baseVal.value:Math.max(e.offsetWidth,e.scrollWidth),t||0})(r),g=parseFloat(r.dataset.height||"")||(e=>{let t=0;return t=e instanceof HTMLImageElement?e.naturalHeight:e instanceof SVGElement?e.height.baseVal.value:Math.max(e.offsetHeight,e.scrollHeight),t||0})(r);let m=this.option("width",p)||I,v=this.option("height",g)||I;const b=m===I,w=v===I;"number"!=typeof m&&(m=p),"number"!=typeof v&&(v=g),b&&(m=p*(v/g)),w&&(v=g/(p/m));let x=r.parentElement instanceof HTMLPictureElement?r.parentElement:r;this.option("transformParent")&&(x=x.parentElement||x);const T=x.getAttribute("style")||"";x.style.setProperty("transform","none","important"),a&&(x.style.width="",x.style.height=""),x.offsetHeight;const C=r.getBoundingClientRect();let O=C.width*n,E=C.height*n,M=O,S=E;O=Math.min(O,m),E=Math.min(E,v),a?({width:O,height:E}=((e,t,n,i)=>{const o=n/e,r=i/t,a=Math.min(o,r);return{width:e*=a,height:t*=a}})(m,v,O,E)):(O=Math.min(O,m),E=Math.min(E,v));let D=.5*(S-E),A=.5*(M-O);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:C.top-s.top+D,bottom:s.bottom-C.bottom+D,left
11:C.left-s.left+A,right:s.right-C.right+A,fitWidth:O,fitHeight:E,width:O,height:E,fullWidth:m,fullHeight:v}),x.style.cssText=T,a&&(x.style.width=O+"px",x.style.height=E+"px"),this.setTransform(),!0!==e&&this.emit("refresh"),this.ignoreBounds||(i(this.targetScale)<i(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===y.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){const{contentWidth:e,contentHeight:t}=this.calculateContentDim(this.target),{targetScale:n,lockedAxis:o}=this,{fitWidth:r,fitHeight:a}=this.contentRect;let s=0,l=0,c=0,u=0;const d=this.option("infinite");if(!0===d||o&&d===o)s=-1/0,c=1/0,l=-1/0,u=1/0;else{let{containerRect:o,contentRect:d}=this,h=i(r*n,A),f=i(a*n,A),{innerWidth:p,innerHeight:g}=o;if(o.width===h&&(p=o.width),o.width===f&&(g=o.height),e>p){c=.5*(e-p),s=-1*c;let t=.5*(d.right-d.left);s+=t,c+=t}if(r>p&&e<p&&(s-=.5*(r-p),c-=.5*(r-p)),t>g){u=.5*(t-g),l=-1*u;let e=.5*(d.bottom-d.top);l+=e,u+=e}a>g&&t<g&&(s-=.5*(a-g),c-=.5*(a-g))}return{x:{min:s,max:c},y:{min:l,max:u}}}getBounds(){const e=this.option("bounds");return e!==I?e:this.calculateBounds()}updateControls(){const e=this,t=e.container,{panMode:n,contentRect:o,targetScale:r,minScale:a}=e;let s=a,c=e.option("click")||!1;c&&(s=e.getNextScale(c));let u=e.canZoomIn(),d=e.canZoomOut(),h=n===k&&!!this.option("touch"),f=d&&h;if(h&&(i(r)<i(a)&&!this.panOnlyZoomed&&(f=!0),(i(o.width,1)>i(o.fitWidth,1)||i(o.height,1)>i(o.fitHeight,1))&&(f=!0)),i(o.width*r,1)<i(o.fitWidth,1)&&(f=!1),n===P&&(f=!1),l(t,this.cn("isDraggable"),f),!this.option("zoom"))return;let p=u&&i(s)>i(r),g=!p&&!f&&d&&i(s)<i(r);l(t,this.cn("canZoomIn"),p),l(t,this.cn("canZoomOut"),g);for(const e of t.querySelectorAll("[data-panzoom-action]")){let t=!1,n=!1;switch(e.dataset.panzoomAction){case"zoomIn":u?t=!0:n=!0;break;case"zoomOut":d?t=!0:n=!0;break;case"toggleZoom":case"iterateZoom":u||d?t=!0:n=!0;const i=e.querySelector("g");i&&(i.style.display=u?"":"none")}t?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):n&&(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"))}}panTo({x:e=this.target.e,y:t=this.target.f,scale:n=this.targetScale,friction:i=this.option("friction"),angle:o=0,originX:r=0,originY:a=0,flipX:s=!1,flipY:l=!1,ignoreBounds:c=!1}){this.state!==y.Destroy&&this.applyChange({panX:e-this.target.e,panY:t-this.target.f,scale:n/this.targetScale,angle:o,originX:r,originY:a,friction:i,flipX:s,flipY:l,ignoreBounds:c})}applyChange({panX:e=0,panY:t=0,scale:n=1,angle:o=0,originX:r=-this.current.e,originY:a=-this.current.f,friction:s=this.option("friction"),flipX:l=!1,flipY:c=!1,ignoreBounds:u=!1,bounce:d=this.option("bounce")}){const h=this.state;if(h===y.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=s||0,this.ignoreBounds=u;const{current:f}=this,p=f.e,g=f.f,m=this.getMatrix(this.target);let v=(new DOMMatrix).translate(p,g).translate(r,a).translate(e,t);if(this.option("zoom")){if(!u){const e=this.targetScale,t=this.minScale,i=this.maxScale;e*n<t&&(n=t/e),e*n>i&&(n=i/e)}v=v.scale(n)}v=v.translate(-r,-a).translate(-p,-g).multiply(m),o&&(v=v.rotate(o)),l&&(v=v.scale(-1,1)),c&&(v=v.scale(1,-1));for(const e of w)"e"!==e&&"f"!==e&&(v[e]>this.minScale+1e-5||v[e]<this.minScale-1e-5)?this.target[e]=v[e]:this.target[e]=i(v[e],A);(this.targetScale<this.scale||Math.abs(n-1)>.1||this.panMode===P||!1===d)&&!u&&this.clampTargetBounds(),h===y.Init?this.animate():this.isResting||(this.state=y.Panning,this.requestTick())}stop(e=!1){if(this.state===y.Init||this.state===y.Destroy)return;const t=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of w)this.velocity[t]=0,"current"===e?this.current[t]=this.target[t]:"target"===e&&(this.target[t]=this.current[t]);this.setTransform(),M(this.container,"is-scaling"),M(this.container,"is-animating"),this.isTicking=!1,this.state=y.Ready,t&&(this.emit
11("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),S(this.container,"is-animating"),this.isScaling&&S(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame(()=>this.animate()))}panWithMouse(e,t=this.option("mouseMoveFriction")){if(this.pmme=e,this.panMode!==P||!e)return;if(i(this.targetScale)<=i(this.minScale))return;this.emit("mouseMove",e);const{container:n,containerRect:o,contentRect:r}=this,a=o.width,s=o.height,l=n.getBoundingClientRect(),c=(e.clientX||0)-l.left,u=(e.clientY||0)-l.top;let{contentWidth:d,contentHeight:h}=this.calculateContentDim(this.target);const f=this.option("mouseMoveFactor");f>1&&(d!==a&&(d*=f),h!==s&&(h*=f));let p=.5*(d-a)-c/a*100/100*(d-a);p+=.5*(r.right-r.left);let g=.5*(h-s)-u/s*100/100*(h-s);g+=.5*(r.bottom-r.top),this.applyChange({panX:p-this.target.e,panY:g-this.target.f,friction:t})}zoomWithWheel(e){if(this.state===y.Destroy||this.state===y.Init)return;const t=Date.now();if(t-this.pwt<45)return void e.preventDefault();this.pwt=t;var n=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e}));const o=Math.max(-1,Math.min(1,n)),{targetScale:r,maxScale:a,minScale:s}=this;let l=r*(100+45*o)/100;i(l)<i(s)&&i(r)<=i(s)?(this.cwd+=Math.abs(o),l=s):i(l)>i(a)&&i(r)>=i(a)?(this.cwd+=Math.abs(o),l=a):(this.cwd=0,l=Math.max(Math.min(l,a),s)),this.cwd>this.option("wheelLimit")||(e.preventDefault(),i(l)!==i(r)&&this.zoomTo(l,{event:e}))}canZoomIn(){return this.option("zoom")&&(i(this.contentRect.width,1)<i(this.contentRect.fitWidth,1)||i(this.targetScale)<i(this.maxScale))}canZoomOut(){return this.option("zoom")&&i(this.targetScale)>i(this.minScale)}zoomIn(e=1.25,t){this.zoomTo(this.targetScale*e,t)}zoomOut(e=.8,t){this.zoomTo(this.targetScale*e,t)}zoomToFit(e){this.zoomTo("fit",e)}zoomToCover(e){this.zoomTo("cover",e)}zoomToFull(e){this.zoomTo("full",e)}zoomToMax(e){this.zoomTo("max",e)}toggleZoom(e){this.zoomTo(this.getNextScale("toggleZoom"),e)}toggleMax(e){this.zoomTo(this.getNextScale("toggleMax"),e)}toggleCover(e){this.zoomTo(this.getNextScale("toggleCover"),e)}iterateZoom(e){this.zoomTo("next",e)}zoomTo(e=1,{friction:t=I,originX:n=I,originY:i=I,event:o}={}){if(this.isContentLoading||this.state===y.Destroy)return;const{targetScale:r,fullScale:a,maxScale:s,coverScale:l}=this;if(this.stop(),this.panMode===P&&(o=this.pmme||o),o||n===I||i===I){const e=this.content.getBoundingClientRect(),t=this.container.getBoundingClientRect(),r=o?o.clientX:t.left+.5*t.width,a=o?o.clientY:t.top+.5*t.height;n=r-e.left-.5*e.width,i=a-e.top-.5*e.height}let c=1;"number"==typeof e?c=e:"full"===e?c=a:"cover"===e?c=l:"max"===e?c=s:"fit"===e?c=1:"next"===e&&(c=this.getNextScale("iterateZoom")),c=c/r||1,t=t===I?c>1?.15:.25:t,this.applyChange({scale:c,originX:n,originY:i,friction:t}),o&&this.panMode===P&&this.panWithMouse(o,t)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:e,contentRect:t,target:n}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-n.e,panY:.5*e.height-(t.top+.5*t.fitHeight)-n.f,scale:e.width/t.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:e,contentRect:t,target:n}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-n.e,panY:.5*e.innerHeight-(t.top+.5*t.fitHeight)-n.f,scale:e.height/t.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:e}=this,t=this.cn("inFullscreen"),n=this.cn("htmlHasFullscreen");e.classList.toggle(t);const i=e.classList.contains(t);i?(document.documentElement.classList.add(n),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(n),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(i?"enterFS":"exitFS")}getMatrix(e=this.current){const{a:t,b:n,c:i,d:o,e:r,f:a}=e;
11return new DOMMatrix([t,n,i,o,r,a])}reset(e){if(this.state!==y.Init&&this.state!==y.Destroy){this.stop("current");for(const e of w)this.target[e]=D[e];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===e?this.option("friction"):e,this.state=y.Panning,this.requestTick())}}destroy(){this.stop(),this.state=y.Destroy,this.detachEvents(),this.detachObserver();const{container:e,content:t}=this,n=this.option("classes")||{};for(const t of Object.values(n))e.classList.remove(t+"");t&&(t.removeEventListener("load",this.onLoad),t.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(_,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:T}),Object.defineProperty(_,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const F=function(e,t){let n=!0;return(...i)=>{n&&(n=!1,e(...i),setTimeout(()=>{n=!0},t))}},R=(e,t)=>{let n=[];return e.childNodes.forEach(e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||n.push(e)}),n};var H;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Destroy=2]="Destroy"}(H||(H={}));const z=e=>{if("string"==typeof e||e instanceof HTMLElement)e={html:e};else{const t=e.thumb;void 0!==t&&("string"==typeof t&&(e.thumbSrc=t),t instanceof HTMLImageElement&&(e.thumbEl=t,e.thumbElSrc=t.src,e.thumbSrc=t.src),delete e.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},e)},B=(e={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},e);class q extends v{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}class W extends q{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let e=this.list;if(!e){e=document.createElement("ul"),S(e,this.cn("list")),e.setAttribute("role","tablist");const t=this.instance.container;t.appendChild(e),S(t,this.cn("hasDots")),this.list=e}return e}refresh(){var e;const t=this.instance.pages.length,n=Math.min(2,this.option("minCount")),i=Math.max(2e3,this.option("maxCount")),o=this.option("dynamicFrom");if(t<n||t>i)return void this.cleanup();const r="number"==typeof o&&t>5&&t>=o,a=!this.list||this.isDynamic!==r||this.list.children.length!==t;a&&this.cleanup();const s=this.build();if(l(s,this.cn("isDynamic"),!!r),a)for(let e=0;e<t;e++)s.append(this.createItem(e));let c,u=0;for(const t of[...s.children]){const n=u===this.instance.page;n&&(c=t),l(t,this.cn("isCurrent"),n),null===(e=t.children[0])||void 0===e||e.setAttribute("aria-selected",n?"true":"false");for(const e of["isBeforePrev","isPrev","isNext","isAfterNext"])M(t,this.cn(e));u++}if(c=c||s.firstChild,r&&c){const e=c.previousElementSibling,t=e&&e.previousElementSibling;S(e,this.cn("isPrev")),S(t,this.cn("isBeforePrev"));const n=c.nextElementSibling,i=n&&n.nextElementSibling;S(n,this.cn("isNext")),S(i,this.cn("isAfterNext"))}this.isDynamic=r}createItem(e=0){var t;const n=document.createElement("li");n.setAttribute("role","presentation");const i=a(this.instance.localize(this.option("dotTpl"),[["%d",e+1]]).replace(/\%i/g,e+""));return n.appendChild(i),null===(t=n.children[0])||void 0===t||t.setAttribute("role","tab"),n}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,M(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(W,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'<button type="button" data-carousel-page="%i" aria-label="{{GOTO}}"><span class="f-carousel__dot" aria-hidden="true"></span></button>',dynamicFrom:11,maxCount:1/0,minCount:2}});const Y="disabled",V="next",X="prev";class $ extends q{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isDom",{enumerable:!0,configurable:!0,writable:!0,value:!1})}onRefresh(){const e=this.instance,t=e.pages.length,n=e.page;if(t<2)return void this.cleanup();this.build();let i=this.prev,o=this.next;i&&o&&(i.removeAttribute(Y),o.removeAttribute(Y),e.isInfinite||(n<=0&&i.setAttribute(Y,""),n>=t-1&&o.setAttribute(Y,"")))}addBtn(e){var t;const n=this.instance,i=document.createElement("button");i.setAttribute("tabindex","0"),i.setAttribute("title",n.localize(`{{${e.toUpperCase()}}}`)),S(i,this.cn("button")+" "+this.cn(e===V?"isNext":"isPrev"));const o=n.isRTL?e===V?X:V:e;var r;return i.innerHTML=n.localize(this.option(o+"Tpl")),i.dataset["carousel"+(r=e,r?r.match("^[a-z]")?r.charAt(0).toUpperCase()+r.substring(1):r:"")]="true",null===(t=this.container)||void 0===t||t.appendChild(i),i}build(){const e=this.instance.container,t=this.cn("container");let{container:n,prev:i,next:o}=this;n||(n=e.querySelector("."+t),this.isDom=!!n),n||(n=document.createElement("div"),S(n,t),e.appendChild(n)),this.container=n,o||(o=n.querySelector("[data-carousel-next]")),o||(o=this.addBtn(V)),this.next=o,i||(i=n.querySelector("[data-carousel-prev]")),i||(i=this.addBtn(X)),this.prev=i}cleanup(){this.isDom||(this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove()),this.prev=null,this.next=null,this.container=null,this.isDom=!1}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty($,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>
11',prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>'}});class U extends q{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(e){this.target=this.instance,this.nav=e,this.attachEvents()}addAsNavFor(e){this.nav=this.instance,this.target=e,this.attachEvents()}attachEvents(){const{nav:e,target:t}=this;e&&t&&(e.options.initialSlide=t.options.initialPage,e.state===H.Ready?this.onNavReady(e):e.on("ready",this.onNavReady),t.state===H.Ready?this.onTargetReady(t):t.on("ready",this.onTargetReady))}onNavReady(e){e.on("createSlide",this.onNavCreateSlide),e.on("Panzoom.click",this.onNavClick),e.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(e){e.on("change",this.onTargetChange),e.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(e,t,n){this.onNavTouch(e,e.panzoom,n)}onNavTouch(e,t,n){var i,o;if(Math.abs(t.dragOffset.x)>3||Math.abs(t.dragOffset.y)>3)return;const r=n.target,{nav:a,target:s}=this;if(!a||!s||!r)return;const l=r.closest("[data-index]");if(n.stopPropagation(),n.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,u=s.getPageForSlide(c),d=a.getPageForSlide(c);a.slideTo(d),s.slideTo(u,{friction:(null===(o=null===(i=this.nav)||void 0===i?void 0:i.plugins)||void 0===o?void 0:o.Sync.option("friction"))||0}),this.markSelectedSlide(c)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){var e,t;const{target:n,nav:i}=this;if(!n||!i)return;if(i.state!==H.Ready||n.state!==H.Ready)return;const o=null===(t=null===(e=n.pages[n.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index,r=i.getPageForSlide(o);this.markSelectedSlide(o),i.slideTo(r,null===i.prevPage&&null===n.prevPage?{friction:0}:void 0)}markSelectedSlide(e){const t=this.nav;t&&t.state===H.Ready&&(this.selectedIndex=e,[...t.slides].map(t=>{t.el&&t.el.classList[t.index===e?"add":"remove"]("is-nav-selected")}))}attach(){const e=this;let t=e.options.target,n=e.options.nav;t?e.addAsNavFor(t):n&&e.addAsTargetFor(n)}detach(){const e=this,t=e.nav,n=e.target;t&&(t.off("ready",e.onNavReady),t.off("createSlide",e.onNavCreateSlide),t.off("Panzoom.click",e.onNavClick),t.off("Panzoom.touchEnd",e.onNavTouch)),e.nav=null,n&&(n.off("ready",e.onTargetReady),n.off("refresh",e.onTargetChange),n.off("change",e.onTargetChange)),e.target=null}}Object.defineProperty(U,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const G={Navigation:$,Dots:W,Sync:U},Z="animationend",K="isSelected",J="slide";class Q extends b{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===H.Ready}get isInfinite(){let e=!1;const{contentDim:t,viewportDim:n,pages:i,slides:o}=this,r=o[0];return i.length>=2&&r&&t+r.dim>=n&&(e=this.option("infinite")),e}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(e,t={},n={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:H.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof e&&(e=document.querySelector(e)),!e||!E(e))throw new Error("No Element found");this.container=e,this.slideNext=F(this.slideNext.bind(this),150),this.slidePrev=F(this.slidePrev.bind(this),150),this.userOptions=t,this.userPlugins=n,queueMicrotask(()=>{this.processOptions()})}processOptions(){var e,t;const n=g({},Q.defaults,this.userOptions);let i="";const o=n.breakpoints;if(o&&p(o))for(const[e,t]of Object.entries(o))window.matchMedia(e).matches&&p(t)&&(i+=e,g(n,t));i===this.bp&&this.state!==H.Init||(this.bp=i,this.state===H.Ready&&(n.initialSlide=(null===(t=null===(e=this.pages[this.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index)||0),this.state!==H.Init&&this.destroy(),super.setOptions(n),!1===this.option("enabled")?this.attachEvents():setTimeout(()=>{this.init()},0))}
11init(){this.state=H.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},Q.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=H.Ready,this.emit("ready")}initLayout(){const{container:e}=this,t=this.option("classes");S(e,this.cn("container")),l(e,t.isLTR,!this.isRTL),l(e,t.isRTL,this.isRTL),l(e,t.isVertical,!this.isHorizontal),l(e,t.isHorizontal,this.isHorizontal);let n=this.option("viewport")||e.querySelector("."+t.viewport);n||(n=document.createElement("div"),S(n,t.viewport),n.append(...R(e,"."+t.slide)),e.prepend(n)),n.addEventListener("scroll",this.onScroll);let i=this.option("track")||e.querySelector("."+t.track);i||(i=document.createElement("div"),S(i,t.track),i.append(...Array.from(n.childNodes))),i.setAttribute("aria-live","polite"),n.contains(i)||n.prepend(i),this.viewport=n,this.track=i,this.emit("initLayout")}initSlides(){const{track:e}=this;if(!e)return;const t=[...this.slides],n=[];[...R(e,"."+this.cn(J))].forEach(e=>{if(E(e)){const t=z({el:e,isDom:!0,index:this.slides.length});n.push(t)}});for(let e of[...this.option("slides",[])||[],...t])n.push(z(e));this.slides=n;for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;
11for(const e of n)this.emit("beforeInitSlide",e,e.index),this.emit("initSlide",e,e.index);this.emit("initSlides")}setInitialPage(){const e=this.option("initialSlide");this.page="number"==typeof e?this.getPageForSlide(e):parseInt(this.option("initialPage",0)+"",10)||0}setInitialPosition(){const{track:e,pages:t,isHorizontal:n}=this;if(!e||!t.length)return;let i=this.page;t[i]||(this.page=i=0);const o=(t[i].pos||0)*(this.isRTL&&n?1:-1),r=n?o+"px":"0",a=n?"0":o+"px";e.style.transform=`translate3d(${r}, ${a}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);const e=this.option("Panzoom")||{};this.panzoom=new _(this.viewport,g({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:e=>!(this.pages.length<2&&!e.options.infinite),bounds:()=>this.getBounds(),maxVelocity:e=>Math.abs(e.target[this.axis]-e.current[this.axis])<2*this.viewportDim?100:0},e)),this.panzoom.on("*",(e,t,...n)=>{this.emit("Panzoom."+t,e,...n)}),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){const e=this.container;e&&(e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let e=[];const{contentDim:t,viewportDim:n}=this;let i=this.option("slidesPerPage");i=("auto"===i||t<=n)&&!1!==this.option("fill")?1/0:parseFloat(i+"");let o=0,r=0,a=0;for(const t of this.slides)(!e.length||r+t.dim-n>.05||a>=i)&&(e.push(B()),o=e.length-1,r=0,a=0),e[o].slides.push(t),r+=t.dim+t.gap,a++;return e}processPages(){const e=this.pages,{contentDim:t,viewportDim:n,isInfinite:o}=this,r=this.option("center"),a=this.option("fill"),s=a&&r&&t>n&&!o;if(e.forEach((e,i)=>{var o;e.index=i,e.pos=(null===(o=e.slides[0])||void 0===o?void 0:o.pos)||0,e.dim=0;for(const[t,n]of e.slides.entries())e.dim+=n.dim,t<e.slides.length-1&&(e.dim+=n.gap);s&&e.pos+.5*e.dim<.5*n?e.pos=0:s&&e.pos+.5*e.dim>=t-.5*n?e.pos=t-n:r&&(e.pos+=-.5*(n-e.dim))}),e.forEach(e=>{a&&!o&&t>n&&(e.pos=Math.max(e.pos,0),e.pos=Math.min(e.pos,t-n)),e.pos=i(e.pos,1e3),e.dim=i(e.dim,1e3),Math.abs(e.pos)<=.1&&(e.pos=0)}),o)return e;const l=[];let c;return e.forEach(e=>{const t=Object.assign({},e);c&&t.pos===c.pos?(c.dim+=t.dim,c.slides=[...c.slides,...t.slides]):(t.index=l.length,c=t,l.push(t))}),l}getPageFromIndex(e=0){const t=this.pages.length;let n;return e=parseInt((e||0).toString())||0,n=this.isInfinite?(e%t+t)%t:Math.max(Math.min(e,t-1),0),n}getSlideMetrics(e){var t,n;const o=this.isHorizontal?"width":"height";let r=0,a=0,s=e.el;const l=!(!s||s.parentNode);if(s?r=parseFloat(s.dataset[o]||"")||0:(s=document.createElement("div"),s.style.visibility="hidden",(this.track||document.body).prepend(s)),S(s,this.cn(J)+" "+e.class+" "+e.customClass),r)s.style[o]=r+"px",s.style["width"===o?"height":"width"]="";else{l&&(this.track||document.body).prepend(s),r=s.getBoundingClientRect()[o]*Math.max(1,(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1);let e=s[this.isHorizontal?"offsetWidth":"offsetHeight"];e-1>r&&(r=e)}const c=getComputedStyle(s);return"content-box"===c.boxSizing&&(this.isHorizontal?(r+=parseFloat(c.paddingLeft)||0,r+=parseFloat(c.paddingRight)||0):(r+=parseFloat(c.paddingTop)||0,r+=parseFloat(c.paddingBottom)||0)),a=parseFloat(c[this.isHorizontal?"marginRight":"marginBottom"])||0,l?null===(n=s.parentElement)||void 0===n||n.removeChild(s):e.el||s.remove(),{dim:i(r,1e3),gap:i(a,1e3)}}getBounds(){const{isInfinite:e,isRTL:t,isHorizontal:n,pages:i}=this;let o={min:0,max:0};if(e)o={min:-1/0,max:1/0};else if(i.length){const e=i[0].pos,r=i[i.length-1].pos;o=t&&n?{min:e,max:r}:{min:-1*r,max:-1*e}}return{x:n?o:{min:0,max:0},y:n?{min:0,max:0}:o}}repositionSlides(){let e,{isHorizontal:t,isRTL:n,isInfinite:o,viewport:r,viewportDim:a,contentDim:s,page:l,pages:c,slides:u,panzoom:d}=this,h=0,f=0,p=0,g=0;d?g=-1*d.current[this.axis]:c[l]&&(g=c[l].pos||0),e=t?n?"right":"left":"top",n&&t&&(g*=-1);for(const t of u){const n=t.el;n?("top"===e?(n.style.right="",n.style.left=""):n.style.top="",t.index!==h?n.style[e]=0===f?"":i(f,1e3)+"px":n.style[e]="",p+=t.dim+t.gap,h++):f+=t.dim+t.gap}if(o&&p&&r){let n=getComputedStyle(r),o="padding",l=t?"Right":"Bottom",c=parseFloat(n[o+(t?"Left":"Top")]);g-=c,a+=c,a+=parseFloat(n[o+l]);for(const t of u)t.el&&(i(t.pos)<i(a)&&i(t.pos+t.dim+t.gap)<i(g)&&i(g)>i(s-a)&&(t.el.style[e]=i(f+p,1e3)+"px"),i(t.pos+t.gap)>=i(s-a)&&i(t.pos)>i(g+a)&&i(g)<i(a)&&(t.el.style[e]=`-${i(p,1e3)}px`))}let m,v,b=[...this.inTransition];if(b.length>1&&(m=c[b[0]],v=c[b[1]]),m&&v){let t=0;for(const n of u)n.el?this.inTransition.has(n.index)&&m.slides.indexOf(n)<0&&(n.el.style[e]=i(t+(m.pos-v.pos),1e3)+"px"):t+=n.dim+n.gap}}createSlideEl(e){const{track:t,slides:n}=this;if(!t||!e)return;if(e.el&&e.el.parentNode)return;const i=e.el||document.createElement("div");S(i,this.cn(J)),S(i,e.class),S(i,e.customClass);const o=e.html;o&&(o instanceof HTMLElement?i.appendChild(o):i.innerHTML=e.html+"");const r=[];
11n.forEach((e,t)=>{e.el&&r.push(t)});const a=e.index;let s=null;r.length&&(s=n[r.reduce((e,t)=>Math.abs(t-a)<Math.abs(e-a)?t:e)]);const l=s&&s.el&&s.el.parentNode?s.index<e.index?s.el.nextSibling:s.el:null;t.insertBefore(i,t.contains(l)?l:null),e.el=i,this.emit("createSlide",e)}removeSlideEl(e,t=!1){const n=null==e?void 0:e.el;if(!n||!n.parentNode)return;const i=this.cn(K);if(n.classList.contains(i)&&(M(n,i),this.emit("unselectSlide",e)),e.isDom&&!t)return n.removeAttribute("aria-hidden"),n.removeAttribute("data-index"),void(n.style.left="");this.emit("removeSlide",e);const o=new CustomEvent(Z);n.dispatchEvent(o),e.el&&(e.el.remove(),e.el=null)}transitionTo(e=0,t=this.option("transition")){var n,i,o,r;if(!t)return!1;const a=this.page,{pages:s,panzoom:l}=this;e=parseInt((e||0).toString())||0;const c=this.getPageFromIndex(e);if(!l||!s[c]||s.length<2||Math.abs(((null===(i=null===(n=s[a])||void 0===n?void 0:n.slides[0])||void 0===i?void 0:i.dim)||0)-this.viewportDim)>1)return!1;let u=e>a?1:-1;this.isInfinite&&(0===a&&e===s.length-1&&(u=-1),a===s.length-1&&0===e&&(u=1));const d=s[c].pos*(this.isRTL?1:-1);if(a===c&&Math.abs(d-l.target[this.axis])<1)return!1;this.clearTransitions();const h=l.isResting;S(this.container,this.cn("inTransition"));const f=(null===(o=s[a])||void 0===o?void 0:o.slides[0])||null,p=(null===(r=s[c])||void 0===r?void 0:r.slides[0])||null;this.inTransition.add(p.index),this.createSlideEl(p);let g=f.el,m=p.el;h||t===J||(t="fadeFast",g=null);const v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return g&&(this.inTransition.add(f.index),f.transition=t,g.addEventListener(Z,this.onAnimationEnd),g.classList.add(`f-${t}Out`,"to-"+(u>0?b:v))),m&&(p.transition=t,m.addEventListener(Z,this.onAnimationEnd),m.classList.add(`f-${t}In`,"from-"+(u>0?v:b))),l.current[this.axis]=d,l.target[this.axis]=d,l.requestTick(),this.onChange(c),!0}manageSlideVisiblity(){const e=new Set,t=new Set,n=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const i of this.slides)n.has(i)?e.add(i):t.add(i);for(const t of this.inTransition)e.add(this.slides[t]);for(const t of e)this.createSlideEl(t),this.lazyLoadSlide(t);for(const n of t)e.has(n)||this.removeSlideEl(n);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const e="aria-hidden";let t=this.cn(K);if(t)for(const n of this.slides){const i=n.el;i&&(i.dataset.index=""+n.index,i.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(n)?i.removeAttribute(e):i.setAttribute(e,"true"):this.pages[this.page].slides.includes(n)?(i.classList.contains(t)||(S(i,t),this.emit("selectSlide",n)),i.removeAttribute(e)):(i.classList.contains(t)&&(M(i,t),this.emit("unselectSlide",n)),i.setAttribute(e,"true")))}}flipInfiniteTrack(){const{axis:e,isHorizontal:t,isInfinite:n,isRTL:i,viewportDim:o,contentDim:r}=this,a=this.panzoom;if(!a||!n)return;let s=a.current[e],l=a.target[e]-s,c=0,u=.5*o;i&&t?(s<-u&&(c=-1,s+=r),s>r-u&&(c=1,s-=r)):(s>u&&(c=1,s-=r),s<-r+u&&(c=-1,s+=r)),c&&(a.current[e]=s,a.target[e]=s+l)}lazyLoadImg(e,t){const n=this,i="f-fadeIn",o="is-preloading";let r=!1,s=null;const l=()=>{r||(r=!0,s&&(s.remove(),s=null),M(t,o),t.complete&&(S(t,i),setTimeout(()=>{M(t,i)},350)),this.option("adaptiveHeight")&&e.el&&this.pages[this.page].slides.indexOf(e)>-1&&(n.updateMetrics(),n.setViewportHeight()),this.emit("load",e))};S(t,o),t.src=t.dataset.lazySrcset||t.dataset.lazySrc||"",delete t.dataset.lazySrc,delete t.dataset.lazySrcset,t.addEventListener("error",()=>{l()}),t.addEventListener("load",()=>{l()}),setTimeout(()=>{const n=t.parentNode;n&&e.el&&(t.complete?l():r||(s=a(O),n.insertBefore(s,t)))},300)}lazyLoadSlide(e){const t=e&&e.el;if(!t)return;const n=new Set;let i=Array.from(t.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));t.dataset.lazySrc&&i.push(t),i.map(e=>{e instanceof HTMLImageElement?n.add(e):e instanceof HTMLElement&&e.dataset.lazySrc&&(e.style.backgroundImage=`url('${e.dataset.lazySrc}')`,delete e.dataset.lazySrc)});for(const t of n)this.lazyLoadImg(e,t)}onAnimationEnd(e){var t;const n=e.target,i=n?parseInt(n.dataset.index||"",10)||0:-1,o=this.slides[i],r=e.animationName;if(!n||!o||!r)return;const a=!!this.inTransition.has(i)&&o.transition;a&&r.substring(0,a.length+2)==="f-"+a&&this.inTransition.delete(i),this.inTransition.size||this.clearTransitions(),i===this.page&&(null===(t=this.panzoom)||void 0===t?void 0:t.isResting)&&this.emit
11("settle")}onDecel(e,t=0,n=0,i=0,o=0){if(this.option("dragFree"))return void this.setPageFromPosition();const{isRTL:r,isHorizontal:a,axis:s,pages:l}=this,c=l.length,u=Math.abs(Math.atan2(n,t)/(Math.PI/180));let d=0;if(d=u>45&&u<135?a?0:n:a?t:0,!c)return;let h=this.page,f=r&&a?1:-1;const p=e.current[s]*f;let{pageIndex:g}=this.getPageFromPosition(p);Math.abs(d)>5?(l[h].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(h=g),h=r&&a?d<0?h-1:h+1:d<0?h+1:h-1):h=0===i&&0===o?h:g,this.slideTo(h,{transition:!1,friction:e.option("decelFriction")})}onClick(e){const t=e.target,n=t&&E(t)?t.dataset:null;let i,o;n&&(void 0!==n.carouselPage?(o="slideTo",i=n.carouselPage):void 0!==n.carouselNext?o="slideNext":void 0!==n.carouselPrev&&(o="slidePrev")),o?(e.preventDefault(),e.stopPropagation(),t&&!t.hasAttribute("disabled")&&this[o](i)):this.emit("click",e)}onSlideTo(e){const t=e.detail||0;this.slideTo(this.getPageForSlide(t),{friction:0})}onChange(e,t=0){const n=this.page;this.prevPage=n,this.page=e,this.option("adaptiveHeight")&&this.setViewportHeight(),e!==n&&(this.markSelectedSlides(),this.emit("change",e,n,t))}onRefresh(){let e=this.contentDim,t=this.viewportDim;this.updateMetrics(),this.contentDim===e&&this.viewportDim===t||this.slideTo(this.page,{friction:0,transition:!1})}onScroll(){var e;null===(e=this.viewport)||void 0===e||e.scroll(0,0)}onResize(){this.option("breakpoints")&&this.processOptions()}onBeforeTransform(e){this.lp!==e.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=e.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(e=null,t=null){this.destroy(),this.state=H.Init,this.prevPage=null,this.userOptions=e||this.userOptions,this.userPlugins=t||this.userPlugins,this.processOptions()}slideTo(e=0,{friction:t=this.option("friction"),transition:n=this.option("transition")}={}){if(this.state===H.Destroy)return;e=parseInt((e||0).toString())||0;const i=this.getPageFromIndex(e),{axis:o,isHorizontal:r,isRTL:a,pages:s,panzoom:l}=this,c=s.length,u=a&&r?1:-1;if(!l||!c)return;if(this.page!==i){const t=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",t,e),t.defaultPrevented)return}if(this.transitionTo(e,n))return;let d=s[i].pos;if(this.isInfinite){const t=this.contentDim,n=l.target[o]*u;2===c?d+=t*Math.floor(parseFloat(e+"")/2):d=[d,d-t,d+t].reduce((function(e,t){return Math.abs(t-n)<Math.abs(e-n)?t:e}))}d*=u,Math.abs(l.target[o]-d)<1||(l.panTo({x:r?d:0,y:r?0:d,friction:t}),this.onChange(i))}slideToClosest(e){if(this.panzoom){const{pageIndex:t}=this.getPageFromPosition();this.slideTo(t,e)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),M(this.container,this.cn("inTransition"));const e=["to-prev","to-next","from-prev","from-next"];for(const t of this.slides){const n=t.el;if(n){n.removeEventListener(Z,this.onAnimationEnd),n.classList.remove(...e);const i=t.transition;i&&n.classList.remove(`f-${i}Out`,`f-${i}In`)}}this.manageSlideVisiblity()}addSlide(e,t){var n,i,o,r;const a=this.panzoom,s=(null===(n=this.pages[this.page])||void 0===n?void 0:n.pos)||0,l=(null===(i=this.pages[this.page])||void 0===i?void 0:i.dim)||0,c=this.contentDim<this.viewportDim;let u=Array.isArray(t)?t:[t];const d=[];for(const e of u)d.push(z(e));this.slides.splice(e,0,...d);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;for(const e of d)this.emit("beforeInitSlide",e,e.index);if(this.page>=e&&(this.page+=d.length),this.updateMetrics(),a){const t=(null===(o=this.pages[this.page])||void 0===o?void 0:o.pos)||0,n=(null===(r=this.pages[this.page])||void 0===r?void 0:r.dim)||0,i=this.pages.length||1,u=this.isRTL?l-n:n-l,d=this.isRTL?s-t:t-s;c&&1===i?(e<=this.page&&(a.current[this.axis]-=u,a.target[this.axis]-=u),a.panTo({[this.isHorizontal?"x":"y"]:-1*t})):d&&e<=this.page&&(a.target[this.axis]-=d,a.current[this.axis]-=d,a.requestTick())}for(const e of d)this.emit("initSlide",e,e.index)}prependSlide(e){this.addSlide(0,e)}appendSlide(e){this.addSlide(this.slides.length,e)}removeSlide(e){const t=this.slides.length;e=(e%t+t)%t;const n=this.slides[e];if(n){this.removeSlideEl(n,!0),this.slides.splice(e,1);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1}
11),this.emit("destroySlide",n)}}updateMetrics(){const{panzoom:e,viewport:t,track:n,slides:o,isHorizontal:r,isInfinite:a}=this;if(!n)return;const s=r?"width":"height",l=r?"offsetWidth":"offsetHeight";if(t){let e=Math.max(t[l],i(t.getBoundingClientRect()[s],1e3)),n=getComputedStyle(t),o="padding",a=r?"Right":"Bottom";e-=parseFloat(n[o+(r?"Left":"Top")])+parseFloat(n[o+a]),this.viewportDim=e}let c,u=0;for(const[e,t]of o.entries()){let n=0,r=0;!t.el&&c?(n=c.dim,r=c.gap):(({dim:n,gap:r}=this.getSlideMetrics(t)),c=t),n=i(n,1e3),r=i(r,1e3),t.dim=n,t.gap=r,t.pos=u,u+=n,(a||e<o.length-1)&&(u+=r)}u=i(u,1e3),this.contentDim=u,e&&(e.contentRect[s]=u,e.contentRect[r?"fullWidth":"fullHeight"]=u),this.pages=this.createPages(),this.pages=this.processPages(),this.state===H.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(e,t=!1,n=!1){void 0===e&&(e=this.page);const o=this,r=o.panzoom,a=o.contentDim,s=o.pages[e]||0;if(!s||!r)return e>this.page?-1:1;let l=-1*r.current.e,c=i((l-s.pos)/(1*s.dim),1e3),u=c,d=c;this.isInfinite&&!0!==n&&(u=i((l-s.pos+a)/(1*s.dim),1e3),d=i((l-s.pos-a)/(1*s.dim),1e3));let h=[c,u,d].reduce((function(e,t){return Math.abs(t)<Math.abs(e)?t:e}));return t?h:h>1?1:h<-1?-1:h}setViewportHeight(){const{page:e,pages:t,viewport:n,isHorizontal:i}=this;if(!n||!t[e])return;let o=0;i&&this.track&&(this.track.style.height="auto",t[e].slides.forEach(e=>{e.el&&(o=Math.max(o,e.el.offsetHeight))})),n.style.height=o?o+"px":""}getPageForSlide(e){for(const t of this.pages)for(const n of t.slides)if(n.index===e)return t.index;return-1}getVisibleSlides(e=0){var t;const n=new Set;let{panzoom:i,contentDim:o,viewportDim:r,pages:a,page:s}=this;if(r){o=o+(null===(t=this.slides[this.slides.length-1])||void 0===t?void 0:t.gap)||0;let l=0;l=i&&i.state!==y.Init&&i.state!==y.Destroy?-1*i.current[this.axis]:a[s]&&a[s].pos||0,this.isInfinite&&(l-=Math.floor(l/o)*o),this.isRTL&&this.isHorizontal&&(l*=-1);const c=l-r*e,u=l+r*(e+1),d=this.isInfinite?[-1,0,1]:[0];for(const e of this.slides)for(const t of d){const i=e.pos+t*o,r=i+e.dim+e.gap;i<u&&r>c&&n.add(e)}}return n}getPageFromPosition(e){const{viewportDim:t,contentDim:n,slides:i,pages:o,panzoom:r}=this,a=o.length,s=i.length,l=i[0],c=i[s-1],u=this.option("center");let d=0,h=0,f=0,p=void 0===e?-1*((null==r?void 0:r.target[this.axis])||0):e;u&&(p+=.5*t),this.isInfinite?(p<l.pos-.5*c.gap&&(p-=n,f=-1),p>c.pos+c.dim+.5*c.gap&&(p-=n,f=1)):p=Math.max(l.pos||0,Math.min(p,c.pos));let g=c,m=i.find(e=>{const t=e.pos-.5*g.gap,n=e.pos+e.dim+.5*e.gap;return g=e,p>=t&&p<n});return m||(m=c),h=this.getPageForSlide(m.index),d=h+f*a,{page:d,pageIndex:h}}setPageFromPosition(){const{pageIndex:e}=this.getPageFromPosition();this.onChange(e)}destroy(){if([H.Destroy].includes(this.state))return;this.state=H.Destroy;const{container:e,viewport:t,track:n,slides:i,panzoom:o}=this,r=this.option("classes");e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),o&&(o.destroy(),this.panzoom=null),i&&i.forEach(e=>{this.removeSlideEl(e)}),this.detachPlugins(),t&&(t.removeEventListener("scroll",this.onScroll),t.offsetParent&&n&&n.offsetParent&&t.replaceWith(...n.childNodes));for(const[t,n]of Object.entries(r))"container"!==t&&n&&e.classList.remove(n);this.track=null,this.viewport=null,this.page=0,this.slides=[];const a=this.events.get("ready");this.events=new Map,a&&this.events.set("ready",a)}}Object.defineProperty(Q,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:_}),Object.defineProperty(Q,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}}}),Object.defineProperty(Q,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:G});const ee=function(e){if(!E(e))return 0;const t=window.scrollY,n=window.innerHeight,i=t+n,o=e.getBoundingClientRect(),r=o.y+t,a=o.height,s=r+a;if(t>s||i<r)return 0;if(t<r&&i>s)return 100;if(r<t&&s>i)return 100;let l=a;r<t&&(l-=t-r),s>i&&(l-=s-i);const c=l/n*100;return Math.round(c)},te=!("undefined"==typeof window||!window.document||!window.document.createElement);let ne;const ie=["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]):not(.fancybox-focus-guard)","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not
11([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),oe=e=>{if(e&&te){void 0===ne&&document.createElement("div").focus({get preventScroll(){return ne=!0,!1}});try{if(ne)e.focus({preventScroll:!0});else{const t=window.scrollY||document.body.scrollTop,n=window.scrollX||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:n,behavior:"auto"})}}catch(e){}}},re=()=>{const e=document;let t,n="",i="",o="";return e.fullscreenEnabled?(n="requestFullscreen",i="exitFullscreen",o="fullscreenElement"):e.webkitFullscreenEnabled&&(n="webkitRequestFullscreen",i="webkitExitFullscreen",o="webkitFullscreenElement"),n&&(t={request:function(t=e.documentElement){return"webkitRequestFullscreen"===n?t[n](Element.ALLOW_KEYBOARD_INPUT):t[n]()},exit:function(){return e[o]&&e[i]()},isFullscreen:function(){return e[o]}}),t},ae={dragToClose:!0,hideScrollbar:!0,Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},contentClick:"toggleZoom",contentDblClick:!1,backdropClick:"close",animated:!0,idle:3500,showClass:"f-zoomInUp",hideClass:"f-fadeOut",commonCaption:!1,parentEl:null,startIndex:0,l10n:Object.assign(Object.assign({},x),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),tpl:{closeButton:'<button data-fancybox-close class="f-button is-close-btn" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg></button>',main:'<div class="fancybox__container" role="dialog" aria-modal="true" aria-label="{{MODAL}}" tabindex="-1">\n    <div class="fancybox__backdrop"></div>\n    <div class="fancybox__carousel"></div>\n    <div class="fancybox__footer"></div>\n  </div>'},groupAll:!1,groupAttr:"data-fancybox",defaultType:"image",defaultDisplay:"block",autoFocus:!0,trapFocus:!0,placeFocusBack:!0,closeButton:"auto",keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},Fullscreen:{autoStart:!1},compact:()=>window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,wheel:"zoom"};var se,le;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Closing=2]="Closing",e[e.CustomClosing=3]="CustomClosing",e[e.Destroy=4]="Destroy"}(se||(se={})),function(e){e[e.Loading=0]="Loading",e[e.Opening=1]="Opening",e[e.Ready=2]="Ready",e[e.Closing=3]="Closing"}(le||(le={}));let ce="",ue=!1,de=!1,he=null;const fe=()=>{let e="",t="";const n=Tt.getInstance();if(n){const i=n.carousel,o=n.getSlide();if(i&&o){let r=o.slug||void 0,a=o.triggerEl||void 0;t=r||n.option("slug")||"",!t&&a&&a.dataset&&(t=a.dataset.fancybox||""),t&&"true"!==t&&(e="#"+t+(!r&&i.slides.length>1?"-"+(o.index+1):""))}}return{hash:e,slug:t,index:1}},pe=()=>{const e=new URL(document.URL).hash,t=e.slice(1).split("-"),n=t[t.length-1],i=n&&/^\+?\d+$/.test(n)&&parseInt(t.pop()||"1",10)||1;return{hash:e,slug:t.join("-"),index:i}},ge=()=>{const{slug:e,index:t}=pe();if(!e)return;let n=document.querySelector(`[data-slug="${e}"]`);if(n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),Tt.getInstance())return;const i=document.querySelectorAll(`[data-fancybox="${e}"]`);i.length&&(n=i[t-1],n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))},me=()=>{if(!1===Tt.defaults.Hash)return;const e=Tt.getInstance();if(!1===(null==e?void 0:e.options.Hash))return;const{slug:t,index:n}=pe(),{slug:i}=fe();e&&(t===i?e.jumpTo(n-1):(ue=!0,e.close())),ge()},ve=()=>{he&&clearTimeout(he),queueMicrotask(()=>{me()})},be=()=>{window.addEventListener("hashchange",ve,!1),setTimeout(()=>{me()},500)};te&&(/complete|interactive|loaded/.test(document.readyState)?be():document.addEventListener("DOMContentLoaded",be));const ye="is-zooming-in";class we extends q{onCreateSlide(e,t,n){const i=this.instance.optionFor(n,"src")||"";n.el&&"image"===n.type&&"string"==typeof i&&this.setImage(n,i)}onRemoveSlide(e,t,n){n.panzoom&&n.panzoom.destroy(),n.panzoom=void 0,n.imageEl=void 0}onChange(e,t,n,i){M(this.instance.container,ye);for(const e of t.slides){const t=e.panzoom;t&&e.index!==n&&t.reset(.35)}}onClose(){var e;const t=this.instance,n=t.container,i=t.getSlide();if(!n||!n.parentElement||!i)return;const{el:o,contentEl:r,panzoom:a,thumbElSrc:s}=i;
11if(!o||!s||!r||!a||a.isContentLoading||a.state===y.Init||a.state===y.Destroy)return;a.updateMetrics();let l=this.getZoomInfo(i);if(!l)return;this.instance.state=se.CustomClosing,n.classList.remove(ye),n.classList.add("is-zooming-out"),r.style.backgroundImage=`url('${s}')`;const c=n.getBoundingClientRect();1===((null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1)&&Object.assign(n.style,{position:"absolute",top:n.offsetTop+window.scrollY+"px",left:n.offsetLeft+window.scrollX+"px",bottom:"auto",right:"auto",width:c.width+"px",height:c.height+"px",overflow:"hidden"});const{x:u,y:d,scale:h,opacity:f}=l;if(f){const e=((e,t,n,i)=>{const o=t-e;return t=>1+((t-e)/o*-1||0)})(a.scale,h);a.on("afterTransform",()=>{r.style.opacity=e(a.scale)+""})}a.on("endAnimation",()=>{t.destroy()}),a.target.a=h,a.target.b=0,a.target.c=0,a.target.d=h,a.panTo({x:u,y:d,scale:h,friction:f?.2:.33,ignoreBounds:!0}),a.isResting&&t.destroy()}setImage(e,t){const n=this.instance;e.src=t,this.process(e,t).then(t=>{const{contentEl:i,imageEl:o,thumbElSrc:r,el:a}=e;if(n.isClosing()||!i||!o)return;i.offsetHeight;const s=!!n.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&a){a.addEventListener("contextmenu",e=>{e.preventDefault()});const e=document.createElement("div");S(e,"fancybox-protected"),i.appendChild(e)}if(r&&s){const o=t.contentRect,a=Math.max(o.fullWidth,o.fullHeight);let c=null;!s.opacity&&a>1200&&(c=document.createElement("img"),S(c,"fancybox-ghost"),c.src=r,i.appendChild(c));const u=()=>{c&&(S(c,"f-fadeFastOut"),setTimeout(()=>{c&&(c.remove(),c=null)},200))};(l=r,new Promise((e,t)=>{const n=new Image;n.onload=e,n.onerror=t,n.src=l})).then(()=>{n.hideLoading(e),e.state=le.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then(()=>{u(),this.instance.done(e)},()=>{}),c&&setTimeout(()=>{u()},a>2500?800:200)},()=>{n.hideLoading(e),n.revealContent(e)})}else{const i=this.optionFor(e,"initialSize"),o=this.optionFor(e,"zoom"),r={event:n.prevMouseMoveEvent||n.options.event,friction:o?.12:0};let a=n.optionFor(e,"showClass")||void 0,s=!0;n.isOpeningSlide(e)&&("full"===i?t.zoomToFull(r):"cover"===i?t.zoomToCover(r):"max"===i?t.zoomToMax(r):s=!1,t.stop("current")),s&&a&&(a=t.isDragging?"f-fadeIn":""),n.hideLoading(e),n.revealContent(e,a)}var l},()=>{n.setError(e,"{{IMAGE_ERROR}}")})}process(e,t){return new Promise((n,i)=>{var o;const r=this.instance,s=e.el;r.clearContent(e),r.showLoading(e);let l=this.optionFor(e,"content");if("string"==typeof l&&(l=a(l)),!l||!E(l)){if(l=document.createElement("img"),l instanceof HTMLImageElement){let n="",i=e.caption;n="string"==typeof i&&i?i.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${(null===(o=r.carousel)||void 0===o?void 0:o.pages.length)||1}`,l.src=t||"",l.alt=n,l.draggable=!1,e.srcset&&l.setAttribute("srcset",e.srcset),this.instance.isOpeningSlide(e)&&(l.fetchPriority="high")}e.sizes&&l.setAttribute("sizes",e.sizes)}S(l,"fancybox-image"),e.imageEl=l,r.setContent(e,l,!1),e.panzoom=new _(s,g({transformParent:!0},this.option("Panzoom")||{},{content:l,width:(t,n)=>r.optionFor(e,"width","auto",n)||"auto",height:(t,n)=>r.optionFor(e,"height","auto",n)||"auto",wheel:()=>{const e=r.option("wheel");return("zoom"===e||"pan"==e)&&e},click:(t,n)=>{var i,o;if(r.isCompact||r.isClosing())return!1;if(e.index!==(null===(i=r.getSlide())||void 0===i?void 0:i.index))return!1;if(n){const e=n.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(e.nodeName))return!1}let a=!n||n.target&&(null===(o=e.contentEl)||void 0===o?void 0:o.contains(n.target));return r.option(a?"contentClick":"backdropClick")||!1},dblClick:()=>r.isCompact?"toggleZoom":r.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:e=>{n(e)},error:()=>{i()},destroy:()=>{i()}}}))})}zoomIn(e){return new Promise((t,n)=>{const i=this.instance,o=i.container,{panzoom:r,contentEl:a,el:s}=e;r&&r.updateMetrics();const l=this.getZoomInfo(e);if(!(l&&s&&a&&r&&o))return void n();const{x:c,y:u,scale:d,opacity:h}=l,f=()=>{e.state!==le.Closing&&(h&&(a.style.opacity=Math.max(Math.min(1,1-(1-r.
11scale)/(1-d)),0)+""),r.scale>=1&&r.scale>r.targetScale-.1&&t(r))},p=e=>{(e.scale<.99||e.scale>1.01)&&!e.isDragging||(M(o,ye),a.style.opacity="",e.off("endAnimation",p),e.off("touchStart",p),e.off("afterTransform",f),t(e))};r.on("endAnimation",p),r.on("touchStart",p),r.on("afterTransform",f),r.on(["error","destroy"],()=>{n()}),r.panTo({x:c,y:u,scale:d,friction:0,ignoreBounds:!0}),r.stop("current");const g={event:"mousemove"===r.panMode?i.prevMouseMoveEvent||i.options.event:void 0},m=this.optionFor(e,"initialSize");S(o,ye),i.hideLoading(e),"full"===m?r.zoomToFull(g):"cover"===m?r.zoomToCover(g):"max"===m?r.zoomToMax(g):r.reset(.172)})}getZoomInfo(e){const{el:t,imageEl:n,thumbEl:i,panzoom:o}=e,r=this.instance,a=r.container;if(!t||!n||!i||!o||ee(i)<3||!this.optionFor(e,"zoom")||!a||r.state===se.Destroy)return!1;if("0"===getComputedStyle(a).getPropertyValue("--f-images-zoom"))return!1;const s=window.visualViewport||null;if(1!==(s?s.scale:1))return!1;let{top:l,left:c,width:u,height:d}=i.getBoundingClientRect(),{top:h,left:f,fitWidth:p,fitHeight:g}=o.contentRect;if(!(u&&d&&p&&g))return!1;const m=o.container.getBoundingClientRect();f+=m.left,h+=m.top;const v=-1*(f+.5*p-(c+.5*u)),b=-1*(h+.5*g-(l+.5*d)),y=u/p;let w=this.option("zoomOpacity")||!1;return"auto"===w&&(w=Math.abs(u/d-p/g)>.1),{x:v,y:b,scale:y,opacity:w}}attach(){const e=this,t=e.instance;t.on("Carousel.change",e.onChange),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.removeSlide",e.onRemoveSlide),t.on("close",e.onClose)}detach(){const e=this,t=e.instance;t.off("Carousel.change",e.onChange),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.removeSlide",e.onRemoveSlide),t.off("close",e.onClose)}}Object.defineProperty(we,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;const xe="html",Te="youtube",Ce="vimeo",Oe="html5video",Ee=(e,t={})=>{const n=new URL(e),i=new URLSearchParams(n.search),o=new URLSearchParams;for(const[e,n]of[...i,...Object.entries(t)]){let t=n+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&o.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else o.set(e,t)}let r=o+"",a=e.match(/#t=((.*)?\d+s)/);return a&&(r+="#t="+a[1]),r},Me=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class Se extends q{onBeforeInitSlide(e,t,n){this.processType(n)}onCreateSlide(e,t,n){this.setContent(n)}onClearContent(e,t){t.xhr&&(t.xhr.abort(),t.xhr=null);const n=t.iframeEl;n&&(n.onload=n.onerror=null,n.src="//about:blank",t.iframeEl=null);const i=t.contentEl,o=t.placeholderEl;if("inline"===t.type&&i&&o)i.classList.remove("fancybox__content"),"none"!==i.style.display&&(i.style.display="none"),o.parentNode&&o.parentNode.insertBefore(i,o),o.remove(),t.contentEl=void 0,t.placeholderEl=void 0;else for(;t.el&&t.el.firstChild;)t.el.removeChild(t.el.firstChild)}onSelectSlide(e,t,n){n.state===le.Ready&&this.playVideo()}onUnselectSlide(e,t,n){var i,o;if(n.type===Oe){try{null===(o=null===(i=n.el)||void 0===i?void 0:i.querySelector("video"))||void 0===o||o.pause()}catch(e){}return}let r;n.type===Ce?r={method:"pause",value:"true"}:n.type===Te&&(r={event:"command",func:"pauseVideo"}),r&&n.iframeEl&&n.iframeEl.contentWindow&&n.iframeEl.contentWindow.postMessage(JSON.stringify(r),"*"),n.poller&&clearTimeout(n.poller)}onDone(e,t){e.isCurrentSlide(t)&&!e.isClosing()&&this.playVideo()}onRefresh(e,t){t.slides.forEach(e=>{e.el&&(this.resizeIframe(e),this.setAspectRatio(e))})}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let t of Array.from(document.getElementsByClassName("fancybox__iframe")))t instanceof HTMLIFrameElement&&t.contentWindow===e.source&&(t.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===t.event){const e=document.getElementById(t.id);e&&(e.dataset.ready="true")}}catch(e){}}loadAjaxContent(e){const t=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);const n=this.instance,i=new XMLHttpRequest;n.showLoading(e),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&n.state===se.Ready&&(n.hideLoading(e),200===i.status?n.setContent(e,i.responseText):n.setError(e,404===i.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const o=e.ajax||null;i.open(o?"POST":"GET",t+""),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(o),e.xhr=i}setInlineContent(e){let t=null;if(E(e.src))t=e.src;else if("string"==typeof e.src){const n=e.src.split("#",2).pop();t=n?document.getElementById(n):null}if(t){if("clone"===e.type||t.closest(".fancybox__slide")){t=t.cloneNode(!0);const n=t.dataset.animationName;n&&(t.classList.remove(n),delete t.dataset.animationName);let i=t.getAttribute("id");i=i?i+"--clone":`clone-${this.instance.id}-${e.index}`,t.setAttribute("id",i)}else if(t.parentNode){const n=document.createElement("div");n.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(n,t),e.placeholderEl=n}this.instance.setContent(e,t)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){const{src:t,el:n}=e;if(!t||"string"!=typeof t||!n)return;n.classList.add("is-loading");const i=this.instance,o=document.createElement("iframe");o.className="fancybox__iframe",o.setAttribute("id",`fancybox__iframe_${i.id}_${e.index}`);for(const[t,n]of Object.entries(this.optionFor(e,"iframeAttr")||{}))o.setAttribute(t,n);o.onerror=()=>{i.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=o;const r=this.optionFor(e,"preload");if("iframe"!==e.type||!1===r)return o.setAttribute("src",e.src+""),i.setContent(e,o,!1),this.resizeIframe(e),void i.revealContent(e);i.showLoading(e),o.onload=()=>
11{if(!o.src.length)return;const t="true"!==o.dataset.ready;o.dataset.ready="true",this.resizeIframe(e),t?i.revealContent(e):i.hideLoading(e)},o.setAttribute("src",t),i.setContent(e,o,!1)}resizeIframe(e){const{type:t,iframeEl:n}=e;if(t===Te||t===Ce)return;const i=null==n?void 0:n.parentElement;if(!n||!i)return;let o=e.autoSize;void 0===o&&(o=this.optionFor(e,"autoSize"));let r=e.width||0,a=e.height||0;r&&a&&(o=!1);const s=i&&i.style;if(!1!==e.preload&&!1!==o&&s)try{const e=window.getComputedStyle(i),t=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),o=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=n.contentWindow;if(l){const e=l.document,n=e.getElementsByTagName(xe)[0],i=e.body;s.width="",i.style.overflow="hidden",r=r||n.scrollWidth+t,s.width=r+"px",i.style.overflow="",s.flex="0 0 auto",s.height=i.scrollHeight+"px",a=n.scrollHeight+o}}catch(e){}if(r||a){const e={flex:"0 1 auto",width:"",height:""};r&&"auto"!==r&&(e.width=r+"px"),a&&"auto"!==a&&(e.height=a+"px"),Object.assign(s,e)}}playVideo(){const e=this.instance.getSlide();if(!e)return;const{el:t}=e;if(!t||!t.offsetParent)return;if(!this.optionFor(e,"videoAutoplay"))return;if(e.type===Oe)try{const e=t.querySelector("video");if(e){const t=e.play();void 0!==t&&t.then(()=>{}).catch(t=>{e.muted=!0,e.play()})}}catch(e){}if(e.type!==Te&&e.type!==Ce)return;const n=()=>
11{if(e.iframeEl&&e.iframeEl.contentWindow){let t;if("true"===e.iframeEl.dataset.ready)return t=e.type===Te?{event:"command",func:"playVideo"}:{method:"play",value:"true"},t&&e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);e.type===Te&&(t={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(n,250)};n()}processType(e){if(e.html)return e.type=xe,e.src=e.html,void(e.html="");const t=this.instance.optionFor(e,"src","");if(!t||"string"!=typeof t)return;let n=e.type,i=null;if(i=t.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const o=this.optionFor(e,Te),{nocookie:r}=o,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(o,["nocookie"]),s=`www.youtube${r?"-nocookie":""}.com`,l=Ee(t,a),c=encodeURIComponent(i[2]);e.videoId=c,e.src=`https://${s}/embed/${c}?${l}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${c}/mqdefault.jpg`,n=Te}else if(i=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const o=Ee(t,this.optionFor(e,Ce)),r=encodeURIComponent(i[1]),a=i[4]||"";e.videoId=r,e.src=`https://player.vimeo.com/video/${r}?${a?`h=${a}${o?"&":""}`:""}${o}`,n=Ce}if(!n&&e.triggerEl){const t=e.triggerEl.dataset.type;Me.includes(t)&&(n=t)}n||"string"==typeof t&&("#"===t.charAt(0)?n="inline":(i=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(n=Oe,e.videoFormat=e.videoFormat||"video/"+("ogv"===i[1]?"ogg":i[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?n="image":t.match(/\.(pdf)((\?|#).*)?$/i)&&(n="pdf")),(i=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`https://maps.google.${i[1]}/?ll=${(i[2]?i[2]+"&z="+Math.floor(parseFloat(i[3]))+(i[4]?i[4].replace(/^\//,"&"):""):i[4]+"").replace(/\?/,"&")}&output=${i[4]&&i[4].indexOf("layer=c")>0?"svembed":"embed"}`,n="map"):(i=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`https://maps.google.${i[1]}/maps?q=${i[2].replace("query=","q=").replace("api=1","")}&output=embed`,n="map"),n=n||this.instance.option("defaultType"),e.type=n,"image"===n&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){const t=this.instance.optionFor(e,"src")||"";if(e&&e.type&&t){switch(e.type){case xe:this.instance.setContent(e,t);break;case Oe:const n=this.option("videoTpl");n&&this.instance.setContent(e,n.replace(/\{\{src\}\}/gi,t+"").replace(/\{\{format\}\}/gi,this.optionFor(e,"videoFormat")||"").replace(/\{\{poster\}\}/gi,e.poster||e.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case"map":case Te:case Ce:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){const t=e.contentEl;if(!(e.el&&t&&e.type&&[Te,Ce,Oe].includes(e.type)))return;let n,i=e.width||"auto",o=e.height||"auto";if("auto"===i||"auto"===o){n=this.optionFor(e,"videoRatio");const t=(n+"").match(/(\d+)\s*\/\s?(\d+)/);n=t&&t.length>2?parseFloat(t[1])/parseFloat(t[2]):parseFloat(n+"")}else i&&o&&(n=i/o);if(!n)return;t.style.aspectRatio="",t.style.width="",t.style.height="",t.offsetHeight;const r=t.getBoundingClientRect(),a=r.width||1,s=r.height||1;t.style.aspectRatio=n+"",n<a/s?(o="auto"===o?s:Math.min(s,o),t.style.width="auto",t.style.height=o+"px"):(i="auto"===i?a:Math.min(a,i),t.style.width=i+"px",t.style.height="auto")}attach(){const e=this,t=e.instance;t.on("Carousel.beforeInitSlide",e.onBeforeInitSlide),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.selectSlide",e.onSelectSlide),t.on("Carousel.unselectSlide",e.onUnselectSlide),t.on("Carousel.Panzoom.refresh",e.onRefresh),t.on("done",e.onDone),t.on("clearContent",e.onClearContent),window.addEventListener("message",e.onMessage)}detach(){const e=this,t=e.instance;t.off("Carousel.beforeInitSlide",e.onBeforeInitSlide),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.selectSlide",e.onSelectSlide),t.off("Carousel.unselectSlide",e.onUnselectSlide),t.off("Carousel.Panzoom.refresh",e.onRefresh),t.off("done",e.onDone),t.off("clearContent",e.onClearContent),window.removeEventListener("message",e.onMessage)}}Object.defineProperty(Se,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:'<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n  <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}}});const De="play",Ae="pause",Pe="ready";class ke extends q{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Pe}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==Pe}onReady(e){this.option("autoStart")&&(e.isInfinite||e.page<e.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){"visible"===document.visibilityState?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var e;this.inHover=!1,(null===(e=this.instance.panzoom)||void 0===e?void 0:e.isResting)&&this.resume()}onTimerEnd(){const e=this.instance;"play"===this.state&&(e.isInfinite||e.page!==e.pages.length-1?e.
11slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();const t=this.instance,n=(null===(e=t.pages[t.page])||void 0===e?void 0:e.slides)||[];let i=this.option("progressParentEl");if(i||(i=(1===n.length?n[0].el:null)||t.viewport),!i)return null;const o=document.createElement("div");return S(o,"f-progress"),i.prepend(o),this.progressBar=o,o.offsetHeight,o}set(){const e=this,t=e.instance;if(t.pages.length<2)return;if(e.timer)return;const n=e.option("timeout");e.state=De,S(t.container,"has-autoplay");let i=e.createProgressBar();i&&(i.style.transitionDuration=n+"ms",i.style.transform="scaleX(1)"),e.timer=setTimeout(()=>{e.timer=null,e.inHover||e.onTimerEnd()},n),e.emit("set")}clear(){const e=this;e.timer&&(clearTimeout(e.timer),e.timer=null),e.removeProgressBar()}start(){const e=this;if(e.set(),e.state!==Pe){if(e.option("pauseOnHover")){const t=e.instance.container;t.addEventListener("mouseenter",e.onMouseEnter,!1),t.addEventListener("mouseleave",e.onMouseLeave,!1)}document.addEventListener("visibilitychange",e.onVisibilityChange,!1),e.emit("start")}}stop(){const e=this,t=e.state,n=e.instance.container;e.clear(),e.state=Pe,n.removeEventListener("mouseenter",e.onMouseEnter,!1),n.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),M(n,"has-autoplay"),t!==Pe&&e.emit("stop")}pause(){const e=this;e.state===De&&(e.state=Ae,e.clear(),e.emit(Ae))}resume(){const e=this,t=e.instance;if(t.isInfinite||t.page!==t.pages.length-1)if(e.state!==De){if(e.state===Ae&&!e.inHover){const t=new Event("resume",{bubbles:!0,cancelable:!0});e.emit("resume",t),t.defaultPrevented||e.set()}}else e.set();else e.stop()}toggle(){this.state===De||this.state===Ae?this.stop():this.start()}attach(){const e=this,t=e.instance;t.on("ready",e.onReady),t.on("Panzoom.startAnimation",e.onChange),t.on("Panzoom.endAnimation",e.onSettle),t.on("Panzoom.touchMove",e.onChange)}detach(){const e=this,t=e.instance;t.off("ready",e.onReady),t.off("Panzoom.startAnimation",e.onChange),t.off("Panzoom.endAnimation",e.onSettle),t.off("Panzoom.touchMove",e.onChange),e.stop()}}Object.defineProperty(ke,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class je extends q{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){const t=e.carousel;if(!t)return;const n=e.container;n&&(t.options.Autoplay=g({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{e.emit("startSlideshow")},set:t=>{var i;n.classList.add("has-slideshow"),(null===(i=e.getSlide())||void 0===i?void 0:i.state)!==le.Ready&&t.pause()},stop:()=>{n.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume:(t,n)=>{var i,o,r;!n||!n.cancelable||(null===(i=e.getSlide())||void 0===i?void 0:i.state)===le.Ready&&(null===(r=null===(o=e.carousel)||void 0===o?void 0:o.panzoom)||void 0===r?void 0:r.isResting)||n.preventDefault()}}}),t.attachPlugins({Autoplay:ke}),this.ref=t.plugins.Autoplay)}onReady(e){const t=e.carousel,n=this.ref;n&&t&&this.option("playOnStart")&&(t.isInfinite||t.page<t.pages.length-1)&&n.start()}onDone(e,t){const n=this.ref,i=e.carousel;if(!n||!i)return;const o=t.panzoom;o&&o.on("startAnimation",()=>{e.isCurrentSlide(t)&&n.stop()}),e.isCurrentSlide(t)&&n.resume()}onKeydown(e,t){var n;const i=this.ref;i&&t===this.option("key")&&"BUTTON"!==(null===(n=document.activeElement)||void 0===n?void 0:n.nodeName)&&i.toggle()}attach(){const e=this,t=e.instance;t.on("Carousel.init",e.onPrepare),t.on("Carousel.ready",e.onReady),t.on("done",e.onDone),t.on("keydown",e.onKeydown)}detach(){const e=this,t=e.instance;t.off("Carousel.init",e.onPrepare),t.off("Carousel.ready",e.onReady),t.off("done",e.onDone),t.off("keydown",e.onKeydown)}}Object.defineProperty(je,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:e=>{var t;return(null===(t=e.instance.container)||void 0===t?void 0:t.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||e.instance.container},timeout:3e3}});const Ie={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};var Le;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Hidden=2]="Hidden"}(Le||(Le={}));
11const Ne="isResting",_e="thumbWidth",Fe="thumbHeight",Re="thumbClipWidth";let He=class extends q{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Le.Init})}get isModern(){return"modern"===this.type}onInitSlide(e,t){const n=t.el?t.el.dataset:void 0;n&&(t.thumbSrc=n.thumbSrc||t.thumbSrc||"",t[Re]=parseFloat(n[Re]||"")||t[Re]||0,t[Fe]=parseFloat(n.thumbHeight||"")||t[Fe]||0),this.addSlide(t)}onInitSlides(){this.build()}onChange(){var e;if(!this.isModern)return;const t=this.container,n=this.instance,i=n.panzoom,o=this.carousel,r=o?o.panzoom:null,a=n.page;if(i&&o&&r){if(i.isDragging){M(t,this.cn(Ne));let i=(null===(e=o.pages[a])||void 0===e?void 0:e.pos)||0;i+=n.getProgress(a)*(this[Re]+this.thumbGap);let s=r.getBounds();-1*i>s.x.min&&-1*i<s.x.max&&r.panTo({x:-1*i,friction:.12})}else l(t,this.cn(Ne),i.isResting);this.shiftModern()}}onRefresh(){this.updateProps();for(const e of this.instance.slides||[])this.resizeModernSlide(e);this.shiftModern()}isDisabled(){const e=this.option("minCount")||0;if(e){const t=this.instance;let n=0;for(const e of t.slides||[])e.thumbSrc&&n++;if(n<e)return!0}const t=this.option("type");return["modern","classic"].indexOf(t)<0}getThumb(e){const t=this.option("thumbTpl")||"";return{html:this.instance.localize(t,[["%i",e.index],["%d",e.index+1],["%s",e.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(e){const t=this.carousel;t&&t.addSlide(e.index,this.getThumb(e))}getSlides(){const e=[];
11for(const t of this.instance.slides||[])e.push(this.getThumb(t));return e}resizeModernSlide(e){this.isModern&&(e[_e]=e[Re]&&e[Fe]?Math.round(this[Fe]*(e[Re]/e[Fe])):this[_e])}updateProps(){const e=this.container;if(!e)return;const t=t=>parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-"+t))||0;this.thumbGap=t("gap"),this.thumbExtraGap=t("extra-gap"),this[_e]=t("width")||40,this[Re]=t("clip-width")||40,this[Fe]=t("height")||40}build(){const e=this;if(e.state!==Le.Init)return;if(e.isDisabled())return void e.emit("disabled");const t=e.instance,n=t.container,i=e.getSlides(),o=e.option("type");e.type=o;const r=e.option("parentEl"),a=e.cn("container"),s=e.cn("track");let l=null==r?void 0:r.querySelector("."+a);l||(l=document.createElement("div"),S(l,a),r?r.appendChild(l):n.after(l)),S(l,"is-"+o),S(n,e.cn("hasThumbs")),e.container=l,e.updateProps();let c=l.querySelector("."+s);c||(c=document.createElement("div"),S(c,e.cn("track")),l.appendChild(c)),e.track=c;const u=g({},{track:c,infinite:!1,center:!0,fill:"classic"===o,dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},e.option("Carousel")||{},{Sync:{target:t},slides:i}),d=new t.constructor(l,u);d.on("createSlide",(t,n)=>{e.setProps(n.index),e.emit("createSlide",n,n.el)}),d.on("ready",()=>{e.shiftModern(),e.emit("ready")}),d.on("refresh",()=>{e.shiftModern()}),d.on("Panzoom.click",(t,n,i)=>{e.onClick(i)}),e.carousel=d,e.state=Le.Ready}onClick(e){e.preventDefault(),e.stopPropagation();const t=this.instance,{pages:n,page:i}=t,o=e=>{if(e){const t=e.closest("[data-carousel-index]");if(t)return[parseInt(t.dataset.carouselIndex||"",10)||0,t]}return[-1,void 0]},r=(e,t)=>{const n=document.elementFromPoint(e,t);return n?o(n):[-1,void 0]};let[a,s]=o(e.target);if(a>-1)return;const l=this[Re],c=e.clientX,u=e.clientY;let[d,h]=r(c-l,u),[f,p]=r(c+l,u);h&&p?(a=Math.abs(c-h.getBoundingClientRect().right)<Math.abs(c-p.getBoundingClientRect().left)?d:f,a===i&&(a=a===d?f:d)):h?a=d:p&&(a=f),a>-1&&n[a]&&t.slideTo(a)}getShift(e){var t;const n=this,{instance:i}=n,o=n.carousel;if(!i||!o)return 0;const r=n[_e],a=n[Re],s=n.thumbGap,l=n.thumbExtraGap;if(!(null===(t=o.slides[e])||void 0===t?void 0:t.el))return 0;const c=.5*(r-a),u=i.pages.length-1;let d=i.getProgress(0),h=i.getProgress(u),f=i.getProgress(e,!1,!0),p=0,g=c+l+s;const m=d<0&&d>-1,v=h>0&&h<1;return 0===e?(p=g*Math.abs(d),v&&1===d&&(p-=g*Math.abs(h))):e===u?(p=g*Math.abs(h)*-1,m&&-1===h&&(p+=g*Math.abs(d))):m||v?(p=-1*g,p+=g*Math.abs(d),p+=g*(1-Math.abs(h))):p=g*f,p}setProps(e){var t;const n=this;if(!n.isModern)return;const{instance:o}=n,r=n.carousel;if(o&&r){const a=null===(t=r.slides[e])||void 0===t?void 0:t.el;if(a&&a.childNodes.length){let t=i(1-Math.abs(o.getProgress(e))),r=i(n.getShift(e));a.style.setProperty("--progress",t?t+"":""),a.style.setProperty("--shift",r+"")}}}shiftModern(){const e=this;if(!e.isModern)return;const{instance:t,track:n}=e,i=t.panzoom,o=e.carousel;if(!(t&&n&&i&&o))return;if(i.state===y.Init||i.state===y.Destroy)return;for(const n of t.slides)e.setProps(n.index);let r=(e[Re]+e.thumbGap)*(o.slides.length||0);n.style.setProperty("--width",r+"")}cleanup(){const e=this;e.carousel&&e.carousel.destroy(),e.carousel=null,e.container&&e.container.remove(),e.container=null,e.track&&e.track.remove(),e.track=null,e.state=Le.Init,M(e.instance.container,e.cn("hasThumbs"))}attach(){const e=this,t=e.instance;t.on("initSlide",e.onInitSlide),t.state===H.Init?t.on("initSlides",e.onInitSlides):e.onInitSlides(),t.on(["change","Panzoom.afterTransform"],e.onChange),t.on("Panzoom.refresh",e.onRefresh)}detach(){const e=this,t=e.instance;t.off("initSlide",e.onInitSlide),t.off("initSlides",e.onInitSlides),t.off(["change","Panzoom.afterTransform"],e.onChange),t.off("Panzoom.refresh",e.onRefresh),e.cleanup()}};Object.defineProperty(He,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Ie});const ze=Object.assign(Object.assign({},Ie),{key:"t",showOnStart:!0,parentEl:null}),Be="is-masked",qe="aria-hidden";class We extends q{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onClick(e,t){t.stopPropagation()}onCreateSlide(e,t){var n,i,o;const r=(null===(o=null===(i=null===(n=this.instance)||void 0===n?void 0:n.carousel)||void 0===i?void 0:i.slides[t.index])||void 0===o?void 0:o.type)||"",a=t.el;if(a&&r){let e="for-"+r;["video","youtube","vimeo","html5video"].includes(r)&&(e+=" for-video"),S(a,e)}}onInit(){var e;const t=this,n=t.instance,i=n.carousel;if(t.ref||!i)return;const o=t.option("parentEl")||n.footer||n.container;if(!o)return;const r=g({},t.options,{parentEl:o,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:n.option("Carousel.friction")||0}},on:{ready:e=>{const n=e.container;n&&this.hidden&&(t.refresh(),n.style.transition="none",t.hide(),n.offsetHeight,queueMicrotask(()=>{n.style.transition="",t.show()}))}}});r.Carousel=r.Carousel||{},r.Carousel.on=g((null===(e=t.options.Carousel)||void 0===e?void 0:e.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),i.options.Thumbs=r,i.attachPlugins({Thumbs:He}),t.ref=i.plugins.Thumbs,t.option("showOnStart")||(t.ref.state=Le.Hidden,t.hidden=!0)}onResize(){var e;const t=null===(e=this.ref)||void 0===e?void 0:e.container;t&&(t.style.maxHeight="")}onKeydown(e,t){const n=this.option("key");n&&n===t&&this.toggle()}toggle(){const e=this.ref;if(e&&!e.isDisabled())return e.state===Le.Hidden?(e.state=Le.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){const e=this.ref;if(!e||e.isDisabled())return;const t=e.container;t&&(this.refresh(),t.offsetHeight,t.removeAttribute(qe),t.classList.remove(Be),this.hidden=!1)}
11hide(){const e=this.ref,t=e&&e.container;t&&(this.refresh(),t.offsetHeight,t.classList.add(Be),t.setAttribute(qe,"true")),this.hidden=!0}refresh(){const e=this.ref;if(!e||!e.state)return;const t=e.container,n=(null==t?void 0:t.firstChild)||null;t&&n&&n.childNodes.length&&(t.style.maxHeight=n.getBoundingClientRect().height+"px")}attach(){const e=this,t=e.instance;t.state===se.Init?t.on("Carousel.init",e.onInit):e.onInit(),t.on("resize",e.onResize),t.on("keydown",e.onKeydown)}detach(){var e;const t=this,n=t.instance;n.off("Carousel.init",t.onInit),n.off("resize",t.onResize),n.off("keydown",t.onKeydown),null===(e=n.carousel)||void 0===e||e.detachPlugins(["Thumbs"]),t.ref=null}}Object.defineProperty(We,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ze});const Ye={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};var Ve;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Disabled=2]="Disabled"}(Ve||(Ve={}));const Xe={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},$e="has-toolbar",Ue="fancybox__toolbar";class Ge extends q{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ve.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(e){var t;if(!e.carousel)return;let n=this.option("display"),i=this.option("absolute"),o=this.option("enabled");if("auto"===o){const e=this.instance.carousel;let t=0;if(e)for(const n of e.slides)(n.panzoom||"image"===n.type)&&t++;t||(o=!1)}o||(n=void 0);let r=0;const a={left:[],middle:[],right:[]};if(n)for(const e of["left","middle","right"])for(const i of n[e]){const n=this.createEl(i);n&&(null===(t=a[e])||void 0===t||t.push(n),r++)}let s=null;if(r&&(s=this.createContainer()),s){for(const[e,t]of Object.entries(a)){const n=document.createElement("div");S(n,Ue+"__column is-"+e);for(const e of t)n.appendChild(e);"auto"!==i||"middle"!==e||t.length||(i=!0),s.appendChild(n)}!0===i&&S(s,"is-absolute"),this.state=Ve.Ready,this.onRefresh()}else this.state=Ve.Disabled}onClick(e){var t,n;
11const i=this.instance,o=i.getSlide(),r=null==o?void 0:o.panzoom,a=e.target,s=a&&E(a)?a.dataset:null;if(!s)return;if(void 0!==s.fancyboxToggleThumbs)return e.preventDefault(),e.stopPropagation(),void(null===(t=i.plugins.Thumbs)||void 0===t||t.toggle());if(void 0!==s.fancyboxToggleFullscreen)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==s.fancyboxToggleSlideshow){e.preventDefault(),e.stopPropagation();const t=null===(n=i.carousel)||void 0===n?void 0:n.plugins.Autoplay;let o=t.isActive;return r&&"mousemove"===r.panMode&&!o&&r.reset(),void(o?t.stop():t.start())}const l=s.panzoomAction,c=s.panzoomChange;if((c||l)&&(e.preventDefault(),e.stopPropagation()),c){let t={};try{t=JSON.parse(c)}catch(e){}r&&r.applyChange(t)}else l&&r&&r[l]&&r[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const e=this.container;if(!e)return;const t=this.instance.getSlide();if(!t||t.state!==le.Ready)return;const n=t&&!t.error&&t.panzoom;for(const t of e.querySelectorAll("[data-panzoom-action]"))n?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));let i=n&&n.canZoomIn(),o=n&&n.canZoomOut();for(const t of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))i?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))o?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of e.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){o||i?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));const e=t.querySelector("g");e&&(e.style.display=i?"":"none")}}onDone(e,t){var n;null===(n=t.panzoom)||void 0===n||n.on("afterTransform",()=>{this.instance.isCurrentSlide(t)&&this.onRefresh()}),this.instance.isCurrentSlide(t)&&this.onRefresh()}createContainer(){const e=this.instance.container;if(!e)return null;const t=this.option("parentEl")||e;let n=t.querySelector("."+Ue);return n||(n=document.createElement("div"),S(n,Ue),t.prepend(n)),n.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&S(e,$e),this.container=n,n}createEl(e){const t=this.instance,n=t.carousel;if(!n)return null;if("toggleFS"===e)return null;if("fullscreen"===e&&!re())return null;let i=null;const o=n.slides.length||0;let r=0,s=0;for(const e of n.slides)(e.panzoom||"image"===e.type)&&r++,("image"===e.type||e.downloadSrc)&&s++;if(o<2&&["infobar","prev","next"].includes(e))return i;if(void 0!==Ye[e]&&!r)return null;if("download"===e&&!s)return null;if("thumbs"===e){const e=t.plugins.Thumbs;if(!e||!e.isEnabled)return null}if("slideshow"===e&&(!n.plugins.Autoplay||o<2))return null;if(void 0!==Ye[e]){const t=Ye[e];i=document.createElement("button"),i.setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),S(i,"f-button"),t.action&&(i.dataset.panzoomAction=t.action),t.change&&(i.dataset.panzoomChange=JSON.stringify(t.change)),i.appendChild(a(this.instance.localize(t.icon)))}else{const t=(this.option("items")||[])[e];t&&(i=a(this.instance.localize(t.tpl)),"function"==typeof t.click&&i.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),"function"==typeof t.click&&t.click.call(this,this,e)}))}const l=null==i?void 0:i.querySelector("svg");if(l)for(const[e,t]of Object.entries(Xe))l.getAttribute(e)||l.setAttribute(e,String(t));return i}removeContainer(){const e=this.container;e&&e.remove(),this.container=null,this.state=Ve.Disabled;const t=this.instance.container;t&&M(t,$e)}attach(){const e=this,t=e.instance;t.on("Carousel.initSlides",e.onReady),t.on("done",e.onDone),t.on(["reveal","Carousel.change"],e.onChange),e.onReady(e.instance)}detach(){const e=this,t=e.instance;t.off("Carousel.initSlides",e.onReady),t.off("done",e.onDone),t.off(["reveal","Carousel.change"],e.onChange),e.removeContainer()}}Object.defineProperty(Ge,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g>
11<path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null}});const Ze={Hash:class extends q{onReady(){ue=!1}onChange(e){he&&clearTimeout(he);const{hash:t}=fe(),{hash:n}=pe(),i=e.isOpeningSlide(e.getSlide());i&&(ce=n===t?"":n),t&&t!==n&&(he=setTimeout(()=>{try{if(e.state===se.Ready){let e="replaceState";i&&!de&&(e="pushState",de=!0),window.history[e]({},document.title,window.location.pathname+window.location.search+t)}}catch(e){}},300))}onClose(e){if(he&&clearTimeout(he),!ue&&de)return de=!1,ue=!1,void window.history.back();if(!ue)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(ce||""))}catch(e){}}attach(){const e=this.instance;e.on("ready",this.onReady),e.on(["Carousel.ready","Carousel.change"],this.onChange),e.on("close",this.onClose)}detach(){const e=this.instance;e.off("ready",this.onReady),e.off(["Carousel.ready","Carousel.change"],this.onChange),e.off("close",this.onClose)}static parseURL(){return pe()}static startFromUrl(){ge()}static destroy(){window.removeEventListener("hashchange",ve,!1)}},Html:Se,Images:we,Slideshow:je,Thumbs:We,Toolbar:Ge},Ke="with-fancybox",Je="hide-scrollbar",Qe="--fancybox-scrollbar-compensate",et="--fancybox-body-margin",tt="aria-hidden",nt="is-using-tab",it="is-animated",ot="is-compact",rt="is-loading",at="is-opening",st="has-caption",lt="disabled",ct="tabindex",ut="download",dt="href",ht="src",ft=e=>"string"==typeof e,pt=function(){var e=window.getSelection();return!!e&&"Range"===e.type};let gt,mt=null,vt=null,bt=0,yt=0;const wt=new Map;let xt=0;class Tt extends b{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(e=[],t={},n={}){super(t),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:se.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),gt||(gt=re()),this.id=t.id||++xt,wt.set(this.id,this),this.userSlides=e,this.userPlugins=n,queueMicrotask(()=>{this.init()})}init(){if(this.state===se.Destroy)return;this.state=se.Init,this.attachPlugins(Object.assign(Object.assign({}
11,Tt.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!te)return;const e=document,t=e.body,n=e.documentElement;if(t.classList.contains(Je))return;let i=window.innerWidth-n.getBoundingClientRect().width;const o=parseFloat(window.getComputedStyle(t).marginRight);i<0&&(i=0),n.style.setProperty(Qe,i+"px"),o&&t.style.setProperty(et,o+"px"),t.classList.add(Je)})(),this.initLayout(),this.scale();const e=()=>{this.initCarousel(this.userSlides),this.state=se.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(tt,"false")},16)};this.option("Fullscreen.autoStart")&&gt&&!gt.isFullscreen()?gt.request().then(()=>{this.startedFs=!0,e()}).catch(()=>e()):e()}initLayout(){var e,t;const n=this.option("parentEl")||document.body,i=a(this.localize(this.option("tpl.main")||""));i&&(i.setAttribute("id","fancybox-"+this.id),i.setAttribute("aria-label",this.localize("{{MODAL}}")),i.classList.toggle(ot,this.isCompact),S(i,this.option("mainClass")||""),S(i,at),this.container=i,this.footer=i.querySelector(".fancybox__footer"),n.appendChild(i),S(document.documentElement,Ke),mt&&vt||(mt=document.createElement("span"),S(mt,"fancybox-focus-guard"),mt.setAttribute(ct,"0"),mt.setAttribute(tt,"true"),mt.setAttribute("aria-label","Focus guard"),vt=mt.cloneNode(),null===(e=i.parentElement)||void 0===e||e.insertBefore(mt,i),null===(t=i.parentElement)||void 0===t||t.append(vt)),i.addEventListener("mousedown",e=>{bt=e.pageX,yt=e.pageY,M(i,nt)}),this.option("animated")&&(S(i,it),setTimeout(()=>{this.isClosing()||M(i,it)},350)),this.emit("initLayout"))}initCarousel(e){const t=this.container;if(!t)return;const n=t.querySelector(".fancybox__carousel");if(!n)return;const i=this.carousel=new Q(n,g({},{slides:e,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));i.on("*",(e,t,...n)=>{this.emit("Carousel."+t,e,...n)}),i.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(e,t,n)=>{this.clearContent(n),n.state=void 0}),i.on("Panzoom.touchStart",()=>{var e,t;this.isCompact||this.endIdle(),(null===(e=document.activeElement)||void 0===e?void 0:e.closest(".f-thumbs"))&&(null===(t=this.container)||void 0===t||t.focus())}),i.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(i.on("Panzoom.afterTransform",(e,t)=>{const n=this.getSlide();if(n&&o(n.el))return;const i=this.container;if(i){const e=Math.abs(t.current.f),n=e<1?"":Math.max(.5,Math.min(1,1-e/t.contentRect.fitHeight*1.5));i.style.setProperty("--fancybox-ts",n?"0s":""),i.style.setProperty("--fancybox-opacity",n+"")}}),i.on("Panzoom.touchEnd",(e,t,n)=>{var i;const r=this.getSlide();if(r&&o(r.el))return;if(t.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName))return;const a=Math.abs(t.dragOffset.y);"y"===t.lockedAxis&&(a>=200||a>=50&&t.dragOffset.time<300)&&(n&&n.cancelable&&n.preventDefault(),this.close(n,"f-throwOut"+(t.current.f<0?"Up":"Down")))})),i.on("change",e=>{var t;let n=null===(t=this.getSlide())||void 0===t?void 0:t.triggerEl;if(n){const t=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:e.page});n.dispatchEvent(t)}}),i.on(["refresh","change"],e=>{const t=this.container;if(!t)return;for(const n of t.querySelectorAll("[data-fancybox-current-index]"))n.innerHTML=e.page+1;for(const n of t.querySelectorAll("[data-fancybox-count]"))n.innerHTML=e.pages.length;if(!e.isInfinite){for(const n of t.querySelectorAll("[data-fancybox-next]"))e.page<e.pages.length-1?(n.removeAttribute(lt),n.removeAttribute(ct)):(n.setAttribute(lt,""),n.setAttribute(ct,"-1"));for(const n of t.querySelectorAll("[data-fancybox-prev]"))e.page>0?(n.removeAttribute(lt),n.removeAttribute(ct)):(n.setAttribute(lt,""),n.setAttribute(ct,"-1"))}const n=this.getSlide();if(!n)return;let i=n.downloadSrc||"";
11i||"image"!==n.type||n.error||!ft(n.src)||(i=n.src);for(const e of t.querySelectorAll("[data-fancybox-download]")){const t=n.downloadFilename;i?(e.removeAttribute(lt),e.removeAttribute(ct),e.setAttribute(dt,i),e.setAttribute(ut,t||i),e.setAttribute("target","_blank")):(e.setAttribute(lt,""),e.setAttribute(ct,"-1"),e.removeAttribute(dt),e.removeAttribute(ut))}}),this.emit("initCarousel")}attachEvents(){const e=this,t=e.container;if(!t)return;t.addEventListener("click",e.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",e.onVisibilityChange,!1),document.addEventListener("mousemove",e.onMousemove),e.option("trapFocus")&&document.addEventListener("focus",e.onFocus,!0),window.addEventListener("resize",e.onResize);const n=window.visualViewport;n&&(n.addEventListener("scroll",e.onResize),n.addEventListener("resize",e.onResize))}detachEvents(){const e=this,t=e.container;if(!t)return;document.removeEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),t.removeEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),t.removeEventListener("click",e.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",e.onMousemove),window.removeEventListener("resize",e.onResize);const n=window.visualViewport;n&&(n.removeEventListener("resize",e.onResize),n.removeEventListener("scroll",e.onResize)),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),document.removeEventListener("focus",e.onFocus,!0)}scale(){const e=this.container;if(!e)return;const t=window.visualViewport,n=Math.max(1,(null==t?void 0:t.scale)||1);let i="",o="",r="";if(t&&n>1){let e=t.offsetLeft+"px",a=t.offsetTop+"px";i=t.width*n+"px",o=t.height*n+"px",r=`translate3d(${e}, ${a}, 0) scale(${1/n})`}e.style.transform=r,e.style.width=i,e.style.height=o}onClick(e){var t;const{container:n,isCompact:i}=this;if(!n||this.isClosing())return;!i&&this.option("idle")&&this.resetIdle();const o=e.composedPath()[0];if(o.closest(".fancybox-spinner")||o.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(o.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(o.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();if("click"===e.type&&0===e.detail)return;if(Math.abs(e.pageX-bt)>30||Math.abs(e.pageY-yt)>30)return;const r=document.activeElement;if(pt()&&r&&n.contains(r))return;if(i&&"image"===(null===(t=this.getSlide())||void 0===t?void 0:t.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout(()=>{this.toggleIdle(),this.clickTimer=null},350));if(this.emit("click",e),e.defaultPrevented)return;let a=!1;if(o.closest(".fancybox__content")){if(r){if(r.closest("[contenteditable]"))return;o.matches(ie)||r.blur()}if(pt())return;a=this.option("contentClick")}else o.closest(".fancybox__carousel")&&!o.matches(ie)&&(a=this.option("backdropClick"));"close"===a?(e.preventDefault(),this.close(e)):"next"===a?(e.preventDefault(),this.next()):"prev"===a&&(e.preventDefault(),this.prev())}onWheel(e){const t=e.target;let n=this.option("wheel",e);t.closest(".fancybox__thumbs")&&(n="slide");const i="slide"===n,o=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e})),a=Math.max(-1,Math.min(1,o)),s=Date.now();this.pwt&&s-this.pwt<300?i&&e.preventDefault():(this.pwt=s,this.emit("wheel",e,a),e.defaultPrevented||("close"===n?(e.preventDefault(),this.close(e)):"slide"===n&&(r(t)||(e.preventDefault(),this[a>0?"prev":"next"]()))))}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const t=e.key,n=this.option("keyboard");if(!n)return;const i=e.composedPath()[0],o=document.activeElement&&document.activeElement.classList,r=o&&o.contains("f-button")||i.dataset.carouselPage||i.dataset.carouselIndex;if("Escape"!==t&&!r&&E(i)&&(i.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(i.nodeName)))return;if("Tab"===e.key?S(this.container,nt):M(this.container,nt),e.ctrlKey||e.altKey||e.shiftKey)return;
11this.emit("keydown",t,e);const a=n[t];a&&"function"==typeof this[a]&&(e.preventDefault(),this[a]())}onResize(){const e=this.container;if(!e)return;const t=this.isCompact;e.classList.toggle(ot,t),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(e){this.isTopmost()&&this.checkFocus(e)}onMousemove(e){this.prevMouseMoveEvent=e,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(e){const t=this.optionFor(e,"closeButton")||!1;if("auto"===t){const e=this.plugins.Toolbar;if(e&&e.state===Ve.Ready)return}if(!t)return;if(!e.contentEl||e.closeBtnEl)return;const n=this.option("tpl.closeButton");if(n){const t=a(this.localize(n));e.closeBtnEl=e.contentEl.appendChild(t),e.el&&S(e.el,"has-close-btn")}}manageCaption(e){var t,n;const i="fancybox__caption",o=this.container;if(!o)return;M(o,st);const r=this.isCompact||this.option("commonCaption"),a=!r;if(this.caption&&this.stop(this.caption),a&&this.caption&&(this.caption.remove(),this.caption=null),r&&!this.caption)for(const e of(null===(t=this.carousel)||void 0===t?void 0:t.slides)||[])e.captionEl&&(e.captionEl.remove(),e.captionEl=void 0,M(e.el,st),null===(n=e.el)||void 0===n||n.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||r&&!this.isCurrentSlide(e))return;const s=e.el;let l=this.optionFor(e,"caption","");if(!l)return void(r&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let c=null;if(a){if(c=e.captionEl||null,s&&!c){const t=`fancybox__caption_${this.id}_${e.index}`;c=document.createElement("div"),S(c,i),c.setAttribute("id",t),e.captionEl=s.appendChild(c),S(s,st),s.setAttribute("aria-labelledby",t)}}else c=this.caption,c||(c=o.querySelector("."+i)),c||(c=document.createElement("div"),c.dataset.fancyboxCaption="",S(c,i),(this.footer||o).prepend(c)),S(o,st),this.caption=c;c&&(c.innerHTML="",ft(l)||"number"==typeof l?c.innerHTML=l+"":l instanceof HTMLElement&&c.appendChild(l))}checkFocus(e){this.focus(e)}focus(e){var t;if(this.ignoreFocusChange)return;const n=document.activeElement||null,i=(null==e?void 0:e.target)||null,o=this.container,r=null===(t=this.carousel)||void 0===t?void 0:t.viewport;if(!o||!r)return;if(!e&&n&&o.contains(n))return;const a=this.getSlide(),s=a&&a.state===le.Ready?a.el:null;if(!s||s.contains(n)||o===n)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;const l=Array.from(o.querySelectorAll(ie));let c=[],u=null;for(let e of l){const t=!e.offsetParent||!!e.closest('[aria-hidden="true"]'),n=s&&s.contains(e),i=!r.contains(e);if(e===o||(n||i)&&!t){c.push(e);const t=e.dataset.origTabindex;void 0!==t&&t&&(e.tabIndex=parseFloat(t)),e.removeAttribute("data-orig-tabindex"),!e.hasAttribute("autoFocus")&&u||(u=e)}else{const t=void 0===e.dataset.origTabindex?e.getAttribute("tabindex")||"":e.dataset.origTabindex;t&&(e.dataset.origTabindex=t),e.tabIndex=-1}}let d=null;e?(!i||c.indexOf(i)<0)&&(d=u||o,c.length&&(n===vt?d=c[0]:this.lastFocus!==o&&n!==mt||(d=c[c.length-1]))):d=a&&"image"===a.type?o:u||o,d&&oe(d),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return(null===(e=Tt.getInstance())||void 0===e?void 0:e.id)==this.id}animate(e=null,t="",n){if(!e||!t)return void(n&&n());this.stop(e);const i=o=>{o.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",i),delete e.dataset.animationName,n&&n(),M(e,t))};e.dataset.animationName=t,e.addEventListener("animationend",i),S(e,t)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,t="",n=!0){if(this.isClosing())return;const i=e.el;if(!i)return;let o=null;if(E(t)?o=t:(o=a(t+""),E(o)||(o=document.createElement("div"),o.innerHTML=t+"")),["img","picture","iframe","video","audio"].includes(o.nodeName.toLowerCase())){const e=document.createElement("div");e.appendChild(o),o=e}E(o)&&e.filter&&!e.error&&(o=o.querySelector(e.filter)),o&&E(o)?(S(o,"fancybox__content"),e.id&&o.setAttribute("id",e.id),"none"!==o.style.display&&"none"!==getComputedStyle(o).getPropertyValue("display")||(o.style.display=e.display||this.option("defaultDisplay")||"flex"),i.classList.add("has-"+(e.error?"error":e.type||"unknown")),i.prepend(o),e.contentEl=o,n&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,t){const n=e.el,i=e.contentEl;
11n&&i&&(this.emit("reveal",e),this.hideLoading(e),e.state=le.Opening,(t=this.isOpeningSlide(e)?void 0===t?this.optionFor(e,"showClass"):t:"f-fadeIn")?this.animate(i,t,()=>{this.done(e)}):this.done(e))}done(e){this.isClosing()||(e.state=le.Ready,this.emit("done",e),S(e.el,"is-done"),this.isCurrentSlide(e)&&this.option("autoFocus")&&queueMicrotask(()=>{var t;null===(t=e.panzoom)||void 0===t||t.updateControls(),this.option("autoFocus")&&this.focus()}),this.isOpeningSlide(e)&&(M(this.container,at),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(e){const t=this.getSlide();return!(!e||!t)&&t.index===e.index}isOpeningSlide(e){var t,n;return null===(null===(t=this.carousel)||void 0===t?void 0:t.prevPage)&&e&&e.index===(null===(n=this.getSlide())||void 0===n?void 0:n.index)}showLoading(e){e.state=le.Loading;const t=e.el;t&&(S(t,rt),this.emit("loading",e),e.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===le.Loading){let n=a(O);S(n,"fancybox-spinner"),e.spinnerEl=n,t.prepend(n),this.animate(n,"f-fadeIn")}},250))}hideLoading(e){const t=e.el;if(!t)return;const n=e.spinnerEl;this.isClosing()?null==n||n.remove():(M(t,rt),n&&this.animate(n,"f-fadeOut",()=>{n.remove()}
11),e.state===le.Loading&&(this.emit("loaded",e),e.state=le.Ready))}setError(e,t){if(this.isClosing())return;const n=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",n,e),n.defaultPrevented)return;e.error=t,this.hideLoading(e),this.clearContent(e);const i=document.createElement("div");i.classList.add("fancybox-error"),i.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,i)}clearContent(e){if(void 0===e.state)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);const t=e.el;t&&(M(t,"has-error"),M(t,"has-unknown"),M(t,"has-"+(e.type||"unknown"))),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;const t=this.carousel;return(null===(e=null==t?void 0:t.pages[null==t?void 0:t.page])||void 0===e?void 0:e.slides[0])||void 0}close(e,t){if(this.isClosing())return;const n=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",n,e),n.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());const i=()=>{this.proceedClose(e,t)};this.startedFs&&gt&&gt.isFullscreen()?Promise.resolve(gt.exit()).then(()=>i()):i()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){const t=()=>{this.clearIdle(),this.idle=!0,S(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(e)t();else{const e=this.option("idle");e&&(this.idleTimer=setTimeout(t,e))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,M(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){gt&&(gt.isFullscreen()?gt.exit():gt.request().then(()=>{this.startedFs=!0}))}isClosing(){return[se.Closing,se.CustomClosing,se.Destroy].includes(this.state)}proceedClose(e,t){var n,i;this.state=se.Closing,this.clearIdle(),this.detachEvents();const o=this.container,r=this.carousel,a=this.getSlide(),s=a&&this.option("placeFocusBack")?a.triggerEl||this.option("triggerEl"):null;if(s&&(ee(s)?oe(s):s.focus()),o&&(M(o,at),S(o,"is-closing"),o.setAttribute(tt,"true"),this.option("animated")&&S(o,it),o.style.pointerEvents="none"),r){r.clearTransitions(),null===(n=r.panzoom)||void 0===n||n.destroy(),null===(i=r.plugins.Navigation)||void 0===i||i.detach();for(const e of r.slides){e.state=le.Closing,this.hideLoading(e);const t=e.contentEl;t&&this.stop(t);const n=null==e?void 0:e.panzoom;n&&(n.stop(),n.detachEvents(),n.detachObserver()),this.isCurrentSlide(e)||r.emit("removeSlide",e)}}this.emit("close",e),this.state!==se.CustomClosing?(void 0===t&&a&&(t=this.optionFor(a,"hideClass")),t&&a?(this.animate(a.contentEl,t,()=>{r&&r.emit("removeSlide",a)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var e;if(this.state===se.Destroy)return;this.state=se.Destroy,null===(e=this.carousel)||void 0===e||e.destroy();const t=this.container;t&&t.remove(),wt.delete(this.id);const n=Tt.getInstance();n?n.focus():(mt&&(mt.remove(),mt=null),vt&&(vt.remove(),vt=null),M(document.documentElement,Ke),(()=>{if(!te)return;const e=document,t=e.body;t.classList.remove(Je),t.style.setProperty(et,""),e.documentElement.style.setProperty(Qe,"")})(),this.emit("destroy"))}
11static bind(e,t,n){if(!te)return;let i,o="",r={};if(void 0===e?i=document.body:ft(e)?(i=document.body,o=e,"object"==typeof t&&(r=t||{})):(i=e,ft(t)&&(o=t),"object"==typeof n&&(r=n||{})),!i||!E(i))return;o=o||"[data-fancybox]";const a=Tt.openers.get(i)||new Map;a.set(o,r),Tt.openers.set(i,a),1===a.size&&i.addEventListener("click",Tt.fromEvent)}static unbind(e,t){let n,i="";if(ft(e)?(n=document.body,i=e):(n=e,ft(t)&&(i=t)),!n)return;const o=Tt.openers.get(n);o&&i&&o.delete(i),i&&o||(Tt.openers.delete(n),n.removeEventListener("click",Tt.fromEvent))}static destroy(){let e;for(;e=Tt.getInstance();)e.destroy();for(const e of Tt.openers.keys())e.removeEventListener("click",Tt.fromEvent);Tt.openers=new Map}static fromEvent(e){if(e.defaultPrevented)return;if(e.button&&0!==e.button)return;if(e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0];const n=t.closest("[data-fancybox-trigger]");if(n){const e=n.dataset.fancyboxTrigger||"",i=document.querySelectorAll(`[data-fancybox="${e}"]`),o=parseInt(n.dataset.fancyboxIndex||"",10)||0;t=i[o]||t}if(!(t&&t instanceof Element))return;let i,o,r,a;if([...Tt.openers].reverse().find(([e,n])=>!(!e.contains(t)||![...n].reverse().find(([n,s])=>{let l=t.closest(n);return!!l&&(i=e,o=n,r=l,a=s,!0)}))),!i||!o||!r)return;a=a||{},e.preventDefault(),t=r;let s=[],l=g({},ae,a);l.event=e,l.triggerEl=t,l.delegate=n;const c=l.groupAll,u=l.groupAttr,d=u&&t?t.getAttribute(""+u):"";if((!t||d||c)&&(s=[].slice.call(i.querySelectorAll(o))),t&&!c&&(s=d?s.filter(e=>e.getAttribute(""+u)===d):[t]),!s.length)return;const h=Tt.getInstance();return h&&h.options.triggerEl&&s.indexOf(h.options.triggerEl)>-1?void 0:(t&&(l.startIndex=s.indexOf(t)),Tt.fromNodes(s,l))}static fromSelector(e,t,n){let i=null,o="",r={};if(ft(e)?(i=document.body,o=e,"object"==typeof t&&(r=t||{})):e instanceof HTMLElement&&ft(t)&&(i=e,o=t,"object"==typeof n&&(r=n||{})),!i||!o)return!1;const a=Tt.openers.get(i);return!!a&&(r=g({},a.get(o)||{},r),!!r&&Tt.fromNodes(Array.from(i.querySelectorAll(o)),r))}static fromNodes(e,t){t=g({},ae,t||{});const n=[];for(const i of e){const e=i.dataset||{},o=e.src||i.getAttribute(dt)||i.getAttribute("currentSrc")||i.getAttribute(ht)||void 0;let r;const a=t.delegate;let s;a&&n.length===t.startIndex&&(r=a instanceof HTMLImageElement?a:a.querySelector("img:not([aria-hidden])")),r||(r=i instanceof HTMLImageElement?i:i.querySelector("img:not([aria-hidden])")),r&&(s=r.currentSrc||r.src||void 0,!s&&r.dataset&&(s=r.dataset.lazySrc||r.dataset.src||void 0));const l={src:o,triggerEl:i,thumbEl:r,thumbElSrc:s,thumbSrc:s};for(const t in e){let n=e[t]+"";n="false"!==n&&("true"===n||n),l[t]=n}n.push(l)}return new Tt(n,t)}static getInstance(e){return e?wt.get(e):Array.from(wt.values()).reverse().find(e=>!e.isClosing()&&e)||null}static getSlide(){var e;return(null===(e=Tt.getInstance())||void 0===e?void 0:e.getSlide())||null}static show(e=[],t={}){return new Tt(e,t)}static next(){const e=Tt.getInstance();e&&e.next()}static prev(){const e=Tt.getInstance();e&&e.prev()}static close(e=!0,...t){if(e)for(const e of wt.values())e.close(...t);else{const e=Tt.getInstance();e&&e.close(...t)}}}Object.defineProperty(Tt,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.34"}),Object.defineProperty(Tt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ae}),Object.defineProperty(Tt,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:Ze}),Object.defineProperty(Tt,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map})},function(e,t,n){"use strict";n.r(t),n.d(t,"Autoplay",(function(){return h}));const i=(e,...t)=>{const n=t.length;for(let o=0;o<n;o++){const n=t[o]||{};Object.entries(n).forEach(([t,n])=>{const o=Array.isArray(n)?[]:{};var r;e[t]||Object.assign(e,{[t]:o}),"object"==typeof(r=n)&&null!==r&&r.constructor===Object&&"[object Object]"===Object.prototype.toString.call(r)?Object.assign(e[t],i(o,n)):Array.isArray(n)?Object.assign(e,{[t]:[...n]}):Object.assign(e,{[t]:n})})}return e},o=function(e,t){return e.split(".").reduce((e,t)=>"object"==typeof e?e[t]:void 0,t)};class r{constructor(e={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(e);for(const e of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))e.startsWith("on")&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}setOptions(e){this.options=e?i({},this.constructor.defaults,e):{};for(const[e,t]of Object.entries(this.option("on")||{}))this.on(e,t)}option(e,...t){let n=o(e,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...t)),n}optionFor(e,t,n,...i){let r=o(t,e);var a;"string"!=typeof(a=r)||isNaN(a)||isNaN(parseFloat(a))||(r=parseFloat(r)),"true"===r&&(r=!0),"false"===r&&(r=!1),r&&"function"==typeof r&&(r=r.call(this,this,e,...i));let s=o(t,this.options);return s&&"function"==typeof s?r=s.call(this,this,e,...i,r):void 0===r&&(r=s),void 0===r?n:r}cn(e){const t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,(e,t,n)=>{let i="";return n?i=this.option(`${t[0]+t.toLowerCase().substring(1)}.l10n.${n}`):t&&(i=this.option("l10n."+t)),i||(i=e),i});for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}on(e,t){let n=[];"string"==typeof e?n=e.split(" "):Array.isArray(e)&&(n=e),this.events||(this.events=new Map),n.forEac
11h(e=>{let n=this.events.get(e);n||(this.events.set(e,[]),n=[]),n.includes(t)||n.push(t),this.events.set(e,n)})}off(e,t){let n=[];"string"==typeof e?n=e.split(" "):Array.isArray(e)&&(n=e),n.forEach(e=>{const n=this.events.get(e);if(Array.isArray(n)){const e=n.indexOf(t);e>-1&&n.splice(e,1)}})}emit(e,...t){[...this.events.get(e)||[]].forEach(e=>e(this,...t)),"*"!==e&&this.emit("*",e,...t)}}Object.defineProperty(r,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.34"}),Object.defineProperty(r,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class a extends r{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}const s=e=>(""+(e||"")).split(" ").filter(e=>!!e),l=(e,t)=>{e&&s(t).forEach(t=>{e.classList.add(t)})},c="play",u="pause",d="ready";class h extends a{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==d}onReady(e){this.option("autoStart")&&(e.isInfinite||e.page<e.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){"visible"===document.visibilityState?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var e;this.inHover=!1,(null===(e=this.instance.panzoom)||void 0===e?void 0:e.isResting)&&this.resume()}onTimerEnd(){const e=this.instance;"play"===this.state&&(e.isInfinite||e.page!==e.pages.length-1?e.slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();const t=this.instance,n=(null===(e=t.pages[t.page])||void 0===e?void 0:e.slides)||[];let i=this.option("progressParentEl");if(i||(i=(1===n.length?n[0].el:null)||t.viewport),!i)return null;const o=document.createElement("div");return l(o,"f-progress"),i.prepend(o),this.progressBar=o,o.offsetHeight,o}set(){const e=this,t=e.instance;if(t.pages.length<2)return;if(e.timer)return;const n=e.option("timeout");e.state=c,l(t.container,"has-autoplay");let i=e.createProgressBar();i&&(i.style.transitionDuration=n+"ms",i.style.transform="scaleX(1)"),e.timer=setTimeout(()=>{e.timer=null,e.inHover||e.onTimerEnd()},n),e.emit("set")}clear(){const e=this;e.timer&&(clearTimeout(e.timer),e.timer=null),e.removeProgressBar()}start(){const e=this;if(e.set(),e.state!==d){if(e.option("pauseOnHover")){const t=e.instance.container;t.addEventListener("mouseenter",e.onMouseEnter,!1),t.addEventListener("mouseleave",e.onMouseLeave,!1)}document.addEventListener("visibilitychange",e.onVisibilityChange,!1),e.emit("start")}}stop(){const e=this,t=e.state,n=e.instance.container;var i;e.clear(),e.state=d,n.removeEventListener("mouseenter",e.onMouseEnter,!1),n.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),(i=n)&&s("has-autoplay").forEach(e=>{i.classList.remove(e)}),t!==d&&e.emit("stop")}pause(){const e=this;e.state===c&&(e.state=u,e.clear(),e.emit(u))}resume(){const e=this,t=e.instance;if(t.isInfinite||t.page!==t.pages.length-1)if(e.state!==c){if(e.state===u&&!e.inHover){const t=new Event("resume",{bubbles:!0,cancelable:!0});e.emit("resume",t),t.defaultPrevented||e.set()}}else e.set();else e.stop()}toggle(){this.state===c||this.state===u?this.stop():this.start()}attach(){const e=this,t=e.instance;t.on("ready",e.onReady),t.on("Panzoom.startAnimation",e.onChange),t.on("Panzoom.endAnimation",e.onSettle),t.on("Panzoom.touchMove",e.onChange)}detach(){const e=this,t=e.instance;t.off("ready",e.onReady),t.off("Panzoom.startAnimation",e.onChange),t.off("Panzoom.endAnimation",e.onSettle),t.off("Panzoom.touchMove",e.onChange),e.stop()}}Object.defineProperty(h,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}})},,,,function(e,t,n){"use strict";n.r(t),n.d(t,"Toolbar",(function(){return l}));const i=(e,...t)=>{const n=t.length;for(let o=0;o<n;o++){const n=t[o]||{};
11Object.entries(n).forEach(([t,n])=>{const o=Array.isArray(n)?[]:{};var r;e[t]||Object.assign(e,{[t]:o}),"object"==typeof(r=n)&&null!==r&&r.constructor===Object&&"[object Object]"===Object.prototype.toString.call(r)?Object.assign(e[t],i(o,n)):Array.isArray(n)?Object.assign(e,{[t]:[...n]}):Object.assign(e,{[t]:n})})}return e},o=function(e,t){return e.split(".").reduce((e,t)=>"object"==typeof e?e[t]:void 0,t)};class r{constructor(e={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(e);for(const e of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))e.startsWith("on")&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}setOptions(e){this.options=e?i({},this.constructor.defaults,e):{};for(const[e,t]of Object.entries(this.option("on")||{}))this.on(e,t)}option(e,...t){let n=o(e,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...t)),n}optionFor(e,t,n,...i){let r=o(t,e);var a;"string"!=typeof(a=r)||isNaN(a)||isNaN(parseFloat(a))||(r=parseFloat(r)),"true"===r&&(r=!0),"false"===r&&(r=!1),r&&"function"==typeof r&&(r=r.call(this,this,e,...i));let s=o(t,this.options);return s&&"function"==typeof s?r=s.call(this,this,e,...i,r):void 0===r&&(r=s),void 0===r?n:r}cn(e){const t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,(e,t,n)=>{let i="";return n?i=this.option(`${t[0]+t.toLowerCase().substring(1)}.l10n.${n}`):t&&(i=this.option("l10n."+t)),i||(i=e),i});for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}on(e,t){let n=[];"string"==typeof e?n=e.split(" "):Array.isArray(e)&&(n=e),this.events||(this.events=new Map),n.forEach(e=>{let n=this.events.get(e);n||(this.events.set(e,[]),n=[]),n.includes(t)||n.push(t),this.events.set(e,n)})}off(e,t){let n=[];"string"==typeof e?n=e.split(" "):Array.isArray(e)&&(n=e),n.forEach(e=>{const n=this.events.get(e);if(Array.isArray(n)){const e=n.indexOf(t);e>-1&&n.splice(e,1)}})}emit(e,...t){[...this.events.get(e)||[]].forEach(e=>e(this,...t)),"*"!==e&&this.emit("*",e,...t)}}Object.defineProperty(r,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.34"}),Object.defineProperty(r,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class a extends r{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}const s=(e,t)=>{e&&(e=>(""+(e||"")).split(" ").filter(e=>!!e))(t).forEach(t=>{e.classList.add(t)})};class l extends a{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}addItem(e){const t=this.instance,n=this.container,i=this.option("items")[e];if(!i||!n)return;const o=document.createElement("button");o.setAttribute("title",i.title||t.localize(`{{${e.toUpperCase()}}}`)),s(o,"f-button");const r=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var n=document.createElement("div");t.firstChild;)n.appendChild(t.firstChild);return n}return t.firstChild}(t.localize(i.icon));if(r instanceof SVGElement)for(const[e,t]of Object.entries(this.option("svgAttr")))r.getAttribute(e)||r.setAttribute(e,String(t));o.appendChild(r),i.action&&(o.dataset.panzoomAction=i.action),i.change&&(o.dataset.panzoomChange=JSON.stringify(i.change)),i.click&&o.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),i&&"function"==typeof i.click&&i.click(t)}),n.appendChild(o)}createContainer(){if(this.container)return;const e=document.createElement("div");e.classList.add("f-panzoom__toolbar"),e.dataset.selectable="true",this.container=e;for(const e of this.option("display"))this.addItem(e);const t=this.instance.container;t.prepend(e),s(t,"has-toolbar")}removeContainer(){const e=this.container;e&&e.remove(),this.container=null,this.instance.container.classList.remove("has-toolbar")}attach(){this.createContainer()}detach(){this.removeContainer()}}Object.defineProperty(l,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{display:["zoomIn","zoomOut","toggle1to1","rotateCCW","rotateCW","flipX","flipY","reset","toggleFS"],items:{panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g>
11<line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}},svgAttr:{tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}}})},function(e,t,n){"use strict";n.r(t),function(e){var i=n(4),o=n(5),r=n(1),a=n(0),s=n(2),l=n(3),c=(n(15),function(){return(c=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)}),u=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i};function d(e,t){var n={config:c(c({},i.b),f.defaultConfig),l10n:o.a};function d(){var e;return(null===(e=n.calendarContainer)||void 0===e?void 0:e.getRootNode()).activeElement||document.activeElement}function h(e){return e.bind(n)}function p(){var e=n.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==n.calendarContainer&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),void 0!==n.daysContainer){var t=(n.days.offsetWidth+1)*e.showMonths;n.daysContainer.style.width=t+"px",n.calendarContainer.style.width=t+(void 0!==n.weekWrapper?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}}))}function g(e){if(0===n.selectedDates.length){var t=void 0===n.config.minDate||Object(s.b)(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),i=Object(s.f)(n.config);t.setHours(i.hours,i.minutes,i.seconds,t.getMilliseconds()),n.selectedDates=[t],n.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,i=Object(a.e)(e),o=i;void 0!==n.amPM&&i===n.amPM&&(n.amPM.textContent=n.l10n.amPM[Object(r.c)(n.amPM.textContent===n.l10n.amPM[0])]);var s=parseFloat(o.getAttribute("min")),l=parseFloat(o.getAttribute("max")),c=parseFloat(o.getAttribute("step")),u=parseInt(o.value,10),d=e.delta||(t?38===e.which?1:-1:0),h=u+c*d;if(void 0!==o.value&&2===o.value.length){var f=o===n.hourElement,p=o===n.minuteElement;h<s?(h=l+h+Object(r.c)(!f)+(Object(r.c)(f)&&Object(r.c)(!n.amPM)),p&&O(void 0,-1,n.hourElement)):h>l&&(h=o===n.hourElement?h-l-Object(r.c)(!n.amPM):s,p&&O(void 0,1,n.hourElement)),n.amPM&&f&&(1===c?h+u===23:Math.abs(h-u)>c)&&(n.amPM.textContent=n.l10n.amPM[Object(r.c)(n.amPM.textContent===n.l10n.amPM[0])]),o.value=Object(r.d)(h)}}(e);var o=n._input.value;m(),le(),n._input.value!==o&&n._debouncedChange()}function m(){if(void 0!==n.hourElement&&void 0!==n.minuteElement){var e,t,i=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(n.minuteElement.value,10)||0)%60,a=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;void 0!==n.amPM&&(e=i,t=n.amPM.textContent,i=e%12+12*Object(r.c)(t===n.l10n.amPM[1]));var l=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===Object(s.b)(n.latestSelectedDateObj,n.config.minDate,!0),c=void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===Object(s.b)(n.latestSelectedDateObj,n.config.maxDate,!0);if(void 0!==n.config.maxTime&&void 0!==n.config.minTime&&n.config.minTime>n.config.maxTime){var u=Object(s.a)(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),d=Object(s.a)(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),h=Object(s.a)(i,o,a);if(h>d&&h<u){var f=Object(s.h)(u);i=f[0],o=f[1],a=f[2]}}else{if(c){var p=void 0!==n.config.maxTime?n.config.maxTime:n.config.maxDate;(i=Math.min(i,p.getHours()))===p.getHours()&&(o=Math.min(o,p.getMinutes())),o===p.getMinutes()&&(a=Math.min(a,p.getSeconds()))}if(l){var g=void 0!==n.config.minTime?n.config.minTime:n.config.minDate;(i=Math.max(i,g.getHours()))===g.getHours()&&o<g.getMinutes()&&(o=g.getMinutes()),o===g.getMinutes()&&(a=Math.max(a,g.getSeconds()))}}b(i,o,a)}}function v(e){var t=e||n.latestSelectedDateObj;t&&t instanceof Date&&b(t.getHours(),t.getMinutes(),t.getSeconds())}function b(e,t,i){void 0!==n.latestSelectedDateObj&&n.latestSelectedDateObj.setHours(e%24,t,i||0,0),n.hourElement&&n.minuteElement&&!n.isMobile&&(n.hourElement.value=Object(r.d)(n.config.time_24hr?e:(12+e)%12+12*Object(r.c)(e%12==0)),n.minuteElement.value=Object(r.d)(t),void 0!==n.amPM&&(n.amPM.textContent=n.l10n.amPM[Object(r.c)(e>=12)]),void 0!==n.secondElement&&(n.secondElement.value=Object(r.d)(i)))}function y(e){var t=Object(a.e)(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&H(n)}function w(e,t,i,o){return t instanceof Array?t.forEach((function(t){return w(e,t,i,o)})):e instanceof Array?e.forEach((function(e){return w(e,t,i,o)})):(e.addEventListener(t,i,o),void n._handlers.push({remove:function(){return e.removeEventListener(t,i,o)}}))}function x(){ie("onChange")}function T(e,t){var i=void 0!==e?n.parseDate(e):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),o=n.currentYear,r=n.currentMonth;try{void 0!==i&&(n.currentYear=i.getFullYear(),n.currentMonth=i.getMonth())}catch(e){e.message="Invalid date supplied: "+i,n.config.errorHandler(e)}t&&n.currentYear!==o&&(ie("onYearChange"),k()),!t||n.currentYear===o&&n.currentMonth===r||ie("onMonthChange"),n.redraw()}function C(e){var t=Object(a.e)(e);~t.className.indexOf("arrow")&&O(e,t.classList.contains("arrowUp")?1:-1)}function O(e,t,n){var i=e&&Object(a.e)(e),o=n||i&&i.parentNode&&i.parentNode.firstChild,r=oe("increment");r.delta=t,o&&o.dispatchEvent(r)}function E(e,t,i,o){var r=z(t,!0),l=Object(a.b)("span",e,t.getDate().toString());return l.dateObj=t,l.$i=o,l.setAttribute("aria-label",n.formatDate(t,n.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===Object(s.b)(t,n.now)&&(n.todayDateElem=l,l.classList.add("today"),l.setAttribute("aria-current","date")),r?(l.tabIndex=-1,re(t)&&(l.classList.add("selected"),n.selectedDateElem=l,"range"===n.config.mode&&(Object(a.f)(l,"startRange",n.selectedDates[0]&&0===Object(s.b)(t,n.selectedDates[0],!0)),Object(a.f)(l,"endRange",n.selectedDates[1]&&0===Object(s.b)(t,n.selectedDates[1],!0)),"nextMonthDay"===e&&l.classList.add("inRange")))):l.classList.add("flatpickr-disabled"),"range"===n.config.mode&&function(e){return!("range"!==n.config.mode||n.selectedDates.length<2)&&(Object(s.b)(e,n.selectedDates[0])>=0&&Object(s.b)(e,n.selectedDates[1])<=0)}(t)&&!re(t)&&l.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==e&&o%7==6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(t)+"</span>"),ie("onDayCreate",l),l}function M(e){e.focus(),"range"===n.config.mode&&Y(e)}function S(e){for(var t=e>0?0:n.config.showMonths-1,i=e>0?n.config.showMonths:-1,o=t;o!=i;o+=e)for(var r=n.daysContainer.children[o],a=e>0?0:r.children.length-1,s=e>0?r.children.length:-1,l=a;l!=s;l+=e){var c=r.children[l];if(-1===c.className.indexOf("hidden")&&z(c.dateObj))return c}}function D(e,t){var i=d(),o=B(i||document.body),r=void 0!==e?e:o?i:void 0!==n.selectedDateElem&&B(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&B(n.todayDateElem)?n.todayDateElem:S(t>0?1:-1);void 0===r?n._input.focus():o?function(e,t){for(var i=-1===e.className.indexOf("Month")?e.dateObj.getMonth():n.currentMonth,o=t>0?n.config.showMonths:-1,r=t>0?1:-1,a=i-n.currentMonth;a!=o;a+=r)for(var s=n.daysContainer.children[a],l=i-n.currentMonth===a?e.$i+t:t<0?s.children.length-1:0,c=s.
vendor: 33,700 bytes, line 11
11children.length,u=l;u>=0&&u<c&&u!=(t>0?c:-1);u+=r){var d=s.children[u];if(-1===d.className.indexOf("hidden")&&z(d.dateObj)&&Math.abs(e.$i-u)>=Math.abs(t))return M(d)}n.changeMonth(r),D(S(r),0)}(r,t):M(r)}function A(e,t){for(var i=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,o=n.utils.getDaysInMonth((t-1+12)%12,e),r=n.utils.getDaysInMonth(t,e),s=window.document.createDocumentFragment(),l=n.config.showMonths>1,c=l?"prevMonthDay hidden":"prevMonthDay",u=l?"nextMonthDay hidden":"nextMonthDay",d=o+1-i,h=0;d<=o;d++,h++)s.appendChild(E("flatpickr-day "+c,new Date(e,t-1,d),0,h));for(d=1;d<=r;d++,h++)s.appendChild(E("flatpickr-day",new Date(e,t,d),0,h));for(var f=r+1;f<=42-i&&(1===n.config.showMonths||h%7!=0);f++,h++)s.appendChild(E("flatpickr-day "+u,new Date(e,t+1,f%r),0,h));var p=Object(a.b)("div","dayContainer");return p.appendChild(s),p}function P(){if(void 0!==n.daysContainer){Object(a.a)(n.daysContainer),n.weekNumbers&&Object(a.a)(n.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<n.config.showMonths;t++){var i=new Date(n.currentYear,n.currentMonth,1);i.setMonth(n.currentMonth+t),e.appendChild(A(i.getFullYear(),i.getMonth()))}n.daysContainer.appendChild(e),n.days=n.daysContainer.firstChild,"range"===n.config.mode&&1===n.selectedDates.length&&Y()}}function k(){if(!(n.config.showMonths>1||"dropdown"!==n.config.monthSelectorType)){var e=function(e){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&e<n.config.minDate.getMonth())&&!(void 0!==n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()&&e>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var i=Object(a.b)("option","flatpickr-monthDropdown-month");i.value=new Date(n.currentYear,t).getMonth().toString(),i.textContent=Object(l.b)(t,n.config.shorthandCurrentMonth,n.l10n),i.tabIndex=-1,n.currentMonth===t&&(i.selected=!0),n.monthsDropdownContainer.appendChild(i)}}}function j(){var e,t=Object(a.b)("div","flatpickr-month"),i=window.document.createDocumentFragment();n.config.showMonths>1||"static"===n.config.monthSelectorType?e=Object(a.b)("span","cur-month"):(n.monthsDropdownContainer=Object(a.b)("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),w(n.monthsDropdownContainer,"change",(function(e){var t=Object(a.e)(e),i=parseInt(t.value,10);n.changeMonth(i-n.currentMonth),ie("onMonthChange")})),k(),e=n.monthsDropdownContainer);var o=Object(a.c)("cur-year",{tabindex:"-1"}),r=o.getElementsByTagName("input")[0];r.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&r.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(r.setAttribute("max",n.config.maxDate.getFullYear().toString()),r.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var s=Object(a.b)("div","flatpickr-current-month");return s.appendChild(e),s.appendChild(o),i.appendChild(s),t.appendChild(i),{container:t,yearElement:r,monthElement:e}}function I(){Object(a.a)(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var e=n.config.showMonths;e--;){var t=j();n.yearElements.push(t.yearElement),n.monthElements.push(t.monthElement),n.monthNav.appendChild(t.container)}n.monthNav.appendChild(n.nextMonthNav)}function L(){n.weekdayContainer?Object(a.a)(n.weekdayContainer):n.weekdayContainer=Object(a.b)("div","flatpickr-weekdays");for(var e=n.config.showMonths;e--;){var t=Object(a.b)("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(t)}return N(),n.weekdayContainer}function N(){if(n.weekdayContainer){var e=n.l10n.firstDayOfWeek,t=u(n.l10n.weekdays.shorthand);e>0&&e<t.length&&(t=u(t.splice(e,t.length),t.splice(0,e)));for(var i=n.config.showMonths;i--;)n.weekdayContainer.children[i].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+t.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}}function _(e,t){void 0===t&&(t=!0);var i=t?e:e-n.currentMonth;i<0&&!0===n._hidePrevMonthArrow||i>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=i,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ie("onYearChange"),k()),P(),ie("onMonthChange"),ae())}function F(e){return n.calendarContainer.contains(e)}function R(e){if(n.isOpen&&!n.config.inline){var t=Object(a.e)(e),i=F(t),o=!(t===n.input||t===n.altInput||n.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(n.input)||~e.path.indexOf(n.altInput)))&&!i&&!F(e.relatedTarget),r=!n.config.ignoredFocusElements.some((function(e){return e.contains(t)}));o&&r&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&g(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&n.clear(!1))}}function H(e){if(!(!e||n.config.minDate&&e<n.config.minDate.getFullYear()||n.config.maxDate&&e>n.config.maxDate.getFullYear())){var t=e,i=n.currentYear!==t;n.currentYear=t||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),i&&(n.redraw(),ie("onYearChange"),k())}}function z(e,t){var i;void 0===t&&(t=!0);var o=n.parseDate(e,void 0,t);if(n.config.minDate&&o&&Object(s.b)(o,n.config.minDate,void 0!==t?t:!n.minDateHasTime)<0||n.config.maxDate&&o&&Object(s.b)(o,n.config.maxDate,void 0!==t?t:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===o)return!1;for(var r=!!n.config.enable,a=null!==(i=n.config.enable)&&void 0!==i?i:n.config.disable,l=0,c=void 0;l<a.length;l++){if("function"==typeof(c=a[l])&&c(o))return r;if(c instanceof Date&&void 0!==o&&c.getTime()===o.getTime())return r;if("string"==typeof c){var u=n.parseDate(c,void 0,!0);return u&&u.getTime()===o.getTime()?r:!r}if("object"==typeof c&&void 0!==o&&c.from&&c.to&&o.getTime()>=c.from.getTime()&&o.getTime()<=c.to.getTime())return r}return!r}function B(e){return void 0!==n.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(e))}function q(e){var t=e.target===n._input,i=n._input.value.trimEnd()!==se();!t||!i||e.relatedTarget&&F(e.relatedTarget)||n.setDate(n._input.value,!0,e.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function W(t){var i=Object(a.e)(t),o=n.config.wrap?e.contains(i):i===n._input,r=n.config.allowInput,s=n.isOpen&&(!r||!o),l=n.config.inline&&o&&!r;if(13===t.keyCode&&o){if(r)return n.setDate(n._input.value,!0,i===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),i.blur();n.open()}else if(F(i)||s||l){var c=!!n.timeContainer&&n.timeContainer.contains(i);switch(t.keyCode){case 13:c?(t.preventDefault(),g(),K()):J(t);break;case 27:t.preventDefault(),K();break;case 8:case 46:o&&!n.config.allowInput&&(t.preventDefault(),n.clear());break;case 37:case 39:if(c||o)n.hourElement&&n.hourElement.focus();else{t.preventDefault();var u=d();if(void 0!==n.daysContainer&&(!1===r||u&&B(u))){var h=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),_(h),D(S(1),0)):D(void 0,h)}}break;case 38:case 40:t.preventDefault();var f=40===t.keyCode?1:-1;n.daysContainer&&void 0!==i.$i||i===n.input||i===n.altInput?t.ctrlKey?(t.stopPropagation(),H(n.currentYear-f),D(S(1),0)):c||D(void 0,7*f):i===n.currentYearElement?H(n.currentYear-f):n.config.enableTime&&(!c&&n.hourElement&&n.hourElement.focus(),g(t),n._debouncedChange());break;case 9:if(c){var p=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((function(e){return e})),v=p.indexOf(i);if(-1!==v){var b=p[v+(t.shiftKey?-1:1)];t.preventDefault(),(b||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(i)&&t.shiftKey&&(t.preventDefault(),n._input.focus())}}if(void 0!==n.amPM&&i===n.amPM)switch(t.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],m(),le();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],m(),le()}(o||F(i))&&ie("onKeyDown",t)}function Y(e,t){if(void 0===t&&(t="flatpickr-day"),1===n.selectedDates.length&&(!e||e.classList.contains(t)&&!e.classList.contains("flatpickr-disabled"))){for(var i=e?e.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),o=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),r=Math.min(i,n.selectedDates[0].getTime()),a=Math.max(i,n.selectedDates[0].getTime()),l=!1,c=0,u=0,d=r;d<a;d+=s.e.DAY)z(new Date(d),!0)||(l=l||d>r&&d<a,d<o&&(!c||d>c)?c=d:d>o&&(!u||d<u)&&(u=d));Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+t)).forEach((function(t){var r=t.dateObj.getTime(),a=c>0&&r<c||u>0&&r>u;if(a)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(e){t.classList.remove(e)}));l&&!a||(["startRange","inRange","endRange","notAllowed"].forEach((function(e){t.classList.remove(e)})),void 0!==e&&(e.classList.add(i<=n.selectedDates[0].getTime()?"startRange":"endRange"),o<i&&r===o?t.classList.add("startRange"):o>i&&r===o&&t.classList.add("endRange"),r>=c&&(0===u||r<=u)&&Object(s.g)(r,o,i)&&t.classList.add("inRange")))}))}}function V(){!n.isOpen||n.config.static||n.config.inline||G()}function X(e){return function(t){var i=n.config["_"+e+"Date"]=n.parseDate(t,n.config.dateFormat),o=n.config["_"+("min"===e?"max":"min")+"Date"];void 0!==i&&(n["min"===e?"minDateHasTime":"maxDateHasTime"]=i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((function(e){return z(e)})),n.selectedDates.length||"min"!==e||v(i),le()),n.daysContainer&&(Z(),void 0!==i?n.currentYearElement[e]=i.getFullYear().toString():n.currentYearElement.removeAttribute(e),n.currentYearElement.disabled=!!o&&void 0!==i&&o.getFullYear()===i.getFullYear())}}function $(){return n.config.wrap?e.querySelector("[data-input]"):e}function U(){"object"!=typeof n.config.locale&&void 0===f.l10ns[n.config.locale]&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=c(c({},f.l10ns.default),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?f.l10ns[n.config.locale]:void 0),l.d.D="("+n.l10n.weekdays.shorthand.join("|")+")",l.d.l="("+n.l10n.weekdays.longhand.join("|")+")",l.d.M="("+n.l10n.months.shorthand.join("|")+")",l.d.F="("+n.l10n.months.longhand.join("|")+")",l.d.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")",void 0===c(c({},t),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr&&void 0===f.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=Object(s.c)(n),n.parseDate=Object(s.d)({config:n.config,l10n:n.l10n})}function G(e){if("function"!=typeof n.config.position){if(void 0!==n.calendarContainer){ie("onPreCalendarPosition");var t=e||n._positionElement,i=Array.prototype.reduce.call(n.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),o=n.calendarContainer.offsetWidth,r=n.config.position.split(" "),s=r[0],l=r.length>1?r[1]:null,c=t.getBoundingClientRect(),u=window.innerHeight-c.bottom,d="above"===s||"below"!==s&&u<i&&c.top>i,h=window.pageYOffset+c.top+(d?-i-2:t.offsetHeight+2);if(Object(a.f)(n.calendarContainer,"arrowTop",!d),Object(a.f)(n.calendarContainer,"arrowBottom",d),!n.config.inline){var f=window.pageXOffset+c.left,p=!1,g=!1;"center"===l?(f-=(o-c.width)/2,p=!0):"right"===l&&(f-=o-c.width,g=!0),Object(a.f)(n.calendarContainer,"arrowLeft",!p&&!g),Object(a.f)(n.calendarContainer,"arrowCenter",p),Object(a.f)(n.calendarContainer,"arrowRight",g);var m=window.document.body.offsetWidth-(window.pageXOffset+c.right),v=f+o>window.document.body.offsetWidth,b=m+o>window.document.body.offsetWidth;if(Object(a.f)(n.calendarContainer,"rightMost",v),!n.config.static)if(n.calendarContainer.style.top=h+"px",v)if(b){var y=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];if(n.cssRules){try{n.cssRules}catch(e){continue}e=n;break}}return null!=e?e:(i=document.createElement("style"),document.head.appendChild(i),i.sheet);var i}();if(void 0===y)return;var w=window.document.body.offsetWidth,x=Math.max(0,w/2-o/2),T=y.cssRules.length,C="{left:"+c.left+"px;right:auto;}";Object(a.f)(n.calendarContainer,"rightMost",!1),Object(a.f)(n.calendarContainer,"centerMost",!0),y.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+C,T),n.calendarContainer.style.left=x+"px",n.calendarContainer.style.right="auto"}else n.calendarContainer.style.left="auto",n.calendarContainer.style.right=m+"px";else n.calendarContainer.style.left=f+"px",n.calendarContainer.style.right="auto"}}}else n.config.position(n,e)}function Z(){n.config.noCalendar||n.isMobile||(k(),ae(),P())}function K(){n._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(n.close,0):n.close()}function J(e){e.preventDefault(),e.stopPropagation();var t=Object(a.d)(Object(a.e)(e),(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")}));if(void 0!==t){var i=t,o=n.latestSelectedDateObj=new Date(i.dateObj.getTime()),r=(o.getMonth()<n.currentMonth||o.getMonth()>n.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=i,"single"===n.config.mode)n.selectedDates=[o];else if("multiple"===n.config.mode){var l=re(o);l?n.selectedDates.splice(parseInt(l),1):n.selectedDates.push(o)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=o,n.selectedDates.push(o),0!==Object(s.b)(o,n.selectedDates[0],!0)&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(m(),r){var c=n.currentYear!==o.getFullYear();n.currentYear=o.getFullYear(),n.currentMonth=o.getMonth(),c&&(ie("onYearChange"),k()),ie("onMonthChange")}if(ae(),P(),le(),r||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():M(i),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){var u="single"===n.config.mode&&!n.config.enableTime,d="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(u||d)&&K()}x()}}n.parseDate=Object(s.d)({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=w,n._setHoursFromDate=v,n._positionCalendar=G,n.changeMonth=_,n.changeYear=H,n.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);n.input.value="",void 0!==n.altInput&&(n.altInput.value="");void 0!==n.mobileInput&&(n.mobileInput.value="");n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===t&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth());if(!0===n.config.enableTime){var i=Object(s.f)(n.config),o=i.hours,r=i.minutes,a=i.seconds;b(o,r,a)}n.redraw(),e&&ie("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active"));ie("onClose")},n.onMouseOver=Y,n._createElement=a.b,n.createDay=E,n.destroy=function(){void 0!==n.config&&ie("onDestroy");for(var e=n._handlers.length;e--;)n._handlers[e].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var t=n.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput);n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete n[e]}catch(e){}}))},n.isEnabled=z,n.jumpToDate=T,n.updateValue=le,n.open=function(e,t){void 0===t&&(t=n._positionElement);if(!0===n.isMobile){if(e){e.preventDefault();var i=Object(a.e)(e);i&&i.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void ie("onOpen")}if(n._input.disabled||n.config.inline)return;var o=n.isOpen;n.isOpen=!0,o||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),ie("onOpen"),G(t));!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==e&&n.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return n.hourElement.select()}),50))},n.redraw=Z,n.set=function(e,t){if(null!==e&&"object"==typeof e)for(var o in Object.assign(n.config,e),e)void 0!==Q[o]&&Q[o].forEach((function(e){return e()}));else n.config[e]=t,void 0!==Q[e]?Q[e].forEach((function(e){return e()})):i.a.indexOf(e)>-1&&(n.config[e]=Object(r.a)(t));n.redraw(),le(!0)},n.setDate=function(e,t,i){void 0===t&&(t=!1);void 0===i&&(i=n.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return n.clear(t);ee(e,i),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),T(void 0,t),v(),0===n.selectedDates.length&&n.clear(!1);le(t),t&&ie("onChange")},n.toggle=function(e){if(!0===n.isOpen)return n.close();n.open(e)};var Q={locale:[U,N],showMonths:[I,p,L],minDate:[T],maxDate:[T],positionElement:[ne],clickOpens:[function(){!0===n.config.clickOpens?(w(n._input,"focus",n.open),w(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function ee(e,t){var i=[];if(e instanceof Array)i=e.map((function(e){return n.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)i=[n.parseDate(e,t)];else if("string"==typeof e)switch(n.config.mode){case"single":case"time":i=[n.parseDate(e,t)];break;case"multiple":i=e.split(n.config.conjunction).map((function(e){return n.parseDate(e,t)}));break;case"range":i=e.split(n.l10n.rangeSeparator).map((function(e){return n.parseDate(e,t)}))}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));n.selectedDates=n.config.allowInvalidPreload?i:i.filter((function(e){return e instanceof Date&&z(e,!1)})),"range"===n.config.mode&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function te(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?n.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:n.parseDate(e.from,void 0),to:n.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function ne(){n._positionElement=n.config.positionElement||n._input}function ie(e,t){if(void 0!==n.config){var i=n.config[e];if(void 0!==i&&i.length>0)for(var o=0;i[o]&&o<i.length;o++)i[o](n.selectedDates,n.input.value,n,t);"onChange"===e&&(n.input.dispatchEvent(oe("change")),n.input.dispatchEvent(oe("input")))}}function oe(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function re(e){for(var t=0;t<n.selectedDates.length;t++){var i=n.selectedDates[t];if(i instanceof Date&&0===Object(s.b)(i,e))return""+t}return!1}function ae(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach((function(e,t){var i=new Date(n.currentYear,n.currentMonth,1);i.setMonth(n.currentMonth+t),n.config.showMonths>1||"static"===n.config.monthSelectorType?n.monthElements[t].textContent=Object(l.b)(i.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=i.getMonth().toString(),e.value=i.getFullYear().toString()})),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=void 0!==n.config.maxDate&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function se(e){var t=e||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map((function(e){return n.formatDate(e,t)})).filter((function(e,t,i){return"range"!==n.config.mode||n.config.enableTime||i.indexOf(e)===t})).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function le(e){void 0===e&&(e=!0),void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=se(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=se(n.config.altFormat)),!1!==e&&ie("onValueUpdate")}function ce(e){var t=Object(a.e)(e),i=n.prevMonthNav.contains(t),o=n.nextMonthNav.contains(t);i||o?_(i?-1:1):n.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):t.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}return function(){n.element=n.input=e,n.isOpen=!1,function(){var o=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],a=c(c({},JSON.parse(JSON.stringify(e.dataset||{}))),t),s={};n.config.parseDate=a.parseDate,n.config.formatDate=a.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(e){n.config._enable=te(e)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(e){n.config._disable=te(e)}});var l="time"===a.mode;if(!a.dateFormat&&(a.enableTime||l)){var u=f.defaultConfig.dateFormat||i.b.dateFormat;s.dateFormat=a.noCalendar||l?"H:i"+(a.enableSeconds?":S":""):u+" H:i"+(a.enableSeconds?":S":"")}if(a.altInput&&(a.enableTime||l)&&!a.altFormat){var d=f.defaultConfig.altFormat||i.b.altFormat;s.altFormat=a.noCalendar||l?"h:i"+(a.enableSeconds?":S K":" K"):d+" h:i"+(a.enableSeconds?":S":"")+" K"}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:X("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:X("max")});var p=function(e){return function(t){n.config["min"===e?"_minTime":"_maxTime"]=n.parseDate(t,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:p("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:p("max")}),"time"===a.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0);Object.assign(n.config,s,a);for(var g=0;g<o.length;g++)n.config[o[g]]=!0===n.config[o[g]]||"true"===n.config[o[g]];i.a.filter((function(e){return void 0!==n.config[e]})).forEach((function(e){n.config[e]=Object(r.a)(n.config[e]||[]).map(h)})),n.isMobile=!n.config.disableMobile&&!n.config.inline&&"single"===n.config.mode&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(g=0;g<n.config.plugins.length;g++){var m=n.config.plugins[g](n)||{};for(var v in m)i.a.indexOf(v)>-1?n.config[v]=Object(r.a)(m[v]).map(h).concat(n.config[v]):void 0===a[v]&&(n.config[v]=m[v])}a.altInputClass||(n.config.altInputClass=$().className+" "+n.config.altInputClass);ie("onParseConfig")}(),U(),function(){if(n.input=$(),!n.input)return void n.config.errorHandler(new Error("Invalid input element specified"));n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=Object(a.b)(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling));n.config.allowInput||n._input.setAttribute("readonly","readonly");ne()}(),function(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var e=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);e&&ee(e,n.config.dateFormat);n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]);void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i"));void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i"));n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}(),n.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=n.currentMonth),void 0===t&&(t=n.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:n.l10n.daysInMonth[e]}},n.isMobile||function(){var e=window.document.createDocumentFragment();if(n.calendarContainer=Object(a.b)("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild((n.monthNav=Object(a.b)("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Object(a.b)("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Object(a.b)("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,I(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(e){n.__hidePrevMonthArrow!==e&&(Object(a.f)(n.prevMonthNav,"flatpickr-disabled",e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(e){n.__hideNextMonthArrow!==e&&(Object(a.f)(n.nextMonthNav,"flatpickr-disabled",e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],ae(),n.monthNav)),n.innerContainer=Object(a.b)("div","flatpickr-innerContainer"),n.config.weekNumbers){var t=function(){n.calendarContainer.classList.add("hasWeeks");var e=Object(a.b)("div","flatpickr-weekwrapper");e.appendChild(Object(a.b)("span","flatpickr-weekday",n.l10n.weekAbbreviation));var t=Object(a.b)("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),i=t.weekWrapper,o=t.weekNumbers;n.innerContainer.appendChild(i),n.weekNumbers=o,n.weekWrapper=i}n.rContainer=Object(a.b)("div","flatpickr-rContainer"),n.rContainer.appendChild(L()),n.daysContainer||(n.daysContainer=Object(a.b)("div","flatpickr-days"),n.daysContainer.tabIndex=-1),P(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(function(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var e=Object(s.f)(n.config);n.timeContainer=Object(a.b)("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var t=Object(a.b)("span","flatpickr-time-separator",":"),i=Object(a.c)("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=i.getElementsByTagName("input")[0];var o=Object(a.c)("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});n.minuteElement=o.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=Object(r.d)(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),n.minuteElement.value=Object(r.d)(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(i),n.timeContainer.appendChild(t),n.timeContainer.appendChild(o),n.config.time_24hr&&n.timeContainer.classList.add("time24hr");if(n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var l=Object(a.c)("flatpickr-second");n.secondElement=l.getElementsByTagName("input")[0],n.secondElement.value=Object(r.d)(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(Object(a.b)("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(l)}n.config.time_24hr||(n.amPM=Object(a.b)("span","flatpickr-am-pm",n.l10n.amPM[Object(r.c)((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM));return n.timeContainer}());Object(a.f)(n.calendarContainer,"rangeMode","range"===n.config.mode),Object(a.f)(n.calendarContainer,"animate",!0===n.config.animate),Object(a.f)(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(e);var l=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!l&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var c=Object(a.b)("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(c,n.element),c.appendChild(n.element),n.altInput&&c.appendChild(n.altInput),c.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}(),function(){n.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+e+"]"),(function(t){return w(t,"click",n[e])}))}));if(n.isMobile)return void function(){var e=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=Object(a.b)("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=e,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr));n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d"));n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d"));n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step")));n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(e){}w(n.mobileInput,"change",(function(e){n.setDate(Object(a.e)(e).value,!1,n.mobileFormatStr),ie("onChange"),ie("onClose")}))}();var e=Object(r.b)(V,50);n._debouncedChange=Object(r.b)(x,300),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&w(n.daysContainer,"mouseover",(function(e){"range"===n.config.mode&&Y(Object(a.e)(e))}));w(n._input,"keydown",W),void 0!==n.calendarContainer&&w(n.calendarContainer,"keydown",W);n.config.inline||n.config.static||w(window,"resize",e);void 0!==window.ontouchstart?w(window.document,"touchstart",R):w(window.document,"mousedown",R);w(window.document,"focus",R,{capture:!0}),!0===n.config.clickOpens&&(w(n._input,"focus",n.open),w(n._input,"click",n.open));void 0!==n.daysContainer&&(w(n.monthNav,"click",ce),w(n.monthNav,["keyup","increment"],y),w(n.daysContainer,"click",J));if(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){w(n.timeContainer,["increment"],g),w(n.timeContainer,"blur",g,{capture:!0}),w(n.timeContainer,"click",C),w([n.hourElement,n.minuteElement],["focus","click"],(function(e){return Object(a.e)(e).select()}
11)),void 0!==n.secondElement&&w(n.secondElement,"focus",(function(){return n.secondElement&&n.secondElement.select()})),void 0!==n.amPM&&w(n.amPM,"click",(function(e){g(e)}))}n.config.allowInput&&w(n._input,"blur",q)}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&v(n.config.noCalendar?n.latestSelectedDateObj:void 0),le(!1)),p();var o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&o&&G(),ie("onReady")}(),n}function h(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),i=[],o=0;o<n.length;o++){var r=n[o];try{if(null!==r.getAttribute("data-fp-omit"))continue;void 0!==r._flatpickr&&(r._flatpickr.destroy(),r._flatpickr=void 0),r._flatpickr=d(r,t||{}),i.push(r._flatpickr)}catch(e){console.error(e)}}return 1===i.length?i[0]:i}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return h(this,e)},HTMLElement.prototype.flatpickr=function(e){return h([this],e)});var f=function(e,t){return"string"==typeof e?h(window.document.querySelectorAll(e),t):e instanceof Node?h([e],t):h(e,t)};f.defaultConfig={},f.l10ns={en:c({},o.a),default:c({},o.a)},f.localize=function(e){f.l10ns.default=c(c({},f.l10ns.default),e)},f.setDefaults=function(e){f.defaultConfig=c(c({},f.defaultConfig),e)},f.parseDate=Object(s.d)({}),f.formatDate=Object(s.c)({}),f.compareDates=s.b,void 0!==e&&void 0!==e.fn&&(e.fn.flatpickr=function(e){return h(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=f),t.default=f}.call(this,n(7))},function(e,t,n){"use strict";"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var i=function(t){t&&Object.keys(t).forEach((function(n){return e[n]=t[n]}))},o=0,r=t;o<r.length;o++){var a=r[o];i(a)}return e})},function(e,t,n){e.exports=function(){"use strict";
12/*! *****************************************************************************
13    Copyright (c) Microsoft Corporation.
14
15    Permission to use, copy, modify, and/or distribute this software for any
16    purpose with or without fee is hereby granted.
17
18    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
19    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
20    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
21    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
22    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
23    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
24    PERFORMANCE OF THIS SOFTWARE.
25    ***************************************************************************** */var e=function(){return(e=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function t(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function n(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var i={shorthand:!1,dateFormat:"F Y",altFormat:"F Y",theme:"light"};return function(o){var r=e(e({},i),o);return function(e){e.config.dateFormat=r.dateFormat,e.config.altFormat=r.altFormat;var i={monthsContainer:null};function o(){if(i.monthsContainer){t(i.monthsContainer);for(var n,o,a=document.createDocumentFragment(),s=0;s<12;s++){var c=e.createDay("flatpickr-monthSelect-month",new Date(e.currentYear,s),0,s);c.dateObj.getMonth()===(new Date).getMonth()&&c.dateObj.getFullYear()===(new Date).getFullYear()&&c.classList.add("today"),c.textContent=(n=s,o=r.shorthand,e.l10n.months[o?"shorthand":"longhand"][n]),c.addEventListener("click",l),a.appendChild(c)}i.monthsContainer.appendChild(a),e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()?e.prevMonthNav.classList.add("flatpickr-disabled"):e.prevMonthNav.classList.remove("flatpickr-disabled"),e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.nextMonthNav.classList.add("flatpickr-disabled"):e.nextMonthNav.classList.remove("flatpickr-disabled")}}function a(){if(e.rContainer&&e.selectedDates.length){for(var t=e.rContainer.querySelectorAll(".flatpickr-monthSelect-month.selected"),n=0;n<t.length;n++)t[n].classList.remove("selected");var i=e.selectedDates[0].getMonth(),o=e.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child("+(i+1)+")");o&&o.classList.add("selected")}}function s(){var t=e.selectedDates[0];t&&((t=new Date(t)).setFullYear(e.currentYear),e.config.minDate&&t<e.config.minDate&&(t=e.config.minDate),e.config.maxDate&&t>e.config.maxDate&&(t=e.config.maxDate),e.currentYear=t.getFullYear()),e.currentYearElement.value=String(e.currentYear),e.rContainer&&e.rContainer.querySelectorAll(".flatpickr-monthSelect-month").forEach((function(t){t.dateObj.setFullYear(e.currentYear),e.config.minDate&&t.dateObj<e.config.minDate||e.config.maxDate&&t.dateObj>e.config.maxDate?t.classList.add("flatpickr-disabled"):t.classList.remove("flatpickr-disabled")})),a()}function l(t){t.preventDefault(),t.stopPropagation();var i=n(t);if(i instanceof Element&&!i.classList.contains("flatpickr-disabled")&&!i.classList.contains("notAllowed")&&(c(i.dateObj),e.config.closeOnSelect)){var o="single"===e.config.mode,r="range"===e.config.mode&&2===e.selectedDates.length;(o||r)&&e.close()}}function c(t){var n=new Date(e.currentYear,t.getMonth(),t.getDate()),i=[];
25switch(e.config.mode){case"single":i=[n];break;case"multiple":i.push(n);break;case"range":2===e.selectedDates.length?i=[n]:(i=e.selectedDates.concat([n])).sort((function(e,t){return e.getTime()-t.getTime()}))}e.setDate(i,!0),a()}var u={37:-1,39:1,40:3,38:-3};function d(){var t;"range"===(null===(t=e.config)||void 0===t?void 0:t.mode)&&1===e.selectedDates.length&&e.clear(!1),e.selectedDates.length||o()}return{onParseConfig:function(){e.config.enableTime=!1},onValueUpdate:a,onKeyDown:function(t,n,o,r){var a=void 0!==u[r.keyCode];if((a||13===r.keyCode)&&e.rContainer&&i.monthsContainer){var s=e.rContainer.querySelector(".flatpickr-monthSelect-month.selected"),l=Array.prototype.indexOf.call(i.monthsContainer.children,document.activeElement);if(-1===l){var d=s||i.monthsContainer.firstElementChild;d.focus(),l=d.$i}a?i.monthsContainer.children[(12+l+u[r.keyCode])%12].focus():13===r.keyCode&&i.monthsContainer.contains(document.activeElement)&&c(document.activeElement.dateObj)}},onReady:[function(){r._stubbedCurrentMonth=e._initialDate.getMonth(),e._initialDate.setMonth(r._stubbedCurrentMonth),e.currentMonth=r._stubbedCurrentMonth},function(){if(e.rContainer){t(e.rContainer);for(var n=0;n<e.monthElements.length;n++){var i=e.monthElements[n];i.parentNode&&i.parentNode.removeChild(i)}}},function(){e.rContainer&&(i.monthsContainer=e._createElement("div","flatpickr-monthSelect-months"),i.monthsContainer.tabIndex=-1,o(),e.rContainer.appendChild(i.monthsContainer),e.calendarContainer.classList.add("flatpickr-monthSelect-theme-"+r.theme))},function(){e._bind(e.prevMonthNav,"click",(function(t){t.preventDefault(),t.stopPropagation(),e.changeYear(e.currentYear-1),s(),o()})),e._bind(e.nextMonthNav,"click",(function(t){t.preventDefault(),t.stopPropagation(),e.changeYear(e.currentYear+1),s(),o()})),e._bind(i.monthsContainer,"mouseover",(function(t){"range"===e.config.mode&&e.onMouseOver(n(t),"flatpickr-monthSelect-month")}))},a,function(){e.config.onClose.push(d),e.loadedPlugins.push("monthSelect")}],onDestroy:[function(){r._stubbedCurrentMonth&&(e._initialDate.setMonth(r._stubbedCurrentMonth),e.currentMonth=r._stubbedCurrentMonth,delete r._stubbedCurrentMonth)},function(){if(null!==i.monthsContainer)for(var e=i.monthsContainer.querySelectorAll(".flatpickr-monthSelect-month"),t=0;t<e.length;t++)e[t].removeEventListener("click",l)},function(){e.config.onClose=e.config.onClose.filter((function(e){return e!==d}))}]}}}}()},function(e,t,n){!function(e){"use strict";var t="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},n={weekdays:{shorthand:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},months:{shorthand:["Янв","Фев","Март","Апр","Май","Июнь","Июль","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Нед.",scrollTitle:"Прокрутите для увеличения",toggleTitle:"Нажмите для переключения",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};t.l10ns.ru=n;var i=t.l10ns;e.Russian=n,e.default=i,Object.defineProperty(e,"__esModule",{value:!0})}(t)},,,,,,,,function(e,t){!function(t){"use strict";var n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag",l="object"==typeof e,c=t.regeneratorRuntime;if(c)l&&(e.exports=c);else{(c=t.regeneratorRuntime=l?e.exports:{}).wrap=g;var u={},d={};d[r]=function(){return this};var h=Object.getPrototypeOf,f=h&&h(h(M([])));f&&f!==n&&i.call(f,r)&&(d=f);var p=y.prototype=v.prototype=Object.create(d);b.prototype=p.constructor=y,y.constructor=b,y[s]=b.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(p),e},c.awrap=function(e){return{__await:e}},w(x.prototype),x.prototype[a]=function(){return this},c.AsyncIterator=x,c.async=function(e,t,n,i){var o=new x(g(e,t,n,i));return c.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},w(p),p[s]="Generator",p[r]=function(){return this},p.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},c.values=M,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
vendor: 4,418 bytes, line 25
25h(O),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(s&&l){if(this.prev<r.catchLoc)return n(r.catchLoc,!0);if(this.prev<r.finallyLoc)return n(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return n(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return n(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:M(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function g(e,t,n,i){var o=t&&t.prototype instanceof v?t:v,r=Object.create(o.prototype),a=new E(i||[]);return r._invoke=function(e,t,n){var i="suspendedStart";return function(o,r){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw r;return S()}for(n.method=o,n.arg=r;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=m(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function v(){}function b(){}function y(){}function w(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function x(e){var t;this._invoke=function(n,o){function r(){return new Promise((function(t,r){!function t(n,o,r,a){var s=m(e[n],e,o);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,r,a)}),(function(e){t("throw",e,r,a)})):Promise.resolve(c).then((function(e){l.value=e,r(l)}),a)}a(s.arg)}(n,o,t,r)}))}return t=t?t.then(r,r):r()}}function T(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var i=m(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,u;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function M(e){if(e){var t=e[r];if(t)return t.call(e);
25if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},,,function(e,t,n){(function(t){e.exports=function(){"use strict";var e="&#8203;";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function i(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var o={isEnabled:function(){var e;return null===(e=window.TAGIFY_DEBUG)||void 0===e||e},log:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o;this.isEnabled()&&(o=console).log.apply(o,["[Tagify]:"].concat(i(t)))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o;this.isEnabled()&&(o=console).warn.apply(o,["[Tagify]:"].concat(i(t)))}},r=function(e,t,n,i){return e=""+e,t=""+t,i&&(e=e.trim(),t=t.trim()),n?e==t:e.toLowerCase()==t.toLowerCase()},a=function(e,t){return e&&Array.isArray(e)&&e.map((function(e){return s(e,t)}))};function s(e,t){var n,i={};for(n in e)t.indexOf(n)<0&&(i[n]=e[n]);return i}function l(e){return(new DOMParser).parseFromString(e.trim(),"text/html").body.firstElementChild}function c(e,t){for(t=t||"previous";e=e[t+"Sibling"];)if(3==e.nodeType)return e}function u(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/`|'/g,"&#039;"):e}function d(e){var t=Object.prototype.toString.call(e).split(" ")[1].slice(0,-1);return e===Object(e)&&"Array"!=t&&"Function"!=t&&"RegExp"!=t&&"HTMLUnknownElement"!=t}function h(e,t,n){var i,o;function r(e,t){for(var n in t)if(t.hasOwnProperty(n)){if(d(t[n])){d(e[n])?r(e[n],t[n]):e[n]=Object.assign({},t[n]);continue}if(Array.isArray(t[n])){e[n]=Object.assign([],t[n]);continue}e[n]=t[n]}}return i=e,(null!=(o=Object)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](i):i instanceof o)||(e={}),r(e,t),n&&r(e,n),e}function f(){var e=[],t={},n=!0,i=!1,o=void 0;try{for(var r,a=arguments[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var s=r.value,l=!0,c=!1,u=void 0;try{for(var h,f=s[Symbol.iterator]();!(l=(h=f.next()).done);l=!0){var p=h.value;d(p)?t[p.value]||(e.push(p),t[p.value]=1):e.includes(p)||e.push(p)}}catch(e){c=!0,u=e}finally{try{l||null==f.return||f.return()}finally{if(c)throw u}}}}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return e}function p(e){return String.prototype.normalize?"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:e}var g=function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)};function m(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)}))}function v(e){return e&&e.classList&&e.classList.contains(this.settings.classNames.tag)}function b(e){return e&&e.closest(this.settings.classNames.tagSelector)}function y(e,t){var n=window.getSelection();return t=t||n.getRangeAt(0),"string"==typeof e&&(e=document.createTextNode(e)),t&&(t.deleteContents(),t.insertN
25ode(e)),e}function w(e,t,n){return e?(t&&(e.__tagifyTagData=n?t:h({},e.__tagifyTagData||{},t)),e.__tagifyTagData):(o.warn("tag element doesn't exist",{tagElm:e,data:t}),t)}function x(e){if(e&&e.parentNode){var t=e,n=window.getSelection(),i=n.getRangeAt(0);n.rangeCount&&(i.setStartAfter(t),i.collapse(!0),n.removeAllRanges(),n.addRange(i))}}function T(e,t){e.forEach((function(e){if(w(e.previousSibling)||!e.previousSibling){var n=document.createTextNode("​");e.before(n),t&&x(n)}}))}var C={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:function(){},trim:!0,a11y:{focusableTags:!1},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownItemSelected:"tagify__dropdown__item--selected",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,escapeHTML:!0,highlightFirst:!0,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:function(){return Promise.resolve()},beforePaste:function(){return Promise.resolve()},suggestionClick:function(){return Promise.resolve()},beforeKeyDown:function(){return Promise.resolve()}}};function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){O(e,t,n[t])}))}return e}function M(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(){for(var e in this.dropdown={},this._dropdown)this.dropdown[e]="function"==typeof this._dropdown[e]?this._dropdown[e].bind(this):this._dropdown[e];this.dropdown.refs(),this.DOM.dropdown.__tagify=this}var P,k,j=(P=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){D(e,t,n[t])}))}return e}({},{events:{binding:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.dropdown.events.callbacks,n=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:t.onKeyDown.bind(this),onMouseOver:t.onMouseOver.bind(this),onMouseLeave:t.onMouseLeave.bind(this),onClick:t.onClick.bind(this),onScroll:t.onScroll.bind(this)},i=e?"addEventListener":"removeEventListener";"manual"!=this.settings.dropdown.position&&(document[i]("scroll",n.position,!0),window[i]("resize",n.position),window[i]("keydown",n.onKeyDown)),this.DOM.dropdown[i]("mouseover",n.onMouseOver),this.DOM.dropdown[i]("mouseleave",n.onMouseLeave),this.DOM.dropdown[i]("mousedown",n.onClick),this.DOM.dropdown.content[i]("scroll",n.onScroll)},callbacks:{onKeyDown:function(e){var t=this;if(this.state.hasFocus&&!this.state.composing){var n=this.settings,i=this.DOM.dropdown.querySelector(n.classNames.dropdownItemActiveSelector),r=this.dropdown.getSuggestionDataByNode(i),a="mi
25x"==n.mode,s="select"==n.mode;n.hooks.beforeKeyDown(e,{tagify:this}).then((function(l){switch(e.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":e.preventDefault();var c=t.dropdown.getAllSuggestionsRefs(),u="ArrowUp"==e.key||"Up"==e.key;i&&(i=t.dropdown.getNextOrPrevOption(i,!u)),i&&i.matches(n.classNames.dropdownItemSelector)||(i=c[u?c.length-1:0]),t.dropdown.highlightOption(i,!0);break;case"Escape":case"Esc":t.dropdown.hide();break;case"ArrowRight":if(t.state.actions.ArrowLeft||n.autoComplete.rightKey)return;case"Tab":var d=!n.autoComplete.rightKey||!n.autoComplete.tabKey;if(!a&&!s&&i&&d&&!t.state.editing&&r){e.preventDefault();var h=t.dropdown.getMappedValue(r);return t.input.autocomplete.set.call(t,h),!1}return!0;case"Enter":e.preventDefault(),n.hooks.suggestionClick(e,{tagify:t,tagData:r,suggestionElm:i}).then((function(){if(i)return t.dropdown.selectOption(i),i=t.dropdown.getNextOrPrevOption(i,!u),void t.dropdown.highlightOption(i);t.dropdown.hide(),a||t.addTags(t.state.inputText.trim(),!0)})).catch((function(e){return o.warn(e)}));break;case"Backspace":if(a||t.state.editing.scope)return;var f=t.input.raw.call(t);""!=f&&8203!=f.charCodeAt(0)||(!0===n.backspace?t.removeTags():"edit"==n.backspace&&setTimeout(t.editTag.bind(t),0))}}))}},onMouseOver:function(e){var t=e.target.closest(this.settings.classNames.dropdownItemSelector);this.dropdown.highlightOption(t)},onMouseLeave:function(e){this.dropdown.highlightOption()},onClick:function(e){var t=this;if(0==e.button&&e.target!=this.DOM.dropdown&&e.target!=this.DOM.dropdown.content){var n=e.target.closest(this.settings.classNames.dropdownItemSelector),i=this.dropdown.getSuggestionDataByNode(n);this.state.actions.selectOption=!0,setTimeout((function(){return t.state.actions.selectOption=!1}),50),this.settings.hooks.suggestionClick(e,{tagify:this,tagData:i,suggestionElm:n}).then((function(){n?t.dropdown.selectOption(n,e):t.dropdown.hide()})).catch((function(e){return o.warn(e)}))}},onScroll:function(e){var t=e.target,n=t.scrollTop/(t.scrollHeight-t.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(n)})}}},refilter:function(e){e=e||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(e),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},getSuggestionDataByNode:function(e){for(var t,n=e&&e.getAttribute("value"),i=this.suggestedListItems.length;i--;){if(d(t=this.suggestedListItems[i])&&t.value==n)return t;if(t==n)return{value:t}}},getNextOrPrevOption:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.dropdown.getAllSuggestionsRefs(),i=n.findIndex((function(t){return t===e}));return t?n[i+1]:n[i-1]},highlightOption:function(e,t){var n,i=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(i),this.state.ddItemElm.removeAttribute("aria-selected")),!e)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);n=this.dropdown.getSuggestionDataByNode(e),this.state.ddItemData=n,this.state.ddItemElm=e,e.classList.add(i),e.setAttribute("aria-selected",!0),t&&(e.parentNode.scrollTop=e.clientHeight+e.offsetTop-e.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,n),this.dropdown.position())},selectOption:function(e,t){var n=this,i=this.settings,o=i.dropdown,r=o.clearOnSelect,a=o.closeOnSelect;if(!e)return this.addTags(this.state.inputText,!0),void(a&&this.dropdown.hide());t=t||{};var s=e.getAttribute("value"),l="noMatch"==s,c="mix"==i.mode,u=this.suggestedListItems.find((function(e){var t;return(null!==(t=e.value)&&void 0!==t?t:e)==s}));if(this.trigger("dropdown:select",{data:u,elm:e,event:t}),u||l){if(this.state.editing){var d=this.normalizeTags([u])[0];u=i.transformTag.call(this,d)||d,this.onEditTagDone(null,h({__isValid:!0},u))}else this[c?"addMixTags":"addTags"]([u||this.input.raw.call(this)],r);(c||this.DOM.input.parentNode)&&(setTimeout((function(){n.DOM.input.focus(),n.toggleFocusClass(!0)})),a&&setTimeout(this.dropdown.hide.bind(this)),e.addEventListener("transitionend",(function(){n.dropdown.fillHeaderFooter(),setTimeout((function(){e.remove(),n.dropdown.refilter()}),100)}),{once:!0}),e.classList.add(this.settings.classNames.dropdownItemHidden))}else a&&setTimeout(this.dropdown.hide.bind(this))},selectAll:function(e){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var t=this.dropdown.filterListItems("");return e||(t=this.state.dropdown.suggestions),this.addTags(t,!0),this},filterListItems:function(e,t){var n,i,o,r,a,s,l=function(){var e,l,c=void 0,u=void 0;e=m[w],i=(null!=(l=Object)&&"undefined"!=typeof Symbol&&l[Symbol.hasInstance]?l[Symbol.hasInstance](e):e instanceof l)?m[w]:{value:m[w]};var v,b=Object.keys(i).some((function(e){return y.includes(e)}))?y:["value"];h.fuzzySearch&&!t.exact?(r=b.reduce((function(e,t){return e+" "+(i[t]||"")}),"").toLowerCase().trim(),h.accentedSearch&&(r=p(r),s=p(s)),c=0==r.indexOf(s),u=r===s,v=r,o=s.toLowerCase().split(" ").every((function(e){return v.includes(e.toLowerCase())}))):(c=!0,o=b.some((function(e){var n=""+(i[e]||"");return h.accentedSearch&&(n=p(n),s=p(s)),h.caseSensitive||(n=n.toLowerCase()),u=n===s,t.exact?n===s:0==n.indexOf(s)}))),a=!h.includeSelectedTags&&n.isTagDuplicate(d(i)?i.value:i),o&&!a&&(u&&c?g.push(i):"startsWith"==h.sortby&&c?f.unshift(i):f.push(i))},c=this,u=this.settings,h=u.dropdown,f=(t=t||{},[]),g=[],m=u.whitelist,v=h.maxItems>=0?h.maxItems:1/0,b=h.includeSelectedTags||"select"==u.mode,y=h.searchKeys,w=0;if(!(e="select"==u.mode&&this.value.length&&this.value[0][u.tagTextProp]==e?"":e)||!y.length)return f=b?m:m.filter((function(e){return!c.isTagDuplicate(d(e)?e.value:e)})),this.state.dropdown.suggestions=f,f.slice(0,v);for(s=h.caseSensitive?""+e:(""+e).toLowerCase();w<m.length;w++)n=this,l();return this.state.dropdown.suggestions=g.concat(f),"function"==typeof h.sortby?h.sortby(g.concat(f),s):g.concat(f).slice(0,v)},getMappedValue:function(e){var t=this.settings.dropdown.mapValueTo;return t?"function"==typeof t?t(e):e[t]||e.value:e.value},createListHTML:function(e){var t=this;return h([],e).map((function(e,n){"string"!=typeof e&&"number"!=typeof e||(e={value:e});var i=t.dropdown.getMappedValue(e);return i="string"==typeof i&&t.settings.dropdown.escapeHTML?u(i):i,t.settings.templates.dropdownItem.apply(t,[M(E({},e),{mappedValue:i}),t])})).join("")}}),k=null!=(k={refs:function(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},getHeaderRef:function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},getFooterRef:function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},getAllSuggestionsRefs:function(){return function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},show:function(e){var t,n,i,o=this,a=this.settings,s="mix"==a.mode&&!a.enforceWhitelist,l=!a.whitelist||!a.whitelist.length,c="manual"==a.dropdown.position;if(e=void 0===e?this.state.inputText:e,!(l&&!s&&!a.templates.dropdownItemNoMatch||!1===a.dropdown.enable||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(e),e&&!this.suggestedListItems.length&&(this.trigger("dropdown:no
25Match",e),a.templates.dropdownItemNoMatch&&(i=a.templates.dropdownItemNoMatch.call(this,{value:e}))),!i){if(this.suggestedListItems.length)e&&s&&!this.state.editing.scope&&!r(this.suggestedListItems[0].value,e)&&this.suggestedListItems.unshift({value:e});else{if(!e||!s||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:e}]}n=""+(d(t=this.suggestedListItems[0])?t.value:t),a.autoComplete&&n&&0==n.indexOf(e)&&this.input.autocomplete.suggest.call(this,t)}this.dropdown.fill(i),a.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(a.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=e||!0,this.state.dropdown.query=e,this.setStateSelection(),c||setTimeout((function(){o.dropdown.position(),o.dropdown.render()})),setTimeout((function(){o.trigger("dropdown:show",o.DOM.dropdown)}))}},hide:function(e){var t=this,n=this.DOM,i=n.scope,o=n.dropdown,r="manual"==this.settings.dropdown.position&&!e;if(o&&document.body.contains(o)&&!r)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),i.setAttribute("aria-expanded",!1),o.parentNode.removeChild(o),setTimeout((function(){t.state.dropdown.visible=!1}),100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",o),this},toggle:function(e){this.dropdown[this.state.dropdown.visible&&!e?"hide":"show"]()},getAppendTarget:function(){var e=this.settings.dropdown;return"function"==typeof e.appendTarget?e.appendTarget():e.appendTarget},render:function(){var e,t,n=this,i=((t=this.DOM.dropdown.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(t),e=t.clientHeight,t.parentNode.removeChild(t),e),o=this.settings,r=this.dropdown.getAppendTarget();return!1===o.dropdown.enabled||(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(o.classNames.dropdownInital),this.dropdown.position(i),r.appendChild(this.DOM.dropdown),setTimeout((function(){return n.DOM.dropdown.classList.remove(o.classNames.dropdownInital)})))),this},fill:function(e){e="string"==typeof e?e:this.dropdown.createListHTML(e||this.suggestedListItems);var t,n=this.settings.templates.dropdownContent.call(this,e);this.DOM.dropdown.content.innerHTML=(t=n)?t.replace(/\>[\r\n ]+\</g,"><").split(/>\s+</).join("><").trim():""},fillHeaderFooter:function(){var e=this.dropdown.filterListItems(this.state.dropdown.query),t=this.parseTemplate("dropdownHeader",[e]),n=this.parseTemplate("dropdownFooter",[e]),i=this.dropdown.getHeaderRef(),o=this.dropdown.getFooterRef();t&&(null==i||i.parentNode.replaceChild(t,i)),n&&(null==o||o.parentNode.replaceChild(n,o))},position:function(e){var t=this.settings.dropdown,n=this.dropdown.getAppendTarget();if("manual"!=t.position&&n){var i,o,r,a,s,l,c,u,d,h=this.DOM.dropdown,f=t.RTL,p=n===document.body,g=n===this.DOM.scope,m=p?window.pageYOffset:n.scrollTop,v=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,b=v.clientHeight,y=Math.max(v.clientWidth||0,window.innerWidth||0)>480?t.position:"all",w=this.DOM["input"==y?"input":"scope"];if(e=e||h.clientHeight,this.state.dropdown.visible){if("text"==y?(r=(i=function(){var e=document.getSelection();if(e.rangeCount){var t,n,i=e.getRangeAt(0),o=i.startContainer,r=i.startOffset;if(r>0)return(n=document.createRange()).setStart(o,r-1),n.setEnd(o,r),{left:(t=n.getBoundingClientRect()).right,top:t.top,bottom:t.bottom};if(o.getBoundingClientRect)return o.getBoundingClientRect()}return{left:-9999,top:-9999}}()).bottom,o=i.top,a=i.left,s="auto"):(l=function(e){var t=0,n=0;for(e=e.parentNode;e&&e!=v;)t+=e.offsetTop||0,n+=e.offsetLeft||0,e=e.parentNode;return{top:t,left:n}}(n),i=w.getBoundingClientRect(),o=g?-1:i.top-l.top,r=(g?i.height:i.bottom-l.top)-1,a=g?-1:i.left-l.left,s=i.width+"px"),!p){var x=function(){for(var e=0,n=t.appendTarget.parentNode;n;)e+=n.scrollTop||0,n=n.parentNode;return e}();o+=x,r+=x}var T;o=Math.floor(o),r=Math.ceil(r),u=((c=null!==(T=t.placeAbove)&&void 0!==T?T:b-i.bottom<e)?o:r)+m,d="left: ".concat(a+(f&&i.width||0)+window.pageXOffset,"px;"),h.style.cssText="".concat(d,"; top: ").concat(u,"px; min-width: ").concat(s,"; max-width: ").concat(s),h.setAttribute("placement",c?"top":"bottom"),h.setAttribute("position",y)}}}})?k:{},Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(k)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}
25(Object(k)).forEach((function(e){Object.defineProperty(P,e,Object.getOwnPropertyDescriptor(k,e))})),P),I="@yaireo/tagify/",L={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},N={wrapper:function(t,n){return'<tags class="'.concat(n.classNames.namespace," ").concat(n.mode?"".concat(n.classNames[n.mode+"Mode"]):""," ").concat(t.className,'"\n                    ').concat(n.readonly?"readonly":"","\n                    ").concat(n.disabled?"disabled":"","\n                    ").concat(n.required?"required":"","\n                    ").concat("select"===n.mode?"spellcheck='false'":"",'\n                    tabIndex="-1">\n                    ').concat(this.settings.templates.input.call(this),"\n                ").concat(e,"\n        </tags>")},input:function(){var t=this.settings,n=t.placeholder||e;return"<span ".concat(!t.readonly&&t.userInput?"contenteditable":"",' tabIndex="0" data-placeholder="').concat(n,'" aria-placeholder="').concat(t.placeholder||"",'"\n                    class="').concat(t.classNames.input,'"\n                    role="textbox"\n                    autocapitalize="false"\n                    autocorrect="off"\n                    spellcheck="false"\n                    aria-autocomplete="both"\n                    aria-multiline="').concat("mix"==t.mode,'"></span>')},tag:function(e,t){var n=t.settings;return'<tag title="'.concat(e.title||e.value,"\"\n                    contenteditable='false'\n                    tabIndex=\"").concat(n.a11y.focusableTags?0:-1,'"\n                    class="').concat(n.classNames.tag," ").concat(e.class||"",'"\n                    ').concat(this.getAttributes(e),">\n            <x title='' tabIndex=\"").concat(n.a11y.focusableTags?0:-1,'" class="').concat(n.classNames.tagX,"\" role='button' aria-label='remove tag'></x>\n            <div>\n                <span ").concat("select"===n.mode&&n.userInput?"contenteditable='true'":"",' autocapitalize="false" autocorrect="off" spellcheck=\'false\' class="').concat(n.classNames.tagText,'">').concat(e[n.tagTextProp]||e.value,"</span>\n            </div>\n        </tag>")},dropdown:function(e){var t=e.dropdown,n="manual"==t.position;return'<div class="'.concat(n?"":e.classNames.dropdown," ").concat(t.classname,'" role="listbox" aria-labelledby="dropdown" dir="').concat(t.RTL?"rtl":"","\">\n                    <div data-selector='tagify-suggestions-wrapper' class=\"").concat(e.classNames.dropdownWrapper,'"></div>\n                </div>')},dropdownContent:function(e){var t=this.settings.templates,n=this.state.dropdown.suggestions;return"\n            ".concat(t.dropdownHeader.call(this,n),"\n            ").concat(e,"\n            ").concat(t.dropdownFooter.call(this,n),"\n        ")},dropdownItem:function(e){return"<div ".concat(this.getAttributes(e),"\n                    class='").concat(this.settings.classNames.dropdownItem," ").concat(this.isTagDuplicate(e.value)?this.settings.classNames.dropdownItemSelected:""," ").concat(e.class||"",'\'\n                    tabindex="0"\n                    role="option">').concat(e.mappedValue||e.value,"</div>")},dropdownHeader:function(e){return"<header data-selector='tagify-suggestions-header' class=\"".concat(this.settings.classNames.dropdownHeader,'"></header>')},dropdownFooter:function(e){var t=e.length-this.settings.dropdown.maxItems;return t>0?"<footer data-selector='tagify-suggestions-footer' class=\"".concat(this.settings.classNames.dropdownFooter,'">\n                ').concat(t," more items. Refine your search.\n            </footer>"):""},dropdownItemNoMatch:null};function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function F(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function B(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var q={customBinding:function(){var e=this;this.customEventsList.forEach((function(t){e.on(t,e.settings.callbacks[t])}))},binding:function(){var e,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=this.settings,o=this.events.callbacks,r=n?"addEventListener":"removeEventListener";if(!this.state.mainEvents||!n){for(var a in this.state.mainEvents=n,n&&!this.listeners.main&&(this.events.bindGlobal.call(this),this.settings.isJQueryPlugin&&t(this.DOM.originalInput).on("tagify.removeAllTags",this.removeAllTags.bind(this))),e=this.listeners.main=this.listeners.main||{keydown:["input",o.onKeydown.bind(this)],click:["scope",o.onClickScope.bind(this)],dblclick:"select"!=i.mode&&["scope",o.onDoubleClickScope.bind(this)],paste:["input",o.onPaste.bind(this)],drop:["input",o.onDrop.bind(this)],compositionstart:["input",o.onCompositionStart.bind(this)],compositionend:["input",o.onCompositionEnd.bind(this)]})e[a]&&this.DOM[e[a][0]][r](a,e[a][1]);var s=this.listeners.main.inputMutationObserver||new MutationObserver(o.onInputDOMChange.bind(this));s.disconnect(),"mix"==i.mode&&s.observe(this.DOM.input,{childList:!0}),this.events.bindOriginaInputListener.call(this)}},bindOriginaInputListener:function(e){var t=(e||0)+500;this.listeners.main&&(clearInterval(this.listeners.main.originalInputValueObserverInterval),this.listeners.main.originalInputValueObserverInterval=setInterval(this.events.callbacks.observeOriginalInputValue.bind(this),t))},bindGlobal:function(e){var t,n=this.events.callbacks,i=e?"removeEventListener":"addEventListener";if(this.listeners&&(e||!this.listeners.global)){this.listeners.global=this.listeners.global||[{type:this.isIE?"keydown":"input",target:this.DOM.input,cb:n[this.isIE?"onInputIE":"onInput"].bind(this)}
25,{type:"keydown",target:window,cb:n.onWindowKeyDown.bind(this)},{type:"focusin",target:this.DOM.scope,cb:n.onFocusBlur.bind(this)},{type:"focusout",target:this.DOM.scope,cb:n.onFocusBlur.bind(this)},{type:"click",target:document,cb:n.onClickAnywhere.bind(this),useCapture:!0}];var o=!0,r=!1,a=void 0;try{for(var s,l=this.listeners.global[Symbol.iterator]();!(o=(s=l.next()).done);o=!0)(t=s.value).target[i](t.type,t.cb,!!t.useCapture)}catch(e){r=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(r)throw a}}}},unbindGlobal:function(){this.events.bindGlobal.call(this,!0)},callbacks:{onFocusBlur:function(e){var t,n,i=this.settings,o=b.call(this,e.target),r=v.call(this,e.target),a=e.target.classList.contains(i.classNames.tagX),s="focusin"==e.type,l="focusout"==e.type;o&&s&&!r&&!a&&this.toggleFocusClass(this.state.hasFocus=+new Date);var c=e.target?this.trim(this.DOM.input.textContent):"",u=null===(n=this.value)||void 0===n||null===(t=n[0])||void 0===t?void 0:t[i.tagTextProp],d=i.dropdown.enabled>=0,h={relatedTarget:e.relatedTarget},f=this.state.actions.selectOption&&(d||!i.dropdown.closeOnSelect),p=this.state.actions.addNew&&d;if(l){if(e.relatedTarget===this.DOM.scope)return this.dropdown.hide(),void this.DOM.input.focus();this.postUpdate(),i.onChangeAfterBlur&&this.triggerChangeEvent()}if(!(f||p||a))if(s||o?(this.state.hasFocus=+new Date,this.toggleFocusClass(this.state.hasFocus)):this.state.hasFocus=!1,"mix"!=i.mode){if(s){if(!i.focusable)return;var g=0===i.dropdown.enabled&&!this.state.dropdown.visible,m=!r||"select"===i.mode;return this.toggleFocusClass(!0),this.trigger("focus",h),void(g&&m&&this.dropdown.show(this.value.length?"":void 0))}if(l){if(this.trigger("blur",h),this.loading(!1),"select"==i.mode){if(this.value.length){var y=this.getTagElms()[0];c=this.trim(y.textContent)}u===c&&(c="")}c&&!this.state.actions.selectOption&&i.addTagOnBlur&&i.addTagOn.includes("blur")&&this.addTags(c,!0)}o||(this.DOM.input.removeAttribute("style"),this.dropdown.hide())}else s?this.trigger("focus",h):l&&(this.trigger("blur",h),this.loading(!1),this.dropdown.hide(),this.state.dropdown.visible=void 0,this.setStateSelection())},onCompositionStart:function(e){this.state.composing=!0},onCompositionEnd:function(e){this.state.composing=!1},onWindowKeyDown:function(e){var t,n=this.settings,i=document.activeElement,o=b.call(this,i)&&this.DOM.scope.contains(document.activeElement),r=o&&i.hasAttribute("readonly");if(this.state.hasFocus||o&&!r){t=i.nextElementSibling;var a=e.target.classList.contains(n.classNames.tagX);switch(e.key){case"Backspace":n.readonly||this.state.editing||(this.removeTags(i),(t||this.DOM.input).focus());break;case"Enter":if(a)return void this.removeTags(e.target.parentNode);n.a11y.focusableTags&&v.call(this,i)&&setTimeout(this.editTag.bind(this),0,i);break;case"ArrowDown":this.state.dropdown.visible||"mix"==n.mode||this.dropdown.show()}}},onKeydown:function(e){var t=this,n=this.settings;if(!this.state.composing&&n.userInput){"select"==n.mode&&n.enforceWhitelist&&this.value.length&&"Tab"!=e.key&&e.preventDefault();var i=this.trim(e.target.textContent);this.trigger("keydown",{event:e}),n.hooks.beforeKeyDown(e,{tagify:this}).then((function(o){if("mix"==n.mode){switch(e.key){case"Left":case"ArrowLeft":t.state.actions.ArrowLeft=!0;break;case"Delete":case"Backspace":if(t.state.editing)return;var r=document.getSelection(),a="Delete"==e.key&&r.anchorOffset==(r.anchorNode.length||0),s=r.anchorNode.previousSibling,l=1==r.anchorNode.nodeType||!r.anchorOffset&&s&&1==s.nodeType&&r.anchorNode.previousSibling;!function(e){var t=document.createElement("div");e.replace(/\&#?[0-9a-z]+;/gi,(function(e){return t.innerHTML=e,t.innerText}))}(t.DOM.input.innerHTML);var u,d,h,f=t.getTagElms(),p=1===r.anchorNode.length&&r.anchorNode.nodeValue==String.fromCharCode(8203);if("edit"==n.backspace&&l)return u=1==r.anchorNode.nodeType?null:r.anchorNode.previousElementSibling,setTimeout(t.editTag.bind(t),0,u),void e.preventDefault();if(g()&&z(l,Element))return h=c(l),l.hasAttribute("readonly")||l.remove(),t.DOM.input.focus(),void setTimeout((function(){x(h),t.DOM.input.click()}));if("BR"==r.anchorNode.nodeName)return;if((a||l)&&1==r.anchorNode.nodeType?d=0==r.anchorOffset?a?f[0]:null:f[Math.min(f.length,r.anchorOffset)-1]:a?d=r.anchorNode.nextElementSibling:z(l,Element)&&(d=l),3==r.anchorNode.nodeType&&!r.anchorNode.nodeValue&&r.anchorNode.previousElementSibling&&e.preventDefault(),(l||a)&&!n.backspace)return void e.preventDefault();if("Range"!=r.type&&!r.anchorOffset&&r.anchorNode==t.DOM.input&&"Delete"!=e.key)return void e.preventDefault();if("Range"!=r.type&&d&&d.hasAttribute("readonly"))return void x(c(d));"Delete"==e.key&&p&&w(r.anchorNode.nextSibling)&&t.removeTags(r.anchorNode.nextSibling)}return!0}var m="manual"==n.dropdown.position;switch(e.key){case"Backspace":"select"==n.mode&&n.enforceWhitelist&&t.value.length?t.removeTags():t.state.dropdown.visible&&"manual"!=n.dropdown.position||""!=e.target.textContent&&8203!=i.charCodeAt(0)||(!0===n.backspace?t.removeTags():"edit"==n.backspace&&setTimeout(t.editTag.bind(t),0));break;case"Esc":case"Escape":if(t.state.dropdown.visible)return;e.target.blur();break;case"Down":case"ArrowDown":t.state.dropdown.visible||t.dropdown.show();break;case"ArrowRight":var v=t.state.inputSuggestion||t.state.ddItemData;
25if(v&&n.autoComplete.rightKey)return void t.addTags([v],!0);break;case"Tab":var b="select"==n.mode;if(!i||b)return!0;e.preventDefault();case"Enter":if(t.state.dropdown.visible&&!m)return;e.preventDefault(),setTimeout((function(){t.state.dropdown.visible&&!m||t.state.actions.selectOption||!n.addTagOn.includes(e.key.toLowerCase())||t.addTags(i,!0)}))}})).catch((function(e){return e}))}},onInput:function(e){this.postUpdate();var t=this.settings;if("mix"==t.mode)return this.events.callbacks.onMixTagsInput.call(this,e);var n=this.input.normalize.call(this,void 0,{trim:!1}),i=n.length>=t.dropdown.enabled,o={value:n,inputElm:this.DOM.input},r=this.validateTag({value:n});"select"==t.mode&&this.toggleScopeValidation(r),o.isValid=r,this.state.inputText!=n&&(this.input.set.call(this,n,!1),-1!=n.search(t.delimiters)?this.addTags(n)&&this.input.set.call(this):t.dropdown.enabled>=0&&this.dropdown[i?"show":"hide"](n),this.trigger("input",o))},onMixTagsInput:function(e){var t,n,i,o,r,a,s,l,c=this,u=this.settings,d=this.value.length,f=this.getTagElms(),p=document.createDocumentFragment(),m=window.getSelection().getRangeAt(0),v=[].map.call(f,(function(e){return w(e).value}));if("deleteContentBackward"==e.inputType&&g()&&this.events.callbacks.onKeydown.call(this,{target:e.target,key:"Backspace"}),T(this.getTagElms()),this.value.slice().forEach((function(e){e.readonly&&!v.includes(e.value)&&p.appendChild(c.createTagElem(e))})),p.childNodes.length&&(m.insertNode(p),this.setRangeAtStartEnd(!1,p.lastChild)),f.length!=d)return this.value=[].map.call(this.getTagElms(),(function(e){return w(e)})),void this.update({withoutChangeEvent:!0});if(this.hasMaxTags())return!0;if(window.getSelection&&(a=window.getSelection()).rangeCount>0&&3==a.anchorNode.nodeType){if((m=a.getRangeAt(0).cloneRange()).collapse(!0),m.setStart(a.focusNode,0),i=(t=m.toString().slice(0,m.endOffset)).split(u.pattern).length-1,(n=t.match(u.pattern))&&(o=t.slice(t.lastIndexOf(n[n.length-1]))),o){if(this.state.actions.ArrowLeft=!1,this.state.tag={prefix:o.match(u.pattern)[0],value:o.replace(u.pattern,"")},this.state.tag.baseOffset=a.baseOffset-this.state.tag.value.length,l=this.state.tag.value.match(u.delimiters))return this.state.tag.value=this.state.tag.value.replace(u.delimiters,""),this.state.tag.delimiters=l[0],this.addTags(this.state.tag.value,u.dropdown.clearOnSelect),void this.dropdown.hide();r=this.state.tag.value.length>=u.dropdown.enabled;try{s=(s=this.state.flaggedTags[this.state.tag.baseOffset]).prefix==this.state.tag.prefix&&s.value[0]==this.state.tag.value[0],this.state.flaggedTags[this.state.tag.baseOffset]&&!this.state.tag.value&&delete this.state.flaggedTags[this.state.tag.baseOffset]}catch(e){}(s||i<this.state.mixMode.matchedPatternCount)&&(r=!1)}else this.state.flaggedTags={};this.state.mixMode.matchedPatternCount=i}setTimeout((function(){c.update({withoutChangeEvent:!0}),c.trigger("input",h({},c.state.tag,{textContent:c.DOM.input.textContent})),c.state.tag&&c.dropdown[r?"show":"hide"](c.state.tag.value)}),10)},onInputIE:function(e){var t=this;setTimeout((function(){t.events.callbacks.onInput.call(t,e)}))},observeOriginalInputValue:function(){this.DOM.originalInput.parentNode||this.destroy(),this.DOM.originalInput.value!=this.DOM.originalInput.tagifyValue&&this.loadOriginalValues()},onClickAnywhere:function(e){e.target==this.DOM.scope||this.DOM.scope.contains(e.target)||(this.toggleFocusClass(!1),this.state.hasFocus=!1,e.target.closest(".tagify__dropdown")&&e.target.closest(".tagify__dropdown").__tagify!=this&&this.dropdown.hide())},onClickScope:function(e){var t=this.settings,n=e.target.closest("."+t.classNames.tag),i=e.target===this.DOM.scope,o=+new Date-this.state.hasFocus;if(i&&"select"!=t.mode)this.DOM.input.focus();else{if(!e.target.classList.contains(t.classNames.tagX))return n&&!this.state.editing?(this.trigger("click",{tag:n,index:this.getNodeIndex(n),data:w(n),event:e}),void(1!==t.editTags&&1!==t.editTags.clicks&&"select"!=t.mode||this.events.callbacks.onDoubleClickScope.call(this,e))):void(e.target==this.DOM.input&&("mix"==t.mode&&this.fixFirefoxLastTagNoCaret(),o>500||!t.focusable)?this.state.dropdown.visible?this.dropdown.hide():0===t.dropdown.enabled&&"mix"!=t.mode&&this.dropdown.show(this.value.length?"":void 0):"select"!=t.mode||0!==t.dropdown.enabled||this.state.dropdown.visible||(this.events.callbacks.onDoubleClickScope.call(this,function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}
25(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){H(e,t,n[t])}))}return e}({},e),{target:this.getTagElms()[0]})),!t.userInput&&this.dropdown.show()));this.removeTags(e.target.parentNode)}},onPaste:function(e){var t=this;e.preventDefault();var n,i,o,r=this.settings;if("select"==r.mode&&r.enforceWhitelist||!r.userInput)return!1;r.readonly||(i=e.clipboardData||window.clipboardData,o=i.getData("Text"),r.hooks.beforePaste(e,{tagify:this,pastedText:o,clipboardData:i}).then((function(r){void 0===r&&(r=o),r&&(t.injectAtCaret(r,window.getSelection().getRangeAt(0)),"mix"==t.settings.mode?t.events.callbacks.onMixTagsInput.call(t,e):t.settings.pasteAsTags?n=t.addTags(t.state.inputText+r,!0):(t.state.inputText=r,t.dropdown.show(r))),t.trigger("paste",{event:e,pastedText:o,clipboardData:i,tagsElems:n})})).catch((function(e){return e})))},onDrop:function(e){e.preventDefault()},onEditTagInput:function(e,t){var n,i=e.closest("."+this.settings.classNames.tag),o=this.getNodeIndex(i),r=w(i),a=this.input.normalize.call(this,e),s=(H(n={},this.settings.tagTextProp,a),H(n,"__tagId",r.__tagId),n),l=this.validateTag(s);this.editTagChangeDetected(h(r,s))||!0!==e.originalIsValid||(l=!0),i.classList.toggle(this.settings.classNames.tagInvalid,!0!==l),r.__isValid=l,i.title=!0===l?r.title||r.value:l,a.length>=this.settings.dropdown.enabled&&(this.state.editing&&(this.state.editing.value=a),this.dropdown.show(a)),this.trigger("edit:input",{tag:i,index:o,data:h({},this.value[o],{newValue:a}),event:t})},onEditTagPaste:function(e,t){var n=(t.clipboardData||window.clipboardData).getData("Text");t.preventDefault();var i=y(n);this.setRangeAtStartEnd(!1,i)},onEditTagClick:function(e,t){this.events.callbacks.onClickScope.call(this,t)},onEditTagFocus:function(e){this.state.editing={scope:e,input:e.querySelector("[contenteditable]")}},onEditTagBlur:function(e,t){var n=v.call(this,t.relatedTarget);if("select"==this.settings.mode&&n&&t.relatedTarget.contains(t.target))this.dropdown.hide();else if(this.state.editing&&(this.state.hasFocus||this.toggleFocusClass(),this.DOM.scope.contains(e))){var i,o,r,a=this.settings,s=e.closest("."+a.classNames.tag),l=w(s),c=this.input.normalize.call(this,e),u=(H(i={},a.tagTextProp,c),H(i,"__tagId",l.__tagId),i),d=l.__originalData,f=this.editTagChangeDetected(h(l,u)),p=this.validateTag(u);if(c)if(f){var g;if(o=this.hasMaxTags(),r=h({},d,(H(g={},a.tagTextProp,this.trim(c)),H(g,"__isValid",p),g)),a.transformTag.call(this,r,d),!0!==(p=(!o||!0===d.__isValid)&&this.validateTag(r))){if(this.trigger("invalid",{data:r,tag:s,message:p}),a.editTags.keepInvalid)return;a.keepInvalidTags?r.__isValid=p:r=d}else a.keepInvalidTags&&(delete r.title,delete r["aria-invalid"],delete r.class);this.onEditTagDone(s,r)}else this.onEditTagDone(s,d);else this.onEditTagDone(s)}},onEditTagkeydown:function(e,t){if(!this.state.composing)switch(this.trigger("edit:keydown",{event:e}),e.key){case"Esc":case"Escape":this.state.editing=!1,t.__tagifyTagData.__originalData.value?t.parentNode.replaceChild(t.__tagifyTagData.__originalHTML,t):t.remove();break;case"Enter":case"Tab":e.preventDefault(),setTimeout((function(){return e.target.blur()}),0)}},onDoubleClickScope:function(e){var t,n,i=e.target.closest("."+this.settings.classNames.tag),o=w(i),r=this.settings;i&&!1!==o.editable&&(t=i.classList.contains(this.settings.classNames.tagEditing),n=i.hasAttribute("readonly"),r.readonly||t||n||!this.settings.editTags||!r.userInput||(this.events.callbacks.onEditTagFocus.call(this,i),this.editTag(i)),this.toggleFocusClass(!0),"select"!=r.mode&&this.trigger("dblclick",{tag:i,index:this.getNodeIndex(i),data:w(i)}))},onInputDOMChange:function(e){var t=this;e.forEach((function(e){e.addedNodes.forEach((function(e){if("<div><br></div>"==e.outerHTML)e.replaceWith(document.createElement("br"));else if(1==e.nodeType&&e.querySelector(t.settings.classNames.tagSelector)){var n,i=document.createTextNode("");3==e.childNodes[0].nodeType&&"BR"!=e.previousSibling.nodeName&&(i=document.createTextNode("\n")),(n=e).replaceWith.apply(n,B([i].concat(B(B(e.childNodes).slice(0,-1))))),x(i)}else if(v.call(t,e)){var o;if(3!=(null===(o=e.previousSibling)||void 0===o?void 0:o.nodeType)||e.previousSibling.textContent||e.previousSibling.remove(),e.previousSibling&&"BR"==e.previousSibling.nodeName){e.previousSibling.replaceWith("\n​");for(var r=e.nextSibling,a="";r;)a+=r.textContent,r=r.nextSibling;a.trim()&&x(e.previousSibling)}else e.previousSibling&&!w(e.previousSibling)||e.before("​")}}
25)),e.removedNodes.forEach((function(e){e&&"BR"==e.nodeName&&v.call(t,n)&&(t.removeTags(n),t.fixFirefoxLastTagNoCaret())}))}));var n=this.DOM.input.lastChild;n&&""==n.nodeValue&&n.remove(),n&&"BR"==n.nodeName||this.DOM.input.appendChild(document.createElement("br"))}}};function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Y(e,t,n[t])}))}return e}function $(e){return function(e){if(Array.isArray(e))return W(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,n){if(!e){o.warn("input element not found",e);var i=new Proxy(this,{get:function(){return function(){return i}}});return i}if(e.__tagify)return o.warn("input element is already Tagified - Same instance is returned.",e),e.__tagify;var r;h(this,function(e){var n=document.createTextNode(""),i={};function r(e,t,i){i&&t.split(/\s+/g).forEach((function(t){return n[e+"EventListener"].call(n,t,i)}))}return{removeAllCustomListeners:function(){Object.entries(i).forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0];t[1].forEach((function(e){return r("remove",n,e)}))})),i={}},off:function(e,t){return e&&(t?r("remove",e,t):e.split(/\s+/g).forEach((function(e){var t;null===(t=i[e])||void 0===t||t.forEach((function(t){return r("remove",e,t)})),delete i[e]}))),this},on:function(e,t){return t&&"function"==typeof t&&(e.split(/\s+/g).forEach((function(e){Array.isArray(i[e])?i[e].push(t):i[e]=[t]})),r("add",e,t)),this},trigger:function(i,r,a){var s;if(a=a||{cloneData:!0},i)if(e.settings.isJQueryPlugin)"remove"==i&&(i="removeTag"),t(e.DOM.originalInput).triggerHandler(i,[r]);else{try{var l="object"==typeof r?r:{value:r};if((l=a.cloneData?h({},l):l).tagify=this,r.event&&(l.event=this.cloneEvent(r.event)),F(r,Object))for(var c in r)F(r[c],HTMLElement)&&(l[c]=r[c]);s=new CustomEvent(i,{detail:l})}catch(e){o.warn(e)}n.dispatchEvent(s)}}}}(this)),this.isFirefox=/firefox|fxios/i.test(navigator.userAgent)&&!/seamonkey/i.test(navigator.userAgent),this.isIE=window.document.documentMode,n=n||{},this.getPersistedData=(r=n.id,function(e){var t,n="/"+e;if(1==localStorage.getItem(I+r+"/v",1))try{t=JSON.parse(localStorage[I+r+n])}catch(e){}return t}),this.setPersistedData=function(e){return e?(localStorage.setItem(I+e+"/v",1),function(t,n){var i="/"+n,o=JSON.stringify(t);t&&n&&(localStorage.setItem(I+e+i,o),dispatchEvent(new Event("storage")))}):function(){}}
25(n.id),this.clearPersistedData=function(e){return function(t){var n=I+"/"+e+"/";if(t)localStorage.removeItem(n+t);else for(var i in localStorage)i.includes(n)&&localStorage.removeItem(i)}}(n.id),this.applySettings(e,n),this.state={inputText:"",editing:!1,composing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},this.build(e),A.call(this),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),e.autofocus&&this.DOM.input.focus(),e.__tagify=this}return U.prototype={_dropdown:j,placeCaretAfterNode:x,getSetTagData:w,helpers:{sameStr:r,removeCollectionProp:a,omit:s,isObject:d,parseHTML:l,escapeHTML:u,extend:h,concatWithoutDups:f,getUID:m,isNodeTag:v},customEventsList:["change","add","remove","invalid","input","paste","click","keydown","focus","blur","edit:input","edit:beforeUpdate","edit:updated","edit:start","edit:keydown","dropdown:show","dropdown:hide","dropdown:select","dropdown:updated","dropdown:noMatch","dropdown:scroll"],dataProps:["__isValid","__removed","__originalData","__originalHTML","__tagId"],trim:function(e){return this.settings.trim&&e&&"string"==typeof e?e.trim():e},parseHTML:l,templates:N,parseTemplate:function(e,t){return l((e=this.settings.templates[e]||e).apply(this,t))},set whitelist(e){var t=e&&Array.isArray(e);this.settings.whitelist=t?e:[],this.setPersistedData(t?e:[],"whitelist")},get whitelist(){return this.settings.whitelist},set userInput(e){this.settings.userInput=!!e,this.setContentEditable(!!e)},get userInput(){return this.settings.userInput},generateClassSelectors:function(e){var t=function(t){var n=t;Object.defineProperty(e,n+"Selector",{get:function(){return"."+this[n].split(" ")[0]}})};for(var n in e)t(n)},applySettings:function(e,t){var n,i;C.templates=this.templates;var o=h({},C,"mix"==t.mode?{dropdown:{position:"text"}}:{}),r=this.settings=h({},o,t);if(r.disabled=e.hasAttribute("disabled"),r.readonly=r.readonly||e.hasAttribute("readonly"),r.placeholder=u(e.getAttribute("placeholder")||r.placeholder||""),r.required=e.hasAttribute("required"),this.generateClassSelectors(r.classNames),void 0===r.dropdown.includeSelectedTags&&(r.dropdown.includeSelectedTags=r.duplicates),this.isIE&&(r.autoComplete=!1),["whitelist","blacklist"].forEach((function(t){var n=e.getAttribute("data-"+t);n&&V(n=n.split(r.delimiters),Array)&&(r[t]=n)})),"autoComplete"in t&&!d(t.autoComplete)&&(r.autoComplete=C.autoComplete,r.autoComplete.enabled=t.autoComplete),"mix"==r.mode&&(r.pattern=r.pattern||/@/,r.autoComplete.rightKey=!0,r.delimiters=t.delimiters||null,r.tagTextProp&&!r.dropdown.searchKeys.includes(r.tagTextProp)&&r.dropdown.searchKeys.push(r.tagTextProp)),e.pattern)try{r.pattern=new RegExp(e.pattern)}catch(e){}if(r.delimiters){r._delimiters=r.delimiters;try{r.delimiters=new RegExp(this.settings.delimiters,"g")}catch(e){}}r.disabled&&(r.userInput=!1),this.TEXTS=X({},L,r.texts||{}),("select"!=r.mode||(null===(n=t.dropdown)||void 0===n?void 0:n.enabled))&&r.userInput||(r.dropdown.enabled=0),r.dropdown.appendTarget=(null===(i=t.dropdown)||void 0===i?void 0:i.appendTarget)||document.body;var a=this.getPersistedData("whitelist");Array.isArray(a)&&(this.whitelist=Array.isArray(r.whitelist)?f(r.whitelist,a):a)},getAttributes:function(e){var t,n=this.getCustomAttributes(e),i="";for(t in n)i+=" "+t+(void 0!==e[t]?'="'.concat(n[t],'"'):"");return i},getCustomAttributes:function(e){if(!d(e))return"";var t,n={};for(t in e)"__"!=t.slice(0,2)&&"class"!=t&&e.hasOwnProperty(t)&&void 0!==e[t]&&(n[t]=u(e[t]));return n},setStateSelection:function(){var e=window.getSelection(),t={anchorOffset:e.anchorOffset,anchorNode:e.anchorNode,range:e.getRangeAt&&e.rangeCount&&e.getRangeAt(0)};return this.state.selection=t,t},getCSSVars:function(){var e,t,n=getComputedStyle(this.DOM.scope,null);this.CSSVars={tagHideTransition:(e=function(e){if(!e)return{};var t=(e=e.trim().split(" ")[0]).split(/\d+/g).filter((function(e){return e})).pop().trim();return{value:+e.split(t).filter((function(e){return e}))[0].trim(),unit:t}}(n.getPropertyValue("--tag-hide-transition")),t=e.value,"s"==e.unit?1e3*t:t)}},build:function(e){var t=this.DOM,n=e.closest("label");this.settings.mixMode.integrated?(t.originalInput=null,t.scope=e,t.input
vendor: 5,870 bytes, line 25
25=e):(t.originalInput=e,t.originalInput_tabIndex=e.tabIndex,t.scope=this.parseTemplate("wrapper",[e,this.settings]),t.input=t.scope.querySelector(this.settings.classNames.inputSelector),e.parentNode.insertBefore(t.scope,e),e.tabIndex=-1),n&&n.setAttribute("for","")},destroy:function(){this.events.unbindGlobal.call(this),this.DOM.scope.parentNode.removeChild(this.DOM.scope),this.DOM.originalInput.tabIndex=this.DOM.originalInput_tabIndex,delete this.DOM.originalInput.__tagify,this.dropdown.hide(!0),this.removeAllCustomListeners(),clearTimeout(this.dropdownHide__bindEventsTimeout),clearInterval(this.listeners.main.originalInputValueObserverInterval)},loadOriginalValues:function(e){var t,n=this.settings;if(this.state.blockChangeEvent=!0,void 0===e){var i=this.getPersistedData("value");e=i&&!this.DOM.originalInput.value?i:n.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value}if(this.removeAllTags(),e)if("mix"==n.mode)this.parseMixTags(e),(t=this.DOM.input.lastChild)&&"BR"==t.tagName||this.DOM.input.insertAdjacentHTML("beforeend","<br>");else{try{V(JSON.parse(e),Array)&&(e=JSON.parse(e))}catch(e){}this.addTags(e,!0).forEach((function(e){return e&&e.classList.add(n.classNames.tagNoAnimation)}))}else this.postUpdate();this.state.lastOriginalValueReported=n.mixMode.integrated?"":this.DOM.originalInput.value},cloneEvent:function(e){var t={};for(var n in e)"path"!=n&&(t[n]=e[n]);return t},loading:function(e){return this.state.isLoading=e,this.DOM.scope.classList[e?"add":"remove"](this.settings.classNames.scopeLoading),this},tagLoading:function(e,t){return e&&e.classList[t?"add":"remove"](this.settings.classNames.tagLoading),this},toggleClass:function(e,t){"string"==typeof e&&this.DOM.scope.classList.toggle(e,t)},toggleScopeValidation:function(e){var t=!0===e||void 0===e;!this.settings.required&&e&&e===this.TEXTS.empty&&(t=!0),this.toggleClass(this.settings.classNames.tagInvalid,!t),this.DOM.scope.title=t?"":e},toggleFocusClass:function(e){this.toggleClass(this.settings.classNames.focus,!!e)},setPlaceholder:function(e){var t=this;["data","aria"].forEach((function(n){return t.DOM.input.setAttribute("".concat(n,"-placeholder"),e)}))},triggerChangeEvent:function(){if(!this.settings.mixMode.integrated){var e=this.DOM.originalInput,t=this.state.lastOriginalValueReported!==e.value,n=new CustomEvent("change",{bubbles:!0});t&&(this.state.lastOriginalValueReported=e.value,n.simulated=!0,e._valueTracker&&e._valueTracker.setValue(Math.random()),e.dispatchEvent(n),this.trigger("change",this.state.lastOriginalValueReported),e.value=this.state.lastOriginalValueReported)}},events:q,fixFirefoxLastTagNoCaret:function(){},setRangeAtStartEnd:function(e,t){if(t){e="number"==typeof e?e:!!e,t=t.lastChild||t;var n=document.getSelection();if(V(n.focusNode,Element)&&!this.DOM.input.contains(n.focusNode))return!0;try{n.rangeCount>=1&&["Start","End"].forEach((function(i){return n.getRangeAt(0)["set"+i](t,e||t.length)}))}catch(e){console.warn(e)}}},insertAfterTag:function(e,t){if(t=t||this.settings.mixMode.insertAfterTag,e&&e.parentNode&&t)return t="string"==typeof t?document.createTextNode(t):t,e.parentNode.insertBefore(t,e.nextSibling),t},editTagChangeDetected:function(e){var t=e.__originalData;for(var n in t)if(!this.dataProps.includes(n)&&e[n]!=t[n])return!0;return!1},getTagTextNode:function(e){return e.querySelector(this.settings.classNames.tagTextSelector)},setTagTextNode:function(e,t){this.getTagTextNode(e).innerHTML=u(t)},editTag:function(e,t){var n=this;e=e||this.getLastTag(),t=t||{};var i=this.settings,r=this.getTagTextNode(e),a=this.getNodeIndex(e),s=w(e),l=this.events.callbacks,c=!0,u="select"==i.mode;if(!u&&this.dropdown.hide(),r){if(!V(s,Object)||!("editable"in s)||s.editable)return s=w(e,{__originalData:h({},s),__originalHTML:e.cloneNode(!0)}),w(s.__originalHTML,s.__originalData),r.setAttribute("contenteditable",!0),e.classList.add(i.classNames.tagEditing),this.events.callbacks.onEditTagFocus.call(this,e),r.addEventListener("click",l.onEditTagClick.bind(this,e)),r.addEventListener("blur",l.onEditTagBlur.bind(this,this.getTagTextNode(e))),r.addEventListener("input",l.onEditTagInput.bind(this,r)),r.addEventListener("paste",l.onEditTagPaste.bind(this,r)),r.addEventListener("keydown",(function(t){return l.onEditTagkeydown.call(n,t,e)})),r.addEventListener("compositionstart",l.onCompositionStart.bind(this)),r.addEventListener("compositionend",l.onCompositionEnd.bind(this)),t.skipValidation||(c=this.editTagToggleValidity(e)),r.originalIsValid=c,this.trigger("edit:start",{tag:e,index:a,data:s,isValid:c}),r.focus(),!u&&this.setRangeAtStartEnd(!1,r),0===i.dropdown.enabled&&!u&&this.dropdown.show(),this.state.hasFocus=!0,this}else o.warn("Cannot find element in Tag template: .",i.classNames.tagTextSelector)},editTagToggleValidity:function(e,t){var n;if(t=t||w(e))return(n=!("__isValid"in t)||!0===t.__isValid)||this.removeTagsFromValue(e),this.update(),e.classList.toggle(this.settings.classNames.tagNotAllowed,!n),t.__isValid=n,t.__isValid;o.warn("tag has no data: ",e,t)},onEditTagDone:function(e,t){t=t||{};var n,i,o={tag:e=e||this.state.editing.scope,index:this.getNodeIndex(e),previousData:w(e),data:t},r=this.settings;this.trigger("edit:beforeUpdate",o,{cloneData:!1}),this.state.editing=!1,delete t.__originalData,delete t.__originalHTML,e&&(void 0!==(i=t[r.tagTextProp])?null===(n=(i+="").trim)||void 0===n?void 0:n.call(i):r.tagTextProp in t?void 0:t.value)?(e=this.replaceTag(e,t),this.editTagToggleValidity(e,t),r.a11y.focusableTags?e.focus():"select"!=r.mode&&x(e)):e&&this.removeTags(e),this.trigger("edit:updated",o),this.dropdown.hide(),this.settings.keepInvalidTags&&this.reCheckInvalidTags()},replaceTag:function(e,t){t&&""!==t.value&&void 0!==t.value||(t=e.__tagifyTagData),t.__isValid&&1!=t.__isValid&&h(t,this.getInvalidTagAttrs(t,t.__isValid));var n=this.createTagElem(t);
25return e.parentNode.replaceChild(n,e),this.updateValueByDOMTags(),n},updateValueByDOMTags:function(){var e=this;this.value.length=0;var t=this.settings.classNames,n=[t.tagNotAllowed.split(" ")[0],t.tagHide];[].forEach.call(this.getTagElms(),(function(t){$(t.classList).some((function(e){return n.includes(e)}))||e.value.push(w(t))})),this.update()},injectAtCaret:function(e,t){var n;if(t=t||(null===(n=this.state.selection)||void 0===n?void 0:n.range),"string"==typeof e&&(e=document.createTextNode(e)),!t&&e)return this.appendMixTags(e),this;var i=y(e,t);return this.setRangeAtStartEnd(!1,i),this.updateValueByDOMTags(),this.update(),this},input:{set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.settings,i=n.dropdown.closeOnSelect;this.state.inputText=e,t&&(this.DOM.input.innerHTML=u(""+e),e&&this.toggleClass(n.classNames.empty,!this.DOM.input.innerHTML)),!e&&i&&this.dropdown.hide.bind(this),this.input.autocomplete.suggest.call(this),this.input.validate.call(this)},raw:function(){return this.DOM.input.textContent},validate:function(){var e=!this.state.inputText||!0===this.validateTag({value:this.state.inputText});return this.DOM.input.classList.toggle(this.settings.classNames.inputInvalid,!e),e},normalize:function(e,t){var n=e||this.DOM.input,i=[];n.childNodes.forEach((function(e){return 3==e.nodeType&&i.push(e.nodeValue)})),i=i.join("\n");try{i=i.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch(e){}return i=i.replace(/\s/g," "),(null==t?void 0:t.trim)?this.trim(i):i},autocomplete:{suggest:function(e){if(this.settings.autoComplete.enabled){"object"!=typeof(e=e||{value:""})&&(e={value:e});var t=this.dropdown.getMappedValue(e);if("number"!=typeof t){var n=this.state.inputText.toLowerCase(),i=t.substr(0,this.state.inputText.length).toLowerCase(),o=t.substring(this.state.inputText.length);t&&this.state.inputText&&i==n?(this.DOM.input.setAttribute("data-suggest",o),this.state.inputSuggestion=e):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}}},set:function(e){var t=this.DOM.input.getAttribute("data-suggest"),n=e||(t?this.state.inputText+t:null);return!!n&&("mix"==this.settings.mode?this.replaceTextWithNode(document.createTextNode(this.state.tag.prefix+n)):(this.input.set.call(this,n),this.setRangeAtStartEnd(!1,this.DOM.input)),this.input.autocomplete.suggest.call(this),this.dropdown.hide(),!0)}}},getTagIdx:function(e){return this.value.findIndex((function(t){return t.__tagId==(e||{}).__tagId}))},getNodeIndex:function(e){var t=0;if(e)for(;e=e.previousElementSibling;)t++;return t},getTagElms:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i="."+$(this.settings.classNames.tag.split(" ")).concat($(t)).join(".");return[].slice.call(this.DOM.scope.querySelectorAll(i))},getLastTag:function(){var e=this.settings.classNames,t=this.DOM.scope.querySelectorAll("".concat(e.tagSelector,":not(.").concat(e.tagHide,"):not([readonly])"));return t[t.length-1]},isTagDuplicate:function(e,t,n){var i=0,o=!0,a=!1,s=void 0;try{for(var l,c=this.value[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value;r(this.trim(""+e),u.value,t)&&n!=u.__tagId&&i++}}catch(e){a=!0,s=e}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}return i},getTagIndexByValue:function(e){var t=this,n=[],i=this.settings.dropdown.caseSensitive;return this.getTagElms().forEach((function(o,a){o.__tagifyTagData&&r(t.trim(o.__tagifyTagData.value),e,i)&&n.push(a)})),n},getTagElmByValue:function(e){var t=this.getTagIndexByValue(e)[0];return this.getTagElms()[t]},flashTag:function(e){var t=this;e&&(e.classList.add(this.settings.classNames.tagFlash),setTimeout((function(){e.classList.remove(t.settings.classNames.tagFlash)}),100))},isTagBlacklisted:function(e){return e=this.trim(e.toLowerCase()),this.settings.blacklist.filter((function(t){return(""+t).toLowerCase()==e})).length},isTagWhitelisted:function(e){return!!this.getWhitelistItem(e)},getWhitelistItem:function(e,t,n){t=t||"value";var i,o=this.settings;return(n=n||o.whitelist).some((function(n){var a="object"==typeof n?n[t]||n.value:n;if(r(a,e,o.dropdown.caseSensitive,o.trim))return i="object"==typeof n?n:{value:n},!0})),i||"value"!=t||"value"==o.tagTextProp||(i=this.getWhitelistItem(e,o.tagTextProp,n)),i},validateTag:function(e){var t=this.settings,n="value"in e?"value":t.tagTextProp,i=this.trim(e[n]+"");return(e[n]+"").trim()?"mix"!=t.mode&&t.pattern&&V(t.pattern,RegExp)&&!t.pattern.test(i)?this.TEXTS.pattern:!t.duplicates&&this.isTagDuplicate(i,t.dropdown.caseSensitive,e.__tagId)?this.TEXTS.duplicate:this.isTagBlacklisted(i)||t.enforceWhitelist&&!this.isTagWhitelisted(i)?this.TEXTS.notAllowed:!t.validate||t.validate(e):this.TEXTS.empty},getInvalidTagAttrs:function(e,t){return{"aria-invalid":!0,class:"".concat(e.class||""," ").concat(this.settings.classNames.tagNotAllowed).trim(),title:t}},hasMaxTags:function(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},setReadonly:function(e,t){var n=this.settings;this.DOM.scope.contains(document.activeElement)&&document.activeElement.blur(),n[t||"readonly"]=e,this.DOM.scope[(e?"set":"remove")+"Attribute"](t||"readonly",!0),this.settings.userInput=!0,this.setContentEditable(!e)},setContentEditable:function(e){this.DOM.input.contentEditable=e,this.DOM.input.tabIndex=e?0:-1},setDisabled:function(e){this.setReadonly(e,"disabled")},normalizeTags:function(e){var t=this,n=this.settings,i=n.whitelist,o=n.delimiters,r=n.mode,a=n.tagTextProp,s=[],l=!!i&&V(i[0],Object),c=Array.isArray(e),u=c&&e[0].value,f=function(e){return(e+"").split(o).reduce((function(e,n){var i,o=t.trim(n);return o&&e.push((Y(i={},a,o),Y(i,"value",o),i)),e}),[])};if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!e.trim())return[];e=f(e)}else c&&(e=e.reduce((function(e,n){if(d(n)){var i=h({},n);a in i||(a="value"),i[a]=t.trim(i[a]),(i[a]||0===i[a])&&e.push(i)}else if(n){var o;(o=e).push.apply(o,$(f(n)))}return e}),[]));return l&&!u&&(e.forEach((function(e){var n=s.map((function(e){return e.value})),i=t.dropdown.filterListItems.call(t,e[a],{exact:!0});t.settings.duplicates||(i=i.filter((function(e){return!n.includes(e.value)})));var o=i.length>1?t.getWhitelistItem(e[a],a,i):i[0];o&&V(o,Object)?s.push(o):"mix"!=r&&(null==e.value&&(e.value=e[a]),s.push(e))})),s.length&&(e=s)),e},parseMixTags:function(e){var t=this,n=this.settings,i=n.mixTagsInterpolator,o=n.duplicates,r=n.transformTag,a=n.enforceWhitelist,s=n.maxTags,l=n.tagTextProp,c=[];e=e.split(i[0]).map((function(e,n){var u,d,h,f=e.split(i[1]),p=f[0],g=c.length==s;try{if(p==+p)throw Error;d=JSON.parse(p)}
25catch(e){d=t.normalizeTags(p)[0]||{value:p}}if(r.call(t,d),g||!(f.length>1)||a&&!t.isTagWhitelisted(d.value)||!o&&t.isTagDuplicate(d.value)){if(e)return n?i[0]+e:e}else d[u=d[l]?l:"value"]=t.trim(d[u]),h=t.createTagElem(d),c.push(d),h.classList.add(t.settings.classNames.tagNoAnimation),f[0]=h.outerHTML,t.value.push(d);return f.join("")})).join(""),this.DOM.input.innerHTML=e,this.DOM.input.appendChild(document.createTextNode("")),this.DOM.input.normalize();var u=this.getTagElms();return u.forEach((function(e,t){return w(e,c[t])})),this.update({withoutChangeEvent:!0}),T(u,this.state.hasFocus),e},replaceTextWithNode:function(e,t){if(this.state.tag||t){t=t||this.state.tag.prefix+this.state.tag.value;var n,i,o=this.state.selection||window.getSelection(),r=o.anchorNode,a=this.state.tag.delimiters?this.state.tag.delimiters.length:0;return r.splitText(o.anchorOffset-a),-1==(n=r.nodeValue.lastIndexOf(t))||(i=r.splitText(n),e&&r.parentNode.replaceChild(e,i)),!0}},prepareNewTagNode:function(e,t){t=t||{};var n=this.settings,i=[],o={},r=Object.assign({},e,{value:e.value+""});if(e=Object.assign({},r),n.transformTag.call(this,e),e.__isValid=this.hasMaxTags()||this.validateTag(e),!0!==e.__isValid){if(t.skipInvalid)return;if(h(o,this.getInvalidTagAttrs(e,e.__isValid),{__preInvalidData:r}),e.__isValid==this.TEXTS.duplicate&&this.flashTag(this.getTagElmByValue(e.value)),!n.createInvalidTags)return void i.push(e.value)}return"readonly"in e&&(e.readonly?o["aria-readonly"]=!0:delete e.readonly),{tagElm:this.createTagElem(e,o),tagData:e,aggregatedInvalidInput:i}},postProcessNewTagNode:function(e,t){var n=this,i=this.settings,o=t.__isValid;o&&!0===o?this.value.push(t):(this.trigger("invalid",{data:t,index:this.value.length,tag:e,message:o}),i.keepInvalidTags||setTimeout((function(){return n.removeTags(e,!0)}),1e3)),this.dropdown.position()},selectTag:function(e,t){var n=this;if(!this.settings.enforceWhitelist||this.isTagWhitelisted(t.value)){this.state.actions.selectOption&&setTimeout((function(){return n.setRangeAtStartEnd(!1,n.DOM.input)}));var i=this.getLastTag();return i?this.replaceTag(i,t):this.appendTag(e),this.value[0]=t,this.update(),this.trigger("add",{tag:e,data:t}),[e]}},addEmptyTag:function(e){var t=h({value:""},e||{}),n=this.createTagElem(t);w(n,t),this.appendTag(n),this.editTag(n,{skipValidation:!0}),this.toggleFocusClass(!0)},addTags:function(e,t,n){var i=this,o=[],r=this.settings,a=[],s=document.createDocumentFragment(),l=[];if(!e||0==e.length)return o;switch(e=this.normalizeTags(e),r.mode){case"mix":return this.addMixTags(e);case"select":t=!1,this.removeAllTags()}return this.DOM.input.removeAttribute("style"),e.forEach((function(e){var t=i.prepareNewTagNode(e,{skipInvalid:n||r.skipInvalid});if(t){var c=t.tagElm;if(e=t.tagData,a=t.aggregatedInvalidInput,o.push(c),"select"==r.mode)return i.selectTag(c,e);s.appendChild(c),i.postProcessNewTagNode(c,e),l.push({tagElm:c,tagData:e})}})),this.appendTag(s),l.forEach((function(e){var t=e.tagElm,n=e.tagData;return i.trigger("add",{tag:t,index:i.getTagIdx(n),data:n})})),this.update(),e.length&&t&&(this.input.set.call(this,r.createInvalidTags?"":a.join(r._delimiters)),this.setRangeAtStartEnd(!1,this.DOM.input)),this.dropdown.refilter(),o},addMixTags:function(e){var t=this;if((e=this.normalizeTags(e))[0].prefix||this.state.tag)return this.prefixedTextToTag(e[0]);var n=document.createDocumentFragment();return e.forEach((function(e){var i=t.prepareNewTagNode(e);n.appendChild(i.tagElm),t.insertAfterTag(i.tagElm),t.postProcessNewTagNode(i.tagElm,i.tagData)})),this.appendMixTags(n),n.children},appendMixTags:function(e){var t=!!this.state.selection;t?this.injectAtCaret(e):(this.DOM.input.focus(),(t=this.setStateSelection()).range.setStart(this.DOM.input,t.range.endOffset),t.range.setEnd(this.DOM.input,t.range.endOffset),this.DOM.input.appendChild(e),this.updateValueByDOMTags(),this.update())},prefixedTextToTag:function(e){var t,n,i,o=this,r=this.settings,a=null===(t=this.state.tag)||void 0===t?void 0:t.delimiters;if(e.prefix=e.prefix||this.state.tag?this.state.tag.prefix:(r.pattern.source||r.pattern)[0],i=this.prepareNewTagNode(e),n=i.tagElm,this.replaceTextWithNode(n)||this.DOM.input.appendChild(n),setTimeout((function(){return n.classList.add(o.settings.classNames.tagNoAnimation)}),300),this.update(),!a){var s=this.insertAfterTag(n)||n;setTimeout(x,0,s)}return this.state.tag=null,this.postProcessNewTagNode(n,i.tagData),n},appendTag:function(e){var t=this.DOM,n=t.input;t.scope.insertBefore(e,n)},createTagElem:function(e,t){e.__tagId=m();var n,i=h({},e,X({value:u(e.value+"")},t));return function(e){for(var t,n=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,null,!1);t=n.nextNode();)t.textContent.trim()||t.parentNode.removeChild(t)}(n=this.parseTemplate("tag",[i,this])),w(n,e),n},reCheckInvalidTags:function(){var e=this,t=this.settings;
25this.getTagElms(t.classNames.tagNotAllowed).forEach((function(n,i){var o=w(n),r=e.hasMaxTags(),a=e.validateTag(o),s=!0===a&&!r;if("select"==t.mode&&e.toggleScopeValidation(a),s)return o=o.__preInvalidData?o.__preInvalidData:{value:o.value},e.replaceTag(n,o);n.title=r||a}))},removeTags:function(e,t,n){var i,o=this,r=this.settings;if(e=e&&V(e,HTMLElement)?[e]:V(e,Array)?e:e?[e]:[this.getLastTag()].filter((function(e){return e})),i=e.reduce((function(e,t){t&&"string"==typeof t&&(t=o.getTagElmByValue(t));var n=w(t);return t&&n&&!n.readonly&&e.push({node:t,idx:o.getTagIdx(n),data:w(t,{__removed:!0})}),e}),[]),n="number"==typeof n?n:this.CSSVars.tagHideTransition,"select"==r.mode&&(n=0,this.input.set.call(this)),1==i.length&&"select"!=r.mode&&i[0].node.classList.contains(r.classNames.tagNotAllowed)&&(t=!0),i.length)return r.hooks.beforeRemoveTag(i,{tagify:this}).then((function(){var e=function(e){e.node.parentNode&&(e.node.parentNode.removeChild(e.node),t?r.keepInvalidTags&&this.trigger("remove",{tag:e.node,index:e.idx}):(this.trigger("remove",{tag:e.node,index:e.idx,data:e.data}),this.dropdown.refilter(),this.dropdown.position(),this.DOM.input.normalize(),r.keepInvalidTags&&this.reCheckInvalidTags()))};n&&n>10&&1==i.length?function(t){t.node.style.width=parseFloat(window.getComputedStyle(t.node).width)+"px",document.body.clientTop,t.node.classList.add(r.classNames.tagHide),setTimeout(e.bind(this),n,t)}.call(o,i[0]):i.forEach(e.bind(o)),t||(o.removeTagsFromValue(i.map((function(e){return e.node}))),o.update(),"select"==r.mode&&r.userInput&&o.setContentEditable(!0))})).catch((function(e){}))},removeTagsFromDOM:function(){this.getTagElms().forEach((function(e){return e.remove()}))},removeTagsFromValue:function(e){var t=this;(e=Array.isArray(e)?e:[e]).forEach((function(e){var n=w(e),i=t.getTagIdx(n);i>-1&&t.value.splice(i,1)}))},removeAllTags:function(e){var t=this;e=e||{},this.value=[],"mix"==this.settings.mode?this.DOM.input.innerHTML="":this.removeTagsFromDOM(),this.dropdown.refilter(),this.dropdown.position(),this.state.dropdown.visible&&setTimeout((function(){t.DOM.input.focus()})),"select"==this.settings.mode&&(this.input.set.call(this),this.settings.userInput&&this.setContentEditable(!0)),this.update(e)},postUpdate:function(){this.state.blockChangeEvent=!1;var e,t,n=this.settings,i=n.classNames,o="mix"==n.mode?n.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value.trim():this.value.length+this.input.raw.call(this).length;this.toggleClass(i.hasMaxTags,this.value.length>=n.maxTags),this.toggleClass(i.hasNoTags,!this.value.length),this.toggleClass(i.empty,!o),"select"==n.mode&&this.toggleScopeValidation(null===(t=this.value)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.__isValid)},setOriginalInputValue:function(e){var t=this.DOM.originalInput;this.settings.mixMode.integrated||(t.value=e,t.tagifyValue=t.value,this.setPersistedData(e,"value"))},update:function(e){clearTimeout(this.debouncedUpdateTimeout),this.debouncedUpdateTimeout=setTimeout(function(){var t=this.getInputValue();this.setOriginalInputValue(t),this.settings.onChangeAfterBlur&&(e||{}).withoutChangeEvent||this.state.blockChangeEvent||this.triggerChangeEvent(),this.postUpdate()}.bind(this),100),this.events.bindOriginaInputListener.call(this,100)},getInputValue:function(){var e=this.getCleanValue();return"mix"==this.settings.mode?this.getMixedTagsAsString(e):e.length?this.settings.originalInputValueFormat?this.settings.originalInputValueFormat(e):JSON.stringify(e):""},getCleanValue:function(e){return a(e||this.value,this.dataProps)},getMixedTagsAsString:function(){var e="",t=this,n=this.settings,i=n.originalInputValueFormat||JSON.stringify,o=n.mixTagsInterpolator;return function n(r){r.childNodes.forEach((function(r){if(1==r.nodeType){var a=w(r);if("BR"==r.tagName&&(e+="\r\n"),a&&v.call(t,r)){if(a.__removed)return;e+=o[0]+i(s(a,t.dataProps))+o[1]}else r.getAttribute("style")||["B","I","U"].includes(r.tagName)?e+=r.textContent:"DIV"!=r.tagName&&"P"!=r.tagName||(e+="\r\n",n(r))}else e+=r.textContent}))}(this.DOM.input),e}},U.prototype.removeTag=U.prototype.removeTags,U}()}).call(this,n(7))}]]);
26//# sourceMappingURL=vendors~app.js.map

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.