/*!
 * Chart.js v2.9.4
 * https://www.chartjs.org
 * (c) 2020 Chart.js Contributors
 * Released under the MIT License
 */
function scrolTo(e){$("html, body").animate({scrollTop:$(e).offset().top},1e3)}function loadSwipper(){setTimeout(function(){new Swiper(".swiper",{loop:!1,slidesPerView:3,spaceBetween:20,reverseDirection:"rtl"===$("html").attr("dir"),breakpoints:{1:{slidesPerView:1},640:{slidesPerView:2},1024:{slidesPerView:3}},pagination:{el:".swiper-pagination"},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},scrollbar:{el:".swiper-scrollbar"}})},1e3)}function auto_grow(e){e.style.height="5px",e.style.height=e.scrollHeight+"px"}!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(function(){try{return require("moment")}catch(e){}}()):"function"==typeof define&&define.amd?define(["require"],function(e){return t(function(){try{return e("moment")}catch(e){}}())}):(e=e||self).Chart=t(e.moment)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(e,t){return e(t={exports:{}}),t.exports}(function(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[t[r]]=r);var i=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in i)if(i.hasOwnProperty(o)){if(!("channels"in i[o]))throw new Error("missing channels property: "+o);if(!("labels"in i[o]))throw new Error("missing channel labels property: "+o);if(i[o].labels.length!==i[o].channels)throw new Error("channel and label counts mismatch: "+o);var a=i[o].channels,s=i[o].labels;delete i[o].channels,delete i[o].labels,Object.defineProperty(i[o],"channels",{value:a}),Object.defineProperty(i[o],"labels",{value:s})}i.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a;return s===a?t=0:r===s?t=(i-o)/l:i===s?t=2+(o-r)/l:o===s&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+s)/2,[t,100*(s===a?0:n<=.5?l/(s+a):l/(2-s-a)),100*n]},i.rgb.hsv=function(e){var t,n,r,i,o,a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),d=function(e){return(c-e)/6/u+.5};return 0===u?i=o=0:(o=u/c,t=d(a),n=d(s),r=d(l),a===c?i=r-n:s===c?i=1/3+t-r:l===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},i.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[i.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},i.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},i.rgb.keyword=function(e){var r=n[e];if(r)return r;var i,o,a,s=1/0;for(var l in t)if(t.hasOwnProperty(l)){var c=(o=e,a=t[l],Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));c<s&&(s=c,i=l)}return i},i.keyword.rgb=function(e){return t[e]},i.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},i.rgb.lab=function(e){var t=i.rgb.xyz(e),n=t[0],r=t[1],o=t[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},i.hsl.rgb=function(e){var t,n,r,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[o=255*l,o,o];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(r=a+1/3*-(c-1))<0&&r++,r>1&&r--,o=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[c]=255*o;return i},i.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=o<=1?o:2-o,[t,100*(0===r?2*i/(o+i):2*n/(r+n)),(r+n)/2*100]},i.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},i.hsv.hsl=function(e){var t,n,r,i=e[0],o=e[1]/100,a=e[2]/100,s=Math.max(a,.01);return r=(2-o)*a,n=o*s,[i,100*(n=(n/=(t=(2-o)*s)<=1?t:2-t)||0),100*(r/=2)]},i.hwb.rgb=function(e){var t,n,r,i,o,a,s,l=e[0]/360,c=e[1]/100,u=e[2]/100,d=c+u;switch(d>1&&(c/=d,u/=d),r=6*l-(t=Math.floor(6*l)),0!=(1&t)&&(r=1-r),i=c+r*((n=1-u)-c),t){default:case 6:case 0:o=n,a=i,s=c;break;case 1:o=i,a=n,s=c;break;case 2:o=c,a=n,s=i;break;case 3:o=c,a=i,s=n;break;case 4:o=i,a=c,s=n;break;case 5:o=n,a=c,s=i}return[255*o,255*a,255*s]},i.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},i.xyz.rgb=function(e){var t,n,r,i=e[0]/100,o=e[1]/100,a=e[2]/100;return n=-.9689*i+1.8758*o+.0415*a,r=.0557*i+-.204*o+1.057*a,t=(t=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},i.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},i.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var o=Math.pow(n,3),a=Math.pow(t,3),s=Math.pow(r,3);return n=o>.008856?o:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},i.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},i.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},i.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],o=1 in arguments?arguments[1]:i.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===o&&(a+=60),a},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},i.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},i.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},i.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map(function(e){return e+e}).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},i.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,o=Math.max(Math.max(n,r),i),a=Math.min(Math.min(n,r),i),s=o-a;return t=s<=0?0:o===n?(r-i)/s%6:o===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},i.hsl.hcg=function(e){var t,n=e[1]/100,r=e[2]/100,i=0;return(t=r<.5?2*n*r:2*n*(1-r))<1&&(i=(r-.5*t)/(1-t)),[e[0],100*t,100*i]},i.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},i.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,o=[0,0,0],a=t%1*6,s=a%1,l=1-s;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[255*(n*o[0]+i),255*(n*o[1]+i),255*(n*o[2]+i)]},i.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},i.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},i.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},i.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=i.gray.hsv=function(e){return[0,0,e[0]]},i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});function r(e){var t=function(){for(var e={},t=Object.keys(n),r=t.length,i=0;i<r;i++)e[t[i]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;)for(var i=r.pop(),o=Object.keys(n[i]),a=o.length,s=0;s<a;s++){var l=o[s],c=t[l];-1===c.distance&&(c.distance=t[i].distance+1,c.parent=i,r.unshift(l))}return t}function i(e,t){return function(n){return t(e(n))}}function o(e,t){for(var r=[t[e].parent,e],o=n[t[e].parent][e],a=t[e].parent;t[a].parent;)r.unshift(t[a].parent),o=i(n[t[a].parent][a],o),a=t[a].parent;return o.conversion=r,o}n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;var a={};Object.keys(n).forEach(function(e){a[e]={},Object.defineProperty(a[e],"channels",{value:n[e].channels}),Object.defineProperty(a[e],"labels",{value:n[e].labels});var t=function(e){for(var t=r(e),n={},i=Object.keys(t),a=i.length,s=0;s<a;s++){var l=i[s];null!==t[l].parent&&(n[l]=o(l,t))}return n}(e);Object.keys(t).forEach(function(n){var r=t[n];a[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),a[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)})});var s=a,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c={getRgba:u,getHsla:d,getRgb:function(e){var t=u(e);return t&&t.slice(0,3)},getHsl:function(e){var t=d(e);return t&&t.slice(0,3)},getHwb:h,getAlpha:function(e){var t=u(e);return t||(t=d(e))||(t=h(e))?t[3]:void 0},hexString:function(e,t){return t=void 0!==t&&3===e.length?t:e[3],"#"+v(e[0])+v(e[1])+v(e[2])+(t>=0&&t<1?v(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?f(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:f,percentString:function(e,t){return t<1||e[3]&&e[3]<1?p(e,t):"rgb("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%)"},percentaString:p,hslString:function(e,t){return t<1||e[3]&&e[3]<1?g(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:g,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return y[e.slice(0,3)]}};function u(e){if(e){var t=[0,0,0],n=1,r=e.match(/^#([a-fA-F0-9]{3,4})$/i),i="";if(r){i=(r=r[1])[3];for(var o=0;o<t.length;o++)t[o]=parseInt(r[o]+r[o],16);i&&(n=Math.round(parseInt(i+i,16)/255*100)/100)}else if(r=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(i=r[2],r=r[1],o=0;o<t.length;o++)t[o]=parseInt(r.slice(2*o,2*o+2),16);i&&(n=Math.round(parseInt(i,16)/255*100)/100)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<t.length;o++)t[o]=parseInt(r[o+1]);n=parseFloat(r[4])}else if(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<t.length;o++)t[o]=Math.round(2.55*parseFloat(r[o+1]));n=parseFloat(r[4])}else if(r=e.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(t=l[r[1]]))return}for(o=0;o<t.length;o++)t[o]=m(t[o],0,255);return n=n||0==n?m(n,0,1):1,t[3]=n,t}}function d(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[m(parseInt(t[1]),0,360),m(parseFloat(t[2]),0,100),m(parseFloat(t[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function h(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[m(parseInt(t[1]),0,360),m(parseFloat(t[2]),0,100),m(parseFloat(t[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function f(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function p(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function g(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function m(e,t,n){return Math.min(Math.max(t,e),n)}function v(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var y={};for(var b in l)y[l[b]]=b;var x=function(e){return e instanceof x?e:this instanceof x?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=c.getRgba(e))?this.setValues("rgb",t):(t=c.getHsla(e))?this.setValues("hsl",t):(t=c.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new x(e);var t};x.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return c.hexString(this.values.rgb)},rgbString:function(){return c.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return c.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return c.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return c.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return c.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return c.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return c.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,r=void 0===t?.5:t,i=2*r-1,o=this.alpha()-n.alpha(),a=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-a;return this.rgb(a*this.red()+s*n.red(),a*this.green()+s*n.green(),a*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new x,r=this.values,i=n.values;for(var o in r)r.hasOwnProperty(o)&&(e=r[o],"[object Array]"===(t={}.toString.call(e))?i[o]=e.slice(0):"[object Number]"===t?i[o]=e:console.error("unexpected color value:",e));return n}},x.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},x.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},x.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r<e.length;r++)n[e.charAt(r)]=t[e][r];return 1!==t.alpha&&(n.a=t.alpha),n},x.prototype.setValues=function(e,t){var n,r,i=this.values,o=this.spaces,a=this.maxes,l=1;if(this.valid=!0,"alpha"===e)l=t;else if(t.length)i[e]=t.slice(0,e.length),l=t[e.length];else if(void 0!==t[e.charAt(0)]){for(n=0;n<e.length;n++)i[e][n]=t[e.charAt(n)];l=t.a}else if(void 0!==t[o[e][0]]){var c=o[e];for(n=0;n<e.length;n++)i[e][n]=t[c[n]];l=t.alpha}if(i.alpha=Math.max(0,Math.min(1,void 0===l?i.alpha:l)),"alpha"===e)return!1;for(n=0;n<e.length;n++)r=Math.max(0,Math.min(a[e][n],i[e][n])),i[e][n]=Math.round(r);for(var u in o)u!==e&&(i[u]=s[e][u](i[e]));return!0},x.prototype.setSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},x.prototype.setChannel=function(e,t,n){var r=this.values[e];return void 0===n?r[t]:(n===r[t]||(r[t]=n,this.setValues(e,r)),this)},"undefined"!=typeof window&&(window.Color=x);var w=x;function _(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}var k,E={noop:function(){},uid:(k=0,function(){return k++}),isNullOrUndef:function(e){return null==e},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,n){return E.valueOrDefault(E.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)},each:function(e,t,n,r){var i,o,a;if(E.isArray(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<o;i++)t.call(n,e[i],i);else if(E.isObject(e))for(o=(a=Object.keys(e)).length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])},arrayEquals:function(e,t){var n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i instanceof Array&&o instanceof Array){if(!E.arrayEquals(i,o))return!1}else if(i!==o)return!1;return!0},clone:function(e){if(E.isArray(e))return e.map(E.clone);if(E.isObject(e)){for(var t=Object.create(e),n=Object.keys(e),r=n.length,i=0;i<r;++i)t[n[i]]=E.clone(e[n[i]]);return t}return e},_merger:function(e,t,n,r){if(_(e)){var i=t[e],o=n[e];E.isObject(i)&&E.isObject(o)?E.merge(i,o,r):t[e]=E.clone(o)}},_mergerIf:function(e,t,n){if(_(e)){var r=t[e],i=n[e];E.isObject(r)&&E.isObject(i)?E.mergeIf(r,i):t.hasOwnProperty(e)||(t[e]=E.clone(i))}},merge:function(e,t,n){var r,i,o,a,s,l=E.isArray(t)?t:[t],c=l.length;if(!E.isObject(e))return e;for(r=(n=n||{}).merger||E._merger,i=0;i<c;++i)if(t=l[i],E.isObject(t))for(s=0,a=(o=Object.keys(t)).length;s<a;++s)r(o[s],e,t,n);return e},mergeIf:function(e,t){return E.merge(e,t,{merger:E._mergerIf})},extend:Object.assign||function(e){return E.merge(e,[].slice.call(arguments,1),{merger:function(e,t,n){t[e]=n[e]}})},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=t.prototype,n.prototype=new r,n.extend=E.inherits,e&&E.extend(n.prototype,e),n.__super__=t.prototype,n},_deprecated:function(e,t,n,r){void 0!==t&&console.warn(e+': "'+n+'" is deprecated. Please use "'+r+'" instead')}},S=E;E.callCallback=E.callback,E.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},E.getValueOrDefault=E.valueOrDefault,E.getValueAtIndexOrDefault=E.valueAtIndexOrDefault;var O={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-O.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*O.easeInBounce(2*e):.5*O.easeOutBounce(2*e-1)+.5}},C={effects:O};S.easingEffects=O;var T=Math.PI,M=T/180,A=2*T,P=T/2,L=T/4,N=2*T/3,$={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,r,i,o){if(o){var a=Math.min(o,i/2,r/2),s=t+a,l=n+a,c=t+r-a,u=n+i-a;e.moveTo(t,l),s<c&&l<u?(e.arc(s,l,a,-T,-P),e.arc(c,l,a,-P,0),e.arc(c,u,a,0,P),e.arc(s,u,a,P,T)):s<c?(e.moveTo(s,n),e.arc(c,l,a,-P,P),e.arc(s,l,a,P,T+P)):l<u?(e.arc(s,l,a,-T,0),e.arc(s,u,a,0,T)):e.arc(s,l,a,-T,T),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,i)},drawPoint:function(e,t,n,r,i,o){var a,s,l,c,u,d=(o||0)*M;if(t&&"object"==typeof t&&("[object HTMLImageElement]"===(a=t.toString())||"[object HTMLCanvasElement]"===a))return e.save(),e.translate(r,i),e.rotate(d),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),void e.restore();if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(r,i,n,0,A),e.closePath();break;case"triangle":e.moveTo(r+Math.sin(d)*n,i-Math.cos(d)*n),d+=N,e.lineTo(r+Math.sin(d)*n,i-Math.cos(d)*n),d+=N,e.lineTo(r+Math.sin(d)*n,i-Math.cos(d)*n),e.closePath();break;case"rectRounded":c=n-(u=.516*n),s=Math.cos(d+L)*c,l=Math.sin(d+L)*c,e.arc(r-s,i-l,u,d-T,d-P),e.arc(r+l,i-s,u,d-P,d),e.arc(r+s,i+l,u,d,d+P),e.arc(r-l,i+s,u,d+P,d+T),e.closePath();break;case"rect":if(!o){c=Math.SQRT1_2*n,e.rect(r-c,i-c,2*c,2*c);break}d+=L;case"rectRot":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+l,i-s),e.lineTo(r+s,i+l),e.lineTo(r-l,i+s),e.closePath();break;case"crossRot":d+=L;case"cross":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+s,i+l),e.moveTo(r+l,i-s),e.lineTo(r-l,i+s);break;case"star":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+s,i+l),e.moveTo(r+l,i-s),e.lineTo(r-l,i+s),d+=L,s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+s,i+l),e.moveTo(r+l,i-s),e.lineTo(r-l,i+s);break;case"line":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,i-l),e.lineTo(r+s,i+l);break;case"dash":e.moveTo(r,i),e.lineTo(r+Math.cos(d)*n,i+Math.sin(d)*n)}e.fill(),e.stroke()}},_isPointInArea:function(e,t){return e.x>t.left-1e-6&&e.x<t.right+1e-6&&e.y>t.top-1e-6&&e.y<t.bottom+1e-6},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,r){var i=n.steppedLine;if(i){if("middle"===i){var o=(t.x+n.x)/2;e.lineTo(o,r?n.y:t.y),e.lineTo(o,r?t.y:n.y)}else"after"===i&&!r||"after"!==i&&r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(r?t.controlPointPreviousX:t.controlPointNextX,r?t.controlPointPreviousY:t.controlPointNextY,r?n.controlPointNextX:n.controlPointPreviousX,r?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},D=$;S.clear=$.clear,S.drawRoundedRectangle=function(e){e.beginPath(),$.roundedRect.apply($,arguments)};var I={_set:function(e,t){return S.merge(this[e]||(this[e]={}),t)}};I._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var j=I,q=S.valueOrDefault,R={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,r,i;return S.isObject(e)?(t=+e.top||0,n=+e.right||0,r=+e.bottom||0,i=+e.left||0):t=n=r=i=+e||0,{top:t,right:n,bottom:r,left:i,height:t+r,width:i+n}},_parseFont:function(e){var t=j.global,n=q(e.fontSize,t.defaultFontSize),r={family:q(e.fontFamily,t.defaultFontFamily),lineHeight:S.options.toLineHeight(q(e.lineHeight,t.defaultLineHeight),n),size:n,style:q(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return r.string=function(e){return!e||S.isNullOrUndef(e.size)||S.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(r),r},resolve:function(e,t,n,r){var i,o,a,s=!0;for(i=0,o=e.length;i<o;++i)if(void 0!==(a=e[i])&&(void 0!==t&&"function"==typeof a&&(a=a(t),s=!1),void 0!==n&&S.isArray(a)&&(a=a[n],s=!1),void 0!==a))return r&&!s&&(r.cacheable=!1),a}},z={_factorize:function(e){var t,n=[],r=Math.sqrt(e);for(t=1;t<r;t++)e%t==0&&(n.push(t),n.push(e/t));return r===(0|r)&&n.push(r),n.sort(function(e,t){return e-t}).pop(),n},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t}},B=z;S.log10=z.log10;var F=S,H=C,W=D,V=R,U=B;F.easing=H,F.canvas=W,F.options=V,F.math=U,F.rtl={getRtlAdapter:function(e,t,n){return e?function(e,t){return{x:function(n){return e+e+t-n},setWidth:function(e){t=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}}(t,n):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}},overrideTextDirection:function(e,t){var n,r;"ltr"!==t&&"rtl"!==t||(r=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)},restoreTextDirection:function(e){var t=e.prevTextDirection;void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}};var G=function(e){F.extend(this,e),this.initialize.apply(this,arguments)};F.extend(G.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=F.extend({},e._model)),e._start={},e},transition:function(e){var t=this,n=t._model,r=t._start,i=t._view;return n&&1!==e?(i||(i=t._view={}),r||(r=t._start={}),function(e,t,n,r){var i,o,a,s,l,c,u,d,h,f=Object.keys(n);for(i=0,o=f.length;i<o;++i)if(c=n[a=f[i]],t.hasOwnProperty(a)||(t[a]=c),(s=t[a])!==c&&"_"!==a[0]){if(e.hasOwnProperty(a)||(e[a]=s),(u=typeof c)==typeof(l=e[a]))if("string"===u){if((d=w(l)).valid&&(h=w(c)).valid){t[a]=h.mix(d,r).rgbString();continue}}else if(F.isFinite(l)&&F.isFinite(c)){t[a]=l+(c-l)*r;continue}t[a]=c}}(r,i,n,e),t):(t._view=F.extend({},n),t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return F.isNumber(this._model.x)&&F.isNumber(this._model.y)}}),G.extend=F.inherits;var Y=G,X=Y.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),K=X;Object.defineProperty(X.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(X.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),j._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:F.noop,onComplete:F.noop}});var Z={animations:[],request:null,addAnimation:function(e,t,n,r){var i,o,a=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,r||(e.animating=!0),i=0,o=a.length;i<o;++i)if(a[i].chart===e)return void(a[i]=t);a.push(t),1===a.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=F.findIndex(this.animations,function(t){return t.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=F.requestAnimFrame.call(window,function(){e.request=null,e.startDigest()}))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,r,i=this.animations,o=0;o<i.length;)t=(e=i[o]).chart,n=e.numSteps,r=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(r,n),F.callback(e.render,[t,e],t),F.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?(F.callback(e.onAnimationComplete,[e],t),t.animating=!1,i.splice(o,1)):++o}},Q=F.options.resolve,J=["push","pop","shift","splice","unshift"];function ee(e,t){var n=e._chartjs;if(n){var r=n.listeners,i=r.indexOf(t);-1!==i&&r.splice(i,1),r.length>0||(J.forEach(function(t){delete e[t]}),delete e._chartjs)}}var te=function(e,t){this.initialize(e,t)};F.extend(te.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,n=t.scales,r=this.getDataset(),i=t.options.scales;null!==e.xAxisID&&e.xAxisID in n&&!r.xAxisID||(e.xAxisID=r.xAxisID||i.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in n&&!r.yAxisID||(e.yAxisID=r.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ee(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),r=this.getDataset().data||[],i=n.data;for(e=0,t=r.length;e<t;++e)i[e]=i[e]||this.createMetaData(e);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e,t,n=this,r=n.getDataset(),i=r.data||(r.data=[]);n._data!==i&&(n._data&&ee(n._data,n),i&&Object.isExtensible(i)&&(t=n,(e=i)._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),J.forEach(function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),i=r.apply(this,t);return F.each(e._chartjs.listeners,function(e){"function"==typeof e[n]&&e[n].apply(e,t)}),i}})}))),n._data=i),n.resyncElements()},_configure:function(){this._config=F.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(e,t,n){"_meta"!==e&&"data"!==e&&F._merger(e,t,n)}})},_update:function(e){this._configure(),this._cachedDataOpts=null,this.update(e)},update:F.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],r=n.length,i=0;i<r;++i)n[i].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,r=0;for(e.dataset&&e.dataset.draw();r<n;++r)t[r].draw()},getStyle:function(e){var t,n=this.getMeta(),r=n.dataset;return this._configure(),r&&void 0===e?t=this._resolveDatasetElementOptions(r||{}):(e=e||0,t=this._resolveDataElementOptions(n.data[e]||{},e)),!1!==t.fill&&null!==t.fill||(t.backgroundColor=t.borderColor),t},_resolveDatasetElementOptions:function(e,t){var n,r,i,o,a=this,s=a.chart,l=a._config,c=e.custom||{},u=s.options.elements[a.datasetElementType.prototype._type]||{},d=a._datasetElementOptions,h={},f={chart:s,dataset:a.getDataset(),datasetIndex:a.index,hover:t};for(n=0,r=d.length;n<r;++n)i=d[n],o=t?"hover"+i.charAt(0).toUpperCase()+i.slice(1):i,h[i]=Q([c[o],l[o],u[o]],f);return h},_resolveDataElementOptions:function(e,t){var n=this,r=e&&e.custom,i=n._cachedDataOpts;if(i&&!r)return i;var o,a,s,l,c=n.chart,u=n._config,d=c.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,f={},p={chart:c,dataIndex:t,dataset:n.getDataset(),datasetIndex:n.index},g={cacheable:!r};if(r=r||{},F.isArray(h))for(a=0,s=h.length;a<s;++a)f[l=h[a]]=Q([r[l],u[l],d[l]],p,t,g);else for(a=0,s=(o=Object.keys(h)).length;a<s;++a)f[l=o[a]]=Q([r[l],u[h[l]],u[l],d[l]],p,t,g);return g.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(e){F.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,r=e.custom||{},i=e._model,o=F.getHoverColor;e.$previousStyle={backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderWidth:i.borderWidth},i.backgroundColor=Q([r.hoverBackgroundColor,t.hoverBackgroundColor,o(i.backgroundColor)],void 0,n),i.borderColor=Q([r.hoverBorderColor,t.hoverBorderColor,o(i.borderColor)],void 0,n),i.borderWidth=Q([r.hoverBorderWidth,t.hoverBorderWidth,i.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var e,t,n,r,i,o,a=this.getMeta().dataset,s={};if(a){for(o=a._model,i=this._resolveDatasetElementOptions(a,!0),e=0,t=(r=Object.keys(i)).length;e<t;++e)s[n=r[e]]=o[n],o[n]=i[n];a.$previousStyle=s}},resyncElements:function(){var e=this.getMeta(),t=this.getDataset().data,n=e.data.length,r=t.length;r<n?e.data.splice(r,n-r):r>n&&this.insertElements(n,r-n)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),te.extend=F.inherits;var ne=te,re=2*Math.PI;function ie(e,t){var n=t.startAngle,r=t.endAngle,i=t.pixelMargin,o=i/t.outerRadius,a=t.x,s=t.y;e.beginPath(),e.arc(a,s,t.outerRadius,n-o,r+o),t.innerRadius>i?(o=i/t.innerRadius,e.arc(a,s,t.innerRadius-i,r+o,n-o,!0)):e.arc(a,s,i,r+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}j._set("global",{elements:{arc:{backgroundColor:j.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var oe=Y.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var r=F.getAngleFromPoint(n,{x:e,y:t}),i=r.angle,o=r.distance,a=n.startAngle,s=n.endAngle;s<a;)s+=re;for(;i>s;)i-=re;for(;i<a;)i+=re;var l=i>=a&&i<=s,c=o>=n.innerRadius&&o<=n.outerRadius;return l&&c}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,i={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/re)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+re,t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),e=0;e<i.fullCircles;++e)t.fill();i.endAngle=i.startAngle+n.circumference%re}t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),t.fill(),n.borderWidth&&function(e,t,n){var r="inner"===t.borderAlign;r?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(e,t,n,r){var i,o=n.endAngle;for(r&&(n.endAngle=n.startAngle+re,ie(e,n),n.endAngle=o,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=re,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+re,n.startAngle,!0),i=0;i<n.fullCircles;++i)e.stroke();for(e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.startAngle+re),i=0;i<n.fullCircles;++i)e.stroke()}(e,t,n,r),r&&ie(e,n),e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.endAngle),e.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),e.closePath(),e.stroke()}(t,n,i),t.restore()}}),ae=F.valueOrDefault,se=j.global.defaultColor;j._set("global",{elements:{line:{tension:.4,backgroundColor:se,borderWidth:3,borderColor:se,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var le=Y.extend({_type:"line",draw:function(){var e,t,n,r=this,i=r._view,o=r._chart.ctx,a=i.spanGaps,s=r._children.slice(),l=j.global,c=l.elements.line,u=-1,d=r._loop;if(s.length){if(r._loop){for(e=0;e<s.length;++e)if(t=F.previousItem(s,e),!s[e]._view.skip&&t._view.skip){s=s.slice(e).concat(s.slice(0,e)),d=a;break}d&&s.push(s[0])}for(o.save(),o.lineCap=i.borderCapStyle||c.borderCapStyle,o.setLineDash&&o.setLineDash(i.borderDash||c.borderDash),o.lineDashOffset=ae(i.borderDashOffset,c.borderDashOffset),o.lineJoin=i.borderJoinStyle||c.borderJoinStyle,o.lineWidth=ae(i.borderWidth,c.borderWidth),o.strokeStyle=i.borderColor||l.defaultColor,o.beginPath(),(n=s[0]._view).skip||(o.moveTo(n.x,n.y),u=0),e=1;e<s.length;++e)n=s[e]._view,t=-1===u?F.previousItem(s,e):s[u],n.skip||(u!==e-1&&!a||-1===u?o.moveTo(n.x,n.y):F.canvas.lineTo(o,t._view,n),u=e);d&&o.closePath(),o.stroke(),o.restore()}}}),ce=F.valueOrDefault,ue=j.global.defaultColor;function de(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}j._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ue,borderColor:ue,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var he=Y.extend({_type:"point",inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:de,inXRange:de,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,r=t.pointStyle,i=t.rotation,o=t.radius,a=t.x,s=t.y,l=j.global,c=l.defaultColor;t.skip||(void 0===e||F.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||c,n.lineWidth=ce(t.borderWidth,l.elements.point.borderWidth),n.fillStyle=t.backgroundColor||c,F.canvas.drawPoint(n,r,o,a,s,i))}}),fe=j.global.defaultColor;function pe(e){return e&&void 0!==e.width}function ge(e){var t,n,r,i,o;return pe(e)?(o=e.width/2,t=e.x-o,n=e.x+o,r=Math.min(e.y,e.base),i=Math.max(e.y,e.base)):(o=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),r=e.y-o,i=e.y+o),{left:t,top:r,right:n,bottom:i}}function me(e,t,n){return e===t?n:e===n?t:e}function ve(e,t,n){var r=null===t,i=null===n,o=!(!e||r&&i)&&ge(e);return o&&(r||t>=o.left&&t<=o.right)&&(i||n>=o.top&&n<=o.bottom)}j._set("global",{elements:{rectangle:{backgroundColor:fe,borderColor:fe,borderSkipped:"bottom",borderWidth:0}}});var ye=Y.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,n=function(e){var t=ge(e),n=t.right-t.left,r=t.bottom-t.top,i=function(e,t,n){var r,i,o,a,s=e.borderWidth,l=function(e){var t=e.borderSkipped,n={};return t?(e.horizontal?e.base>e.x&&(t=me(t,"left","right")):e.base<e.y&&(t=me(t,"bottom","top")),n[t]=!0,n):n}(e);return F.isObject(s)?(r=+s.top||0,i=+s.right||0,o=+s.bottom||0,a=+s.left||0):r=i=o=a=+s||0,{t:l.top||r<0?0:r>n?n:r,r:l.right||i<0?0:i>t?t:i,b:l.bottom||o<0?0:o>n?n:o,l:l.left||a<0?0:a>t?t:a}}(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b}}}(t),r=n.outer,i=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(r.x,r.y,r.w,r.h),r.w===i.w&&r.h===i.h||(e.save(),e.beginPath(),e.rect(r.x,r.y,r.w,r.h),e.clip(),e.fillStyle=t.borderColor,e.rect(i.x,i.y,i.w,i.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return ve(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return pe(n)?ve(n,e,null):ve(n,null,t)},inXRange:function(e){return ve(this._view,e,null)},inYRange:function(e){return ve(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return pe(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return pe(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),be={},xe=oe,we=le,_e=he,ke=ye;be.Arc=xe,be.Line=we,be.Point=_e,be.Rectangle=ke;var Ee=F._deprecated,Se=F.valueOrDefault;j._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),j._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Oe=ne.extend({dataElementType:be.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,n=this;ne.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0,t=n._getIndexScale().options,Ee("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ee("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ee("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ee("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ee("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=r.length;t<n;++t)this.updateElement(r[t],t,e)},updateElement:function(e,t,n){var r=this,i=r.getMeta(),o=r.getDataset(),a=r._resolveDataElementOptions(e,t);e._xScale=r.getScaleForId(i.xAxisID),e._yScale=r.getScaleForId(i.yAxisID),e._datasetIndex=r.index,e._index=t,e._model={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderSkipped:a.borderSkipped,borderWidth:a.borderWidth,datasetLabel:o.label,label:r.chart.data.labels[t]},F.isArray(o.data[t])&&(e._model.borderSkipped=null),r._updateElementGeometry(e,t,n,a),e.pivot()},_updateElementGeometry:function(e,t,n,r){var i=this,o=e._model,a=i._getValueScale(),s=a.getBasePixel(),l=a.isHorizontal(),c=i._ruler||i.getRuler(),u=i.calculateBarValuePixels(i.index,t,r),d=i.calculateBarIndexPixels(i.index,t,c,r);o.horizontal=l,o.base=n?s:u.base,o.x=l?n?s:u.head:d.center,o.y=l?d.center:n?s:u.head,o.height=l?d.size:void 0,o.width=l?void 0:d.size},_getStacks:function(e){var t,n,r=this._getIndexScale(),i=r._getMatchingVisibleMetas(this._type),o=r.options.stacked,a=i.length,s=[];for(t=0;t<a&&(n=i[t],(!1===o||-1===s.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&s.push(n.stack),n.index!==e);++t);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),r=void 0!==t?n.indexOf(t):-1;return-1===r?n.length-1:r},getRuler:function(){var e,t,n=this._getIndexScale(),r=[];for(e=0,t=this.getMeta().data.length;e<t;++e)r.push(n.getPixelForValue(null,e,this.index));return{pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(e,t,n){var r,i,o,a,s,l,c,u=this.chart,d=this._getValueScale(),h=d.isHorizontal(),f=u.data.datasets,p=d._getMatchingVisibleMetas(this._type),g=d._parseValue(f[e].data[t]),m=n.minBarLength,v=d.options.stacked,y=this.getMeta().stack,b=void 0===g.start?0:g.max>=0&&g.min>=0?g.min:g.max,x=void 0===g.start?g.end:g.max>=0&&g.min>=0?g.max-g.min:g.min-g.max,w=p.length;if(v||void 0===v&&void 0!==y)for(r=0;r<w&&(i=p[r]).index!==e;++r)i.stack===y&&(o=void 0===(c=d._parseValue(f[i.index].data[t])).start?c.end:c.min>=0&&c.max>=0?c.max:c.min,(g.min<0&&o<0||g.max>=0&&o>0)&&(b+=o));return a=d.getPixelForValue(b),l=(s=d.getPixelForValue(b+x))-a,void 0!==m&&Math.abs(l)<m&&(l=m,s=x>=0&&!h||x<0&&h?a-m:a+m),{size:l,base:a,head:s,center:s+l/2}},calculateBarIndexPixels:function(e,t,n,r){var i="flex"===r.barThickness?function(e,t,n){var r,i=t.pixels,o=i[e],a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null,l=n.categoryPercentage;return null===a&&(a=o-(null===s?t.end-t.start:s-o)),null===s&&(s=o+o-a),r=o-(o-Math.min(a,s))/2*l,{chunk:Math.abs(s-a)/2*l/t.stackCount,ratio:n.barPercentage,start:r}}(t,n,r):function(e,t,n){var r,i,o=n.barThickness,a=t.stackCount,s=t.pixels[e],l=F.isNullOrUndef(o)?function(e,t){var n,r,i,o,a=e._length;for(i=1,o=t.length;i<o;++i)a=Math.min(a,Math.abs(t[i]-t[i-1]));for(i=0,o=e.getTicks().length;i<o;++i)r=e.getPixelForTick(i),a=i>0?Math.min(a,Math.abs(r-n)):a,n=r;return a}(t.scale,t.pixels):-1;return F.isNullOrUndef(o)?(r=l*n.categoryPercentage,i=n.barPercentage):(r=o*a,i=1),{chunk:r/a,ratio:i,start:s-r/2}}(t,n,r),o=this.getStackIndex(e,this.getMeta().stack),a=i.start+i.chunk*o+i.chunk/2,s=Math.min(Se(r.maxBarThickness,1/0),i.chunk*i.ratio);return{base:a-s/2,head:a+s/2,center:a,size:s}},draw:function(){var e=this.chart,t=this._getValueScale(),n=this.getMeta().data,r=this.getDataset(),i=n.length,o=0;for(F.canvas.clipArea(e.ctx,e.chartArea);o<i;++o){var a=t._parseValue(r.data[o]);isNaN(a.min)||isNaN(a.max)||n[o].draw()}F.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var e=this,t=F.extend({},ne.prototype._resolveDataElementOptions.apply(e,arguments)),n=e._getIndexScale().options,r=e._getValueScale().options;return t.barPercentage=Se(n.barPercentage,t.barPercentage),t.barThickness=Se(n.barThickness,t.barThickness),t.categoryPercentage=Se(n.categoryPercentage,t.categoryPercentage),t.maxBarThickness=Se(n.maxBarThickness,t.maxBarThickness),t.minBarLength=Se(r.minBarLength,t.minBarLength),t}}),Ce=F.valueOrDefault,Te=F.options.resolve;j._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.datasets[e.datasetIndex].label||"",r=t.datasets[e.datasetIndex].data[e.index];return n+": ("+e.xLabel+", "+e.yLabel+", "+r.r+")"}}}});var Me=ne.extend({dataElementType:be.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(e){var t=this,n=t.getMeta().data;F.each(n,function(n,r){t.updateElement(n,r,e)})},updateElement:function(e,t,n){var r=this,i=r.getMeta(),o=e.custom||{},a=r.getScaleForId(i.xAxisID),s=r.getScaleForId(i.yAxisID),l=r._resolveDataElementOptions(e,t),c=r.getDataset().data[t],u=r.index,d=n?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof c?c:NaN,t,u),h=n?s.getBasePixel():s.getPixelForValue(c,t,u);e._xScale=a,e._yScale=s,e._options=l,e._datasetIndex=u,e._index=t,e._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:o.skip||isNaN(d)||isNaN(h),x:d,y:h},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,r=F.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Ce(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Ce(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Ce(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(e,t){var n=this,r=n.chart,i=n.getDataset(),o=e.custom||{},a=i.data[t]||{},s=ne.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:r,dataIndex:t,dataset:i,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=F.extend({},s)),s.radius=Te([o.radius,a.r,n._config.radius,r.options.elements.point.radius],l,t),s}}),Ae=F.valueOrDefault,Pe=Math.PI,Le=2*Pe,Ne=Pe/2;j._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t,n,r,i=document.createElement("ul"),o=e.data,a=o.datasets,s=o.labels;if(i.setAttribute("class",e.id+"-legend"),a.length)for(t=0,n=a[0].data.length;t<n;++t)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return i.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(n,r){var i=e.getDatasetMeta(0),o=i.controller.getStyle(r);return{text:n,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(t.datasets[0].data[r])||i.data[r].hidden,index:r}}):[]}},onClick:function(e,t){var n,r,i,o=t.index,a=this.chart;for(n=0,r=(a.data.datasets||[]).length;n<r;++n)(i=a.getDatasetMeta(n)).data[o]&&(i.data[o].hidden=!i.data[o].hidden);a.update()}},cutoutPercentage:50,rotation:-Ne,circumference:Le,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],r=": "+t.datasets[e.datasetIndex].data[e.index];return F.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}});var $e=ne.extend({dataElementType:be.Arc,linkScales:F.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,r,i,o=this,a=o.chart,s=a.chartArea,l=a.options,c=1,u=1,d=0,h=0,f=o.getMeta(),p=f.data,g=l.cutoutPercentage/100||0,m=l.circumference,v=o._getRingWeight(o.index);if(m<Le){var y=l.rotation%Le,b=(y+=y>=Pe?-Le:y<-Pe?Le:0)+m,x=Math.cos(y),w=Math.sin(y),_=Math.cos(b),k=Math.sin(b),E=y<=0&&b>=0||b>=Le,S=y<=Ne&&b>=Ne||b>=Le+Ne,O=y<=-Ne&&b>=-Ne||b>=Pe+Ne,C=y===-Pe||b>=Pe?-1:Math.min(x,x*g,_,_*g),T=O?-1:Math.min(w,w*g,k,k*g),M=E?1:Math.max(x,x*g,_,_*g),A=S?1:Math.max(w,w*g,k,k*g);c=(M-C)/2,u=(A-T)/2,d=-(M+C)/2,h=-(A+T)/2}for(r=0,i=p.length;r<i;++r)p[r]._options=o._resolveDataElementOptions(p[r],r);for(a.borderWidth=o.getMaxBorderWidth(),t=(s.right-s.left-a.borderWidth)/c,n=(s.bottom-s.top-a.borderWidth)/u,a.outerRadius=Math.max(Math.min(t,n)/2,0),a.innerRadius=Math.max(a.outerRadius*g,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(o._getVisibleDatasetWeightTotal()||1),a.offsetX=d*a.outerRadius,a.offsetY=h*a.outerRadius,f.total=o.calculateTotal(),o.outerRadius=a.outerRadius-a.radiusLength*o._getRingWeightOffset(o.index),o.innerRadius=Math.max(o.outerRadius-a.radiusLength*v,0),r=0,i=p.length;r<i;++r)o.updateElement(p[r],r,e)},updateElement:function(e,t,n){var r=this,i=r.chart,o=i.chartArea,a=i.options,s=a.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,u=a.rotation,d=a.rotation,h=r.getDataset(),f=n&&s.animateRotate||e.hidden?0:r.calculateCircumference(h.data[t])*(a.circumference/Le),p=n&&s.animateScale?0:r.innerRadius,g=n&&s.animateScale?0:r.outerRadius,m=e._options||{};F.extend(e,{_datasetIndex:r.index,_index:t,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+i.offsetX,y:c+i.offsetY,startAngle:u,endAngle:d,circumference:f,outerRadius:g,innerRadius:p,label:F.valueAtIndexOrDefault(h.label,t,i.data.labels[t])}});var v=e._model;n&&s.animateRotate||(v.startAngle=0===t?a.rotation:r.getMeta().data[t-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),e.pivot()},calculateTotal:function(){var e,t=this.getDataset(),n=this.getMeta(),r=0;return F.each(n.data,function(n,i){e=t.data[i],isNaN(e)||n.hidden||(r+=Math.abs(e))}),r},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?Le*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,r,i,o,a,s,l,c=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t<n;++t)if(u.isDatasetVisible(t)){e=(r=u.getDatasetMeta(t)).data,t!==this.index&&(o=r.controller);break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)i=e[t],o?(o._configure(),a=o._resolveDataElementOptions(i,t)):a=i._options,"inner"!==a.borderAlign&&(s=a.borderWidth,c=(l=a.hoverBorderWidth)>(c=s>c?s:c)?l:c);return c},setHoverStyle:function(e){var t=e._model,n=e._options,r=F.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Ae(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Ae(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Ae(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(Ae(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});j._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),j._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var De=Oe.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Ie=F.valueOrDefault,je=F.options.resolve,qe=F.canvas._isPointInArea;function Re(e,t){var n=e&&e.options.ticks||{},r=n.reverse,i=void 0===n.min?t:0,o=void 0===n.max?t:0;return{start:r?o:i,end:r?i:o}}function ze(e,t,n){var r=n/2,i=Re(e,r),o=Re(t,r);return{top:o.end,right:i.end,bottom:o.start,left:i.start}}function Be(e){var t,n,r,i;return F.isObject(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i}}j._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Fe=ne.extend({datasetElementType:be.Line,dataElementType:be.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(e){var t,n,r=this,i=r.getMeta(),o=i.dataset,a=i.data||[],s=r.chart.options,l=r._config,c=r._showLine=Ie(l.showLine,s.showLines);for(r._xScale=r.getScaleForId(i.xAxisID),r._yScale=r.getScaleForId(i.yAxisID),c&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=r._yScale,o._datasetIndex=r.index,o._children=a,o._model=r._resolveDatasetElementOptions(o),o.pivot()),t=0,n=a.length;t<n;++t)r.updateElement(a[t],t,e);for(c&&0!==o._model.tension&&r.updateBezierControlPoints(),t=0,n=a.length;t<n;++t)a[t].pivot()},updateElement:function(e,t,n){var r,i,o=this,a=o.getMeta(),s=e.custom||{},l=o.getDataset(),c=o.index,u=l.data[t],d=o._xScale,h=o._yScale,f=a.dataset._model,p=o._resolveDataElementOptions(e,t);r=d.getPixelForValue("object"==typeof u?u:NaN,t,c),i=n?h.getBasePixel():o.calculatePointY(u,t,c),e._xScale=d,e._yScale=h,e._options=p,e._datasetIndex=c,e._index=t,e._model={x:r,y:i,skip:s.skip||isNaN(r)||isNaN(i),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:Ie(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:p.hitRadius}},_resolveDatasetElementOptions:function(e){var t=this,n=t._config,r=e.custom||{},i=t.chart.options,o=i.elements.line,a=ne.prototype._resolveDatasetElementOptions.apply(t,arguments);return a.spanGaps=Ie(n.spanGaps,i.spanGaps),a.tension=Ie(n.lineTension,o.tension),a.steppedLine=je([r.steppedLine,n.steppedLine,o.stepped]),a.clip=Be(Ie(n.clip,ze(t._xScale,t._yScale,a.borderWidth))),a},calculatePointY:function(e,t,n){var r,i,o,a,s,l,c,u=this.chart,d=this._yScale,h=0,f=0;if(d.options.stacked){for(s=+d.getRightValue(e),c=(l=u._getSortedVisibleDatasetMetas()).length,r=0;r<c&&(o=l[r]).index!==n;++r)i=u.data.datasets[o.index],"line"===o.type&&o.yAxisID===d.id&&((a=+d.getRightValue(i.data[t]))<0?f+=a||0:h+=a||0);return s<0?d.getPixelForValue(f+s):d.getPixelForValue(h+s)}return d.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,n,r,i=this.chart,o=this.getMeta(),a=o.dataset._model,s=i.chartArea,l=o.data||[];function c(e,t,n){return Math.max(Math.min(e,n),t)}if(a.spanGaps&&(l=l.filter(function(e){return!e._model.skip})),"monotone"===a.cubicInterpolationMode)F.splineCurveMonotone(l);else for(e=0,t=l.length;e<t;++e)n=l[e]._model,r=F.splineCurve(F.previousItem(l,e)._model,n,F.nextItem(l,e)._model,a.tension),n.controlPointPreviousX=r.previous.x,n.controlPointPreviousY=r.previous.y,n.controlPointNextX=r.next.x,n.controlPointNextY=r.next.y;if(i.options.elements.line.capBezierPoints)for(e=0,t=l.length;e<t;++e)n=l[e]._model,qe(n,s)&&(e>0&&qe(l[e-1]._model,s)&&(n.controlPointPreviousX=c(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=c(n.controlPointPreviousY,s.top,s.bottom)),e<l.length-1&&qe(l[e+1]._model,s)&&(n.controlPointNextX=c(n.controlPointNextX,s.left,s.right),n.controlPointNextY=c(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var e,t=this.chart,n=this.getMeta(),r=n.data||[],i=t.chartArea,o=t.canvas,a=0,s=r.length;for(this._showLine&&(e=n.dataset._model.clip,F.canvas.clipArea(t.ctx,{left:!1===e.left?0:i.left-e.left,right:!1===e.right?o.width:i.right+e.right,top:!1===e.top?0:i.top-e.top,bottom:!1===e.bottom?o.height:i.bottom+e.bottom}),n.dataset.draw(),F.canvas.unclipArea(t.ctx));a<s;++a)r[a].draw(i)},setHoverStyle:function(e){var t=e._model,n=e._options,r=F.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Ie(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Ie(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Ie(n.hoverBorderWidth,n.borderWidth),t.radius=Ie(n.hoverRadius,n.radius)}}),He=F.options.resolve;j._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t,n,r,i=document.createElement("ul"),o=e.data,a=o.datasets,s=o.labels;if(i.setAttribute("class",e.id+"-legend"),a.length)for(t=0,n=a[0].data.length;t<n;++t)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return i.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(n,r){var i=e.getDatasetMeta(0),o=i.controller.getStyle(r);return{text:n,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(t.datasets[0].data[r])||i.data[r].hidden,index:r}}):[]}},onClick:function(e,t){var n,r,i,o=t.index,a=this.chart;for(n=0,r=(a.data.datasets||[]).length;n<r;++n)(i=a.getDatasetMeta(n)).data[o].hidden=!i.data[o].hidden;a.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var We=ne.extend({dataElementType:be.Arc,linkScales:F.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r,i=this,o=i.getDataset(),a=i.getMeta(),s=i.chart.options.startAngle||0,l=i._starts=[],c=i._angles=[],u=a.data;for(i._updateRadius(),a.count=i.countVisibleElements(),t=0,n=o.data.length;t<n;t++)l[t]=s,r=i._computeAngle(t),c[t]=r,s+=r;for(t=0,n=u.length;t<n;++t)u[t]._options=i._resolveDataElementOptions(u[t],t),i.updateElement(u[t],t,e)},_updateRadius:function(){var e=this,t=e.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top);t.outerRadius=Math.max(i/2,0),t.innerRadius=Math.max(r.cutoutPercentage?t.outerRadius/100*r.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,n){var r=this,i=r.chart,o=r.getDataset(),a=i.options,s=a.animation,l=i.scale,c=i.data.labels,u=l.xCenter,d=l.yCenter,h=a.startAngle,f=e.hidden?0:l.getDistanceFromCenterForValue(o.data[t]),p=r._starts[t],g=p+(e.hidden?0:r._angles[t]),m=s.animateScale?0:l.getDistanceFromCenterForValue(o.data[t]),v=e._options||{};F.extend(e,{_datasetIndex:r.index,_index:t,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:u,y:d,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?h:p,endAngle:n&&s.animateRotate?h:g,label:F.valueAtIndexOrDefault(c,t,c[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),n=0;return F.each(t.data,function(t,r){isNaN(e.data[r])||t.hidden||n++}),n},setHoverStyle:function(e){var t=e._model,n=e._options,r=F.getHoverColor,i=F.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=i(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=i(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=i(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(e){var t=this,n=this.getMeta().count,r=t.getDataset(),i=t.getMeta();if(isNaN(r.data[e])||i.data[e].hidden)return 0;var o={chart:t.chart,dataIndex:e,dataset:r,datasetIndex:t.index};return He([t.chart.options.elements.arc.angle,2*Math.PI/n],o,e)}});j._set("pie",F.clone(j.doughnut)),j._set("pie",{cutoutPercentage:0});var Ve=$e,Ue=F.valueOrDefault;j._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Ge=ne.extend({datasetElementType:be.Line,dataElementType:be.Point,linkScales:F.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r=this,i=r.getMeta(),o=i.dataset,a=i.data||[],s=r.chart.scale,l=r._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=s,o._datasetIndex=r.index,o._children=a,o._loop=!0,o._model=r._resolveDatasetElementOptions(o),o.pivot(),t=0,n=a.length;t<n;++t)r.updateElement(a[t],t,e);for(r.updateBezierControlPoints(),t=0,n=a.length;t<n;++t)a[t].pivot()},updateElement:function(e,t,n){var r=this,i=e.custom||{},o=r.getDataset(),a=r.chart.scale,s=a.getPointPositionForValue(t,o.data[t]),l=r._resolveDataElementOptions(e,t),c=r.getMeta().dataset._model,u=n?a.xCenter:s.x,d=n?a.yCenter:s.y;e._scale=a,e._options=l,e._datasetIndex=r.index,e._index=t,e._model={x:u,y:d,skip:i.skip||isNaN(u)||isNaN(d),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Ue(i.tension,c?c.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var e=this,t=e._config,n=e.chart.options,r=ne.prototype._resolveDatasetElementOptions.apply(e,arguments);return r.spanGaps=Ue(t.spanGaps,n.spanGaps),r.tension=Ue(t.lineTension,n.elements.line.tension),r},updateBezierControlPoints:function(){var e,t,n,r,i=this.getMeta(),o=this.chart.chartArea,a=i.data||[];function s(e,t,n){return Math.max(Math.min(e,n),t)}for(i.dataset._model.spanGaps&&(a=a.filter(function(e){return!e._model.skip})),e=0,t=a.length;e<t;++e)n=a[e]._model,r=F.splineCurve(F.previousItem(a,e,!0)._model,n,F.nextItem(a,e,!0)._model,n.tension),n.controlPointPreviousX=s(r.previous.x,o.left,o.right),n.controlPointPreviousY=s(r.previous.y,o.top,o.bottom),n.controlPointNextX=s(r.next.x,o.left,o.right),n.controlPointNextY=s(r.next.y,o.top,o.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,r=F.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Ue(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Ue(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Ue(n.hoverBorderWidth,n.borderWidth),t.radius=Ue(n.hoverRadius,n.radius)}});j._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),j._set("global",{datasets:{scatter:{showLine:!1}}});var Ye={bar:Oe,bubble:Me,doughnut:$e,horizontalBar:De,line:Fe,polarArea:We,pie:Ve,radar:Ge,scatter:Fe};function Xe(e,t){return e.native?{x:e.x,y:e.y}:F.getRelativePosition(e,t)}function Ke(e,t){var n,r,i,o,a,s,l=e._getSortedVisibleDatasetMetas();for(r=0,o=l.length;r<o;++r)for(i=0,a=(n=l[r].data).length;i<a;++i)(s=n[i])._view.skip||t(s)}function Ze(e,t){var n=[];return Ke(e,function(e){e.inRange(t.x,t.y)&&n.push(e)}),n}function Qe(e,t,n,r){var i=Number.POSITIVE_INFINITY,o=[];return Ke(e,function(e){if(!n||e.inRange(t.x,t.y)){var a=e.getCenterPoint(),s=r(t,a);s<i?(o=[e],i=s):s===i&&o.push(e)}}),o}function Je(e){var t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){var i=t?Math.abs(e.x-r.x):0,o=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function et(e,t,n){var r=Xe(t,e);n.axis=n.axis||"x";var i=Je(n.axis),o=n.intersect?Ze(e,r):Qe(e,r,!1,i),a=[];return o.length?(e._getSortedVisibleDatasetMetas().forEach(function(e){var t=e.data[o[0]._index];t&&!t._view.skip&&a.push(t)}),a):[]}var tt={modes:{single:function(e,t){var n=Xe(t,e),r=[];return Ke(e,function(e){if(e.inRange(n.x,n.y))return r.push(e),r}),r.slice(0,1)},label:et,index:et,dataset:function(e,t,n){var r=Xe(t,e);n.axis=n.axis||"xy";var i=Je(n.axis),o=n.intersect?Ze(e,r):Qe(e,r,!1,i);return o.length>0&&(o=e.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(e,t){return et(e,t,{intersect:!1})},point:function(e,t){return Ze(e,Xe(t,e))},nearest:function(e,t,n){var r=Xe(t,e);n.axis=n.axis||"xy";var i=Je(n.axis);return Qe(e,r,n.intersect,i)},x:function(e,t,n){var r=Xe(t,e),i=[],o=!1;return Ke(e,function(e){e.inXRange(r.x)&&i.push(e),e.inRange(r.x,r.y)&&(o=!0)}),n.intersect&&!o&&(i=[]),i},y:function(e,t,n){var r=Xe(t,e),i=[],o=!1;return Ke(e,function(e){e.inYRange(r.y)&&i.push(e),e.inRange(r.x,r.y)&&(o=!0)}),n.intersect&&!o&&(i=[]),i}}},nt=F.extend;function rt(e,t){return F.where(e,function(e){return e.pos===t})}function it(e,t){return e.sort(function(e,n){var r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function ot(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function at(e,t,n){var r,i,o=n.box,a=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?o.height:o.width,e[n.pos]+=n.size,o.getPadding){var s=o.getPadding();a.top=Math.max(a.top,s.top),a.left=Math.max(a.left,s.left),a.bottom=Math.max(a.bottom,s.bottom),a.right=Math.max(a.right,s.right)}if(r=t.outerWidth-ot(a,e,"left","right"),i=t.outerHeight-ot(a,e,"top","bottom"),r!==e.w||i!==e.h){e.w=r,e.h=i;var l=n.horizontal?[r,e.w]:[i,e.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function st(e,t){var n=t.maxPadding;return function(e){var r={left:0,top:0,right:0,bottom:0};return e.forEach(function(e){r[e]=Math.max(t[e],n[e])}),r}(e?["left","right"]:["top","bottom"])}function lt(e,t,n){var r,i,o,a,s,l,c=[];for(r=0,i=e.length;r<i;++r)(a=(o=e[r]).box).update(o.width||t.w,o.height||t.h,st(o.horizontal,t)),at(t,n,o)&&(l=!0,c.length&&(s=!0)),a.fullWidth||c.push(o);return s&&lt(c,t,n)||l}function ct(e,t,n){var r,i,o,a,s=n.padding,l=t.x,c=t.y;for(r=0,i=e.length;r<i;++r)a=(o=e[r]).box,o.horizontal?(a.left=a.fullWidth?s.left:t.left,a.right=a.fullWidth?n.outerWidth-s.right:t.left+t.w,a.top=c,a.bottom=c+a.height,a.width=a.right-a.left,c=a.bottom):(a.left=l,a.right=l+a.width,a.top=t.top,a.bottom=t.top+t.h,a.height=a.bottom-a.top,l=a.right);t.x=l,t.y=c}j._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ut,dt={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var r,i=["fullWidth","position","weight"],o=i.length,a=0;a<o;++a)r=i[a],n.hasOwnProperty(r)&&(t[r]=n[r])},update:function(e,t,n){if(e){var r=e.options.layout||{},i=F.options.toPadding(r.padding),o=t-i.width,a=n-i.height,s=function(e){var t=function(e){var t,n,r,i=[];for(t=0,n=(e||[]).length;t<n;++t)r=e[t],i.push({index:t,box:r,pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return i}(e),n=it(rt(t,"left"),!0),r=it(rt(t,"right")),i=it(rt(t,"top"),!0),o=it(rt(t,"bottom"));return{leftAndTop:n.concat(i),rightAndBottom:r.concat(o),chartArea:rt(t,"chartArea"),vertical:n.concat(r),horizontal:i.concat(o)}}(e.boxes),l=s.vertical,c=s.horizontal,u=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,vBoxMaxWidth:o/2/l.length,hBoxMaxHeight:a/2}),d=nt({maxPadding:nt({},i),w:o,h:a,x:i.left,y:i.top},i);!function(e,t){var n,r,i;for(n=0,r=e.length;n<r;++n)(i=e[n]).width=i.horizontal?i.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth,i.height=i.horizontal&&t.hBoxMaxHeight}(l.concat(c),u),lt(l,d,u),lt(c,d,u)&&lt(l,d,u),function(e){var t=e.maxPadding;function n(n){var r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(d),ct(s.leftAndTop,d,u),d.x+=d.w,d.y+=d.h,ct(s.rightAndBottom,d,u),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h},F.each(s.chartArea,function(t){var n=t.box;nt(n,e.chartArea),n.update(d.w,d.h)})}}},ht=(ut=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&ut.default||ut,ft="$chartjs",pt="chartjs-size-monitor",gt="chartjs-render-monitor",mt=["animationstart","webkitAnimationStart"],vt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function yt(e,t){var n=F.getStyle(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var bt=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function xt(e,t,n){e.addEventListener(t,n,bt)}function wt(e,t,n){e.removeEventListener(t,n,bt)}function _t(e,t,n,r,i){return{type:e,chart:t,native:i||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function kt(e){var t=document.createElement("div");return t.className=e||"",t}var Et={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;!function(e,t){var n=e[ft]||(e[ft]={});if(!n.containsStyles){n.containsStyles=!0,t="/* Chart.js */\n"+t;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(t)),e.appendChild(r)}}(t.host?t:document.head,ht)}},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(this._ensureLoaded(e),function(e,t){var n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[ft]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var o=yt(e,"width");void 0!==o&&(e.width=o)}if(null===r||""===r)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var a=yt(e,"height");void 0!==o&&(e.height=a)}}(e,t),n):null},releaseContext:function(e){var t=e.canvas;if(t[ft]){var n=t[ft].initial;["height","width"].forEach(function(e){var r=n[e];F.isNullOrUndef(r)?t.removeAttribute(e):t.setAttribute(e,r)}),F.each(n.style||{},function(e,n){t.style[n]=e}),t.width=t.width,delete t[ft]}},addEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var i=n[ft]||(n[ft]={});xt(r,t,(i.proxies||(i.proxies={}))[e.id+"_"+t]=function(t){n(function(e,t){var n=vt[e.type]||e.type,r=F.getRelativePosition(e,t);return _t(n,t,r.x,r.y,e)}(t,e))})}else!function(e,t,n){var r,i,o,a,s=e[ft]||(e[ft]={}),l=s.resizer=function(e){var t=kt(pt),n=kt(pt+"-expand"),r=kt(pt+"-shrink");n.appendChild(kt()),r.appendChild(kt()),t.appendChild(n),t.appendChild(r),t._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var i=function(){t._reset(),e()};return xt(n,"scroll",i.bind(n,"expand")),xt(r,"scroll",i.bind(r,"shrink")),t}((r=function(){if(s.resizer){var r=n.options.maintainAspectRatio&&e.parentNode,i=r?r.clientWidth:0;t(_t("resize",n)),r&&r.clientWidth<i&&n.canvas&&t(_t("resize",n))}},o=!1,a=[],function(){a=Array.prototype.slice.call(arguments),i=i||this,o||(o=!0,F.requestAnimFrame.call(window,function(){o=!1,r.apply(i,a)}))}));!function(e,t){var n=e[ft]||(e[ft]={}),r=n.renderProxy=function(e){"chartjs-render-animation"===e.animationName&&t()};F.each(mt,function(t){xt(e,t,r)}),n.reflow=!!e.offsetParent,e.classList.add(gt)}(e,function(){if(s.resizer){var t=e.parentNode;t&&t!==l.parentNode&&t.insertBefore(l,t.firstChild),l._reset()}})}(r,n,e)},removeEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var i=((n[ft]||{}).proxies||{})[e.id+"_"+t];i&&wt(r,t,i)}else!function(e){var t=e[ft]||{},n=t.resizer;delete t.resizer,function(e){var t=e[ft]||{},n=t.renderProxy;n&&(F.each(mt,function(t){wt(e,t,n)}),delete t.renderProxy),e.classList.remove(gt)}(e),n&&n.parentNode&&n.parentNode.removeChild(n)}(r)}};F.addEvent=xt,F.removeEvent=wt;var St=Et._enabled?Et:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},Ot=F.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},St);j._set("global",{plugins:{}});var Ct={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach(function(e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var r,i,o,a,s,l=this.descriptors(e),c=l.length;for(r=0;r<c;++r)if("function"==typeof(s=(o=(i=l[r]).plugin)[t])&&((a=[e].concat(n||[])).push(i.options),!1===s.apply(o,a)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var n=[],r=[],i=e&&e.config||{},o=i.options&&i.options.plugins||{};return this._plugins.concat(i.plugins||[]).forEach(function(e){if(-1===n.indexOf(e)){var t=e.id,i=o[t];!1!==i&&(!0===i&&(i=F.clone(j.global.plugins[t])),n.push(e),r.push({plugin:e,options:i||{}}))}}),t.descriptors=r,t.id=this._cacheId,r},_invalidate:function(e){delete e.$plugins}},Tt={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=F.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?F.merge(Object.create(null),[j.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){this.defaults.hasOwnProperty(e)&&(this.defaults[e]=F.extend(this.defaults[e],t))},addScalesToLayout:function(e){F.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,dt.addBox(e,t)})}},Mt=F.valueOrDefault,At=F.rtl.getRtlAdapter;j._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:F.noop,title:function(e,t){var n="",r=t.labels,i=r?r.length:0;if(e.length>0){var o=e[0];o.label?n=o.label:o.xLabel?n=o.xLabel:i>0&&o.index<i&&(n=r[o.index])}return n},afterTitle:F.noop,beforeBody:F.noop,beforeLabel:F.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),F.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:F.noop,afterBody:F.noop,beforeFooter:F.noop,footer:F.noop,afterFooter:F.noop}}});var Pt={average:function(e){if(!e.length)return!1;var t,n,r=0,i=0,o=0;for(t=0,n=e.length;t<n;++t){var a=e[t];if(a&&a.hasValue()){var s=a.tooltipPosition();r+=s.x,i+=s.y,++o}}return{x:r/o,y:i/o}},nearest:function(e,t){var n,r,i,o=t.x,a=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){var l=e[n];if(l&&l.hasValue()){var c=l.getCenterPoint(),u=F.distanceBetweenPoints(t,c);u<s&&(s=u,i=l)}}if(i){var d=i.tooltipPosition();o=d.x,a=d.y}return{x:o,y:a}}};function Lt(e,t){return t&&(F.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Nt(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function $t(e){var t=j.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Mt(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Mt(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Mt(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Mt(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Mt(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Mt(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Mt(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Mt(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Mt(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Dt(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function It(e){return Lt([],Nt(e))}var jt=Y.extend({initialize:function(){this._model=$t(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,n=t.callbacks,r=n.beforeTitle.apply(e,arguments),i=n.title.apply(e,arguments),o=n.afterTitle.apply(e,arguments),a=[];return a=Lt(a,Nt(r)),a=Lt(a,Nt(i)),Lt(a,Nt(o))},getBeforeBody:function(){return It(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,r=n._options.callbacks,i=[];return F.each(e,function(e){var o={before:[],lines:[],after:[]};Lt(o.before,Nt(r.beforeLabel.call(n,e,t))),Lt(o.lines,r.label.call(n,e,t)),Lt(o.after,Nt(r.afterLabel.call(n,e,t))),i.push(o)}),i},getAfterBody:function(){return It(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),r=t.footer.apply(e,arguments),i=t.afterFooter.apply(e,arguments),o=[];return o=Lt(o,Nt(n)),o=Lt(o,Nt(r)),Lt(o,Nt(i))},update:function(e){var t,n,r,i,o,a,s,l,c,u,d=this,h=d._options,f=d._model,p=d._model=$t(h),g=d._active,m=d._data,v={xAlign:f.xAlign,yAlign:f.yAlign},y={x:f.x,y:f.y},b={width:f.width,height:f.height},x={x:f.caretX,y:f.caretY};if(g.length){p.opacity=1;var w=[],_=[];x=Pt[h.position].call(d,g,d._eventPosition);var k=[];for(t=0,n=g.length;t<n;++t)k.push((i=void 0,o=void 0,void 0,void 0,l=void 0,c=void 0,u=void 0,i=(r=g[t])._xScale,o=r._yScale||r._scale,a=r._index,s=r._datasetIndex,c=(l=r._chart.getDatasetMeta(s).controller)._getIndexScale(),u=l._getValueScale(),{xLabel:i?i.getLabelForIndex(a,s):"",yLabel:o?o.getLabelForIndex(a,s):"",label:c?""+c.getLabelForIndex(a,s):"",value:u?""+u.getLabelForIndex(a,s):"",index:a,datasetIndex:s,x:r._model.x,y:r._model.y}));h.filter&&(k=k.filter(function(e){return h.filter(e,m)})),h.itemSort&&(k=k.sort(function(e,t){return h.itemSort(e,t,m)})),F.each(k,function(e){w.push(h.callbacks.labelColor.call(d,e,d._chart)),_.push(h.callbacks.labelTextColor.call(d,e,d._chart))}),p.title=d.getTitle(k,m),p.beforeBody=d.getBeforeBody(k,m),p.body=d.getBody(k,m),p.afterBody=d.getAfterBody(k,m),p.footer=d.getFooter(k,m),p.x=x.x,p.y=x.y,p.caretPadding=h.caretPadding,p.labelColors=w,p.labelTextColors=_,p.dataPoints=k,b=function(e,t){var n=e._chart.ctx,r=2*t.yPadding,i=0,o=t.body,a=o.reduce(function(e,t){return e+t.before.length+t.lines.length+t.after.length},0);a+=t.beforeBody.length+t.afterBody.length;var s=t.title.length,l=t.footer.length,c=t.titleFontSize,u=t.bodyFontSize,d=t.footerFontSize;r+=s*c,r+=s?(s-1)*t.titleSpacing:0,r+=s?t.titleMarginBottom:0,r+=a*u,r+=a?(a-1)*t.bodySpacing:0,r+=l?t.footerMarginTop:0,r+=l*d,r+=l?(l-1)*t.footerSpacing:0;var h=0,f=function(e){i=Math.max(i,n.measureText(e).width+h)};return n.font=F.fontString(c,t._titleFontStyle,t._titleFontFamily),F.each(t.title,f),n.font=F.fontString(u,t._bodyFontStyle,t._bodyFontFamily),F.each(t.beforeBody.concat(t.afterBody),f),h=t.displayColors?u+2:0,F.each(o,function(e){F.each(e.before,f),F.each(e.lines,f),F.each(e.after,f)}),h=0,n.font=F.fontString(d,t._footerFontStyle,t._footerFontFamily),F.each(t.footer,f),{width:i+=2*t.xPadding,height:r}}(this,p),y=function(e,t,n,r){var i=e.x,o=e.y,a=e.caretSize,s=e.caretPadding,l=e.cornerRadius,c=n.xAlign,u=n.yAlign,d=a+s,h=l+s;return"right"===c?i-=t.width:"center"===c&&((i-=t.width/2)+t.width>r.width&&(i=r.width-t.width),i<0&&(i=0)),"top"===u?o+=d:o-="bottom"===u?t.height+d:t.height/2,"center"===u?"left"===c?i+=d:"right"===c&&(i-=d):"left"===c?i-=h:"right"===c&&(i+=h),{x:i,y:o}}(p,b,v=function(e,t){var n,r,i,o,a,s=e._model,l=e._chart,c=e._chart.chartArea,u="center",d="center";s.y<t.height?d="top":s.y>l.height-t.height&&(d="bottom");var h=(c.left+c.right)/2,f=(c.top+c.bottom)/2;"center"===d?(n=function(e){return e<=h},r=function(e){return e>h}):(n=function(e){return e<=t.width/2},r=function(e){return e>=l.width-t.width/2}),i=function(e){return e+t.width+s.caretSize+s.caretPadding>l.width},o=function(e){return e-t.width-s.caretSize-s.caretPadding<0},a=function(e){return e<=f?"top":"bottom"},n(s.x)?(u="left",i(s.x)&&(u="center",d=a(s.y))):r(s.x)&&(u="right",o(s.x)&&(u="center",d=a(s.y)));var p=e._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:d}}(this,b),d._chart)}else p.opacity=0;return p.xAlign=v.xAlign,p.yAlign=v.yAlign,p.x=y.x,p.y=y.y,p.width=b.width,p.height=b.height,p.caretX=x.x,p.caretY=x.y,d._model=p,e&&h.custom&&h.custom.call(d,p),d},drawCaret:function(e,t){var n=this._chart.ctx,r=this._view,i=this.getCaretPosition(e,t,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(e,t,n){var r,i,o,a,s,l,c=n.caretSize,u=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=e.x,p=e.y,g=t.width,m=t.height;if("center"===h)s=p+m/2,"left"===d?(i=(r=f)-c,o=r,a=s+c,l=s-c):(i=(r=f+g)+c,o=r,a=s-c,l=s+c);else if("left"===d?(r=(i=f+u+c)-c,o=i+c):"right"===d?(r=(i=f+g-u-c)-c,o=i+c):(r=(i=n.caretX)-c,o=i+c),"top"===h)s=(a=p)-c,l=a;else{s=(a=p+m)+c,l=a;var v=o;o=r,r=v}return{x1:r,x2:i,x3:o,y1:a,y2:s,y3:l}},drawTitle:function(e,t,n){var r,i,o,a=t.title,s=a.length;if(s){var l=At(t.rtl,t.x,t.width);for(e.x=Dt(t,t._titleAlign),n.textAlign=l.textAlign(t._titleAlign),n.textBaseline="middle",r=t.titleFontSize,i=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=F.fontString(r,t._titleFontStyle,t._titleFontFamily),o=0;o<s;++o)n.fillText(a[o],l.x(e.x),e.y+r/2),e.y+=r+i,o+1===s&&(e.y+=t.titleMarginBottom-i)}},drawBody:function(e,t,n){var r,i,o,a,s,l,c,u,d=t.bodyFontSize,h=t.bodySpacing,f=t._bodyAlign,p=t.body,g=t.displayColors,m=0,v=g?Dt(t,"left"):0,y=At(t.rtl,t.x,t.width),b=function(t){n.fillText(t,y.x(e.x+m),e.y+d/2),e.y+=d+h},x=y.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=F.fontString(d,t._bodyFontStyle,t._bodyFontFamily),e.x=Dt(t,x),n.fillStyle=t.bodyFontColor,F.each(t.beforeBody,b),m=g&&"right"!==x?"center"===f?d/2+1:d+2:0,s=0,c=p.length;s<c;++s){for(r=p[s],i=t.labelTextColors[s],o=t.labelColors[s],n.fillStyle=i,F.each(r.before,b),l=0,u=(a=r.lines).length;l<u;++l){if(g){var w=y.x(v);n.fillStyle=t.legendColorBackground,n.fillRect(y.leftForLtr(w,d),e.y,d,d),n.lineWidth=1,n.strokeStyle=o.borderColor,n.strokeRect(y.leftForLtr(w,d),e.y,d,d),n.fillStyle=o.backgroundColor,n.fillRect(y.leftForLtr(y.xPlus(w,1),d-2),e.y+1,d-2,d-2),n.fillStyle=i}b(a[l])}F.each(r.after,b)}m=0,F.each(t.afterBody,b),e.y-=h},drawFooter:function(e,t,n){var r,i,o=t.footer,a=o.length;if(a){var s=At(t.rtl,t.x,t.width);for(e.x=Dt(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=s.textAlign(t._footerAlign),n.textBaseline="middle",r=t.footerFontSize,n.fillStyle=t.footerFontColor,n.font=F.fontString(r,t._footerFontStyle,t._footerFontFamily),i=0;i<a;++i)n.fillText(o[i],s.x(e.x),e.y+r/2),e.y+=r+t.footerSpacing}},drawBackground:function(e,t,n,r){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var i=t.xAlign,o=t.yAlign,a=e.x,s=e.y,l=r.width,c=r.height,u=t.cornerRadius;n.beginPath(),n.moveTo(a+u,s),"top"===o&&this.drawCaret(e,r),n.lineTo(a+l-u,s),n.quadraticCurveTo(a+l,s,a+l,s+u),"center"===o&&"right"===i&&this.drawCaret(e,r),n.lineTo(a+l,s+c-u),n.quadraticCurveTo(a+l,s+c,a+l-u,s+c),"bottom"===o&&this.drawCaret(e,r),n.lineTo(a+u,s+c),n.quadraticCurveTo(a,s+c,a,s+c-u),"center"===o&&"left"===i&&this.drawCaret(e,r),n.lineTo(a,s+u),n.quadraticCurveTo(a,s,a+u,s),n.closePath(),n.fill(),t.borderWidth>0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},r={x:t.x,y:t.y},i=Math.abs(t.opacity<.001)?0:t.opacity,o=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&o&&(e.save(),e.globalAlpha=i,this.drawBackground(r,t,e,n),r.y+=t.yPadding,F.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),F.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&n._active.reverse()),(t=!F.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),qt=Pt,Rt=jt;Rt.positioners=qt;var zt=F.valueOrDefault;function Bt(){return F.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){if("xAxes"===e||"yAxes"===e){var i,o,a,s=n[e].length;for(t[e]||(t[e]=[]),i=0;i<s;++i)a=n[e][i],o=zt(a.type,"xAxes"===e?"category":"linear"),i>=t[e].length&&t[e].push({}),!t[e][i].type||a.type&&a.type!==t[e][i].type?F.merge(t[e][i],[Tt.getScaleDefaults(o),a]):F.merge(t[e][i],a)}else F._merger(e,t,n,r)}})}function Ft(){return F.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){var i=t[e]||Object.create(null),o=n[e];"scales"===e?t[e]=Bt(i,o):"scale"===e?t[e]=F.merge(i,[Tt.getScaleDefaults(o.type),o]):F._merger(e,t,n,r)}})}function Ht(e){var t=e.options;F.each(e.scales,function(t){dt.removeBox(e,t)}),t=Ft(j.global,j[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Wt(e,t,n){var r,i=function(e){return e.id===r};do{r=t+n++}while(F.findIndex(e,i)>=0);return r}function Vt(e){return"top"===e||"bottom"===e}function Ut(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}j._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Gt=function(e,t){return this.construct(e,t),this};F.extend(Gt.prototype,{construct:function(e,t){var n=this;t=function(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Ft(j.global,j[e.type],e.options||{}),e}(t);var r=Ot.acquireContext(e,t),i=r&&r.canvas,o=i&&i.height,a=i&&i.width;n.id=F.uid(),n.ctx=r,n.canvas=i,n.config=t,n.width=a,n.height=o,n.aspectRatio=o?a/o:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Gt.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),r&&i?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return Ct.notify(e,"beforeInit"),F.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),Ct.notify(e,"afterInit"),e},clear:function(){return F.canvas.clear(this),this},stop:function(){return Z.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,i=n.maintainAspectRatio&&t.aspectRatio||null,o=Math.max(0,Math.floor(F.getMaximumWidth(r))),a=Math.max(0,Math.floor(i?o/i:F.getMaximumHeight(r)));if((t.width!==o||t.height!==a)&&(r.width=t.width=o,r.height=t.height=a,r.style.width=o+"px",r.style.height=a+"px",F.retinaScale(t,n.devicePixelRatio),!e)){var s={width:o,height:a};Ct.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;F.each(t.xAxes,function(e,n){e.id||(e.id=Wt(t.xAxes,"x-axis-",n))}),F.each(t.yAxes,function(e,n){e.id||(e.id=Wt(t.yAxes,"y-axis-",n))}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},r=[],i=Object.keys(n).reduce(function(e,t){return e[t]=!1,e},{});t.scales&&(r=r.concat((t.scales.xAxes||[]).map(function(e){return{options:e,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(e){return{options:e,dtype:"linear",dposition:"left"}}))),t.scale&&r.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),F.each(r,function(t){var r=t.options,o=r.id,a=zt(r.type,t.dtype);Vt(r.position)!==Vt(t.dposition)&&(r.position=t.dposition),i[o]=!0;var s=null;if(o in n&&n[o].type===a)(s=n[o]).options=r,s.ctx=e.ctx,s.chart=e;else{var l=Tt.getScaleConstructor(a);if(!l)return;s=new l({id:o,type:a,options:r,ctx:e.ctx,chart:e}),n[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)}),F.each(i,function(e,t){e||delete n[t]}),e.scales=n,Tt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,r=[],i=n.data.datasets;for(e=0,t=i.length;e<t;e++){var o=i[e],a=n.getDatasetMeta(e),s=o.type||n.config.type;if(a.type&&a.type!==s&&(n.destroyDatasetMeta(e),a=n.getDatasetMeta(e)),a.type=s,a.order=o.order||0,a.index=e,a.controller)a.controller.updateIndex(e),a.controller.linkScales();else{var l=Ye[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(n,e),r.push(a.controller)}}return r},resetElements:function(){var e=this;F.each(e.data.datasets,function(t,n){e.getDatasetMeta(n).controller.reset()},e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t,n,r=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),Ht(r),Ct._invalidate(r),!1!==Ct.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var i=r.buildOrUpdateControllers();for(t=0,n=r.data.datasets.length;t<n;t++)r.getDatasetMeta(t).controller.buildOrUpdateElements();r.updateLayout(),r.options.animation&&r.options.animation.duration&&F.each(i,function(e){e.reset()}),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],Ct.notify(r,"afterUpdate"),r._layers.sort(Ut("z","_idx")),r._bufferedRender?r._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:r.render(e)}},updateLayout:function(){var e=this;!1!==Ct.notify(e,"beforeLayout")&&(dt.update(this,this.width,this.height),e._layers=[],F.each(e.boxes,function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())},e),e._layers.forEach(function(e,t){e._idx=t}),Ct.notify(e,"afterScaleUpdate"),Ct.notify(e,"afterLayout"))},updateDatasets:function(){if(!1!==Ct.notify(this,"beforeDatasetsUpdate")){for(var e=0,t=this.data.datasets.length;e<t;++e)this.updateDataset(e);Ct.notify(this,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this.getDatasetMeta(e),n={meta:t,index:e};!1!==Ct.notify(this,"beforeDatasetUpdate",[n])&&(t.controller._update(),Ct.notify(this,"afterDatasetUpdate",[n]))},render:function(e){var t=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,r=zt(e.duration,n&&n.duration),i=e.lazy;if(!1!==Ct.notify(t,"beforeRender")){var o=function(e){Ct.notify(t,"afterRender"),F.callback(n&&n.onComplete,[e],t)};if(n&&r){var a=new K({numSteps:r/16.66,easing:e.easing||n.easing,render:function(e,t){var n=F.easing.effects[t.easing],r=t.currentStep,i=r/t.numSteps;e.draw(n(i),i,r)},onAnimationProgress:n.onProgress,onAnimationComplete:o});Z.addAnimation(t,a,r,i)}else t.draw(),o(new K({numSteps:0,chart:t}));return t}},draw:function(e){var t,n,r=this;if(r.clear(),F.isNullOrUndef(e)&&(e=1),r.transition(e),!(r.width<=0||r.height<=0)&&!1!==Ct.notify(r,"beforeDraw",[e])){for(n=r._layers,t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(r.chartArea);for(r.drawDatasets(e);t<n.length;++t)n[t].draw(r.chartArea);r._drawTooltip(e),Ct.notify(r,"afterDraw",[e])}},transition:function(e){for(var t=0,n=(this.data.datasets||[]).length;t<n;++t)this.isDatasetVisible(t)&&this.getDatasetMeta(t).controller.transition(e);this.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var t,n,r=[];for(t=0,n=(this.data.datasets||[]).length;t<n;++t)e&&!this.isDatasetVisible(t)||r.push(this.getDatasetMeta(t));return r.sort(Ut("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var t,n;if(!1!==Ct.notify(this,"beforeDatasetsDraw",[e])){for(n=(t=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(t[n],e);Ct.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};!1!==Ct.notify(this,"beforeDatasetDraw",[n])&&(e.controller.draw(t),Ct.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};!1!==Ct.notify(this,"beforeTooltipDraw",[n])&&(t.draw(),Ct.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return tt.modes.single(this,e)},getElementsAtEvent:function(e){return tt.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return tt.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var r=tt.modes[t];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return tt.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],r=n._meta&&n._meta[t];r&&(r.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,r=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);r&&(n.unbindEvents(),F.canvas.clear(n),Ot.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Ct.notify(n,"destroy"),delete Gt.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new Rt({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};F.each(e.options.events,function(r){Ot.addEventListener(e,r,n),t[r]=n}),e.options.responsive&&(n=function(){e.resize()},Ot.addEventListener(e,"resize",n),t.resize=n)},unbindEvents:function(){var e=this,t=e._listeners;t&&(delete e._listeners,F.each(t,function(t,n){Ot.removeEventListener(e,n,t)}))},updateHoverStyle:function(e,t,n){var r,i,o,a=n?"set":"remove";for(i=0,o=e.length;i<o;++i)(r=e[i])&&this.getDatasetMeta(r._datasetIndex).controller[a+"HoverStyle"](r);"dataset"===t&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+a+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,n=t.tooltip;if(!1!==Ct.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var r=t.handleEvent(e);n&&(r=n._start?n.handleEvent(e):r|n.handleEvent(e)),Ct.notify(t,"afterEvent",[e]);var i=t._bufferedRequest;return i?t.render(i):r&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,r=n.options||{},i=r.hover;return n.lastActive=n.lastActive||[],"mouseout"===e.type?n.active=[]:n.active=n.getElementsAtEventForMode(e,i.mode,i),F.callback(r.onHover||r.hover.onHover,[e.native,n.active],n),"mouseup"!==e.type&&"click"!==e.type||r.onClick&&r.onClick.call(n,e.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,i.mode,!1),n.active.length&&i.mode&&n.updateHoverStyle(n.active,i.mode,!0),t=!F.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),Gt.instances={};var Yt=Gt;function Xt(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Kt(e){this.options=e||{}}Gt.Controller=Gt,Gt.types={},F.configMerge=Ft,F.scaleMerge=Bt,F.extend(Kt.prototype,{formats:Xt,parse:Xt,format:Xt,add:Xt,diff:Xt,startOf:Xt,endOf:Xt,_create:function(e){return e}}),Kt.override=function(e){F.extend(Kt.prototype,e)};var Zt={_date:Kt},Qt={formatters:{values:function(e){return F.isArray(e)?e:""+e},linear:function(e,t,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&e!==Math.floor(e)&&(r=e-Math.floor(e));var i=F.log10(Math.abs(r)),o="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var a=F.log10(Math.abs(e)),s=Math.floor(a)-Math.floor(i);s=Math.max(Math.min(s,20),0),o=e.toExponential(s)}else{var l=-1*Math.floor(i);l=Math.max(Math.min(l,20),0),o=e.toFixed(l)}else o="0";return o},logarithmic:function(e,t,n){var r=e/Math.pow(10,Math.floor(F.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===n.length-1?e.toExponential():""}}},Jt=F.isArray,en=F.isNullOrUndef,tn=F.valueOrDefault,nn=F.valueAtIndexOrDefault;function rn(e,t,n){var r,i=e.getTicks().length,o=Math.min(t,i-1),a=e.getPixelForTick(o),s=e._startPixel,l=e._endPixel;if(!(n&&(r=1===i?Math.max(a-s,l-a):0===t?(e.getPixelForTick(1)-a)/2:(a-e.getPixelForTick(o-1))/2,(a+=o<t?r:-r)<s-1e-6||a>l+1e-6)))return a}function on(e){return e.drawTicks?e.tickMarkLength:0}function an(e){var t,n;return e.display?(t=F.options._parseFont(e),n=F.options.toPadding(e.padding),t.lineHeight+n.height):0}function sn(e,t){return F.extend(F.options._parseFont({fontFamily:tn(t.fontFamily,e.fontFamily),fontSize:tn(t.fontSize,e.fontSize),fontStyle:tn(t.fontStyle,e.fontStyle),lineHeight:tn(t.lineHeight,e.lineHeight)}),{color:F.options.resolve([t.fontColor,e.fontColor,j.global.defaultFontColor])})}function ln(e){var t=sn(e,e.minor);return{minor:t,major:e.major.enabled?sn(e,e.major):t}}function cn(e){var t,n,r,i=[];for(n=0,r=e.length;n<r;++n)void 0!==(t=e[n])._index&&i.push(t);return i}function un(e,t,n,r){var i,o,a,s,l=tn(n,0),c=Math.min(tn(r,e.length),e.length),u=0;for(t=Math.ceil(t),r&&(t=(i=r-n)/Math.floor(i/t)),s=l;s<0;)u++,s=Math.round(l+u*t);for(o=Math.max(l,0);o<c;o++)a=e[o],o===s?(a._index=o,u++,s=Math.round(l+u*t)):delete a.label}j._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Qt.formatters.values,minor:{},major:{}}});var dn=Y.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){F.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var r,i,o,a,s,l=this,c=l.options.ticks,u=c.sampleSize;if(l.beforeUpdate(),l.maxWidth=e,l.maxHeight=t,l.margins=F.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),a=l.buildTicks()||[],(!(a=l.afterBuildTicks(a)||a)||!a.length)&&l.ticks)for(a=[],r=0,i=l.ticks.length;r<i;++r)a.push({value:l.ticks[r],major:!1});return l._ticks=a,s=u<a.length,o=l._convertTicksToLabels(s?function(e,t){for(var n=[],r=e.length/t,i=0,o=e.length;i<o;i+=r)n.push(e[Math.floor(i)]);return n}(a,u):a),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=c.display&&(c.autoSkip||"auto"===c.source)?l._autoSkip(a):a,s&&(o=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=o,l.afterUpdate(),l.minSize},_configure:function(){var e,t,n=this,r=n.options.ticks.reverse;n.isHorizontal()?(e=n.left,t=n.right):(e=n.top,t=n.bottom,r=!r),n._startPixel=e,n._endPixel=t,n._reversePixels=r,n._length=t-e},afterUpdate:function(){F.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){F.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){F.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){F.callback(this.options.beforeDataLimits,[this])},determineDataLimits:F.noop,afterDataLimits:function(){F.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){F.callback(this.options.beforeBuildTicks,[this])},buildTicks:F.noop,afterBuildTicks:function(e){var t=this;return Jt(e)&&e.length?F.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=F.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){F.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this.options.ticks;this.ticks=this.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){F.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){F.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e,t,n,r,i,o,a,s=this,l=s.options,c=l.ticks,u=s.getTicks().length,d=c.minRotation||0,h=c.maxRotation,f=d;!s._isVisible()||!c.display||d>=h||u<=1||!s.isHorizontal()?s.labelRotation=d:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,r=Math.min(s.maxWidth,s.chart.width-t),t+6>(i=l.offset?s.maxWidth/u:r/(u-1))&&(i=r/(u-(l.offset?.5:1)),o=s.maxHeight-on(l.gridLines)-c.padding-an(l.scaleLabel),a=Math.sqrt(t*t+n*n),f=F.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/i,1)),Math.asin(Math.min(o/a,1))-Math.asin(n/a))),f=Math.max(d,Math.min(h,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){F.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){F.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,r=e.options,i=r.ticks,o=r.scaleLabel,a=r.gridLines,s=e._isVisible(),l="bottom"===r.position,c=e.isHorizontal();if(c?t.width=e.maxWidth:s&&(t.width=on(a)+an(o)),c?s&&(t.height=on(a)+an(o)):t.height=e.maxHeight,i.display&&s){var u=ln(i),d=e._getLabelSizes(),h=d.first,f=d.last,p=d.widest,g=d.highest,m=.4*u.minor.lineHeight,v=i.padding;if(c){var y=0!==e.labelRotation,b=F.toRadians(e.labelRotation),x=Math.cos(b),w=Math.sin(b),_=w*p.width+x*(g.height-(y?g.offset:0))+(y?0:m);t.height=Math.min(e.maxHeight,t.height+_+v);var k,E,S=e.getPixelForTick(0)-e.left,O=e.right-e.getPixelForTick(e.getTicks().length-1);y?(k=l?x*h.width+w*h.offset:w*(h.height-h.offset),E=l?w*(f.height-f.offset):x*f.width+w*f.offset):(k=h.width/2,E=f.width/2),e.paddingLeft=Math.max((k-S)*e.width/(e.width-S),0)+3,e.paddingRight=Math.max((E-O)*e.width/(e.width-O),0)+3}else{var C=i.mirror?0:p.width+v+m;t.width=Math.min(e.maxWidth,t.width+C),e.paddingTop=h.height/2,e.paddingBottom=f.height/2}}e.handleMargins(),c?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){F.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(en(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,r,i=this;for(i.ticks=e.map(function(e){return e.value}),i.beforeTickToLabelConversion(),t=i.convertTicksToLabels(e)||i.ticks,i.afterTickToLabelConversion(),n=0,r=e.length;n<r;++n)e[n].label=t[n];return t},_getLabelSizes:function(){var e=this,t=e._labelSizes;return t||(e._labelSizes=t=function(e,t,n,r){var i,o,a,s,l,c,u,d,h,f,p,g,m,v=n.length,y=[],b=[],x=[],w=0,_=0;for(i=0;i<v;++i){if(s=n[i].label,l=n[i].major?t.major:t.minor,e.font=c=l.string,u=r[c]=r[c]||{data:{},gc:[]},d=l.lineHeight,h=f=0,en(s)||Jt(s)){if(Jt(s))for(o=0,a=s.length;o<a;++o)p=s[o],en(p)||Jt(p)||(h=F.measureText(e,u.data,u.gc,h,p),f+=d)}else h=F.measureText(e,u.data,u.gc,h,s),f=d;y.push(h),b.push(f),x.push(d/2),w=Math.max(h,w),_=Math.max(f,_)}function k(e){return{width:y[e]||0,height:b[e]||0,offset:x[e]||0}}return function(e,t){F.each(e,function(e){var n,r=e.gc,i=r.length/2;if(i>t){for(n=0;n<i;++n)delete e.data[r[n]];r.splice(0,i)}})}(r,v),g=y.indexOf(w),m=b.indexOf(_),{first:k(0),last:k(v-1),widest:k(g),highest:k(m)}}(e.ctx,ln(e.options.ticks),e.getTicks(),e.longestTextCache),e.longestLabelWidth=t.widest.width),t},_parseValue:function(e){var t,n,r,i;return Jt(e)?(t=+this.getRightValue(e[0]),n=+this.getRightValue(e[1]),r=Math.min(t,n),i=Math.max(t,n)):(t=void 0,n=e=+this.getRightValue(e),r=e,i=e),{min:r,max:i,start:t,end:n}},_getScaleLabel:function(e){var t=this._parseValue(e);return void 0!==t.start?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:F.noop,getPixelForValue:F.noop,getValueForPixel:F.noop,getPixelForTick:function(e){var t=this.options.offset,n=this._ticks.length,r=1/Math.max(n-(t?0:1),1);return e<0||e>n-1?null:this.getPixelForDecimal(e*r+(t?r/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,n,r,i,o=this.options.ticks,a=this._length,s=o.maxTicksLimit||a/this._tickSize()+1,l=o.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;t<n;t++)e[t].major&&r.push(t);return r}(e):[],c=l.length,u=l[0],d=l[c-1];if(c>s)return function(e,t,n){var r,i,o=0,a=t[0];for(n=Math.ceil(n),r=0;r<e.length;r++)i=e[r],r===a?(i._index=r,a=t[++o*n]):delete i.label}(e,l,c/s),cn(e);if(r=function(e,t,n,r){var i,o,a,s,l=function(e){var t,n,r=e.length;if(r<2)return!1;for(n=e[0],t=1;t<r;++t)if(e[t]-e[t-1]!==n)return!1;return n}(e),c=(t.length-1)/r;if(!l)return Math.max(c,1);for(a=0,s=(i=F.math._factorize(l)).length-1;a<s;a++)if((o=i[a])>c)return o;return Math.max(c,1)}(l,e,0,s),c>0){for(t=0,n=c-1;t<n;t++)un(e,r,l[t],l[t+1]);return i=c>1?(d-u)/(c-1):null,un(e,r,F.isNullOrUndef(i)?0:u-i,u),un(e,r,d,F.isNullOrUndef(i)?e.length:d+i),cn(e)}return un(e,r),cn(e)},_tickSize:function(){var e=this.options.ticks,t=F.toRadians(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),i=this._getLabelSizes(),o=e.autoSkipPadding||0,a=i?i.widest.width+o:0,s=i?i.highest.height+o:0;return this.isHorizontal()?s*n>a*r?a/n:s/r:s*r<a*n?s/n:a/r},_isVisible:function(){var e,t,n,r=this.chart,i=this.options.display;if("auto"!==i)return!!i;for(e=0,t=r.data.datasets.length;e<t;++e)if(r.isDatasetVisible(e)&&((n=r.getDatasetMeta(e)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(e){var t,n,r,i,o,a,s,l,c,u,d,h,f,p,g,m,v,y=this,b=y.chart,x=y.options,w=x.gridLines,_=x.position,k=w.offsetGridLines,E=y.isHorizontal(),S=y._ticksToDraw,O=S.length+(k?1:0),C=on(w),T=[],M=w.drawBorder?nn(w.lineWidth,0,0):0,A=M/2,P=F._alignPixel,L=function(e){return P(b,e,M)};for("top"===_?(t=L(y.bottom),s=y.bottom-C,c=t-A,d=L(e.top)+A,f=e.bottom):"bottom"===_?(t=L(y.top),d=e.top,f=L(e.bottom)-A,s=t+A,c=y.top+C):"left"===_?(t=L(y.right),a=y.right-C,l=t-A,u=L(e.left)+A,h=e.right):(t=L(y.left),u=e.left,h=L(e.right)-A,a=t+A,l=y.left+C),n=0;n<O;++n)r=S[n]||{},en(r.label)&&n<S.length||(n===y.zeroLineIndex&&x.offset===k?(p=w.zeroLineWidth,g=w.zeroLineColor,m=w.zeroLineBorderDash||[],v=w.zeroLineBorderDashOffset||0):(p=nn(w.lineWidth,n,1),g=nn(w.color,n,"rgba(0,0,0,0.1)"),m=w.borderDash||[],v=w.borderDashOffset||0),void 0!==(i=rn(y,r._index||n,k))&&(o=P(b,i,p),E?a=l=u=h=o:s=c=d=f=o,T.push({tx1:a,ty1:s,tx2:l,ty2:c,x1:u,y1:d,x2:h,y2:f,width:p,color:g,borderDash:m,borderDashOffset:v})));return T.ticksLength=O,T.borderValue=t,T},_computeLabelItems:function(){var e,t,n,r,i,o,a,s,l,c,u,d,h=this,f=h.options,p=f.ticks,g=f.position,m=p.mirror,v=h.isHorizontal(),y=h._ticksToDraw,b=ln(p),x=p.padding,w=on(f.gridLines),_=-F.toRadians(h.labelRotation),k=[];for("top"===g?(o=h.bottom-w-x,a=_?"left":"center"):"bottom"===g?(o=h.top+w+x,a=_?"right":"center"):"left"===g?(i=h.right-(m?0:w)-x,a=m?"left":"right"):(i=h.left+(m?0:w)+x,a=m?"right":"left"),e=0,t=y.length;e<t;++e)r=(n=y[e]).label,en(r)||(s=h.getPixelForTick(n._index||e)+p.labelOffset,c=(l=n.major?b.major:b.minor).lineHeight,u=Jt(r)?r.length:1,v?(i=s,d="top"===g?((_?1:.5)-u)*c:(_?0:.5)*c):(o=s,d=(1-u)*c/2),k.push({x:i,y:o,rotation:_,label:r,font:l,textOffset:d,textAlign:a}));return k},_drawGrid:function(e){var t=this,n=t.options.gridLines;if(n.display){var r,i,o,a,s,l=t.ctx,c=t.chart,u=F._alignPixel,d=n.drawBorder?nn(n.lineWidth,0,0):0,h=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));for(o=0,a=h.length;o<a;++o)r=(s=h[o]).width,i=s.color,r&&i&&(l.save(),l.lineWidth=r,l.strokeStyle=i,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(d){var f,p,g,m,v=d,y=nn(n.lineWidth,h.ticksLength-1,1),b=h.borderValue;t.isHorizontal()?(f=u(c,t.left,v)-v/2,p=u(c,t.right,y)+y/2,g=m=b):(g=u(c,t.top,v)-v/2,m=u(c,t.bottom,y)+y/2,f=p=b),l.lineWidth=d,l.strokeStyle=nn(n.color,0),l.beginPath(),l.moveTo(f,g),l.lineTo(p,m),l.stroke()}}},_drawLabels:function(){var e=this;if(e.options.ticks.display){var t,n,r,i,o,a,s,l,c=e.ctx,u=e._labelItems||(e._labelItems=e._computeLabelItems());for(t=0,r=u.length;t<r;++t){if(a=(o=u[t]).font,c.save(),c.translate(o.x,o.y),c.rotate(o.rotation),c.font=a.string,c.fillStyle=a.color,c.textBaseline="middle",c.textAlign=o.textAlign,s=o.label,l=o.textOffset,Jt(s))for(n=0,i=s.length;n<i;++n)c.fillText(""+s[n],0,l),l+=a.lineHeight;else c.fillText(s,0,l);c.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,n=e.options,r=n.scaleLabel;if(r.display){var i,o,a=tn(r.fontColor,j.global.defaultFontColor),s=F.options._parseFont(r),l=F.options.toPadding(r.padding),c=s.lineHeight/2,u=n.position,d=0;if(e.isHorizontal())i=e.left+e.width/2,o="bottom"===u?e.bottom-c-l.bottom:e.top+c+l.top;else{var h="left"===u;i=h?e.left+c+l.top:e.right-c-l.top,o=e.top+e.height/2,d=h?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(i,o),t.rotate(d),t.textAlign="center",t.textBaseline="middle",t.fillStyle=a,t.font=s.string,t.fillText(r.labelString,0,0),t.restore()}},draw:function(e){this._isVisible()&&(this._drawGrid(e),this._drawTitle(),this._drawLabels())},_layers:function(){var e=this,t=e.options,n=t.ticks&&t.ticks.z||0,r=t.gridLines&&t.gridLines.z||0;return e._isVisible()&&n!==r&&e.draw===e._draw?[{z:r,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:n,draw:function(){e._drawLabels.apply(e,arguments)}}]:[{z:n,draw:function(){e.draw.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(e){var t=this,n=t.isHorizontal();return t.chart._getSortedVisibleDatasetMetas().filter(function(r){return(!e||r.type===e)&&(n?r.xAxisID===t.id:r.yAxisID===t.id)})}});dn.prototype._draw=dn.prototype.draw;var hn=dn,fn=F.isNullOrUndef,pn=hn.extend({determineDataLimits:function(){var e,t=this,n=t._getLabels(),r=t.options.ticks,i=r.min,o=r.max,a=0,s=n.length-1;void 0!==i&&(e=n.indexOf(i))>=0&&(a=e),void 0!==o&&(e=n.indexOf(o))>=0&&(s=e),t.minIndex=a,t.maxIndex=s,t.min=n[a],t.max=n[s]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,n=this.maxIndex;this.ticks=0===t&&n===e.length-1?e:e.slice(t,n+1)},getLabelForIndex:function(e,t){var n=this.chart;return n.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;hn.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var r,i,o,a=this;return fn(t)||fn(n)||(e=a.chart.data.datasets[n].data[t]),fn(e)||(r=a.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(i=a._getLabels(),e=F.valueOrDefault(r,e),t=-1!==(o=i.indexOf(e))?o:t,isNaN(t)&&(t=e)),a.getPixelForDecimal((t-a._startValue)/a._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}});pn._defaults={position:"bottom"};var gn=F.noop,mn=F.isNullOrUndef,vn=hn.extend({getRightValue:function(e){return"string"==typeof e?+e:hn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=F.sign(e.min),r=F.sign(e.max);n<0&&r<0?e.max=0:n>0&&r>0&&(e.min=0)}var i=void 0!==t.min||void 0!==t.suggestedMin,o=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),i!==o&&e.min>=e.max&&(i?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,r=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:gn,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:F.valueOrDefault(t.fixedStepSize,t.stepSize)},i=e.ticks=function(e,t){var n,r,i,o,a=[],s=e.stepSize,l=s||1,c=e.maxTicks-1,u=e.min,d=e.max,h=e.precision,f=t.min,p=t.max,g=F.niceNum((p-f)/c/l)*l;if(g<1e-14&&mn(u)&&mn(d))return[f,p];(o=Math.ceil(p/g)-Math.floor(f/g))>c&&(g=F.niceNum(o*g/c/l)*l),s||mn(h)?n=Math.pow(10,F._decimalPlaces(g)):(n=Math.pow(10,h),g=Math.ceil(g*n)/n),r=Math.floor(f/g)*g,i=Math.ceil(p/g)*g,s&&(!mn(u)&&F.almostWhole(u/g,g/1e3)&&(r=u),!mn(d)&&F.almostWhole(d/g,g/1e3)&&(i=d)),o=(i-r)/g,o=F.almostEquals(o,Math.round(o),g/1e3)?Math.round(o):Math.ceil(o),r=Math.round(r*n)/n,i=Math.round(i*n)/n,a.push(mn(u)?r:u);for(var m=1;m<o;++m)a.push(Math.round((r+m*g)*n)/n);return a.push(mn(d)?i:d),a}(r,e);e.handleDirectionalChanges(),e.max=F.max(i),e.min=F.min(i),t.reverse?(i.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),hn.prototype.convertTicksToLabels.call(e)},_configure:function(){var e,t=this,n=t.getTicks(),r=t.min,i=t.max;hn.prototype._configure.call(t),t.options.offset&&n.length&&(r-=e=(i-r)/Math.max(n.length-1,1)/2,i+=e),t._startValue=r,t._endValue=i,t._valueRange=i-r}}),yn={position:"left",ticks:{callback:Qt.formatters.linear}};function bn(e,t,n,r){var i,o,a=e.options,s=function(e,t,n){var r=[n.type,void 0===t&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===e[r]&&(e[r]={pos:[],neg:[]}),e[r]}(t,a.stacked,n),l=s.pos,c=s.neg,u=r.length;for(i=0;i<u;++i)o=e._parseValue(r[i]),isNaN(o.min)||isNaN(o.max)||n.data[i].hidden||(l[i]=l[i]||0,c[i]=c[i]||0,a.relativePoints?l[i]=100:o.min<0||o.max<0?c[i]+=o.min:l[i]+=o.max)}function xn(e,t,n){var r,i,o=n.length;for(r=0;r<o;++r)i=e._parseValue(n[r]),isNaN(i.min)||isNaN(i.max)||t.data[r].hidden||(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}var wn=vn.extend({determineDataLimits:function(){var e,t,n,r,i=this,o=i.options,a=i.chart.data.datasets,s=i._getMatchingVisibleMetas(),l=o.stacked,c={},u=s.length;if(i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,void 0===l)for(e=0;!l&&e<u;++e)l=void 0!==(t=s[e]).stack;for(e=0;e<u;++e)n=a[(t=s[e]).index].data,l?bn(i,c,t,n):xn(i,t,n);F.each(c,function(e){r=e.pos.concat(e.neg),i.min=Math.min(i.min,F.min(r)),i.max=Math.max(i.max,F.max(r))}),i.min=F.isFinite(i.min)&&!isNaN(i.min)?i.min:0,i.max=F.isFinite(i.max)&&!isNaN(i.max)?i.max:1,i.handleTickRangeOptions()},_computeTickLimit:function(){var e;return this.isHorizontal()?Math.ceil(this.width/40):(e=F.options._parseFont(this.options.ticks),Math.ceil(this.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){return this.getPixelForDecimal((+this.getRightValue(e)-this._startValue)/this._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}}),_n=yn;wn._defaults=_n;var kn=F.valueOrDefault,En=F.math.log10,Sn={position:"left",ticks:{callback:Qt.formatters.logarithmic}};function On(e,t){return F.isFinite(e)&&e>=0?e:t}var Cn=hn.extend({determineDataLimits:function(){var e,t,n,r,i,o,a=this,s=a.options,l=a.chart,c=l.data.datasets,u=a.isHorizontal();function d(e){return u?e.xAxisID===a.id:e.yAxisID===a.id}a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,a.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(e=0;e<c.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&d(t)&&void 0!==t.stack){h=!0;break}if(s.stacked||h){var f={};for(e=0;e<c.length;e++){var p=[(t=l.getDatasetMeta(e)).type,void 0===s.stacked&&void 0===t.stack?e:"",t.stack].join(".");if(l.isDatasetVisible(e)&&d(t))for(void 0===f[p]&&(f[p]=[]),i=0,o=(r=c[e].data).length;i<o;i++){var g=f[p];n=a._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||t.data[i].hidden||n.min<0||n.max<0||(g[i]=g[i]||0,g[i]+=n.max)}}F.each(f,function(e){if(e.length>0){var t=F.min(e),n=F.max(e);a.min=Math.min(a.min,t),a.max=Math.max(a.max,n)}})}else for(e=0;e<c.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&d(t))for(i=0,o=(r=c[e].data).length;i<o;i++)n=a._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||t.data[i].hidden||n.min<0||n.max<0||(a.min=Math.min(n.min,a.min),a.max=Math.max(n.max,a.max),0!==n.min&&(a.minNotZero=Math.min(n.min,a.minNotZero)));a.min=F.isFinite(a.min)?a.min:null,a.max=F.isFinite(a.max)?a.max:null,a.minNotZero=F.isFinite(a.minNotZero)?a.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=On(t.min,e.min),e.max=On(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(En(e.min))-1),e.max=Math.pow(10,Math.floor(En(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(En(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(En(e.min))+1):10),null===e.minNotZero&&(e.min>0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(En(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),r={min:On(t.min),max:On(t.max)},i=e.ticks=function(e,t){var n,r,i=[],o=kn(e.min,Math.pow(10,Math.floor(En(t.min)))),a=Math.floor(En(t.max)),s=Math.ceil(t.max/Math.pow(10,a));0===o?(n=Math.floor(En(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,n)),i.push(o),o=r*Math.pow(10,n)):(n=Math.floor(En(o)),r=Math.floor(o/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{i.push(o),10==++r&&(r=1,l=++n>=0?1:l),o=Math.round(r*Math.pow(10,n)*l)/l}while(n<a||n===a&&r<s);var c=kn(e.max,o);return i.push(c),i}(r,e);e.max=F.max(i),e.min=F.min(i),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&i.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),hn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(En(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;hn.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=kn(e.options.ticks.fontSize,j.global.defaultFontSize)/e._length),e._startValue=En(t),e._valueOffset=n,e._valueRange=(En(e.max)-En(t))/(1-n)},getPixelForValue:function(e){var t=this,n=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(n=(En(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(n)},getValueForPixel:function(e){var t=this,n=t.getDecimalForPixel(e);return 0===n&&0===t.min?0:Math.pow(10,t._startValue+(n-t._valueOffset)*t._valueRange)}}),Tn=Sn;Cn._defaults=Tn;var Mn=F.valueOrDefault,An=F.valueAtIndexOrDefault,Pn=F.options.resolve,Ln={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Qt.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Nn(e){var t=e.ticks;return t.display&&e.display?Mn(t.fontSize,j.global.defaultFontSize)+2*t.backdropPaddingY:0}function $n(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function Dn(e){return 0===e||180===e?"center":e<180?"left":"right"}function In(e,t,n,r){var i,o,a=n.y+r/2;if(F.isArray(t))for(i=0,o=t.length;i<o;++i)e.fillText(t[i],n.x,a),a+=r;else e.fillText(t,n.x,a)}function jn(e,t,n){90===e||270===e?n.y-=t.h/2:(e>270||e<90)&&(n.y-=t.h)}function qn(e){return F.isNumber(e)?e:0}var Rn=vn.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Nn(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;F.each(t.data.datasets,function(i,o){if(t.isDatasetVisible(o)){var a=t.getDatasetMeta(o);F.each(i.data,function(t,i){var o=+e.getRightValue(t);isNaN(o)||a.data[i].hidden||(n=Math.min(o,n),r=Math.max(o,r))})}}),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=r===Number.NEGATIVE_INFINITY?0:r,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Nn(this.options))},convertTicksToLabels:function(){var e=this;vn.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=F.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""})},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,n,r,i=F.options._parseFont(e.options.pointLabels),o={l:0,r:e.width,t:0,b:e.height-e.paddingTop},a={};e.ctx.font=i.string,e._pointLabelSizes=[];var s,l,c,u=e.chart.data.labels.length;for(t=0;t<u;t++){r=e.getPointPosition(t,e.drawingArea+5),s=e.ctx,l=i.lineHeight,c=e.pointLabels[t],n=F.isArray(c)?{w:F.longestText(s,s.font,c),h:c.length*l}:{w:s.measureText(c).width,h:l},e._pointLabelSizes[t]=n;var d=e.getIndexAngle(t),h=F.toDegrees(d)%360,f=$n(h,r.x,n.w,0,180),p=$n(h,r.y,n.h,90,270);f.start<o.l&&(o.l=f.start,a.l=d),f.end>o.r&&(o.r=f.end,a.r=d),p.start<o.t&&(o.t=p.start,a.t=d),p.end>o.b&&(o.b=p.end,a.b=d)}e.setReductions(e.drawingArea,o,a)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var r=this,i=t.l/Math.sin(n.l),o=Math.max(t.r-r.width,0)/Math.sin(n.r),a=-t.t/Math.cos(n.t),s=-Math.max(t.b-(r.height-r.paddingTop),0)/Math.cos(n.b);i=qn(i),o=qn(o),a=qn(a),s=qn(s),r.drawingArea=Math.min(Math.floor(e-(i+o)/2),Math.floor(e-(a+s)/2)),r.setCenterPoint(i,o,a,s)},setCenterPoint:function(e,t,n,r){var i=this,o=i.width-t-i.drawingArea,a=e+i.drawingArea,s=n+i.drawingArea,l=i.height-i.paddingTop-r-i.drawingArea;i.xCenter=Math.floor((a+o)/2+i.left),i.yCenter=Math.floor((s+l)/2+i.top+i.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(F.isNullOrUndef(e))return NaN;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,n=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0)},_drawGrid:function(){var e,t,n,r=this,i=r.ctx,o=r.options,a=o.gridLines,s=o.angleLines,l=Mn(s.lineWidth,a.lineWidth),c=Mn(s.color,a.color);if(o.pointLabels.display&&function(e){var t=e.ctx,n=e.options,r=n.pointLabels,i=Nn(n),o=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),a=F.options._parseFont(r);t.save(),t.font=a.string,t.textBaseline="middle";for(var s=e.chart.data.labels.length-1;s>=0;s--){var l=0===s?i/2:0,c=e.getPointPosition(s,o+l+5),u=An(r.fontColor,s,j.global.defaultFontColor);t.fillStyle=u;var d=e.getIndexAngle(s),h=F.toDegrees(d);t.textAlign=Dn(h),jn(h,e._pointLabelSizes[s],c),In(t,e.pointLabels[s],c,a.lineHeight)}t.restore()}(r),a.display&&F.each(r.ticks,function(e,n){0!==n&&(t=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(e,t,n,r){var i,o=e.ctx,a=t.circular,s=e.chart.data.labels.length,l=An(t.color,r-1),c=An(t.lineWidth,r-1);if((a||s)&&l&&c){if(o.save(),o.strokeStyle=l,o.lineWidth=c,o.setLineDash&&(o.setLineDash(t.borderDash||[]),o.lineDashOffset=t.borderDashOffset||0),o.beginPath(),a)o.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{i=e.getPointPosition(0,n),o.moveTo(i.x,i.y);for(var u=1;u<s;u++)i=e.getPointPosition(u,n),o.lineTo(i.x,i.y)}o.closePath(),o.stroke(),o.restore()}}(r,a,t,n))}),s.display&&l&&c){for(i.save(),i.lineWidth=l,i.strokeStyle=c,i.setLineDash&&(i.setLineDash(Pn([s.borderDash,a.borderDash,[]])),i.lineDashOffset=Pn([s.borderDashOffset,a.borderDashOffset,0])),e=r.chart.data.labels.length-1;e>=0;e--)t=r.getDistanceFromCenterForValue(o.ticks.reverse?r.min:r.max),n=r.getPointPosition(e,t),i.beginPath(),i.moveTo(r.xCenter,r.yCenter),i.lineTo(n.x,n.y),i.stroke();i.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var r,i,o=e.getIndexAngle(0),a=F.options._parseFont(n),s=Mn(n.fontColor,j.global.defaultFontColor);t.save(),t.font=a.string,t.translate(e.xCenter,e.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",F.each(e.ticks,function(o,l){(0!==l||n.reverse)&&(r=e.getDistanceFromCenterForValue(e.ticksAsNumbers[l]),n.showLabelBackdrop&&(i=t.measureText(o).width,t.fillStyle=n.backdropColor,t.fillRect(-i/2-n.backdropPaddingX,-r-a.size/2-n.backdropPaddingY,i+2*n.backdropPaddingX,a.size+2*n.backdropPaddingY)),t.fillStyle=s,t.fillText(o,0,-r))}),t.restore()}},_drawTitle:F.noop}),zn=Ln;Rn._defaults=zn;var Bn=F._deprecated,Fn=F.options.resolve,Hn=F.valueOrDefault,Wn=Number.MIN_SAFE_INTEGER||-9007199254740991,Vn=Number.MAX_SAFE_INTEGER||9007199254740991,Un={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Gn=Object.keys(Un);function Yn(e,t){return e-t}function Xn(e){return F.valueOrDefault(e.time.min,e.ticks.min)}function Kn(e){return F.valueOrDefault(e.time.max,e.ticks.max)}function Zn(e,t,n,r){var i=function(e,t,n){for(var r,i,o,a=0,s=e.length-1;a>=0&&a<=s;){if(i=e[(r=a+s>>1)-1]||null,o=e[r],!i)return{lo:null,hi:o};if(o[t]<n)a=r+1;else{if(!(i[t]>n))return{lo:i,hi:o};s=r-1}}return{lo:o,hi:null}}(e,t,n),o=i.lo?i.hi?i.lo:e[e.length-2]:e[0],a=i.lo?i.hi?i.hi:e[e.length-1]:e[1],s=a[t]-o[t],l=s?(n-o[t])/s:0,c=(a[r]-o[r])*l;return o[r]+c}function Qn(e,t){var n=e._adapter,r=e.options.time,i=r.parser,o=i||r.format,a=t;return"function"==typeof i&&(a=i(a)),F.isFinite(a)||(a="string"==typeof o?n.parse(a,o):n.parse(a)),null!==a?+a:(i||"function"!=typeof o||(a=o(t),F.isFinite(a)||(a=n.parse(a))),a)}function Jn(e,t){if(F.isNullOrUndef(t))return null;var n=e.options.time,r=Qn(e,e.getRightValue(t));return null===r||n.round&&(r=+e._adapter.startOf(r,n.round)),r}function er(e,t,n,r){var i,o,a,s=Gn.length;for(i=Gn.indexOf(e);i<s-1;++i)if(a=(o=Un[Gn[i]]).steps?o.steps:Vn,o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Gn[i];return Gn[s-1]}function tr(e,t,n){var r,i,o=[],a={},s=t.length;for(r=0;r<s;++r)a[i=t[r]]=r,o.push({value:i,major:!1});return 0!==s&&n?function(e,t,n,r){var i,o,a=e._adapter,s=+a.startOf(t[0].value,r),l=t[t.length-1].value;for(i=s;i<=l;i=+a.add(i,1,r))(o=n[i])>=0&&(t[o].major=!0);return t}(e,o,a,n):o}var nr=hn.extend({initialize:function(){this.mergeTicksOptions(),hn.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,n=t.time||(t.time={}),r=e._adapter=new Zt._date(t.adapters.date);return Bn("time scale",n.format,"time.format","time.parser"),Bn("time scale",n.min,"time.min","ticks.min"),Bn("time scale",n.max,"time.max","ticks.max"),F.mergeIf(n.displayFormats,r.formats()),hn.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),hn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,r,i,o,a,s=this,l=s.chart,c=s._adapter,u=s.options,d=u.time.unit||"day",h=Vn,f=Wn,p=[],g=[],m=[],v=s._getLabels();for(e=0,n=v.length;e<n;++e)m.push(Jn(s,v[e]));for(e=0,n=(l.data.datasets||[]).length;e<n;++e)if(l.isDatasetVisible(e))if(i=l.data.datasets[e].data,F.isObject(i[0]))for(g[e]=[],t=0,r=i.length;t<r;++t)o=Jn(s,i[t]),p.push(o),g[e][t]=o;else g[e]=m.slice(0),a||(p=p.concat(m),a=!0);else g[e]=[];m.length&&(h=Math.min(h,m[0]),f=Math.max(f,m[m.length-1])),p.length&&(p=n>1?function(e){var t,n,r,i={},o=[];for(t=0,n=e.length;t<n;++t)i[r=e[t]]||(i[r]=!0,o.push(r));return o}(p).sort(Yn):p.sort(Yn),h=Math.min(h,p[0]),f=Math.max(f,p[p.length-1])),h=Jn(s,Xn(u))||h,f=Jn(s,Kn(u))||f,h=h===Vn?+c.startOf(Date.now(),d):h,f=f===Wn?+c.endOf(Date.now(),d)+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._table=[],s._timestamps={data:p,datasets:g,labels:m}},buildTicks:function(){var e,t,n,r=this,i=r.min,o=r.max,a=r.options,s=a.ticks,l=a.time,c=r._timestamps,u=[],d=r.getLabelCapacity(i),h=s.source,f=a.distribution;for(c="data"===h||"auto"===h&&"series"===f?c.data:"labels"===h?c.labels:function(e,t,n,r){var i,o=e._adapter,a=e.options,s=a.time,l=s.unit||er(s.minUnit,t,n,r),c=Fn([s.stepSize,s.unitStepSize,1]),u="week"===l&&s.isoWeekday,d=t,h=[];if(u&&(d=+o.startOf(d,"isoWeek",u)),d=+o.startOf(d,u?"day":l),o.diff(n,t,l)>1e5*c)throw t+" and "+n+" are too far apart with stepSize of "+c+" "+l;for(i=d;i<n;i=+o.add(i,c,l))h.push(i);return i!==n&&"ticks"!==a.bounds||h.push(i),h}(r,i,o,d),"ticks"===a.bounds&&c.length&&(i=c[0],o=c[c.length-1]),i=Jn(r,Xn(a))||i,o=Jn(r,Kn(a))||o,e=0,t=c.length;e<t;++e)(n=c[e])>=i&&n<=o&&u.push(n);return r.min=i,r.max=o,r._unit=l.unit||(s.autoSkip?er(l.minUnit,r.min,r.max,d):function(e,t,n,r,i){var o,a;for(o=Gn.length-1;o>=Gn.indexOf(n);o--)if(a=Gn[o],Un[a].common&&e._adapter.diff(i,r,a)>=t-1)return a;return Gn[n?Gn.indexOf(n):0]}(r,u.length,l.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(e){for(var t=Gn.indexOf(e)+1,n=Gn.length;t<n;++t)if(Un[Gn[t]].common)return Gn[t]}(r._unit):void 0,r._table=function(e,t,n,r){if("linear"===r||!e.length)return[{time:t,pos:0},{time:n,pos:1}];var i,o,a,s,l,c=[],u=[t];for(i=0,o=e.length;i<o;++i)(s=e[i])>t&&s<n&&u.push(s);for(u.push(n),i=0,o=u.length;i<o;++i)l=u[i+1],a=u[i-1],s=u[i],void 0!==a&&void 0!==l&&Math.round((l+a)/2)===s||c.push({time:s,pos:i/(o-1)});return c}(r._timestamps.data,i,o,f),r._offsets=function(e,t,n,r,i){var o,a,s=0,l=0;return i.offset&&t.length&&(o=Zn(e,"time",t[0],"pos"),s=1===t.length?1-o:(Zn(e,"time",t[1],"pos")-o)/2,a=Zn(e,"time",t[t.length-1],"pos"),l=1===t.length?a:(a-Zn(e,"time",t[t.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(r._table,u,0,0,a),s.reverse&&u.reverse(),tr(r,u,r._majorUnit)},getLabelForIndex:function(e,t){var n=this,r=n._adapter,i=n.chart.data,o=n.options.time,a=i.labels&&e<i.labels.length?i.labels[e]:"",s=i.datasets[t].data[e];return F.isObject(s)&&(a=n.getRightValue(s)),o.tooltipFormat?r.format(Qn(n,a),o.tooltipFormat):"string"==typeof a?a:r.format(Qn(n,a),o.displayFormats.datetime)},tickFormatFunction:function(e,t,n,r){var i=this._adapter,o=this.options,a=o.time.displayFormats,s=a[this._unit],l=this._majorUnit,c=a[l],u=n[t],d=o.ticks,h=l&&c&&u&&u.major,f=i.format(e,r||(h?c:s)),p=h?d.major:d.minor,g=Fn([p.callback,p.userCallback,d.callback,d.userCallback]);return g?g(f,t,n):f},convertTicksToLabels:function(e){var t,n,r=[];for(t=0,n=e.length;t<n;++t)r.push(this.tickFormatFunction(e[t].value,t,e));return r},getPixelForOffset:function(e){var t=this._offsets,n=Zn(this._table,"time",e,"pos");return this.getPixelForDecimal((t.start+n)*t.factor)},getPixelForValue:function(e,t,n){var r=null;if(void 0!==t&&void 0!==n&&(r=this._timestamps.datasets[n][t]),null===r&&(r=Jn(this,e)),null!==r)return this.getPixelForOffset(r)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end,r=Zn(this._table,"pos",n,"time");return this._adapter._create(r)},_getLabelSize:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,r=F.toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(r),o=Math.sin(r),a=Hn(t.fontSize,j.global.defaultFontSize);return{w:n*i+a*o,h:n*o+a*i}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this,n=t.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=t.tickFormatFunction(e,0,tr(t,[e],t._majorUnit),i),a=t._getLabelSize(o),s=Math.floor(t.isHorizontal()?t.width/a.w:t.height/a.h);return t.options.offset&&s--,s>0?s:1}});nr._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var rr={category:pn,linear:wn,logarithmic:Cn,radialLinear:Rn,time:nr},ir={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Zt._date.override("function"==typeof e?{_id:"moment",formats:function(){return ir},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,r){return e(t).add(n,r).valueOf()},diff:function(t,n,r){return e(t).diff(e(n),r)},startOf:function(t,n,r){return t=e(t),"isoWeek"===n?t.isoWeekday(r).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),j._set("global",{plugins:{filler:{propagate:!0}}});var or={dataset:function(e){var t=e.fill,n=e.chart,r=n.getDatasetMeta(t),i=r&&n.isDatasetVisible(t)&&r.dataset._children||[],o=i.length||0;return o?function(e,t){return t<o&&i[t]._view||null}:null},boundary:function(e){var t=e.boundary,n=t?t.x:null,r=t?t.y:null;return F.isArray(t)?function(e,n){return t[n]}:function(e){return{x:null===n?e.x:n,y:null===r?e.y:r}}}};function ar(e,t,n){var r,i=e._model||{},o=i.fill;if(void 0===o&&(o=!!i.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(r=parseFloat(o,10),isFinite(r)&&Math.floor(r)===r)return"-"!==o[0]&&"+"!==o[0]||(r=t+r),!(r===t||r<0||r>=n)&&r;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function sr(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,n,r,i,o,a=e.el._scale,s=a.options,l=a.chart.data.labels.length,c=e.fill,u=[];if(!l)return null;for(t=s.ticks.reverse?a.max:a.min,n=s.ticks.reverse?a.min:a.max,r=a.getPointPositionForValue(0,t),i=0;i<l;++i)o="start"===c||"end"===c?a.getPointPositionForValue(i,"start"===c?t:n):a.getBasePosition(i),s.gridLines.circular&&(o.cx=r.x,o.cy=r.y,o.angle=a.getIndexAngle(i)-Math.PI/2),u.push(o);return u}(e):function(e){var t,n=e.el._model||{},r=e.el._scale||{},i=e.fill,o=null;if(isFinite(i))return null;if("start"===i?o=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===i?o=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:r.getBasePixel&&(o=r.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(F.isFinite(o))return{x:(t=r.isHorizontal())?o:null,y:t?null:o}}return null}(e)}function lr(e,t,n){var r,i=e[t].fill,o=[t];if(!n)return i;for(;!1!==i&&-1===o.indexOf(i);){if(!isFinite(i))return i;if(!(r=e[i]))return!1;if(r.visible)return i;o.push(i),i=r.fill}return!1}function cr(e){var t=e.fill,n="dataset";return!1===t?null:(isFinite(t)||(n="boundary"),or[n](e))}function ur(e){return e&&!e.skip}function dr(e,t,n,r,i){var o,a,s,l;if(r&&i){for(e.moveTo(t[0].x,t[0].y),o=1;o<r;++o)F.canvas.lineTo(e,t[o-1],t[o]);if(void 0===n[0].angle)for(e.lineTo(n[i-1].x,n[i-1].y),o=i-1;o>0;--o)F.canvas.lineTo(e,n[o],n[o-1],!0);else for(a=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-a,2)+Math.pow(n[0].y-s,2)),o=i-1;o>0;--o)e.arc(a,s,l,n[o].angle,n[o-1].angle,!0)}}function hr(e,t,n,r,i,o){var a,s,l,c,u,d,h,f,p=t.length,g=r.spanGaps,m=[],v=[],y=0,b=0;for(e.beginPath(),a=0,s=p;a<s;++a)u=n(c=t[l=a%p]._view,l,r),d=ur(c),h=ur(u),o&&void 0===f&&d&&(s=p+(f=a+1)),d&&h?(y=m.push(c),b=v.push(u)):y&&b&&(g?(d&&m.push(c),h&&v.push(u)):(dr(e,m,v,y,b),y=b=0,m=[],v=[]));dr(e,m,v,y,b),e.closePath(),e.fillStyle=i,e.fill()}var fr={id:"filler",afterDatasetsUpdate:function(e,t){var n,r,i,o,a=(e.data.datasets||[]).length,s=t.propagate,l=[];for(r=0;r<a;++r)o=null,(i=(n=e.getDatasetMeta(r)).dataset)&&i._model&&i instanceof be.Line&&(o={visible:e.isDatasetVisible(r),fill:ar(i,r,a),chart:e,el:i}),n.$filler=o,l.push(o);for(r=0;r<a;++r)(o=l[r])&&(o.fill=lr(l,r,s),o.boundary=sr(o),o.mapper=cr(o))},beforeDatasetsDraw:function(e){var t,n,r,i,o,a,s,l=e._getSortedVisibleDatasetMetas(),c=e.ctx;for(n=l.length-1;n>=0;--n)(t=l[n].$filler)&&t.visible&&(i=(r=t.el)._view,o=r._children||[],a=t.mapper,s=i.backgroundColor||j.global.defaultColor,a&&s&&o.length&&(F.canvas.clipArea(c,e.chartArea),hr(c,o,a,i,s,r._loop),F.canvas.unclipArea(c)))}},pr=F.rtl.getRtlAdapter,gr=F.noop,mr=F.valueOrDefault;function vr(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}j._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,i=r.getDatasetMeta(n);i.hidden=null===i.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},r=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map(function(n){var i=n.controller.getStyle(r?0:void 0);return{text:t[n.index].label,fillStyle:i.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}},this)}}},legendCallback:function(e){var t,n,r,i=document.createElement("ul"),o=e.data.datasets;for(i.setAttribute("class",e.id+"-legend"),t=0,n=o.length;t<n;t++)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[t].backgroundColor,o[t].label&&r.appendChild(document.createTextNode(o[t].label));return i.outerHTML}});var yr=Y.extend({initialize:function(e){F.extend(this,e),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:gr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:gr,beforeSetDimensions:gr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:gr,beforeBuildLabels:gr,buildLabels:function(){var e=this,t=e.options.labels||{},n=F.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter(function(n){return t.filter(n,e.chart.data)})),e.options.reverse&&n.reverse(),e.legendItems=n},afterBuildLabels:gr,beforeFit:gr,fit:function(){var e=this,t=e.options,n=t.labels,r=t.display,i=e.ctx,o=F.options._parseFont(n),a=o.size,s=e.legendHitBoxes=[],l=e.minSize,c=e.isHorizontal();if(c?(l.width=e.maxWidth,l.height=r?10:0):(l.width=r?10:0,l.height=e.maxHeight),r){if(i.font=o.string,c){var u=e.lineWidths=[0],d=0;i.textAlign="left",i.textBaseline="middle",F.each(e.legendItems,function(e,t){var r=vr(n,a)+a/2+i.measureText(e.text).width;(0===t||u[u.length-1]+r+2*n.padding>l.width)&&(d+=a+n.padding,u[u.length-(t>0?0:1)]=0),s[t]={left:0,top:0,width:r,height:a},u[u.length-1]+=r+n.padding}),l.height+=d}else{var h=n.padding,f=e.columnWidths=[],p=e.columnHeights=[],g=n.padding,m=0,v=0;F.each(e.legendItems,function(e,t){var r=vr(n,a)+a/2+i.measureText(e.text).width;t>0&&v+a+2*h>l.height&&(g+=m+n.padding,f.push(m),p.push(v),m=0,v=0),m=Math.max(m,r),v+=a+h,s[t]={left:0,top:0,width:r,height:a}}),g+=m,f.push(m),p.push(v),l.width+=g}e.width=l.width,e.height=l.height}else e.width=l.width=e.height=l.height=0},afterFit:gr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,r=j.global,i=r.defaultColor,o=r.elements.line,a=e.height,s=e.columnHeights,l=e.width,c=e.lineWidths;if(t.display){var u,d=pr(t.rtl,e.left,e.minSize.width),h=e.ctx,f=mr(n.fontColor,r.defaultFontColor),p=F.options._parseFont(n),g=p.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=p.string;var m=vr(n,g),v=e.legendHitBoxes,y=function(e,r){switch(t.align){case"start":return n.padding;case"end":return e-r;default:return(e-r+n.padding)/2}},b=e.isHorizontal();u=b?{x:e.left+y(l,c[0]),y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+y(a,s[0]),line:0},F.rtl.overrideTextDirection(e.ctx,t.textDirection);var x=g+n.padding;F.each(e.legendItems,function(t,r){var f=h.measureText(t.text).width,p=m+g/2+f,w=u.x,_=u.y;d.setWidth(e.minSize.width),b?r>0&&w+p+n.padding>e.left+e.minSize.width&&(_=u.y+=x,u.line++,w=u.x=e.left+y(l,c[u.line])):r>0&&_+x>e.top+e.minSize.height&&(w=u.x=w+e.columnWidths[u.line]+n.padding,u.line++,_=u.y=e.top+y(a,s[u.line]));var k=d.x(w);!function(e,t,r){if(!(isNaN(m)||m<=0)){h.save();var a=mr(r.lineWidth,o.borderWidth);if(h.fillStyle=mr(r.fillStyle,i),h.lineCap=mr(r.lineCap,o.borderCapStyle),h.lineDashOffset=mr(r.lineDashOffset,o.borderDashOffset),h.lineJoin=mr(r.lineJoin,o.borderJoinStyle),h.lineWidth=a,h.strokeStyle=mr(r.strokeStyle,i),h.setLineDash&&h.setLineDash(mr(r.lineDash,o.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=d.xPlus(e,m/2),c=t+g/2;F.canvas.drawPoint(h,r.pointStyle,s,l,c,r.rotation)}else h.fillRect(d.leftForLtr(e,m),t,m,g),0!==a&&h.strokeRect(d.leftForLtr(e,m),t,m,g);h.restore()}}(k,_,t),v[r].left=d.leftForLtr(k,v[r].width),v[r].top=_,function(e,t,n,r){var i=g/2,o=d.xPlus(e,m+i),a=t+i;h.fillText(n.text,o,a),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(o,a),h.lineTo(d.xPlus(o,r),a),h.stroke())}(k,_,t,f),b?u.x+=p+n.padding:u.y+=x}),F.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var n,r,i,o=this;if(e>=o.left&&e<=o.right&&t>=o.top&&t<=o.bottom)for(i=o.legendHitBoxes,n=0;n<i.length;++n)if(e>=(r=i[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return o.legendItems[n];return null},handleEvent:function(e){var t,n=this,r=n.options,i="mouseup"===e.type?"click":e.type;if("mousemove"===i){if(!r.onHover&&!r.onLeave)return}else{if("click"!==i)return;if(!r.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===i?t&&r.onClick&&r.onClick.call(n,e.native,t):(r.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),r.onHover&&t&&r.onHover.call(n,e.native,t))}});function br(e,t){var n=new yr({ctx:e.ctx,options:t,chart:e});dt.configure(e,n,t),dt.addBox(e,n),e.legend=n}var xr={id:"legend",_element:yr,beforeInit:function(e){var t=e.options.legend;t&&br(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(F.mergeIf(t,j.global.legend),n?(dt.configure(e,n,t),n.options=t):br(e,t)):n&&(dt.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},wr=F.noop;j._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var _r=Y.extend({initialize:function(e){F.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:wr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:wr,beforeSetDimensions:wr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:wr,beforeBuildLabels:wr,buildLabels:wr,afterBuildLabels:wr,beforeFit:wr,fit:function(){var e,t=this,n=t.options,r=t.minSize={},i=t.isHorizontal();n.display?(e=(F.isArray(n.text)?n.text.length:1)*F.options._parseFont(n).lineHeight+2*n.padding,t.width=r.width=i?t.maxWidth:e,t.height=r.height=i?e:t.maxHeight):t.width=r.width=t.height=r.height=0},afterFit:wr,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var r,i,o,a=F.options._parseFont(n),s=a.lineHeight,l=s/2+n.padding,c=0,u=e.top,d=e.left,h=e.bottom,f=e.right;t.fillStyle=F.valueOrDefault(n.fontColor,j.global.defaultFontColor),t.font=a.string,e.isHorizontal()?(i=d+(f-d)/2,o=u+l,r=f-d):(i="left"===n.position?d+l:f-l,o=u+(h-u)/2,r=h-u,c=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(i,o),t.rotate(c),t.textAlign="center",t.textBaseline="middle";var p=n.text;if(F.isArray(p))for(var g=0,m=0;m<p.length;++m)t.fillText(p[m],0,g,r),g+=s;else t.fillText(p,0,0,r);t.restore()}}});function kr(e,t){var n=new _r({ctx:e.ctx,options:t,chart:e});dt.configure(e,n,t),dt.addBox(e,n),e.titleBlock=n}var Er={},Sr=fr,Or=xr,Cr={id:"title",_element:_r,beforeInit:function(e){var t=e.options.title;t&&kr(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?(F.mergeIf(t,j.global.title),n?(dt.configure(e,n,t),n.options=t):kr(e,t)):n&&(dt.removeBox(e,n),delete e.titleBlock)}};for(var Tr in Er.filler=Sr,Er.legend=Or,Er.title=Cr,Yt.helpers=F,function(){function e(e,t,n){var r;return"string"==typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}function t(e){return null!=e&&"none"!==e}function n(n,r,i){var o=document.defaultView,a=F._getParentNode(n),s=o.getComputedStyle(n)[r],l=o.getComputedStyle(a)[r],c=t(s),u=t(l),d=Number.POSITIVE_INFINITY;return c||u?Math.min(c?e(s,n,i):d,u?e(l,a,i):d):"none"}F.where=function(e,t){if(F.isArray(e)&&Array.prototype.filter)return e.filter(t);var n=[];return F.each(e,function(e){t(e)&&n.push(e)}),n},F.findIndex=Array.prototype.findIndex?function(e,t,n){return e.findIndex(t,n)}:function(e,t,n){n=void 0===n?e:n;for(var r=0,i=e.length;r<i;++r)if(t.call(n,e[r],r,e))return r;return-1},F.findNextWhere=function(e,t,n){F.isNullOrUndef(n)&&(n=-1);for(var r=n+1;r<e.length;r++){var i=e[r];if(t(i))return i}},F.findPreviousWhere=function(e,t,n){F.isNullOrUndef(n)&&(n=e.length);for(var r=n-1;r>=0;r--){var i=e[r];if(t(i))return i}},F.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},F.almostEquals=function(e,t,n){return Math.abs(e-t)<n},F.almostWhole=function(e,t){var n=Math.round(e);return n-t<=e&&n+t>=e},F.max=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.max(e,t)},Number.NEGATIVE_INFINITY)},F.min=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.min(e,t)},Number.POSITIVE_INFINITY)},F.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},F.toRadians=function(e){return e*(Math.PI/180)},F.toDegrees=function(e){return e*(180/Math.PI)},F._decimalPlaces=function(e){if(F.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},F.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),o=Math.atan2(r,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:i}},F.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},F.aliasPixel=function(e){return e%2==0?0:.5},F._alignPixel=function(e,t,n){var r=e.currentDevicePixelRatio,i=n/2;return Math.round((t-i)*r)/r+i},F.splineCurve=function(e,t,n,r){var i=e.skip?t:e,o=t,a=n.skip?t:n,s=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),l=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),c=s/(s+l),u=l/(s+l),d=r*(c=isNaN(c)?0:c),h=r*(u=isNaN(u)?0:u);return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+h*(a.x-i.x),y:o.y+h*(a.y-i.y)}}},F.EPSILON=Number.EPSILON||1e-14,F.splineCurveMonotone=function(e){var t,n,r,i,o,a,s,l,c,u=(e||[]).map(function(e){return{model:e._model,deltaK:0,mK:0}}),d=u.length;for(t=0;t<d;++t)if(!(r=u[t]).model.skip){if(n=t>0?u[t-1]:null,(i=t<d-1?u[t+1]:null)&&!i.model.skip){var h=i.model.x-r.model.x;r.deltaK=0!==h?(i.model.y-r.model.y)/h:0}!n||n.model.skip?r.mK=r.deltaK:!i||i.model.skip?r.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(r.deltaK)?r.mK=0:r.mK=(n.deltaK+r.deltaK)/2}for(t=0;t<d-1;++t)r=u[t],i=u[t+1],r.model.skip||i.model.skip||(F.almostEquals(r.deltaK,0,this.EPSILON)?r.mK=i.mK=0:(o=r.mK/r.deltaK,a=i.mK/r.deltaK,(l=Math.pow(o,2)+Math.pow(a,2))<=9||(s=3/Math.sqrt(l),r.mK=o*s*r.deltaK,i.mK=a*s*r.deltaK)));for(t=0;t<d;++t)(r=u[t]).model.skip||(n=t>0?u[t-1]:null,i=t<d-1?u[t+1]:null,n&&!n.model.skip&&(c=(r.model.x-n.model.x)/3,r.model.controlPointPreviousX=r.model.x-c,r.model.controlPointPreviousY=r.model.y-c*r.mK),i&&!i.model.skip&&(c=(i.model.x-r.model.x)/3,r.model.controlPointNextX=r.model.x+c,r.model.controlPointNextY=r.model.y+c*r.mK))},F.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},F.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},F.niceNum=function(e,t){var n=Math.floor(F.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},F.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},F.getRelativePosition=function(e,t){var n,r,i=e.originalEvent||e,o=e.target||e.srcElement,a=o.getBoundingClientRect(),s=i.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=i.clientX,r=i.clientY);var l=parseFloat(F.getStyle(o,"padding-left")),c=parseFloat(F.getStyle(o,"padding-top")),u=parseFloat(F.getStyle(o,"padding-right")),d=parseFloat(F.getStyle(o,"padding-bottom")),h=a.right-a.left-l-u,f=a.bottom-a.top-c-d;return{x:n=Math.round((n-a.left-l)/h*o.width/t.currentDevicePixelRatio),y:r=Math.round((r-a.top-c)/f*o.height/t.currentDevicePixelRatio)}},F.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},F.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},F._calculatePadding=function(e,t,n){return(t=F.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},F._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},F.getMaximumWidth=function(e){var t=F._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,r=n-F._calculatePadding(t,"padding-left",n)-F._calculatePadding(t,"padding-right",n),i=F.getConstraintWidth(e);return isNaN(i)?r:Math.min(r,i)},F.getMaximumHeight=function(e){var t=F._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,r=n-F._calculatePadding(t,"padding-top",n)-F._calculatePadding(t,"padding-bottom",n),i=F.getConstraintHeight(e);return isNaN(i)?r:Math.min(r,i)},F.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},F.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=e.canvas,i=e.height,o=e.width;r.height=i*n,r.width=o*n,e.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=i+"px",r.style.width=o+"px")}},F.fontString=function(e,t,n){return t+" "+e+"px "+n},F.longestText=function(e,t,n,r){var i=(r=r||{}).data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.font=t;var a,s,l,c,u,d=0,h=n.length;for(a=0;a<h;a++)if(null!=(c=n[a])&&!0!==F.isArray(c))d=F.measureText(e,i,o,d,c);else if(F.isArray(c))for(s=0,l=c.length;s<l;s++)null==(u=c[s])||F.isArray(u)||(d=F.measureText(e,i,o,d,u));var f=o.length/2;if(f>n.length){for(a=0;a<f;a++)delete i[o[a]];o.splice(0,f)}return d},F.measureText=function(e,t,n,r,i){var o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r},F.numberOfLabelLines=function(e){var t=1;return F.each(e,function(e){F.isArray(e)&&e.length>t&&(t=e.length)}),t},F.color=w?function(e){return e instanceof CanvasGradient&&(e=j.global.defaultColor),w(e)}:function(e){return console.error("Color.js not found!"),e},F.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:F.color(e).saturate(.5).darken(.1).rgbString()}}(),Yt._adapters=Zt,Yt.Animation=K,Yt.animationService=Z,Yt.controllers=Ye,Yt.DatasetController=ne,Yt.defaults=j,Yt.Element=Y,Yt.elements=be,Yt.Interaction=tt,Yt.layouts=dt,Yt.platform=Ot,Yt.plugins=Ct,Yt.Scale=hn,Yt.scaleService=Tt,Yt.Ticks=Qt,Yt.Tooltip=Rt,Yt.helpers.each(rr,function(e,t){Yt.scaleService.registerScaleType(t,e,e._defaults)}),Er)Er.hasOwnProperty(Tr)&&Yt.plugins.register(Er[Tr]);Yt.platform.initialize();var Mr=Yt;return"undefined"!=typeof window&&(window.Chart=Yt),Yt.Chart=Yt,Yt.Legend=Er.legend._element,Yt.Title=Er.title._element,Yt.pluginService=Yt.plugins,Yt.PluginBase=Yt.Element.extend({}),Yt.canvasHelpers=Yt.helpers.canvas,Yt.layoutService=Yt.layouts,Yt.LinearScaleBase=vn,Yt.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(e){Yt[e]=function(t,n){return new Yt(t,Yt.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}}),Mr}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n}:e(jQuery)}(function(e){var t,n,r,i,o,a,s,l,c,u,d,h,f,p,g=((_=e&&e.fn&&e.fn.select2&&e.fn.select2.amd?e.fn.select2.amd:_)&&_.requirejs||(_?n=_:_={},l={},c={},u={},d={},h=Object.prototype.hasOwnProperty,f=[].slice,p=/\.js$/,a=function(e,t){var n,r,i=x(e),o=i[0];t=t[1];return e=i[1],o&&(n=b(o=v(o,t))),o?e=n&&n.normalize?n.normalize(e,(r=t,function(e){return v(e,r)})):v(e,t):(o=(i=x(e=v(e,t)))[0],e=i[1],o&&(n=b(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},s={require:function(e){return y(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:(t=e,function(){return u&&u.config&&u.config[t]||{}})};var t}},i=function(e,t,n,i){var o,u,h,f,p,g=[],v=typeof n,x=w(i=i||e);if("undefined"==v||"function"==v){for(t=!t.length&&n.length?["require","exports","module"]:t,f=0;f<t.length;f+=1)if("require"===(u=(h=a(t[f],x)).f))g[f]=s.require(e);else if("exports"===u)g[f]=s.exports(e),p=!0;else if("module"===u)o=g[f]=s.module(e);else if(m(l,u)||m(c,u)||m(d,u))g[f]=b(u);else{if(!h.p)throw new Error(e+" missing "+u);h.p.load(h.n,y(i,!0),function(e){return function(t){l[e]=t}}(u),{}),g[f]=l[u]}v=n?n.apply(l[e],g):void 0,e&&(o&&o.exports!==r&&o.exports!==l[e]?l[e]=o.exports:v===r&&p||(l[e]=v))}else e&&(l[e]=n)},t=n=o=function(e,t,n,l,c){if("string"==typeof e)return s[e]?s[e](t):b(a(e,w(t)).f);if(!e.splice){if((u=e).deps&&o(u.deps,u.callback),!t)return;t.splice?(e=t,t=n,n=null):e=r}return t=t||function(){},"function"==typeof n&&(n=l,l=c),l?i(r,e,t,n):setTimeout(function(){i(r,e,t,n)},4),o},o.config=function(e){return o(e)},t._defined=l,(g=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),m(l,e)||m(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0},_.requirejs=t,_.require=n,_.define=g),_.define("almond",function(){}),_.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),_.define("select2/utils",["jquery"],function(e){var t={};function n(e){var t,n=e.prototype,r=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&r.push(t);return r}function r(){this.listeners={}}t.Extend=function(e,t){var n,r={}.hasOwnProperty;function i(){this.constructor=e}for(n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var r=n(t),i=n(e);function o(){var n=Array.prototype.unshift,r=t.prototype.constructor.length,i=e.prototype.constructor;0<r&&(n.call(arguments,e.prototype.constructor),i=t.prototype.constructor),i.apply(this,arguments)}t.displayName=e.displayName,o.prototype=new function(){this.constructor=o};for(var a=0;a<i.length;a++){var s=i[a];o.prototype[s]=e.prototype[s]}for(var l=0;l<r.length;l++){var c=r[l];o.prototype[c]=function(e){var n=function(){};e in o.prototype&&(n=o.prototype[e]);var r=t.prototype[e];return function(){return Array.prototype.unshift.call(arguments,n),r.apply(this,arguments)}}(c)}return o},r.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},r.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},0===(n=null==n?[]:n).length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},r.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},t.Observable=r,t.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in r||(r[o]={}),i==n.length-1&&(r[o]=e[t]),r=r[o]}delete e[t]}}return e},t.hasScroll=function(t,n){var r=e(n),i=n.style.overflowX,o=n.style.overflowY;return(i!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===i||"scroll"===o||r.innerHeight()<n.scrollHeight||r.innerWidth()<n.scrollWidth)},t.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},t.__cache={};var i=0;return t.GetUniqueElementId=function(e){var n=e.getAttribute("data-select2-id");return null!=n||(n=e.id?"select2-data-"+e.id:"select2-data-"+(++i).toString()+"-"+t.generateChars(4),e.setAttribute("data-select2-id",n)),n},t.StoreData=function(e,n,r){e=t.GetUniqueElementId(e),t.__cache[e]||(t.__cache[e]={}),t.__cache[e][n]=r},t.GetData=function(n,r){var i=t.GetUniqueElementId(n);return r?t.__cache[i]&&null!=t.__cache[i][r]?t.__cache[i][r]:e(n).data(r):t.__cache[i]},t.RemoveData=function(e){var n=t.GetUniqueElementId(e);null!=t.__cache[n]&&delete t.__cache[n],e.removeAttribute("data-select2-id")},t.copyNonInternalCssClasses=function(e,t){var n=(n=e.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0===e.indexOf("select2-")});t=(t=t.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0!==e.indexOf("select2-")}),t=n.concat(t);e.setAttribute("class",t.join(" "))},t}),_.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,r){this.$element=e,this.data=r,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var r=e('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(t.message);r.append(n(i(t.args))),r[0].className+=" select2-results__message",this.$results.append(r)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n];r=this.option(r);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");(0<t.length?t:e).first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current(function(r){var i=r.map(function(e){return e.id.toString()});n.$results.find(".select2-results__option--selectable").each(function(){var n=e(this),r=t.GetData(this,"data"),o=""+r.id;null!=r.element&&r.element.selected||null==r.element&&-1<i.indexOf(o)?(this.classList.add("select2-results__option--selected"),n.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),n.attr("aria-selected","false"))})})},n.prototype.showLoading=function(e){this.hideLoading(),e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},(e=this.option(e)).className+=" loading-results",this.$results.prepend(e)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var r=document.createElement("li");r.classList.add("select2-results__option"),r.classList.add("select2-results__option--selectable");var i,o={role:"option"},a=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(i in(null!=n.element&&a.call(n.element,":disabled")||null==n.element&&n.disabled)&&(o["aria-disabled"]="true",r.classList.remove("select2-results__option--selectable"),r.classList.add("select2-results__option--disabled")),null==n.id&&r.classList.remove("select2-results__option--selectable"),null!=n._resultId&&(r.id=n._resultId),n.title&&(r.title=n.title),n.children&&(o.role="group",o["aria-label"]=n.text,r.classList.remove("select2-results__option--selectable"),r.classList.add("select2-results__option--group")),o){var s=o[i];r.setAttribute(i,s)}if(n.children){var l=e(r),c=document.createElement("strong");c.className="select2-results__group",this.template(n,c);for(var u=[],d=0;d<n.children.length;d++){var h=n.children[d];h=this.option(h);u.push(h)}(a=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"})).append(u),l.append(c),l.append(a)}else this.template(n,r);return t.StoreData(r,"data",n),r},n.prototype.bind=function(n,r){var i=this,o=n.id+"-results";this.$results.attr("id",o),n.on("results:all",function(e){i.clear(),i.append(e.data),n.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),n.on("results:append",function(e){i.append(e.data),n.isOpen()&&i.setClasses()}),n.on("query",function(e){i.hideMessages(),i.showLoading(e)}),n.on("select",function(){n.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),n.on("unselect",function(){n.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),n.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),n.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),n.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),n.on("results:select",function(){var e,n=i.getHighlightedResults();0!==n.length&&(e=t.GetData(n[0],"data"),n.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:e}))}),n.on("results:previous",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),r=n.index(t);r<=0||(e=r-1,0===t.length&&(e=0),(r=n.eq(e)).trigger("mouseenter"),t=i.$results.offset().top,n=r.offset().top,r=i.$results.scrollTop()+(n-t),0===e?i.$results.scrollTop(0):n-t<0&&i.$results.scrollTop(r))}),n.on("results:next",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),r=n.index(t)+1;r>=n.length||((e=n.eq(r)).trigger("mouseenter"),t=i.$results.offset().top+i.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=i.$results.scrollTop()+n-t,0===r?i.$results.scrollTop(0):t<n&&i.$results.scrollTop(e))}),n.on("results:focus",function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")}),n.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY;t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=i.$results.height();t?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option--selectable",function(n){var r=e(this),o=t.GetData(this,"data");r.hasClass("select2-results__option--selected")?i.options.get("multiple")?i.trigger("unselect",{originalEvent:n,data:o}):i.trigger("close",{}):i.trigger("select",{originalEvent:n,data:o})}),this.$results.on("mouseenter",".select2-results__option--selectable",function(n){var r=t.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:r,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e,t,n,r,i=this.getHighlightedResults();0!==i.length&&(e=this.$results.find(".select2-results__option--selectable").index(i),r=this.$results.offset().top,t=i.offset().top,n=this.$results.scrollTop()+(t-r),r=t-r,n-=2*i.outerHeight(!1),e<=2?this.$results.scrollTop(0):(r>this.$results.outerHeight()||r<0)&&this.$results.scrollTop(n))},n.prototype.template=function(t,n){var r=this.options.get("templateResult"),i=this.options.get("escapeMarkup");null==(t=r(t,n))?n.style.display="none":"string"==typeof t?n.innerHTML=i(t):e(n).append(t)},n}),_.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),_.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,t.Observable),r.prototype.render=function(){var n=e('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n},r.prototype.bind=function(e,t){var r=this,i=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){r.trigger("focus",e)}),this.$selection.on("blur",function(e){r._handleBlur(e)}),this.$selection.on("keydown",function(e){r.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){r.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){r.update(e.data)}),e.on("open",function(){r.$selection.attr("aria-expanded","true"),r.$selection.attr("aria-owns",i),r._attachCloseHandler(e)}),e.on("close",function(){r.$selection.attr("aria-expanded","false"),r.$selection.removeAttr("aria-activedescendant"),r.$selection.removeAttr("aria-owns"),r.$selection.trigger("focus"),r._detachCloseHandler(e)}),e.on("enable",function(){r.$selection.attr("tabindex",r._tabindex),r.$selection.attr("aria-disabled","false")}),e.on("disable",function(){r.$selection.attr("tabindex","-1"),r.$selection.attr("aria-disabled","true")})},r.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},r.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,function(n){var r=e(n.target).closest(".select2");e(".select2.select2-container--open").each(function(){this!=r[0]&&t.GetData(this,"element").select2("close")})})},r.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},r.prototype.position=function(e,t){t.find(".selection").append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r}),_.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(e,t){var n=this;i.__super__.bind.apply(this,arguments);var r=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.attr("aria-controls",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){var t,n;0!==e.length?(n=e[0],t=this.$selection.find(".select2-selection__rendered"),e=this.display(n,t),t.empty().append(e),(n=n.title||n.text)?t.attr("title",n):t.removeAttr("title")):this.clear()},i}),_.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function r(e,t){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(t,i){var o=this;r.__super__.bind.apply(this,arguments);var a=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",a),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){var r;o.isDisabled()||(r=e(this).parent(),r=n.GetData(r[0],"data"),o.trigger("unselect",{originalEvent:t,data:r}))}),this.$selection.on("keydown",".select2-selection__choice__remove",function(e){o.isDisabled()||e.stopPropagation()})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],r=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",i=0;i<e.length;i++){var o=e[i],a=this.selectionContainer(),s=this.display(o,a),l=r+n.generateChars(4)+"-";o.id?l+=o.id:l+=n.generateChars(4),a.find(".select2-selection__choice__display").append(s).attr("id",l);var c=o.title||o.text;c&&a.attr("title",c),s=this.options.get("translations").get("removeItem"),(c=a.find(".select2-selection__choice__remove")).attr("title",s()),c.attr("aria-label",s()),c.attr("aria-describedby",l),n.StoreData(a[0],"data",o),t.push(a)}this.$selection.find(".select2-selection__rendered").append(t)}},r}),_.define("select2/selection/placeholder",[],function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t?{id:"",text:t}:t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice"),t=t.title||t.text||n.text(),this.$selection.find(".select2-selection__rendered").attr("title",t),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear(),t=this.createPlaceholder(this.placeholder),this.$selection.find(".select2-selection__rendered").append(t)},e}),_.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(e,t,n){function r(){}return r.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},r.prototype._handleClear=function(e,t){if(!this.isDisabled()){var r=this.$selection.find(".select2-selection__clear");if(0!==r.length){t.stopPropagation();var i=n.GetData(r[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var a={data:i};if(this.trigger("clear",a),a.prevented)this.$element.val(o);else{for(var s=0;s<i.length;s++)if(a={data:i[s]},this.trigger("unselect",a),a.prevented)return void this.$element.val(o);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},r.prototype._handleKeyboardClear=function(e,n,r){r.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},r.prototype.update=function(t,r){var i,o;t.call(this,r),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),0<this.$selection.find(".select2-selection__placeholder").length||0===r.length||(i=this.$selection.find(".select2-selection__rendered").attr("id"),o=this.options.get("translations").get("removeAllItems"),(t=e('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>')).attr("title",o()),t.attr("aria-label",o()),t.attr("aria-describedby",i),n.StoreData(t[0],"data",r),this.$selection.prepend(t),this.$selection[0].classList.add("select2-selection--clearable"))},r}),_.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function r(e,t,n){e.call(this,t,n)}return r.prototype.render=function(t){var n=this.options.get("translations").get("search"),r=e('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');return this.$searchContainer=r,this.$search=r.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),t=t.call(this),this._transferTabIndex(),t.append(this.$searchContainer),t},r.prototype.bind=function(e,r,i){var o=this,a=r.id+"-results",s=r.id+"-container";e.call(this,r,i),o.$search.attr("aria-describedby",s),r.on("open",function(){o.$search.attr("aria-controls",a),o.$search.trigger("focus")}),r.on("close",function(){o.$search.val(""),o.resizeSearch(),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),r.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),r.on("disable",function(){o.$search.prop("disabled",!0)}),r.on("focus",function(e){o.$search.trigger("focus")}),r.on("results:focus",function(e){e.data._resultId?o.$search.attr("aria-activedescendant",e.data._resultId):o.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){var r;e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which!==n.BACKSPACE||""!==o.$search.val()||0<(r=o.$selection.find(".select2-selection__choice").last()).length&&(r=t.GetData(r[0],"data"),o.searchRemoveChoice(r),e.preventDefault())}),this.$selection.on("click",".select2-search--inline",function(e){o.$search.val()&&e.stopPropagation()});var l=(r=document.documentMode)&&r<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){l?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){var t;l&&"input"===e.type?o.$selection.off("input.search input.searchcheck"):(t=e.which)!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)})},r.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},r.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},r.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},r.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},r}),_.define("select2/selection/selectionCss",["../utils"],function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this);return-1!==(t=this.options.get("selectionCssClass")||"").indexOf(":all:")&&(t=t.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(t),n},t}),_.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,r){var i=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],a=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,r),n.on("*",function(t,n){var r;-1!==o.indexOf(t)&&(n=n||{},r=e.Event("select2:"+t,{params:n}),i.$element.trigger(r),-1!==a.indexOf(t)&&(n.prevented=r.isDefaultPrevented()))})},t}),_.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){var r;return e in n._cache||(r=t(e),n._cache[e]=r),new n(n._cache[e])},n}),_.define("select2/diacritics",[],function(){return{"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u0152":"OE","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u0153":"oe","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03ce":"\u03c9","\u03c2":"\u03c3","\u2019":"'"}}),_.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){return t=t.id+"-result-",t+=e.generateChars(4),null!=n.id?t+="-"+n.id.toString():t+="-"+e.generateChars(4),t},t}),_.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,e),r.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(e){return t.item(n(e))}))},r.prototype.select=function(e){var t,n=this;if(e.selected=!0,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(t){var r=[];(e=[e]).push.apply(e,t);for(var i=0;i<e.length;i++){var o=e[i].id;-1===r.indexOf(o)&&r.push(o)}n.$element.val(r),n.$element.trigger("input").trigger("change")}):(t=e.id,this.$element.val(t),this.$element.trigger("input").trigger("change"))},r.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(n){for(var r=[],i=0;i<n.length;i++){var o=n[i].id;o!==e.id&&-1===r.indexOf(o)&&r.push(o)}t.$element.val(r),t.$element.trigger("input").trigger("change")})}},r.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},r.prototype.destroy=function(){this.$element.find("*").each(function(){t.RemoveData(this)})},r.prototype.query=function(e,t){var r=[],i=this;this.$element.children().each(function(){var t;"option"!==this.tagName.toLowerCase()&&"optgroup"!==this.tagName.toLowerCase()||(t=n(this),t=i.item(t),null!==(t=i.matches(e,t))&&r.push(t))}),t({results:r})},r.prototype.addOptions=function(e){this.$element.append(e)},r.prototype.option=function(e){var r;return e.children?(r=document.createElement("optgroup")).label=e.text:void 0!==(r=document.createElement("option")).textContent?r.textContent=e.text:r.innerText=e.text,void 0!==e.id&&(r.value=e.id),e.disabled&&(r.disabled=!0),e.selected&&(r.selected=!0),e.title&&(r.title=e.title),(e=this._normalizeItem(e)).element=r,t.StoreData(r,"data",e),n(r)},r.prototype.item=function(e){var r={};if(null!=(r=t.GetData(e[0],"data")))return r;var i=e[0];if("option"===i.tagName.toLowerCase())r={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===i.tagName.toLowerCase()){r={text:e.prop("label"),children:[],title:e.prop("title")};for(var o=e.children("option"),a=[],s=0;s<o.length;s++){var l=n(o[s]);l=this.item(l);a.push(l)}r.children=a}return(r=this._normalizeItem(r)).element=e[0],t.StoreData(e[0],"data",r),r},r.prototype._normalizeItem=function(e){return e!==Object(e)&&(e={id:e,text:e}),null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},{selected:!1,disabled:!1},e)},r.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},r}),_.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function r(e,t){this._dataToConvert=t.get("data")||[],r.__super__.constructor.call(this,e,t)}return t.Extend(r,e),r.prototype.bind=function(e,t){r.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),r.__super__.select.call(this,e)},r.prototype.convertToOptions=function(e){for(var t=this,r=this.$element.find("option"),i=r.map(function(){return t.item(n(this)).id}).get(),o=[],a=0;a<e.length;a++){var s,l,c=this._normalizeItem(e[a]);0<=i.indexOf(c.id)?(s=r.filter(function(e){return function(){return n(this).val()==e.id}}(c)),l=this.item(s),l=n.extend(!0,{},c,l),l=this.option(l),s.replaceWith(l)):(l=this.option(c),c.children&&(c=this.convertToOptions(c.children),l.append(c)),o.push(l))}return o},r}),_.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function r(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),r.__super__.constructor.call(this,e,t)}return t.Extend(r,e),r.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,r){return(e=n.ajax(e)).then(t),e.fail(r),e}};return n.extend({},t,e,!0)},r.prototype.processResults=function(e){return e},r.prototype.query=function(e,t){var r=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var i=n.extend({type:"GET"},this.ajaxOptions);function o(){var n=i.transport(i,function(n){n=r.processResults(n,e),r.options.get("debug")&&window.console&&console.error&&(n&&n.results&&Array.isArray(n.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(n)},function(){"status"in n&&(0===n.status||"0"===n.status)||r.trigger("results:message",{message:"errorLoading"})});r._request=n}"function"==typeof i.url&&(i.url=i.url.call(this.$element,e)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},r}),_.define("select2/data/tags",["jquery"],function(e){function t(e,t,n){var r=n.get("tags"),i=n.get("createTag");if(void 0!==i&&(this.createTag=i),void 0!==(i=n.get("insertTag"))&&(this.insertTag=i),e.call(this,t,n),Array.isArray(r))for(var o=0;o<r.length;o++){var a=r[o];a=this._normalizeItem(a),a=this.option(a);this.$element.append(a)}}return t.prototype.query=function(e,t,n){var r=this;this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,function e(i,o){for(var a=i.results,s=0;s<a.length;s++){var l=a[s],c=null!=l.children&&!e({results:l.children},!0);if((l.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!o&&(i.data=a,void n(i))}if(o)return!0;var u,d=r.createTag(t);null!=d&&((u=r.option(d)).attr("data-select2-tag","true"),r.addOptions([u]),r.insertTag(a,d)),i.results=a,n(i)}):e.call(this,t,n)},t.prototype.createTag=function(e,t){return null==t.term||""===(t=t.term.trim())?null:{id:t,text:t}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this.$element.find("option[data-select2-tag]").each(function(){this.selected||e(this).remove()})},t}),_.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,r){var i=this;n.term=n.term||"";var o=this.tokenizer(n,this.options,function(t){var n,r=i._normalizeItem(t);i.$element.find("option").filter(function(){return e(this).val()===r.id}).length||((n=i.option(r)).attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([n])),n=r,i.trigger("select",{data:n})});o.term!==n.term&&(this.$search.length&&(this.$search.val(o.term),this.$search.trigger("focus")),n.term=o.term),t.call(this,n,r)},t.prototype.tokenizer=function(t,n,r,i){for(var o=r.get("tokenSeparators")||[],a=n.term,s=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};s<a.length;){var c=a[s];-1!==o.indexOf(c)?(c=a.substr(0,s),null!=(c=l(e.extend({},n,{term:c})))?(i(c),a=a.substr(s+1)||"",s=0):s++):s++}return{term:a}},t}),_.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),_.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),_.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){e=null!=e?e.length:0,0<n.maximumSelectionLength&&e>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()})},e}),_.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),_.define("select2/dropdown/search",["jquery"],function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),r=this.options.get("translations").get("search");t=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=t,this.$search=t.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",r()),n.prepend(t),n},t.prototype.bind=function(t,n,r){var i=this,o=n.id+"-results";t.call(this,n,r),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),n.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",o),i.$search.trigger("focus"),window.setTimeout(function(){i.$search.trigger("focus")},0)}),n.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")}),n.on("focus",function(){n.isOpen()||i.$search.trigger("focus")}),n.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer[0].classList.remove("select2-search--hide"):i.$searchContainer[0].classList.add("select2-search--hide"))}),n.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),_.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t?{id:"",text:t}:t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),_.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&t&&(t=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore())},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),_.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,r){this.$dropdownParent=e(r.get("dropdownParent")||document.body),t.call(this,n,r)}return n.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>");t=t.call(this);return n.append(t),this.$dropdownContainer=n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){var n;this._containerResultsHandlersBound||(n=this,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0)},n.prototype._attachPositioningHandler=function(n,r){var i=this,o="scroll.select2."+r.id,a="resize.select2."+r.id,s="orientationchange.select2."+r.id;(r=this.$container.parents().filter(t.hasScroll)).each(function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),r.on(o,function(n){var r=t.GetData(this,"select2-scroll-position");e(this).scrollTop(r.y)}),e(window).on(o+" "+a+" "+s,function(e){i._positionDropdown(),i._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,r){var i="scroll.select2."+r.id,o="resize.select2."+r.id;r="orientationchange.select2."+r.id;this.$container.parents().filter(t.hasScroll).off(i),e(window).off(i+" "+o+" "+r)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown[0].classList.contains("select2-dropdown--above"),r=this.$dropdown[0].classList.contains("select2-dropdown--below"),i=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=o.top,a.bottom=o.top+a.height;var s=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=l<o.top-s;t=c>o.bottom+s,l={left:o.left,top:a.bottom};"static"===(c=this.$dropdownParent).css("position")&&(c=c.offsetParent()),o={top:0,left:0},(e.contains(document.body,c[0])||c[0].isConnected)&&(o=c.offset()),l.top-=o.top,l.left-=o.left,n||r||(i="below"),t||!u||n?!u&&t&&n&&(i="below"):i="above",("above"==i||n&&"below"!==i)&&(l.top=a.top-o.top-s),null!=i&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+i),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+i)),this.$dropdownContainer.css(l)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),_.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r<t.length;r++){var i=t[r];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),_.define("select2/dropdown/selectOnClose",["../utils"],function(e){function t(){}return t.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(e){r._handleSelectOnClose(e)})},t.prototype._handleSelectOnClose=function(t,n){if(n&&null!=n.originalSelect2Event){var r=n.originalSelect2Event;if("select"===r._type||"unselect"===r._type)return}(r=this.getHighlightedResults()).length<1||null!=(r=e.GetData(r[0],"data")).element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})},t}),_.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),_.define("select2/dropdown/dropdownCss",["../utils"],function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this);return-1!==(t=this.options.get("dropdownCssClass")||"").indexOf(":all:")&&(t=t.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(t),n},t}),_.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(e){function t(){}return t.prototype.highlightFirstItem=function(t){if(0<(n=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)")).length){var n,r=n.first();if((n=e.GetData(r[0],"data").element)&&n.getAttribute&&"true"===n.getAttribute("data-select2-tag"))return void r.trigger("mouseenter")}t.call(this)},t}),_.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum;e="Please delete "+t+" character";return 1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results\u2026"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching\u2026"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}}),_.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function(e,t,n,r,i,o,a,s,l,c,u,d,h,f,p,g,m,v,y,b,x,w,_,k,E,S,O,C,T,M,A){function P(){this.reset()}return P.prototype.apply=function(u){var d;null==(u=e.extend(!0,{},this.defaults,u)).dataAdapter&&(null!=u.ajax?u.dataAdapter=p:null!=u.data?u.dataAdapter=f:u.dataAdapter=h,0<u.minimumInputLength&&(u.dataAdapter=c.Decorate(u.dataAdapter,v)),0<u.maximumInputLength&&(u.dataAdapter=c.Decorate(u.dataAdapter,y)),0<u.maximumSelectionLength&&(u.dataAdapter=c.Decorate(u.dataAdapter,b)),u.tags&&(u.dataAdapter=c.Decorate(u.dataAdapter,g)),null==u.tokenSeparators&&null==u.tokenizer||(u.dataAdapter=c.Decorate(u.dataAdapter,m))),null==u.resultsAdapter&&(u.resultsAdapter=t,null!=u.ajax&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,k)),null!=u.placeholder&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,_)),u.selectOnClose&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,O)),u.tags&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,M))),null==u.dropdownAdapter&&(u.multiple?u.dropdownAdapter=x:(d=c.Decorate(x,w),u.dropdownAdapter=d),0!==u.minimumResultsForSearch&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,S)),u.closeOnSelect&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,C)),null!=u.dropdownCssClass&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,T)),u.dropdownAdapter=c.Decorate(u.dropdownAdapter,E)),null==u.selectionAdapter&&(u.multiple?u.selectionAdapter=r:u.selectionAdapter=n,null!=u.placeholder&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,i)),u.allowClear&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,o)),u.multiple&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,a)),null!=u.selectionCssClass&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,s)),u.selectionAdapter=c.Decorate(u.selectionAdapter,l)),u.language=this._resolveLanguage(u.language),u.language.push("en");for(var A=[],P=0;P<u.language.length;P++){var L=u.language[P];-1===A.indexOf(L)&&A.push(L)}return u.language=A,u.translations=this._processTranslations(u.language,u.debug),u},P.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return d[e]||e})}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:{},matcher:function n(r,i){if(null==r.term||""===r.term.trim())return i;if(i.children&&0<i.children.length){for(var o=e.extend(!0,{},i),a=i.children.length-1;0<=a;a--)null==n(r,i.children[a])&&o.children.splice(a,1);return 0<o.children.length?o:n(r,o)}var s=t(i.text).toUpperCase(),l=t(r.term).toUpperCase();return-1<s.indexOf(l)?i:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},P.prototype.applyFromElement=function(e,t){var n=e.language,r=this.defaults.language,i=t.prop("lang");t=t.closest("[lang]").prop("lang"),t=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r),this._resolveLanguage(t));return e.language=t,e},P.prototype._resolveLanguage=function(t){if(!t)return[];if(e.isEmptyObject(t))return[];if(e.isPlainObject(t))return[t];for(var n,r=Array.isArray(t)?t:[t],i=[],o=0;o<r.length;o++)i.push(r[o]),"string"==typeof r[o]&&0<r[o].indexOf("-")&&(n=r[o].split("-")[0],i.push(n));return i},P.prototype._processTranslations=function(t,n){for(var r=new u,i=0;i<t.length;i++){var o=new u,a=t[i];if("string"==typeof a)try{o=u.loadPath(a)}catch(t){try{a=this.defaults.amdLanguageBase+a,o=u.loadPath(a)}catch(t){n&&window.console&&console.warn&&console.warn('Select2: The language file for "'+a+'" could not be automatically loaded. A fallback will be used instead.')}}else o=e.isPlainObject(a)?new u(a):a;r.extend(o)}return r},P.prototype.set=function(t,n){var r={};r[e.camelCase(t)]=n,r=c._convertData(r),e.extend(!0,this.defaults,r)},new P}),_.define("select2/options",["jquery","./defaults","./utils"],function(e,t,n){function r(e,n){this.options=e,null!=n&&this.fromElement(n),null!=n&&(this.options=t.applyFromElement(this.options,n)),this.options=t.apply(this.options)}return r.prototype.fromElement=function(t){var r=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.autocomplete&&t.prop("autocomplete")&&(this.options.autocomplete=t.prop("autocomplete")),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),n.GetData(t[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),n.StoreData(t[0],"data",n.GetData(t[0],"select2Tags")),n.StoreData(t[0],"tags",!0)),n.GetData(t[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",n.GetData(t[0],"ajaxUrl")),n.StoreData(t[0],"ajax-Url",n.GetData(t[0],"ajaxUrl")));var i={};function o(e,t){return t.toUpperCase()}for(var a=0;a<t[0].attributes.length;a++){var s=t[0].attributes[a].name,l="data-";s.substr(0,l.length)==l&&(s=s.substring(l.length),l=n.GetData(t[0],s),i[s.replace(/-([a-z])/g,o)]=l)}e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset&&(i=e.extend(!0,{},t[0].dataset,i));var c,u=e.extend(!0,{},n.GetData(t[0]),i);for(c in u=n._convertData(u))-1<r.indexOf(c)||(e.isPlainObject(this.options[c])?e.extend(this.options[c],u[c]):this.options[c]=u[c]);return this},r.prototype.get=function(e){return this.options[e]},r.prototype.set=function(e,t){this.options[e]=t},r}),_.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,r){var i=function(e,r){null!=n.GetData(e[0],"select2")&&n.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),r=r||{},this.options=new t(r,e),i.__super__.constructor.call(this);var o=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",o),e.attr("tabindex","-1"),r=this.options.get("dataAdapter"),this.dataAdapter=new r(e,this.options),o=this.render(),this._placeContainer(o),r=this.options.get("selectionAdapter"),this.selection=new r(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,o),r=this.options.get("dropdownAdapter"),this.dropdown=new r(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,o),o=this.options.get("resultsAdapter"),this.results=new o(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var a=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){a.trigger("selection:update",{data:e})}),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"select2",this),e.data("select2",this)};return n.Extend(i,n.Observable),i.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},i.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},i.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t)return(r=e.outerWidth(!1))<=0?"auto":r+"px";if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;if("string"!=typeof(e=e.attr("style")))return null;for(var i=e.split(";"),o=0,a=i.length;o<a;o+=1){var s=i[o].replace(/\s/g,"").match(n);if(null!==s&&1<=s.length)return s[1]}return null},i.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},i.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2",function(t){e.trigger("focus",t)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this._observer=new window.MutationObserver(function(t){e._syncA(),e._syncS(t)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},i.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},i.prototype._registerSelectionEvents=function(){var e=this,t=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(t){e.focus(t)}),this.selection.on("*",function(n,r){-1===t.indexOf(n)&&e.trigger(n,r)})},i.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},i.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},i.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container[0].classList.add("select2-container--open")}),this.on("close",function(){e.$container[0].classList.remove("select2-container--open")}),this.on("enable",function(){e.$container[0].classList.remove("select2-container--disabled")}),this.on("disable",function(){e.$container[0].classList.add("select2-container--disabled")}),this.on("blur",function(){e.$container[0].classList.remove("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===r.ESC||n===r.UP&&t.altKey?(e.close(t),t.preventDefault()):n===r.ENTER||n===r.TAB?(e.trigger("results:select",{}),t.preventDefault()):n===r.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===r.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===r.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===r.ENTER||n===r.SPACE||n===r.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},i.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},i.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&0<e.addedNodes.length){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&0<e.removedNodes.length)return!0;if(Array.isArray(e))return e.some(function(e){return t._isChangeMutation(e)})}return!1},i.prototype._syncSubtree=function(e){e=this._isChangeMutation(e);var t=this;e&&this.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})},i.prototype.trigger=function(e,t){var n=i.__super__.trigger;if(void 0===t&&(t={}),e in(o={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"})){var r=o[e],o={prevented:!1,name:e,args:t};if(n.call(this,r,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},i.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},i.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},i.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},i.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},i.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},i.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),e=!(e=null==e||0===e.length?[!0]:e)[0],this.$element.prop("disabled",e)},i.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},i.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();e=e[0],Array.isArray(e)&&(e=e.map(function(e){return e.toString()})),this.$element.val(e).trigger("input").trigger("change")},i.prototype.destroy=function(){n.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},i.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},i}),_.define("jquery-mousewheel",["jquery"],function(e){return e}),_.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(e,t,n,r,i){var o;return null==e.fn.select2&&(o=["open","close","destroy"],e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var r=e.extend(!0,{},t);new n(e(this),r)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var r,a=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=i.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),r=e[t].apply(e,a)}),-1<o.indexOf(t)?this:r}),null==e.fn.select2.defaults&&(e.fn.select2.defaults=r),n}),{define:_.define,require:_.require});function m(e,t){return h.call(e,t)}function v(e,t){var n,r,i,o,a,s,l,c,d,h,f=t&&t.split("/"),g=u.map,m=g&&g["*"]||{};if(e){for(t=(e=e.split("/")).length-1,u.nodeIdCompat&&p.test(e[t])&&(e[t]=e[t].replace(p,"")),"."===e[0].charAt(0)&&f&&(e=f.slice(0,f.length-1).concat(e)),c=0;c<e.length;c++)"."===(h=e[c])?(e.splice(c,1),--c):".."===h&&(0===c||1===c&&".."===e[2]||".."===e[c-1]||0<c&&(e.splice(c-1,2),c-=2));e=e.join("/")}if((f||m)&&g){for(c=(n=e.split("/")).length;0<c;--c){if(r=n.slice(0,c).join("/"),f)for(d=f.length;0<d;--d)if(i=(i=g[f.slice(0,d).join("/")])&&i[r]){o=i,a=c;break}if(o)break;!s&&m&&m[r]&&(s=m[r],l=c)}!o&&s&&(o=s,a=l),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function y(e,t){return function(){var n=f.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),o.apply(r,n.concat([e,t]))}}function b(e){var t;if(m(c,e)&&(t=c[e],delete c[e],d[e]=!0,i.apply(r,t)),!m(l,e)&&!m(d,e))throw new Error("No "+e);return l[e]}function x(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function w(e){return e?x(e):[]}var _=g.require("jquery.select2");return e.fn.select2.amd=g,_}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Swiper=t()}(this,function(){"use strict";function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(n,r){void 0===n&&(n={}),void 0===r&&(r={}),Object.keys(r).forEach(i=>{void 0===n[i]?n[i]=r[i]:e(r[i])&&e(n[i])&&Object.keys(r[i]).length>0&&t(n[i],r[i])})}const n={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){const e="undefined"!=typeof document?document:{};return t(e,n),e}const i={document:n,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function o(){const e="undefined"!=typeof window?window:{};return t(e,i),e}class a extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function s(e){void 0===e&&(e=[]);const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...s(e)):t.push(e)}),t}function l(e,t){return Array.prototype.filter.call(e,t)}function c(e,t){const n=o(),i=r();let s=[];if(!t&&e instanceof a)return e;if(!e)return new a(s);if("string"==typeof e){const n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let e="div";0===n.indexOf("<li")&&(e="ul"),0===n.indexOf("<tr")&&(e="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(e="tr"),0===n.indexOf("<tbody")&&(e="table"),0===n.indexOf("<option")&&(e="select");const t=i.createElement(e);t.innerHTML=n;for(let e=0;e<t.childNodes.length;e+=1)s.push(t.childNodes[e])}else s=function(e,t){if("string"!=typeof e)return[e];const n=[],r=t.querySelectorAll(e);for(let e=0;e<r.length;e+=1)n.push(r[e]);return n}(e.trim(),t||i)}else if(e.nodeType||e===n||e===i)s.push(e);else if(Array.isArray(e)){if(e instanceof a)return e;s=e}return new a(function(e){const t=[];for(let n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(s))}c.fn=a.prototype;const u={addClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=s(t.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.add(...r)}),this},removeClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=s(t.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.remove(...r)}),this},hasClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=s(t.map(e=>e.split(" ")));return l(this,e=>r.filter(t=>e.classList.contains(t)).length>0).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=s(t.map(e=>e.split(" ")));this.forEach(e=>{r.forEach(t=>{e.classList.toggle(t)})})},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(const t in e)this[n][t]=e[t],this[n].setAttribute(t,e[t]);return this},removeAttr:function(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},transform:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transform=e;return this},transition:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?`${e}ms`:e;return this},on:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,i,o,a]=t;function s(e){const t=e.target;if(!t)return;const n=e.target.dom7EventData||[];if(n.indexOf(e)<0&&n.unshift(e),c(t).is(i))o.apply(t,n);else{const e=c(t).parents();for(let t=0;t<e.length;t+=1)c(e[t]).is(i)&&o.apply(e[t],n)}}function l(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),o.apply(this,t)}"function"==typeof t[1]&&([r,o,a]=t,i=void 0),a||(a=!1);const u=r.split(" ");let d;for(let e=0;e<this.length;e+=1){const t=this[e];if(i)for(d=0;d<u.length;d+=1){const e=u[d];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:o,proxyListener:s}),t.addEventListener(e,s,a)}else for(d=0;d<u.length;d+=1){const e=u[d];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:o,proxyListener:l}),t.addEventListener(e,l,a)}}return this},off:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,i,o,a]=t;"function"==typeof t[1]&&([r,o,a]=t,i=void 0),a||(a=!1);const s=r.split(" ");for(let e=0;e<s.length;e+=1){const t=s[e];for(let e=0;e<this.length;e+=1){const n=this[e];let r;if(!i&&n.dom7Listeners?r=n.dom7Listeners[t]:i&&n.dom7LiveListeners&&(r=n.dom7LiveListeners[t]),r&&r.length)for(let e=r.length-1;e>=0;e-=1){const i=r[e];o&&i.listener===o||o&&i.listener&&i.listener.dom7proxy&&i.listener.dom7proxy===o?(n.removeEventListener(t,i.proxyListener,a),r.splice(e,1)):o||(n.removeEventListener(t,i.proxyListener,a),r.splice(e,1))}}}return this},trigger:function(){const e=o();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=n[0].split(" "),a=n[1];for(let t=0;t<i.length;t+=1){const r=i[t];for(let t=0;t<this.length;t+=1){const i=this[t];if(e.CustomEvent){const t=new e.CustomEvent(r,{detail:a,bubbles:!0,cancelable:!0});i.dom7EventData=n.filter((e,t)=>t>0),i.dispatchEvent(t),i.dom7EventData=[],delete i.dom7EventData}}}return this},transitionEnd:function(e){const t=this;return e&&t.on("transitionend",function n(r){r.target===this&&(e.call(this,r),t.off("transitionend",n))}),this},outerWidth:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){const e=o();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){const e=o(),t=r(),n=this[0],i=n.getBoundingClientRect(),a=t.body,s=n.clientTop||a.clientTop||0,l=n.clientLeft||a.clientLeft||0,c=n===e?e.scrollY:n.scrollTop,u=n===e?e.scrollX:n.scrollLeft;return{top:i.top+c-s,left:i.left+u-l}}return null},css:function(e,t){const n=o();let r;if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(const t in e)this[r].style[t]=e[t];return this}if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=t;return this}return this},each:function(e){return e?(this.forEach((t,n)=>{e.apply(t,[t,n])}),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){const t=o(),n=r(),i=this[0];let s,l;if(!i||void 0===e)return!1;if("string"==typeof e){if(i.matches)return i.matches(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);for(s=c(e),l=0;l<s.length;l+=1)if(s[l]===i)return!0;return!1}if(e===n)return i===n;if(e===t)return i===t;if(e.nodeType||e instanceof a){for(s=e.nodeType?[e]:e,l=0;l<s.length;l+=1)if(s[l]===i)return!0;return!1}return!1},index:function(){let e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;const t=this.length;if(e>t-1)return c([]);if(e<0){const n=t+e;return c(n<0?[]:[this[n]])}return c([this[e]])},append:function(){let e;const t=r();for(let n=0;n<arguments.length;n+=1){e=n<0||arguments.length<=n?void 0:arguments[n];for(let n=0;n<this.length;n+=1)if("string"==typeof e){const r=t.createElement("div");for(r.innerHTML=e;r.firstChild;)this[n].appendChild(r.firstChild)}else if(e instanceof a)for(let t=0;t<e.length;t+=1)this[n].appendChild(e[t]);else this[n].appendChild(e)}return this},prepend:function(e){const t=r();let n,i;for(n=0;n<this.length;n+=1)if("string"==typeof e){const r=t.createElement("div");for(r.innerHTML=e,i=r.childNodes.length-1;i>=0;i-=1)this[n].insertBefore(r.childNodes[i],this[n].childNodes[0])}else if(e instanceof a)for(i=0;i<e.length;i+=1)this[n].insertBefore(e[i],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&c(this[0].nextElementSibling).is(e)?c([this[0].nextElementSibling]):c([]):this[0].nextElementSibling?c([this[0].nextElementSibling]):c([]):c([])},nextAll:function(e){const t=[];let n=this[0];if(!n)return c([]);for(;n.nextElementSibling;){const r=n.nextElementSibling;e?c(r).is(e)&&t.push(r):t.push(r),n=r}return c(t)},prev:function(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&c(t.previousElementSibling).is(e)?c([t.previousElementSibling]):c([]):t.previousElementSibling?c([t.previousElementSibling]):c([])}return c([])},prevAll:function(e){const t=[];let n=this[0];if(!n)return c([]);for(;n.previousElementSibling;){const r=n.previousElementSibling;e?c(r).is(e)&&t.push(r):t.push(r),n=r}return c(t)},parent:function(e){const t=[];for(let n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?c(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return c(t)},parents:function(e){const t=[];for(let n=0;n<this.length;n+=1){let r=this[n].parentNode;for(;r;)e?c(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return c(t)},closest:function(e){let t=this;return void 0===e?c([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].querySelectorAll(e);for(let e=0;e<r.length;e+=1)t.push(r[e])}return c(t)},children:function(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].children;for(let n=0;n<r.length;n+=1)e&&!c(r[n]).is(e)||t.push(r[n])}return c(t)},filter:function(e){return c(l(this,e))},remove:function(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}};function d(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function h(){return Date.now()}function f(e,t){void 0===t&&(t="x");const n=o();let r,i,a;const s=function(e){const t=o();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(e=>e.replace(",",".")).join(", ")),a=new n.WebKitCSSMatrix("none"===i?"":i)):(a=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=a.toString().split(",")),"x"===t&&(i=n.WebKitCSSMatrix?a.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===t&&(i=n.WebKitCSSMatrix?a.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),i||0}function p(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function g(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function m(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&!g(r)){const n=Object.keys(Object(r)).filter(e=>t.indexOf(e)<0);for(let t=0,i=n.length;t<i;t+=1){const i=n[t],o=Object.getOwnPropertyDescriptor(r,i);void 0!==o&&o.enumerable&&(p(e[i])&&p(r[i])?r[i].__swiper__?e[i]=r[i]:m(e[i],r[i]):!p(e[i])&&p(r[i])?(e[i]={},r[i].__swiper__?e[i]=r[i]:m(e[i],r[i])):e[i]=r[i])}}}return e}function v(e,t,n){e.style.setProperty(t,n)}function y(e){let{swiper:t,targetPosition:n,side:r}=e;const i=o(),a=-t.translate;let s,l=null;const c=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const u=n>a?"next":"prev",d=(e,t)=>"next"===u&&e>=t||"prev"===u&&e<=t,h=()=>{s=(new Date).getTime(),null===l&&(l=s);const e=Math.max(Math.min((s-l)/c,1),0),o=.5-Math.cos(e*Math.PI)/2;let u=a+o*(n-a);if(d(u,n)&&(u=n),t.wrapperEl.scrollTo({[r]:u}),d(u,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:u})}),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(h)};h()}let b,x,w;function _(){return b||(b=function(){const e=o(),t=r();return{smoothScroll:t.documentElement&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),passiveListener:function(){let t=!1;try{const n=Object.defineProperty({},"passive",{get(){t=!0}});e.addEventListener("testPassiveListener",null,n)}catch(e){}return t}(),gestures:"ongesturestart"in e}}()),b}function k(e){return void 0===e&&(e={}),x||(x=function(e){let{userAgent:t}=void 0===e?{}:e;const n=_(),r=o(),i=r.navigator.platform,a=t||r.navigator.userAgent,s={ios:!1,android:!1},l=r.screen.width,c=r.screen.height,u=a.match(/(Android);?[\s\/]+([\d.]+)?/);let d=a.match(/(iPad).*OS\s([\d_]+)/);const h=a.match(/(iPod)(.*OS\s([\d_]+))?/),f=!d&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),p="Win32"===i;let g="MacIntel"===i;return!d&&g&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${l}x${c}`)>=0&&(d=a.match(/(Version)\/([\d.]+)/),d||(d=[0,1,"13_0_0"]),g=!1),u&&!p&&(s.os="android",s.android=!0),(d||f||h)&&(s.os="ios",s.ios=!0),s}(e)),x}function E(){return w||(w=function(){const e=o();return{isSafari:function(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),w}Object.keys(u).forEach(e=>{Object.defineProperty(c.fn,e,{value:u[e],writable:!0})});var S={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;const i=n?"unshift":"push";return e.split(" ").forEach(e=>{r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][i](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;function i(){r.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];t.apply(r,o)}return i.__emitterProxy=t,r.on(e,i,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((r,i)=>{(r===t||r.__emitterProxy&&r.__emitterProxy===t)&&n.eventsListeners[e].splice(i,1)})}),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,r;for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];"string"==typeof o[0]||Array.isArray(o[0])?(t=o[0],n=o.slice(1,o.length),r=e):(t=o[0].events,n=o[0].data,r=o[0].context||e),n.unshift(r);return(Array.isArray(t)?t:t.split(" ")).forEach(t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(e=>{e.apply(r,[t,...n])}),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach(e=>{e.apply(r,n)})}),e}};var O={updateSize:function(){const e=this;let t,n;const r=e.$el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:r[0].clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:r[0].clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(r.css("padding-left")||0,10)-parseInt(r.css("padding-right")||0,10),n=n-parseInt(r.css("padding-top")||0,10)-parseInt(r.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function n(e,n){return parseFloat(e.getPropertyValue(t(n))||0)}const r=e.params,{$wrapperEl:i,size:o,rtlTranslate:a,wrongRTL:s}=e,l=e.virtual&&r.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,u=i.children(`.${e.params.slideClass}`),d=l?e.virtual.slides.length:u.length;let h=[];const f=[],p=[];let g=r.slidesOffsetBefore;"function"==typeof g&&(g=r.slidesOffsetBefore.call(e));let m=r.slidesOffsetAfter;"function"==typeof m&&(m=r.slidesOffsetAfter.call(e));const y=e.snapGrid.length,b=e.slidesGrid.length;let x=r.spaceBetween,w=-g,_=0,k=0;if(void 0===o)return;"string"==typeof x&&x.indexOf("%")>=0&&(x=parseFloat(x.replace("%",""))/100*o),e.virtualSize=-x,a?u.css({marginLeft:"",marginBottom:"",marginTop:""}):u.css({marginRight:"",marginBottom:"",marginTop:""}),r.centeredSlides&&r.cssMode&&(v(e.wrapperEl,"--swiper-centered-offset-before",""),v(e.wrapperEl,"--swiper-centered-offset-after",""));const E=r.grid&&r.grid.rows>1&&e.grid;let S;E&&e.grid.initSlides(d);const O="auto"===r.slidesPerView&&r.breakpoints&&Object.keys(r.breakpoints).filter(e=>void 0!==r.breakpoints[e].slidesPerView).length>0;for(let i=0;i<d;i+=1){S=0;const a=u.eq(i);if(E&&e.grid.updateSlide(i,a,d,t),"none"!==a.css("display")){if("auto"===r.slidesPerView){O&&(u[i].style[t("width")]="");const o=getComputedStyle(a[0]),s=a[0].style.transform,l=a[0].style.webkitTransform;if(s&&(a[0].style.transform="none"),l&&(a[0].style.webkitTransform="none"),r.roundLengths)S=e.isHorizontal()?a.outerWidth(!0):a.outerHeight(!0);else{const e=n(o,"width"),t=n(o,"padding-left"),r=n(o,"padding-right"),i=n(o,"margin-left"),s=n(o,"margin-right"),l=o.getPropertyValue("box-sizing");if(l&&"border-box"===l)S=e+i+s;else{const{clientWidth:n,offsetWidth:o}=a[0];S=e+t+r+i+s+(o-n)}}s&&(a[0].style.transform=s),l&&(a[0].style.webkitTransform=l),r.roundLengths&&(S=Math.floor(S))}else S=(o-(r.slidesPerView-1)*x)/r.slidesPerView,r.roundLengths&&(S=Math.floor(S)),u[i]&&(u[i].style[t("width")]=`${S}px`);u[i]&&(u[i].swiperSlideSize=S),p.push(S),r.centeredSlides?(w=w+S/2+_/2+x,0===_&&0!==i&&(w=w-o/2-x),0===i&&(w=w-o/2-x),Math.abs(w)<.001&&(w=0),r.roundLengths&&(w=Math.floor(w)),k%r.slidesPerGroup==0&&h.push(w),f.push(w)):(r.roundLengths&&(w=Math.floor(w)),(k-Math.min(e.params.slidesPerGroupSkip,k))%e.params.slidesPerGroup==0&&h.push(w),f.push(w),w=w+S+x),e.virtualSize+=S+x,_=S,k+=1}}if(e.virtualSize=Math.max(e.virtualSize,o)+m,a&&s&&("slide"===r.effect||"coverflow"===r.effect)&&i.css({width:`${e.virtualSize+r.spaceBetween}px`}),r.setWrapperSize&&i.css({[t("width")]:`${e.virtualSize+r.spaceBetween}px`}),E&&e.grid.updateWrapperSize(S,h,t),!r.centeredSlides){const t=[];for(let n=0;n<h.length;n+=1){let i=h[n];r.roundLengths&&(i=Math.floor(i)),h[n]<=e.virtualSize-o&&t.push(i)}h=t,Math.floor(e.virtualSize-o)-Math.floor(h[h.length-1])>1&&h.push(e.virtualSize-o)}if(0===h.length&&(h=[0]),0!==r.spaceBetween){const n=e.isHorizontal()&&a?"marginLeft":t("marginRight");u.filter((e,t)=>!r.cssMode||t!==u.length-1).css({[n]:`${x}px`})}if(r.centeredSlides&&r.centeredSlidesBounds){let e=0;p.forEach(t=>{e+=t+(r.spaceBetween?r.spaceBetween:0)}),e-=r.spaceBetween;const t=e-o;h=h.map(e=>e<0?-g:e>t?t+m:e)}if(r.centerInsufficientSlides){let e=0;if(p.forEach(t=>{e+=t+(r.spaceBetween?r.spaceBetween:0)}),e-=r.spaceBetween,e<o){const t=(o-e)/2;h.forEach((e,n)=>{h[n]=e-t}),f.forEach((e,n)=>{f[n]=e+t})}}if(Object.assign(e,{slides:u,snapGrid:h,slidesGrid:f,slidesSizesGrid:p}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){v(e.wrapperEl,"--swiper-centered-offset-before",-h[0]+"px"),v(e.wrapperEl,"--swiper-centered-offset-after",e.size/2-p[p.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+n)}if(d!==c&&e.emit("slidesLengthChange"),h.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),f.length!==b&&e.emit("slidesGridLengthChange"),r.watchSlidesProgress&&e.updateSlidesOffset(),!(l||r.cssMode||"slide"!==r.effect&&"fade"!==r.effect)){const t=`${r.containerModifierClass}backface-hidden`,n=e.$el.hasClass(t);d<=r.maxBackfaceHiddenSlides?n||e.$el.addClass(t):n&&e.$el.removeClass(t)}},updateAutoHeight:function(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let i,o=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const a=e=>r?t.slides.filter(t=>parseInt(t.getAttribute("data-swiper-slide-index"),10)===e)[0]:t.slides.eq(e)[0];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||c([])).each(e=>{n.push(e)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length&&!r)break;n.push(a(e))}else n.push(a(t.activeIndex));for(i=0;i<n.length;i+=1)if(void 0!==n[i]){const e=n[i].offsetHeight;o=e>o?e:o}(o||0===o)&&t.$wrapperEl.css("height",`${o}px`)},updateSlidesOffset:function(){const e=this,t=e.slides;for(let n=0;n<t.length;n+=1)t[n].swiperSlideOffset=e.isHorizontal()?t[n].offsetLeft:t[n].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:r,rtlTranslate:i,snapGrid:o}=t;if(0===r.length)return;void 0===r[0].swiperSlideOffset&&t.updateSlidesOffset();let a=-e;i&&(a=e),r.removeClass(n.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(let e=0;e<r.length;e+=1){const s=r[e];let l=s.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(l-=r[0].swiperSlideOffset);const c=(a+(n.centeredSlides?t.minTranslate():0)-l)/(s.swiperSlideSize+n.spaceBetween),u=(a-o[0]+(n.centeredSlides?t.minTranslate():0)-l)/(s.swiperSlideSize+n.spaceBetween),d=-(a-l),h=d+t.slidesSizesGrid[e];(d>=0&&d<t.size-1||h>1&&h<=t.size||d<=0&&h>=t.size)&&(t.visibleSlides.push(s),t.visibleSlidesIndexes.push(e),r.eq(e).addClass(n.slideVisibleClass)),s.progress=i?-c:c,s.originalProgress=i?-u:u}t.visibleSlides=c(t.visibleSlides)},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:a}=t;const s=o,l=a;0===r?(i=0,o=!0,a=!0):(i=(e-t.minTranslate())/r,o=i<=0,a=i>=1),Object.assign(t,{progress:i,isBeginning:o,isEnd:a}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!s&&t.emit("reachBeginning toEdge"),a&&!l&&t.emit("reachEnd toEdge"),(s&&!o||l&&!a)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,$wrapperEl:r,activeIndex:i,realIndex:o}=e,a=e.virtual&&n.virtual.enabled;let s;t.removeClass(`${n.slideActiveClass} ${n.slideNextClass} ${n.slidePrevClass} ${n.slideDuplicateActiveClass} ${n.slideDuplicateNextClass} ${n.slideDuplicatePrevClass}`),s=a?e.$wrapperEl.find(`.${n.slideClass}[data-swiper-slide-index="${i}"]`):t.eq(i),s.addClass(n.slideActiveClass),n.loop&&(s.hasClass(n.slideDuplicateClass)?r.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${o}"]`).addClass(n.slideDuplicateActiveClass):r.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${o}"]`).addClass(n.slideDuplicateActiveClass));let l=s.nextAll(`.${n.slideClass}`).eq(0).addClass(n.slideNextClass);n.loop&&0===l.length&&(l=t.eq(0),l.addClass(n.slideNextClass));let c=s.prevAll(`.${n.slideClass}`).eq(0).addClass(n.slidePrevClass);n.loop&&0===c.length&&(c=t.eq(-1),c.addClass(n.slidePrevClass)),n.loop&&(l.hasClass(n.slideDuplicateClass)?r.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicateNextClass):r.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicateNextClass),c.hasClass(n.slideDuplicateClass)?r.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicatePrevClass):r.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicatePrevClass)),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{slidesGrid:r,snapGrid:i,params:o,activeIndex:a,realIndex:s,snapIndex:l}=t;let c,u=e;if(void 0===u){for(let e=0;e<r.length;e+=1)void 0!==r[e+1]?n>=r[e]&&n<r[e+1]-(r[e+1]-r[e])/2?u=e:n>=r[e]&&n<r[e+1]&&(u=e+1):n>=r[e]&&(u=e);o.normalizeSlideIndex&&(u<0||void 0===u)&&(u=0)}if(i.indexOf(n)>=0)c=i.indexOf(n);else{const e=Math.min(o.slidesPerGroupSkip,u);c=e+Math.floor((u-e)/o.slidesPerGroup)}if(c>=i.length&&(c=i.length-1),u===a)return void(c!==l&&(t.snapIndex=c,t.emit("snapIndexChange")));const d=parseInt(t.slides.eq(u).attr("data-swiper-slide-index")||u,10);Object.assign(t,{snapIndex:c,realIndex:d,previousIndex:a,activeIndex:u}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),s!==d&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,n=t.params,r=c(e).closest(`.${n.slideClass}`)[0];let i,o=!1;if(r)for(let e=0;e<t.slides.length;e+=1)if(t.slides[e]===r){o=!0,i=e;break}if(!r||!o)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=r,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(c(r).attr("data-swiper-slide-index"),10):t.clickedIndex=i,n.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}};var C={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:n,translate:r,$wrapperEl:i}=this;if(t.virtualTranslate)return n?-r:r;if(t.cssMode)return r;let o=f(i[0],e);return n&&(o=-o),o||0},setTranslate:function(e,t){const n=this,{rtlTranslate:r,params:i,$wrapperEl:o,wrapperEl:a,progress:s}=n;let l,c=0,u=0;n.isHorizontal()?c=r?-e:e:u=e,i.roundLengths&&(c=Math.floor(c),u=Math.floor(u)),i.cssMode?a[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-c:-u:i.virtualTranslate||o.transform(`translate3d(${c}px, ${u}px, 0px)`),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?c:u;const d=n.maxTranslate()-n.minTranslate();l=0===d?0:(e-n.minTranslate())/d,l!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,r,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===r&&(r=!0);const o=this,{params:a,wrapperEl:s}=o;if(o.animating&&a.preventInteractionOnTransition)return!1;const l=o.minTranslate(),c=o.maxTranslate();let u;if(u=r&&e>l?l:r&&e<c?c:e,o.updateProgress(u),a.cssMode){const e=o.isHorizontal();if(0===t)s[e?"scrollLeft":"scrollTop"]=-u;else{if(!o.support.smoothScroll)return y({swiper:o,targetPosition:-u,side:e?"left":"top"}),!0;s.scrollTo({[e?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(o.setTransition(0),o.setTranslate(u),n&&(o.emit("beforeTransitionStart",t,i),o.emit("transitionEnd"))):(o.setTransition(t),o.setTranslate(u),n&&(o.emit("beforeTransitionStart",t,i),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,n&&o.emit("transitionEnd"))}),o.$wrapperEl[0].addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd))),!0}};function T(e){let{swiper:t,runCallbacks:n,direction:r,step:i}=e;const{activeIndex:o,previousIndex:a}=t;let s=r;if(s||(s=o>a?"next":o<a?"prev":"reset"),t.emit(`transition${i}`),n&&o!==a){if("reset"===s)return void t.emit(`slideResetTransition${i}`);t.emit(`slideChangeTransition${i}`),"next"===s?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`)}}var M={slideTo:function(e,t,n,r,i){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),"number"!=typeof e&&"string"!=typeof e)throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof e}] given.`);if("string"==typeof e){const t=parseInt(e,10);if(!isFinite(t))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`);e=t}const o=this;let a=e;a<0&&(a=0);const{params:s,snapGrid:l,slidesGrid:c,previousIndex:u,activeIndex:d,rtlTranslate:h,wrapperEl:f,enabled:p}=o;if(o.animating&&s.preventInteractionOnTransition||!p&&!r&&!i)return!1;const g=Math.min(o.params.slidesPerGroupSkip,a);let m=g+Math.floor((a-g)/o.params.slidesPerGroup);m>=l.length&&(m=l.length-1);const v=-l[m];if(s.normalizeSlideIndex)for(let e=0;e<c.length;e+=1){const t=-Math.floor(100*v),n=Math.floor(100*c[e]),r=Math.floor(100*c[e+1]);void 0!==c[e+1]?t>=n&&t<r-(r-n)/2?a=e:t>=n&&t<r&&(a=e+1):t>=n&&(a=e)}if(o.initialized&&a!==d){if(!o.allowSlideNext&&v<o.translate&&v<o.minTranslate())return!1;if(!o.allowSlidePrev&&v>o.translate&&v>o.maxTranslate()&&(d||0)!==a)return!1}let b;if(a!==(u||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(v),b=a>d?"next":a<d?"prev":"reset",h&&-v===o.translate||!h&&v===o.translate)return o.updateActiveIndex(a),s.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),"slide"!==s.effect&&o.setTranslate(v),"reset"!==b&&(o.transitionStart(n,b),o.transitionEnd(n,b)),!1;if(s.cssMode){const e=o.isHorizontal(),n=h?v:-v;if(0===t){const t=o.virtual&&o.params.virtual.enabled;t&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),f[e?"scrollLeft":"scrollTop"]=n,t&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._swiperImmediateVirtual=!1})}else{if(!o.support.smoothScroll)return y({swiper:o,targetPosition:n,side:e?"left":"top"}),!0;f.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(v),o.updateActiveIndex(a),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,b),0===t?o.transitionEnd(n,b):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,b))}),o.$wrapperEl[0].addEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,r){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),"string"==typeof e){const t=parseInt(e,10);if(!isFinite(t))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`);e=t}const i=this;let o=e;return i.params.loop&&(o+=i.loopedSlides),i.slideTo(o,t,n,r)},slideNext:function(e,t,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const r=this,{animating:i,enabled:o,params:a}=r;if(!o)return r;let s=a.slidesPerGroup;"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(s=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<a.slidesPerGroupSkip?1:s;if(a.loop){if(i&&a.loopPreventsSlide)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}return a.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const r=this,{params:i,animating:o,snapGrid:a,slidesGrid:s,rtlTranslate:l,enabled:c}=r;if(!c)return r;if(i.loop){if(o&&i.loopPreventsSlide)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const d=u(l?r.translate:-r.translate),h=a.map(e=>u(e));let f=a[h.indexOf(d)-1];if(void 0===f&&i.cssMode){let e;a.forEach((t,n)=>{d>=t&&(e=n)}),void 0!==e&&(f=a[e>0?e-1:e])}let p=0;if(void 0!==f&&(p=s.indexOf(f),p<0&&(p=r.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(p=p-r.slidesPerViewDynamic("previous",!0)+1,p=Math.max(p,0))),i.rewind&&r.isBeginning){const i=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(i,e,t,n)}return r.slideTo(p,e,t,n)},slideReset:function(e,t,n){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,n)},slideToClosest:function(e,t,n,r){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===r&&(r=.5);const i=this;let o=i.activeIndex;const a=Math.min(i.params.slidesPerGroupSkip,o),s=a+Math.floor((o-a)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[s]){const e=i.snapGrid[s];l-e>(i.snapGrid[s+1]-e)*r&&(o+=i.params.slidesPerGroup)}else{const e=i.snapGrid[s-1];l-e<=(i.snapGrid[s]-e)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,n)},slideToClickedSlide:function(){const e=this,{params:t,$wrapperEl:n}=e,r="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,o=e.clickedIndex;if(t.loop){if(e.animating)return;i=parseInt(c(e.clickedSlide).attr("data-swiper-slide-index"),10),t.centeredSlides?o<e.loopedSlides-r/2||o>e.slides.length-e.loopedSlides+r/2?(e.loopFix(),o=n.children(`.${t.slideClass}[data-swiper-slide-index="${i}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),d(()=>{e.slideTo(o)})):e.slideTo(o):o>e.slides.length-r?(e.loopFix(),o=n.children(`.${t.slideClass}[data-swiper-slide-index="${i}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),d(()=>{e.slideTo(o)})):e.slideTo(o)}else e.slideTo(o)}};var A={loopCreate:function(){const e=this,t=r(),{params:n,$wrapperEl:i}=e,o=i.children().length>0?c(i.children()[0].parentNode):i;o.children(`.${n.slideClass}.${n.slideDuplicateClass}`).remove();let a=o.children(`.${n.slideClass}`);if(n.loopFillGroupWithBlank){const e=n.slidesPerGroup-a.length%n.slidesPerGroup;if(e!==n.slidesPerGroup){for(let r=0;r<e;r+=1){const e=c(t.createElement("div")).addClass(`${n.slideClass} ${n.slideBlankClass}`);o.append(e)}a=o.children(`.${n.slideClass}`)}}"auto"!==n.slidesPerView||n.loopedSlides||(n.loopedSlides=a.length),e.loopedSlides=Math.ceil(parseFloat(n.loopedSlides||n.slidesPerView,10)),e.loopedSlides+=n.loopAdditionalSlides,e.loopedSlides>a.length&&e.params.loopedSlidesLimit&&(e.loopedSlides=a.length);const s=[],l=[];a.each((e,t)=>{c(e).attr("data-swiper-slide-index",t)});for(let t=0;t<e.loopedSlides;t+=1){const e=t-Math.floor(t/a.length)*a.length;l.push(a.eq(e)[0]),s.unshift(a.eq(a.length-e-1)[0])}for(let e=0;e<l.length;e+=1)o.append(c(l[e].cloneNode(!0)).addClass(n.slideDuplicateClass));for(let e=s.length-1;e>=0;e-=1)o.prepend(c(s[e].cloneNode(!0)).addClass(n.slideDuplicateClass))},loopFix:function(){const e=this;e.emit("beforeLoopFix");const{activeIndex:t,slides:n,loopedSlides:r,allowSlidePrev:i,allowSlideNext:o,snapGrid:a,rtlTranslate:s}=e;let l;e.allowSlidePrev=!0,e.allowSlideNext=!0;const c=-a[t]-e.getTranslate();if(t<r){l=n.length-3*r+t,l+=r;e.slideTo(l,0,!1,!0)&&0!==c&&e.setTranslate((s?-e.translate:e.translate)-c)}else if(t>=n.length-r){l=-n.length+t+r,l+=r;e.slideTo(l,0,!1,!0)&&0!==c&&e.setTranslate((s?-e.translate:e.translate)-c)}e.allowSlidePrev=i,e.allowSlideNext=o,e.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:n}=this;e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(),n.removeAttr("data-swiper-slide-index")}};function P(e){const t=this,n=r(),i=o(),a=t.touchEventsData,{params:s,touches:l,enabled:u}=t;if(!u)return;if(t.animating&&s.preventInteractionOnTransition)return;!t.animating&&s.cssMode&&s.loop&&t.loopFix();let d=e;d.originalEvent&&(d=d.originalEvent);let f=c(d.target);if("wrapper"===s.touchEventsTarget&&!f.closest(t.wrapperEl).length)return;if(a.isTouchEvent="touchstart"===d.type,!a.isTouchEvent&&"which"in d&&3===d.which)return;if(!a.isTouchEvent&&"button"in d&&d.button>0)return;if(a.isTouched&&a.isMoved)return;const p=!!s.noSwipingClass&&""!==s.noSwipingClass,g=e.composedPath?e.composedPath():e.path;p&&d.target&&d.target.shadowRoot&&g&&(f=c(g[0]));const m=s.noSwipingSelector?s.noSwipingSelector:`.${s.noSwipingClass}`,v=!(!d.target||!d.target.shadowRoot);if(s.noSwiping&&(v?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===r()||n===o())return null;n.assignedSlot&&(n=n.assignedSlot);const i=n.closest(e);return i||n.getRootNode?i||t(n.getRootNode().host):null}(t)}(m,f[0]):f.closest(m)[0]))return void(t.allowClick=!0);if(s.swipeHandler&&!f.closest(s.swipeHandler)[0])return;l.currentX="touchstart"===d.type?d.targetTouches[0].pageX:d.pageX,l.currentY="touchstart"===d.type?d.targetTouches[0].pageY:d.pageY;const y=l.currentX,b=l.currentY,x=s.edgeSwipeDetection||s.iOSEdgeSwipeDetection,w=s.edgeSwipeThreshold||s.iOSEdgeSwipeThreshold;if(x&&(y<=w||y>=i.innerWidth-w)){if("prevent"!==x)return;e.preventDefault()}if(Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=y,l.startY=b,a.touchStartTime=h(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,s.threshold>0&&(a.allowThresholdMove=!1),"touchstart"!==d.type){let e=!0;f.is(a.focusableElements)&&(e=!1,"SELECT"===f[0].nodeName&&(a.isTouched=!1)),n.activeElement&&c(n.activeElement).is(a.focusableElements)&&n.activeElement!==f[0]&&n.activeElement.blur();const r=e&&t.allowTouchMove&&s.touchStartPreventDefault;!s.touchStartForcePreventDefault&&!r||f[0].isContentEditable||d.preventDefault()}t.params.freeMode&&t.params.freeMode.enabled&&t.freeMode&&t.animating&&!s.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",d)}function L(e){const t=r(),n=this,i=n.touchEventsData,{params:o,touches:a,rtlTranslate:s,enabled:l}=n;if(!l)return;let u=e;if(u.originalEvent&&(u=u.originalEvent),!i.isTouched)return void(i.startMoving&&i.isScrolling&&n.emit("touchMoveOpposite",u));if(i.isTouchEvent&&"touchmove"!==u.type)return;const d="touchmove"===u.type&&u.targetTouches&&(u.targetTouches[0]||u.changedTouches[0]),f="touchmove"===u.type?d.pageX:u.pageX,p="touchmove"===u.type?d.pageY:u.pageY;if(u.preventedByNestedSwiper)return a.startX=f,void(a.startY=p);if(!n.allowTouchMove)return c(u.target).is(i.focusableElements)||(n.allowClick=!1),void(i.isTouched&&(Object.assign(a,{startX:f,startY:p,currentX:f,currentY:p}),i.touchStartTime=h()));if(i.isTouchEvent&&o.touchReleaseOnEdges&&!o.loop)if(n.isVertical()){if(p<a.startY&&n.translate<=n.maxTranslate()||p>a.startY&&n.translate>=n.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(f<a.startX&&n.translate<=n.maxTranslate()||f>a.startX&&n.translate>=n.minTranslate())return;if(i.isTouchEvent&&t.activeElement&&u.target===t.activeElement&&c(u.target).is(i.focusableElements))return i.isMoved=!0,void(n.allowClick=!1);if(i.allowTouchCallbacks&&n.emit("touchMove",u),u.targetTouches&&u.targetTouches.length>1)return;a.currentX=f,a.currentY=p;const g=a.currentX-a.startX,m=a.currentY-a.startY;if(n.params.threshold&&Math.sqrt(g**2+m**2)<n.params.threshold)return;if(void 0===i.isScrolling){let e;n.isHorizontal()&&a.currentY===a.startY||n.isVertical()&&a.currentX===a.startX?i.isScrolling=!1:g*g+m*m>=25&&(e=180*Math.atan2(Math.abs(m),Math.abs(g))/Math.PI,i.isScrolling=n.isHorizontal()?e>o.touchAngle:90-e>o.touchAngle)}if(i.isScrolling&&n.emit("touchMoveOpposite",u),void 0===i.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(i.startMoving=!0)),i.isScrolling)return void(i.isTouched=!1);if(!i.startMoving)return;n.allowClick=!1,!o.cssMode&&u.cancelable&&u.preventDefault(),o.touchMoveStopPropagation&&!o.nested&&u.stopPropagation(),i.isMoved||(o.loop&&!o.cssMode&&n.loopFix(),i.startTranslate=n.getTranslate(),n.setTransition(0),n.animating&&n.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!o.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",u)),n.emit("sliderMove",u),i.isMoved=!0;let v=n.isHorizontal()?g:m;a.diff=v,v*=o.touchRatio,s&&(v=-v),n.swipeDirection=v>0?"prev":"next",i.currentTranslate=v+i.startTranslate;let y=!0,b=o.resistanceRatio;if(o.touchReleaseOnEdges&&(b=0),v>0&&i.currentTranslate>n.minTranslate()?(y=!1,o.resistance&&(i.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+i.startTranslate+v)**b)):v<0&&i.currentTranslate<n.maxTranslate()&&(y=!1,o.resistance&&(i.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-i.startTranslate-v)**b)),y&&(u.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),n.allowSlidePrev||n.allowSlideNext||(i.currentTranslate=i.startTranslate),o.threshold>0){if(!(Math.abs(v)>o.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,i.currentTranslate=i.startTranslate,void(a.diff=n.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}o.followFinger&&!o.cssMode&&((o.freeMode&&o.freeMode.enabled&&n.freeMode||o.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),n.params.freeMode&&o.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(i.currentTranslate),n.setTranslate(i.currentTranslate))}function N(e){const t=this,n=t.touchEventsData,{params:r,touches:i,rtlTranslate:o,slidesGrid:a,enabled:s}=t;if(!s)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),n.allowTouchCallbacks&&t.emit("touchEnd",l),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const c=h(),u=c-n.touchStartTime;if(t.allowClick){const e=l.path||l.composedPath&&l.composedPath();t.updateClickedSlide(e&&e[0]||l.target),t.emit("tap click",l),u<300&&c-n.lastClickTime<300&&t.emit("doubleTap doubleClick",l)}if(n.lastClickTime=h(),d(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||0===i.diff||n.currentTranslate===n.startTranslate)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let f;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,f=r.followFinger?o?t.translate:-t.translate:-n.currentTranslate,r.cssMode)return;if(t.params.freeMode&&r.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:f});let p=0,g=t.slidesSizesGrid[0];for(let e=0;e<a.length;e+=e<r.slidesPerGroupSkip?1:r.slidesPerGroup){const t=e<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==a[e+t]?f>=a[e]&&f<a[e+t]&&(p=e,g=a[e+t]-a[e]):f>=a[e]&&(p=e,g=a[a.length-1]-a[a.length-2])}let m=null,v=null;r.rewind&&(t.isBeginning?v=t.params.virtual&&t.params.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(m=0));const y=(f-a[p])/g,b=p<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(u>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(y>=r.longSwipesRatio?t.slideTo(r.rewind&&t.isEnd?m:p+b):t.slideTo(p)),"prev"===t.swipeDirection&&(y>1-r.longSwipesRatio?t.slideTo(p+b):null!==v&&y<0&&Math.abs(y)>r.longSwipesRatio?t.slideTo(v):t.slideTo(p))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(l.target===t.navigation.nextEl||l.target===t.navigation.prevEl)?l.target===t.navigation.nextEl?t.slideTo(p+b):t.slideTo(p):("next"===t.swipeDirection&&t.slideTo(null!==m?m:p+b),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:p))}}function $(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:o}=e;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=i,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function D(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function I(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const o=e.maxTranslate()-e.minTranslate();i=0===o?0:(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}let j=!1;function q(){}const R=(e,t)=>{const n=r(),{params:i,touchEvents:o,el:a,wrapperEl:s,device:l,support:c}=e,u=!!i.nested,d="on"===t?"addEventListener":"removeEventListener",h=t;if(c.touch){const t=!("touchstart"!==o.start||!c.passiveListener||!i.passiveListeners)&&{passive:!0,capture:!1};a[d](o.start,e.onTouchStart,t),a[d](o.move,e.onTouchMove,c.passiveListener?{passive:!1,capture:u}:u),a[d](o.end,e.onTouchEnd,t),o.cancel&&a[d](o.cancel,e.onTouchEnd,t)}else a[d](o.start,e.onTouchStart,!1),n[d](o.move,e.onTouchMove,u),n[d](o.end,e.onTouchEnd,!1);(i.preventClicks||i.preventClicksPropagation)&&a[d]("click",e.onClick,!0),i.cssMode&&s[d]("scroll",e.onScroll),i.updateOnWindowResize?e[h](l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",$,!0):e[h]("observerUpdate",$,!0)};var z={attachEvents:function(){const e=this,t=r(),{params:n,support:i}=e;e.onTouchStart=P.bind(e),e.onTouchMove=L.bind(e),e.onTouchEnd=N.bind(e),n.cssMode&&(e.onScroll=I.bind(e)),e.onClick=D.bind(e),i.touch&&!j&&(t.addEventListener("touchstart",q),j=!0),R(e,"on")},detachEvents:function(){R(this,"off")}};const B=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var F={addClasses:function(){const e=this,{classNames:t,params:n,rtl:r,$el:i,device:o,support:a}=e,s=function(e,t){const n=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(r=>{e[r]&&n.push(t+r)}):"string"==typeof e&&n.push(t+e)}),n}(["initialized",n.direction,{"pointer-events":!a.touch},{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),i.addClass([...t].join(" ")),e.emitContainerClasses()},removeClasses:function(){const{$el:e,classNames:t}=this;e.removeClass(t.join(" ")),this.emitContainerClasses()}};var H={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopedSlidesLimit:!0,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function W(e,t){return function(n){void 0===n&&(n={});const r=Object.keys(n)[0],i=n[r];"object"==typeof i&&null!==i?(["navigation","pagination","scrollbar"].indexOf(r)>=0&&!0===e[r]&&(e[r]={auto:!0}),r in e&&"enabled"in i?(!0===e[r]&&(e[r]={enabled:!0}),"object"!=typeof e[r]||"enabled"in e[r]||(e[r].enabled=!0),e[r]||(e[r]={enabled:!1}),m(t,n)):m(t,n)):m(t,n)}}const V={eventsEmitter:S,update:O,translate:C,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||n.$wrapperEl.transition(e),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),T({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;n.animating=!1,r.cssMode||(n.setTransition(0),T({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:M,loop:A,grabCursor:{setGrabCursor:function(e){const t=this;if(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;n.style.cursor="move",n.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){const e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:z,breakpoints:{setBreakpoint:function(){const e=this,{activeIndex:t,initialized:n,loopedSlides:r=0,params:i,$el:o}=e,a=i.breakpoints;if(!a||a&&0===Object.keys(a).length)return;const s=e.getBreakpoint(a,e.params.breakpointsBase,e.el);if(!s||e.currentBreakpoint===s)return;const l=(s in a?a[s]:void 0)||e.originalParams,c=B(e,i),u=B(e,l),d=i.enabled;c&&!u?(o.removeClass(`${i.containerModifierClass}grid ${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&u&&(o.addClass(`${i.containerModifierClass}grid`),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===i.grid.fill)&&o.addClass(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(t=>{const n=i[t]&&i[t].enabled,r=l[t]&&l[t].enabled;n&&!r&&e[t].disable(),!n&&r&&e[t].enable()});const h=l.direction&&l.direction!==i.direction,f=i.loop&&(l.slidesPerView!==i.slidesPerView||h);h&&n&&e.changeDirection(),m(e.params,l);const p=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),d&&!p?e.disable():!d&&p&&e.enable(),e.currentBreakpoint=s,e.emit("_beforeBreakpoint",l),f&&n&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-r+e.loopedSlides,0,!1)),e.emit("breakpoint",l)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let r=!1;const i=o(),a="window"===t?i.innerHeight:n.clientHeight,s=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:a*t,point:e}}return{value:e,point:e}});s.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(let e=0;e<s.length;e+=1){const{point:o,value:a}=s[e];"window"===t?i.matchMedia(`(min-width: ${a}px)`).matches&&(r=o):a<=n.clientWidth&&(r=o)}return r||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*r;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:F,images:{loadImage:function(e,t,n,r,i,a){const s=o();let l;function u(){a&&a()}c(e).parent("picture")[0]||e.complete&&i?u():t?(l=new s.Image,l.onload=u,l.onerror=u,r&&(l.sizes=r),n&&(l.srcset=n),t&&(l.src=t)):u()},preloadImages:function(){const e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(let n=0;n<e.imagesToLoad.length;n+=1){const r=e.imagesToLoad[n];e.loadImage(r,r.currentSrc||r.getAttribute("src"),r.srcset||r.getAttribute("srcset"),r.sizes||r.getAttribute("sizes"),!0,t)}}}},U={};class G{constructor(){let e,t;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(1===r.length&&r[0].constructor&&"Object"===Object.prototype.toString.call(r[0]).slice(8,-1)?t=r[0]:[e,t]=r,t||(t={}),t=m({},t),e&&!t.el&&(t.el=e),t.el&&c(t.el).length>1){const e=[];return c(t.el).each(n=>{const r=m({},t,{el:n});e.push(new G(r))}),e}const o=this;o.__swiper__=!0,o.support=_(),o.device=k({userAgent:t.userAgent}),o.browser=E(),o.eventsListeners={},o.eventsAnyListeners=[],o.modules=[...o.__modules__],t.modules&&Array.isArray(t.modules)&&o.modules.push(...t.modules);const a={};o.modules.forEach(e=>{e({swiper:o,extendParams:W(t,a),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})});const s=m({},H,a);return o.params=m({},s,U,t),o.originalParams=m({},o.params),o.passedParams=m({},t),o.params&&o.params.on&&Object.keys(o.params.on).forEach(e=>{o.on(e,o.params.on[e])}),o.params&&o.params.onAny&&o.onAny(o.params.onAny),o.$=c,Object.assign(o,{enabled:o.params.enabled,el:e,classNames:[],slides:c(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===o.params.direction,isVertical:()=>"vertical"===o.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:o.params.allowSlideNext,allowSlidePrev:o.params.allowSlidePrev,touchEvents:function(){const e=["touchstart","touchmove","touchend","touchcancel"],t=["pointerdown","pointermove","pointerup"];return o.touchEventsTouch={start:e[0],move:e[1],end:e[2],cancel:e[3]},o.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},o.support.touch||!o.params.simulateTouch?o.touchEventsTouch:o.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o.params.focusableElements,lastClickTime:h(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:o.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o.emit("_swiper"),o.params.init&&o.init(),o}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const r=n.minTranslate(),i=(n.maxTranslate()-r)*e+r;n.translateTo(i,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.each(n=>{const r=e.getSlideClasses(n);t.push({slideEl:n,classNames:r}),e.emit("_slideClass",n,r)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:r,slidesGrid:i,slidesSizesGrid:o,size:a,activeIndex:s}=this;let l=1;if(n.centeredSlides){let e,t=r[s].swiperSlideSize;for(let n=s+1;n<r.length;n+=1)r[n]&&!e&&(t+=r[n].swiperSlideSize,l+=1,t>a&&(e=!0));for(let n=s-1;n>=0;n-=1)r[n]&&!e&&(t+=r[n].swiperSlideSize,l+=1,t>a&&(e=!0))}else if("current"===e)for(let e=s+1;e<r.length;e+=1){(t?i[e]+o[e]-i[s]<a:i[e]-i[s]<a)&&(l+=1)}else for(let e=s-1;e>=0;e-=1){i[s]-i[e]<a&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function r(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let i;n.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode&&e.params.freeMode.enabled?(r(),e.params.autoHeight&&e.updateAutoHeight()):(i=("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),i||r()),n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,r=n.params.direction;return e||(e="horizontal"===r?"vertical":"horizontal"),e===r||"horizontal"!==e&&"vertical"!==e||(n.$el.removeClass(`${n.params.containerModifierClass}${r}`).addClass(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.each(t=>{"vertical"===e?t.style.width="":t.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.$el.addClass(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.$el.removeClass(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;const n=c(e||t.params.el);if(!(e=n[0]))return!1;e.swiper=t;const i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let o=(()=>{if(e&&e.shadowRoot&&e.shadowRoot.querySelector){const t=c(e.shadowRoot.querySelector(i()));return t.children=e=>n.children(e),t}return n.children?n.children(i()):c(n).children(i())})();if(0===o.length&&t.params.createElements){const e=r().createElement("div");o=c(e),e.className=t.params.wrapperClass,n.append(e),n.children(`.${t.params.slideClass}`).each(e=>{o.append(e)})}return Object.assign(t,{$el:n,el:e,$wrapperEl:o,wrapperEl:o[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===n.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===n.css("direction")),wrongRTL:"-webkit-box"===o.css("display")}),!0}init(e){const t=this;if(t.initialized)return t;return!1===t.mount(e)||(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit")),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:r,$el:i,$wrapperEl:o,slides:a}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),t&&(n.removeClasses(),i.removeAttr("style"),o.removeAttr("style"),a&&a.length&&a.removeClass([r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(e=>{n.off(e)}),!1!==e&&(n.$el[0].swiper=null,function(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(n)),n.destroyed=!0),null}static extendDefaults(e){m(U,e)}static get extendedDefaults(){return U}static get defaults(){return H}static installModule(e){G.prototype.__modules__||(G.prototype.__modules__=[]);const t=G.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(e=>G.installModule(e)),G):(G.installModule(e),G)}}function Y(e,t,n,i){const o=r();return e.params.createElements&&Object.keys(i).forEach(r=>{if(!n[r]&&!0===n.auto){let a=e.$el.children(`.${i[r]}`)[0];a||(a=o.createElement("div"),a.className=i[r],e.$el.append(a)),n[r]=a,t[r]=a}}),n}function X(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}`}function K(e){const t=this,{$wrapperEl:n,params:r}=t;if(r.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&n.append(e[t]);else n.append(e);r.loop&&t.loopCreate(),r.observer||t.update()}function Z(e){const t=this,{params:n,$wrapperEl:r,activeIndex:i}=t;n.loop&&t.loopDestroy();let o=i+1;if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&r.prepend(e[t]);o=i+e.length}else r.prepend(e);n.loop&&t.loopCreate(),n.observer||t.update(),t.slideTo(o,0,!1)}function Q(e,t){const n=this,{$wrapperEl:r,params:i,activeIndex:o}=n;let a=o;i.loop&&(a-=n.loopedSlides,n.loopDestroy(),n.slides=r.children(`.${i.slideClass}`));const s=n.slides.length;if(e<=0)return void n.prependSlide(t);if(e>=s)return void n.appendSlide(t);let l=a>e?a+1:a;const c=[];for(let t=s-1;t>=e;t-=1){const e=n.slides.eq(t);e.remove(),c.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&r.append(t[e]);l=a>e?a+t.length:a}else r.append(t);for(let e=0;e<c.length;e+=1)r.append(c[e]);i.loop&&n.loopCreate(),i.observer||n.update(),i.loop?n.slideTo(l+n.loopedSlides,0,!1):n.slideTo(l,0,!1)}function J(e){const t=this,{params:n,$wrapperEl:r,activeIndex:i}=t;let o=i;n.loop&&(o-=t.loopedSlides,t.loopDestroy(),t.slides=r.children(`.${n.slideClass}`));let a,s=o;if("object"==typeof e&&"length"in e){for(let n=0;n<e.length;n+=1)a=e[n],t.slides[a]&&t.slides.eq(a).remove(),a<s&&(s-=1);s=Math.max(s,0)}else a=e,t.slides[a]&&t.slides.eq(a).remove(),a<s&&(s-=1),s=Math.max(s,0);n.loop&&t.loopCreate(),n.observer||t.update(),n.loop?t.slideTo(s+t.loopedSlides,0,!1):t.slideTo(s,0,!1)}function ee(){const e=this,t=[];for(let n=0;n<e.slides.length;n+=1)t.push(n);e.removeSlide(t)}function te(e){const{effect:t,swiper:n,on:r,setTranslate:i,setTransition:o,overwriteParams:a,perspective:s,recreateShadows:l,getEffectParams:c}=e;let u;r("beforeInit",()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),s&&s()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=a?a():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)}),r("setTranslate",()=>{n.params.effect===t&&i()}),r("setTransition",(e,r)=>{n.params.effect===t&&o(r)}),r("transitionEnd",()=>{if(n.params.effect===t&&l){if(!c||!c().slideShadows)return;n.slides.each(e=>{n.$(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").remove()}),l()}}),r("virtualUpdate",()=>{n.params.effect===t&&(n.slides.length||(u=!0),requestAnimationFrame(()=>{u&&n.slides&&n.slides.length&&(i(),u=!1)}))})}function ne(e,t){return e.transformEl?t.find(e.transformEl).css({"backface-visibility":"hidden","-webkit-backface-visibility":"hidden"}):t}function re(e){let{swiper:t,duration:n,transformEl:r,allSlides:i}=e;const{slides:o,activeIndex:a,$wrapperEl:s}=t;if(t.params.virtualTranslate&&0!==n){let e,n=!1;e=i?r?o.find(r):o:r?o.eq(a).find(r):o.eq(a),e.transitionEnd(()=>{if(n)return;if(!t||t.destroyed)return;n=!0,t.animating=!1;const e=["webkitTransitionEnd","transitionend"];for(let t=0;t<e.length;t+=1)s.trigger(e[t])})}}function ie(e,t,n){const r="swiper-slide-shadow"+(n?`-${n}`:""),i=e.transformEl?t.find(e.transformEl):t;let o=i.children(`.${r}`);return o.length||(o=c(`<div class="swiper-slide-shadow${n?`-${n}`:""}"></div>`),i.append(o)),o}Object.keys(V).forEach(e=>{Object.keys(V[e]).forEach(t=>{G.prototype[t]=V[e][t]})}),G.use([function(e){let{swiper:t,on:n,emit:r}=e;const i=o();let a=null,s=null;const l=()=>{t&&!t.destroyed&&t.initialized&&(r("beforeResize"),r("resize"))},c=()=>{t&&!t.destroyed&&t.initialized&&r("orientationchange")};n("init",()=>{t.params.resizeObserver&&void 0!==i.ResizeObserver?t&&!t.destroyed&&t.initialized&&(a=new ResizeObserver(e=>{s=i.requestAnimationFrame(()=>{const{width:n,height:r}=t;let i=n,o=r;e.forEach(e=>{let{contentBoxSize:n,contentRect:r,target:a}=e;a&&a!==t.el||(i=r?r.width:(n[0]||n).inlineSize,o=r?r.height:(n[0]||n).blockSize)}),i===n&&o===r||l()})}),a.observe(t.el)):(i.addEventListener("resize",l),i.addEventListener("orientationchange",c))}),n("destroy",()=>{s&&i.cancelAnimationFrame(s),a&&a.unobserve&&t.el&&(a.unobserve(t.el),a=null),i.removeEventListener("resize",l),i.removeEventListener("orientationchange",c)})},function(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const a=[],s=o(),l=function(e,t){void 0===t&&(t={});const n=new(s.MutationObserver||s.WebkitMutationObserver)(e=>{if(1===e.length)return void i("observerUpdate",e[0]);const t=function(){i("observerUpdate",e[0])};s.requestAnimationFrame?s.requestAnimationFrame(t):s.setTimeout(t,0)});n.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),a.push(n)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",()=>{if(t.params.observer){if(t.params.observeParents){const e=t.$el.parents();for(let t=0;t<e.length;t+=1)l(e[t])}l(t.$el[0],{childList:t.params.observeSlideChildren}),l(t.$wrapperEl[0],{attributes:!1})}}),r("destroy",()=>{a.forEach(e=>{e.disconnect()}),a.splice(0,a.length)})}]);const oe=[function(e){let t,{swiper:n,extendParams:r,on:i,emit:o}=e;function a(e,t){const r=n.params.virtual;if(r.cache&&n.virtual.cache[t])return n.virtual.cache[t];const i=r.renderSlide?c(r.renderSlide.call(n,e,t)):c(`<div class="${n.params.slideClass}" data-swiper-slide-index="${t}">${e}</div>`);return i.attr("data-swiper-slide-index")||i.attr("data-swiper-slide-index",t),r.cache&&(n.virtual.cache[t]=i),i}function s(e){const{slidesPerView:t,slidesPerGroup:r,centeredSlides:i}=n.params,{addSlidesBefore:s,addSlidesAfter:l}=n.params.virtual,{from:c,to:u,slides:d,slidesGrid:h,offset:f}=n.virtual;n.params.cssMode||n.updateActiveIndex();const p=n.activeIndex||0;let g,m,v;g=n.rtlTranslate?"right":n.isHorizontal()?"left":"top",i?(m=Math.floor(t/2)+r+l,v=Math.floor(t/2)+r+s):(m=t+(r-1)+l,v=r+s);const y=Math.max((p||0)-v,0),b=Math.min((p||0)+m,d.length-1),x=(n.slidesGrid[y]||0)-(n.slidesGrid[0]||0);function w(){n.updateSlides(),n.updateProgress(),n.updateSlidesClasses(),n.lazy&&n.params.lazy.enabled&&n.lazy.load(),o("virtualUpdate")}if(Object.assign(n.virtual,{from:y,to:b,offset:x,slidesGrid:n.slidesGrid}),c===y&&u===b&&!e)return n.slidesGrid!==h&&x!==f&&n.slides.css(g,`${x}px`),n.updateProgress(),void o("virtualUpdate");if(n.params.virtual.renderExternal)return n.params.virtual.renderExternal.call(n,{offset:x,from:y,to:b,slides:function(){const e=[];for(let t=y;t<=b;t+=1)e.push(d[t]);return e}()}),void(n.params.virtual.renderExternalUpdate?w():o("virtualUpdate"));const _=[],k=[];if(e)n.$wrapperEl.find(`.${n.params.slideClass}`).remove();else for(let e=c;e<=u;e+=1)(e<y||e>b)&&n.$wrapperEl.find(`.${n.params.slideClass}[data-swiper-slide-index="${e}"]`).remove();for(let t=0;t<d.length;t+=1)t>=y&&t<=b&&(void 0===u||e?k.push(t):(t>u&&k.push(t),t<c&&_.push(t)));k.forEach(e=>{n.$wrapperEl.append(a(d[e],e))}),_.sort((e,t)=>t-e).forEach(e=>{n.$wrapperEl.prepend(a(d[e],e))}),n.$wrapperEl.children(".swiper-slide").css(g,`${x}px`),w()}r({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}}),n.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]},i("beforeInit",()=>{n.params.virtual.enabled&&(n.virtual.slides=n.params.virtual.slides,n.classNames.push(`${n.params.containerModifierClass}virtual`),n.params.watchSlidesProgress=!0,n.originalParams.watchSlidesProgress=!0,n.params.initialSlide||s())}),i("setTranslate",()=>{n.params.virtual.enabled&&(n.params.cssMode&&!n._immediateVirtual?(clearTimeout(t),t=setTimeout(()=>{s()},100)):s())}),i("init update resize",()=>{n.params.virtual.enabled&&n.params.cssMode&&v(n.wrapperEl,"--swiper-virtual-size",`${n.virtualSize}px`)}),Object.assign(n.virtual,{appendSlide:function(e){if("object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&n.virtual.slides.push(e[t]);else n.virtual.slides.push(e);s(!0)},prependSlide:function(e){const t=n.activeIndex;let r=t+1,i=1;if(Array.isArray(e)){for(let t=0;t<e.length;t+=1)e[t]&&n.virtual.slides.unshift(e[t]);r=t+e.length,i=e.length}else n.virtual.slides.unshift(e);if(n.params.virtual.cache){const e=n.virtual.cache,t={};Object.keys(e).forEach(n=>{const r=e[n],o=r.attr("data-swiper-slide-index");o&&r.attr("data-swiper-slide-index",parseInt(o,10)+i),t[parseInt(n,10)+i]=r}),n.virtual.cache=t}s(!0),n.slideTo(r,0)},removeSlide:function(e){if(null==e)return;let t=n.activeIndex;if(Array.isArray(e))for(let r=e.length-1;r>=0;r-=1)n.virtual.slides.splice(e[r],1),n.params.virtual.cache&&delete n.virtual.cache[e[r]],e[r]<t&&(t-=1),t=Math.max(t,0);else n.virtual.slides.splice(e,1),n.params.virtual.cache&&delete n.virtual.cache[e],e<t&&(t-=1),t=Math.max(t,0);s(!0),n.slideTo(t,0)},removeAllSlides:function(){n.virtual.slides=[],n.params.virtual.cache&&(n.virtual.cache={}),s(!0),n.slideTo(0,0)},update:s})},function(e){let{swiper:t,extendParams:n,on:i,emit:a}=e;const s=r(),l=o();function u(e){if(!t.enabled)return;const{rtlTranslate:n}=t;let r=e;r.originalEvent&&(r=r.originalEvent);const i=r.keyCode||r.charCode,o=t.params.keyboard.pageUpDown,c=o&&33===i,u=o&&34===i,d=37===i,h=39===i,f=38===i,p=40===i;if(!t.allowSlideNext&&(t.isHorizontal()&&h||t.isVertical()&&p||u))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&d||t.isVertical()&&f||c))return!1;if(!(r.shiftKey||r.altKey||r.ctrlKey||r.metaKey||s.activeElement&&s.activeElement.nodeName&&("input"===s.activeElement.nodeName.toLowerCase()||"textarea"===s.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(c||u||d||h||f||p)){let e=!1;if(t.$el.parents(`.${t.params.slideClass}`).length>0&&0===t.$el.parents(`.${t.params.slideActiveClass}`).length)return;const r=t.$el,i=r[0].clientWidth,o=r[0].clientHeight,a=l.innerWidth,s=l.innerHeight,c=t.$el.offset();n&&(c.left-=t.$el[0].scrollLeft);const u=[[c.left,c.top],[c.left+i,c.top],[c.left,c.top+o],[c.left+i,c.top+o]];for(let t=0;t<u.length;t+=1){const n=u[t];if(n[0]>=0&&n[0]<=a&&n[1]>=0&&n[1]<=s){if(0===n[0]&&0===n[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((c||u||d||h)&&(r.preventDefault?r.preventDefault():r.returnValue=!1),((u||h)&&!n||(c||d)&&n)&&t.slideNext(),((c||d)&&!n||(u||h)&&n)&&t.slidePrev()):((c||u||f||p)&&(r.preventDefault?r.preventDefault():r.returnValue=!1),(u||p)&&t.slideNext(),(c||f)&&t.slidePrev()),a("keyPress",i)}}function d(){t.keyboard.enabled||(c(s).on("keydown",u),t.keyboard.enabled=!0)}function h(){t.keyboard.enabled&&(c(s).off("keydown",u),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},n({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),i("init",()=>{t.params.keyboard.enabled&&d()}),i("destroy",()=>{t.keyboard.enabled&&h()}),Object.assign(t.keyboard,{enable:d,disable:h})},function(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const a=o();let s;n({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}}),t.mousewheel={enabled:!1};let l,u=h();const f=[];function p(){t.enabled&&(t.mouseEntered=!0)}function g(){t.enabled&&(t.mouseEntered=!1)}function m(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta)&&(!(t.params.mousewheel.thresholdTime&&h()-u<t.params.mousewheel.thresholdTime)&&(e.delta>=6&&h()-u<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),i("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),i("scroll",e.raw)),u=(new a.Date).getTime(),!1)))}function v(e){let n=e,r=!0;if(!t.enabled)return;const o=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let a=t.$el;if("container"!==t.params.mousewheel.eventsTarget&&(a=c(t.params.mousewheel.eventsTarget)),!t.mouseEntered&&!a[0].contains(n.target)&&!o.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let u=0;const p=t.rtlTranslate?-1:1,g=function(e){let t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),e.shiftKey&&!r&&(r=i,i=0),(r||i)&&e.deltaMode&&(1===e.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}(n);if(o.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(g.pixelX)>Math.abs(g.pixelY)))return!0;u=-g.pixelX*p}else{if(!(Math.abs(g.pixelY)>Math.abs(g.pixelX)))return!0;u=-g.pixelY}else u=Math.abs(g.pixelX)>Math.abs(g.pixelY)?-g.pixelX*p:-g.pixelY;if(0===u)return!0;o.invert&&(u=-u);let v=t.getTranslate()+u*o.sensitivity;if(v>=t.minTranslate()&&(v=t.minTranslate()),v<=t.maxTranslate()&&(v=t.maxTranslate()),r=!!t.params.loop||!(v===t.minTranslate()||v===t.maxTranslate()),r&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:h(),delta:Math.abs(u),direction:Math.sign(u)},r=l&&e.time<l.time+500&&e.delta<=l.delta&&e.direction===l.direction;if(!r){l=void 0,t.params.loop&&t.loopFix();let a=t.getTranslate()+u*o.sensitivity;const c=t.isBeginning,h=t.isEnd;if(a>=t.minTranslate()&&(a=t.minTranslate()),a<=t.maxTranslate()&&(a=t.maxTranslate()),t.setTransition(0),t.setTranslate(a),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!c&&t.isBeginning||!h&&t.isEnd)&&t.updateSlidesClasses(),t.params.freeMode.sticky){clearTimeout(s),s=void 0,f.length>=15&&f.shift();const n=f.length?f[f.length-1]:void 0,r=f[0];if(f.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))f.splice(0);else if(f.length>=15&&e.time-r.time<500&&r.delta-e.delta>=1&&e.delta<=6){const n=u>0?.8:.2;l=e,f.splice(0),s=d(()=>{t.slideToClosest(t.params.speed,!0,void 0,n)},0)}s||(s=d(()=>{l=e,f.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)},500))}if(r||i("scroll",n),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),a===t.minTranslate()||a===t.maxTranslate())return!0}}else{const n={time:h(),delta:Math.abs(u),direction:Math.sign(u),raw:e};f.length>=2&&f.shift();const r=f.length?f[f.length-1]:void 0;if(f.push(n),r?(n.direction!==r.direction||n.delta>r.delta||n.time>r.time+150)&&m(n):m(n),function(e){const n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1}(n))return!0}return n.preventDefault?n.preventDefault():n.returnValue=!1,!1}function y(e){let n=t.$el;"container"!==t.params.mousewheel.eventsTarget&&(n=c(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",p),n[e]("mouseleave",g),n[e]("wheel",v)}function b(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",v),!0):!t.mousewheel.enabled&&(y("on"),t.mousewheel.enabled=!0,!0)}function x(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,v),!0):!!t.mousewheel.enabled&&(y("off"),t.mousewheel.enabled=!1,!0)}r("init",()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&x(),t.params.mousewheel.enabled&&b()}),r("destroy",()=>{t.params.cssMode&&b(),t.mousewheel.enabled&&x()}),Object.assign(t.mousewheel,{enable:b,disable:x})},function(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;function o(e){let n;return e&&(n=c(e),t.params.uniqueNavElements&&"string"==typeof e&&n.length>1&&1===t.$el.find(e).length&&(n=t.$el.find(e))),n}function a(e,n){const r=t.params.navigation;e&&e.length>0&&(e[n?"addClass":"removeClass"](r.disabledClass),e[0]&&"BUTTON"===e[0].tagName&&(e[0].disabled=n),t.params.watchOverflow&&t.enabled&&e[t.isLocked?"addClass":"removeClass"](r.lockClass))}function s(){if(t.params.loop)return;const{$nextEl:e,$prevEl:n}=t.navigation;a(n,t.isBeginning&&!t.params.rewind),a(e,t.isEnd&&!t.params.rewind)}function l(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function u(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function d(){const e=t.params.navigation;if(t.params.navigation=Y(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;const n=o(e.nextEl),r=o(e.prevEl);n&&n.length>0&&n.on("click",u),r&&r.length>0&&r.on("click",l),Object.assign(t.navigation,{$nextEl:n,nextEl:n&&n[0],$prevEl:r,prevEl:r&&r[0]}),t.enabled||(n&&n.addClass(e.lockClass),r&&r.addClass(e.lockClass))}function h(){const{$nextEl:e,$prevEl:n}=t.navigation;e&&e.length&&(e.off("click",u),e.removeClass(t.params.navigation.disabledClass)),n&&n.length&&(n.off("click",l),n.removeClass(t.params.navigation.disabledClass))}n({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null},r("init",()=>{!1===t.params.navigation.enabled?f():(d(),s())}),r("toEdge fromEdge lock unlock",()=>{s()}),r("destroy",()=>{h()}),r("enable disable",()=>{const{$nextEl:e,$prevEl:n}=t.navigation;e&&e[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass),n&&n[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass)}),r("click",(e,n)=>{const{$nextEl:r,$prevEl:o}=t.navigation,a=n.target;if(t.params.navigation.hideOnClick&&!c(a).is(o)&&!c(a).is(r)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===a||t.pagination.el.contains(a)))return;let e;r?e=r.hasClass(t.params.navigation.hiddenClass):o&&(e=o.hasClass(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),r&&r.toggleClass(t.params.navigation.hiddenClass),o&&o.toggleClass(t.params.navigation.hiddenClass)}});const f=()=>{t.$el.addClass(t.params.navigation.navigationDisabledClass),h()};Object.assign(t.navigation,{enable:()=>{t.$el.removeClass(t.params.navigation.navigationDisabledClass),d(),s()},disable:f,update:s,init:d,destroy:h})},function(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o="swiper-pagination";let a;n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${o}-bullet`,bulletActiveClass:`${o}-bullet-active`,modifierClass:`${o}-`,currentClass:`${o}-current`,totalClass:`${o}-total`,hiddenClass:`${o}-hidden`,progressbarFillClass:`${o}-progressbar-fill`,progressbarOppositeClass:`${o}-progressbar-opposite`,clickableClass:`${o}-clickable`,lockClass:`${o}-lock`,horizontalClass:`${o}-horizontal`,verticalClass:`${o}-vertical`,paginationDisabledClass:`${o}-disabled`}}),t.pagination={el:null,$el:null,bullets:[]};let s=0;function l(){return!t.params.pagination.el||!t.pagination.el||!t.pagination.$el||0===t.pagination.$el.length}function u(e,n){const{bulletActiveClass:r}=t.params.pagination;e[n]().addClass(`${r}-${n}`)[n]().addClass(`${r}-${n}-${n}`)}function d(){const e=t.rtl,n=t.params.pagination;if(l())return;const r=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,o=t.pagination.$el;let d;const h=t.params.loop?Math.ceil((r-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(d=Math.ceil((t.activeIndex-t.loopedSlides)/t.params.slidesPerGroup),d>r-1-2*t.loopedSlides&&(d-=r-2*t.loopedSlides),d>h-1&&(d-=h),d<0&&"bullets"!==t.params.paginationType&&(d=h+d)):d=void 0!==t.snapIndex?t.snapIndex:t.activeIndex||0,"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const r=t.pagination.bullets;let i,l,h;if(n.dynamicBullets&&(a=r.eq(0)[t.isHorizontal()?"outerWidth":"outerHeight"](!0),o.css(t.isHorizontal()?"width":"height",a*(n.dynamicMainBullets+4)+"px"),n.dynamicMainBullets>1&&void 0!==t.previousIndex&&(s+=d-(t.previousIndex-t.loopedSlides||0),s>n.dynamicMainBullets-1?s=n.dynamicMainBullets-1:s<0&&(s=0)),i=Math.max(d-s,0),l=i+(Math.min(r.length,n.dynamicMainBullets)-1),h=(l+i)/2),r.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${n.bulletActiveClass}${e}`).join(" ")),o.length>1)r.each(e=>{const t=c(e),r=t.index();r===d&&t.addClass(n.bulletActiveClass),n.dynamicBullets&&(r>=i&&r<=l&&t.addClass(`${n.bulletActiveClass}-main`),r===i&&u(t,"prev"),r===l&&u(t,"next"))});else{const e=r.eq(d),o=e.index();if(e.addClass(n.bulletActiveClass),n.dynamicBullets){const e=r.eq(i),a=r.eq(l);for(let e=i;e<=l;e+=1)r.eq(e).addClass(`${n.bulletActiveClass}-main`);if(t.params.loop)if(o>=r.length){for(let e=n.dynamicMainBullets;e>=0;e-=1)r.eq(r.length-e).addClass(`${n.bulletActiveClass}-main`);r.eq(r.length-n.dynamicMainBullets-1).addClass(`${n.bulletActiveClass}-prev`)}else u(e,"prev"),u(a,"next");else u(e,"prev"),u(a,"next")}}if(n.dynamicBullets){const i=Math.min(r.length,n.dynamicMainBullets+4),o=(a*i-a)/2-h*a,s=e?"right":"left";r.css(t.isHorizontal()?s:"top",`${o}px`)}}if("fraction"===n.type&&(o.find(X(n.currentClass)).text(n.formatFractionCurrent(d+1)),o.find(X(n.totalClass)).text(n.formatFractionTotal(h))),"progressbar"===n.type){let e;e=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(d+1)/h;let i=1,a=1;"horizontal"===e?i=r:a=r,o.find(X(n.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${i}) scaleY(${a})`).transition(t.params.speed)}"custom"===n.type&&n.renderCustom?(o.html(n.renderCustom(t,d+1,h)),i("paginationRender",o[0])):i("paginationUpdate",o[0]),t.params.watchOverflow&&t.enabled&&o[t.isLocked?"addClass":"removeClass"](n.lockClass)}function h(){const e=t.params.pagination;if(l())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,r=t.pagination.$el;let o="";if("bullets"===e.type){let i=t.params.loop?Math.ceil((n-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&!t.params.loop&&i>n&&(i=n);for(let n=0;n<i;n+=1)e.renderBullet?o+=e.renderBullet.call(t,n,e.bulletClass):o+=`<${e.bulletElement} class="${e.bulletClass}"></${e.bulletElement}>`;r.html(o),t.pagination.bullets=r.find(X(e.bulletClass))}"fraction"===e.type&&(o=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`,r.html(o)),"progressbar"===e.type&&(o=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`,r.html(o)),"custom"!==e.type&&i("paginationRender",t.pagination.$el[0])}function f(){t.params.pagination=Y(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n=c(e.el);0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&n.length>1&&(n=t.$el.find(e.el),n.length>1&&(n=n.filter(e=>c(e).parents(".swiper")[0]===t.el))),"bullets"===e.type&&e.clickable&&n.addClass(e.clickableClass),n.addClass(e.modifierClass+e.type),n.addClass(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(n.addClass(`${e.modifierClass}${e.type}-dynamic`),s=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.addClass(e.progressbarOppositeClass),e.clickable&&n.on("click",X(e.bulletClass),function(e){e.preventDefault();let n=c(this).index()*t.params.slidesPerGroup;t.params.loop&&(n+=t.loopedSlides),t.slideTo(n)}),Object.assign(t.pagination,{$el:n,el:n[0]}),t.enabled||n.addClass(e.lockClass))}function p(){const e=t.params.pagination;if(l())return;const n=t.pagination.$el;n.removeClass(e.hiddenClass),n.removeClass(e.modifierClass+e.type),n.removeClass(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.pagination.bullets&&t.pagination.bullets.removeClass&&t.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&n.off("click",X(e.bulletClass))}r("init",()=>{!1===t.params.pagination.enabled?g():(f(),h(),d())}),r("activeIndexChange",()=>{(t.params.loop||void 0===t.snapIndex)&&d()}),r("snapIndexChange",()=>{t.params.loop||d()}),r("slidesLengthChange",()=>{t.params.loop&&(h(),d())}),r("snapGridLengthChange",()=>{t.params.loop||(h(),d())}),r("destroy",()=>{p()}),r("enable disable",()=>{const{$el:e}=t.pagination;e&&e[t.enabled?"removeClass":"addClass"](t.params.pagination.lockClass)}),r("lock unlock",()=>{d()}),r("click",(e,n)=>{const r=n.target,{$el:o}=t.pagination;if(t.params.pagination.el&&t.params.pagination.hideOnClick&&o&&o.length>0&&!c(r).hasClass(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&r===t.navigation.nextEl||t.navigation.prevEl&&r===t.navigation.prevEl))return;const e=o.hasClass(t.params.pagination.hiddenClass);i(!0===e?"paginationShow":"paginationHide"),o.toggleClass(t.params.pagination.hiddenClass)}});const g=()=>{t.$el.addClass(t.params.pagination.paginationDisabledClass),t.pagination.$el&&t.pagination.$el.addClass(t.params.pagination.paginationDisabledClass),p()};Object.assign(t.pagination,{enable:()=>{t.$el.removeClass(t.params.pagination.paginationDisabledClass),t.pagination.$el&&t.pagination.$el.removeClass(t.params.pagination.paginationDisabledClass),f(),h(),d()},disable:g,render:h,update:d,init:f,destroy:p})},function(e){let{swiper:t,extendParams:n,on:i,emit:o}=e;const a=r();let s,l,u,h,f=!1,p=null,g=null;function m(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:n,progress:r}=t,{$dragEl:i,$el:o}=e,a=t.params.scrollbar;let s=l,c=(u-l)*r;n?(c=-c,c>0?(s=l-c,c=0):-c+l>u&&(s=u+c)):c<0?(s=l+c,c=0):c+l>u&&(s=u-c),t.isHorizontal()?(i.transform(`translate3d(${c}px, 0, 0)`),i[0].style.width=`${s}px`):(i.transform(`translate3d(0px, ${c}px, 0)`),i[0].style.height=`${s}px`),a.hide&&(clearTimeout(p),o[0].style.opacity=1,p=setTimeout(()=>{o[0].style.opacity=0,o.transition(400)},1e3))}function v(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{$dragEl:n,$el:r}=e;n[0].style.width="",n[0].style.height="",u=t.isHorizontal()?r[0].offsetWidth:r[0].offsetHeight,h=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),l="auto"===t.params.scrollbar.dragSize?u*h:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?n[0].style.width=`${l}px`:n[0].style.height=`${l}px`,r[0].style.display=h>=1?"none":"",t.params.scrollbar.hide&&(r[0].style.opacity=0),t.params.watchOverflow&&t.enabled&&e.$el[t.isLocked?"addClass":"removeClass"](t.params.scrollbar.lockClass)}function y(e){return t.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY}function b(e){const{scrollbar:n,rtlTranslate:r}=t,{$el:i}=n;let o;o=(y(e)-i.offset()[t.isHorizontal()?"left":"top"]-(null!==s?s:l/2))/(u-l),o=Math.max(Math.min(o,1),0),r&&(o=1-o);const a=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*o;t.updateProgress(a),t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}function x(e){const n=t.params.scrollbar,{scrollbar:r,$wrapperEl:i}=t,{$el:a,$dragEl:l}=r;f=!0,s=e.target===l[0]||e.target===l?y(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),i.transition(100),l.transition(100),b(e),clearTimeout(g),a.transition(0),n.hide&&a.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),o("scrollbarDragStart",e)}function w(e){const{scrollbar:n,$wrapperEl:r}=t,{$el:i,$dragEl:a}=n;f&&(e.preventDefault?e.preventDefault():e.returnValue=!1,b(e),r.transition(0),i.transition(0),a.transition(0),o("scrollbarDragMove",e))}function _(e){const n=t.params.scrollbar,{scrollbar:r,$wrapperEl:i}=t,{$el:a}=r;f&&(f=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),i.transition("")),n.hide&&(clearTimeout(g),g=d(()=>{a.css("opacity",0),a.transition(400)},1e3)),o("scrollbarDragEnd",e),n.snapOnRelease&&t.slideToClosest())}function k(e){const{scrollbar:n,touchEventsTouch:r,touchEventsDesktop:i,params:o,support:s}=t,l=n.$el;if(!l)return;const c=l[0],u=!(!s.passiveListener||!o.passiveListeners)&&{passive:!1,capture:!1},d=!(!s.passiveListener||!o.passiveListeners)&&{passive:!0,capture:!1};if(!c)return;const h="on"===e?"addEventListener":"removeEventListener";s.touch?(c[h](r.start,x,u),c[h](r.move,w,u),c[h](r.end,_,d)):(c[h](i.start,x,u),a[h](i.move,w,u),a[h](i.end,_,d))}function E(){const{scrollbar:e,$el:n}=t;t.params.scrollbar=Y(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const r=t.params.scrollbar;if(!r.el)return;let i=c(r.el);t.params.uniqueNavElements&&"string"==typeof r.el&&i.length>1&&1===n.find(r.el).length&&(i=n.find(r.el)),i.addClass(t.isHorizontal()?r.horizontalClass:r.verticalClass);let o=i.find(`.${t.params.scrollbar.dragClass}`);0===o.length&&(o=c(`<div class="${t.params.scrollbar.dragClass}"></div>`),i.append(o)),Object.assign(e,{$el:i,el:i[0],$dragEl:o,dragEl:o[0]}),r.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&k("on"),i&&i[t.enabled?"removeClass":"addClass"](t.params.scrollbar.lockClass)}function S(){const e=t.params.scrollbar,n=t.scrollbar.$el;n&&n.removeClass(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.params.scrollbar.el&&t.scrollbar.el&&k("off")}n({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null,$el:null,$dragEl:null},i("init",()=>{!1===t.params.scrollbar.enabled?O():(E(),v(),m())}),i("update resize observerUpdate lock unlock",()=>{v()}),i("setTranslate",()=>{m()}),i("setTransition",(e,n)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)}(n)}),i("enable disable",()=>{const{$el:e}=t.scrollbar;e&&e[t.enabled?"removeClass":"addClass"](t.params.scrollbar.lockClass)}),i("destroy",()=>{S()});const O=()=>{t.$el.addClass(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.$el&&t.scrollbar.$el.addClass(t.params.scrollbar.scrollbarDisabledClass),S()};Object.assign(t.scrollbar,{enable:()=>{t.$el.removeClass(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.$el&&t.scrollbar.$el.removeClass(t.params.scrollbar.scrollbarDisabledClass),E(),v(),m()},disable:O,updateSize:v,setTranslate:m,init:E,destroy:S})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({parallax:{enabled:!1}});const i=(e,n)=>{const{rtl:r}=t,i=c(e),o=r?-1:1,a=i.attr("data-swiper-parallax")||"0";let s=i.attr("data-swiper-parallax-x"),l=i.attr("data-swiper-parallax-y");const u=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(s||l?(s=s||"0",l=l||"0"):t.isHorizontal()?(s=a,l="0"):(l=a,s="0"),s=s.indexOf("%")>=0?parseInt(s,10)*n*o+"%":s*n*o+"px",l=l.indexOf("%")>=0?parseInt(l,10)*n+"%":l*n+"px",null!=d){const e=d-(d-1)*(1-Math.abs(n));i[0].style.opacity=e}if(null==u)i.transform(`translate3d(${s}, ${l}, 0px)`);else{const e=u-(u-1)*(1-Math.abs(n));i.transform(`translate3d(${s}, ${l}, 0px) scale(${e})`)}},o=()=>{const{$el:e,slides:n,progress:r,snapGrid:o}=t;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(e=>{i(e,r)}),n.each((e,n)=>{let a=e.progress;t.params.slidesPerGroup>1&&"auto"!==t.params.slidesPerView&&(a+=Math.ceil(n/2)-r*(o.length-1)),a=Math.min(Math.max(a,-1),1),c(e).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(e=>{i(e,a)})})};r("beforeInit",()=>{t.params.parallax.enabled&&(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)}),r("init",()=>{t.params.parallax.enabled&&o()}),r("setTranslate",()=>{t.params.parallax.enabled&&o()}),r("setTransition",(e,n)=>{t.params.parallax.enabled&&function(e){void 0===e&&(e=t.params.speed);const{$el:n}=t;n.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(t=>{const n=c(t);let r=parseInt(n.attr("data-swiper-parallax-duration"),10)||e;0===e&&(r=0),n.transition(r)})}(n)})},function(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const a=o();n({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),t.zoom={enabled:!1};let s,l,u,d=1,h=!1;const p={$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},g={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},m={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let v=1;function y(e){if(e.targetTouches.length<2)return 1;const t=e.targetTouches[0].pageX,n=e.targetTouches[0].pageY,r=e.targetTouches[1].pageX,i=e.targetTouches[1].pageY;return Math.sqrt((r-t)**2+(i-n)**2)}function b(e){const n=t.support,r=t.params.zoom;if(l=!1,u=!1,!n.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;l=!0,p.scaleStart=y(e)}p.$slideEl&&p.$slideEl.length||(p.$slideEl=c(e.target).closest(`.${t.params.slideClass}`),0===p.$slideEl.length&&(p.$slideEl=t.slides.eq(t.activeIndex)),p.$imageEl=p.$slideEl.find(`.${r.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),p.$imageWrapEl=p.$imageEl.parent(`.${r.containerClass}`),p.maxRatio=p.$imageWrapEl.attr("data-swiper-zoom")||r.maxRatio,0!==p.$imageWrapEl.length)?(p.$imageEl&&p.$imageEl.transition(0),h=!0):p.$imageEl=void 0}function x(e){const n=t.support,r=t.params.zoom,i=t.zoom;if(!n.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;u=!0,p.scaleMove=y(e)}p.$imageEl&&0!==p.$imageEl.length?(n.gestures?i.scale=e.scale*d:i.scale=p.scaleMove/p.scaleStart*d,i.scale>p.maxRatio&&(i.scale=p.maxRatio-1+(i.scale-p.maxRatio+1)**.5),i.scale<r.minRatio&&(i.scale=r.minRatio+1-(r.minRatio-i.scale+1)**.5),p.$imageEl.transform(`translate3d(0,0,0) scale(${i.scale})`)):"gesturechange"===e.type&&b(e)}function w(e){const n=t.device,r=t.support,i=t.params.zoom,o=t.zoom;if(!r.gestures){if(!l||!u)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!n.android)return;l=!1,u=!1}p.$imageEl&&0!==p.$imageEl.length&&(o.scale=Math.max(Math.min(o.scale,p.maxRatio),i.minRatio),p.$imageEl.transition(t.params.speed).transform(`translate3d(0,0,0) scale(${o.scale})`),d=o.scale,h=!1,1===o.scale&&(p.$slideEl=void 0))}function _(e){const n=t.zoom;if(!p.$imageEl||0===p.$imageEl.length)return;if(t.allowClick=!1,!g.isTouched||!p.$slideEl)return;g.isMoved||(g.width=p.$imageEl[0].offsetWidth,g.height=p.$imageEl[0].offsetHeight,g.startX=f(p.$imageWrapEl[0],"x")||0,g.startY=f(p.$imageWrapEl[0],"y")||0,p.slideWidth=p.$slideEl[0].offsetWidth,p.slideHeight=p.$slideEl[0].offsetHeight,p.$imageWrapEl.transition(0));const r=g.width*n.scale,i=g.height*n.scale;if(!(r<p.slideWidth&&i<p.slideHeight)){if(g.minX=Math.min(p.slideWidth/2-r/2,0),g.maxX=-g.minX,g.minY=Math.min(p.slideHeight/2-i/2,0),g.maxY=-g.minY,g.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,g.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!g.isMoved&&!h){if(t.isHorizontal()&&(Math.floor(g.minX)===Math.floor(g.startX)&&g.touchesCurrent.x<g.touchesStart.x||Math.floor(g.maxX)===Math.floor(g.startX)&&g.touchesCurrent.x>g.touchesStart.x))return void(g.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(g.minY)===Math.floor(g.startY)&&g.touchesCurrent.y<g.touchesStart.y||Math.floor(g.maxY)===Math.floor(g.startY)&&g.touchesCurrent.y>g.touchesStart.y))return void(g.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),g.isMoved=!0,g.currentX=g.touchesCurrent.x-g.touchesStart.x+g.startX,g.currentY=g.touchesCurrent.y-g.touchesStart.y+g.startY,g.currentX<g.minX&&(g.currentX=g.minX+1-(g.minX-g.currentX+1)**.8),g.currentX>g.maxX&&(g.currentX=g.maxX-1+(g.currentX-g.maxX+1)**.8),g.currentY<g.minY&&(g.currentY=g.minY+1-(g.minY-g.currentY+1)**.8),g.currentY>g.maxY&&(g.currentY=g.maxY-1+(g.currentY-g.maxY+1)**.8),m.prevPositionX||(m.prevPositionX=g.touchesCurrent.x),m.prevPositionY||(m.prevPositionY=g.touchesCurrent.y),m.prevTime||(m.prevTime=Date.now()),m.x=(g.touchesCurrent.x-m.prevPositionX)/(Date.now()-m.prevTime)/2,m.y=(g.touchesCurrent.y-m.prevPositionY)/(Date.now()-m.prevTime)/2,Math.abs(g.touchesCurrent.x-m.prevPositionX)<2&&(m.x=0),Math.abs(g.touchesCurrent.y-m.prevPositionY)<2&&(m.y=0),m.prevPositionX=g.touchesCurrent.x,m.prevPositionY=g.touchesCurrent.y,m.prevTime=Date.now(),p.$imageWrapEl.transform(`translate3d(${g.currentX}px, ${g.currentY}px,0)`)}}function k(){const e=t.zoom;p.$slideEl&&t.previousIndex!==t.activeIndex&&(p.$imageEl&&p.$imageEl.transform("translate3d(0,0,0) scale(1)"),p.$imageWrapEl&&p.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,d=1,p.$slideEl=void 0,p.$imageEl=void 0,p.$imageWrapEl=void 0)}function E(e){const n=t.zoom,r=t.params.zoom;if(p.$slideEl||(e&&e.target&&(p.$slideEl=c(e.target).closest(`.${t.params.slideClass}`)),p.$slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?p.$slideEl=t.$wrapperEl.children(`.${t.params.slideActiveClass}`):p.$slideEl=t.slides.eq(t.activeIndex)),p.$imageEl=p.$slideEl.find(`.${r.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),p.$imageWrapEl=p.$imageEl.parent(`.${r.containerClass}`)),!p.$imageEl||0===p.$imageEl.length||!p.$imageWrapEl||0===p.$imageWrapEl.length)return;let i,o,s,l,u,h,f,m,v,y,b,x,w,_,k,E,S,O;t.params.cssMode&&(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),p.$slideEl.addClass(`${r.zoomedSlideClass}`),void 0===g.touchesStart.x&&e?(i="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,o="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(i=g.touchesStart.x,o=g.touchesStart.y),n.scale=p.$imageWrapEl.attr("data-swiper-zoom")||r.maxRatio,d=p.$imageWrapEl.attr("data-swiper-zoom")||r.maxRatio,e?(S=p.$slideEl[0].offsetWidth,O=p.$slideEl[0].offsetHeight,s=p.$slideEl.offset().left+a.scrollX,l=p.$slideEl.offset().top+a.scrollY,u=s+S/2-i,h=l+O/2-o,v=p.$imageEl[0].offsetWidth,y=p.$imageEl[0].offsetHeight,b=v*n.scale,x=y*n.scale,w=Math.min(S/2-b/2,0),_=Math.min(O/2-x/2,0),k=-w,E=-_,f=u*n.scale,m=h*n.scale,f<w&&(f=w),f>k&&(f=k),m<_&&(m=_),m>E&&(m=E)):(f=0,m=0),p.$imageWrapEl.transition(300).transform(`translate3d(${f}px, ${m}px,0)`),p.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${n.scale})`)}function S(){const e=t.zoom,n=t.params.zoom;p.$slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?p.$slideEl=t.$wrapperEl.children(`.${t.params.slideActiveClass}`):p.$slideEl=t.slides.eq(t.activeIndex),p.$imageEl=p.$slideEl.find(`.${n.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),p.$imageWrapEl=p.$imageEl.parent(`.${n.containerClass}`)),p.$imageEl&&0!==p.$imageEl.length&&p.$imageWrapEl&&0!==p.$imageWrapEl.length&&(t.params.cssMode&&(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,d=1,p.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),p.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),p.$slideEl.removeClass(`${n.zoomedSlideClass}`),p.$slideEl=void 0)}function O(e){const n=t.zoom;n.scale&&1!==n.scale?S():E(e)}function C(){const e=t.support;return{passiveListener:!("touchstart"!==t.touchEvents.start||!e.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1},activeListenerWithCapture:!e.passiveListener||{passive:!1,capture:!0}}}function T(){return`.${t.params.slideClass}`}function M(e){const{passiveListener:n}=C(),r=T();t.$wrapperEl[e]("gesturestart",r,b,n),t.$wrapperEl[e]("gesturechange",r,x,n),t.$wrapperEl[e]("gestureend",r,w,n)}function A(){s||(s=!0,M("on"))}function P(){s&&(s=!1,M("off"))}function L(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const n=t.support,{passiveListener:r,activeListenerWithCapture:i}=C(),o=T();n.gestures?(t.$wrapperEl.on(t.touchEvents.start,A,r),t.$wrapperEl.on(t.touchEvents.end,P,r)):"touchstart"===t.touchEvents.start&&(t.$wrapperEl.on(t.touchEvents.start,o,b,r),t.$wrapperEl.on(t.touchEvents.move,o,x,i),t.$wrapperEl.on(t.touchEvents.end,o,w,r),t.touchEvents.cancel&&t.$wrapperEl.on(t.touchEvents.cancel,o,w,r)),t.$wrapperEl.on(t.touchEvents.move,`.${t.params.zoom.containerClass}`,_,i)}function N(){const e=t.zoom;if(!e.enabled)return;const n=t.support;e.enabled=!1;const{passiveListener:r,activeListenerWithCapture:i}=C(),o=T();n.gestures?(t.$wrapperEl.off(t.touchEvents.start,A,r),t.$wrapperEl.off(t.touchEvents.end,P,r)):"touchstart"===t.touchEvents.start&&(t.$wrapperEl.off(t.touchEvents.start,o,b,r),t.$wrapperEl.off(t.touchEvents.move,o,x,i),t.$wrapperEl.off(t.touchEvents.end,o,w,r),t.touchEvents.cancel&&t.$wrapperEl.off(t.touchEvents.cancel,o,w,r)),t.$wrapperEl.off(t.touchEvents.move,`.${t.params.zoom.containerClass}`,_,i)}Object.defineProperty(t.zoom,"scale",{get:()=>v,set(e){if(v!==e){const t=p.$imageEl?p.$imageEl[0]:void 0,n=p.$slideEl?p.$slideEl[0]:void 0;i("zoomChange",e,t,n)}v=e}}),r("init",()=>{t.params.zoom.enabled&&L()}),r("destroy",()=>{N()}),r("touchStart",(e,n)=>{t.zoom.enabled&&function(e){const n=t.device;p.$imageEl&&0!==p.$imageEl.length&&(g.isTouched||(n.android&&e.cancelable&&e.preventDefault(),g.isTouched=!0,g.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,g.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))}(n)}),r("touchEnd",(e,n)=>{t.zoom.enabled&&function(){const e=t.zoom;if(!p.$imageEl||0===p.$imageEl.length)return;if(!g.isTouched||!g.isMoved)return g.isTouched=!1,void(g.isMoved=!1);g.isTouched=!1,g.isMoved=!1;let n=300,r=300;const i=m.x*n,o=g.currentX+i,a=m.y*r,s=g.currentY+a;0!==m.x&&(n=Math.abs((o-g.currentX)/m.x)),0!==m.y&&(r=Math.abs((s-g.currentY)/m.y));const l=Math.max(n,r);g.currentX=o,g.currentY=s;const c=g.width*e.scale,u=g.height*e.scale;g.minX=Math.min(p.slideWidth/2-c/2,0),g.maxX=-g.minX,g.minY=Math.min(p.slideHeight/2-u/2,0),g.maxY=-g.minY,g.currentX=Math.max(Math.min(g.currentX,g.maxX),g.minX),g.currentY=Math.max(Math.min(g.currentY,g.maxY),g.minY),p.$imageWrapEl.transition(l).transform(`translate3d(${g.currentX}px, ${g.currentY}px,0)`)}()}),r("doubleTap",(e,n)=>{!t.animating&&t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&O(n)}),r("transitionEnd",()=>{t.zoom.enabled&&t.params.zoom.enabled&&k()}),r("slideChange",()=>{t.zoom.enabled&&t.params.zoom.enabled&&t.params.cssMode&&k()}),Object.assign(t.zoom,{enable:L,disable:N,in:E,out:S,toggle:O})},function(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;n({lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}}),t.lazy={};let a=!1,s=!1;function l(e,n){void 0===n&&(n=!0);const r=t.params.lazy;if(void 0===e)return;if(0===t.slides.length)return;const o=t.virtual&&t.params.virtual.enabled?t.$wrapperEl.children(`.${t.params.slideClass}[data-swiper-slide-index="${e}"]`):t.slides.eq(e),a=o.find(`.${r.elementClass}:not(.${r.loadedClass}):not(.${r.loadingClass})`);!o.hasClass(r.elementClass)||o.hasClass(r.loadedClass)||o.hasClass(r.loadingClass)||a.push(o[0]),0!==a.length&&a.each(e=>{const a=c(e);a.addClass(r.loadingClass);const s=a.attr("data-background"),u=a.attr("data-src"),d=a.attr("data-srcset"),h=a.attr("data-sizes"),f=a.parent("picture");t.loadImage(a[0],u||s,d,h,!1,()=>{if(null!=t&&t&&(!t||t.params)&&!t.destroyed){if(s?(a.css("background-image",`url("${s}")`),a.removeAttr("data-background")):(d&&(a.attr("srcset",d),a.removeAttr("data-srcset")),h&&(a.attr("sizes",h),a.removeAttr("data-sizes")),f.length&&f.children("source").each(e=>{const t=c(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))}),u&&(a.attr("src",u),a.removeAttr("data-src"))),a.addClass(r.loadedClass).removeClass(r.loadingClass),o.find(`.${r.preloaderClass}`).remove(),t.params.loop&&n){const e=o.attr("data-swiper-slide-index");if(o.hasClass(t.params.slideDuplicateClass)){l(t.$wrapperEl.children(`[data-swiper-slide-index="${e}"]:not(.${t.params.slideDuplicateClass})`).index(),!1)}else{l(t.$wrapperEl.children(`.${t.params.slideDuplicateClass}[data-swiper-slide-index="${e}"]`).index(),!1)}}i("lazyImageReady",o[0],a[0]),t.params.autoHeight&&t.updateAutoHeight()}}),i("lazyImageLoad",o[0],a[0])})}function u(){const{$wrapperEl:e,params:n,slides:r,activeIndex:i}=t,o=t.virtual&&n.virtual.enabled,a=n.lazy;let u=n.slidesPerView;function d(t){if(o){if(e.children(`.${n.slideClass}[data-swiper-slide-index="${t}"]`).length)return!0}else if(r[t])return!0;return!1}function h(e){return o?c(e).attr("data-swiper-slide-index"):c(e).index()}if("auto"===u&&(u=0),s||(s=!0),t.params.watchSlidesProgress)e.children(`.${n.slideVisibleClass}`).each(e=>{l(o?c(e).attr("data-swiper-slide-index"):c(e).index())});else if(u>1)for(let e=i;e<i+u;e+=1)d(e)&&l(e);else l(i);if(a.loadPrevNext)if(u>1||a.loadPrevNextAmount&&a.loadPrevNextAmount>1){const e=a.loadPrevNextAmount,t=Math.ceil(u),n=Math.min(i+t+Math.max(e,t),r.length),o=Math.max(i-Math.max(t,e),0);for(let e=i+t;e<n;e+=1)d(e)&&l(e);for(let e=o;e<i;e+=1)d(e)&&l(e)}else{const t=e.children(`.${n.slideNextClass}`);t.length>0&&l(h(t));const r=e.children(`.${n.slidePrevClass}`);r.length>0&&l(h(r))}}function d(){const e=o();if(!t||t.destroyed)return;const n=t.params.lazy.scrollingElement?c(t.params.lazy.scrollingElement):c(e),r=n[0]===e,i=r?e.innerWidth:n[0].offsetWidth,s=r?e.innerHeight:n[0].offsetHeight,l=t.$el.offset(),{rtlTranslate:h}=t;let f=!1;h&&(l.left-=t.$el[0].scrollLeft);const p=[[l.left,l.top],[l.left+t.width,l.top],[l.left,l.top+t.height],[l.left+t.width,l.top+t.height]];for(let e=0;e<p.length;e+=1){const t=p[e];if(t[0]>=0&&t[0]<=i&&t[1]>=0&&t[1]<=s){if(0===t[0]&&0===t[1])continue;f=!0}}const g=!("touchstart"!==t.touchEvents.start||!t.support.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1};f?(u(),n.off("scroll",d,g)):a||(a=!0,n.on("scroll",d,g))}r("beforeInit",()=>{t.params.lazy.enabled&&t.params.preloadImages&&(t.params.preloadImages=!1)}),r("init",()=>{t.params.lazy.enabled&&(t.params.lazy.checkInView?d():u())}),r("scroll",()=>{t.params.freeMode&&t.params.freeMode.enabled&&!t.params.freeMode.sticky&&u()}),r("scrollbarDragMove resize _freeModeNoMomentumRelease",()=>{t.params.lazy.enabled&&(t.params.lazy.checkInView?d():u())}),r("transitionStart",()=>{t.params.lazy.enabled&&(t.params.lazy.loadOnTransitionStart||!t.params.lazy.loadOnTransitionStart&&!s)&&(t.params.lazy.checkInView?d():u())}),r("transitionEnd",()=>{t.params.lazy.enabled&&!t.params.lazy.loadOnTransitionStart&&(t.params.lazy.checkInView?d():u())}),r("slideChange",()=>{const{lazy:e,cssMode:n,watchSlidesProgress:r,touchReleaseOnEdges:i,resistanceRatio:o}=t.params;e.enabled&&(n||r&&(i||0===o))&&u()}),r("destroy",()=>{t.$el&&t.$el.find(`.${t.params.lazy.loadingClass}`).removeClass(t.params.lazy.loadingClass)}),Object.assign(t.lazy,{load:u,loadInSlide:l})},function(e){let{swiper:t,extendParams:n,on:r}=e;function i(e,t){const n=function(){let e,t,n;return(r,i)=>{for(t=-1,e=r.length;e-t>1;)n=e+t>>1,r[n]<=i?t=n:e=n;return e}}();let r,i;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(i=n(this.x,e),r=i-1,(e-this.x[r])*(this.y[i]-this.y[r])/(this.x[i]-this.x[r])+this.y[r]):0},this}function o(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}n({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},r("beforeInit",()=>{t.controller.control=t.params.controller.control}),r("update",()=>{o()}),r("resize",()=>{o()}),r("observerUpdate",()=>{o()}),r("setTranslate",(e,n,r)=>{t.controller.control&&t.controller.setTranslate(n,r)}),r("setTransition",(e,n,r)=>{t.controller.control&&t.controller.setTransition(n,r)}),Object.assign(t.controller,{setTranslate:function(e,n){const r=t.controller.control;let o,a;const s=t.constructor;function l(e){const n=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function(e){t.controller.spline||(t.controller.spline=t.params.loop?new i(t.slidesGrid,e.slidesGrid):new i(t.snapGrid,e.snapGrid))}(e),a=-t.controller.spline.interpolate(-n)),a&&"container"!==t.params.controller.by||(o=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),a=(n-t.minTranslate())*o+e.minTranslate()),t.params.controller.inverse&&(a=e.maxTranslate()-a),e.updateProgress(a),e.setTranslate(a,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(let e=0;e<r.length;e+=1)r[e]!==n&&r[e]instanceof s&&l(r[e]);else r instanceof s&&n!==r&&l(r)},setTransition:function(e,n){const r=t.constructor,i=t.controller.control;let o;function a(n){n.setTransition(e,t),0!==e&&(n.transitionStart(),n.params.autoHeight&&d(()=>{n.updateAutoHeight()}),n.$wrapperEl.transitionEnd(()=>{i&&(n.params.loop&&"slide"===t.params.controller.by&&n.loopFix(),n.transitionEnd())}))}if(Array.isArray(i))for(o=0;o<i.length;o+=1)i[o]!==n&&i[o]instanceof r&&a(i[o]);else i instanceof r&&n!==i&&a(i)}})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),t.a11y={clicked:!1};let i=null;function o(e){const t=i;0!==t.length&&(t.html(""),t.html(e))}function a(e){e.attr("tabIndex","0")}function s(e){e.attr("tabIndex","-1")}function l(e,t){e.attr("role",t)}function u(e,t){e.attr("aria-roledescription",t)}function d(e,t){e.attr("aria-label",t)}function h(e){e.attr("aria-disabled",!0)}function f(e){e.attr("aria-disabled",!1)}function p(e){if(13!==e.keyCode&&32!==e.keyCode)return;const n=t.params.a11y,r=c(e.target);t.navigation&&t.navigation.$nextEl&&r.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?o(n.lastSlideMessage):o(n.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&r.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?o(n.firstSlideMessage):o(n.prevSlideMessage)),t.pagination&&r.is(X(t.params.pagination.bulletClass))&&r[0].click()}function g(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function m(){return g()&&t.params.pagination.clickable}const v=(e,t,n)=>{a(e),"BUTTON"!==e[0].tagName&&(l(e,"button"),e.on("keydown",p)),d(e,n),function(e,t){e.attr("aria-controls",t)}(e,t)},y=()=>{t.a11y.clicked=!0},b=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.destroyed||(t.a11y.clicked=!1)})})},x=e=>{if(t.a11y.clicked)return;const n=e.target.closest(`.${t.params.slideClass}`);if(!n||!t.slides.includes(n))return;const r=t.slides.indexOf(n)===t.activeIndex,i=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(n);r||i||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,t.slideTo(t.slides.indexOf(n),0))},w=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&u(c(t.slides),e.itemRoleDescriptionMessage),e.slideRole&&l(c(t.slides),e.slideRole);const n=t.params.loop?t.slides.filter(e=>!e.classList.contains(t.params.slideDuplicateClass)).length:t.slides.length;e.slideLabelMessage&&t.slides.each((r,i)=>{const o=c(r),a=t.params.loop?parseInt(o.attr("data-swiper-slide-index"),10):i;d(o,e.slideLabelMessage.replace(/\{\{index\}\}/,a+1).replace(/\{\{slidesLength\}\}/,n))})},_=()=>{const e=t.params.a11y;t.$el.append(i);const n=t.$el;e.containerRoleDescriptionMessage&&u(n,e.containerRoleDescriptionMessage),e.containerMessage&&d(n,e.containerMessage);const r=t.$wrapperEl,o=e.id||r.attr("id")||`swiper-wrapper-${a=16,void 0===a&&(a=16),"x".repeat(a).replace(/x/g,()=>Math.round(16*Math.random()).toString(16))}`;var a;const s=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var l;let c,h;l=o,r.attr("id",l),function(e,t){e.attr("aria-live",t)}(r,s),w(),t.navigation&&t.navigation.$nextEl&&(c=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(h=t.navigation.$prevEl),c&&c.length&&v(c,o,e.nextSlideMessage),h&&h.length&&v(h,o,e.prevSlideMessage),m()&&t.pagination.$el.on("keydown",X(t.params.pagination.bulletClass),p),t.$el.on("focus",x,!0),t.$el.on("pointerdown",y,!0),t.$el.on("pointerup",b,!0)};r("beforeInit",()=>{i=c(`<span class="${t.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`)}),r("afterInit",()=>{t.params.a11y.enabled&&_()}),r("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{t.params.a11y.enabled&&w()}),r("fromEdge toEdge afterInit lock unlock",()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{$nextEl:e,$prevEl:n}=t.navigation;n&&n.length>0&&(t.isBeginning?(h(n),s(n)):(f(n),a(n))),e&&e.length>0&&(t.isEnd?(h(e),s(e)):(f(e),a(e)))}()}),r("paginationUpdate",()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;g()&&t.pagination.bullets.each(n=>{const r=c(n);t.params.pagination.clickable&&(a(r),t.params.pagination.renderBullet||(l(r,"button"),d(r,e.paginationBulletMessage.replace(/\{\{index\}\}/,r.index()+1)))),r.is(`.${t.params.pagination.bulletActiveClass}`)?r.attr("aria-current","true"):r.removeAttr("aria-current")})}()}),r("destroy",()=>{t.params.a11y.enabled&&function(){let e,n;i&&i.length>0&&i.remove(),t.navigation&&t.navigation.$nextEl&&(e=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(n=t.navigation.$prevEl),e&&e.off("keydown",p),n&&n.off("keydown",p),m()&&t.pagination.$el.off("keydown",X(t.params.pagination.bulletClass),p),t.$el.off("focus",x,!0),t.$el.off("pointerdown",y,!0),t.$el.off("pointerup",b,!0)}()})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let i=!1,a={};const s=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),l=e=>{const t=o();let n;n=e?new URL(e):t.location;const r=n.pathname.slice(1).split("/").filter(e=>""!==e),i=r.length;return{key:r[i-2],value:r[i-1]}},c=(e,n)=>{const r=o();if(!i||!t.params.history.enabled)return;let a;a=t.params.url?new URL(t.params.url):r.location;const l=t.slides.eq(n);let c=s(l.attr("data-history"));if(t.params.history.root.length>0){let n=t.params.history.root;"/"===n[n.length-1]&&(n=n.slice(0,n.length-1)),c=`${n}/${e}/${c}`}else a.pathname.includes(e)||(c=`${e}/${c}`);t.params.history.keepQuery&&(c+=a.search);const u=r.history.state;u&&u.value===c||(t.params.history.replaceState?r.history.replaceState({value:c},null,c):r.history.pushState({value:c},null,c))},u=(e,n,r)=>{if(n)for(let i=0,o=t.slides.length;i<o;i+=1){const o=t.slides.eq(i);if(s(o.attr("data-history"))===n&&!o.hasClass(t.params.slideDuplicateClass)){const n=o.index();t.slideTo(n,e,r)}}else t.slideTo(0,e,r)},d=()=>{a=l(t.params.url),u(t.params.speed,a.value,!1)};r("init",()=>{t.params.history.enabled&&(()=>{const e=o();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);i=!0,a=l(t.params.url),(a.key||a.value)&&(u(0,a.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",d))}})()}),r("destroy",()=>{t.params.history.enabled&&(()=>{const e=o();t.params.history.replaceState||e.removeEventListener("popstate",d)})()}),r("transitionEnd _freeModeNoMomentumRelease",()=>{i&&c(t.params.history.key,t.activeIndex)}),r("slideChange",()=>{i&&t.params.cssMode&&c(t.params.history.key,t.activeIndex)})},function(e){let{swiper:t,extendParams:n,emit:i,on:a}=e,s=!1;const l=r(),u=o();n({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}});const d=()=>{i("hashChange");const e=l.location.hash.replace("#","");if(e!==t.slides.eq(t.activeIndex).attr("data-hash")){const n=t.$wrapperEl.children(`.${t.params.slideClass}[data-hash="${e}"]`).index();if(void 0===n)return;t.slideTo(n)}},h=()=>{if(s&&t.params.hashNavigation.enabled)if(t.params.hashNavigation.replaceState&&u.history&&u.history.replaceState)u.history.replaceState(null,null,`#${t.slides.eq(t.activeIndex).attr("data-hash")}`||""),i("hashSet");else{const e=t.slides.eq(t.activeIndex),n=e.attr("data-hash")||e.attr("data-history");l.location.hash=n||"",i("hashSet")}};a("init",()=>{t.params.hashNavigation.enabled&&(()=>{if(!t.params.hashNavigation.enabled||t.params.history&&t.params.history.enabled)return;s=!0;const e=l.location.hash.replace("#","");if(e){const n=0;for(let r=0,i=t.slides.length;r<i;r+=1){const i=t.slides.eq(r);if((i.attr("data-hash")||i.attr("data-history"))===e&&!i.hasClass(t.params.slideDuplicateClass)){const e=i.index();t.slideTo(e,n,t.params.runCallbacksOnInit,!0)}}}t.params.hashNavigation.watchState&&c(u).on("hashchange",d)})()}),a("destroy",()=>{t.params.hashNavigation.enabled&&t.params.hashNavigation.watchState&&c(u).off("hashchange",d)}),a("transitionEnd _freeModeNoMomentumRelease",()=>{s&&h()}),a("slideChange",()=>{s&&t.params.cssMode&&h()})},function(e){let t,{swiper:n,extendParams:i,on:o,emit:a}=e;function s(){if(!n.size)return n.autoplay.running=!1,void(n.autoplay.paused=!1);const e=n.slides.eq(n.activeIndex);let r=n.params.autoplay.delay;e.attr("data-swiper-autoplay")&&(r=e.attr("data-swiper-autoplay")||n.params.autoplay.delay),clearTimeout(t),t=d(()=>{let e;n.params.autoplay.reverseDirection?n.params.loop?(n.loopFix(),e=n.slidePrev(n.params.speed,!0,!0),a("autoplay")):n.isBeginning?n.params.autoplay.stopOnLastSlide?c():(e=n.slideTo(n.slides.length-1,n.params.speed,!0,!0),a("autoplay")):(e=n.slidePrev(n.params.speed,!0,!0),a("autoplay")):n.params.loop?(n.loopFix(),e=n.slideNext(n.params.speed,!0,!0),a("autoplay")):n.isEnd?n.params.autoplay.stopOnLastSlide?c():(e=n.slideTo(0,n.params.speed,!0,!0),a("autoplay")):(e=n.slideNext(n.params.speed,!0,!0),a("autoplay")),(n.params.cssMode&&n.autoplay.running||!1===e)&&s()},r)}function l(){return void 0===t&&(!n.autoplay.running&&(n.autoplay.running=!0,a("autoplayStart"),s(),!0))}function c(){return!!n.autoplay.running&&(void 0!==t&&(t&&(clearTimeout(t),t=void 0),n.autoplay.running=!1,a("autoplayStop"),!0))}function u(e){n.autoplay.running&&(n.autoplay.paused||(t&&clearTimeout(t),n.autoplay.paused=!0,0!==e&&n.params.autoplay.waitForTransition?["transitionend","webkitTransitionEnd"].forEach(e=>{n.$wrapperEl[0].addEventListener(e,f)}):(n.autoplay.paused=!1,s())))}function h(){const e=r();"hidden"===e.visibilityState&&n.autoplay.running&&u(),"visible"===e.visibilityState&&n.autoplay.paused&&(s(),n.autoplay.paused=!1)}function f(e){n&&!n.destroyed&&n.$wrapperEl&&e.target===n.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach(e=>{n.$wrapperEl[0].removeEventListener(e,f)}),n.autoplay.paused=!1,n.autoplay.running?s():c())}function p(){n.params.autoplay.disableOnInteraction?c():(a("autoplayPause"),u()),["transitionend","webkitTransitionEnd"].forEach(e=>{n.$wrapperEl[0].removeEventListener(e,f)})}function g(){n.params.autoplay.disableOnInteraction||(n.autoplay.paused=!1,a("autoplayResume"),s())}n.autoplay={running:!1,paused:!1},i({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}}),o("init",()=>{if(n.params.autoplay.enabled){l();r().addEventListener("visibilitychange",h),n.params.autoplay.pauseOnMouseEnter&&(n.$el.on("mouseenter",p),n.$el.on("mouseleave",g))}}),o("beforeTransitionStart",(e,t,r)=>{n.autoplay.running&&(r||!n.params.autoplay.disableOnInteraction?n.autoplay.pause(t):c())}),o("sliderFirstMove",()=>{n.autoplay.running&&(n.params.autoplay.disableOnInteraction?c():u())}),o("touchEnd",()=>{n.params.cssMode&&n.autoplay.paused&&!n.params.autoplay.disableOnInteraction&&s()}),o("destroy",()=>{n.$el.off("mouseenter",p),n.$el.off("mouseleave",g),n.autoplay.running&&c();r().removeEventListener("visibilitychange",h)}),Object.assign(n.autoplay,{pause:u,run:s,start:l,stop:c})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let i=!1,o=!1;function a(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const n=e.clickedIndex,r=e.clickedSlide;if(r&&c(r).hasClass(t.params.thumbs.slideThumbActiveClass))return;if(null==n)return;let i;if(i=e.params.loop?parseInt(c(e.clickedSlide).attr("data-swiper-slide-index"),10):n,t.params.loop){let e=t.activeIndex;t.slides.eq(e).hasClass(t.params.slideDuplicateClass)&&(t.loopFix(),t._clientLeft=t.$wrapperEl[0].clientLeft,e=t.activeIndex);const n=t.slides.eq(e).prevAll(`[data-swiper-slide-index="${i}"]`).eq(0).index(),r=t.slides.eq(e).nextAll(`[data-swiper-slide-index="${i}"]`).eq(0).index();i=void 0===n?r:void 0===r?n:r-e<e-n?r:n}t.slideTo(i)}function s(){const{thumbs:e}=t.params;if(i)return!1;i=!0;const n=t.constructor;if(e.swiper instanceof n)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1});else if(p(e.swiper)){const r=Object.assign({},e.swiper);Object.assign(r,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new n(r),o=!0}return t.thumbs.swiper.$el.addClass(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",a),!0}function l(e){const n=t.thumbs.swiper;if(!n||n.destroyed)return;const r="auto"===n.params.slidesPerView?n.slidesPerViewDynamic():n.params.slidesPerView;let i=1;const o=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(i=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(i=1),i=Math.floor(i),n.slides.removeClass(o),n.params.loop||n.params.virtual&&n.params.virtual.enabled)for(let e=0;e<i;e+=1)n.$wrapperEl.children(`[data-swiper-slide-index="${t.realIndex+e}"]`).addClass(o);else for(let e=0;e<i;e+=1)n.slides.eq(t.realIndex+e).addClass(o);const a=t.params.thumbs.autoScrollOffset,s=a&&!n.params.loop;if(t.realIndex!==n.realIndex||s){let i,o,l=n.activeIndex;if(n.params.loop){n.slides.eq(l).hasClass(n.params.slideDuplicateClass)&&(n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft,l=n.activeIndex);const e=n.slides.eq(l).prevAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index(),r=n.slides.eq(l).nextAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index();i=void 0===e?r:void 0===r?e:r-l==l-e?n.params.slidesPerGroup>1?r:l:r-l<l-e?r:e,o=t.activeIndex>t.previousIndex?"next":"prev"}else i=t.realIndex,o=i>t.previousIndex?"next":"prev";s&&(i+="next"===o?a:-1*a),n.visibleSlidesIndexes&&n.visibleSlidesIndexes.indexOf(i)<0&&(n.params.centeredSlides?i=i>l?i-Math.floor(r/2)+1:i+Math.floor(r/2)-1:i>l&&n.params.slidesPerGroup,n.slideTo(i,e?0:void 0))}}t.thumbs={swiper:null},r("beforeInit",()=>{const{thumbs:e}=t.params;e&&e.swiper&&(s(),l(!0))}),r("slideChange update resize observerUpdate",()=>{l()}),r("setTransition",(e,n)=>{const r=t.thumbs.swiper;r&&!r.destroyed&&r.setTransition(n)}),r("beforeDestroy",()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&o&&e.destroy()}),Object.assign(t.thumbs,{init:s,update:l})},function(e){let{swiper:t,extendParams:n,emit:r,once:i}=e;n({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchStart:function(){const e=t.getTranslate();t.setTranslate(e),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})},onTouchMove:function(){const{touchEventsData:e,touches:n}=t;0===e.velocities.length&&e.velocities.push({position:n[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:n[t.isHorizontal()?"currentX":"currentY"],time:h()})},onTouchEnd:function(e){let{currentPos:n}=e;const{params:o,$wrapperEl:a,rtlTranslate:s,snapGrid:l,touchEventsData:c}=t,u=h()-c.touchStartTime;if(n<-t.minTranslate())t.slideTo(t.activeIndex);else if(n>-t.maxTranslate())t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1);else{if(o.freeMode.momentum){if(c.velocities.length>1){const e=c.velocities.pop(),n=c.velocities.pop(),r=e.position-n.position,i=e.time-n.time;t.velocity=r/i,t.velocity/=2,Math.abs(t.velocity)<o.freeMode.minimumVelocity&&(t.velocity=0),(i>150||h()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=o.freeMode.momentumVelocityRatio,c.velocities.length=0;let e=1e3*o.freeMode.momentumRatio;const n=t.velocity*e;let u=t.translate+n;s&&(u=-u);let d,f=!1;const p=20*Math.abs(t.velocity)*o.freeMode.momentumBounceRatio;let g;if(u<t.maxTranslate())o.freeMode.momentumBounce?(u+t.maxTranslate()<-p&&(u=t.maxTranslate()-p),d=t.maxTranslate(),f=!0,c.allowMomentumBounce=!0):u=t.maxTranslate(),o.loop&&o.centeredSlides&&(g=!0);else if(u>t.minTranslate())o.freeMode.momentumBounce?(u-t.minTranslate()>p&&(u=t.minTranslate()+p),d=t.minTranslate(),f=!0,c.allowMomentumBounce=!0):u=t.minTranslate(),o.loop&&o.centeredSlides&&(g=!0);else if(o.freeMode.sticky){let e;for(let t=0;t<l.length;t+=1)if(l[t]>-u){e=t;break}u=Math.abs(l[e]-u)<Math.abs(l[e-1]-u)||"next"===t.swipeDirection?l[e]:l[e-1],u=-u}if(g&&i("transitionEnd",()=>{t.loopFix()}),0!==t.velocity){if(e=s?Math.abs((-u-t.translate)/t.velocity):Math.abs((u-t.translate)/t.velocity),o.freeMode.sticky){const n=Math.abs((s?-u:u)-t.translate),r=t.slidesSizesGrid[t.activeIndex];e=n<r?o.speed:n<2*r?1.5*o.speed:2.5*o.speed}}else if(o.freeMode.sticky)return void t.slideToClosest();o.freeMode.momentumBounce&&f?(t.updateProgress(d),t.setTransition(e),t.setTranslate(u),t.transitionStart(!0,t.swipeDirection),t.animating=!0,a.transitionEnd(()=>{t&&!t.destroyed&&c.allowMomentumBounce&&(r("momentumBounce"),t.setTransition(o.speed),setTimeout(()=>{t.setTranslate(d),a.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()})},0))})):t.velocity?(r("_freeModeNoMomentumRelease"),t.updateProgress(u),t.setTransition(e),t.setTranslate(u),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,a.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(u),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(o.freeMode.sticky)return void t.slideToClosest();o.freeMode&&r("_freeModeNoMomentumRelease")}(!o.freeMode.momentum||u>=o.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})},function(e){let t,n,r,{swiper:i,extendParams:o}=e;o({grid:{rows:1,fill:"column"}}),i.grid={initSlides:e=>{const{slidesPerView:o}=i.params,{rows:a,fill:s}=i.params.grid;n=t/a,r=Math.floor(e/a),t=Math.floor(e/a)===e/a?e:Math.ceil(e/a)*a,"auto"!==o&&"row"===s&&(t=Math.max(t,o*a))},updateSlide:(e,o,a,s)=>{const{slidesPerGroup:l,spaceBetween:c}=i.params,{rows:u,fill:d}=i.params.grid;let h,f,p;if("row"===d&&l>1){const n=Math.floor(e/(l*u)),r=e-u*l*n,i=0===n?l:Math.min(Math.ceil((a-n*u*l)/u),l);p=Math.floor(r/i),f=r-p*i+n*l,h=f+p*t/u,o.css({"-webkit-order":h,order:h})}else"column"===d?(f=Math.floor(e/u),p=e-f*u,(f>r||f===r&&p===u-1)&&(p+=1,p>=u&&(p=0,f+=1))):(p=Math.floor(e/n),f=e-p*n);o.css(s("margin-top"),0!==p?c&&`${c}px`:"")},updateWrapperSize:(e,n,r)=>{const{spaceBetween:o,centeredSlides:a,roundLengths:s}=i.params,{rows:l}=i.params.grid;if(i.virtualSize=(e+o)*t,i.virtualSize=Math.ceil(i.virtualSize/l)-o,i.$wrapperEl.css({[r("width")]:`${i.virtualSize+o}px`}),a){n.splice(0,n.length);const e=[];for(let t=0;t<n.length;t+=1){let r=n[t];s&&(r=Math.floor(r)),n[t]<i.virtualSize+n[0]&&e.push(r)}n.push(...e)}}}},function(e){let{swiper:t}=e;Object.assign(t,{appendSlide:K.bind(t),prependSlide:Z.bind(t),addSlide:Q.bind(t),removeSlide:J.bind(t),removeAllSlides:ee.bind(t)})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({fadeEffect:{crossFade:!1,transformEl:null}}),te({effect:"fade",swiper:t,on:r,setTranslate:()=>{const{slides:e}=t,n=t.params.fadeEffect;for(let r=0;r<e.length;r+=1){const e=t.slides.eq(r);let i=-e[0].swiperSlideOffset;t.params.virtualTranslate||(i-=t.translate);let o=0;t.isHorizontal()||(o=i,i=0);const a=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e[0].progress),0):1+Math.min(Math.max(e[0].progress,-1),0);ne(n,e).css({opacity:a}).transform(`translate3d(${i}px, ${o}px, 0px)`)}},setTransition:e=>{const{transformEl:n}=t.params.fadeEffect;(n?t.slides.find(n):t.slides).transition(e),re({swiper:t,duration:e,transformEl:n,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(e,t,n)=>{let r=n?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),i=n?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===r.length&&(r=c(`<div class="swiper-slide-shadow-${n?"left":"top"}"></div>`),e.append(r)),0===i.length&&(i=c(`<div class="swiper-slide-shadow-${n?"right":"bottom"}"></div>`),e.append(i)),r.length&&(r[0].style.opacity=Math.max(-t,0)),i.length&&(i[0].style.opacity=Math.max(t,0))};te({effect:"cube",swiper:t,on:r,setTranslate:()=>{const{$el:e,$wrapperEl:n,slides:r,width:o,height:a,rtlTranslate:s,size:l,browser:u}=t,d=t.params.cubeEffect,h=t.isHorizontal(),f=t.virtual&&t.params.virtual.enabled;let p,g=0;d.shadow&&(h?(p=n.find(".swiper-cube-shadow"),0===p.length&&(p=c('<div class="swiper-cube-shadow"></div>'),n.append(p)),p.css({height:`${o}px`})):(p=e.find(".swiper-cube-shadow"),0===p.length&&(p=c('<div class="swiper-cube-shadow"></div>'),e.append(p))));for(let e=0;e<r.length;e+=1){const t=r.eq(e);let n=e;f&&(n=parseInt(t.attr("data-swiper-slide-index"),10));let o=90*n,a=Math.floor(o/360);s&&(o=-o,a=Math.floor(-o/360));const c=Math.max(Math.min(t[0].progress,1),-1);let u=0,p=0,m=0;n%4==0?(u=4*-a*l,m=0):(n-1)%4==0?(u=0,m=4*-a*l):(n-2)%4==0?(u=l+4*a*l,m=l):(n-3)%4==0&&(u=-l,m=3*l+4*l*a),s&&(u=-u),h||(p=u,u=0);const v=`rotateX(${h?0:-o}deg) rotateY(${h?o:0}deg) translate3d(${u}px, ${p}px, ${m}px)`;c<=1&&c>-1&&(g=90*n+90*c,s&&(g=90*-n-90*c)),t.transform(v),d.slideShadows&&i(t,c,h)}if(n.css({"-webkit-transform-origin":`50% 50% -${l/2}px`,"transform-origin":`50% 50% -${l/2}px`}),d.shadow)if(h)p.transform(`translate3d(0px, ${o/2+d.shadowOffset}px, ${-o/2}px) rotateX(90deg) rotateZ(0deg) scale(${d.shadowScale})`);else{const e=Math.abs(g)-90*Math.floor(Math.abs(g)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),n=d.shadowScale,r=d.shadowScale/t,i=d.shadowOffset;p.transform(`scale3d(${n}, 1, ${r}) translate3d(0px, ${a/2+i}px, ${-a/2/r}px) rotateX(-90deg)`)}const m=u.isSafari||u.isWebView?-l/2:0;n.transform(`translate3d(0px,0,${m}px) rotateX(${t.isHorizontal()?0:g}deg) rotateY(${t.isHorizontal()?-g:0}deg)`),n[0].style.setProperty("--swiper-cube-translate-z",`${m}px`)},setTransition:e=>{const{$el:n,slides:r}=t;r.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&n.find(".swiper-cube-shadow").transition(e)},recreateShadows:()=>{const e=t.isHorizontal();t.slides.each(t=>{const n=Math.max(Math.min(t.progress,1),-1);i(c(t),n,e)})},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({flipEffect:{slideShadows:!0,limitRotation:!0,transformEl:null}});const i=(e,n,r)=>{let i=t.isHorizontal()?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),o=t.isHorizontal()?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===i.length&&(i=ie(r,e,t.isHorizontal()?"left":"top")),0===o.length&&(o=ie(r,e,t.isHorizontal()?"right":"bottom")),i.length&&(i[0].style.opacity=Math.max(-n,0)),o.length&&(o[0].style.opacity=Math.max(n,0))};te({effect:"flip",swiper:t,on:r,setTranslate:()=>{const{slides:e,rtlTranslate:n}=t,r=t.params.flipEffect;for(let o=0;o<e.length;o+=1){const a=e.eq(o);let s=a[0].progress;t.params.flipEffect.limitRotation&&(s=Math.max(Math.min(a[0].progress,1),-1));const l=a[0].swiperSlideOffset;let c=-180*s,u=0,d=t.params.cssMode?-l-t.translate:-l,h=0;t.isHorizontal()?n&&(c=-c):(h=d,d=0,u=-c,c=0),a[0].style.zIndex=-Math.abs(Math.round(s))+e.length,r.slideShadows&&i(a,s,r);const f=`translate3d(${d}px, ${h}px, 0px) rotateX(${u}deg) rotateY(${c}deg)`;ne(r,a).transform(f)}},setTransition:e=>{const{transformEl:n}=t.params.flipEffect;(n?t.slides.find(n):t.slides).transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),re({swiper:t,duration:e,transformEl:n})},recreateShadows:()=>{const e=t.params.flipEffect;t.slides.each(n=>{const r=c(n);let o=r[0].progress;t.params.flipEffect.limitRotation&&(o=Math.max(Math.min(n.progress,1),-1)),i(r,o,e)})},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0,transformEl:null}}),te({effect:"coverflow",swiper:t,on:r,setTranslate:()=>{const{width:e,height:n,slides:r,slidesSizesGrid:i}=t,o=t.params.coverflowEffect,a=t.isHorizontal(),s=t.translate,l=a?e/2-s:n/2-s,c=a?o.rotate:-o.rotate,u=o.depth;for(let e=0,t=r.length;e<t;e+=1){const t=r.eq(e),n=i[e],s=(l-t[0].swiperSlideOffset-n/2)/n,d="function"==typeof o.modifier?o.modifier(s):s*o.modifier;let h=a?c*d:0,f=a?0:c*d,p=-u*Math.abs(d),g=o.stretch;"string"==typeof g&&-1!==g.indexOf("%")&&(g=parseFloat(o.stretch)/100*n);let m=a?0:g*d,v=a?g*d:0,y=1-(1-o.scale)*Math.abs(d);Math.abs(v)<.001&&(v=0),Math.abs(m)<.001&&(m=0),Math.abs(p)<.001&&(p=0),Math.abs(h)<.001&&(h=0),Math.abs(f)<.001&&(f=0),Math.abs(y)<.001&&(y=0);const b=`translate3d(${v}px,${m}px,${p}px)  rotateX(${f}deg) rotateY(${h}deg) scale(${y})`;if(ne(o,t).transform(b),t[0].style.zIndex=1-Math.abs(Math.round(d)),o.slideShadows){let e=a?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),n=a?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===e.length&&(e=ie(o,t,a?"left":"top")),0===n.length&&(n=ie(o,t,a?"right":"bottom")),e.length&&(e[0].style.opacity=d>0?d:0),n.length&&(n[0].style.opacity=-d>0?-d:0)}}},setTransition:e=>{const{transformEl:n}=t.params.coverflowEffect;(n?t.slides.find(n):t.slides).transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({creativeEffect:{transformEl:null,limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=e=>"string"==typeof e?e:`${e}px`;te({effect:"creative",swiper:t,on:r,setTranslate:()=>{const{slides:e,$wrapperEl:n,slidesSizesGrid:r}=t,o=t.params.creativeEffect,{progressMultiplier:a}=o,s=t.params.centeredSlides;if(s){const e=r[0]/2-t.params.slidesOffsetBefore||0;n.transform(`translateX(calc(50% - ${e}px))`)}for(let n=0;n<e.length;n+=1){const r=e.eq(n),l=r[0].progress,c=Math.min(Math.max(r[0].progress,-o.limitProgress),o.limitProgress);let u=c;s||(u=Math.min(Math.max(r[0].originalProgress,-o.limitProgress),o.limitProgress));const d=r[0].swiperSlideOffset,h=[t.params.cssMode?-d-t.translate:-d,0,0],f=[0,0,0];let p=!1;t.isHorizontal()||(h[1]=h[0],h[0]=0);let g={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};c<0?(g=o.next,p=!0):c>0&&(g=o.prev,p=!0),h.forEach((e,t)=>{h[t]=`calc(${e}px + (${i(g.translate[t])} * ${Math.abs(c*a)}))`}),f.forEach((e,t)=>{f[t]=g.rotate[t]*Math.abs(c*a)}),r[0].style.zIndex=-Math.abs(Math.round(l))+e.length;const m=h.join(", "),v=`rotateX(${f[0]}deg) rotateY(${f[1]}deg) rotateZ(${f[2]}deg)`,y=u<0?`scale(${1+(1-g.scale)*u*a})`:`scale(${1-(1-g.scale)*u*a})`,b=u<0?1+(1-g.opacity)*u*a:1-(1-g.opacity)*u*a,x=`translate3d(${m}) ${v} ${y}`;if(p&&g.shadow||!p){let e=r.children(".swiper-slide-shadow");if(0===e.length&&g.shadow&&(e=ie(o,r)),e.length){const t=o.shadowPerProgress?c*(1/o.limitProgress):c;e[0].style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const w=ne(o,r);w.transform(x).css({opacity:b}),g.origin&&w.css("transform-origin",g.origin)}},setTransition:e=>{const{transformEl:n}=t.params.creativeEffect;(n?t.slides.find(n):t.slides).transition(e).find(".swiper-slide-shadow").transition(e),re({swiper:t,duration:e,transformEl:n,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:n,on:r}=e;n({cardsEffect:{slideShadows:!0,transformEl:null,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),te({effect:"cards",swiper:t,on:r,setTranslate:()=>{const{slides:e,activeIndex:n}=t,r=t.params.cardsEffect,{startTranslate:i,isTouched:o}=t.touchEventsData,a=t.translate;for(let s=0;s<e.length;s+=1){const l=e.eq(s),c=l[0].progress,u=Math.min(Math.max(c,-4),4);let d=l[0].swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&t.$wrapperEl.transform(`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(d-=e[0].swiperSlideOffset);let h=t.params.cssMode?-d-t.translate:-d,f=0;const p=-100*Math.abs(u);let g=1,m=-r.perSlideRotate*u,v=r.perSlideOffset-.75*Math.abs(u);const y=t.virtual&&t.params.virtual.enabled?t.virtual.from+s:s,b=(y===n||y===n-1)&&u>0&&u<1&&(o||t.params.cssMode)&&a<i,x=(y===n||y===n+1)&&u<0&&u>-1&&(o||t.params.cssMode)&&a>i;if(b||x){const e=(1-Math.abs((Math.abs(u)-.5)/.5))**.5;m+=-28*u*e,g+=-.5*e,v+=96*e,f=-25*e*Math.abs(u)+"%"}if(h=u<0?`calc(${h}px + (${v*Math.abs(u)}%))`:u>0?`calc(${h}px + (-${v*Math.abs(u)}%))`:`${h}px`,!t.isHorizontal()){const e=f;f=h,h=e}const w=u<0?""+(1+(1-g)*u):""+(1-(1-g)*u),_=`\n        translate3d(${h}, ${f}, ${p}px)\n        rotateZ(${r.rotate?m:0}deg)\n        scale(${w})\n      `;if(r.slideShadows){let e=l.find(".swiper-slide-shadow");0===e.length&&(e=ie(r,l)),e.length&&(e[0].style.opacity=Math.min(Math.max((Math.abs(u)-.5)/.5,0),1))}l[0].style.zIndex=-Math.abs(Math.round(c))+e.length;ne(r,l).transform(_)}},setTransition:e=>{const{transformEl:n}=t.params.cardsEffect;(n?t.slides.find(n):t.slides).transition(e).find(".swiper-slide-shadow").transition(e),re({swiper:t,duration:e,transformEl:n})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}];return G.use(oe),G}),$("document").ready(function(){$("body").on("click",".faq_set .title",function(e){$(".faq_set .title").not(this).parents(".faq_set").removeClass("on"),$(this).parents(".faq_set").toggleClass("on")})}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Quill=t():e.Quill=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=45)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(48),s=n(49),l=n(50),c=n(51),u=n(52),d=n(11),h=n(29),f=n(30),p=n(28),g=n(1),m={Scope:g.Scope,create:g.create,find:g.find,query:g.query,register:g.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:c.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:u.default,Attributor:{Attribute:d.default,Class:h.default,Style:f.default,Store:p.default}};t.default=m},function(e,t,n){"use strict";function r(e,t){var n;if(void 0===t&&(t=a.ANY),"string"==typeof e)n=u[e]||s[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=u.text;else if("number"==typeof e)e&a.LEVEL&a.BLOCK?n=u.block:e&a.LEVEL&a.INLINE&&(n=u.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=l[r[i]])break;n=n||c[e.tagName]}return null==n?null:t&a.LEVEL&n.scope&&t&a.TYPE&n.scope?n:null}var i=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return i(t,e),t}(Error);t.ParchmentError=o;var a,s={},l={},c={},u={};t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(a=t.Scope||(t.Scope={})),t.create=function(e,t){var n=r(e);if(null==n)throw new o("Unable to create "+e+" blot");var i=n;return new i(e instanceof Node||e.nodeType===Node.TEXT_NODE?e:i.create(t),t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=r,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map(function(t){return e(t)});var r=t[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");if(u[r.blotName||r.attrName]=r,"string"==typeof r.keyName)s[r.keyName]=r;else if(null!=r.className&&(l[r.className]=r),null!=r.tagName){Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(e){return e.toUpperCase()}):r.tagName=r.tagName.toUpperCase();var i=Array.isArray(r.tagName)?r.tagName:[r.tagName];i.forEach(function(e){null!=c[e]&&null!=r.className||(c[e]=r)})}return r}},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,u,d=arguments[0],h=1,f=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<f;++h)if(null!=(t=arguments[h]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(p&&i&&(s(i)||(o=a(i)))?(o?(o=!1,u=r&&a(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,u.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:s(e.parent,t))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},u=r(n(2)),d=r(n(4)),h=r(n(0)),f=r(n(14)),p=r(n(5)),g=r(n(8)),m=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"attach",value:function(){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new h.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new d.default).insert(this.value(),(0,u.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=h.default.query(e,h.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"==typeof n&&n.endsWith("\n")){var i=h.default.create(v.blotName);this.parent.insertBefore(i,0===e?this:this.next),i.insertAt(0,n.slice(0,-1))}else c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(h.default.Embed);m.scope=h.default.Scope.BLOCK_BLOT;var v=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return a(t,e),l(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(h.default.Leaf).reduce(function(e,t){return 0===t.length()?e:e.insert(t.value(),s(t))},new d.default).insert("\n",s(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,i){n<=0||(h.default.query(r,h.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,i):c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,i),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var i=n.split("\n"),o=i.shift();o.length>0&&(e<this.length()-1||null==this.children.tail?c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});var a=this;i.reduce(function(e,t){return(a=a.split(e,!0)).insertAt(0,t),t.length},e+o.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof f.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&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=c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(h.default.Block);v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[p.default,h.default.Embed,g.default],t.bubbleFormats=s,t.BlockEmbed=m,t.default=v},function(e,t,n){var r=n(54),i=n(12),o=n(2),a=n(20),s=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.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))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.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)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!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(i(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},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e},0)},l.prototype.length=function(){return this.reduce(function(e,t){return e+a.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i<t&&r.hasNext();){var o;i<e?o=r.next(e-i):(o=r.next(t-i),n.push(o)),i+=a.length(o)}return new l(n)},l.prototype.compose=function(e){var t=a.iterator(this.ops),n=a.iterator(e.ops),r=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===t.peekType()&&t.peekLength()<=s;)s-=t.peekLength(),r.push(t.next());o.retain-s>0&&n.next(o.retain-s)}for(var c=new l(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())c.push(n.next());else if("delete"===t.peekType())c.push(t.next());else{var u=Math.min(t.peekLength(),n.peekLength()),d=t.next(u),h=n.next(u);if("number"==typeof h.retain){var f={};"number"==typeof d.retain?f.retain=u:f.insert=d.insert;var p=a.attributes.compose(d.attributes,h.attributes,"number"==typeof d.retain);if(p&&(f.attributes=p),c.push(f),!n.hasNext()&&i(c.ops[c.ops.length-1],f)){var g=new l(t.rest());return c.concat(g).chop()}}else"number"==typeof h.delete&&"number"==typeof d.retain&&c.push(h)}return c.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;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("")}),o=new l,c=r(n[0],n[1],t),u=a.iterator(this.ops),d=a.iterator(e.ops);return c.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(d.peekLength(),t),o.push(d.next(n));break;case r.DELETE:n=Math.min(t,u.peekLength()),u.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),t);var s=u.next(n),l=d.next(n);i(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}t-=n}}),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),c="string"==typeof o.insert?o.insert.indexOf(t,s)-s:-1;if(c<0)r.push(n.next());else if(c>0)r.push(n.next(c));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.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),i=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),c=r.next(o);if(s.delete)continue;c.delete?i.push(c):i.retain(o,a.attributes.transform(s.attributes,c.attributes,t))}else i.retain(a.length(n.next()));return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r<e||!t)&&(e+=i),r+=i):e-=Math.min(i,e-r)}return e},e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},l=r(n(8)),c=r(n(0)),u=function(e){function t(){return i(this,t),o(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),a(t,[{key:"formatAt",value:function(e,n,r,i){if(t.compare(this.statics.blotName,r)<0&&c.default.query(r,c.default.Scope.BLOT)){var o=this.isolate(e,n);i&&o.wrap(r,i)}else s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i)}},{key:"optimize",value:function(e){if(s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){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),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}}]),t}(c.default.Inline);u.allowedChildren=[u,c.default.Embed,l.default],u.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(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,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if((t=(0,x.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==E.DEFAULTS.theme){if(t.theme=E.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=_.default;var n=(0,x.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=E.import("modules/"+t);return null==n?k.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,x.default)(!0,{},E.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 s(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===g.default.sources.USER)return new f.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,a=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=c(i,a,t):0!==r&&(i=c(i,n,r,t)),this.setSelection(i,g.default.sources.SILENT)),a.length()>0){var s,l,u=[g.default.events.TEXT_CHANGE,a,o,t];if((s=this.emitter).emit.apply(s,[g.default.events.EDITOR_CHANGE].concat(u)),t!==g.default.sources.SILENT)(l=this.emitter).emit.apply(l,u)}return a}function l(e,t,n,r,i){var o={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=r,r=n,n=t,t=0),"object"===(void 0===n?"undefined":u(n))?(o=n,i=r):"string"==typeof n&&(null!=r?o[n]=r:i=n),[e,t,o,i=i||g.default.sources.API]}function c(e,t,n,r){if(null==e)return null;var i=void 0,o=void 0;if(t instanceof f.default){var a=[e.index,e.index+e.length].map(function(e){return t.transformPosition(e,r!==g.default.sources.USER)}),s=d(a,2);i=s[0],o=s[1]}else{var l=[e.index,e.index+e.length].map(function(e){return e<t||e===t&&r===g.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)}),c=d(l,2);i=c[0],o=c[1]}return new y.Range(i,o-i)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var u="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},d=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(53);var f=r(n(4)),p=r(n(57)),g=r(n(9)),m=r(n(7)),v=r(n(0)),y=n(22),b=r(y),x=r(n(2)),w=r(n(10)),_=r(n(32)),k=(0,w.default)("quill"),E=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o(this,e),this.options=a(t,r),this.container=this.options.container,null==this.container)return k.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=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 g.default,this.scroll=v.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new p.default(this.scroll),this.selection=new b.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(g.default.events.EDITOR_CHANGE,function(e){e===g.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(g.default.events.SCROLL_UPDATE,function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;s.call(n,function(){return n.editor.update(null,t,i)},e)});var l=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(l),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return h(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),w.default.level(e)}},{key:"find",value:function(e){return e.__quill||v.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&k.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&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var i=e.attrName||e.blotName;"string"==typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach(function(r){n.register(r,e[r],t)})}else null==this.imports[e]||r||k.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?v.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),h(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?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=l(e,t,n),o=d(i,4);return e=o[0],t=o[1],n=o[3],s.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&&void 0!==arguments[0])||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&&void 0!==arguments[2]?arguments[2]:g.default.sources.API;return s.call(this,function(){var r=n.getSelection(!0),o=new f.default;if(null==r)return o;if(v.default.query(e,v.default.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,i({},e,t));else{if(0===r.length)return n.selection.format(e,t),o;o=n.editor.formatText(r.index,r.length,i({},e,t))}return n.setSelection(r,g.default.sources.SILENT),o},r)}},{key:"formatLine",value:function(e,t,n,r,i){var o,a=this,c=l(e,t,n,r,i),u=d(c,4);return e=u[0],t=u[1],o=u[2],i=u[3],s.call(this,function(){return a.editor.formatLine(e,t,o)},i,e,0)}},{key:"formatText",value:function(e,t,n,r,i){var o,a=this,c=l(e,t,n,r,i),u=d(c,4);return e=u[0],t=u[1],o=u[2],i=u[3],s.call(this,function(){return a.editor.formatText(e,t,o)},i,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?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&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=l(e,t),r=d(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?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&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?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(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=l(e,t),r=d(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 i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return s.call(this,function(){return i.editor.insertEmbed(t,n,r)},o,t)}},{key:"insertText",value:function(e,t,n,r,i){var o,a=this,c=l(e,0,n,r,i),u=d(c,4);return e=u[0],o=u[2],i=u[3],s.call(this,function(){return a.editor.insertText(e,t,o)},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=l(e,t,n),o=d(i,4);return e=o[0],t=o[1],n=o[3],s.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&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return s.call(this,function(){e=new f.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)},n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var i=l(t,n,r),o=d(i,4);t=o[0],n=o[1],r=o[3],this.selection.setRange(new y.Range(t,n),r),r!==g.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API,n=(new f.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.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&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return s.call(this,function(){return e=new f.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();E.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},E.events=g.default.events,E.sources=g.default.sources,E.version="1.3.7",E.imports={delta:f.default,parchment:v.default,"core/module":m.default,"core/theme":_.default},t.expandConfig=a,t.overload=l,t.default=E},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,e),this.quill=t,this.options=n};i.DEFAULTS={},t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),a=function(e){function t(){return r(this,t),i(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}(o.default.Text);t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=r(n(58)),s=(0,r(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(e){document.addEventListener(e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)})})});var l=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=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));return e.listeners={},e.on("error",s.error),e}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:"emit",value:function(){s.log.apply(s,arguments),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.listeners[e.type]||[]).forEach(function(t){var r=t.node,i=t.handler;(e.target===r||r.contains(e.target))&&i.apply(void 0,[e].concat(n))})}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(a.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},t.default=l},function(e,t,n){"use strict";function r(e){if(o.indexOf(e)<=o.indexOf(a)){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console)[e].apply(t,r)}}function i(e){return o.reduce(function(t,n){return t[n]=r.bind(console,n,e),t},{})}Object.defineProperty(t,"__esModule",{value:!0});var o=["error","warn","log","info"],a="warn";r.level=i.level=function(e){a=e},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i: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=i},function(e,t,n){function r(e){return null==e}function i(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])}var o=Array.prototype.slice,a=n(55),s=n(56),l=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var c,u;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(s(e))return!!s(t)&&(e=o.call(e),t=o.call(t),l(e,t,n));if(i(e)){if(!i(t))return!1;if(e.length!==t.length)return!1;for(c=0;c<e.length;c++)if(e[c]!==t[c])return!1;return!0}try{var d=a(e),h=a(t)}catch(e){return!1}if(d.length!=h.length)return!1;for(d.sort(),h.sort(),c=d.length-1;c>=0;c--)if(d[c]!=h[c])return!1;for(c=d.length-1;c>=0;c--)if(u=d[c],!l(e[u],t[u],n))return!1;return typeof e==typeof t}(e,t,n))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var s=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},u=r(n(4)),d=r(n(0)),h=r(n(3)),f=r(n(5)),p=r(n(8)),g=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(f.default);g.blotName="code",g.tagName="CODE";var m=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(function(t,n){return t.insert(n).insert("\n",e.formats())},new u.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var r=this.descendant(p.default,this.length()-1),i=s(r,1)[0];null!=i&&i.deleteAt(i.length()-1,1),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,r,i){if(0!==n&&null!=d.default.query(r,d.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(e);if(!(o<0||o>=e+n)){var a=this.newlineIndex(e,!0)+1,s=o-a+1,l=this.isolate(a,s),c=l.next;l.format(r,i),c instanceof t&&c.formatAt(0,e-a+n-s,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var r=this.descendant(p.default,e),i=s(r,2),o=i[0],a=i[1];o.insertAt(a,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){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(d.default.create("text","\n")),c(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){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var t=d.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof d.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var n=c(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(h.default);m.blotName="code-block",m.tagName="PRE",m.TAB="  ",t.Code=g,t.default=m},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),l=function(e){function t(){return r(this,t),i(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),o(t,[{key:"insertInto",value:function(e,n){0===e.children.length?a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(s.default.Embed);l.blotName="break",l.tagName="BR",t.default=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}function o(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},l=function(e){return e&&e.__esModule?e:{default:e}}(n(5)),c=function(e){function t(){return r(this,t),i(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),a(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=s(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return o(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(l.default);c.blotName="link",c.tagName="A",c.SANITIZED_URL="about:blank",c.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=c,t.sanitize=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){e.setAttribute(t,!("true"===e.getAttribute(t)))}Object.defineProperty(t,"__esModule",{value:!0});var o="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},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=r(n(25)),l=r(n(106)),c=0,u=function(){function e(t){var n=this;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(e){switch(e.keyCode){case s.default.keys.ENTER:n.togglePicker();break;case s.default.keys.ESCAPE:n.escape(),e.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return a(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),i(this.label,"aria-expanded"),i(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",function(){t.selectItem(n,!0)}),n.addEventListener("keydown",function(e){switch(e.keyCode){case s.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case s.default.keys.ESCAPE:t.escape(),e.preventDefault()}}),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=l.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+c,c+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach(function(n){var r=e.buildItem(n);t.appendChild(r),!0===n.selected&&e.selectItem(r)}),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout(function(){return e.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&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":o(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}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=u},function(e,t,n){"use strict";function r(e){var t=s.find(e);if(null==t)try{t=s.create(e)}catch(n){t=s.create(s.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}var i=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(47),a=n(27),s=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return i(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=r(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof s.ParchmentError)return;throw e}})},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,n){e.deleteAt(t,n)})},t.prototype.descendant=function(e,n){var r=this.children.find(n),i=r[0],o=r[1];return null==e.blotName&&e(i)||null!=e.blotName&&i instanceof e?[i,o]:i instanceof t?i.descendant(e,o):[null,-1]},t.prototype.descendants=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,function(n,r,a){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,o))),o-=a}),i},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,function(e,t,i){e.formatAt(t,i,n,r)})},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),i=r[0],o=r[1];if(i)i.insertAt(o,t,n);else{var a=null==n?s.create("text",t):s.create(t,n);this.appendChild(a)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new s.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(n){e.insertBefore(n,t)})},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),i=r[0],o=r[1],a=[[this,e]];return i instanceof t?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},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=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),function(e,r,i){e=e.split(r,t),n.appendChild(e)}),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,i=[],o=[];e.forEach(function(e){e.target===n.domNode&&"childList"===e.type&&(i.push.apply(i,e.addedNodes),o.push.apply(o,e.removedNodes))}),o.forEach(function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=s.find(e);null!=t&&(null!=t.domNode.parentNode&&t.domNode.parentNode!==n.domNode||t.detach())}}),i.filter(function(e){return e.parentNode==n.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var t=null;null!=e.nextSibling&&(t=s.find(e.nextSibling));var i=r(e);i.next==t&&null!=i.next||(null!=i.parent&&i.parent.removeChild(n),n.insertBefore(i,t||void 0))})},t}(a.default);t.default=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),o=n(28),a=n(17),s=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new o.default(n.domNode),n}return r(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=s.query(e);n instanceof i.default?this.attributes.attribute(n,t):t&&(null==n||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some(function(e){return e.target===r.domNode&&"attributes"===e.type})&&this.attributes.build()},t.prototype.wrap=function(n,r){var i=e.prototype.wrap.call(this,n,r);return i instanceof t&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},t}(a.default);t.default=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(27),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(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=o.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){function r(e){this.ops=e,this.index=0,this.offset=0}var i=n(12),o=n(2),a={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)void 0!==e[i]&&void 0===t[i]&&(r[i]=e[i]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,r){return i(e[r],t[r])||(n[r]=void 0===t[r]?null:t[r]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return void 0===e[r]&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new r(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}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=a.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?a.length(this.ops[this.index])-this.offset:1/0},r.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"},r.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=a},function(e,t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}function t(n,s,l,c,u){"object"==typeof s&&(l=s.depth,c=s.prototype,u=s.includeNonEnumerable,s=s.circular);var d=[],h=[],f="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===l&&(l=1/0),function n(l,p){if(null===l)return null;if(0===p)return l;var g,m;if("object"!=typeof l)return l;if(e(l,i))g=new i;else if(e(l,o))g=new o;else if(e(l,a))g=new a(function(e,t){l.then(function(t){e(n(t,p-1))},function(e){t(n(e,p-1))})});else if(t.__isArray(l))g=[];else if(t.__isRegExp(l))g=new RegExp(l.source,r(l)),l.lastIndex&&(g.lastIndex=l.lastIndex);else if(t.__isDate(l))g=new Date(l.getTime());else{if(f&&Buffer.isBuffer(l))return g=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(g),g;e(l,Error)?g=Object.create(l):void 0===c?(m=Object.getPrototypeOf(l),g=Object.create(m)):(g=Object.create(c),m=c)}if(s){var v=d.indexOf(l);if(-1!=v)return h[v];d.push(l),h.push(g)}for(var y in e(l,i)&&l.forEach(function(e,t){var r=n(t,p-1),i=n(e,p-1);g.set(r,i)}),e(l,o)&&l.forEach(function(e){var t=n(e,p-1);g.add(t)}),l){var b;m&&(b=Object.getOwnPropertyDescriptor(m,y)),b&&null==b.set||(g[y]=n(l[y],p-1))}if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(l);for(y=0;y<x.length;y++){var w=x[y];(!(k=Object.getOwnPropertyDescriptor(l,w))||k.enumerable||u)&&(g[w]=n(l[w],p-1),k.enumerable||Object.defineProperty(g,w,{enumerable:!1}))}}if(u){var _=Object.getOwnPropertyNames(l);for(y=0;y<_.length;y++){var k,E=_[y];(k=Object.getOwnPropertyDescriptor(l,E))&&k.enumerable||(g[E]=n(l[E],p-1),Object.defineProperty(g,E,{enumerable:!1}))}}return g}(n,l)}function n(e){return Object.prototype.toString.call(e)}function r(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}var i,o,a;try{i=Map}catch(e){i=function(){}}try{o=Set}catch(e){o=function(){}}try{a=Promise}catch(e){a=function(){}}return t.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},t.__objToStr=n,t.__isDate=function(e){return"object"==typeof e&&"[object Date]"===n(e)},t.__isArray=function(e){return"object"==typeof e&&"[object Array]"===n(e)},t.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===n(e)},t.__getRegExpFlags=r,t}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var s=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=r(n(0)),u=r(n(21)),d=r(n(12)),h=r(n(9)),f=(0,r(n(10)).default)("quill:selection"),p=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;o(this,e),this.index=t,this.length=n},g=function(){function e(t,n){var r=this;o(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.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,h.default.sources.USER),1)}),this.emitter.on(h.default.events.EDITOR_CHANGE,function(e,t){e===h.default.events.TEXT_CHANGE&&t.length()>0&&r.update(h.default.sources.SILENT)}),this.emitter.on(h.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(h.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}})}}),this.emitter.on(h.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var n=t.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s)}}),this.update(h.default.sources.SILENT)}return l(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(h.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&&!c.default.query(e,c.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=c.default.find(n.start.node,!1);if(null==r)return;if(r instanceof c.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}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&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var r=void 0,i=this.scroll.leaf(e),o=s(i,2),a=o[0],l=o[1];if(null==a)return null;var c=a.position(l,!0),u=s(c,2);r=u[0],l=u[1];var d=document.createRange();if(t>0){d.setStart(r,l);var h=this.scroll.leaf(e+t),f=s(h,2);if(a=f[0],l=f[1],null==a)return null;var p=a.position(l,!0),g=s(p,2);return r=g[0],l=g[1],d.setEnd(r,l),d.getBoundingClientRect()}var m="left",v=void 0;return r instanceof Text?(l<r.data.length?(d.setStart(r,l),d.setEnd(r,l+1)):(d.setStart(r,l-1),d.setEnd(r,l),m="right"),v=d.getBoundingClientRect()):(v=a.domNode.getBoundingClientRect(),l>0&&(m="right")),{bottom:v.top+v.height,height:v.height,left:v[m],right:v[m],top:v.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 f.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 r=n.map(function(e){var n=s(e,2),r=n[0],i=n[1],o=c.default.find(r,!0),a=o.offset(t.scroll);return 0===i?a:o instanceof c.default.Container?a+o.length():a+o.index(r,i)}),o=Math.min(Math.max.apply(Math,i(r)),this.scroll.length()-1),a=Math.min.apply(Math,[o].concat(i(r)));return new p(a,o-a)}},{key:"normalizeNative",value:function(e){if(!a(this.root,e.startContainer)||!e.collapsed&&!a(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],r=[],i=this.scroll.length();return n.forEach(function(e,n){e=Math.min(i-1,e);var o,a=t.scroll.leaf(e),l=s(a,2),c=l[0],u=l[1],d=c.position(u,0!==n),h=s(d,2);o=h[0],u=h[1],r.push(o,u)}),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var r=this.scroll.length()-1,i=this.scroll.line(Math.min(t.index,r)),o=s(i,1)[0],a=o;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,r));a=s(l,1)[0]}if(null!=o&&null!=a){var c=e.getBoundingClientRect();n.top<c.top?e.scrollTop-=c.top-n.top:n.bottom>c.bottom&&(e.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||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),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.default.sources.API;if("string"==typeof t&&(n=t,t=!1),f.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,i(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.default.sources.USER,t=this.lastRange,n=this.getRange(),r=s(n,2),i=r[0],o=r[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,d.default)(t,this.lastRange)){var a;!this.composing&&null!=o&&o.native.collapsed&&o.start.node!==this.cursor.textNode&&this.cursor.restore();var l,c=[h.default.events.SELECTION_CHANGE,(0,u.default)(this.lastRange),(0,u.default)(t),e];if((a=this.emitter).emit.apply(a,[h.default.events.EDITOR_CHANGE].concat(c)),e!==h.default.sources.SILENT)(l=this.emitter).emit.apply(l,c)}}}]),e}();t.Range=p,t.default=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}Object.defineProperty(t,"__esModule",{value:!0});var a=r(n(0)),s=n(3),l=r(s),c=function(e){function t(){return i(this,t),o(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}(a.default.Container);c.allowedChildren=[l.default,s.BlockEmbed,c],t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),l=function(e){function t(){return r(this,t),i(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),o(t,[{key:"value",value:function(e){var n=a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map(function(e){return("00"+parseInt(e).toString(16)).slice(-2)}).join(""):n}}]),t}(s.default.Attributor.Style),c=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),u=new l("color","color",{scope:s.default.Scope.INLINE});t.ColorAttributor=l,t.ColorClass=c,t.ColorStyle=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(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,t){var n,r=e===C.keys.LEFT?"prefix":"suffix";return i(n={key:e,shiftKey:t,altKey:null},r,/^$/),i(n,"handler",function(n){var r=n.index;e===C.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r);return!(p(i,1)[0]instanceof w.default.Embed&&(e===C.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,_.default.sources.USER):this.quill.setSelection(n.index-1,_.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,_.default.sources.USER):this.quill.setSelection(n.index+n.length+1,_.default.sources.USER),1))}),n}function a(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=p(n,1)[0],i={};if(0===t.offset){var o=this.quill.getLine(e.index-1),a=p(o,1)[0];if(null!=a&&a.length()>1){var s=r.formats(),l=this.quill.getFormat(e.index-1,1);i=x.default.attributes.diff(s,l)||{}}}var c=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-c,c,_.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index-c,c,i,_.default.sources.USER),this.quill.focus()}}function s(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},i=0,o=this.quill.getLine(e.index),a=p(o,1)[0];if(t.offset>=a.length()-1){var s=this.quill.getLine(e.index+1),l=p(s,1)[0];if(l){var c=a.formats(),u=this.quill.getFormat(e.index,1);r=x.default.attributes.diff(c,u)||{},i=l.length()}}this.quill.deleteText(e.index,n,_.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+i-1,n,r,_.default.sources.USER)}}function l(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=x.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,_.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,_.default.sources.USER),this.quill.setSelection(e.index,_.default.sources.SILENT),this.quill.focus()}function c(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 w.default.query(n,w.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,"\n",r,_.default.sources.USER),this.quill.setSelection(e.index+1,_.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],_.default.sources.USER))})}function u(e){return{key:C.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=w.default.query("code-block"),r=t.index,i=t.length,o=this.quill.scroll.descendant(n,r),a=p(o,2),s=a[0],l=a[1];if(null!=s){var c=this.quill.getIndex(s),u=s.newlineIndex(l,!0)+1,d=s.newlineIndex(c+l+i),h=s.domNode.textContent.slice(u,d).split("\n");l=0,h.forEach(function(t,o){e?(s.insertAt(u+l,n.TAB),l+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):t.startsWith(n.TAB)&&(s.deleteAt(u+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(_.default.sources.USER),this.quill.setSelection(r,i,_.default.sources.SILENT)}}}}function d(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],_.default.sources.USER)}}}function h(e){if("string"==typeof e||"number"==typeof e)return h({key:e});if("object"===(void 0===e?"undefined":f(e))&&(e=(0,m.default)(e,!1)),"string"==typeof e.key)if(null!=C.keys[e.key.toUpperCase()])e.key=C.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[O]=e.shortKey,delete e.shortKey),e}Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var f="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},p=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=r(n(21)),v=r(n(12)),y=r(n(2)),b=r(n(4)),x=r(n(20)),w=r(n(0)),_=r(n(6)),k=r(n(10)),E=r(n(7)),S=(0,k.default)("quill:keyboard"),O=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",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.bindings={},Object.keys(r.options.bindings).forEach(function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])}),r.addBinding({key:t.keys.ENTER,shiftKey:null},c),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},a),r.addBinding({key:t.keys.DELETE},{collapsed:!0},s)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},a),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},s)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},l),r.addBinding({key:t.keys.DELETE},{collapsed:!1},l),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},a),r.listen(),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),g(t,null,[{key:"match",value:function(e,t){return t=h(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!t[n]!==e[n]&&null!==t[n]})&&t.key===(e.which||e.keyCode)}}]),g(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=h(e);if(null==r||null==r.key)return S.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,y.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 r=n.which||n.keyCode,i=(e.bindings[r]||[]).filter(function(e){return t.match(n,e)});if(0!==i.length){var o=e.quill.getSelection();if(null!=o&&e.quill.hasFocus()){var a=e.quill.getLine(o.index),s=p(a,2),l=s[0],c=s[1],u=e.quill.getLeaf(o.index),d=p(u,2),h=d[0],g=d[1],m=0===o.length?[h,g]:e.quill.getLeaf(o.index+o.length),y=p(m,2),b=y[0],x=y[1],_=h instanceof w.default.Text?h.value().slice(0,g):"",k=b instanceof w.default.Text?b.value().slice(x):"",E={collapsed:0===o.length,empty:0===o.length&&l.length()<=1,format:e.quill.getFormat(o),offset:c,prefix:_,suffix:k};i.some(function(t){if(null!=t.collapsed&&t.collapsed!==E.collapsed)return!1;if(null!=t.empty&&t.empty!==E.empty)return!1;if(null!=t.offset&&t.offset!==E.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==E.format[e]}))return!1}else if("object"===f(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=E.format[e]:!1===t.format[e]?null==E.format[e]:(0,v.default)(t.format[e],E.format[e])}))return!1;return!(null!=t.prefix&&!t.prefix.test(E.prefix)||null!=t.suffix&&!t.suffix.test(E.suffix)||!0===t.handler.call(e,o,E))})&&n.preventDefault()}}}})}}]),t}(E.default);C.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},C.DEFAULTS={bindings:{bold:d("bold"),italic:d("italic"),underline:d("underline"),indent:{key:C.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",_.default.sources.USER)}},outdent:{key:C.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",_.default.sources.USER)}},"outdent backspace":{key:C.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",_.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,_.default.sources.USER)}},"indent code-block":u(!0),"outdent code-block":u(!1),"remove tab":{key:C.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,_.default.sources.USER)}},tab:{key:C.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new b.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,_.default.sources.SILENT)}},"list empty enter":{key:C.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,_.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,_.default.sources.USER)}},"checklist enter":{key:C.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=p(t,2),r=n[0],i=n[1],o=(0,y.default)({},r.formats(),{list:"checked"}),a=(new b.default).retain(e.index).insert("\n",o).retain(r.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,_.default.sources.USER),this.quill.setSelection(e.index+1,_.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:C.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=p(n,2),i=r[0],o=r[1],a=(new b.default).retain(e.index).insert("\n",t.format).retain(i.length()-o-1).retain(1,{header:null});this.quill.updateContents(a,_.default.sources.USER),this.quill.setSelection(e.index+1,_.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=p(r,2),o=i[0],a=i[1];if(a>n)return!0;var s=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",_.default.sources.USER),this.quill.history.cutoff();var l=(new b.default).retain(e.index-a).delete(n+1).retain(o.length()-2-a).retain(1,{list:s});this.quill.updateContents(l,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,_.default.sources.SILENT)}},"code exit":{key:C.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=p(t,2),r=n[0],i=n[1],o=(new b.default).retain(e.index+r.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(o,_.default.sources.USER)}},"embed left":o(C.keys.LEFT,!1),"embed left shift":o(C.keys.LEFT,!0),"embed right":o(C.keys.RIGHT,!1),"embed right shift":o(C.keys.RIGHT,!0)}},t.default=C,t.SHORTKEY=O},function(e,t,n){"use strict";e.exports={align:{"":n(75),center:n(76),right:n(77),justify:n(78)},background:n(79),blockquote:n(80),bold:n(81),clean:n(82),code:n(40),"code-block":n(40),color:n(83),direction:{"":n(84),rtl:n(85)},float:{center:n(86),full:n(87),left:n(88),right:n(89)},formula:n(90),header:{1:n(91),2:n(92)},italic:n(93),image:n(94),indent:{"+1":n(95),"-1":n(96)},link:n(97),list:{ordered:n(98),bullet:n(99),check:n(100)},script:{sub:n(101),super:n(102)},strike:n(103),underline:n(104),video:n(105)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=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,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},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=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),i=n(29),o=n(30),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=i.default.keys(this.domNode),s=o.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";function r(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}var i=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(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){r(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(r(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(11).default);t.default=o},function(e,t,n){"use strict";function r(e){var t=e.split("-"),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+n}var i=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(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[r(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[r(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[r(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(11).default);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=r(n(0)),l=r(n(8)),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));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,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),a(t,null,[{key:"value",value:function(){}}]),a(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var r=this,i=0;null!=r&&r.statics.scope!==s.default.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=t.CONTENTS.length,r.optimize(),r.formatAt(i,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),r=void 0,o=void 0,a=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var c=[e,n.start.offset,n.end.offset];r=c[0],o=c[1],a=c[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var u=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof l.default?(r=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=t.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(s.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var d=[o,a].map(function(e){return Math.max(0,Math.min(r.data.length,e-1))}),h=i(d,2);return o=h[0],a=h[1],{startNode:r,startOffset:o,endNode:r,endOffset:a}}}}},{key:"update",value:function(e,t){var n=this;if(e.some(function(e){return"characterData"===e.type&&e.target===n.textNode})){var r=this.restore();r&&(t.range=r)}}},{key:"value",value:function(){return""}}]),t}(s.default.Embed);c.blotName="cursor",c.className="ql-cursor",c.tagName="span",c.CONTENTS="\ufeff",t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){null==e.modules[t]&&e.addModule(t)})}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();i.DEFAULTS={modules:{}},i.themes={default:i},t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=r(n(0)),s=r(n(8)),l="\ufeff",c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=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));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(e){n.contentNode.appendChild(e)}),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}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:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,r=e.data.split(l).join("");if(e===this.leftGuard)if(this.prev instanceof s.default){var i=this.prev.length();this.prev.insertAt(i,r),t={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(a.default.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof s.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(a.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=l,t}},{key:"update",value:function(e,t){var n=this;e.forEach(function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}})}}]),t}(a.default.Embed);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),i={scope:r.default.Scope.BLOCK,whitelist:["right","center","justify"]},o=new r.default.Attributor.Attribute("align","align",i),a=new r.default.Attributor.Class("align","ql-align",i),s=new r.default.Attributor.Style("align","text-align",i);t.AlignAttribute=o,t.AlignClass=a,t.AlignStyle=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),i=n(24),o=new r.default.Attributor.Class("background","ql-bg",{scope:r.default.Scope.INLINE}),a=new i.ColorAttributor("background","background-color",{scope:r.default.Scope.INLINE});t.BackgroundClass=o,t.BackgroundStyle=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),i={scope:r.default.Scope.BLOCK,whitelist:["rtl"]},o=new r.default.Attributor.Attribute("direction","dir",i),a=new r.default.Attributor.Class("direction","ql-direction",i),s=new r.default.Attributor.Style("direction","direction",i);t.DirectionAttribute=o,t.DirectionClass=a,t.DirectionStyle=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),l={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},c=new s.default.Attributor.Class("font","ql-font",l),u=function(e){function t(){return r(this,t),i(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),o(t,[{key:"value",value:function(e){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(s.default.Attributor.Style),d=new u("font","font-family",l);t.FontStyle=d,t.FontClass=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),i=new r.default.Attributor.Class("size","ql-size",{scope:r.default.Scope.INLINE,whitelist:["small","large","huge"]}),o=new r.default.Attributor.Style("size","font-size",{scope:r.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=i,t.SizeStyle=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s=function(e){return e&&e.__esModule?e:{default:e}}(n(5)),l=function(e){function t(){return r(this,t),i(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),o(t,[{key:"optimize",value:function(e){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(s.default);l.blotName="bold",l.tagName=["STRONG","B"],t.default=l},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(e){return e&&e.__esModule?e:{default:e}}(n(16)),a=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));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(e){e.classList.add("ql-primary")}),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),r(t,[{key:"buildItem",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),o=e&&e.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=o:r.style.fill=o)}}]),t}(o.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;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(e){return e&&e.__esModule?e:{default:e}}(n(16)),a=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));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),function(e){e.innerHTML=n[e.getAttribute("data-value")||""]}),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),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),r(t,[{key:"selectItem",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(o.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;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){var r=this;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"}),this.hide()}return r(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=t+o+"px"),i.bottom>r.bottom){var a=i.bottom-i.top,s=e.bottom-e.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},u=r(n(2)),d=r(n(4)),h=r(n(9)),f=r(n(25)),p=r(n(32)),g=r(n(41)),m=r(n(42)),v=r(n(16)),y=r(n(43)),b=[!1,"center","right","justify"],x=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],w=[!1,"serif","monospace"],_=["1","2","3",!1],k=["small",!1,"large","huge"],E=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach(function(e){e.container.contains(n.target)||e.close()})}),r}return a(t,e),l(t,[{key:"addModule",value:function(e){var n=c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}})})}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&s(e,b),new m.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&s(e,x,"background"===n?"#ffffff":"#000000"),new g.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?s(e,w):e.classList.contains("ql-header")?s(e,_):e.classList.contains("ql-size")&&s(e,k)),new v.default(e)});this.quill.on(h.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(e){e.update()})})}}]),t}(p.default);E.DEFAULTS=(0,u.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents((new d.default).retain(r.index).delete(r.length).insert({image:n.target.result}),h.default.sources.USER),e.quill.setSelection(r.index+1,h.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var S=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return a(t,e),l(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(t){f.default.match(t,"enter")?(e.save(),t.preventDefault()):f.default.match(t,"escape")&&(e.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?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=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,h.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,h.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=function(e){var t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return 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}(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,h.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",h.default.sources.USER),this.quill.setSelection(r+2,h.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(y.default);t.BaseTooltip=S,t.default=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(46)),o=n(34),a=n(36),s=n(62),l=r(n(63)),c=r(n(64)),u=n(65),d=r(u),h=n(35),f=n(24),p=n(37),g=n(38),m=r(n(39)),v=r(n(66)),y=r(n(15)),b=r(n(67)),x=r(n(68)),w=r(n(69)),_=r(n(70)),k=r(n(71)),E=n(13),S=r(E),O=r(n(72)),C=r(n(73)),T=r(n(74)),M=r(n(26)),A=r(n(16)),P=r(n(41)),L=r(n(42)),N=r(n(43)),$=r(n(107)),D=r(n(108));i.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":h.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":g.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":h.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":g.SizeStyle},!0),i.default.register({"formats/align":o.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":s.IndentClass,"formats/background":h.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":p.FontClass,"formats/size":g.SizeClass,"formats/blockquote":l.default,"formats/code-block":S.default,"formats/header":c.default,"formats/list":d.default,"formats/bold":m.default,"formats/code":E.Code,"formats/italic":v.default,"formats/link":y.default,"formats/script":b.default,"formats/strike":x.default,"formats/underline":w.default,"formats/image":_.default,"formats/video":k.default,"formats/list/item":u.ListItem,"modules/formula":O.default,"modules/syntax":C.default,"modules/toolbar":T.default,"themes/bubble":$.default,"themes/snow":D.default,"ui/icons":M.default,"ui/picker":A.default,"ui/icon-picker":L.default,"ui/color-picker":P.default,"ui/tooltip":N.default},!0),t.default=i.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(0)),o=r(n(6)),a=n(3),s=r(a),l=r(n(14)),c=r(n(23)),u=r(n(31)),d=r(n(33)),h=r(n(5)),f=r(n(59)),p=r(n(8)),g=r(n(60)),m=r(n(61)),v=r(n(25));o.default.register({"blots/block":s.default,"blots/block/embed":a.BlockEmbed,"blots/break":l.default,"blots/container":c.default,"blots/cursor":u.default,"blots/embed":d.default,"blots/inline":h.default,"blots/scroll":f.default,"blots/text":p.default,"modules/clipboard":g.default,"modules/history":m.default,"modules/keyboard":v.default}),i.default.register(s.default,l.default,u.default,h.default,f.default,p.default),t.default=o.default},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;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&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 i=n.length();if(e<i||t&&e===i&&(null==n.next||0!==n.next.length()))return[n,e];e-=i}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,i=this.find(e),o=i[0],a=e-i[1],s=this.iterator(o);(r=s())&&a<e+t;){var l=r.length();e>a?n(r,e-a,Math.min(t,a+l-e)):n(r,0,Math.min(l,e+t-a)),a+=l}},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=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),o=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=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,a),n.attach(),n}return r(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,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},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 a=[].slice.call(this.observer.takeRecords());a.length>0;)t.push(a.pop());for(var s=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[o.DATA_KEY].mutations&&(e.domNode[o.DATA_KEY].mutations=[]),t&&s(e.parent))},l=function(e){null!=e.domNode[o.DATA_KEY]&&null!=e.domNode[o.DATA_KEY].mutations&&(e instanceof i.default&&e.children.forEach(l),e.optimize(n))},c=t,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(e){var t=o.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(s(o.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=o.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(l),a=(c=[].slice.call(this.observer.takeRecords())).slice();a.length>0;)t.push(a.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map(function(e){var t=o.find(e.target,!0);return null==t?null:null==t.domNode[o.DATA_KEY].mutations?(t.domNode[o.DATA_KEY].mutations=[e],t):(t.domNode[o.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==r&&null!=e.domNode[o.DATA_KEY]&&e.update(e.domNode[o.DATA_KEY].mutations||[],n)}),null!=this.domNode[o.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=o.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i.default);t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return 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,i){null!=this.formats()[r]||o.query(r,o.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},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 i=this.next;i instanceof t&&i.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,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=o.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i.default);t.default=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var r=o.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=o.query(n,o.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,i){null!=o.query(r,o.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=o.query(n,o.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),a=o.create(n,r);i.parent.insertBefore(a,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=o.Scope.BLOCK_BLOT,t.tagName="P",t}(i.default);t.default=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},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=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),o=n(1),a=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return r(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=o.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=o.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:i.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,i=arguments[1],o=0;o<r;o++)if(t=n[o],e.call(i,t,o,n))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(e,t){function n(e,t,n){if(e==t)return e?[[p,e]]:[];(n<0||e.length<n)&&(n=null);var i=a(e,t),o=e.substring(0,i);i=s(e=e.substring(i),t=t.substring(i));var l=e.substring(e.length-i),d=r(e=e.substring(0,e.length-i),t=t.substring(0,t.length-i));return o&&d.unshift([p,o]),l&&d.push([p,l]),c(d),null!=n&&(d=u(d,n)),function(e){for(var t=!1,n=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},r=2;r<e.length;r+=1)e[r-2][0]===p&&function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319}(e[r-2][1])&&e[r-1][0]===h&&n(e[r-1][1])&&e[r][0]===f&&n(e[r][1])&&(t=!0,e[r-1][1]=e[r-2][1].slice(-1)+e[r-1][1],e[r][1]=e[r-2][1].slice(-1)+e[r][1],e[r-2][1]=e[r-2][1].slice(0,-1));if(!t)return e;var i=[];for(r=0;r<e.length;r+=1)e[r][1].length>0&&i.push(e[r]);return i}(d)}function r(e,t){var r;if(!e)return[[f,t]];if(!t)return[[h,e]];var o=e.length>t.length?e:t,a=e.length>t.length?t:e,s=o.indexOf(a);if(-1!=s)return r=[[f,o.substring(0,s)],[p,a],[f,o.substring(s+a.length)]],e.length>t.length&&(r[0][0]=r[2][0]=h),r;if(1==a.length)return[[h,e],[f,t]];var c=l(e,t);if(c){var u=c[0],d=c[1],g=c[2],m=c[3],v=c[4],y=n(u,g),b=n(d,m);return y.concat([[p,v]],b)}return i(e,t)}function i(e,t){for(var n=e.length,r=t.length,i=Math.ceil((n+r)/2),a=i,s=2*i,l=new Array(s),c=new Array(s),u=0;u<s;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=n-r,p=d%2!=0,g=0,m=0,v=0,y=0,b=0;b<i;b++){for(var x=-b+g;x<=b-m;x+=2){for(var w=a+x,_=(C=x==-b||x!=b&&l[w-1]<l[w+1]?l[w+1]:l[w-1]+1)-x;C<n&&_<r&&e.charAt(C)==t.charAt(_);)C++,_++;if(l[w]=C,C>n)m+=2;else if(_>r)g+=2;else if(p){if((S=a+d-x)>=0&&S<s&&-1!=c[S])if(C>=(E=n-c[S]))return o(e,t,C,_)}}for(var k=-b+v;k<=b-y;k+=2){for(var E,S=a+k,O=(E=k==-b||k!=b&&c[S-1]<c[S+1]?c[S+1]:c[S-1]+1)-k;E<n&&O<r&&e.charAt(n-E-1)==t.charAt(r-O-1);)E++,O++;if(c[S]=E,E>n)y+=2;else if(O>r)v+=2;else if(!p){if((w=a+d-k)>=0&&w<s&&-1!=l[w]){var C;_=a+(C=l[w])-w;if(C>=(E=n-E))return o(e,t,C,_)}}}}return[[h,e],[f,t]]}function o(e,t,r,i){var o=e.substring(0,r),a=t.substring(0,i),s=e.substring(r),l=t.substring(i),c=n(o,a),u=n(s,l);return c.concat(u)}function a(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function s(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function l(e,t){function n(e,t,n){for(var r,i,o,l,c=e.substring(n,n+Math.floor(e.length/4)),u=-1,d="";-1!=(u=t.indexOf(c,u+1));){var h=a(e.substring(n),t.substring(u)),f=s(e.substring(0,n),t.substring(0,u));d.length<f+h&&(d=t.substring(u-f,u)+t.substring(u,u+h),r=e.substring(0,n-f),i=e.substring(n+h),o=t.substring(0,u-f),l=t.substring(u+h))}return 2*d.length>=e.length?[r,i,o,l,d]:null}var r=e.length>t.length?e:t,i=e.length>t.length?t:e;if(r.length<4||2*i.length<r.length)return null;var o,l,c,u,d,h=n(r,i,Math.ceil(r.length/4)),f=n(r,i,Math.ceil(r.length/2));return h||f?(o=f?h&&h[4].length>f[4].length?h:f:h,e.length>t.length?(l=o[0],c=o[1],u=o[2],d=o[3]):(u=o[0],d=o[1],l=o[2],c=o[3]),[l,c,u,d,o[4]]):null}function c(e){e.push([p,""]);for(var t,n=0,r=0,i=0,o="",l="";n<e.length;)switch(e[n][0]){case f:i++,l+=e[n][1],n++;break;case h:r++,o+=e[n][1],n++;break;case p:r+i>1?(0!==r&&0!==i&&(0!==(t=a(l,o))&&(n-r-i>0&&e[n-r-i-1][0]==p?e[n-r-i-1][1]+=l.substring(0,t):(e.splice(0,0,[p,l.substring(0,t)]),n++),l=l.substring(t),o=o.substring(t)),0!==(t=s(l,o))&&(e[n][1]=l.substring(l.length-t)+e[n][1],l=l.substring(0,l.length-t),o=o.substring(0,o.length-t))),0===r?e.splice(n-i,r+i,[f,l]):0===i?e.splice(n-r,r+i,[h,o]):e.splice(n-r-i,r+i,[h,o],[f,l]),n=n-r-i+(r?1:0)+(i?1:0)+1):0!==n&&e[n-1][0]==p?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,i=0,r=0,o="",l=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(n=1;n<e.length-1;)e[n-1][0]==p&&e[n+1][0]==p&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)==e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),u=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),u=!0)),n++;u&&c(e)}function u(e,t){var n=function(e,t){if(0===t)return[p,e];for(var n=0,r=0;r<e.length;r++){var i=e[r];if(i[0]===h||i[0]===p){var o=n+i[1].length;if(t===o)return[r+1,e];if(t<o){e=e.slice();var a=t-n,s=[i[0],i[1].slice(0,a)],l=[i[0],i[1].slice(a)];return e.splice(r,1,s,l),[r+1,e]}n=o}}throw new Error("cursor_pos is out of bounds!")}(e,t),r=n[1],i=n[0],o=r[i],a=r[i+1];if(null==o)return e;if(o[0]!==p)return e;if(null!=a&&o[1]+a[1]===a[1]+o[1])return r.splice(i,2,a,o),d(r,i,2);if(null!=a&&0===a[1].indexOf(o[1])){r.splice(i,2,[a[0],o[1]],[0,o[1]]);var s=a[1].slice(o[1].length);return s.length>0&&r.splice(i+2,0,[a[0],s]),d(r,i,3)}return e}function d(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var i=e[r],o=e[r+1];i[0]===o[1]&&e.splice(r,2,[i[0],i[1]+o[1]])}return e}var h=-1,f=1,p=0,g=n;g.INSERT=f,g.DELETE=h,g.EQUAL=p,e.exports=g},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var i="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();(t=e.exports=i?n:r).supported=n,t.unsupported=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(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},{})}Object.defineProperty(t,"__esModule",{value:!0});var o="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},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(4)),c=r(n(20)),u=r(n(0)),d=r(n(13)),h=r(n(31)),f=n(3),p=r(f),g=r(n(14)),m=r(n(21)),v=r(n(12)),y=r(n(2)),b=/^[ -~]*$/,x=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.scroll=t,this.delta=this.getDelta()}return s(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var r=this.scroll.length();return this.scroll.batchStart(),e=function(e){return e.reduce(function(e,t){if(1===t.insert){var n=(0,m.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||((t=(0,m.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)},new l.default)}(e),e.reduce(function(e,i){var s=i.retain||i.delete||i.insert.length||1,l=i.attributes||{};if(null!=i.insert){if("string"==typeof i.insert){var d=i.insert;d.endsWith("\n")&&n&&(n=!1,d=d.slice(0,-1)),e>=r&&!d.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,d);var h=t.scroll.line(e),g=a(h,2),m=g[0],v=g[1],b=(0,y.default)({},(0,f.bubbleFormats)(m));if(m instanceof p.default){var x=m.descendant(u.default.Leaf,v),w=a(x,1)[0];b=(0,y.default)(b,(0,f.bubbleFormats)(w))}l=c.default.attributes.diff(b,l)||{}}else if("object"===o(i.insert)){var _=Object.keys(i.insert)[0];if(null==_)return e;t.scroll.insertAt(e,_,i.insert[_])}r+=s}return Object.keys(l).forEach(function(n){t.scroll.formatAt(e,s,n,l[n])}),e+s},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 l.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),a=t;o.forEach(function(t){var o=t.length();if(t instanceof d.default){var s=e-t.offset(n.scroll),l=t.newlineIndex(s+a)-s+1;t.formatAt(s,l,i,r[i])}else t.format(i,r[i]);a-=o})}}),this.scroll.optimize(),this.update((new l.default).retain(e).retain(t,(0,m.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t,i,r[i])}),this.update((new l.default).retain(e).retain(t,(0,m.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 l.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach(function(e){var t=a(e,1)[0];t instanceof p.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 o=[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=i((0,f.bubbleFormats)(n),t)}return t});return y.default.apply(y.default,o)}},{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 l.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&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t.length,i,r[i])}),this.update((new l.default).retain(e).insert(t,(0,m.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===p.default.blotName&&!(e.children.length>1)&&e.children.head instanceof g.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),i=a(r,2),o=i[0],s=i[1],c=0,u=new l.default;null!=o&&(c=o instanceof d.default?o.newlineIndex(s)-s+1:o.length()-s,u=o.delta().slice(s,s+c-1).insert("\n"));var h=this.getContents(e,t+c).diff((new l.default).insert(n).concat(u)),f=(new l.default).retain(e).concat(h);return this.applyDelta(f)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(b)&&u.default.find(t[0].target)){var i=u.default.find(t[0].target),o=(0,f.bubbleFormats)(i),a=i.offset(this.scroll),s=t[0].oldValue.replace(h.default.CONTENTS,""),c=(new l.default).insert(s),d=(new l.default).insert(i.value());e=(new l.default).retain(a).concat(c.diff(d,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)},new l.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,v.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();t.default=x},function(e,t){"use strict";function n(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(){this._events=new n,this._eventsCount=0}var o=Object.prototype.hasOwnProperty,a="~";Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),i.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)o.call(e,t)&&n.push(a?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},i.prototype.listeners=function(e,t){var n=a?a+e:e,r=this._events[n];if(t)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},i.prototype.emit=function(e,t,n,r,i,o){var s=a?a+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,r),!0;case 5:return u.fn.call(u.context,t,n,r,i),!0;case 6:return u.fn.call(u.context,t,n,r,i,o),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,r);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},i.prototype.on=function(e,t,n){var i=new r(t,n||this),o=a?a+e:e;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},i.prototype.once=function(e,t,n){var i=new r(t,n||this,!0),o=a?a+e:e;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},i.prototype.removeListener=function(e,t,r,i){var o=a?a+e:e;if(!this._events[o])return this;if(!t)return 0==--this._eventsCount?this._events=new n:delete this._events[o],this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||(0==--this._eventsCount?this._events=new n:delete this._events[o]);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:0==--this._eventsCount?this._events=new n:delete this._events[o]}return this},i.prototype.removeAllListeners=function(e){var t;return e?(t=a?a+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new n:delete this._events[t])):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prototype.setMaxListeners=function(){return this},i.prefixed=a,i.EventEmitter=i,void 0!==e&&(e.exports=i)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return e instanceof d.default||e instanceof u.BlockEmbed}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},l=r(n(0)),c=r(n(9)),u=n(3),d=r(u),h=r(n(14)),f=r(n(13)),p=r(n(23)),g=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));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),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),a(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var r=this.line(e),i=o(r,2),a=i[0],l=i[1],c=this.line(e+n),d=o(c,1)[0];if(s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=d&&a!==d&&l>0){if(a instanceof u.BlockEmbed||d instanceof u.BlockEmbed)return void this.optimize();if(a instanceof f.default){var p=a.newlineIndex(a.length(),!0);if(p>-1&&(a=a.split(p+1))===d)return void this.optimize()}else if(d instanceof f.default){var g=d.newlineIndex(0);g>-1&&d.split(g+1)}var m=d.children.head instanceof h.default?null:d.children.head;a.moveChildren(d,m),a.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),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==l.default.query(n,l.default.Scope.BLOCK)){var i=l.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var o=l.default.create(n,r);this.appendChild(o)}else s(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===l.default.Scope.INLINE_BLOT){var r=l.default.create(this.statics.defaultChild);r.appendChild(e),e=r}s(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(i,e)}},{key:"lines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return function e(t,n,r){var o=[],a=r;return t.children.forEachAt(n,r,function(t,n,r){i(t)?o.push(t):t instanceof l.default.Container&&(o=o.concat(e(t,n,a))),a-=r}),o}(this,e,t)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(c.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return s(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=c.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(c.default.events.SCROLL_BEFORE_UPDATE,n,e),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(c.default.events.SCROLL_UPDATE,n,e)}}}]),t}(l.default.Scroll);g.blotName="scroll",g.className="ql-editor",g.tagName="DIV",g.defaultChild="block",g.allowedChildren=[d.default,u.BlockEmbed,p.default],t.default=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(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,t,n){return"object"===(void 0===t?"undefined":m(t))?Object.keys(t).reduce(function(e,n){return o(e,n,t[n])},e):e.reduce(function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,b.default)({},i({},t,n),r.attributes))},new x.default)}function a(e){return e.nodeType!==Node.ELEMENT_NODE?{}:e["__ql-computed-style"]||(e["__ql-computed-style"]=window.getComputedStyle(e))}function s(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var i=e.ops[r];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*t.length)===t}function l(e){return 0!==e.childNodes.length&&["block","list-item"].indexOf(a(e).display)>-1}function c(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce(function(t,n){return n(e,t)},new x.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(r,i){var o=c(i,t,n);return i.nodeType===e.ELEMENT_NODE&&(o=t.reduce(function(e,t){return t(i,e)},o),o=(i[N]||[]).reduce(function(e,t){return t(i,e)},o)),r.concat(o)},new x.default):new x.default}function u(e,t,n){return o(n,e,!0)}function d(e,t){var n=w.default.Attributor.Attribute.keys(e),r=w.default.Attributor.Class.keys(e),i=w.default.Attributor.Style.keys(e),a={};return n.concat(r).concat(i).forEach(function(t){var n=w.default.query(t,w.default.Scope.ATTRIBUTE);null!=n&&(a[n.attrName]=n.value(e),a[n.attrName])||(null==(n=D[t])||n.attrName!==t&&n.keyName!==t||(a[n.attrName]=n.value(e)||void 0),null==(n=I[t])||n.attrName!==t&&n.keyName!==t||(n=I[t],a[n.attrName]=n.value(e)||void 0))}),Object.keys(a).length>0&&(t=o(t,a)),t}function h(e,t){var n=w.default.query(e);if(null==n)return t;if(n.prototype instanceof w.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=(new x.default).insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=o(t,n.blotName,n.formats(e)));return t}function f(e,t){return s(t,"\n")||(l(e)||t.length()>0&&e.nextSibling&&l(e.nextSibling))&&t.insert("\n"),t}function p(e,t){if(l(e)&&null!=e.nextElementSibling&&!s(t,"\n\n")){var n=e.offsetHeight+parseFloat(a(e).marginTop)+parseFloat(a(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function g(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(!a(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&&l(e.parentNode)||null!=e.previousSibling&&l(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&l(e.parentNode)||null!=e.nextSibling&&l(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var m="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},v=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=r(n(2)),x=r(n(4)),w=r(n(0)),_=r(n(6)),k=r(n(10)),E=r(n(7)),S=n(34),O=n(35),C=r(n(13)),T=n(24),M=n(36),A=n(37),P=n(38),L=(0,k.default)("quill:clipboard"),N="__ql-matcher",$=[[Node.TEXT_NODE,g],[Node.TEXT_NODE,f],["br",function(e,t){return s(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,f],[Node.ELEMENT_NODE,h],[Node.ELEMENT_NODE,p],[Node.ELEMENT_NODE,d],[Node.ELEMENT_NODE,function(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===a(e).fontStyle&&(n.italic=!0),r.fontWeight&&(a(e).fontWeight.startsWith("bold")||parseInt(a(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=o(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new x.default).insert("\t").concat(t)),t}],["li",function(e,t){var n=w.default.query(e);if(null==n||"list-item"!==n.blotName||!s(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(w.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose((new x.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",u.bind(u,"bold")],["i",u.bind(u,"italic")],["style",function(){return new x.default}]],D=[S.AlignAttribute,M.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),I=[S.AlignStyle,O.BackgroundStyle,T.ColorStyle,M.DirectionStyle,A.FontStyle,P.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),j=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=[],$.concat(r.options.matchers).forEach(function(e){var t=v(e,2),i=t[0],o=t[1];(n.matchVisual||o!==p)&&r.addMatcher(i,o)}),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),y(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 +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[C.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new x.default).insert(n,i({},C.default.blotName,t[C.default.blotName]))}var r=this.prepareMatching(),o=v(r,2),a=o[0],l=o[1],u=c(this.container,a,l);return s(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new x.default).retain(u.length()-1).delete(1))),L.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,_.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new x.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),_.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new x.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(_.default.sources.SILENT),setTimeout(function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,_.default.sources.USER),t.quill.setSelection(r.length()-n.length,_.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(r){var i=v(r,2),o=i[0],a=i[1];switch(o){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:t.push(a);break;default:[].forEach.call(e.container.querySelectorAll(o),function(e){e[N]=e[N]||[],e[N].push(a)})}}),[t,n]}}]),t}(E.default);j.DEFAULTS={matchers:[],matchVisual:!0},t.default=j,t.matchAttributor=d,t.matchBlot=h,t.matchNewline=f,t.matchSpacing=p,t.matchText=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(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!=a.default.query(e,a.default.Scope.BLOCK)}))}(e)&&(n-=1),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(0)),s=r(n(6)),l=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.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(s.default.events.EDITOR_CHANGE,function(e,t,n,i){e!==s.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==s.default.sources.USER?r.transform(t):r.record(t,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),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),o(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],s.default.sources.USER),this.ignoreChange=!1;var r=i(n[e]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.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}(r(n(7)).default);l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=l,t.getLastChangeIndex=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),l=function(e){function t(){return r(this,t),i(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),o(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(s.default.Attributor.Class),c=new l("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(n(3)),a=function(e){function t(){return r(this,t),i(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}(o.default);a.blotName="blockquote",a.tagName="blockquote",t.default=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){return e&&e.__esModule?e:{default:e}}(n(3)),s=function(e){function t(){return r(this,t),i(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),o(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(a.default);s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},c=r(n(0)),u=r(n(3)),d=r(n(23)),h=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"format",value:function(e,n){e!==f.blotName||n?l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(c.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:l(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(u.default);h.blotName="list-item",h.tagName="LI";var f=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),i=c.default.find(t.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return e.addEventListener("touchstart",r),e.addEventListener("mousedown",r),n}return a(t,e),s(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",r=l(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"checked"!==e&&"unchecked"!==e||r.setAttribute("data-checked","checked"===e),r}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),s(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(e,n){if(e instanceof h)l(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){l(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=c.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(d.default);f.blotName="list",f.scope=c.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[h],t.ListItem=h,t.default=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(n(39)),a=function(e){function t(){return r(this,t),i(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}(o.default);a.blotName="italic",a.tagName=["EM","I"],t.default=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s=function(e){return e&&e.__esModule?e:{default:e}}(n(5)),l=function(e){function t(){return r(this,t),i(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),o(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(s.default);l.blotName="script",l.tagName=["SUB","SUP"],t.default=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(n(5)),a=function(e){function t(){return r(this,t),i(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}(o.default);a.blotName="strike",a.tagName="S",t.default=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(n(5)),a=function(e){function t(){return r(this,t),i(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}(o.default);a.blotName="underline",a.tagName="U",t.default=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),l=n(15),c=["alt","height","width"],u=function(e){function t(){return r(this,t),i(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),o(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=a(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 c.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,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s.default.Embed);u.blotName="image",u.tagName="IMG",t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s=n(3),l=function(e){return e&&e.__esModule?e:{default:e}}(n(15)),c=["height","width"],u=function(e){function t(){return r(this,t),i(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),o(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=a(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 c.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},c=r(n(33)),u=r(n(6)),d=r(n(7)),h=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,null,[{key:"create",value:function(e){var n=l(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(c.default);h.blotName="formula",h.className="ql-formula",h.tagName="SPAN";var f=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return a(t,e),s(t,null,[{key:"register",value:function(){u.default.register(h,!0)}}]),t}(d.default);t.FormulaBlot=h,t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},c=r(n(0)),u=r(n(6)),d=r(n(7)),h=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(r(n(13)).default);h.className="ql-syntax";var f=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),p=function(e){function t(e,n){i(this,t);var r=o(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 a=null;return r.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(a),a=setTimeout(function(){r.highlight(),a=null},r.options.interval)}),r.highlight(),r}return a(t,e),s(t,null,[{key:"register",value:function(){u.default.register(f,!0),u.default.register(h,!0)}}]),s(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(u.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(h).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(u.default.sources.SILENT),null!=t&&this.quill.setSelection(t,u.default.sources.SILENT)}}}]),t}(d.default);p.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=h,t.CodeToken=f,t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(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}function o(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function a(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(function(e){if("string"==typeof e)o(n,e);else{var t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){var r=document.createElement("select");r.classList.add("ql-"+t),n.forEach(function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),r.appendChild(t)}),e.appendChild(r)}(n,t,r):o(n,t,r)}}),e.appendChild(n)})}Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var s=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=r(n(4)),u=r(n(0)),d=r(n(6)),h=r(n(10)),f=r(n(7)),p=(0,h.default)("quill:toolbar"),g=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,o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(o.options.container)){var l=document.createElement("div");a(l,o.options.container),e.container.parentNode.insertBefore(l,e.container),o.container=l}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach(function(e){o.addHandler(e,o.options.handlers[e])}),[].forEach.call(o.container.querySelectorAll("button, select"),function(e){o.attach(e)}),o.quill.on(d.default.events.EDITOR_CHANGE,function(e,t){e===d.default.events.SELECTION_CHANGE&&o.update(t)}),o.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){var e=o.quill.selection.getRange(),t=s(e,1)[0];o.update(t)}),o):(r=p.error("Container required for toolbar",o.options),i(o,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),l(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(n){if(n=n.slice("ql-".length),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void p.warn("ignoring attaching to disabled format",n,e);if(null==u.default.query(n))return void p.warn("ignoring attaching to nonexistent format",n,e)}var r="SELECT"===e.tagName?"change":"click";e.addEventListener(r,function(r){var i=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var o=e.options[e.selectedIndex];i=!o.hasAttribute("selected")&&(o.value||!1)}else i=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),r.preventDefault();t.quill.focus();var a=t.quill.selection.getRange(),l=s(a,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,i);else if(u.default.query(n).prototype instanceof u.default.Embed){if(!(i=prompt("Enter "+n)))return;t.quill.updateContents((new c.default).retain(l.index).delete(l.length).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}({},n,i)),d.default.sources.USER)}else t.quill.format(n,i,d.default.sources.USER);t.update(l)}),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(n){var r=s(n,2),i=r[0],o=r[1];if("SELECT"===o.tagName){var a=void 0;if(null==e)a=null;else if(null==t[i])a=o.querySelector("option[selected]");else if(!Array.isArray(t[i])){var l=t[i];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),a=o.querySelector('option[value="'+l+'"]')}null==a?(o.value="",o.selectedIndex=-1):a.selected=!0}else if(null==e)o.classList.remove("ql-active");else if(o.hasAttribute("value")){var c=t[i]===o.getAttribute("value")||null!=t[i]&&t[i].toString()===o.getAttribute("value")||null==t[i]&&!o.getAttribute("value");o.classList.toggle("ql-active",c)}else o.classList.toggle("ql-active",null!=t[i])})}}]),t}(f.default);g.DEFAULTS={},g.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(t){null!=u.default.query(t,u.default.Scope.INLINE)&&e.quill.format(t,!1)})}else this.quill.removeFormat(t,d.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",d.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,d.default.sources.USER),this.quill.format("direction",e,d.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var i="+1"===e?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,d.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,d.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,d.default.sources.USER):this.quill.format("list","unchecked",d.default.sources.USER):this.quill.format("list",e,d.default.sources.USER)}}},t.default=g,t.addControls=a},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=r(n(2)),u=r(n(9)),d=n(44),h=r(d),f=n(22),p=r(n(26)),g=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],m=function(e){function t(e,n){i(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return a(t,e),l(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),p.default)}}]),t}(h.default);m.DEFAULTS=(0,c.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(u.default.events.EDITOR_CHANGE,function(e,t,n,i){if(e===u.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&i===u.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var a=o[o.length-1],s=r.quill.getIndex(a),l=Math.min(a.length()-1,t.index+t.length-s),c=r.quill.getBounds(new f.Range(s,l));r.position(c)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return a(t,e),l(t,[{key:"listen",value:function(){var e=this;s(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(u.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=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),t}(d.BaseTooltip);v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),t.BubbleTooltip=v,t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=r(n(2)),d=r(n(9)),h=n(44),f=r(h),p=r(n(15)),g=n(22),m=r(n(26)),v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(e){function t(e,n){i(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return a(t,e),c(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),m.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),m.default),this.tooltip=new b(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,n){e.handlers.link.call(e,!n.format.link)})}}]),t}(f.default);y.DEFAULTS=(0,u.default)(!0,{},f.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var b=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return a(t,e),c(t,[{key:"listen",value:function(){var e=this;l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,d.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(d.default.events.SELECTION_CHANGE,function(t,n,r){if(null!=t){if(0===t.length&&r===d.default.sources.USER){var i=e.quill.scroll.descendant(p.default,t.index),o=s(i,2),a=o[0],l=o[1];if(null!=a){e.linkRange=new g.Range(t.index-l,a.length());var c=p.default.formats(a.domNode);return e.preview.textContent=c,e.preview.setAttribute("href",c),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(h.BaseTooltip);b.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),t.default=y}]).default});