!function(){var e={6521:function(e,t){"use strict";function n(e){var t=undefined;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach((function(t){if("constructor"!==t){var n=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof n.value&&Object.defineProperty(e.prototype,t,r(e,t,n))}})),e}function r(e,t,n){var r=n.value;if("function"!=typeof r)throw new Error("@autobind decorator can only be applied to methods not: "+typeof r);var o=!1;return{configurable:!0,get:function(){if(o||this===e.prototype||this.hasOwnProperty(t))return r;var n=r.bind(this);return o=!0,Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),o=!1,n}}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(){for(var e=arguments.length,t=Array(e),o=0;o",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:undefined,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,"static":!1,time_24hr:!1,weekNumbers:!1,wrap:!1},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},a=i,s=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},u=function(e){return!0===e?1:0};function l(e,t){var n;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout((function(){return e.apply(r,o)}),t)}}var c=function(e){return e instanceof Array?e:[e]};function f(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function d(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,n!==undefined&&(r.textContent=n),r}function p(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function h(e,t){return t(e)?e:e.parentNode?h(e.parentNode,t):undefined}function m(e,t){var n=d("div","numInputWrapper"),r=d("input","numInput "+e),o=d("span","arrowUp"),i=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?r.type="number":(r.type="text",r.pattern="\\d*"),t!==undefined)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(o),n.appendChild(i),n}function y(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var g=function(){return undefined},v=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},b={D:g,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*u(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 r=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(r-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:g,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:g,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},w={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\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})"},O={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[O.w(e,t,n)]},F:function(e,t,n){return v(O.n(e,t,n)-1,!1,t)},G:function(e,t,n){return s(O.h(e,t,n))},H:function(e){return s(e.getHours())},J:function(e,t){return t.ordinal!==undefined?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[u(e.getHours()>11)]},M:function(e,t){return v(e.getMonth(),!0,t)},S:function(e){return s(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return s(e.getFullYear(),4)},d:function(e){return s(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return s(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return s(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){var t=e.config,n=void 0===t?o:t,r=e.l10n,a=void 0===r?i:r,s=e.isMobile,u=void 0!==s&&s;return function(e,t,r){var o=r||a;return n.formatDate===undefined||u?t.split("").map((function(t,r,i){return O[t]&&"\\"!==i[r-1]?O[t](e,o,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,o)}},x=function(e){var t=e.config,n=void 0===t?o:t,r=e.l10n,a=void 0===r?i:r;return function(e,t,r,i){if(0!==e&&!e)return undefined;var s,u=i||a,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&e.toFixed!==undefined)s=new Date(e);else if("string"==typeof e){var c=t||(n||o).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(n&&n.parseDate)s=n.parseDate(e,c);else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else{for(var d=void 0,p=[],h=0,m=0,y="";h=0?new Date:new Date(n.config.minDate.getTime()),r=S(n.config);t.setHours(r.hours,r.minutes,r.seconds,t.getMilliseconds()),n.selectedDates=[t],n.latestSelectedDateObj=t}e!==undefined&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,r=y(e),o=r;n.amPM!==undefined&&r===n.amPM&&(n.amPM.textContent=n.l10n.amPM[u(n.amPM.textContent===n.l10n.amPM[0])]);var i=parseFloat(o.getAttribute("min")),a=parseFloat(o.getAttribute("max")),l=parseFloat(o.getAttribute("step")),c=parseInt(o.value,10),f=e.delta||(t?38===e.which?1:-1:0),d=c+l*f;if("undefined"!=typeof o.value&&2===o.value.length){var p=o===n.hourElement,h=o===n.minuteElement;da&&(d=o===n.hourElement?d-a-u(!n.amPM):i,h&&F(undefined,1,n.hourElement)),n.amPM&&p&&(1===l?d+c===23:Math.abs(d-c)>l)&&(n.amPM.textContent=n.l10n.amPM[u(n.amPM.textContent===n.l10n.amPM[0])]),o.value=s(d)}}(e);var o=n._input.value;A(),xe(),n._input.value!==o&&n._debouncedChange()}function A(){if(n.hourElement!==undefined&&n.minuteElement!==undefined){var e,t,r=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(n.minuteElement.value,10)||0)%60,i=n.secondElement!==undefined?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==undefined&&(e=r,t=n.amPM.textContent,r=e%12+12*u(t===n.l10n.amPM[1]));var a=n.config.minTime!==undefined||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===k(n.latestSelectedDateObj,n.config.minDate,!0),s=n.config.maxTime!==undefined||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===k(n.latestSelectedDateObj,n.config.maxDate,!0);if(n.config.maxTime!==undefined&&n.config.minTime!==undefined&&n.config.minTime>n.config.maxTime){var l=E(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),c=E(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),f=E(r,o,i);if(f>c&&f=12)]),n.secondElement!==undefined&&(n.secondElement.value=s(r)))}function M(e){var t=y(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&ee(n)}function L(e,t,r,o){return t instanceof Array?t.forEach((function(t){return L(e,t,r,o)})):e instanceof Array?e.forEach((function(e){return L(e,t,r,o)})):(e.addEventListener(t,r,o),void n._handlers.push({remove:function(){return e.removeEventListener(t,r,o)}}))}function I(){ve("onChange")}function R(e,t){var r=e!==undefined?n.parseDate(e):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate=0&&k(e,n.selectedDates[1])<=0)}(t)&&!we(t)&&a.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==e&&o%7==6&&n.weekNumbers.insertAdjacentHTML("beforeend",""+n.config.getWeek(t)+""),ve("onDayCreate",a),a}function B(e){e.focus(),"range"===n.config.mode&&ie(e)}function U(e){for(var t=e>0?0:n.config.showMonths-1,r=e>0?n.config.showMonths:-1,o=t;o!=r;o+=e)for(var i=n.daysContainer.children[o],a=e>0?0:i.children.length-1,s=e>0?i.children.length:-1,u=a;u!=s;u+=e){var l=i.children[u];if(-1===l.className.indexOf("hidden")&&te(l.dateObj))return l}return undefined}function H(e,t){var r=i(),o=ne(r||document.body),a=e!==undefined?e:o?r:n.selectedDateElem!==undefined&&ne(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==undefined&&ne(n.todayDateElem)?n.todayDateElem:U(t>0?1:-1);a===undefined?n._input.focus():o?function(e,t){for(var r=-1===e.className.indexOf("Month")?e.dateObj.getMonth():n.currentMonth,o=t>0?n.config.showMonths:-1,i=t>0?1:-1,a=r-n.currentMonth;a!=o;a+=i)for(var s=n.daysContainer.children[a],u=r-n.currentMonth===a?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,c=u;c>=0&&c0?l:-1);c+=i){var f=s.children[c];if(-1===f.className.indexOf("hidden")&&te(f.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return B(f)}n.changeMonth(i),H(U(i),0),undefined}(a,t):B(a)}function z(e,t){for(var r=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,o=n.utils.getDaysInMonth((t-1+12)%12,e),i=n.utils.getDaysInMonth(t,e),a=window.document.createDocumentFragment(),s=n.config.showMonths>1,u=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay",c=o+1-r,f=0;c<=o;c++,f++)a.appendChild(V("flatpickr-day "+u,new Date(e,t-1,c),0,f));for(c=1;c<=i;c++,f++)a.appendChild(V("flatpickr-day",new Date(e,t,c),0,f));for(var p=i+1;p<=42-r&&(1===n.config.showMonths||f%7!=0);p++,f++)a.appendChild(V("flatpickr-day "+l,new Date(e,t+1,p%i),0,f));var h=d("div","dayContainer");return h.appendChild(a),h}function W(){if(n.daysContainer!==undefined){p(n.daysContainer),n.weekNumbers&&p(n.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==n.config.monthSelectorType)){var e=function(e){return!(n.config.minDate!==undefined&&n.currentYear===n.config.minDate.getFullYear()&&en.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var r=d("option","flatpickr-monthDropdown-month");r.value=new Date(n.currentYear,t).getMonth().toString(),r.textContent=v(t,n.config.shorthandCurrentMonth,n.l10n),r.tabIndex=-1,n.currentMonth===t&&(r.selected=!0),n.monthsDropdownContainer.appendChild(r)}}}function Y(){var e,t=d("div","flatpickr-month"),r=window.document.createDocumentFragment();n.config.showMonths>1||"static"===n.config.monthSelectorType?e=d("span","cur-month"):(n.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),L(n.monthsDropdownContainer,"change",(function(e){var t=y(e),r=parseInt(t.value,10);n.changeMonth(r-n.currentMonth),ve("onMonthChange")})),K(),e=n.monthsDropdownContainer);var o=m("cur-year",{tabindex:"-1"}),i=o.getElementsByTagName("input")[0];i.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&i.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(i.setAttribute("max",n.config.maxDate.getFullYear().toString()),i.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var a=d("div","flatpickr-current-month");return a.appendChild(e),a.appendChild(o),r.appendChild(a),t.appendChild(r),{container:t,yearElement:i,monthElement:e}}function G(){p(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var e=n.config.showMonths;e--;){var t=Y();n.yearElements.push(t.yearElement),n.monthElements.push(t.monthElement),n.monthNav.appendChild(t.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){n.weekdayContainer?p(n.weekdayContainer):n.weekdayContainer=d("div","flatpickr-weekdays");for(var e=n.config.showMonths;e--;){var t=d("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(t)}return Q(),n.weekdayContainer}function Q(){if(n.weekdayContainer){var e=n.l10n.firstDayOfWeek,t=P(n.l10n.weekdays.shorthand);e>0&&e\n "+t.join("")+"\n \n "}}function Z(e,t){void 0===t&&(t=!0);var r=t?e:e-n.currentMonth;r<0&&!0===n._hidePrevMonthArrow||r>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=r,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ve("onYearChange"),K()),W(),ve("onMonthChange"),Oe())}function X(e){return n.calendarContainer.contains(e)}function J(e){if(n.isOpen&&!n.config.inline){var t=y(e),r=X(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)))&&!r&&!X(e.relatedTarget),i=!n.config.ignoredFocusElements.some((function(e){return e.contains(t)}));o&&i&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==undefined&&n.minuteElement!==undefined&&n.hourElement!==undefined&&""!==n.input.value&&n.input.value!==undefined&&O(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&n.clear(!1))}}function ee(e){if(!(!e||n.config.minDate&&en.config.maxDate.getFullYear())){var t=e,r=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)),r&&(n.redraw(),ve("onYearChange"),K())}}function te(e,t){var r;void 0===t&&(t=!0);var o=n.parseDate(e,undefined,t);if(n.config.minDate&&o&&k(o,n.config.minDate,t!==undefined?t:!n.minDateHasTime)<0||n.config.maxDate&&o&&k(o,n.config.maxDate,t!==undefined?t:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(o===undefined)return!1;for(var i=!!n.config.enable,a=null!==(r=n.config.enable)&&void 0!==r?r:n.config.disable,s=0,u=void 0;s=u.from.getTime()&&o.getTime()<=u.to.getTime())return i}return!i}function ne(e){return n.daysContainer!==undefined&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(e))}function re(e){var t=e.target===n._input,r=n._input.value.trimEnd()!==_e();!t||!r||e.relatedTarget&&X(e.relatedTarget)||n.setDate(n._input.value,!0,e.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function oe(t){var r=y(t),o=n.config.wrap?e.contains(r):r===n._input,a=n.config.allowInput,s=n.isOpen&&(!a||!o),u=n.config.inline&&o&&!a;if(13===t.keyCode&&o){if(a)return n.setDate(n._input.value,!0,r===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),r.blur();n.open()}else if(X(r)||s||u){var l=!!n.timeContainer&&n.timeContainer.contains(r);switch(t.keyCode){case 13:l?(t.preventDefault(),O(),de()):pe(t);break;case 27:t.preventDefault(),de();break;case 8:case 46:o&&!n.config.allowInput&&(t.preventDefault(),n.clear());break;case 37:case 39:if(l||o)n.hourElement&&n.hourElement.focus();else{t.preventDefault();var c=i();if(n.daysContainer!==undefined&&(!1===a||c&&ne(c))){var f=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),Z(f),H(U(1),0)):H(undefined,f)}}break;case 38:case 40:t.preventDefault();var d=40===t.keyCode?1:-1;n.daysContainer&&r.$i!==undefined||r===n.input||r===n.altInput?t.ctrlKey?(t.stopPropagation(),ee(n.currentYear-d),H(U(1),0)):l||H(undefined,7*d):r===n.currentYearElement?ee(n.currentYear-d):n.config.enableTime&&(!l&&n.hourElement&&n.hourElement.focus(),O(t),n._debouncedChange());break;case 9:if(l){var p=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((function(e){return e})),h=p.indexOf(r);if(-1!==h){var m=p[h+(t.shiftKey?-1:1)];t.preventDefault(),(m||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(r)&&t.shiftKey&&(t.preventDefault(),n._input.focus())}}if(n.amPM!==undefined&&r===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],A(),xe();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],A(),xe()}(o||X(r))&&ve("onKeyDown",t)}function ie(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 r=e?e.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),o=n.parseDate(n.selectedDates[0],undefined,!0).getTime(),i=Math.min(r,n.selectedDates[0].getTime()),a=Math.max(r,n.selectedDates[0].getTime()),s=!1,u=0,l=0,c=i;ci&&cu)?u=c:c>o&&(!l||c ."+t)).forEach((function(t){var i,a,c,f=t.dateObj.getTime(),d=u>0&&f0&&f>l;if(d)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(e){t.classList.remove(e)}));s&&!d||(["startRange","inRange","endRange","notAllowed"].forEach((function(e){t.classList.remove(e)})),e!==undefined&&(e.classList.add(r<=n.selectedDates[0].getTime()?"startRange":"endRange"),or&&f===o&&t.classList.add("endRange"),f>=u&&(0===l||f<=l)&&(a=o,c=r,(i=f)>Math.min(a,c)&&i0||r.getMinutes()>0||r.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((function(e){return te(e)})),n.selectedDates.length||"min"!==e||D(r),xe()),n.daysContainer&&(fe(),r!==undefined?n.currentYearElement[e]=r.getFullYear().toString():n.currentYearElement.removeAttribute(e),n.currentYearElement.disabled=!!o&&r!==undefined&&o.getFullYear()===r.getFullYear())}}function ue(){return n.config.wrap?e.querySelector("[data-input]"):e}function le(){"object"!=typeof n.config.locale&&"undefined"==typeof T.l10ns[n.config.locale]&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=j(j({},T.l10ns["default"]),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?T.l10ns[n.config.locale]:undefined),w.D="("+n.l10n.weekdays.shorthand.join("|")+")",w.l="("+n.l10n.weekdays.longhand.join("|")+")",w.M="("+n.l10n.months.shorthand.join("|")+")",w.F="("+n.l10n.months.longhand.join("|")+")",w.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")",j(j({},t),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr===undefined&&T.defaultConfig.time_24hr===undefined&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=_(n),n.parseDate=x({config:n.config,l10n:n.l10n})}function ce(e){if("function"!=typeof n.config.position){if(n.calendarContainer!==undefined){ve("onPreCalendarPosition");var t=e||n._positionElement,r=Array.prototype.reduce.call(n.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),o=n.calendarContainer.offsetWidth,i=n.config.position.split(" "),a=i[0],s=i.length>1?i[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===a||"below"!==a&&lr,d=window.pageYOffset+u.top+(c?-r-2:t.offsetHeight+2);if(f(n.calendarContainer,"arrowTop",!c),f(n.calendarContainer,"arrowBottom",c),!n.config.inline){var p=window.pageXOffset+u.left,h=!1,m=!1;"center"===s?(p-=(o-u.width)/2,h=!0):"right"===s&&(p-=o-u.width,m=!0),f(n.calendarContainer,"arrowLeft",!h&&!m),f(n.calendarContainer,"arrowCenter",h),f(n.calendarContainer,"arrowRight",m);var y=window.document.body.offsetWidth-(window.pageXOffset+u.right),g=p+o>window.document.body.offsetWidth,v=y+o>window.document.body.offsetWidth;if(f(n.calendarContainer,"rightMost",g),!n.config["static"])if(n.calendarContainer.style.top=d+"px",g)if(v){var b=function(){for(var e=null,t=0;tn.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=r,"single"===n.config.mode)n.selectedDates=[o];else if("multiple"===n.config.mode){var a=we(o);a?n.selectedDates.splice(parseInt(a),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!==k(o,n.selectedDates[0],!0)&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(A(),i){var s=n.currentYear!==o.getFullYear();n.currentYear=o.getFullYear(),n.currentMonth=o.getMonth(),s&&(ve("onYearChange"),K()),ve("onMonthChange")}if(Oe(),W(),xe(),i||"range"===n.config.mode||1!==n.config.showMonths?n.selectedDateElem!==undefined&&n.hourElement===undefined&&n.selectedDateElem&&n.selectedDateElem.focus():B(r),n.hourElement!==undefined&&n.hourElement!==undefined&&n.hourElement.focus(),n.config.closeOnSelect){var u="single"===n.config.mode&&!n.config.enableTime,l="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(u||l)&&de()}I()}}n.parseDate=x({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=L,n._setHoursFromDate=D,n._positionCalendar=ce,n.changeMonth=Z,n.changeYear=ee,n.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);n.input.value="",n.altInput!==undefined&&(n.altInput.value="");n.mobileInput!==undefined&&(n.mobileInput.value="");n.selectedDates=[],n.latestSelectedDateObj=undefined,!0===t&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth());if(!0===n.config.enableTime){var r=S(n.config),o=r.hours,i=r.minutes,a=r.seconds;N(o,i,a)}n.redraw(),e&&ve("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==undefined&&n.calendarContainer.classList.remove("open"),n._input!==undefined&&n._input.classList.remove("active"));ve("onClose")},n.onMouseOver=ie,n._createElement=d,n.createDay=V,n.destroy=function(){n.config!==undefined&&ve("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=undefined;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(t){}}))},n.isEnabled=te,n.jumpToDate=R,n.updateValue=xe,n.open=function(e,t){void 0===t&&(t=n._positionElement);if(!0===n.isMobile){if(e){e.preventDefault();var r=y(e);r&&r.blur()}return n.mobileInput!==undefined&&(n.mobileInput.focus(),n.mobileInput.click()),void ve("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"),ve("onOpen"),ce(t));!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||e!==undefined&&n.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return n.hourElement.select()}),50))},n.redraw=fe,n.set=function(e,t){if(null!==e&&"object"==typeof e)for(var o in Object.assign(n.config,e),e)he[o]!==undefined&&he[o].forEach((function(e){return e()}));else n.config[e]=t,he[e]!==undefined?he[e].forEach((function(e){return e()})):r.indexOf(e)>-1&&(n.config[e]=c(t));n.redraw(),xe(!0)},n.setDate=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=n.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return n.clear(t);me(e,r),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),R(undefined,t),D(),0===n.selectedDates.length&&n.clear(!1);xe(t),t&&ve("onChange")},n.toggle=function(e){if(!0===n.isOpen)return n.close();n.open(e)};var he={locale:[le,Q],showMonths:[G,b,$],minDate:[R],maxDate:[R],positionElement:[ge],clickOpens:[function(){!0===n.config.clickOpens?(L(n._input,"focus",n.open),L(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function me(e,t){var r=[];if(e instanceof Array)r=e.map((function(e){return n.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)r=[n.parseDate(e,t)];else if("string"==typeof e)switch(n.config.mode){case"single":case"time":r=[n.parseDate(e,t)];break;case"multiple":r=e.split(n.config.conjunction).map((function(e){return n.parseDate(e,t)}));break;case"range":r=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?r:r.filter((function(e){return e instanceof Date&&te(e,!1)})),"range"===n.config.mode&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function ye(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?n.parseDate(e,undefined,!0):e&&"object"==typeof e&&e.from&&e.to?{from:n.parseDate(e.from,undefined),to:n.parseDate(e.to,undefined)}:e})).filter((function(e){return e}))}function ge(){n._positionElement=n.config.positionElement||n._input}function ve(e,t){if(n.config!==undefined){var r=n.config[e];if(r!==undefined&&r.length>0)for(var o=0;r[o]&&o1||"static"===n.config.monthSelectorType?n.monthElements[t].textContent=v(r.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=r.getMonth().toString(),e.value=r.getFullYear().toString()})),n._hidePrevMonthArrow=n.config.minDate!==undefined&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYearn.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function _e(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,r){return"range"!==n.config.mode||n.config.enableTime||r.indexOf(e)===t})).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function xe(e){void 0===e&&(e=!0),n.mobileInput!==undefined&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==undefined?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=_e(n.config.dateFormat),n.altInput!==undefined&&(n.altInput.value=_e(n.config.altFormat)),!1!==e&&ve("onValueUpdate")}function ke(e){var t=y(e),r=n.prevMonthNav.contains(t),o=n.nextMonthNav.contains(t);r||o?Z(r?-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 i=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],a=j(j({},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=ye(e)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(e){n.config._disable=ye(e)}});var u="time"===a.mode;if(!a.dateFormat&&(a.enableTime||u)){var l=T.defaultConfig.dateFormat||o.dateFormat;s.dateFormat=a.noCalendar||u?"H:i"+(a.enableSeconds?":S":""):l+" H:i"+(a.enableSeconds?":S":"")}if(a.altInput&&(a.enableTime||u)&&!a.altFormat){var f=T.defaultConfig.altFormat||o.altFormat;s.altFormat=a.noCalendar||u?"h:i"+(a.enableSeconds?":S K":" K"):f+" h:i"+(a.enableSeconds?":S":"")+" K"}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:se("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:se("max")});var d=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:d("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:d("max")}),"time"===a.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0);Object.assign(n.config,s,a);for(var p=0;p-1?n.config[m]=c(h[m]).map(g).concat(n.config[m]):"undefined"==typeof a[m]&&(n.config[m]=h[m])}a.altInputClass||(n.config.altInputClass=ue().className+" "+n.config.altInputClass);ve("onParseConfig")}(),le(),function(){if(n.input=ue(),!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=d(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");ge()}(),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&&me(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()0&&(n.latestSelectedDateObj=n.selectedDates[0]);n.config.minTime!==undefined&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i"));n.config.maxTime!==undefined&&(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=d("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild((n.monthNav=d("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=d("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=d("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,G(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(e){n.__hidePrevMonthArrow!==e&&(f(n.prevMonthNav,"flatpickr-disabled",e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(e){n.__hideNextMonthArrow!==e&&(f(n.nextMonthNav,"flatpickr-disabled",e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],Oe(),n.monthNav)),n.innerContainer=d("div","flatpickr-innerContainer"),n.config.weekNumbers){var t=function(){n.calendarContainer.classList.add("hasWeeks");var e=d("div","flatpickr-weekwrapper");e.appendChild(d("span","flatpickr-weekday",n.l10n.weekAbbreviation));var t=d("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),r=t.weekWrapper,o=t.weekNumbers;n.innerContainer.appendChild(r),n.weekNumbers=o,n.weekWrapper=r}n.rContainer=d("div","flatpickr-rContainer"),n.rContainer.appendChild($()),n.daysContainer||(n.daysContainer=d("div","flatpickr-days"),n.daysContainer.tabIndex=-1),W(),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=S(n.config);n.timeContainer=d("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var t=d("span","flatpickr-time-separator",":"),r=m("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=r.getElementsByTagName("input")[0];var o=m("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});n.minuteElement=o.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=s(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=s(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(r),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 i=m("flatpickr-second");n.secondElement=i.getElementsByTagName("input")[0],n.secondElement.value=s(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(d("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(i)}n.config.time_24hr||(n.amPM=d("span","flatpickr-am-pm",n.l10n.amPM[u((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}());f(n.calendarContainer,"rangeMode","range"===n.config.mode),f(n.calendarContainer,"animate",!0===n.config.animate),f(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(e);var i=n.config.appendTo!==undefined&&n.config.appendTo.nodeType!==undefined;if((n.config.inline||n.config["static"])&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!i&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==undefined&&n.config.appendTo.appendChild(n.calendarContainer)),n.config["static"])){var a=d("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(a,n.element),a.appendChild(n.element),n.altInput&&a.appendChild(n.altInput),a.appendChild(n.calendarContainer)}n.config["static"]||n.config.inline||(n.config.appendTo!==undefined?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 L(t,"click",n[e])}))}));if(n.isMobile)return void function(){var e=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=d("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",n.altInput!==undefined&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(t){}L(n.mobileInput,"change",(function(e){n.setDate(y(e).value,!1,n.mobileFormatStr),ve("onChange"),ve("onClose")}))}();var e=l(ae,50);n._debouncedChange=l(I,300),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&L(n.daysContainer,"mouseover",(function(e){"range"===n.config.mode&&ie(y(e))}));L(n._input,"keydown",oe),n.calendarContainer!==undefined&&L(n.calendarContainer,"keydown",oe);n.config.inline||n.config["static"]||L(window,"resize",e);window.ontouchstart!==undefined?L(window.document,"touchstart",J):L(window.document,"mousedown",J);L(window.document,"focus",J,{capture:!0}),!0===n.config.clickOpens&&(L(n._input,"focus",n.open),L(n._input,"click",n.open));n.daysContainer!==undefined&&(L(n.monthNav,"click",ke),L(n.monthNav,["keyup","increment"],M),L(n.daysContainer,"click",pe));if(n.timeContainer!==undefined&&n.minuteElement!==undefined&&n.hourElement!==undefined){var t=function(e){return y(e).select()};L(n.timeContainer,["increment"],O),L(n.timeContainer,"blur",O,{capture:!0}),L(n.timeContainer,"click",q),L([n.hourElement,n.minuteElement],["focus","click"],t),n.secondElement!==undefined&&L(n.secondElement,"focus",(function(){return n.secondElement&&n.secondElement.select()})),n.amPM!==undefined&&L(n.amPM,"click",(function(e){O(e)}))}n.config.allowInput&&L(n._input,"blur",re)}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&D(n.config.noCalendar?n.latestSelectedDateObj:undefined),xe(!1)),b();var i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&i&&ce(),ve("onReady")}(),n}function D(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),r=[],o=0;oc))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,m=!0,y=2&n?new r:undefined;for(u.set(e,t),u.set(t,e);++h-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e)["delete"](e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},4e3:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5639:function(e,t,n){var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:function(e){e.exports=function(e){return this.__data__.has(e)}},1814:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t["delete"](e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5694:function(e,t,n){var r=n(9454),o=n(7005),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:undefined,u=(s?s.isBuffer:undefined)||o;e.exports=u},8446:function(e,t,n){var r=n(939);e.exports=function(e,t){return r(e,t)}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7654:function(e,t,n){var r=n(1763);e.exports=function(e){return r(e)&&e!=+e}},1763:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==r(e)}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},7037:function(e,t,n){var r=n(4239),o=n(1469),i=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(1717),i=n(4e3),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},2353:function(e){e.exports=function(e){return e===undefined}},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(8612);e.exports=function(e){return i(e)?r(e):o(e)}},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},4251:function(e){"use strict"; /*! * MoveTo - A lightweight scroll animation javascript library without any dependency. * Version 1.8.2 (28-06-2019 14:30) * Licensed under MIT * Copyright 2019 Hasan Aydoğdu */var t=function(){var e={tolerance:0,duration:800,easing:"easeOutQuart",container:window,callback:function(){}};function t(e,t,n,r){return e/=r,-n*(--e*e*e*e-1)+t}function n(e,t){var n={};return Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(e){n[e]=t[e]})),n}function r(e){return e instanceof HTMLElement?e.scrollTop:e.pageYOffset}function o(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.options=n(e,r),this.easeFunctions=n({easeOutQuart:t},o)}return o.prototype.registerTrigger=function(e,t){var r=this;if(e){var o=e.getAttribute("href")||e.getAttribute("data-target"),i=o&&"#"!==o?document.getElementById(o.substring(1)):document.body,a=n(this.options,function(e,t){var n={};return Object.keys(t).forEach((function(t){var r=e.getAttribute("data-mt-".concat(t.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))));r&&(n[t]=isNaN(r)?r:parseInt(r,10))})),n}(e,this.options));"function"==typeof t&&(a.callback=t);var s=function(e){e.preventDefault(),r.move(i,a)};return e.addEventListener("click",s,!1),function(){return e.removeEventListener("click",s,!1)}}},o.prototype.move=function(e){var t=this,o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(0===e||e){o=n(this.options,o);var i,a="number"==typeof e?e:e.getBoundingClientRect().top,s=r(o.container),u=null;a-=o.tolerance;var l=function c(n){var l=r(t.options.container);u||(u=n-1);var f=n-u;if(i&&(a>0&&i>l||a<0&&i1)return e.map((function(e){return p(e)}));var n=e[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new i("Invalid definition");if("abstract"===n.blotName)throw new i("Cannot register abstract class");if(c[n.blotName||n.attrName]=n,"string"==typeof n.keyName)s[n.keyName]=n;else if(null!=n.className&&(u[n.className]=n),null!=n.tagName){Array.isArray(n.tagName)?n.tagName=n.tagName.map((function(e){return e.toUpperCase()})):n.tagName=n.tagName.toUpperCase();var r=Array.isArray(n.tagName)?n.tagName:[n.tagName];r.forEach((function(e){null!=l[e]&&null!=n.className||(l[e]=n)}))}return n}},function(e,t,n){var r=n(51),o=n(11),i=n(3),a=n(20),s=String.fromCharCode(0),u=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};u.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},u.prototype["delete"]=function(e){return e<=0?this:this.push({"delete":e})},u.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},u.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=i(!0,{},e),"object"==typeof n){if("number"==typeof e["delete"]&&"number"==typeof n["delete"])return this.ops[t-1]={"delete":n["delete"]+e["delete"]},this;if("number"==typeof n["delete"]&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(o(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},u.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},u.prototype.filter=function(e){return this.ops.filter(e)},u.prototype.forEach=function(e){this.ops.forEach(e)},u.prototype.map=function(e){return this.ops.map(e)},u.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(r){(e(r)?t:n).push(r)})),[t,n]},u.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},u.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+a.length(t):t["delete"]?e-t["delete"]:e}),0)},u.prototype.length=function(){return this.reduce((function(e,t){return e+a.length(t)}),0)},u.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=Infinity);for(var n=[],r=a.iterator(this.ops),o=0;o0&&n.next(i.retain-s)}for(var l=new u(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===t.peekType())l.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),f=t.next(c),d=n.next(c);if("number"==typeof d.retain){var p={};"number"==typeof f.retain?p.retain=c:p.insert=f.insert;var h=a.attributes.compose(f.attributes,d.attributes,"number"==typeof f.retain);if(h&&(p.attributes=h),l.push(p),!n.hasNext()&&o(l.ops[l.ops.length-1],p)){var m=new u(t.rest());return l.concat(m).chop()}}else"number"==typeof d["delete"]&&"number"==typeof f.retain&&l.push(d)}return l.chop()},u.prototype.concat=function(e){var t=new u(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},u.prototype.diff=function(e,t){if(this.ops===e.ops)return new u;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),i=new u,l=r(n[0],n[1],t),c=a.iterator(this.ops),f=a.iterator(e.ops);return l.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(f.peekLength(),t),i.push(f.next(n));break;case r.DELETE:n=Math.min(t,c.peekLength()),c.next(n),i["delete"](n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),t);var s=c.next(n),u=f.next(n);o(s.insert,u.insert)?i.retain(n,a.attributes.diff(s.attributes,u.attributes)):i.push(u)["delete"](n)}t-=n}})),i.chop()},u.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new u,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),s=a.length(i)-n.peekLength(),l="string"==typeof i.insert?i.insert.indexOf(t,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(!1===e(r,n.next(1).attributes||{},o))return;o+=1,r=new u}}r.length()>0&&e(r,{},o)},u.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),o=new u;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),s=n.next(i),l=r.next(i);if(s["delete"])continue;l["delete"]?o.push(l):o.retain(i,a.attributes.transform(s.attributes,l.attributes,t))}else o.retain(a.length(n.next()));return o.chop()},u.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r0&&(e1&&arguments[1]!==undefined&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(s["default"].Block);function g(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,i["default"])(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:g(e.parent,t))}y.blotName="block",y.tagName="P",y.defaultChild="break",y.allowedChildren=[l["default"],s["default"].Embed,c["default"]],t.bubbleFormats=g,t.BlockEmbed=m,t["default"]=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.overload=t.expandConfig=undefined;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=undefined;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n1&&arguments[1]!==undefined?arguments[1]:{};if(v(this,e),this.options=O(t,r),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new u["default"],this.scroll=c["default"].create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s["default"](this.scroll),this.selection=new d["default"](this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(u["default"].events.EDITOR_CHANGE,(function(e){e===u["default"].events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(u["default"].events.SCROLL_UPDATE,(function(e,t){var r=n.selection.lastRange,o=r&&0===r.length?r.index:undefined;_.call(n,(function(){return n.editor.update(null,t,o)}),e)}));var i=this.clipboard.convert("
"+o+"


");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),h["default"].level(e)}},{key:"find",value:function(e){return e.__quill||c["default"].find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&b.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==undefined&&arguments[2];if("string"!=typeof e){var o=e.attrName||e.blotName;"string"==typeof o?this.register("formats/"+o,e,t):Object.keys(e).forEach((function(r){n.register(r,e[r],t)}))}else null==this.imports[e]||r||b.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c["default"].register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),i(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,i=x(e,t,n),a=o(i,4);return e=a[0],t=a[1],n=a[3],_.call(this,(function(){return r.editor.deleteText(e,t)}),n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:u["default"].sources.API;return _.call(this,(function(){var r=n.getSelection(!0),o=new a["default"];if(null==r)return o;if(c["default"].query(e,c["default"].Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,g({},e,t));else{if(0===r.length)return n.selection.format(e,t),o;o=n.editor.formatText(r.index,r.length,g({},e,t))}return n.setSelection(r,u["default"].sources.SILENT),o}),r)}},{key:"formatLine",value:function(e,t,n,r,i){var a,s=this,u=x(e,t,n,r,i),l=o(u,4);return e=l[0],t=l[1],a=l[2],i=l[3],_.call(this,(function(){return s.editor.formatLine(e,t,a)}),i,e,0)}},{key:"formatText",value:function(e,t,n,r,i){var a,s=this,u=x(e,t,n,r,i),l=o(u,4);return e=l[0],t=l[1],a=l[2],i=l[3],_.call(this,(function(){return s.editor.formatText(e,t,a)}),i,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,n=void 0;n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.getLength()-e,n=x(e,t),r=o(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){var e=arguments.length>0&&arguments[0]!==undefined&&arguments[0];return e&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.getLength()-e,n=x(e,t),r=o(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var o=this,i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:e.sources.API;return _.call(this,(function(){return o.editor.insertEmbed(t,n,r)}),i,t)}},{key:"insertText",value:function(e,t,n,r,i){var a,s=this,u=x(e,0,n,r,i),l=o(u,4);return e=l[0],a=l[2],i=l[3],_.call(this,(function(){return s.editor.insertText(e,t,a)}),i,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,i=x(e,t,n),a=o(i,4);return e=a[0],t=a[1],n=a[3],_.call(this,(function(){return r.editor.removeFormat(e,t)}),n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:u["default"].sources.API;return _.call(this,(function(){e=new a["default"](e);var n=t.getLength(),r=t.editor.deleteText(0,n),o=t.editor.applyDelta(e),i=o.ops[o.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),o["delete"](1)),r.compose(o)}),n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var i=x(t,n,r),a=o(i,4);t=a[0],n=a[1],r=a[3],this.selection.setRange(new f.Range(t,n),r),r!==u["default"].sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:u["default"].sources.API,n=(new a["default"]).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:u["default"].sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:u["default"].sources.API;return _.call(this,(function(){return e=new a["default"](e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function O(e,t){if((t=(0,p["default"])(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==w.DEFAULTS.theme){if(t.theme=w["import"]("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=m["default"];var n=(0,p["default"])(!0,{},t.theme.DEFAULTS);[n,t].forEach((function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach((function(t){!0===e.modules[t]&&(e.modules[t]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=w["import"]("modules/"+t);return null==n?b.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e}),{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,p["default"])(!0,{},w.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach((function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))})),t.modules=Object.keys(t.modules).reduce((function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e}),{}),t}function _(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===u["default"].sources.USER)return new a["default"];var o=null==n?null:this.getSelection(),i=this.editor.delta,s=e();if(null!=o&&(!0===n&&(n=o.index),null==r?o=k(o,s,t):0!==r&&(o=k(o,n,r,t)),this.setSelection(o,u["default"].sources.SILENT)),s.length()>0){var l,c,f=[u["default"].events.TEXT_CHANGE,s,i,t];(l=this.emitter).emit.apply(l,[u["default"].events.EDITOR_CHANGE].concat(f)),t!==u["default"].sources.SILENT&&(c=this.emitter).emit.apply(c,f)}return s}function x(e,t,n,o,i){var a={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=o,o=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=o,o=n,n=t,t=0),"object"===(void 0===n?"undefined":r(n))?(a=n,i=o):"string"==typeof n&&(null!=o?a[n]=o:i=n),[e,t,a,i=i||u["default"].sources.API]}function k(e,t,n,r){if(null==e)return null;var i=void 0,s=void 0;if(t instanceof a["default"]){var l=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,r!==u["default"].sources.USER)})),c=o(l,2);i=c[0],s=c[1]}else{var d=[e.index,e.index+e.length].map((function(e){return e=0?e+n:Math.max(t,e+n)})),p=o(d,2);i=p[0],s=p[1]}return new f.Range(i,s-i)}w.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},w.events=u["default"].events,w.sources=u["default"].sources,w.version="1.3.7",w.imports={delta:a["default"],parchment:c["default"],"core/module":l["default"],"core/theme":m["default"]},t.expandConfig=O,t.overload=x,t["default"]=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),o=t.order.indexOf(n);return r>=0||o>=0?r-o:e===n?0:e1?t-1:0),r=1;r1&&arguments[1]!==undefined?arguments[1]:{};r(this,i),this.quill=e,this.options=t};o.DEFAULTS={},t["default"]=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],o="warn";function i(e){if(r.indexOf(e)<=r.indexOf(o)){for(var t,n=arguments.length,i=Array(n>1?n-1:0),a=1;a=0;l--)if(f[l]!=d[l])return!1;for(l=f.length-1;l>=0;l--)if(c=f[l],!a(e[c],t[c],n))return!1;return typeof e==typeof t}(e,t,n))};function s(e){return null===e||e===undefined}function u(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,(function(e){return e.name}))},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t["default"]=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.Code=undefined;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=undefined;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n=e+n)){var a=this.newlineIndex(e,!0)+1,u=i-a+1,l=this.isolate(a,u),c=l.next;l.format(r,o),c instanceof t&&c.formatAt(0,e-a+n-u,r,o)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var o=this.descendant(c["default"],e),i=r(o,2),a=i[0],s=i[1];a.insertAt(s,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){var t=arguments.length>1&&arguments[1]!==undefined&&arguments[1];if(t)return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var n=this.domNode.textContent.slice(e).indexOf("\n");return n>-1?e+n:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(s["default"].create("text","\n")),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=s["default"].find(e);null==t?e.parentNode.removeChild(e):t instanceof s["default"].Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(u["default"]);y.blotName="code-block",y.tagName="PRE",y.TAB=" ",t.Code=m,t["default"]=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=undefined;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n=i&&!p.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,p);var h=t.scroll.line(e),m=o(h,2),g=m[0],v=m[1],b=(0,y["default"])({},(0,f.bubbleFormats)(g));if(g instanceof d["default"]){var w=g.descendant(u["default"].Leaf,v),O=o(w,1)[0];b=(0,y["default"])(b,(0,f.bubbleFormats)(O))}c=s["default"].attributes.diff(b,c)||{}}else if("object"===r(a.insert)){var _=Object.keys(a.insert)[0];if(null==_)return e;t.scroll.insertAt(e,_,a.insert[_])}i+=l}return Object.keys(c).forEach((function(n){t.scroll.formatAt(e,l,n,c[n])})),e+l}),0),e.reduce((function(e,n){return"number"==typeof n["delete"]?(t.scroll.deleteAt(e,n["delete"]),e):e+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new a["default"]).retain(e)["delete"](t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(e,Math.max(t,1)),a=t;i.forEach((function(t){var i=t.length();if(t instanceof l["default"]){var s=e-t.offset(n.scroll),u=t.newlineIndex(s+a)-s+1;t.formatAt(s,u,o,r[o])}else t.format(o,r[o]);a-=i}))}})),this.scroll.optimize(),this.update((new a["default"]).retain(e).retain(t,(0,h["default"])(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return Object.keys(r).forEach((function(o){n.scroll.formatAt(e,t,o,r[o])})),this.update((new a["default"]).retain(e).retain(t,(0,h["default"])(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(e,t){return e.concat(t.delta())}),new a["default"])}},{key:"getFormat",value:function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach((function(e){var t=o(e,1)[0];t instanceof d["default"]?n.push(t):t instanceof u["default"].Leaf&&r.push(t)})):(n=this.scroll.lines(e,t),r=this.scroll.descendants(u["default"].Leaf,e,t));var i=[n,r].map((function(e){if(0===e.length)return{};for(var t=(0,f.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=w((0,f.bubbleFormats)(n),t)}return t}));return y["default"].apply(y["default"],i)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter((function(e){return"string"==typeof e.insert})).map((function(e){return e.insert})).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new a["default"]).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach((function(o){n.scroll.formatAt(e,t.length,o,r[o])})),this.update((new a["default"]).retain(e).insert(t,(0,h["default"])(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===d["default"].blotName&&!(e.children.length>1)&&e.children.head instanceof p["default"]}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),i=o(r,2),s=i[0],u=i[1],c=0,f=new a["default"];null!=s&&(c=s instanceof l["default"]?s.newlineIndex(u)-u+1:s.length()-u,f=s.delta().slice(u,u+c-1).insert("\n"));var d=this.getContents(e,t+c).diff((new a["default"]).insert(n).concat(f)),p=(new a["default"]).retain(e).concat(d);return this.applyDelta(p)}},{key:"update",value:function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:undefined,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(v)&&u["default"].find(t[0].target)){var o=u["default"].find(t[0].target),i=(0,f.bubbleFormats)(o),s=o.offset(this.scroll),l=t[0].oldValue.replace(c["default"].CONTENTS,""),d=(new a["default"]).insert(l),p=(new a["default"]).insert(o.value()),h=(new a["default"]).retain(s).concat(d.diff(p,n));e=h.reduce((function(e,t){return t.insert?e.insert(t.insert,i):e.push(t)}),new a["default"]),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,m["default"])(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function w(e,t){return Object.keys(t).reduce((function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n}),{})}t["default"]=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.Range=undefined;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=undefined;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n1&&arguments[1]!==undefined?arguments[1]:0;f(this,y),this.index=e,this.length=t},h=function(){function e(t,n){var r=this;f(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i["default"].create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,u["default"].sources.USER),1)})),this.emitter.on(u["default"].events.EDITOR_CHANGE,(function(e,t){e===u["default"].events.TEXT_CHANGE&&t.length()>0&&r.update(u["default"].sources.SILENT)})),this.emitter.on(u["default"].events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(u["default"].events.SCROLL_UPDATE,(function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(t){}}))}})),this.emitter.on(u["default"].events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.range,o=n.startNode,i=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(o,i,a,s)}})),this.update(u["default"].sources.SILENT)}return o(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",(function(){e.composing=!0})),this.root.addEventListener("compositionend",(function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout((function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,(function(){e.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){e.mouseDown=!1,e.update(u["default"].sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i["default"].query(e,i["default"].Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=i["default"].find(n.start.node,!1);if(null==r)return;if(r instanceof i["default"].Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var o=void 0,i=this.scroll.leaf(e),a=r(i,2),s=a[0],u=a[1];if(null==s)return null;var l=s.position(u,!0),c=r(l,2);o=c[0],u=c[1];var f=document.createRange();if(t>0){f.setStart(o,u);var d=this.scroll.leaf(e+t),p=r(d,2);if(s=p[0],u=p[1],null==s)return null;var h=s.position(u,!0),m=r(h,2);return o=m[0],u=m[1],f.setEnd(o,u),f.getBoundingClientRect()}var y="left",g=void 0;return o instanceof Text?(u0&&(y="right")),{bottom:g.top+g.height,height:g.height,left:g[y],right:g[y],top:g.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return d.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var o=n.map((function(e){var n=r(e,2),o=n[0],a=n[1],s=i["default"].find(o,!0),u=s.offset(t.scroll);return 0===a?u:s instanceof i["default"].Container?u+s.length():u+s.index(o,a)})),a=Math.min(Math.max.apply(Math,c(o)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(o)));return new p(s,a-s)}},{key:"normalizeNative",value:function(e){if(!m(this.root,e.startContainer)||!e.collapsed&&!m(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach((function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n})),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],o=[],i=this.scroll.length();return n.forEach((function(e,n){e=Math.min(i-1,e);var a,s=t.scroll.leaf(e),u=r(s,2),l=u[0],c=u[1],f=l.position(c,0!==n),d=r(f,2);a=d[0],c=d[1],o.push(a,c)})),o.length<2&&(o=o.concat(o)),o}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var o=this.scroll.length()-1,i=this.scroll.line(Math.min(t.index,o)),a=r(i,1)[0],s=a;if(t.length>0){var u=this.scroll.line(Math.min(t.index+t.length,o));s=r(u,1)[0]}if(null!=a&&null!=s){var l=e.getBoundingClientRect();n.topl.bottom&&(e.scrollTop+=n.bottom-l.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:e,r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:t,o=arguments.length>4&&arguments[4]!==undefined&&arguments[4];if(d.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||o||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(e,t),s.setEnd(n,r),i.removeAllRanges(),i.addRange(s)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&arguments[1]!==undefined&&arguments[1],n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:u["default"].sources.API;if("string"==typeof t&&(n=t,t=!1),d.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,c(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:u["default"].sources.USER,t=this.lastRange,n=this.getRange(),o=r(n,2),i=o[0],l=o[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s["default"])(t,this.lastRange)){var c;!this.composing&&null!=l&&l.native.collapsed&&l.start.node!==this.cursor.textNode&&this.cursor.restore();var f,d=[u["default"].events.SELECTION_CHANGE,(0,a["default"])(this.lastRange),(0,a["default"])(t),e];(c=this.emitter).emit.apply(c,[u["default"].events.EDITOR_CHANGE].concat(d)),e!==u["default"].sources.SILENT&&(f=this.emitter).emit.apply(f,d)}}}]),e}();function m(e,t){try{t.parentNode}catch(n){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=p,t["default"]=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=a.Scope.INLINE_BLOT,t}(i["default"]);t["default"]=s},function(e,t,n){var r=n(11),o=n(3),i={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=o(!0,{},t);for(var i in n||(r=Object.keys(r).reduce((function(e,t){return null!=r[t]&&(e[t]=r[t]),e}),{})),e)e[i]!==undefined&&t[i]===undefined&&(r[i]=e[i]);return Object.keys(r).length>0?r:undefined},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce((function(n,o){return r(e[o],t[o])||(n[o]=t[o]===undefined?null:t[o]),n}),{});return Object.keys(n).length>0?n:undefined},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"!=typeof t)return undefined;if(!n)return t;var r=Object.keys(t).reduce((function(n,r){return e[r]===undefined&&(n[r]=t[r]),n}),{});return Object.keys(r).length>0?r:undefined}},iterator:function(e){return new a(e)},length:function(e){return"number"==typeof e["delete"]?e["delete"]:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t["delete"])return{"delete":e};var o={};return t.attributes&&(o.attributes=t.attributes),"number"==typeof t.retain?o.retain=e:"string"==typeof t.insert?o.insert=t.insert.substr(n,e):o.insert=t.insert,o}return{retain:Infinity}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:Infinity},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index]["delete"]?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}return[]},e.exports=i},function(e,t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(s){t=function(){}}try{n=Set}catch(s){n=function(){}}try{r=Promise}catch(s){r=function(){}}function o(i,s,u,l,c){"object"==typeof s&&(u=s.depth,l=s.prototype,c=s.includeNonEnumerable,s=s.circular);var f=[],d=[],p="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===u&&(u=Infinity),function h(i,u){if(null===i)return null;if(0===u)return i;var m,y;if("object"!=typeof i)return i;if(e(i,t))m=new t;else if(e(i,n))m=new n;else if(e(i,r))m=new r((function(e,t){i.then((function(t){e(h(t,u-1))}),(function(e){t(h(e,u-1))}))}));else if(o.__isArray(i))m=[];else if(o.__isRegExp(i))m=new RegExp(i.source,a(i)),i.lastIndex&&(m.lastIndex=i.lastIndex);else if(o.__isDate(i))m=new Date(i.getTime());else{if(p&&Buffer.isBuffer(i))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(i.length):new Buffer(i.length),i.copy(m),m;e(i,Error)?m=Object.create(i):void 0===l?(y=Object.getPrototypeOf(i),m=Object.create(y)):(m=Object.create(l),y=l)}if(s){var g=f.indexOf(i);if(-1!=g)return d[g];f.push(i),d.push(m)}for(var v in e(i,t)&&i.forEach((function(e,t){var n=h(t,u-1),r=h(e,u-1);m.set(n,r)})),e(i,n)&&i.forEach((function(e){var t=h(e,u-1);m.add(t)})),i){var b;y&&(b=Object.getOwnPropertyDescriptor(y,v)),b&&null==b.set||(m[v]=h(i[v],u-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(i);for(v=0;v0){if(s instanceof u.BlockEmbed||p instanceof u.BlockEmbed)return void this.optimize();if(s instanceof f["default"]){var h=s.newlineIndex(s.length(),!0);if(h>-1&&(s=s.split(h+1))===p)return void this.optimize()}else if(p instanceof f["default"]){var m=p.newlineIndex(0);m>-1&&p.split(m+1)}var y=p.children.head instanceof c["default"]?null:p.children.head;s.moveChildren(p,y),s.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,o){(null==this.whitelist||this.whitelist[r])&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,o),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==a["default"].query(n,a["default"].Scope.BLOCK)){var o=a["default"].create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var s=a["default"].create(n,r);this.appendChild(s)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a["default"].Scope.INLINE_BLOT){var r=a["default"].create(this.statics.defaultChild);r.appendChild(e),e=r}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(h,e)}},{key:"lines",value:function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Number.MAX_VALUE,n=function r(e,t,n){var o=[],i=n;return e.children.forEachAt(t,n,(function(e,t,n){h(e)?o.push(e):e instanceof a["default"].Container&&(o=o.concat(r(e,t,i))),i-=n})),o};return n(this,e,t)}},{key:"optimize",value:function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};!0!==this.batch&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(s["default"].events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=s["default"].sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(s["default"].events.SCROLL_BEFORE_UPDATE,n,e),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(s["default"].events.SCROLL_UPDATE,n,e)}}}]),t}(a["default"].Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[l["default"],u.BlockEmbed,d["default"]],t["default"]=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t["default"]=undefined;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=undefined;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n1&&arguments[1]!==undefined?arguments[1]:{},n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},r=S(e);if(null==r||null==r.key)return g.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,u["default"])(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,a=(e.bindings[i]||[]).filter((function(e){return t.match(n,e)}));if(0!==a.length){var u=e.quill.getSelection();if(null!=u&&e.quill.hasFocus()){var l=e.quill.getLine(u.index),c=o(l,2),d=c[0],p=c[1],h=e.quill.getLeaf(u.index),m=o(h,2),y=m[0],g=m[1],v=0===u.length?[y,g]:e.quill.getLeaf(u.index+u.length),b=o(v,2),w=b[0],O=b[1],_=y instanceof f["default"].Text?y.value().slice(0,g):"",x=w instanceof f["default"].Text?w.value().slice(O):"",k={collapsed:0===u.length,empty:0===u.length&&d.length()<=1,format:e.quill.getFormat(u),offset:p,prefix:_,suffix:x};a.some((function(t){if(null!=t.collapsed&&t.collapsed!==k.collapsed)return!1;if(null!=t.empty&&t.empty!==k.empty)return!1;if(null!=t.offset&&t.offset!==k.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==k.format[e]})))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=k.format[e]:!1===t.format[e]?null==k.format[e]:(0,s["default"])(t.format[e],k.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(k.prefix)||null!=t.suffix&&!t.suffix.test(k.suffix)||!0===t.handler.call(e,u,k))}))&&n.preventDefault()}}}}))}}]),t}(h["default"]);function w(e,t){var n,r=e===b.keys.LEFT?"prefix":"suffix";return y(n={key:e,shiftKey:t,altKey:null},r,/^$/),y(n,"handler",(function(n){var r=n.index;e===b.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r);return!(o(i,1)[0]instanceof f["default"].Embed&&(e===b.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,d["default"].sources.USER):this.quill.setSelection(n.index-1,d["default"].sources.USER):t?this.quill.setSelection(n.index,n.length+1,d["default"].sources.USER):this.quill.setSelection(n.index+n.length+1,d["default"].sources.USER),1))})),n}function O(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=o(n,1)[0],i={};if(0===t.offset){var a=this.quill.getLine(e.index-1),s=o(a,1)[0];if(null!=s&&s.length()>1){var u=r.formats(),l=this.quill.getFormat(e.index-1,1);i=c["default"].attributes.diff(u,l)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-f,f,d["default"].sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index-f,f,i,d["default"].sources.USER),this.quill.focus()}}function _(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},i=0,a=this.quill.getLine(e.index),s=o(a,1)[0];if(t.offset>=s.length()-1){var u=this.quill.getLine(e.index+1),l=o(u,1)[0];if(l){var f=s.formats(),p=this.quill.getFormat(e.index,1);r=c["default"].attributes.diff(f,p)||{},i=l.length()}}this.quill.deleteText(e.index,n,d["default"].sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+i-1,n,r,d["default"].sources.USER)}}function x(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),o=t[t.length-1].formats();n=c["default"].attributes.diff(o,r)||{}}this.quill.deleteText(e,d["default"].sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,d["default"].sources.USER),this.quill.setSelection(e.index,d["default"].sources.SILENT),this.quill.focus()}function k(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce((function(e,n){return f["default"].query(n,f["default"].Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",r,d["default"].sources.USER),this.quill.setSelection(e.index+1,d["default"].sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach((function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],d["default"].sources.USER))}))}function E(e){return{key:b.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=f["default"].query("code-block"),r=t.index,i=t.length,a=this.quill.scroll.descendant(n,r),s=o(a,2),u=s[0],l=s[1];if(null!=u){var c=this.quill.getIndex(u),p=u.newlineIndex(l,!0)+1,h=u.newlineIndex(c+l+i),m=u.domNode.textContent.slice(p,h).split("\n");l=0,m.forEach((function(t,o){e?(u.insertAt(p+l,n.TAB),l+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):t.startsWith(n.TAB)&&(u.deleteAt(p+l,n.TAB.length),l-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),l+=t.length+1})),this.quill.update(d["default"].sources.USER),this.quill.setSelection(r,i,d["default"].sources.SILENT)}}}}function C(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],d["default"].sources.USER)}}}function S(e){if("string"==typeof e||"number"==typeof e)return S({key:e});if("object"===(void 0===e?"undefined":r(e))&&(e=(0,a["default"])(e,!1)),"string"==typeof e.key)if(null!=b.keys[e.key.toUpperCase()])e.key=b.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[v]=e.shortKey,delete e.shortKey),e}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:C("bold"),italic:C("italic"),underline:C("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",d["default"].sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",d["default"].sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",d["default"].sources.USER):null!=t.format.list&&this.quill.format("list",!1,d["default"].sources.USER)}},"indent code-block":E(!0),"outdent code-block":E(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,d["default"].sources.USER)}},tab:{key:b.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new l["default"]).retain(e.index)["delete"](e.length).insert("\t");this.quill.updateContents(t,d["default"].sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,d["default"].sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,d["default"].sources.USER),t.format.indent&&this.quill.format("indent",!1,d["default"].sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=o(t,2),r=n[0],i=n[1],a=(0,u["default"])({},r.formats(),{list:"checked"}),s=(new l["default"]).retain(e.index).insert("\n",a).retain(r.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,d["default"].sources.USER),this.quill.setSelection(e.index+1,d["default"].sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=o(n,2),i=r[0],a=r[1],s=(new l["default"]).retain(e.index).insert("\n",t.format).retain(i.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,d["default"].sources.USER),this.quill.setSelection(e.index+1,d["default"].sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=this.quill.getLine(e.index),i=o(r,2),a=i[0],s=i[1];if(s>n)return!0;var u=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":u="unchecked";break;case"[x]":u="checked";break;case"-":case"*":u="bullet";break;default:u="ordered"}this.quill.insertText(e.index," ",d["default"].sources.USER),this.quill.history.cutoff();var c=(new l["default"]).retain(e.index-s)["delete"](n+1).retain(a.length()-2-s).retain(1,{list:u});this.quill.updateContents(c,d["default"].sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,d["default"].sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=o(t,2),r=n[0],i=n[1],a=(new l["default"]).retain(e.index+r.length()-i-2).retain(1,{"code-block":null})["delete"](1);this.quill.updateContents(a,d["default"].sources.USER)}},"embed left":w(b.keys.LEFT,!1),"embed left shift":w(b.keys.LEFT,!0),"embed right":w(b.keys.RIGHT,!1),"embed right shift":w(b.keys.RIGHT,!0)}},t["default"]=b,t.SHORTKEY=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=undefined;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function c(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(r===undefined){var o=Object.getPrototypeOf(e);return null===o?undefined:c(o,t,n)}if("value"in r)return r.value;var i=r.get;return i===undefined?undefined:i.call(n)},i=function(){function e(e,t){for(var n=0;n-1}l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",l.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t["default"]=l,t.sanitize=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n1&&arguments[1]!==undefined&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var o=document.createEvent("Event");o.initEvent("change",!0,!0),this.select.dispatchEvent(o)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t["default"]=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=g(n(0)),o=g(n(5)),i=n(4),a=g(i),s=g(n(16)),u=g(n(25)),l=g(n(24)),c=g(n(35)),f=g(n(6)),d=g(n(22)),p=g(n(7)),h=g(n(55)),m=g(n(42)),y=g(n(23));function g(e){return e&&e.__esModule?e:{"default":e}}o["default"].register({"blots/block":a["default"],"blots/block/embed":i.BlockEmbed,"blots/break":s["default"],"blots/container":u["default"],"blots/cursor":l["default"],"blots/embed":c["default"],"blots/inline":f["default"],"blots/scroll":d["default"],"blots/text":p["default"],"modules/clipboard":h["default"],"modules/history":m["default"],"modules/keyboard":y["default"]}),r["default"].register(a["default"],s["default"],l["default"],f["default"],d["default"],p["default"]),t["default"]=o["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,o){var i=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);i.wrap(a),a.format(n,o)}},e.prototype.insertAt=function(e,t,n){var o=null==n?r.create("text",t):r.create(t,n),i=this.split(e);this.parent.insertBefore(o,i)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t["default"]=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=n(32),i=n(33),a=n(1),s=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r["default"].keys(this.domNode),n=o["default"].keys(this.domNode),s=i["default"].keys(this.domNode);t.concat(n).concat(s).forEach((function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r["default"]&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)}))},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach((function(e){t.attributes[e].remove(t.domNode)})),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce((function(t,n){return t[n]=e.attributes[n].value(e.domNode),t}),{})},e}();t["default"]=s},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function i(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((function(e){return 0===e.indexOf(t+"-")}))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map((function(e){return e.split("-").slice(0,-1).join("-")}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){i(e,this.keyName).forEach((function(t){e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(i(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12)["default"]);t["default"]=a},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function i(e){var t=e.split("-"),n=t.slice(1).map((function(e){return e[0].toUpperCase()+e.slice(1)})).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map((function(e){return e.split(":")[0].trim()}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[i(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[i(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[i(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12)["default"]);t["default"]=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nr&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),e=o.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})),this.stack.redo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9))["default"]);function u(e){var t=e.reduce((function(e,t){return e+=t["delete"]||0}),0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some((function(e){return null!=o["default"].query(e,o["default"].Scope.BLOCK)})))}(e)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t["default"]=s,t.getLastChangeIndex=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.BaseTooltip=undefined;var r=function(){function e(e,t){for(var n=0;n0&&arguments[0]!==undefined?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e,t,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s["default"].sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s["default"].sources.USER)),this.quill.root.scrollTop=r;break;case"video":t=(e=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/),n=t?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e;case"formula":if(!n)break;var o=this.quill.getSelection(!0);if(null!=o){var i=o.index+o.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),n,s["default"].sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",s["default"].sources.USER),this.quill.setSelection(i+2,s["default"].sources.USER)}}this.textbox.value="",this.hide()}}]),t}(p["default"]);function E(e,t){var n=arguments.length>2&&arguments[2]!==undefined&&arguments[2];t.forEach((function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)}))}t.BaseTooltip=k,t["default"]=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(ea?n(r,e-a,Math.min(t,a+u-e)):n(r,0,Math.min(u,e+t-a)),a+=u}},e.prototype.map=function(e){return this.reduce((function(t,n){return t.push(e(n)),t}),[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t["default"]=r},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver((function(e){n.update(e)})),n.observer.observe(n.domNode,s),n.attach(),n}return o(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach((function(e){e.remove()})):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,o){this.update(),e.prototype.formatAt.call(this,t,n,r,o)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)t.push(o.pop());for(var s=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[a.DATA_KEY].mutations&&(e.domNode[a.DATA_KEY].mutations=[]),t&&s(e.parent))},u=function(e){null!=e.domNode[a.DATA_KEY]&&null!=e.domNode[a.DATA_KEY].mutations&&(e instanceof i["default"]&&e.children.forEach(u),e.optimize(n))},l=t,c=0;l.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach((function(e){var t=a.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(s(a.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=a.find(e,!1);s(t,!1),t instanceof i["default"]&&t.children.forEach((function(e){s(e,!1)}))}))):"attributes"===e.type&&s(t.prev)),s(t))})),this.children.forEach(u),o=(l=[].slice.call(this.observer.takeRecords())).slice();o.length>0;)t.push(o.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=a.find(e.target,!0);return null==t?null:null==t.domNode[a.DATA_KEY].mutations?(t.domNode[a.DATA_KEY].mutations=[e],t):(t.domNode[a.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null!=e&&e!==r&&null!=e.domNode[a.DATA_KEY]&&e.update(e.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i["default"]);t["default"]=u},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),a=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.formats=function(n){return n.tagName===t.tagName?undefined:e.formats.call(this,n)},t.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach((function(e){e instanceof i["default"]||(e=e.wrap(t.blotName,!0)),o.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,r,o){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,o):e.prototype.formatAt.call(this,t,n,r,o)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var o=this.next;o instanceof t&&o.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,o.formats())&&(o.moveChildren(this),o.remove())},t.blotName="inline",t.scope=a.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i["default"]);t["default"]=s},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),a=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.formats=function(n){var r=a.query(t.blotName).tagName;return n.tagName===r?undefined:e.formats.call(this,n)},t.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,o){null!=a.query(r,a.Scope.BLOCK)?this.format(r,o):e.prototype.formatAt.call(this,t,n,r,o)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var o=this.split(t),i=a.create(n,r);o.parent.insertBefore(i,o)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="P",t}(i["default"]);t["default"]=s},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.formats=function(e){return undefined},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,o){0===t&&n===this.length()?this.format(r,o):e.prototype.formatAt.call(this,t,n,r,o)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19)["default"]);t["default"]=i},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),a=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return o(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=a.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some((function(e){return"characterData"===e.type&&e.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=a.Scope.INLINE_BLOT,t}(i["default"]);t["default"]=s},function(e,t,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:o.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;it.length?e:t,l=e.length>t.length?t:e,c=u.indexOf(l);if(-1!=c)return s=[[1,u.substring(0,c)],[0,l],[1,u.substring(c+l.length)]],e.length>t.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[[n,e],[1,t]];var f=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,o,s,u,f]:null}var s,u,l,c,f,d=o(n,r,Math.ceil(n.length/4)),p=o(n,r,Math.ceil(n.length/2));if(!d&&!p)return null;s=p?d&&d[4].length>p[4].length?d:p:d,e.length>t.length?(u=s[0],l=s[1],c=s[2],f=s[3]):(c=s[0],f=s[1],u=s[2],l=s[3]);var h=s[4];return[u,l,c,f,h]}(e,t);if(f){var d=f[0],p=f[1],h=f[2],m=f[3],y=f[4],g=r(d,h),v=r(p,m);return g.concat([[0,y]],v)}return function(e,t){for(var r=e.length,i=t.length,a=Math.ceil((r+i)/2),s=a,u=2*a,l=new Array(u),c=new Array(u),f=0;fr)m+=2;else if(O>i)h+=2;else if(p&&(k=s+d-b)>=0&&k=(x=r-c[k]))return o(e,t,C,O)}for(var _=-v+y;_<=v-g;_+=2){for(var x,k=s+_,E=(x=_==-v||_!=v&&c[k-1]r)g+=2;else if(E>i)y+=2;else if(!p){var C;if((w=s+d-_)>=0&&w=(x=r-x))return o(e,t,C,O)}}}return[[n,e],[1,t]]}(e,t)}(e=e.substring(0,e.length-c),t=t.substring(0,t.length-c));return f&&p.unshift([0,f]),d&&p.push([0,d]),s(p),null!=u&&(p=function(e,t){var r=function(e,t){if(0===t)return[0,e];for(var r=0,o=0;o0&&o.splice(i+2,0,[s[0],u]),l(o,i,3)}return e}(p,u)),p=function(e){for(var t=!1,r=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},o=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},i=2;i0&&a.push(e[i]);return a}(p)}function o(e,t,n,o){var i=e.substring(0,n),a=t.substring(0,o),s=e.substring(n),u=t.substring(o),l=r(i,a),c=r(s,u);return l.concat(c)}function i(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),o=r,i=0;n1?(0!==o&&0!==u&&(0!==(t=i(c,l))&&(r-o-u>0&&0==e[r-o-u-1][0]?e[r-o-u-1][1]+=c.substring(0,t):(e.splice(0,0,[0,c.substring(0,t)]),r++),c=c.substring(t),l=l.substring(t)),0!==(t=a(c,l))&&(e[r][1]=c.substring(c.length-t)+e[r][1],c=c.substring(0,c.length-t),l=l.substring(0,l.length-t))),0===o?e.splice(r-u,o+u,[1,c]):0===u?e.splice(r-o,o+u,[n,l]):e.splice(r-o-u,o+u,[n,l],[1,c]),r=r-o-u+(o?1:0)+(u?1:0)+1):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,u=0,o=0,l="",c=""}""===e[e.length-1][1]&&e.pop();var f=!1;for(r=1;r=0&&r>=t-1;r--)if(r+1=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=S(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new s["default"]).insert("\t").concat(t)),t}],["li",function(e,t){var n=u["default"].query(e);if(null==n||"list-item"!==n.blotName||!P(t,"\n"))return t;for(var r=-1,o=e.parentNode;!o.classList.contains("ql-clipboard");)"list"===(u["default"].query(o)||{}).blotName&&(r+=1),o=o.parentNode;return r<=0?t:t.compose((new s["default"]).retain(t.length()-1).retain(1,{indent:r}))}],["b",T.bind(T,"bold")],["i",T.bind(T,"italic")],["style",function(){return new s["default"]}]],k=[d.AlignAttribute,y.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),E=[d.AlignStyle,p.BackgroundStyle,m.ColorStyle,y.DirectionStyle,g.FontStyle,v.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),C=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],x.concat(r.options.matchers).forEach((function(e){var t=o(e,2),i=t[0],a=t[1];(n.matchVisual||a!==I)&&r.addMatcher(i,a)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\<"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[h["default"].blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s["default"]).insert(n,w({},h["default"].blotName,t[h["default"].blotName]))}var r=this.prepareMatching(),i=o(r,2),a=i[0],u=i[1],l=D(this.container,a,u);return P(l,"\n")&&null==l.ops[l.ops.length-1].attributes&&(l=l.compose((new s["default"]).retain(l.length()-1)["delete"](1))),O.log("convert",this.container.innerHTML,l),this.container.innerHTML="",l}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:l["default"].sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,l["default"].sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new s["default"]).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),l["default"].sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s["default"]).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(l["default"].sources.SILENT),setTimeout((function(){r=r.concat(t.convert())["delete"](n.length),t.quill.updateContents(r,l["default"].sources.USER),t.quill.setSelection(r.length()-n.length,l["default"].sources.SILENT),t.quill.scrollingContainer.scrollTop=o,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach((function(r){var i=o(r,2),a=i[0],s=i[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:t.push(s);break;default:[].forEach.call(e.container.querySelectorAll(a),(function(e){e[_]=e[_]||[],e[_].push(s)}))}})),[t,n]}}]),t}(f["default"]);function S(e,t,n){return"object"===(void 0===t?"undefined":r(t))?Object.keys(t).reduce((function(e,n){return S(e,n,t[n])}),e):e.reduce((function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,a["default"])({},w({},t,n),r.attributes))}),new s["default"])}function j(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function P(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length-1}function D(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new s["default"]):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(r,o){var i=D(o,t,n);return o.nodeType===e.ELEMENT_NODE&&(i=t.reduce((function(e,t){return t(o,e)}),i),i=(o[_]||[]).reduce((function(e,t){return t(o,e)}),i)),r.concat(i)}),new s["default"]):new s["default"]}function T(e,t,n){return S(n,e,!0)}function N(e,t){var n=u["default"].Attributor.Attribute.keys(e),r=u["default"].Attributor.Class.keys(e),o=u["default"].Attributor.Style.keys(e),i={};return n.concat(r).concat(o).forEach((function(t){var n=u["default"].query(t,u["default"].Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(e),i[n.attrName])||(null==(n=k[t])||n.attrName!==t&&n.keyName!==t||(i[n.attrName]=n.value(e)||undefined),null==(n=E[t])||n.attrName!==t&&n.keyName!==t||(n=E[t],i[n.attrName]=n.value(e)||undefined))})),Object.keys(i).length>0&&(t=S(t,i)),t}function M(e,t){var n=u["default"].query(e);if(null==n)return t;if(n.prototype instanceof u["default"].Embed){var r={},o=n.value(e);null!=o&&(r[n.blotName]=o,t=(new s["default"]).insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=S(t,n.blotName,n.formats(e)));return t}function L(e,t){return P(t,"\n")||(A(e)||t.length()>0&&e.nextSibling&&A(e.nextSibling))&&t.insert("\n"),t}function I(e,t){if(A(e)&&null!=e.nextElementSibling&&!P(t,"\n\n")){var n=e.offsetHeight+parseFloat(j(e).marginTop)+parseFloat(j(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function R(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!j(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&A(e.parentNode)||null!=e.previousSibling&&A(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&A(e.parentNode)||null!=e.nextSibling&&A(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}C.DEFAULTS={matchers:[],matchVisual:!0},t["default"]=C,t.matchAttributor=N,t.matchBlot=M,t.matchNewline=L,t.matchSpacing=I,t.matchText=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n '},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;nr.right&&(i=r.right-o.right,this.root.style.left=t+i+"px"),o.leftr.bottom){var a=o.bottom-o.top,s=e.bottom-e.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t["default"]=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=undefined;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function w(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(r===undefined){var o=Object.getPrototypeOf(e);return null===o?undefined:w(o,t,n)}if("value"in r)return r.value;var i=r.get;return i===undefined?undefined:i.call(n)},i=function(){function e(e,t){for(var n=0;n','','',''].join(""),t["default"]=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=L(n(29)),o=n(36),i=n(38),a=n(64),s=L(n(65)),u=L(n(66)),l=n(67),c=L(l),f=n(37),d=n(26),p=n(39),h=n(40),m=L(n(56)),y=L(n(68)),g=L(n(27)),v=L(n(69)),b=L(n(70)),w=L(n(71)),O=L(n(72)),_=L(n(73)),x=n(13),k=L(x),E=L(n(74)),C=L(n(75)),S=L(n(57)),j=L(n(41)),P=L(n(28)),A=L(n(59)),D=L(n(60)),T=L(n(61)),N=L(n(108)),M=L(n(62));function L(e){return e&&e.__esModule?e:{"default":e}}r["default"].register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":d.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":d.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":h.SizeStyle},!0),r["default"].register({"formats/align":o.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":a.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":d.ColorStyle,"formats/font":p.FontClass,"formats/size":h.SizeClass,"formats/blockquote":s["default"],"formats/code-block":k["default"],"formats/header":u["default"],"formats/list":c["default"],"formats/bold":m["default"],"formats/code":x.Code,"formats/italic":y["default"],"formats/link":g["default"],"formats/script":v["default"],"formats/strike":b["default"],"formats/underline":w["default"],"formats/image":O["default"],"formats/video":_["default"],"formats/list/item":l.ListItem,"modules/formula":E["default"],"modules/syntax":C["default"],"modules/toolbar":S["default"],"themes/bubble":N["default"],"themes/snow":M["default"],"ui/icons":j["default"],"ui/picker":P["default"],"ui/icon-picker":D["default"],"ui/color-picker":A["default"],"ui/tooltip":T["default"]},!0),t["default"]=r["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=undefined;var r,o=function(){function e(e,t){for(var n=0;n0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof d)o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),i=this.split(r);i.parent.insertBefore(e,i)}}},{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=i["default"].create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(s["default"]);p.blotName="list",p.scope=i["default"].Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[d],t.ListItem=d,t["default"]=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(56);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=o)&&r.__esModule?r:{"default":r})["default"]);s.blotName="italic",s.tagName=["EM","I"],t["default"]=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return f.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,u.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s["default"].Embed);d.blotName="image",d.tagName="IMG",t["default"]=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return f.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"sanitize",value:function(e){return u["default"].sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.BlockEmbed);d.blotName="video",d.className="ql-video",d.tagName="IFRAME",t["default"]=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.FormulaBlot=undefined;var r=function(){function e(e,t){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(u(n(13))["default"]);d.className="ql-syntax";var p=new i["default"].Attributor.Class("token","hljs",{scope:i["default"].Scope.INLINE}),h=function(e){function t(e,n){l(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var o=null;return r.quill.on(a["default"].events.SCROLL_OPTIMIZE,(function(){clearTimeout(o),o=setTimeout((function(){r.highlight(),o=null}),r.options.interval)})),r.highlight(),r}return f(t,e),r(t,null,[{key:"register",value:function(){a["default"].register(p,!0),a["default"].register(d,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a["default"].sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(d).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(a["default"].sources.SILENT),null!=t&&this.quill.setSelection(t,a["default"].sources.SILENT)}}}]),t}(s["default"]);h.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=d,t.CodeToken=p,t["default"]=h},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.BubbleTooltip=undefined;var r=function v(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(r===undefined){var o=Object.getPrototypeOf(e);return null===o?undefined:v(o,t,n)}if("value"in r)return r.value;var i=r.get;return i===undefined?undefined:i.call(n)},o=function(){function e(e,t){for(var n=0;n0&&o===a["default"].sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(t.index,t.length);if(1===i.length)r.position(r.quill.getBounds(t));else{var s=i[i.length-1],u=r.quill.getIndex(s),c=Math.min(s.length()-1,t.index+t.length-u),f=r.quill.getBounds(new l.Range(u,c));r.position(f)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return h(t,e),o(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){e.root.classList.remove("ql-editing")})),this.quill.on(a["default"].events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),o=this.root.querySelector(".ql-tooltip-arrow");if(o.style.marginLeft="",0===n)return n;o.style.marginLeft=-1*n-o.offsetWidth/2+"px"}}]),t}(s.BaseTooltip);g.TEMPLATE=['','
','','',"
"].join(""),t.BubbleTooltip=g,t["default"]=y},function(e,t,n){e.exports=n(63)}])["default"]},e.exports=t()},5953:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.Z=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{"default":e};var t=u();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n["default"]=e,t&&t.set(e,n);return n}(n(7363)),i=s(n(5697)),a=s(n(8527));function s(e){return e&&e.__esModule?e:{"default":e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t=0;o--){var i=r[o],a=t[i];a!==n[i]&&(-1===x.indexOf(i)||Array.isArray(a)||(a=[a]),this.flatpickr.set(i,a))}!this.props.hasOwnProperty("value")||this.props.value&&Array.isArray(this.props.value)&&e.value&&Array.isArray(e.value)&&this.props.value.every((function(t,n){e[n]}))||this.props.value===e.value||this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var e=this.props,t=e.options,n=e.defaultValue,r=e.value,i=e.children,a=e.render,s=d(e,["options","defaultValue","value","children","render"]);return x.forEach((function(e){delete s[e]})),E.forEach((function(e){delete s[e]})),a?a(h(h({},s),{},{defaultValue:n,value:r}),this.handleNodeChange):t.wrap?o["default"].createElement("div",f({},s,{ref:this.handleNodeChange}),i):o["default"].createElement("input",f({},s,{defaultValue:n,ref:this.handleNodeChange}))}}])&&y(t.prototype,n),r&&y(t,r),s}(o.Component);function j(e,t){var n=h({},e);return x.forEach((function(e){if(t.hasOwnProperty(e)){var r;n[e]&&!Array.isArray(n[e])?n[e]=[n[e]]:n[e]||(n[e]=[]);var o=Array.isArray(t[e])?t[e]:[t[e]];(r=n[e]).push.apply(r,l(o))}})),n}_(S,"propTypes",{defaultValue:i["default"].string,options:i["default"].object,onChange:k,onOpen:k,onClose:k,onMonthChange:k,onYearChange:k,onReady:k,onValueUpdate:k,onDayCreate:k,onCreate:C,onDestroy:C,value:i["default"].oneOfType([i["default"].string,i["default"].array,i["default"].object,i["default"].number]),children:i["default"].node,className:i["default"].string,render:i["default"].func}),_(S,"defaultProps",{options:{}});var P=S;t.Z=P},7914:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,a["default"].createElement("div",{className:this.props.className,style:t},this.renderStyles(),a["default"].createElement("input",r({},o,{ref:this.inputRef})),a["default"].createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?a["default"].createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}(i.Component);h.propTypes={className:s["default"].string,defaultValue:s["default"].any,extraWidth:s["default"].oneOfType([s["default"].number,s["default"].string]),id:s["default"].string,injectStyles:s["default"].bool,inputClassName:s["default"].string,inputRef:s["default"].func,inputStyle:s["default"].object,minWidth:s["default"].oneOfType([s["default"].number,s["default"].string]),onAutosize:s["default"].func,onChange:s["default"].func,placeholder:s["default"].string,placeholderIsMinWidth:s["default"].bool,style:s["default"].object,value:s["default"].any},h.defaultProps={minWidth:1,injectStyles:!0},t.Z=h},9322:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(3288),i=(r=o)&&r.__esModule?r:{"default":r};t["default"]=i["default"],e.exports=t["default"]},3203:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t["default"]={activeTrack:"input-range__track input-range__track--active",disabledInputRange:"input-range input-range--disabled",inputRange:"input-range",labelContainer:"input-range__label-container",maxLabel:"input-range__label input-range__label--max",minLabel:"input-range__label input-range__label--min",slider:"input-range__slider",sliderContainer:"input-range__slider-container",track:"input-range__track input-range__track--background",valueLabel:"input-range__label input-range__label--value"},e.exports=t["default"]},3288:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=undefined;var r,o=function(){function e(e,t){for(var n=0;n=this.props.step||(0,m.length)(e.max,t.max)>=this.props.step}},{key:"isMultiValue",value:function(){return(0,m.isObject)(this.props.value)}},{key:"isWithinRange",value:function(e){return this.isMultiValue()?e.min>=this.props.minValue&&e.max<=this.props.maxValue&&this.props.allowSameValues?e.min<=e.max:e.min=this.props.minValue&&e.max<=this.props.maxValue}},{key:"shouldUpdate",value:function(e){return this.isWithinRange(e)&&this.hasStepDifference(e)}},{key:"updatePosition",value:function(e,t){var n=u.getValueFromProps(this.props,this.isMultiValue()),r=u.getPositionsFromValues(n,this.props.minValue,this.props.maxValue,this.getTrackClientRect());r[e]=t,this.lastKeyMoved=e,this.updatePositions(r)}},{key:"updatePositions",value:function(e){var t={min:u.getValueFromPosition(e.min,this.props.minValue,this.props.maxValue,this.getTrackClientRect()),max:u.getValueFromPosition(e.max,this.props.minValue,this.props.maxValue,this.getTrackClientRect())},n={min:u.getStepValueFromValue(t.min,this.props.step),max:u.getStepValueFromValue(t.max,this.props.step)};this.updateValues(n)}},{key:"updateValue",value:function(e,t){var n=u.getValueFromProps(this.props,this.isMultiValue());n[e]=t,this.updateValues(n)}},{key:"updateValues",value:function(e){this.shouldUpdate(e)&&this.props.onChange(this.isMultiValue()?e:e.max)}},{key:"incrementValue",value:function(e){var t=u.getValueFromProps(this.props,this.isMultiValue())[e]+this.props.step;this.updateValue(e,t)}},{key:"decrementValue",value:function(e){var t=u.getValueFromProps(this.props,this.isMultiValue())[e]-this.props.step;this.updateValue(e,t)}},{key:"addDocumentMouseUpListener",value:function(){this.removeDocumentMouseUpListener(),this.node.ownerDocument.addEventListener("mouseup",this.handleMouseUp)}},{key:"addDocumentTouchEndListener",value:function(){this.removeDocumentTouchEndListener(),this.node.ownerDocument.addEventListener("touchend",this.handleTouchEnd)}},{key:"removeDocumentMouseUpListener",value:function(){this.node.ownerDocument.removeEventListener("mouseup",this.handleMouseUp)}},{key:"removeDocumentTouchEndListener",value:function(){this.node.ownerDocument.removeEventListener("touchend",this.handleTouchEnd)}},{key:"handleSliderDrag",value:function(e,t){var n=this;if(!this.props.disabled){var r=u.getPositionFromEvent(e,this.getTrackClientRect());this.isSliderDragging=!0,requestAnimationFrame((function(){return n.updatePosition(t,r)}))}}},{key:"handleTrackDrag",value:function(e,t){if(!this.props.disabled&&this.props.draggableTrack&&!this.isSliderDragging){var n=this.props,r=n.maxValue,o=n.minValue,i=n.value,a=i.max,s=i.min,l=u.getPositionFromEvent(e,this.getTrackClientRect()),c=u.getValueFromPosition(l,o,r,this.getTrackClientRect()),f=u.getStepValueFromValue(c,this.props.step),d=u.getPositionFromEvent(t,this.getTrackClientRect()),p=u.getValueFromPosition(d,o,r,this.getTrackClientRect()),h=u.getStepValueFromValue(p,this.props.step)-f,m={min:s-h,max:a-h};this.updateValues(m)}}},{key:"handleSliderKeyDown",value:function(e,t){if(!this.props.disabled)switch(e.keyCode){case y.LEFT_ARROW:case y.DOWN_ARROW:e.preventDefault(),this.decrementValue(t);break;case y.RIGHT_ARROW:case y.UP_ARROW:e.preventDefault(),this.incrementValue(t)}}},{key:"handleTrackMouseDown",value:function(e,t){if(!this.props.disabled){var n=this.props,r=n.maxValue,o=n.minValue,i=n.value,a=i.max,s=i.min;e.preventDefault();var l=u.getValueFromPosition(t,o,r,this.getTrackClientRect()),c=u.getStepValueFromValue(l,this.props.step);(!this.props.draggableTrack||c>a||c=t)return new Error('"minValue" must be smaller than "maxValue"')};var r=n(8302);e.exports=t["default"]},2737:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=undefined;var r,o=function(){function e(e,t){for(var n=0;nn))return new Error('"'+t+'" must be in between "minValue" and "maxValue"');if((0,r.isObject)(i)&&(i.minn||i.maxn))return new Error('"'+t+'" must be in between "minValue" and "maxValue"')};var r=n(8302);e.exports=t["default"]},3232:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0?o:0),n=o,t=h(t),e.slice(n,n+t.length)==t}}).call(this,n(3))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(t){var n,r=/^\[object .+?Constructor\]$/,o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,a=o||i||Function("return this")(),s=Array.prototype,u=Function.prototype,l=Object.prototype,c=a["__core-js_shared__"],f=(n=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",d=u.toString,p=l.hasOwnProperty,h=l.toString,m=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=s.splice,g=E(a,"Map"),v=E(Object,"create");function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},w.prototype.set=function(e,t){var n=this.__data__,r=_(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},O.prototype.clear=function(){this.__data__={hash:new b,map:new(g||w),string:new b}},O.prototype["delete"]=function(e){return k(this,e)["delete"](e)},O.prototype.get=function(e){return k(this,e).get(e)},O.prototype.has=function(e){return k(this,e).has(e)},O.prototype.set=function(e,t){return k(this,e).set(e,t),this},C.Cache=O,e.exports=C}).call(this,n(3))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,d=Math.min,p=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=o.test(e);return s||i.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,a,s,u,l=0,c=!1,y=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,i=o;return r=o=void 0,l=t,a=e.apply(i,n)}function b(e){return l=e,s=setTimeout(O,t),c?v(e):a}function w(e){var n=e-u;return void 0===u||n>=t||n<0||y&&e-l>=i}function O(){var e=p();if(w(e))return _(e);s=setTimeout(O,function(e){var n=t-(e-u);return y?d(n,i-(e-l)):n}(e))}function _(e){return s=void 0,g&&r?v(e):(r=o=void 0,a)}function x(){var e=p(),n=w(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return b(u);if(y)return s=setTimeout(O,t),v(u)}return void 0===s&&(s=setTimeout(O,t)),a}return t=m(t)||0,h(n)&&(c=!!n.leading,i=(y="maxWait"in n)?f(m(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),x.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=o=s=void 0},x.flush=function(){return void 0===s?a:_(p())},x}}).call(this,n(3))},function(e,t,n){(function(e,n){var r="[object Arguments]",o="[object Map]",i="[object Object]",a="[object Set]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,h={};h["[object Float32Array]"]=h["[object Float64Array]"]=h["[object Int8Array]"]=h["[object Int16Array]"]=h["[object Int32Array]"]=h["[object Uint8Array]"]=h["[object Uint8ClampedArray]"]=h["[object Uint16Array]"]=h["[object Uint32Array]"]=!0,h[r]=h["[object Array]"]=h["[object ArrayBuffer]"]=h["[object Boolean]"]=h["[object DataView]"]=h["[object Date]"]=h["[object Error]"]=h["[object Function]"]=h[o]=h["[object Number]"]=h[i]=h["[object RegExp]"]=h[a]=h["[object String]"]=h["[object WeakMap]"]=!1;var m="object"==typeof e&&e&&e.Object===Object&&e,y="object"==typeof self&&self&&self.Object===Object&&self,g=m||y||Function("return this")(),v=t&&!t.nodeType&&t,b=v&&"object"==typeof n&&n&&!n.nodeType&&n,w=b&&b.exports===v&&m.process,O=function(){try{return w&&w.binding("util")}catch(e){}}(),_=O&&O.isTypedArray;function x(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o-1},se.prototype.set=function(e,t){var n=this.__data__,r=fe(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ue.prototype.clear=function(){this.__data__={hash:new ae,map:new(Y||se),string:new ae}},ue.prototype["delete"]=function(e){return Oe(this,e)["delete"](e)},ue.prototype.get=function(e){return Oe(this,e).get(e)},ue.prototype.has=function(e){return Oe(this,e).has(e)},ue.prototype.set=function(e,t){return Oe(this,e).set(e,t),this},le.prototype.add=le.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},le.prototype.has=function(e){return this.__data__.has(e)},ce.prototype.clear=function(){this.__data__=new se},ce.prototype["delete"]=function(e){return this.__data__["delete"](e)},ce.prototype.get=function(e){return this.__data__.get(e)},ce.prototype.has=function(e){return this.__data__.has(e)},ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof se){var r=n.__data__;if(!Y||r.length<199)return r.push([e,t]),this;n=this.__data__=new ue(r)}return n.set(e,t),this};var de,pe=(de=function(e,t){return e&&he(e,t,Ue)},function(e,t){if(null==e)return e;if(!Le(e))return de(e,t);for(var n=e.length,r=-1,o=Object(e);++rs))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var c=-1,f=!0,d=1&o?new le:void 0;for(i.set(e,t),i.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function qe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Fe(e){return!!e&&"object"==typeof e}function Ve(e){return"symbol"==typeof e||Fe(e)&&"[object Symbol]"==F.call(e)}var Be=_?function(e){return function(t){return e(t)}}(_):function(e){return Fe(e)&&Re(e.length)&&!!h[F.call(e)]};function Ue(e){return Le(e)?function(e,t){var n=Me(e)||Ne(e)?function(e,t){for(var n=-1,r=Array(e);++n>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))})},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function i(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0?(i.mainCode=!0,u||"Array"===t.constructor.name&&t.includes(e[2])?(i.hasAreaCodes=!0,[i].concat(s)):(l=l.concat(s),[i])):[i]})))),l]}function T(e,t,n,r){if(null!==n){var o=Object.keys(n),i=Object.values(n);o.forEach((function(n,o){if(r)return e.push([n,i[o]]);var a=e.findIndex((function(e){return e[0]===n}));if(-1===a){var s=[n];s[t]=i[o],e.push(s)}else e[a][t]=i[o]}))}}function N(e,t){return 0===t.length?e:e.map((function(e){var n=t.findIndex((function(t){return t[0]===e[2]}));if(-1===n)return e;var r=t[n];return r[1]&&(e[4]=r[1]),r[3]&&(e[5]=r[3]),r[2]&&(e[6]=r[2]),e}))}var M=function I(e,t,n,r,o,a,s,l,c,f,d,p,h,m){u(this,I),this.filterRegions=function(e,t){if("string"==typeof e){var n=e;return t.filter((function(e){return e.regions.some((function(e){return e===n}))}))}return t.filter((function(t){return e.map((function(e){return t.regions.some((function(t){return t===e}))})).some((function(e){return e}))}))},this.sortTerritories=function(e,t){var n=[].concat(i(e),i(t));return n.sort((function(e,t){return e.namet.name?1:0})),n},this.getFilteredCountryList=function(e,t,n){return 0===e.length?t:n?e.map((function(e){var n=t.find((function(t){return t.iso2===e}));if(n)return n})).filter((function(e){return e})):t.filter((function(t){return e.some((function(e){return e===t.iso2}))}))},this.localizeCountries=function(e,t,n){for(var r=0;rt.localName?1:0})),e},this.getCustomAreas=function(e,t){for(var n=[],r=0;rt.dialCode.length)return n;if(n.dialCode.length===t.dialCode.length&&n.priority="0"&&e.indexOf(0)<="9"?r.find((function(t){return t.dialCode==+e})):r.find((function(t){return t.iso2==e})))&&t.dialCode&&n.setState({selectedCountry:t,formattedNumber:n.props.disableCountryCode?"":n.formatNumber(t.dialCode,t)})},n.scrollTo=function(e,t){if(e){var r=n.dropdownRef;if(r&&document.body){var o=r.offsetHeight,i=r.getBoundingClientRect().top+document.body.scrollTop,a=i+o,s=e,u=s.getBoundingClientRect(),l=s.offsetHeight,c=u.top+document.body.scrollTop,f=c+l,d=c-i+r.scrollTop,p=o/2-l/2;if(n.props.enableSearch?ca){t&&(d+=p);var h=o-l;r.scrollTop=d-h}}}},n.scrollToTop=function(){var e=n.dropdownRef;e&&document.body&&(e.scrollTop=0)},n.formatNumber=function(e,t){if(!t)return e;var r,i=t.format,u=n.props,l=u.disableCountryCode,c=u.enableAreaCodeStretch,f=u.enableLongNumbers,d=u.autoFormat;if(l?((r=i.split(" ")).shift(),r=r.join(" ")):c&&t.isAreaCode?((r=i.split(" "))[1]=r[1].replace(/\.+/,"".padEnd(t.areaCodeLength,".")),r=r.join(" ")):r=i,!e||0===e.length)return l?"":n.props.prefix;if(e&&e.length<2||!r||!d)return l?e:n.props.prefix+e;var p,h=_()(r,(function(e,t){if(0===e.remainingText.length)return e;if("."!==t)return{formattedText:e.formattedText+t,remainingText:e.remainingText};var n,r=a(n=e.remainingText)||o(n)||s(),i=r[0],u=r.slice(1);return{formattedText:e.formattedText+i,remainingText:u}}),{formattedText:"",remainingText:e.split("")});return(p=f?h.formattedText+h.remainingText.join(""):h.formattedText).includes("(")&&!p.includes(")")&&(p+=")"),p},n.cursorToEnd=function(){var e=n.numberInputRef;if(document.activeElement===e){e.focus();var t=e.value.length;")"===e.value.charAt(t-1)&&(t-=1),e.setSelectionRange(t,t)}},n.getElement=function(e){return n["flag_no_".concat(e)]},n.getCountryData=function(){return n.state.selectedCountry?{name:n.state.selectedCountry.name||"",dialCode:n.state.selectedCountry.dialCode||"",countryCode:n.state.selectedCountry.iso2||"",format:n.state.selectedCountry.format||""}:{}},n.handleFlagDropdownClick=function(e){if(e.preventDefault(),n.state.showDropdown||!n.props.disabled){var t=n.state,r=t.preferredCountries,o=t.onlyCountries,i=t.selectedCountry,a=n.concatPreferredCountries(r,o).findIndex((function(e){return e.dialCode===i.dialCode&&e.iso2===i.iso2}));n.setState({showDropdown:!n.state.showDropdown,highlightCountryIndex:a},(function(){n.state.showDropdown&&n.scrollTo(n.getElement(n.state.highlightCountryIndex))}))}},n.handleInput=function(e){var t=e.target.value,r=n.props,o=r.prefix,i=r.onChange,a=n.props.disableCountryCode?"":o,s=n.state.selectedCountry,u=n.state.freezeSelection;if(!n.props.countryCodeEditable){var l=o+(s.hasAreaCodes?n.state.onlyCountries.find((function(e){return e.iso2===s.iso2&&e.mainCode})).dialCode:s.dialCode);if(t.slice(0,l.length)!==l)return}if(t===o)return i&&i("",n.getCountryData(),e,""),n.setState({formattedNumber:""});if(t.replace(/\D/g,"").length>15){if(!1===n.props.enableLongNumbers)return;if("number"==typeof n.props.enableLongNumbers&&t.replace(/\D/g,"").length>n.props.enableLongNumbers)return}if(t!==n.state.formattedNumber){e.preventDefault?e.preventDefault():e.returnValue=!1;var c=n.props.country,f=n.state,d=f.onlyCountries,p=f.selectedCountry,h=f.hiddenAreaCodes;if(i&&e.persist(),t.length>0){var m=t.replace(/\D/g,"");(!n.state.freezeSelection||p&&p.dialCode.length>m.length)&&(s=n.props.disableCountryGuess?p:n.guessSelectedCountry(m.substring(0,6),c,d,h)||p,u=!1),a=n.formatNumber(m,s),s=s.dialCode?s:p}var y=e.target.selectionStart,g=e.target.selectionStart,v=n.state.formattedNumber,b=a.length-v.length;n.setState({formattedNumber:a,freezeSelection:u,selectedCountry:s},(function(){b>0&&(g-=b),")"==a.charAt(a.length-1)?n.numberInputRef.setSelectionRange(a.length-1,a.length-1):g>0&&v.length>=a.length?n.numberInputRef.setSelectionRange(g,g):y1?i.replace(r.dialCode,o.dialCode):o.dialCode,s=n.formatNumber(a.replace(/\D/g,""),o);n.setState({showDropdown:!1,selectedCountry:o,freezeSelection:!0,formattedNumber:s,searchValue:""},(function(){n.cursorToEnd(),n.props.onChange&&n.props.onChange(s.replace(/[^0-9]+/g,""),n.getCountryData(),t,s)}))}},n.handleInputFocus=function(e){n.numberInputRef&&n.numberInputRef.value===n.props.prefix&&n.state.selectedCountry&&!n.props.disableCountryCode&&n.setState({formattedNumber:n.props.prefix+n.state.selectedCountry.dialCode},(function(){n.props.jumpCursorToEnd&&setTimeout(n.cursorToEnd,0)})),n.setState({placeholder:""}),n.props.onFocus&&n.props.onFocus(e,n.getCountryData()),n.props.jumpCursorToEnd&&setTimeout(n.cursorToEnd,0)},n.handleInputBlur=function(e){e.target.value||n.setState({placeholder:n.props.placeholder}),n.props.onBlur&&n.props.onBlur(e,n.getCountryData())},n.handleInputCopy=function(e){if(n.props.copyNumbersOnly){var t=window.getSelection().toString().replace(/[^0-9]+/g,"");e.clipboardData.setData("text/plain",t),e.preventDefault()}},n.getHighlightCountryIndex=function(e){var t=n.state.highlightCountryIndex+e;return t<0||t>=n.state.onlyCountries.length+n.state.preferredCountries.length?t-e:n.props.enableSearch&&t>n.getSearchFilteredCountries().length?0:t},n.searchCountry=function(){var e=n.getProbableCandidate(n.state.queryString)||n.state.onlyCountries[0],t=n.state.onlyCountries.findIndex((function(t){return t==e}))+n.state.preferredCountries.length;n.scrollTo(n.getElement(t),!0),n.setState({queryString:"",highlightCountryIndex:t})},n.handleKeydown=function(e){var t=n.props.keys,r=e.target.className;if(r.includes("selected-flag")&&e.which===t.ENTER&&!n.state.showDropdown)return n.handleFlagDropdownClick(e);if(r.includes("form-control")&&(e.which===t.ENTER||e.which===t.ESC))return e.target.blur();if(n.state.showDropdown&&!n.props.disabled&&(!r.includes("search-box")||e.which===t.UP||e.which===t.DOWN||e.which===t.ENTER||e.which===t.ESC&&""===e.target.value)){e.preventDefault?e.preventDefault():e.returnValue=!1;var o=function(e){n.setState({highlightCountryIndex:n.getHighlightCountryIndex(e)},(function(){n.scrollTo(n.getElement(n.state.highlightCountryIndex),!0)}))};switch(e.which){case t.DOWN:o(1);break;case t.UP:o(-1);break;case t.ENTER:n.props.enableSearch?n.handleFlagItemClick(n.getSearchFilteredCountries()[n.state.highlightCountryIndex]||n.getSearchFilteredCountries()[0],e):n.handleFlagItemClick([].concat(i(n.state.preferredCountries),i(n.state.onlyCountries))[n.state.highlightCountryIndex],e);break;case t.ESC:case t.TAB:n.setState({showDropdown:!1},n.cursorToEnd);break;default:(e.which>=t.A&&e.which<=t.Z||e.which===t.SPACE)&&n.setState({queryString:n.state.queryString+String.fromCharCode(e.which)},n.state.debouncedQueryStingSearcher)}}},n.handleInputKeyDown=function(e){var t=n.props,r=t.keys,o=t.onEnterKeyPress,i=t.onKeyDown;e.which===r.ENTER&&o&&o(e),i&&i(e)},n.handleClickOutside=function(e){n.dropdownRef&&!n.dropdownContainerRef.contains(e.target)&&n.state.showDropdown&&n.setState({showDropdown:!1})},n.handleSearchChange=function(e){var t=e.currentTarget.value,r=n.state,o=r.preferredCountries,i=r.selectedCountry,a=0;if(""===t&&i){var s=n.state.onlyCountries;a=n.concatPreferredCountries(o,s).findIndex((function(e){return e==i})),setTimeout((function(){return n.scrollTo(n.getElement(a))}),100)}n.setState({searchValue:t,highlightCountryIndex:a})},n.concatPreferredCountries=function(e,t){return e.length>0?i(new Set(e.concat(t))):t},n.getDropdownCountryName=function(e){return e.localName||e.name},n.getSearchFilteredCountries=function(){var e=n.state,t=e.preferredCountries,r=e.onlyCountries,o=e.searchValue,a=n.props.enableSearch,s=n.concatPreferredCountries(t,r),u=o.trim().toLowerCase().replace("+","");if(a&&u){if(/^\d+$/.test(u))return s.filter((function(e){var t=e.dialCode;return["".concat(t)].some((function(e){return e.toLowerCase().includes(u)}))}));var l=s.filter((function(e){var t=e.iso2;return["".concat(t)].some((function(e){return e.toLowerCase().includes(u)}))})),c=s.filter((function(e){var t=e.name,n=e.localName;return e.iso2,["".concat(t),"".concat(n||"")].some((function(e){return e.toLowerCase().includes(u)}))}));return n.scrollToTop(),i(new Set([].concat(l,c)))}return s},n.getCountryDropdownList=function(){var e=n.state,t=e.preferredCountries,o=e.highlightCountryIndex,i=e.showDropdown,a=e.searchValue,s=n.props,u=s.disableDropdown,l=s.prefix,c=n.props,f=c.enableSearch,d=c.searchNotFound,p=c.disableSearchIcon,h=c.searchClass,m=c.searchStyle,g=c.searchPlaceholder,v=c.autocompleteSearch,b=n.getSearchFilteredCountries().map((function(e,t){var r=o===t,i=C()({country:!0,preferred:"us"===e.iso2||"gb"===e.iso2,active:"us"===e.iso2,highlight:r}),a="flag ".concat(e.iso2);return y.a.createElement("li",Object.assign({ref:function(e){return n["flag_no_".concat(t)]=e},key:"flag_no_".concat(t),"data-flag-key":"flag_no_".concat(t),className:i,"data-dial-code":"1",tabIndex:u?"-1":"0","data-country-code":e.iso2,onClick:function(t){return n.handleFlagItemClick(e,t)},role:"option"},r?{"aria-selected":!0}:{}),y.a.createElement("div",{className:a}),y.a.createElement("span",{className:"country-name"},n.getDropdownCountryName(e)),y.a.createElement("span",{className:"dial-code"},e.format?n.formatNumber(e.dialCode,e):l+e.dialCode))})),w=y.a.createElement("li",{key:"dashes",className:"divider"});t.length>0&&(!f||f&&!a.trim())&&b.splice(t.length,0,w);var O=C()(r({"country-list":!0,hide:!i},n.props.dropdownClass,!0));return y.a.createElement("ul",{ref:function(e){return!f&&e&&e.focus(),n.dropdownRef=e},className:O,style:n.props.dropdownStyle,role:"listbox",tabIndex:"0"},f&&y.a.createElement("li",{className:C()(r({search:!0},h,h))},!p&&y.a.createElement("span",{className:C()(r({"search-emoji":!0},"".concat(h,"-emoji"),h)),role:"img","aria-label":"Magnifying glass"},"🔎"),y.a.createElement("input",{className:C()(r({"search-box":!0},"".concat(h,"-box"),h)),style:m,type:"search",placeholder:g,autoFocus:!0,autoComplete:v?"on":"off",value:a,onChange:n.handleSearchChange})),b.length>0?b:y.a.createElement("li",{className:"no-entries-message"},y.a.createElement("span",null,d)))};var l,c=new M(e.enableAreaCodes,e.enableTerritories,e.regions,e.onlyCountries,e.preferredCountries,e.excludeCountries,e.preserveOrder,e.masks,e.priority,e.areaCodes,e.localization,e.prefix,e.defaultMask,e.alwaysDefaultMask),h=c.onlyCountries,m=c.preferredCountries,g=c.hiddenAreaCodes,b=e.value?e.value.replace(/\D/g,""):"";l=e.disableInitialCountryGuess?0:b.length>1?n.guessSelectedCountry(b.substring(0,6),e.country,h,g)||0:e.country&&h.find((function(t){return t.iso2==e.country}))||0;var O,x=b.length<2&&l&&!k()(b,l.dialCode)?l.dialCode:"";O=""===b&&0===l?"":n.formatNumber((e.disableCountryCode?"":x)+b,l.name?l:void 0);var E=h.findIndex((function(e){return e==l}));return n.state={showDropdown:e.showDropdown,formattedNumber:O,onlyCountries:h,preferredCountries:m,hiddenAreaCodes:g,selectedCountry:l,highlightCountryIndex:E,queryString:"",freezeSelection:!1,debouncedQueryStingSearcher:v()(n.searchCountry,250),searchValue:""},n}var n,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),n=t,(c=[{key:"componentDidMount",value:function(){document.addEventListener&&this.props.enableClickOutside&&document.addEventListener("mousedown",this.handleClickOutside),this.props.onMount&&this.props.onMount(this.state.formattedNumber.replace(/[^0-9]+/g,""),this.getCountryData(),this.state.formattedNumber)}},{key:"componentWillUnmount",value:function(){document.removeEventListener&&this.props.enableClickOutside&&document.removeEventListener("mousedown",this.handleClickOutside)}},{key:"componentDidUpdate",value:function(e,t,n){e.country!==this.props.country?this.updateCountry(this.props.country):e.value!==this.props.value&&this.updateFormattedNumber(this.props.value)}},{key:"updateFormattedNumber",value:function(e){if(null===e)return this.setState({selectedCountry:0,formattedNumber:""});var t=this.state,n=t.onlyCountries,r=t.selectedCountry,o=t.hiddenAreaCodes,i=this.props,a=i.country,s=i.prefix;if(""===e)return this.setState({selectedCountry:r,formattedNumber:""});var u,l,c=e.replace(/\D/g,"");if(r&&k()(e,s+r.dialCode))l=this.formatNumber(c,r),this.setState({formattedNumber:l});else{var f=(u=this.props.disableCountryGuess?r:this.guessSelectedCountry(c.substring(0,6),a,n,o)||r)&&k()(c,s+u.dialCode)?u.dialCode:"";l=this.formatNumber((this.props.disableCountryCode?"":f)+c,u||void 0),this.setState({selectedCountry:u,formattedNumber:l})}}},{key:"render",value:function(){var e,t,n,o=this,i=this.state,a=i.onlyCountries,s=i.selectedCountry,u=i.showDropdown,l=i.formattedNumber,c=i.hiddenAreaCodes,f=this.props,d=f.disableDropdown,p=f.renderStringAsFlag,h=f.isValid,m=f.defaultErrorMessage,g=f.specialLabel;if("boolean"==typeof h)t=h;else{var v=h(l.replace(/\D/g,""),s,a,c);"boolean"==typeof v?!1===(t=v)&&(n=m):(t=!1,n=v)}var b=C()((r(e={},this.props.containerClass,!0),r(e,"react-tel-input",!0),e)),w=C()({arrow:!0,up:u}),O=C()(r({"form-control":!0,"invalid-number":!t,open:u},this.props.inputClass,!0)),_=C()({"selected-flag":!0,open:u}),x=C()(r({"flag-dropdown":!0,"invalid-number":!t,open:u},this.props.buttonClass,!0)),k="flag ".concat(s&&s.iso2);return y.a.createElement("div",{className:"".concat(b," ").concat(this.props.className),style:this.props.style||this.props.containerStyle,onKeyDown:this.handleKeydown},g&&y.a.createElement("div",{className:"special-label"},g),n&&y.a.createElement("div",{className:"invalid-number-message"},n),y.a.createElement("input",Object.assign({className:O,style:this.props.inputStyle,onChange:this.handleInput,onClick:this.handleInputClick,onDoubleClick:this.handleDoubleClick,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCopy:this.handleInputCopy,value:l,onKeyDown:this.handleInputKeyDown,placeholder:this.props.placeholder,disabled:this.props.disabled,type:"tel"},this.props.inputProps,{ref:function(e){o.numberInputRef=e,"function"==typeof o.props.inputProps.ref?o.props.inputProps.ref(e):"object"==typeof o.props.inputProps.ref&&(o.props.inputProps.ref.current=e)}})),y.a.createElement("div",{className:x,style:this.props.buttonStyle,ref:function(e){return o.dropdownContainerRef=e}},p?y.a.createElement("div",{className:_},p):y.a.createElement("div",{onClick:d?void 0:this.handleFlagDropdownClick,className:_,title:s?"".concat(s.localName||s.name,": + ").concat(s.dialCode):"",tabIndex:d?"-1":"0",role:"button","aria-haspopup":"listbox","aria-expanded":!!u||void 0},y.a.createElement("div",{className:k},!d&&y.a.createElement("div",{className:w}))),u&&this.getCountryDropdownList()))}}])&&l(n.prototype,c),t}(y.a.Component);L.defaultProps={country:"",value:"",onlyCountries:[],preferredCountries:[],excludeCountries:[],placeholder:"1 (702) 123-4567",searchPlaceholder:"search",searchNotFound:"No entries to show",flagsImagePath:"./flags.png",disabled:!1,containerStyle:{},inputStyle:{},buttonStyle:{},dropdownStyle:{},searchStyle:{},containerClass:"",inputClass:"",buttonClass:"",dropdownClass:"",searchClass:"",className:"",autoFormat:!0,enableAreaCodes:!1,enableTerritories:!1,disableCountryCode:!1,disableDropdown:!1,enableLongNumbers:!1,countryCodeEditable:!0,enableSearch:!1,disableSearchIcon:!1,disableInitialCountryGuess:!1,disableCountryGuess:!1,regions:"",inputProps:{},localization:{},masks:null,priority:null,areaCodes:null,preserveOrder:[],defaultMask:"... ... ... ... ..",alwaysDefaultMask:!1,prefix:"+",copyNumbersOnly:!0,renderStringAsFlag:"",autocompleteSearch:!1,jumpCursorToEnd:!0,enableAreaCodeStretch:!1,enableClickOutside:!0,showDropdown:!1,isValid:!0,defaultErrorMessage:"",specialLabel:"Phone",onEnterKeyPress:null,keys:{UP:38,DOWN:40,RIGHT:39,LEFT:37,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9}},t["default"]=L}])},1167:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1)throw new Error("The Quill editing area can only be composed of a single React element.");if(u["default"].Children.count(e.children)&&"textarea"===(null===(t=u["default"].Children.only(e.children))||void 0===t?void 0:t.type))throw new Error("Quill does not support editing on a