1
2
3
|
/*! For license information please see ba19b6d2d1f3edd4a7eb.js.LICENSE.txt */
(this.webpackJsonp=this.webpackJsonp||[]).push([[10],{10231:function(t,e,r){var n=r(11494),i=r(408);t.exports=function t(e,r,s,o,a){return e===r||(null==e||null==r||!i(e)&&!i(r)?e!=e&&r!=r:n(e,r,s,o,t,a))}},10241:function(t,e,r){const n=r(11694),i=r(11695);t.exports={TimelineDataSeries:n,TimelineGraphView:i}},10365:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var o=window.DiscordNative;(0,n.default)(null!=o,"Can't get desktop sources outside of native app"),e=e||[s.DesktopSources.WINDOW,s.DesktopSources.SCREEN],r=r||{width:150,height:150};var a=[];e.includes(s.DesktopSources.SCREEN)&&t.supports(s.Features.SCREEN_PREVIEWS)&&(a.push(t.getScreenPreviews(r.width,r.height)),e=e.filter((function(t){return t!==s.DesktopSources.SCREEN})));e.includes(s.DesktopSources.WINDOW)&&t.supports(s.Features.WINDOW_PREVIEWS)&&(a.push(t.getWindowPreviews(r.width,r.height)),e=e.filter((function(t){return t!==s.DesktopSources.WINDOW})));0!==e.length&&a.push(o.desktopCapture.getDesktopCaptureSources({types:e,thumbnailSize:r}));return Promise.all(a).then((function(t){return i.default.flatten(t)}))},Object.defineProperty(e,"DesktopSources",{enumerable:!0,get:function(){return s.DesktopSources}});var n=o(r(23)),i=o(r(8)),s=r(34);function o(t){return t&&t.__esModule?t:{default:t}}},10379:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateGuildPermissionSpec=function(t,e){var r=function(t,e){var r;return(r={})[n.Permissions.VIEW_CHANNEL.toString()]={title:t.ROLE_PERMISSIONS_VIEW_CHANNEL,description:t.ROLE_PERMISSIONS_VIEW_CHANNEL_DESCRIPTION,flag:n.Permissions.VIEW_CHANNEL},r[n.Permissions.MANAGE_CHANNELS.toString()]={title:t.MANAGE_CHANNELS,description:t.ROLE_PERMISSIONS_MANAGE_CHANNELS_DESCRIPTION,flag:n.Permissions.MANAGE_CHANNELS},r[n.Permissions.MANAGE_ROLES.toString()]={title:t.MANAGE_ROLES,description:t.ROLE_PERMISSIONS_MANAGE_ROLES_DESCRIPTION,flag:n.Permissions.MANAGE_ROLES},r[n.Permissions.MANAGE_EMOJIS.toString()]={title:t.MANAGE_EMOJIS_AND_STICKERS,description:t.ROLE_PERMISSIONS_MANAGE_EMOJIS_AND_STICKERS_DESCRIPTION,flag:n.Permissions.MANAGE_EMOJIS},r[n.Permissions.VIEW_AUDIT_LOG.toString()]={title:t.VIEW_AUDIT_LOG,description:t.ROLE_PERMISSIONS_VIEW_AUDIT_LOG_DESCRIPTION,flag:n.Permissions.VIEW_AUDIT_LOG},r[n.Permissions.VIEW_GUILD_ANALYTICS.toString()]={title:t.VIEW_GUILD_ANALYTICS,description:t.ROLE_PERMISSIONS_VIEW_GUILD_ANALYTICS_DESCRIPTION,flag:n.Permissions.VIEW_GUILD_ANALYTICS},r[n.Permissions.MANAGE_WEBHOOKS.toString()]={title:t.MANAGE_WEBHOOKS,description:t.ROLE_PERMISSIONS_MANAGE_WEBHOOKS_DESCRIPTION,flag:n.Permissions.MANAGE_WEBHOOKS},r[n.Permissions.MANAGE_GUILD.toString()]={title:t.MANAGE_SERVER,description:t.ROLE_PERMISSIONS_MANAGE_SERVER_DESCRIPTION,flag:n.Permissions.MANAGE_GUILD},r[n.Permissions.CREATE_INSTANT_INVITE.toString()]={title:t.CREATE_INSTANT_INVITE,description:t.ROLE_PERMISSIONS_CREATE_INSTANT_INVITE_DESCRIPTION,flag:n.Permissions.CREATE_INSTANT_INVITE},r[n.Permissions.CHANGE_NICKNAME.toString()]={title:t.CHANGE_NICKNAME,description:t.ROLE_PERMISSIONS_CHANGE_NICKNAME_DESCRIPTION,flag:n.Permissions.CHANGE_NICKNAME},r[n.Permissions.MANAGE_NICKNAMES.toString()]={title:t.MANAGE_NICKNAMES,description:t.ROLE_PERMISSIONS_MANAGE_NICKNAMES_DESCRIPTION,flag:n.Permissions.MANAGE_NICKNAMES},r[n.Permissions.KICK_MEMBERS.toString()]={title:t.KICK_MEMBERS,description:t.ROLE_PERMISSIONS_KICK_MEMBERS_DESCRIPTION,flag:n.Permissions.KICK_MEMBERS},r[n.Permissions.BAN_MEMBERS.toString()]={title:t.BAN_MEMBERS,description:t.ROLE_PERMISSIONS_BAN_MEMBERS_DESCRIPTION,flag:n.Permissions.BAN_MEMBERS},r[n.Permissions.SEND_MESSAGES.toString()]={title:t.SEND_MESSAGES,description:t.ROLE_PERMISSIONS_SEND_MESSAGES_DESCRIPTION,flag:n.Permissions.SEND_MESSAGES},r[n.Permissions.EMBED_LINKS.toString()]={title:t.EMBED_LINKS,description:t.ROLE_PERMISSIONS_EMBED_LINKS_DESCRIPTION,flag:n.Permissions.EMBED_LINKS},r[n.Permissions.ATTACH_FILES.toString()]={title:t.ATTACH_FILES,description:t.ROLE_PERMISSIONS_ATTACH_FILES_DESCRIPTION,flag:n.Permissions.ATTACH_FILES},r[n.Permissions.ADD_REACTIONS.toString()]={title:t.ADD_REACTIONS,description:t.ROLE_PERMISSIONS_ADD_REACTIONS_DESCRIPTION,flag:n.Permissions.ADD_REACTIONS},r[n.Permissions.USE_EXTERNAL_EMOJIS.toString()]={title:t.ROLE_PERMISSIONS_USE_EXTERNAL_EMOJIS,description:t.ROLE_PERMISSIONS_USE_EXTERNAL_EMOJIS_DESCRIPTION,flag:n.Permissions.USE_EXTERNAL_EMOJIS},r[n.Permissions.MENTION_EVERYONE.toString()]={title:t.MENTION_EVERYONE,description:t.ROLE_PERMISSIONS_MENTION_EVERYONE_DESCRIPTION,flag:n.Permissions.MENTION_EVERYONE},r[n.Permissions.MANAGE_MESSAGES.toString()]={title:t.MANAGE_MESSAGES,description:t.ROLE_PERMISSIONS_MANAGE_MESSAGES_DESCRIPTION,flag:n.Permissions.MANAGE_MESSAGES},r[n.Permissions.READ_MESSAGE_HISTORY.toString()]={title:t.READ_MESSAGE_HISTORY,description:t.ROLE_PERMISSIONS_READ_MESSAGE_HISTORY_DESCRIPTION,flag:n.Permissions.READ_MESSAGE_HISTORY},r[n.Permissions.SEND_TTS_MESSAGES.toString()]={title:t.ROLE_PERMISSIONS_SEND_TTS_MESSAGES,description:t.ROLE_PERMISSIONS_SEND_TTS_MESSAGES_DESCRIPTION,flag:n.Permissions.SEND_TTS_MESSAGES},r[n.Permissions.USE_APPLICATION_COMMANDS.toString()]={title:t.ROLE_PERMISSIONS_USE_APPLICATION_COMMANDS,description:t.ROLE_PERMISSIONS_USE_APPLICATION_COMMANDS_GUILD_DESCRIPTION,flag:n.Permissions.USE_APPLICATION_COMMANDS},r[n.Permissions.CONNECT.toString()]={title:t.CONNECT,description:t.ROLE_PERMISSIONS_CONNECT_DESCRIPTION,flag:n.Permissions.CONNECT},r[n.Permissions.SPEAK.toString()]={title:t.SPEAK,description:t.ROLE_PERMISSIONS_SPEAK_DESCRIPTION,flag:n.Permissions.SPEAK},r[n.Permissions.STREAM.toString()]={title:t.VIDEO,description:t.ROLE_PERMISSIONS_STREAM_DESCRIPTION,flag:n.Permissions.STREAM},r[n.Permissions.USE_VAD.toString()]={title:t.USE_VAD,description:t.ROLE_PERMISSIONS_USE_VAD_DESCRIPTION,flag:n.Permissions.USE_VAD},r[n.Permissions.PRIORITY_SPEAKER.toString()]={title:t.PRIORITY_SPEAKER,description:(null==e?void 0:e.PRIORITY_SPEAKER_DESCRIPTION)||t.ROLE_PERMISSIONS_PRIORITY_SPEAKER_DESCRIPTION,flag:n.Permissions.PRIORITY_SPEAKER},r[n.Permissions.MUTE_MEMBERS.toString()]={title:t.MUTE_MEMBERS,description:t.ROLE_PERMISSIONS_MUTE_MEMBERS_DESCRIPTION,flag:n.Permissions.MUTE_MEMBERS},r[n.Permissions.DEAFEN_MEMBERS.toString()]={title:t.DEAFEN_MEMBERS,description:t.ROLE_PERMISSIONS_DEAFEN_MEMBERS_DESCRIPTION,flag:n.Permissions.DEAFEN_MEMBERS},r[n.Permissions.MOVE_MEMBERS.toString()]={title:t.MOVE_MEMBERS,description:t.ROLE_PERMISSIONS_MOVE_MEMBERS_DESCRIPTION,flag:n.Permissions.MOVE_MEMBERS},r[n.Permissions.REQUEST_TO_SPEAK.toString()]={title:t.REQUEST_TO_SPEAK,description:t.ROLE_PERMISSIONS_REQUEST_TO_SPEAK_DESCRIPTION,flag:n.Permissions.REQUEST_TO_SPEAK,isExperimental:!0},r[n.Permissions.ADMINISTRATOR.toString()]={title:t.ADMINISTRATOR,description:"string"==typeof t.ROLE_PERMISSIONS_ADMINISTRATOR_DESCRIPTION?t.ROLE_PERMISSIONS_ADMINISTRATOR_DESCRIPTION:t.ROLE_PERMISSIONS_ADMINISTRATOR_DESCRIPTION.format(),flag:n.Permissions.ADMINISTRATOR},r[n.Permissions.MANAGE_EVENTS.toString()]={title:t.MANAGE_EVENTS,description:t.ROLE_PERMISSIONS_MANAGE_EVENTS_DESCRIPTION,flag:n.Permissions.MANAGE_EVENTS},r[n.Permissions.MANAGE_THREADS.toString()]={title:t.MANAGE_THREADS,description:t.ROLE_PERMISSIONS_MANAGE_THREADS_DESCRIPTION,flag:n.Permissions.MANAGE_THREADS},r[n.Permissions.USE_PUBLIC_THREADS.toString()]={title:t.USE_PUBLIC_THREADS,description:t.ROLE_PERMISSIONS_USE_PUBLIC_THREADS_DESCRIPTION,flag:n.Permissions.USE_PUBLIC_THREADS},r[n.Permissions.USE_PRIVATE_THREADS.toString()]={title:t.USE_PRIVATE_THREADS,description:t.ROLE_PERMISSIONS_USE_PRIVATE_THREADS_DESCRIPTION,flag:n.Permissions.USE_PRIVATE_THREADS},r}(t,e),h=[o(r,t),a(r,t),u(r,t,e),c(r,t)];e.showStageChannelPermissions&&h.push(function(t,e,r){return i({title:e.ROLE_PERMISSIONS_SECTION_STAGE,permissions:s([n.Permissions.REQUEST_TO_SPEAK],t)},r.showExperimental)}(r,t,e));e.showGuildEventsPermissions&&h.push(function(t,e,r){return i({title:e.ROLE_PERMISSIONS_SECTION_GUILD_EVENTS,permissions:s([n.Permissions.MANAGE_EVENTS],t)},r.showExperimental)}(r,t,e));return h.push(function(t,e){return i({title:e.ROLE_PERMISSIONS_SECTION_ADVANCED,permissions:s([n.Permissions.ADMINISTRATOR],t)})}(r,t)),h},e.generateChannelGeneralSection=function(t,e,r){var i;void 0===r&&(r={showManageWebhooks:!0});return{title:e,permissions:s((null===(i=r)||void 0===i?void 0:i.showManageWebhooks)?[n.Permissions.VIEW_CHANNEL,n.Permissions.MANAGE_CHANNELS,n.Permissions.MANAGE_ROLES,n.Permissions.MANAGE_WEBHOOKS]:[n.Permissions.VIEW_CHANNEL,n.Permissions.MANAGE_CHANNELS,n.Permissions.MANAGE_ROLES],t)}},e.generateChannelMembershipSection=function(t,e){return{title:e,permissions:s([n.Permissions.CREATE_INSTANT_INVITE],t)}},e.generateChannelTextSection=function(t,e,r){var i=r.showThreadPermissions?[n.Permissions.SEND_MESSAGES,n.Permissions.USE_PUBLIC_THREADS,n.Permissions.USE_PRIVATE_THREADS,n.Permissions.EMBED_LINKS,n.Permissions.ATTACH_FILES,n.Permissions.ADD_REACTIONS,n.Permissions.USE_EXTERNAL_EMOJIS,n.Permissions.MENTION_EVERYONE,n.Permissions.MANAGE_MESSAGES,n.Permissions.MANAGE_THREADS,n.Permissions.READ_MESSAGE_HISTORY,n.Permissions.SEND_TTS_MESSAGES,n.Permissions.USE_APPLICATION_COMMANDS]:[n.Permissions.SEND_MESSAGES,n.Permissions.EMBED_LINKS,n.Permissions.ATTACH_FILES,n.Permissions.ADD_REACTIONS,n.Permissions.USE_EXTERNAL_EMOJIS,n.Permissions.MENTION_EVERYONE,n.Permissions.MANAGE_MESSAGES,n.Permissions.READ_MESSAGE_HISTORY,n.Permissions.SEND_TTS_MESSAGES,n.Permissions.USE_APPLICATION_COMMANDS];r.showPrivateThreads||(i=i.filter((function(t){return t!==n.Permissions.USE_PRIVATE_THREADS})));return{title:e,permissions:s(i,t)}},e.generateChannelVoiceSection=function(t,e){return{title:e,permissions:s([n.Permissions.CONNECT,n.Permissions.SPEAK,n.Permissions.STREAM,n.Permissions.USE_VAD,n.Permissions.PRIORITY_SPEAKER,n.Permissions.MUTE_MEMBERS,n.Permissions.DEAFEN_MEMBERS,n.Permissions.MOVE_MEMBERS],t)}},e.generateChannelStageVoiceSection=function(t,e){return{title:e,permissions:s([n.Permissions.CONNECT,n.Permissions.MUTE_MEMBERS,n.Permissions.MOVE_MEMBERS],t)}},e.generateChannelStageSection=function(t,e){return{title:e,permissions:s([n.Permissions.REQUEST_TO_SPEAK],t)}};var n=r(92);function i(t,e){return void 0===e&&(e=!1),e||(t.permissions=t.permissions.filter((function(t){return!t.isExperimental}))),t}function s(t,e){return t.map((function(t){return e[t.toString()]}))}function o(t,e){return i({title:e.ROLE_PERMISSIONS_SECTION_GENERAL_GUILD,permissions:s([n.Permissions.VIEW_CHANNEL,n.Permissions.MANAGE_CHANNELS,n.Permissions.MANAGE_ROLES,n.Permissions.MANAGE_EMOJIS,n.Permissions.VIEW_AUDIT_LOG,n.Permissions.VIEW_GUILD_ANALYTICS,n.Permissions.MANAGE_WEBHOOKS,n.Permissions.MANAGE_GUILD],t)})}function a(t,e){return i({title:e.ROLE_PERMISSIONS_SECTION_MEMBERSHIP,permissions:s([n.Permissions.CREATE_INSTANT_INVITE,n.Permissions.CHANGE_NICKNAME,n.Permissions.MANAGE_NICKNAMES,n.Permissions.KICK_MEMBERS,n.Permissions.BAN_MEMBERS],t)})}function u(t,e,r){return i({title:e.ROLE_PERMISSIONS_SECTION_TEXT,permissions:s(r.showThreadPermissions?[n.Permissions.SEND_MESSAGES,n.Permissions.USE_PUBLIC_THREADS,n.Permissions.USE_PRIVATE_THREADS,n.Permissions.EMBED_LINKS,n.Permissions.ATTACH_FILES,n.Permissions.ADD_REACTIONS,n.Permissions.USE_EXTERNAL_EMOJIS,n.Permissions.MENTION_EVERYONE,n.Permissions.MANAGE_MESSAGES,n.Permissions.MANAGE_THREADS,n.Permissions.READ_MESSAGE_HISTORY,n.Permissions.SEND_TTS_MESSAGES,n.Permissions.USE_APPLICATION_COMMANDS]:[n.Permissions.SEND_MESSAGES,n.Permissions.EMBED_LINKS,n.Permissions.ATTACH_FILES,n.Permissions.ADD_REACTIONS,n.Permissions.USE_EXTERNAL_EMOJIS,n.Permissions.MENTION_EVERYONE,n.Permissions.MANAGE_MESSAGES,n.Permissions.READ_MESSAGE_HISTORY,n.Permissions.SEND_TTS_MESSAGES,n.Permissions.USE_APPLICATION_COMMANDS],t)})}function c(t,e){return i({title:e.ROLE_PERMISSIONS_SECTION_VOICE,permissions:s([n.Permissions.CONNECT,n.Permissions.SPEAK,n.Permissions.STREAM,n.Permissions.USE_VAD,n.Permissions.PRIORITY_SPEAKER,n.Permissions.MUTE_MEMBERS,n.Permissions.DEAFEN_MEMBERS,n.Permissions.MOVE_MEMBERS],t)})}},10380:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.truncateAndLocalizeNumber=void 0;var n,i=(n=r(731))&&n.__esModule?n:{default:n};e.truncateAndLocalizeNumber=function(t,e){var r=Math.round(10*t)/10;if(t<1e6)return new Intl.NumberFormat(e,{maximumFractionDigits:r%1==0?0:1}).format(t);var n=Math.round(t/1e6*10)/10,s=new Intl.NumberFormat(e,{maximumFractionDigits:n%1==0?0:1}).format(t/1e6);return i.default.Messages.NumberAbbreviations.MILLION.format({num:s})}},10381:function(t,e){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return r.test(t)}},10382:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.timing=p,e.spring=d,e.parallel=g,e.sequence=m,e.default=e.SequenceAnimation=e.ParallelAnimation=e.SingleAnimation=void 0;var n,i=(n=r(273))&&n.__esModule?n:{default:n};function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function o(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e,r,n,i,s,o){try{var a=t[s](o),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}var c=function(){function t(t){this.animation=t}var e=t.prototype;return e.start=function(){var t=this;return new Promise((function(e){t.animation.start((function(){e()}))}))},e.stop=function(){this.animation.stop()},t}();e.SingleAnimation=c;var h=function(){function t(t){this.animations=t}var e=t.prototype;return e._map=function(t){return this.animations.map(t)},e.start=function(){var t=this;return new Promise((function(e){return Promise.all(t._map((function(t){return t.start()}))).then((function(){return e()}))}))},e.stop=function(){this._map((function(t){return t.stop()}))},t}();e.ParallelAnimation=h;var f=function(){function t(t){this.stopped=!1,this.animations=t}var e=t.prototype;return e.start=function(){var t,e=(t=regeneratorRuntime.mark((function t(){var e,r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.stopped=!1,e=o(this.animations);case 2:if((r=e()).done){t.next=10;break}if(n=r.value,!this.stopped){t.next=6;break}return t.abrupt("return");case 6:return t.next=8,n.start();case 8:t.next=2;break;case 10:case"end":return t.stop()}}),t,this)})),function(){var e=this,r=arguments;return new Promise((function(n,i){var s=t.apply(e,r);function o(t){u(s,n,i,o,a,"next",t)}function a(t){u(s,n,i,o,a,"throw",t)}o(void 0)}))});return function(){return e.apply(this,arguments)}}(),e.stop=function(){this.stopped=!0,this.animations.map((function(t){return t.stop()}))},t}();function l(t,e,r){var n=r(t,s({},e));return new c(n)}function p(t,e){return l(t,e,i.default.timing)}function d(t,e){return l(t,e,i.default.spring)}function g(t){return new h(t)}function m(t){return new f(t)}e.SequenceAnimation=f;var E=s({},i.default,{timing:p,spring:d,parallel:g,sequence:m});e.default=E},10433:function(t,e,r){"use strict";function n(t){const e=[...t.caches],r=e.shift();return void 0===r?i():{get:(t,i,s={miss:()=>Promise.resolve()})=>r.get(t,i,s).catch(()=>n({caches:e}).get(t,i,s)),set:(t,i)=>r.set(t,i).catch(()=>n({caches:e}).set(t,i)),delete:t=>r.delete(t).catch(()=>n({caches:e}).delete(t)),clear:()=>r.clear().catch(()=>n({caches:e}).clear())}}function i(){return{get:(t,e,r={miss:()=>Promise.resolve()})=>e().then(t=>Promise.all([t,r.miss(t)])).then(([t])=>t),set:(t,e)=>Promise.resolve(e),delete:t=>Promise.resolve(),clear:()=>Promise.resolve()}}r.r(e),r.d(e,"createFallbackableCache",(function(){return n})),r.d(e,"createNullCache",(function(){return i}))},10434:function(t,e,r){t.exports=function(){"use strict";function t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){t(r,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))}))}return r}function n(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},s=Object.keys(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],n=!0,i=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,s=t}finally{try{n||null==a.return||a.return()}finally{if(i)throw s}}return r}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(t){var e,r="algoliasearch-client-js-".concat(t.key),n=function(){return void 0===e&&(e=t.localStorage||window.localStorage),e},s=function(){return JSON.parse(n().getItem(r)||"{}")};return{get:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(t),n=s()[r];return Promise.all([n||e(),void 0!==n])})).then((function(t){var e=i(t,2),n=e[0],s=e[1];return Promise.all([n,s||r.miss(n)])})).then((function(t){return i(t,1)[0]}))},set:function(t,e){return Promise.resolve().then((function(){var i=s();return i[JSON.stringify(t)]=e,n().setItem(r,JSON.stringify(i)),e}))},delete:function(t){return Promise.resolve().then((function(){var e=s();delete e[JSON.stringify(t)],n().setItem(r,JSON.stringify(e))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function a(t){var e=s(t.caches),r=e.shift();return void 0===r?{get:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},n=e();return n.then((function(t){return Promise.all([t,r.miss(t)])})).then((function(t){return i(t,1)[0]}))},set:function(t,e){return Promise.resolve(e)},delete:function(t){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(t,n,i).catch((function(){return a({caches:e}).get(t,n,i)}))},set:function(t,n){return r.set(t,n).catch((function(){return a({caches:e}).set(t,n)}))},delete:function(t){return r.delete(t).catch((function(){return a({caches:e}).delete(t)}))},clear:function(){return r.clear().catch((function(){return a({caches:e}).clear()}))}}}function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},e={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},s=JSON.stringify(r);if(s in e)return Promise.resolve(t.serializable?JSON.parse(e[s]):e[s]);var o=n(),a=i&&i.miss||function(){return Promise.resolve()};return o.then((function(t){return a(t)})).then((function(){return o}))},set:function(r,n){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(t){return delete e[JSON.stringify(t)],Promise.resolve()},clear:function(){return e={},Promise.resolve()}}}function c(t,e,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers:function(){return t===g.WithinHeaders?n:{}},queryParameters:function(){return t===g.WithinQueryParameters?n:{}}}}function h(t){var e=0;return t((function r(){return e++,new Promise((function(n){setTimeout((function(){n(t(r))}),Math.min(100*e,1e3))}))}))}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t,e){return Promise.resolve()};return Object.assign(t,{wait:function(r){return f(t.then((function(t){return Promise.all([e(t,r),t])})).then((function(t){return t[1]})))}})}function l(t){for(var e=t.length-1;e>0;e--){var r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}function p(t,e){return Object.keys(void 0!==e?e:{}).forEach((function(r){t[r]=e[r](t)})),t}function d(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var i=0;return t.replace(/%s/g,(function(){return encodeURIComponent(r[i++])}))}var g={WithinQueryParameters:0,WithinHeaders:1};function m(t,e){var r=t||{},n=r.data||{};return Object.keys(r).forEach((function(t){-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(t)&&(n[t]=r[t])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var E={Read:1,Write:2,Any:3};function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return r({},t,{status:e,lastUpdate:Date.now()})}function v(t){return{protocol:t.protocol||"https",url:t.url,accept:t.accept||E.Any}}var _="DELETE",y="GET",x="POST";function P(t,e,n,i){var o=[],a=function(t,e){if(t.method!==y&&(void 0!==t.data||void 0!==e.data)){var n=Array.isArray(t.data)?t.data:r({},t.data,{},e.data);return JSON.stringify(n)}}(n,i),u=function(t,e){var n=r({},t.headers,{},e.headers),i={};return Object.keys(n).forEach((function(t){var e=n[t];i[t.toLowerCase()]=e})),i}(t,i),c=n.method,h=n.method!==y?{}:r({},n.data,{},i.data),f=r({"x-algolia-agent":t.userAgent.value},t.queryParameters,{},h,{},i.queryParameters),l=0,p=function e(r,s){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(o)};var p={data:a,headers:u,method:c,url:M(h,n.path,f),connectTimeout:s(l,t.timeouts.connect),responseTimeout:s(l,i.timeout)},d=function(t){var e={request:p,response:t,host:h,triesLeft:r.length};return o.push(e),e},g={onSucess:function(t){return function(t){try{return JSON.parse(t.content)}catch(e){throw function(t,e){return{name:"DeserializationError",message:t,response:e}}(e.message,t)}}(t)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([t.logger.info("Retryable failure",T(i)),t.hostsCache.set(h,S(h,n.isTimedOut?3:2))]).then((function(){return e(r,s)}))},onFail:function(t){throw d(t),function(t,e){var r=t.content,n=t.status,i=r;try{i=JSON.parse(r).message}catch(t){}return function(t,e,r){return{name:"ApiError",message:t,status:e,transporterStackTrace:r}}(i,n,e)}(t,O(o))}};return t.requester.send(p).then((function(t){return function(t,e){return function(t){var e=t.status;return t.isTimedOut||function(t){var e=t.isTimedOut,r=t.status;return!e&&0==~~r}(t)||2!=~~(e/100)&&4!=~~(e/100)}(t)?e.onRetry(t):2==~~(t.status/100)?e.onSucess(t):e.onFail(t)}(t,g)}))};return function(t,e){return Promise.all(e.map((function(e){return t.get(e,(function(){return Promise.resolve(S(e))}))}))).then((function(t){var r=t.filter((function(t){return function(t){return 1===t.status||Date.now()-t.lastUpdate>12e4}(t)})),n=t.filter((function(t){return function(t){return 3===t.status&&Date.now()-t.lastUpdate<=12e4}(t)})),i=[].concat(s(r),s(n));return{getTimeout:function(t,e){return(0===n.length&&0===t?1:n.length+3+t)*e},statelessHosts:i.length>0?i.map((function(t){return v(t)})):e}}))}(t.hostsCache,e).then((function(t){return p(s(t.statelessHosts).reverse(),t.getTimeout)}))}function A(t){var e=t.hostsCache,r=t.logger,n=t.requester,s=t.requestsCache,o=t.responsesCache,a=t.timeouts,u=t.userAgent,c=t.hosts,h=t.queryParameters,f={hostsCache:e,logger:r,requester:n,requestsCache:s,responsesCache:o,timeouts:a,userAgent:u,headers:t.headers,queryParameters:h,hosts:c.map((function(t){return v(t)})),read:function(t,e){var r=m(e,f.timeouts.read),n=function(){return P(f,f.hosts.filter((function(t){return 0!=(t.accept&E.Read)})),t,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:t.cacheable))return n();var s={request:t,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(s,(function(){return f.requestsCache.get(s,(function(){return f.requestsCache.set(s,n()).then((function(t){return Promise.all([f.requestsCache.delete(s),t])}),(function(t){return Promise.all([f.requestsCache.delete(s),Promise.reject(t)])})).then((function(t){var e=i(t,2);return e[0],e[1]}))}))}),{miss:function(t){return f.responsesCache.set(s,t)}})},write:function(t,e){return P(f,f.hosts.filter((function(t){return 0!=(t.accept&E.Write)})),t,m(e,f.timeouts.write))}};return f}function I(t){var e={value:"Algolia for JavaScript (".concat(t,")"),add:function(t){var r="; ".concat(t.segment).concat(void 0!==t.version?" (".concat(t.version,")"):"");return-1===e.value.indexOf(r)&&(e.value="".concat(e.value).concat(r)),e}};return e}function M(t,e,r){var n=N(r),i="".concat(t.protocol,"://").concat(t.url,"/").concat("/"===e.charAt(0)?e.substr(1):e);return n.length&&(i+="?".concat(n)),i}function N(t){return Object.keys(t).map((function(e){return d("%s=%s",e,(r=t[e],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(t[e]):t[e]));var r})).join("&")}function O(t){return t.map((function(t){return T(t)}))}function T(t){var e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r({},t,{request:r({},t.request,{headers:r({},t.request.headers,{},e)})})}var b=function(t){return function(e,r){return t.transporter.write({method:x,path:"2/abtests",data:e},r)}},R=function(t){return function(e,r){return t.transporter.write({method:_,path:d("2/abtests/%s",e)},r)}},w=function(t){return function(e,r){return t.transporter.read({method:y,path:d("2/abtests/%s",e)},r)}},D=function(t){return function(e){return t.transporter.read({method:y,path:"2/abtests"},e)}},L=function(t){return function(e,r){return t.transporter.write({method:x,path:d("2/abtests/%s/stop",e)},r)}},C=function(t){return function(e){return t.transporter.read({method:y,path:"1/strategies/personalization"},e)}},k=function(t){return function(e,r){return t.transporter.write({method:x,path:"1/strategies/personalization",data:e},r)}};function j(t){return function e(r){return t.request(r).then((function(n){if(void 0!==t.batch&&t.batch(n.hits),!t.shouldStop(n))return n.cursor?e({cursor:n.cursor}):e({page:(r.page||0)+1})}))}({})}var q=function(t){return function(e,i){var s=i||{},o=s.queryParameters,a=n(s,["queryParameters"]),u=r({acl:e},void 0!==o?{queryParameters:o}:{});return f(t.transporter.write({method:x,path:"1/keys",data:u},a),(function(e,r){return h((function(n){return z(t)(e.key,r).catch((function(t){if(404!==t.status)throw t;return n()}))}))}))}},G=function(t){return function(e,r,n){var i=m(n);return i.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:x,path:"1/clusters/mapping",data:{cluster:r}},i)}},U=function(t){return function(e,r,n){return t.transporter.write({method:x,path:"1/clusters/mapping/batch",data:{users:e,cluster:r}},n)}},V=function(t){return function(e,r,n){return f(t.transporter.write({method:x,path:d("1/indexes/%s/operation",e),data:{operation:"copy",destination:r}},n),(function(r,n){return X(t)(e,{methods:{waitTask:Yt}}).waitTask(r.taskID,n)}))}},H=function(t){return function(e,n,i){return V(t)(e,n,r({},i,{scope:[Xt.Rules]}))}},B=function(t){return function(e,n,i){return V(t)(e,n,r({},i,{scope:[Xt.Settings]}))}},K=function(t){return function(e,n,i){return V(t)(e,n,r({},i,{scope:[Xt.Synonyms]}))}},F=function(t){return function(e,r){return f(t.transporter.write({method:_,path:d("1/keys/%s",e)},r),(function(r,n){return h((function(r){return z(t)(e,n).then(r).catch((function(t){if(404!==t.status)throw t}))}))}))}},z=function(t){return function(e,r){return t.transporter.read({method:y,path:d("1/keys/%s",e)},r)}},W=function(t){return function(e){return t.transporter.read({method:y,path:"1/logs"},e)}},Z=function(t){return function(e){return t.transporter.read({method:y,path:"1/clusters/mapping/top"},e)}},Y=function(t){return function(e,r){return t.transporter.read({method:y,path:d("1/clusters/mapping/%s",e)},r)}},J=function(t){return function(e){var r=e||{},i=r.retrieveMappings,s=n(r,["retrieveMappings"]);return!0===i&&(s.getClusters=!0),t.transporter.read({method:y,path:"1/clusters/mapping/pending"},s)}},X=function(t){return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={transporter:t.transporter,appId:t.appId,indexName:e};return p(n,r.methods)}},Q=function(t){return function(e){return t.transporter.read({method:y,path:"1/keys"},e)}},$=function(t){return function(e){return t.transporter.read({method:y,path:"1/clusters"},e)}},tt=function(t){return function(e){return t.transporter.read({method:y,path:"1/indexes"},e)}},et=function(t){return function(e){return t.transporter.read({method:y,path:"1/clusters/mapping"},e)}},rt=function(t){return function(e,r,n){return f(t.transporter.write({method:x,path:d("1/indexes/%s/operation",e),data:{operation:"move",destination:r}},n),(function(r,n){return X(t)(e,{methods:{waitTask:Yt}}).waitTask(r.taskID,n)}))}},nt=function(t){return function(e,r){return f(t.transporter.write({method:x,path:"1/indexes/*/batch",data:{requests:e}},r),(function(e,r){return Promise.all(Object.keys(e.taskID).map((function(n){return X(t)(n,{methods:{waitTask:Yt}}).waitTask(e.taskID[n],r)})))}))}},it=function(t){return function(e,r){return t.transporter.read({method:x,path:"1/indexes/*/objects",data:{requests:e}},r)}},st=function(t){return function(e,n){var i=e.map((function(t){return r({},t,{params:N(t.params||{})})}));return t.transporter.read({method:x,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},ot=function(t){return function(e,i){return Promise.all(e.map((function(e){var s=e.params,o=s.facetName,a=s.facetQuery,u=n(s,["facetName","facetQuery"]);return X(t)(e.indexName,{methods:{searchForFacetValues:Ft}}).searchForFacetValues(o,a,r({},i,{},u))})))}},at=function(t){return function(e,r){var n=m(r);return n.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:_,path:"1/clusters/mapping"},n)}},ut=function(t){return function(e,r){return f(t.transporter.write({method:x,path:d("1/keys/%s/restore",e)},r),(function(r,n){return h((function(r){return z(t)(e,n).catch((function(t){if(404!==t.status)throw t;return r()}))}))}))}},ct=function(t){return function(e,r){return t.transporter.read({method:x,path:"1/clusters/mapping/search",data:{query:e}},r)}},ht=function(t){return function(e,r){var i=Object.assign({},r),s=r||{},o=s.queryParameters,a=n(s,["queryParameters"]),u=o?{queryParameters:o}:{},c=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"];return f(t.transporter.write({method:"PUT",path:d("1/keys/%s",e),data:u},a),(function(r,n){return h((function(r){return z(t)(e,n).then((function(t){return function(t){return Object.keys(i).filter((function(t){return-1!==c.indexOf(t)})).every((function(e){return t[e]===i[e]}))}(t)?Promise.resolve():r()}))}))}))}},ft=function(t){return function(e,r){return f(t.transporter.write({method:x,path:d("1/indexes/%s/batch",t.indexName),data:{requests:e}},r),(function(e,r){return Yt(t)(e.taskID,r)}))}},lt=function(t){return function(e){return j(r({},e,{shouldStop:function(t){return void 0===t.cursor},request:function(r){return t.transporter.read({method:x,path:d("1/indexes/%s/browse",t.indexName),data:r},e)}}))}},pt=function(t){return function(e){var n=r({hitsPerPage:1e3},e);return j(r({},n,{shouldStop:function(t){return t.hits.length<n.hitsPerPage},request:function(e){return zt(t)("",r({},n,{},e)).then((function(t){return r({},t,{hits:t.hits.map((function(t){return delete t._highlightResult,t}))})}))}}))}},dt=function(t){return function(e){var n=r({hitsPerPage:1e3},e);return j(r({},n,{shouldStop:function(t){return t.hits.length<n.hitsPerPage},request:function(e){return Wt(t)("",r({},n,{},e)).then((function(t){return r({},t,{hits:t.hits.map((function(t){return delete t._highlightResult,t}))})}))}}))}},gt=function(t){return function(e,r,i){var s=i||{},o=s.batchSize,a=n(s,["batchSize"]),u={taskIDs:[],objectIDs:[]};return f(function n(){var i,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,c=[];for(i=s;i<e.length&&(c.push(e[i]),c.length!==(o||1e3));i++);return 0===c.length?Promise.resolve(u):ft(t)(c.map((function(t){return{action:r,body:t}})),a).then((function(t){return u.objectIDs=u.objectIDs.concat(t.objectIDs),u.taskIDs.push(t.taskID),i++,n(i)}))}(),(function(e,r){return Promise.all(e.taskIDs.map((function(e){return Yt(t)(e,r)})))}))}},mt=function(t){return function(e){return f(t.transporter.write({method:x,path:d("1/indexes/%s/clear",t.indexName)},e),(function(e,r){return Yt(t)(e.taskID,r)}))}},Et=function(t){return function(e){var r=e||{},i=r.forwardToReplicas,s=m(n(r,["forwardToReplicas"]));return i&&(s.queryParameters.forwardToReplicas=1),f(t.transporter.write({method:x,path:d("1/indexes/%s/rules/clear",t.indexName)},s),(function(e,r){return Yt(t)(e.taskID,r)}))}},St=function(t){return function(e){var r=e||{},i=r.forwardToReplicas,s=m(n(r,["forwardToReplicas"]));return i&&(s.queryParameters.forwardToReplicas=1),f(t.transporter.write({method:x,path:d("1/indexes/%s/synonyms/clear",t.indexName)},s),(function(e,r){return Yt(t)(e.taskID,r)}))}},vt=function(t){return function(e,r){return f(t.transporter.write({method:x,path:d("1/indexes/%s/deleteByQuery",t.indexName),data:e},r),(function(e,r){return Yt(t)(e.taskID,r)}))}},_t=function(t){return function(e){return f(t.transporter.write({method:_,path:d("1/indexes/%s",t.indexName)},e),(function(e,r){return Yt(t)(e.taskID,r)}))}},yt=function(t){return function(e,r){return f(xt(t)([e],r).then((function(t){return{taskID:t.taskIDs[0]}})),(function(e,r){return Yt(t)(e.taskID,r)}))}},xt=function(t){return function(e,r){var n=e.map((function(t){return{objectID:t}}));return gt(t)(n,Jt.DeleteObject,r)}},Pt=function(t){return function(e,r){var i=r||{},s=i.forwardToReplicas,o=m(n(i,["forwardToReplicas"]));return s&&(o.queryParameters.forwardToReplicas=1),f(t.transporter.write({method:_,path:d("1/indexes/%s/rules/%s",t.indexName,e)},o),(function(e,r){return Yt(t)(e.taskID,r)}))}},At=function(t){return function(e,r){var i=r||{},s=i.forwardToReplicas,o=m(n(i,["forwardToReplicas"]));return s&&(o.queryParameters.forwardToReplicas=1),f(t.transporter.write({method:_,path:d("1/indexes/%s/synonyms/%s",t.indexName,e)},o),(function(e,r){return Yt(t)(e.taskID,r)}))}},It=function(t){return function(e){return Rt(t)(e).then((function(){return!0})).catch((function(t){if(404!==t.status)throw t;return!1}))}},Mt=function(t){return function(e,s){var o=s||{},a=o.query,u=o.paginate,c=n(o,["query","paginate"]),h=0;return function n(){return Kt(t)(a||"",r({},c,{page:h})).then((function(t){for(var r=0,s=Object.entries(t.hits);r<s.length;r++){var o=i(s[r],2),a=o[0],c=o[1];if(e(c))return{object:c,position:parseInt(a,10),page:h}}if(h++,!1===u||h>=t.nbPages)throw{name:"ObjectNotFoundError",message:"Object not found."};return n()}))}()}},Nt=function(t){return function(e,r){return t.transporter.read({method:y,path:d("1/indexes/%s/%s",t.indexName,e)},r)}},Ot=function(){return function(t,e){for(var r=0,n=Object.entries(t.hits);r<n.length;r++){var s=i(n[r],2),o=s[0];if(s[1].objectID===e)return parseInt(o,10)}return-1}},Tt=function(t){return function(e,i){var s=i||{},o=s.attributesToRetrieve,a=n(s,["attributesToRetrieve"]),u=e.map((function(e){return r({indexName:t.indexName,objectID:e},o?{attributesToRetrieve:o}:{})}));return t.transporter.read({method:x,path:"1/indexes/*/objects",data:{requests:u}},a)}},bt=function(t){return function(e,r){return t.transporter.read({method:y,path:d("1/indexes/%s/rules/%s",t.indexName,e)},r)}},Rt=function(t){return function(e){return t.transporter.read({method:y,path:d("1/indexes/%s/settings",t.indexName),data:{getVersion:2}},e)}},wt=function(t){return function(e,r){return t.transporter.read({method:y,path:d("1/indexes/%s/synonyms/%s",t.indexName,e)},r)}},Dt=function(t){return function(e,r){return f(Lt(t)([e],r).then((function(t){return{objectID:t.objectIDs[0],taskID:t.taskIDs[0]}})),(function(e,r){return Yt(t)(e.taskID,r)}))}},Lt=function(t){return function(e,r){var i=r||{},s=i.createIfNotExists,o=n(i,["createIfNotExists"]),a=s?Jt.PartialUpdateObject:Jt.PartialUpdateObjectNoCreate;return gt(t)(e,a,o)}},Ct=function(t){return function(e,o){var a=o||{},u=a.safe,c=a.autoGenerateObjectIDIfNotExist,h=a.batchSize,l=n(a,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),p=function(e,r,n,i){return f(t.transporter.write({method:x,path:d("1/indexes/%s/operation",e),data:{operation:n,destination:r}},i),(function(e,r){return Yt(t)(e.taskID,r)}))},g=Math.random().toString(36).substring(7),m="".concat(t.indexName,"_tmp_").concat(g),E=Gt({appId:t.appId,transporter:t.transporter,indexName:m}),S=[],v=p(t.indexName,m,"copy",r({},l,{scope:["settings","synonyms","rules"]}));return S.push(v),f((u?v.wait(l):v).then((function(){var t=E(e,r({},l,{autoGenerateObjectIDIfNotExist:c,batchSize:h}));return S.push(t),u?t.wait(l):t})).then((function(){var e=p(m,t.indexName,"move",l);return S.push(e),u?e.wait(l):e})).then((function(){return Promise.all(S)})).then((function(t){var e=i(t,3),r=e[0],n=e[1],o=e[2];return{objectIDs:n.objectIDs,taskIDs:[r.taskID].concat(s(n.taskIDs),[o.taskID])}})),(function(t,e){return Promise.all(S.map((function(t){return t.wait(e)})))}))}},kt=function(t){return function(e,n){return Vt(t)(e,r({},n,{clearExistingRules:!0}))}},jt=function(t){return function(e,n){return Bt(t)(e,r({},n,{replaceExistingSynonyms:!0}))}},qt=function(t){return function(e,r){return f(Gt(t)([e],r).then((function(t){return{objectID:t.objectIDs[0],taskID:t.taskIDs[0]}})),(function(e,r){return Yt(t)(e.taskID,r)}))}},Gt=function(t){return function(e,r){var i=r||{},s=i.autoGenerateObjectIDIfNotExist,o=n(i,["autoGenerateObjectIDIfNotExist"]),a=s?Jt.AddObject:Jt.UpdateObject;if(a===Jt.UpdateObject){var u=!0,c=!1,h=void 0;try{for(var l,p=e[Symbol.iterator]();!(u=(l=p.next()).done);u=!0)if(void 0===l.value.objectID)return f(Promise.reject({name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}))}catch(t){c=!0,h=t}finally{try{u||null==p.return||p.return()}finally{if(c)throw h}}}return gt(t)(e,a,o)}},Ut=function(t){return function(e,r){return Vt(t)([e],r)}},Vt=function(t){return function(e,r){var i=r||{},s=i.forwardToReplicas,o=i.clearExistingRules,a=m(n(i,["forwardToReplicas","clearExistingRules"]));return s&&(a.queryParameters.forwardToReplicas=1),o&&(a.queryParameters.clearExistingRules=1),f(t.transporter.write({method:x,path:d("1/indexes/%s/rules/batch",t.indexName),data:e},a),(function(e,r){return Yt(t)(e.taskID,r)}))}},Ht=function(t){return function(e,r){return Bt(t)([e],r)}},Bt=function(t){return function(e,r){var i=r||{},s=i.forwardToReplicas,o=i.replaceExistingSynonyms,a=m(n(i,["forwardToReplicas","replaceExistingSynonyms"]));return s&&(a.queryParameters.forwardToReplicas=1),o&&(a.queryParameters.replaceExistingSynonyms=1),f(t.transporter.write({method:x,path:d("1/indexes/%s/synonyms/batch",t.indexName),data:e},a),(function(e,r){return Yt(t)(e.taskID,r)}))}},Kt=function(t){return function(e,r){return t.transporter.read({method:x,path:d("1/indexes/%s/query",t.indexName),data:{query:e},cacheable:!0},r)}},Ft=function(t){return function(e,r,n){return t.transporter.read({method:x,path:d("1/indexes/%s/facets/%s/query",t.indexName,e),data:{facetQuery:r},cacheable:!0},n)}},zt=function(t){return function(e,r){return t.transporter.read({method:x,path:d("1/indexes/%s/rules/search",t.indexName),data:{query:e}},r)}},Wt=function(t){return function(e,r){return t.transporter.read({method:x,path:d("1/indexes/%s/synonyms/search",t.indexName),data:{query:e}},r)}},Zt=function(t){return function(e,r){var i=r||{},s=i.forwardToReplicas,o=m(n(i,["forwardToReplicas"]));return s&&(o.queryParameters.forwardToReplicas=1),f(t.transporter.write({method:"PUT",path:d("1/indexes/%s/settings",t.indexName),data:e},o),(function(e,r){return Yt(t)(e.taskID,r)}))}},Yt=function(t){return function(e,r){return h((function(n){return function(t){return function(e,r){return t.transporter.read({method:y,path:d("1/indexes/%s/task/%s",t.indexName,e.toString())},r)}}(t)(e,r).then((function(t){return"published"!==t.status?n():void 0}))}))}},Jt={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject"},Xt={Settings:"settings",Synonyms:"synonyms",Rules:"rules"};function Qt(t,e,n){var i={appId:t,apiKey:e,timeouts:{connect:1,read:2,write:30},requester:{send:function(t){return new Promise((function(e){var r=new XMLHttpRequest;r.open(t.method,t.url,!0),Object.keys(t.headers).forEach((function(e){return r.setRequestHeader(e,t.headers[e])}));var n,i=function(t,n){return setTimeout((function(){r.abort(),e({status:0,content:n,isTimedOut:!0})}),1e3*t)},s=i(t.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(s),n=i(t.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(s),clearTimeout(n),e({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(s),clearTimeout(n),e({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(t.data)}))}},logger:{debug:function(t,e){return Promise.resolve()},info:function(t,e){return Promise.resolve()},error:function(t,e){return console.error(t,e),Promise.resolve()}},responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:a({caches:[o({key:"".concat("4.1.0","-").concat(t)}),u()]}),userAgent:I("4.1.0").add({segment:"Browser"})};return function(t){var e=t.appId,n=c(void 0!==t.authMode?t.authMode:g.WithinHeaders,e,t.apiKey),i=A(r({hosts:[{url:"".concat(e,"-dsn.algolia.net"),accept:E.Read},{url:"".concat(e,".algolia.net"),accept:E.Write}].concat(l([{url:"".concat(e,"-1.algolianet.com")},{url:"".concat(e,"-2.algolianet.com")},{url:"".concat(e,"-3.algolianet.com")}]))},t,{headers:r({},n.headers(),{},{"content-type":"application/x-www-form-urlencoded"},{},t.headers),queryParameters:r({},n.queryParameters(),{},t.queryParameters)}));return p({transporter:i,appId:e,addAlgoliaAgent:function(t,e){i.userAgent.add({segment:t,version:e})},clearCache:function(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((function(){}))}},t.methods)}(r({},i,{},n,{methods:{search:st,searchForFacetValues:ot,multipleBatch:nt,multipleGetObjects:it,multipleQueries:st,copyIndex:V,copySettings:B,copySynonyms:K,copyRules:H,moveIndex:rt,listIndices:tt,getLogs:W,listClusters:$,multipleSearchForFacetValues:ot,getApiKey:z,addApiKey:q,listApiKeys:Q,updateApiKey:ht,deleteApiKey:F,restoreApiKey:ut,assignUserID:G,assignUserIDs:U,getUserID:Y,searchUserIDs:ct,listUserIDs:et,getTopUserIDs:Z,removeUserID:at,hasPendingMappings:J,initIndex:function(t){return function(e){return X(t)(e,{methods:{batch:ft,delete:_t,getObject:Nt,getObjects:Tt,saveObject:qt,saveObjects:Gt,search:Kt,searchForFacetValues:Ft,waitTask:Yt,setSettings:Zt,getSettings:Rt,partialUpdateObject:Dt,partialUpdateObjects:Lt,deleteObject:yt,deleteObjects:xt,deleteBy:vt,clearObjects:mt,browseObjects:lt,getObjectPosition:Ot,findObject:Mt,exists:It,saveSynonym:Ht,saveSynonyms:Bt,getSynonym:wt,searchSynonyms:Wt,browseSynonyms:dt,deleteSynonym:At,clearSynonyms:St,replaceAllObjects:Ct,replaceAllSynonyms:jt,searchRules:zt,getRule:bt,deleteRule:Pt,saveRule:Ut,saveRules:Vt,replaceAllRules:kt,browseRules:pt,clearRules:Et}})}},initAnalytics:function(){return function(t){return function(t){var e=t.region||"us",n=c(g.WithinHeaders,t.appId,t.apiKey),i=A(r({hosts:[{url:"analytics.".concat(e,".algolia.com")}]},t,{headers:r({},n.headers(),{},{"content-type":"application/json"},{},t.headers),queryParameters:r({},n.queryParameters(),{},t.queryParameters)}));return p({appId:t.appId,transporter:i},t.methods)}(r({},i,{},t,{methods:{addABTest:b,getABTest:w,getABTests:D,stopABTest:L,deleteABTest:R}}))}},initRecommendation:function(){return function(t){return function(t){var e=t.region||"us",n=c(g.WithinHeaders,t.appId,t.apiKey),i=A(r({hosts:[{url:"recommendation.".concat(e,".algolia.com")}]},t,{headers:r({},n.headers(),{},{"content-type":"application/json"},{},t.headers),queryParameters:r({},n.queryParameters(),{},t.queryParameters)}));return p({appId:t.appId,transporter:i},t.methods)}(r({},i,{},t,{methods:{getPersonalizationStrategy:C,setPersonalizationStrategy:k}}))}}}}))}return Qt.version="4.1.0",Qt}()},10435:function(t,e,r){!function(t){"use strict";function e(t){return 10===t||13===t||8232===t||8233===t||32===t||9===t||11===t||12===t||160===t||t>=5760&&At.indexOf(t)>=0}function r(t){return t>=48&&t<=57}function n(t){return t>=48&&t<=57||43===t||45===t||46===t}function i(t){this.index=0,this.path=t,this.max=t.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function s(t){for(;t.index<t.max&&e(t.path.charCodeAt(t.index));)t.index++}function o(t){var e,n=t.index,i=n,s=t.max,o=!1,a=!1,u=!1,c=!1;if(i>=s)t.err="SvgPath: missed param (at pos "+i+")";else if(43!==(e=t.path.charCodeAt(i))&&45!==e||(e=++i<s?t.path.charCodeAt(i):0),r(e)||46===e){if(46!==e){if(o=48===e,e=++i<s?t.path.charCodeAt(i):0,o&&i<s&&e&&r(e))return void(t.err="SvgPath: numbers started with `0` such as `09` are ilegal (at pos "+n+")");for(;i<s&&r(t.path.charCodeAt(i));)i++,a=!0;e=i<s?t.path.charCodeAt(i):0}if(46===e){for(c=!0,i++;r(t.path.charCodeAt(i));)i++,u=!0;e=i<s?t.path.charCodeAt(i):0}if(101===e||69===e){if(c&&!a&&!u)return void(t.err="SvgPath: invalid float exponent (at pos "+i+")");if(43!==(e=++i<s?t.path.charCodeAt(i):0)&&45!==e||i++,!(i<s&&r(t.path.charCodeAt(i))))return void(t.err="SvgPath: invalid float exponent (at pos "+i+")");for(;i<s&&r(t.path.charCodeAt(i));)i++}t.index=i,t.param=parseFloat(t.path.slice(n,i))+0}else t.err="SvgPath: param should start with 0..9 or `.` (at pos "+i+")"}function a(t){var e,r;r=(e=t.path[t.segmentStart]).toLowerCase();var n=t.data;if("m"===r&&n.length>2&&(t.result.push([e,n[0],n[1]]),n=n.slice(2),r="l",e="m"===e?"l":"L"),"r"===r)t.result.push([e].concat(n));else for(;n.length>=Pt[r]&&(t.result.push([e].concat(n.splice(0,Pt[r]))),Pt[r]););}function u(t){var e,r,i,u=t.max;if(t.segmentStart=t.index,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}(t.path.charCodeAt(t.index)))if(r=Pt[t.path[t.index].toLowerCase()],t.index++,s(t),t.data=[],r){for(e=!1;;){for(i=r;i>0;i--){if(o(t),t.err.length)return;t.data.push(t.param),s(t),e=!1,t.index<u&&44===t.path.charCodeAt(t.index)&&(t.index++,s(t),e=!0)}if(!e){if(t.index>=t.max)break;if(!n(t.path.charCodeAt(t.index)))break}}a(t)}else a(t);else t.err="SvgPath: bad command "+t.path[t.index]+" (at pos "+t.index+")"}function c(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function h(){if(!(this instanceof h))return new h;this.queue=[],this.cache=null}function f(t,e,r,n){var i=t*n-e*r<0?-1:1,s=(t*r+e*n)/(Math.sqrt(t*t+e*e)*Math.sqrt(t*t+e*e));return s>1&&(s=1),s<-1&&(s=-1),i*Math.acos(s)}function l(t,e,r,n,i,s,o,a,u,c){var h=c*(t-r)/2+u*(e-n)/2,l=-u*(t-r)/2+c*(e-n)/2,p=o*o,d=a*a,g=h*h,m=l*l,E=p*d-p*m-d*g;E<0&&(E=0),E/=p*m+d*g;var S=(E=Math.sqrt(E)*(i===s?-1:1))*o/a*l,v=E*-a/o*h,_=c*S-u*v+(t+r)/2,y=u*S+c*v+(e+n)/2,x=(h-S)/o,P=(l-v)/a,A=(-h-S)/o,I=(-l-v)/a,M=f(1,0,x,P),N=f(x,P,A,I);return 0===s&&N>0&&(N-=bt),1===s&&N<0&&(N+=bt),[_,y,M,N]}function p(t,e){var r=4/3*Math.tan(e/4),n=Math.cos(t),i=Math.sin(t),s=Math.cos(t+e),o=Math.sin(t+e);return[n,i,n-i*r,i+n*r,s+o*r,o-s*r,s,o]}function d(t,e,r){if(!(this instanceof d))return new d(t,e,r);this.rx=t,this.ry=e,this.ax=r}function g(t){if(!(this instanceof g))return new g(t);var e=It(t);this.segments=e.segments,this.err=e.err,this.__stack=[]}function m(t,e,r,n,i,s,o,a){this.a={x:t,y:e},this.b={x:r,y:n},this.c={x:i,y:s},this.d={x:o,y:a},null!=o&&null!=a?(this.getArcLength=M,this.getPoint=y,this.getDerivative=S):(this.getArcLength=x,this.getPoint=_,this.getDerivative=E),this.init()}function E(t,e,r){return{x:2*(1-r)*(t[1]-t[0])+2*r*(t[2]-t[1]),y:2*(1-r)*(e[1]-e[0])+2*r*(e[2]-e[1])}}function S(t,e,r){return _([3*(t[1]-t[0]),3*(t[2]-t[1]),3*(t[3]-t[2])],[3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],r)}function v(t,e,r,n,i){for(var s=1,o=t/e,a=(t-r(n,i,o))/e;s>.001;){var u=r(n,i,o+a),c=r(n,i,o-a),h=Math.abs(t-u)/e,f=Math.abs(t-c)/e;h<s?(s=h,o+=a):f<s?(s=f,o-=a):a/=2}return o}function _(t,e,r){return{x:(1-r)*(1-r)*t[0]+2*(1-r)*r*t[1]+r*r*t[2],y:(1-r)*(1-r)*e[0]+2*(1-r)*r*e[1]+r*r*e[2]}}function y(t,e,r){return{x:(1-r)*(1-r)*(1-r)*t[0]+3*(1-r)*(1-r)*r*t[1]+3*(1-r)*r*r*t[2]+r*r*r*t[3],y:(1-r)*(1-r)*(1-r)*e[0]+3*(1-r)*(1-r)*r*e[1]+3*(1-r)*r*r*e[2]+r*r*r*e[3]}}function x(t,e,r){void 0===r&&(r=1);var n=t[0]-2*t[1]+t[2],i=e[0]-2*e[1]+e[2],s=2*t[1]-2*t[0],o=2*e[1]-2*e[0],a=4*(n*n+i*i),u=4*(n*s+i*o),c=s*s+o*o;if(0===a)return r*Math.sqrt(Math.pow(t[2]-t[0],2)+Math.pow(e[2]-e[0],2));var h=u/(2*a),f=r+h,l=c/a-h*h;return Math.sqrt(a)/2*(f*Math.sqrt(f*f+l)-h*Math.sqrt(h*h+l)+l*Math.log(Math.abs((f+Math.sqrt(f*f+l))/(h+Math.sqrt(h*h+l)))))}function P(t,e){return Vt[t][e]}function A(t,e,r){var n,i,s,o=r.length-1;if(0===o)return 0;if(0===t){for(i=0,s=0;s<=o;s++)i+=P(o,s)*Math.pow(1-e,o-s)*Math.pow(e,s)*r[s];return i}for(n=new Array(o),s=0;s<o;s++)n[s]=o*(r[s+1]-r[s]);return A(t-1,e,n)}function I(t,e,r){var n=A(1,r,t),i=A(1,r,e),s=n*n+i*i;return Math.sqrt(s)}function M(t,e,r){var n,i,s,o;for(void 0===r&&(r=1),n=r/2,i=0,s=0;s<20;s++)o=n*Gt[20][s]+n,i+=Ut[20][s]*I(t,e,o);return n*i}function N(t,e,r,n){var i=t*r+e*n;return i>1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)}function O(t,e){var r=4/3*Math.tan(e/4),n=Math.cos(t),i=Math.sin(t),s=Math.cos(t+e),o=Math.sin(t+e);return[n,i,n-i*r,i+n*r,s+o*r,o-s*r,s,o]}function T(t,e,r,n,i,s,o,a,u){var c=0,h=[],f=[];Bt(t,e,r,n,i,s,o,a,u).forEach((function(t){var e=new qt(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),r=e.getTotalLength();c+=r,h.push(r),f.push(e)})),this.length=c,this.partialLengths=h,this.curves=f}function b(t,e,r,n){this.x0=t,this.x1=e,this.y0=r,this.y1=n}function R(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function w(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function D(t,e,r){var n=t.map((function(t,r){return function(t,e){return function(r){return t.map((function(t,n){return t+r*(e[n]-t)}))}}(t,e[r])}));return function(t){var e=n.map((function(e){return e(t)}));return r?q(e):e}}function L(t){return"number"==typeof t&&isFinite(t)}function C(t){return function(t){for(var e=0;e<t.length-2;e++){var r=t[e],n=t[e+1],i=t[e+2];if(r[0]*(n[1]-i[1])+n[0]*(i[1]-r[1])+i[0]*(r[1]-n[1]))return!0}return!1}(t)?yt(t):[(t[0][0]+t[t.length-1][0])/2,(t[0][1]+t[t.length-1][1])/2]}function k(t){return new Dt(t).abs()}function j(t){return t.toString().split("M").map((function(t,e){return t=t.trim(),e&&t?"M"+t:t})).filter((function(t){return t}))}function q(t){return"M"+t.join("L")+"Z"}function G(t,e){var r=k(t);return function(t){var e=t.segments||[],r=[];if(!e.length||"M"!==e[0][0])return!1;for(var n=0;n<e.length;n++){var i=e[n],s=i[0],o=i[1],a=i[2];if("M"===s&&n||"Z"===s)break;if("M"===s||"L"===s)r.push([o,a]);else if("H"===s)r.push([o,r[r.length-1][1]]);else{if("V"!==s)return!1;r.push([r[r.length-1][0],o])}}return!!r.length&&{ring:r}}(r)||function(t,e){var r,n,i=j(t)[0],s=[],o=3;if(!i)throw new TypeError(Wt);n=function(t){if("undefined"!=typeof window&&window&&window.document)try{var e=window.document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttributeNS(null,"d",t),e}catch(t){}return zt(t)}(i),r=n.getTotalLength(),e&&L(e)&&e>0&&(o=Math.max(o,Math.ceil(r/e)));for(var a=0;a<o;a++){var u=n.getPointAtLength(r*a/o);s.push([u.x,u.y])}return{ring:s,skipBisect:!0}}(r,e)}function U(t,e){for(var r=t.length+e,n=xt(t)/e,i=0,s=0,o=n/2;t.length<r;){var a=t[i],u=t[(i+1)%t.length],c=R(a,u);o<=s+c?(t.splice(i+1,0,c?w(a,u,(o-s)/c):a.slice(0)),o+=n):(s+=c,i++)}}function V(t,e){var r,n;if("string"==typeof t){var i=G(t,e);t=i.ring,n=i.skipBisect}else if(!Array.isArray(t))throw new TypeError(Wt);if(!function(t){return t.every((function(t){return Array.isArray(t)&&t.length>=2&&L(t[0])&&L(t[1])}))}(r=t.slice(0)))throw new TypeError(Wt);return r.length>1&&function(t,e){return R(t,e)<1e-9}(r[0],r[r.length-1])&&r.pop(),_t(r)>0&&r.reverse(),!n&&e&&L(e)&&e>0&&function(t,e){void 0===e&&(e=1/0);for(var r=0;r<t.length;r++)for(var n=t[r],i=r===t.length-1?t[0]:t[r+1];R(n,i)>e;)i=w(n,i,.5),t.splice(r+1,0,i)}(r,e),r}function H(t,e,r){var n;return U(t,(n=t.length-e.length)<0?-1*n:0),U(e,n>0?n:0),Yt(t,e),D(t,e,r)}function B(t,e,r){r=r||2;var n,i,s,o,a,u,c,h=e&&e.length,f=h?e[0]*r:t.length,l=K(t,0,f,r,!0),p=[];if(!l)return p;if(h&&(l=function(t,e,r,n){var i,s,o,a,u,c=[];for(i=0,s=e.length;i<s;i++)o=e[i]*n,a=i<s-1?e[i+1]*n:t.length,(u=K(t,o,a,n,!1))===u.next&&(u.steiner=!0),c.push(tt(u));for(c.sort(X),i=0;i<c.length;i++)Q(c[i],r),r=F(r,r.next);return r}(t,e,l,r)),t.length>80*r){n=s=t[0],i=o=t[1];for(var d=r;d<f;d+=r)(a=t[d])<n&&(n=a),(u=t[d+1])<i&&(i=u),a>s&&(s=a),u>o&&(o=u);c=Math.max(s-n,o-i)}return z(l,p,r,n,i,c),p}function K(t,e,r,n,i){var s,o;if(i===ft(t,e,r,n)>0)for(s=e;s<r;s+=n)o=ut(s,t[s],t[s+1],o);else for(s=r-n;s>=e;s-=n)o=ut(s,t[s],t[s+1],o);return o&&it(o,o.next)&&(ct(o),o=o.next),o}function F(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!it(n,n.next)&&0!==nt(n.prev,n,n.next))n=n.next;else{if(ct(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function z(t,e,r,n,i,s,o){if(t){!o&&s&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=$(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,s,o,a,u,c=1;do{for(r=t,t=null,s=null,o=0;r;){for(o++,n=r,a=0,e=0;e<c&&(a++,n=n.nextZ);e++);for(u=c;a>0||u>0&&n;)0===a?(i=n,n=n.nextZ,u--):0!==u&&n?r.z<=n.z?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,u--):(i=r,r=r.nextZ,a--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;r=n}s.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,s);for(var a,u,c=t;t.prev!==t.next;)if(a=t.prev,u=t.next,s?Z(t,n,i,s):W(t))e.push(a.i/r),e.push(t.i/r),e.push(u.i/r),ct(t),t=u.next,c=u.next;else if((t=u)===c){o?1===o?z(t=Y(t,e,r),e,r,n,i,s,2):2===o&&J(t,e,r,n,i,s):z(F(t),e,r,n,i,s,1);break}}}function W(t){var e=t.prev,r=t,n=t.next;if(nt(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(et(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&nt(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Z(t,e,r,n){var i=t.prev,s=t,o=t.next;if(nt(i,s,o)>=0)return!1;for(var a=i.x<s.x?i.x<o.x?i.x:o.x:s.x<o.x?s.x:o.x,u=i.y<s.y?i.y<o.y?i.y:o.y:s.y<o.y?s.y:o.y,c=i.x>s.x?i.x>o.x?i.x:o.x:s.x>o.x?s.x:o.x,h=i.y>s.y?i.y>o.y?i.y:o.y:s.y>o.y?s.y:o.y,f=$(a,u,e,r,n),l=$(c,h,e,r,n),p=t.nextZ;p&&p.z<=l;){if(p!==t.prev&&p!==t.next&&et(i.x,i.y,s.x,s.y,o.x,o.y,p.x,p.y)&&nt(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&et(i.x,i.y,s.x,s.y,o.x,o.y,p.x,p.y)&&nt(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function Y(t,e,r){var n=t;do{var i=n.prev,s=n.next.next;!it(i,s)&&st(i,n,n.next,s)&&ot(i,s)&&ot(s,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(s.i/r),ct(n),ct(n.next),n=t=s),n=n.next}while(n!==t);return n}function J(t,e,r,n,i,s){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&rt(o,a)){var u=at(o,a);return o=F(o,o.next),u=F(u,u.next),z(o,e,r,n,i,s),void z(u,e,r,n,i,s)}a=a.next}o=o.next}while(o!==t)}function X(t,e){return t.x-e.x}function Q(t,e){if(e=function(t,e){var r,n=e,i=t.x,s=t.y,o=-1/0;do{if(s<=n.y&&s>=n.next.y){var a=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>o){if(o=a,a===i){if(s===n.y)return n;if(s===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var u,c=r,h=r.x,f=r.y,l=1/0;for(n=r.next;n!==c;)i>=n.x&&n.x>=h&&et(s<f?i:o,s,h,f,s<f?o:i,s,n.x,n.y)&&((u=Math.abs(s-n.y)/(i-n.x))<l||u===l&&n.x>r.x)&&ot(n,t)&&(r=n,l=u),n=n.next;return r}(t,e)){var r=at(e,t);F(r,r.next)}}function $(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)/i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function tt(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function et(t,e,r,n,i,s,o,a){return(i-o)*(e-a)-(t-o)*(s-a)>=0&&(t-o)*(n-a)-(r-o)*(e-a)>=0&&(r-o)*(s-a)-(i-o)*(n-a)>=0}function rt(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&st(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&ot(t,e)&&ot(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,s=(t.y+e.y)/2;do{r.y>s!=r.next.y>s&&i<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function nt(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function it(t,e){return t.x===e.x&&t.y===e.y}function st(t,e,r,n){return!!(it(t,e)&&it(r,n)||it(t,n)&&it(r,e))||nt(t,e,r)>0!=nt(t,e,n)>0&&nt(r,n,t)>0!=nt(r,n,e)>0}function ot(t,e){return nt(t.prev,t,t.next)<0?nt(t,e,t.next)>=0&&nt(t,t.prev,e)>=0:nt(t,e,t.prev)<0||nt(t,t.next,e)<0}function at(t,e){var r=new ht(t.i,t.x,t.y),n=new ht(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,s.next=n,n.prev=s,n}function ut(t,e,r,n){var i=new ht(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ct(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ht(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ft(t,e,r,n){for(var i=0,s=e,o=r-n;s<r;s+=n)i+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return i}function lt(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,s=pt(t,e);return null==r&&null==n?{type:"Feature",properties:i,geometry:s}:null==n?{type:"Feature",id:r,properties:i,geometry:s}:{type:"Feature",id:r,bbox:n,properties:i,geometry:s}}function pt(t,e){function r(t,e){e.length&&e.pop();for(var r=u[t<0?~t:t],n=0,i=r.length;n<i;++n)e.push(a(r[n],n));t<0&&$t(e,i)}function n(t){return a(t)}function i(t){for(var e=[],n=0,i=t.length;n<i;++n)r(t[n],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=i(t);e.length<4;)e.push(e[0]);return e}function o(t){return t.map(s)}var a=Qt(t.transform),u=t.arcs;return function t(e){var r,s=e.type;switch(s){case"GeometryCollection":return{type:s,geometries:e.geometries.map(t)};case"Point":r=n(e.coordinates);break;case"MultiPoint":r=e.coordinates.map(n);break;case"LineString":r=i(e.arcs);break;case"MultiLineString":r=e.arcs.map(i);break;case"Polygon":r=o(e.arcs);break;case"MultiPolygon":r=e.arcs.map(o);break;default:return null}return{type:s,coordinates:r}}(e)}function dt(t,e){function r(t){t.forEach((function(e){e.forEach((function(e){(i[e=e<0?~e:e]||(i[e]=[])).push(t)}))})),s.push(t)}function n(e){return function(t){for(var e,r=-1,n=t.length,i=t[n-1],s=0;++r<n;)e=i,i=t[r],s+=e[0]*i[1]-e[1]*i[0];return Math.abs(s)}(pt(t,{type:"Polygon",arcs:[e]}).coordinates[0])}var i={},s=[],o=[];return e.forEach((function t(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"Polygon":r(e.arcs);break;case"MultiPolygon":e.arcs.forEach(r)}})),s.forEach((function(t){if(!t._){var e=[],r=[t];for(t._=1,o.push(e);t=r.pop();)e.push(t),t.forEach((function(t){t.forEach((function(t){i[t<0?~t:t].forEach((function(t){t._||(t._=1,r.push(t))}))}))}))}})),s.forEach((function(t){delete t._})),{type:"MultiPolygon",arcs:o.map((function(e){var r,s=[];if(e.forEach((function(t){t.forEach((function(t){t.forEach((function(t){i[t<0?~t:t].length<2&&s.push(t)}))}))})),(r=(s=ee(t,s)).length)>1)for(var o,a,u=1,c=n(s[0]);u<r;++u)(o=n(s[u]))>c&&(a=s[0],s[0]=s[u],s[u]=a,c=o);return s}))}}function gt(t,e,r){void 0===r&&(r={});var n=r.maxSegmentLength;void 0===n&&(n=10);var i=r.string;void 0===i&&(i=!0);var s=r.single;void 0===s&&(s=!1);var o=V(t,n);o.length<e.length+2&&U(o,e.length+2-o.length);var a,u=oe(o,e.length),c=e.map((function(t){return V(t,n)})),h="string"==typeof t&&t;return s&&!e.every((function(t){return"string"==typeof t}))||(a=e.slice(0)),mt(u,c,{match:!0,string:i,single:s,t0:h,t1:a})}function mt(t,e,r){void 0===r&&(r={});var n=r.string,i=r.single,s=r.t0,o=r.t1,a=r.match,u=a?ae(t,e):t.map((function(t,e){return e})),c=u.map((function(r,i){return H(t[r],e[i],n)}));if(a&&Array.isArray(s)&&(s=u.map((function(t){return s[t]}))),i&&n&&(Array.isArray(s)&&(s=s.join(" ")),Array.isArray(o)&&(o=o.join(" "))),i){var h=n?function(t){return c.map((function(e){return e(t)})).join(" ")}:function(t){return c.map((function(e){return e(t)}))};return n&&(s||o)?function(t){return t<1e-4&&s||1-t<1e-4&&o||h(t)}:h}return n?(s=Array.isArray(s)?s.map((function(t){return"string"==typeof t&&t})):[],o=Array.isArray(o)?o.map((function(t){return"string"==typeof t&&t})):[],c.map((function(t,e){return s[e]||o[e]?function(r){return r<1e-4&&s[e]||1-r<1e-4&&o[e]||t(r)}:t}))):c}function Et(t,e,r,n,i){return vt(function(t,e,r){return function(n){var i=C(n),s=xt(n.concat([n[0]])),o=Math.atan2(n[0][1]-i[1],n[0][0]-i[0]),a=0;return n.map((function(i,u){var c;return u&&(a+=R(i,n[u-1])),c=o+2*Math.PI*(s?a/s:u/n.length),[Math.cos(c)*r+t,Math.sin(c)*r+e]}))}}(t,e,r),n,function(t,e,r){var n=t-r+","+e,i="A"+r+","+r+",0,1,1,";return"M"+n+i+(t+r)+","+e+i+n+"Z"}(t,e,r),2*Math.PI*r,i)}function St(t,e,r,n,i,s){return vt(function(t,e,r,n){return function(i){var s=C(i),o=xt(i.concat([i[0]])),a=Math.atan2(i[0][1]-s[1],i[0][0]-s[0]),u=0;a<0&&(a=2*Math.PI+a);var c=a/(2*Math.PI);return i.map((function(s,a){a&&(u+=R(s,i[a-1]));var h=function(t){return t<=1/8?[1,.5+4*t]:t<=3/8?[1.5-4*t,1]:t<=5/8?[0,2.5-4*t]:t<=7/8?[4*t-2.5,0]:[1,4*t-3.5]}((c+(o?u/o:a/i.length))%1);return[t+h[0]*r,e+h[1]*n]}))}}(t,e,r,n),i,function(t,e,r,n){var i=t+r,s=e+n;return"M"+t+","+e+"L"+i+","+e+"L"+i+","+s+"L"+t+","+s+"Z"}(t,e,r,n),2*r+2*n,s)}function vt(t,e,r,n,i){void 0===i&&(i={});var s=i.maxSegmentLength;void 0===s&&(s=10);var o=i.string;void 0===o&&(o=!0);var a,u,c=V(e,s);return L(n)&&c.length<n/s&&U(c,Math.ceil(n/s-c.length)),a=t(c),u=D(a,c,o),o?function(t){return t<1e-4?r:u(t)}:u}var _t=function(t){for(var e,r=-1,n=t.length,i=t[n-1],s=0;++r<n;)e=i,i=t[r],s+=e[1]*i[0]-e[0]*i[1];return s/2},yt=function(t){for(var e,r,n=-1,i=t.length,s=0,o=0,a=t[i-1],u=0;++n<i;)e=a,a=t[n],u+=r=e[0]*a[1]-a[0]*e[1],s+=(e[0]+a[0])*r,o+=(e[1]+a[1])*r;return[s/(u*=3),o/u]},xt=function(t){for(var e,r,n=-1,i=t.length,s=t[i-1],o=s[0],a=s[1],u=0;++n<i;)e=o,r=a,e-=o=(s=t[n])[0],r-=a=s[1],u+=Math.sqrt(e*e+r*r);return u},Pt={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},At=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],It=function(t){var e=new i(t),r=e.max;for(s(e);e.index<r&&!e.err.length;)u(e);return e.err.length?e.result=[]:e.result.length&&("mM".indexOf(e.result[0][0])<0?(e.err="SvgPath: string should start with `M` or `m`",e.result=[]):e.result[0][0]="M"),{err:e.err,segments:e.result}};h.prototype.matrix=function(t){return 1===t[0]&&0===t[1]&&0===t[2]&&1===t[3]&&0===t[4]&&0===t[5]||(this.cache=null,this.queue.push(t)),this},h.prototype.translate=function(t,e){return 0===t&&0===e||(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},h.prototype.scale=function(t,e){return 1===t&&1===e||(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},h.prototype.rotate=function(t,e,r){var n,i,s;return 0!==t&&(this.translate(e,r),n=t*Math.PI/180,i=Math.cos(n),s=Math.sin(n),this.queue.push([i,s,-s,i,0,0]),this.cache=null,this.translate(-e,-r)),this},h.prototype.skewX=function(t){return 0!==t&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},h.prototype.skewY=function(t){return 0!==t&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},h.prototype.toArray=function(){var t=this;if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],1===this.queue.length)return this.cache;for(var e=1;e<this.queue.length;e++)t.cache=c(t.cache,t.queue[e]);return this.cache},h.prototype.calc=function(t,e,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),[t*(n=this.cache)[0]+e*n[2]+(r?0:n[4]),t*n[1]+e*n[3]+(r?0:n[5])]):[t,e]};var Mt=h,Nt={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},Ot=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,Tt=/[\s,]+/,bt=2*Math.PI,Rt=Math.PI/180;d.prototype.transform=function(t){var e=Math.cos(this.ax*Rt),r=Math.sin(this.ax*Rt),n=[this.rx*(t[0]*e+t[2]*r),this.rx*(t[1]*e+t[3]*r),this.ry*(-t[0]*r+t[2]*e),this.ry*(-t[1]*r+t[3]*e)],i=n[0]*n[0]+n[2]*n[2],s=n[1]*n[1]+n[3]*n[3],o=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),a=(i+s)/2;if(o<1e-10*a)return this.rx=this.ry=Math.sqrt(a),this.ax=0,this;var u=n[0]*n[1]+n[2]*n[3],c=a+(o=Math.sqrt(o))/2,h=a-o/2;return this.ax=Math.abs(u)<1e-10&&Math.abs(c-s)<1e-10?90:180*Math.atan(Math.abs(u)>Math.abs(c-s)?(c-i)/u:u/(c-s))/Math.PI,this.ax>=0?(this.rx=Math.sqrt(c),this.ry=Math.sqrt(h)):(this.ax+=90,this.rx=Math.sqrt(h),this.ry=Math.sqrt(c)),this},d.prototype.isDegenerate=function(){return this.rx<1e-10*this.ry||this.ry<1e-10*this.rx};var wt=d;g.prototype.__matrix=function(t){var e,r=this;t.queue.length&&this.iterate((function(n,i,s,o){var a,u,c,h;switch(n[0]){case"v":u=0===(a=t.calc(0,n[1],!0))[0]?["v",a[1]]:["l",a[0],a[1]];break;case"V":u=(a=t.calc(s,n[1],!1))[0]===t.calc(s,o,!1)[0]?["V",a[1]]:["L",a[0],a[1]];break;case"h":u=0===(a=t.calc(n[1],0,!0))[1]?["h",a[0]]:["l",a[0],a[1]];break;case"H":u=(a=t.calc(n[1],o,!1))[1]===t.calc(s,o,!1)[1]?["H",a[0]]:["L",a[0],a[1]];break;case"a":case"A":var f=t.toArray(),l=wt(n[1],n[2],n[3]).transform(f);if(f[0]*f[3]-f[1]*f[2]<0&&(n[5]=n[5]?"0":"1"),a=t.calc(n[6],n[7],"a"===n[0]),"A"===n[0]&&n[6]===s&&n[7]===o||"a"===n[0]&&0===n[6]&&0===n[7]){u=["a"===n[0]?"l":"L",a[0],a[1]];break}u=l.isDegenerate()?["a"===n[0]?"l":"L",a[0],a[1]]:[n[0],l.rx,l.ry,l.ax,n[4],n[5],a[0],a[1]];break;case"m":h=i>0,u=["m",(a=t.calc(n[1],n[2],h))[0],a[1]];break;default:for(u=[c=n[0]],h=c.toLowerCase()===c,e=1;e<n.length;e+=2)a=t.calc(n[e],n[e+1],h),u.push(a[0],a[1])}r.segments[i]=u}),!0)},g.prototype.__evaluateStack=function(){var t,e;if(this.__stack.length){if(1===this.__stack.length)return this.__matrix(this.__stack[0]),void(this.__stack=[]);for(t=Mt(),e=this.__stack.length;--e>=0;)t.matrix(this.__stack[e].toArray());this.__matrix(t),this.__stack=[]}},g.prototype.toString=function(){var t,e,r=this,n=[];this.__evaluateStack();for(var i=0;i<this.segments.length;i++)e=r.segments[i][0],t=i>0&&"m"!==e&&"M"!==e&&e===r.segments[i-1][0],n=n.concat(t?r.segments[i].slice(1):r.segments[i]);return n.join(" ").replace(/ ?([achlmqrstvz]) ?/gi,"$1").replace(/ \-/g,"-").replace(/zm/g,"z m")},g.prototype.translate=function(t,e){return this.__stack.push(Mt().translate(t,e||0)),this},g.prototype.scale=function(t,e){return this.__stack.push(Mt().scale(t,e||0===e?e:t)),this},g.prototype.rotate=function(t,e,r){return this.__stack.push(Mt().rotate(t,e||0,r||0)),this},g.prototype.skewX=function(t){return this.__stack.push(Mt().skewX(t)),this},g.prototype.skewY=function(t){return this.__stack.push(Mt().skewY(t)),this},g.prototype.matrix=function(t){return this.__stack.push(Mt().matrix(t)),this},g.prototype.transform=function(t){return t.trim()?(this.__stack.push(function(t){var e,r,n=new Mt;return t.split(Ot).forEach((function(t){if(t.length){if(void 0!==Nt[t])return void(e=t);switch(r=t.split(Tt).map((function(t){return+t||0})),e){case"matrix":return void(6===r.length&&n.matrix(r));case"scale":return void(1===r.length?n.scale(r[0],r[0]):2===r.length&&n.scale(r[0],r[1]));case"rotate":return void(1===r.length?n.rotate(r[0],0,0):3===r.length&&n.rotate(r[0],r[1],r[2]));case"translate":return void(1===r.length?n.translate(r[0],0):2===r.length&&n.translate(r[0],r[1]));case"skewX":return void(1===r.length&&n.skewX(r[0]));case"skewY":return void(1===r.length&&n.skewY(r[0]))}}})),n}(t)),this):this},g.prototype.round=function(t){var e,r=0,n=0,i=0,s=0;return t=t||0,this.__evaluateStack(),this.segments.forEach((function(o){var a=o[0].toLowerCase()===o[0];switch(o[0]){case"H":case"h":return a&&(o[1]+=i),i=o[1]-o[1].toFixed(t),void(o[1]=+o[1].toFixed(t));case"V":case"v":return a&&(o[1]+=s),s=o[1]-o[1].toFixed(t),void(o[1]=+o[1].toFixed(t));case"Z":case"z":return i=r,void(s=n);case"M":case"m":return a&&(o[1]+=i,o[2]+=s),i=o[1]-o[1].toFixed(t),s=o[2]-o[2].toFixed(t),r=i,n=s,o[1]=+o[1].toFixed(t),void(o[2]=+o[2].toFixed(t));case"A":case"a":return a&&(o[6]+=i,o[7]+=s),i=o[6]-o[6].toFixed(t),s=o[7]-o[7].toFixed(t),o[1]=+o[1].toFixed(t),o[2]=+o[2].toFixed(t),o[3]=+o[3].toFixed(t+2),o[6]=+o[6].toFixed(t),void(o[7]=+o[7].toFixed(t));default:return e=o.length,a&&(o[e-2]+=i,o[e-1]+=s),i=o[e-2]-o[e-2].toFixed(t),s=o[e-1]-o[e-1].toFixed(t),void o.forEach((function(e,r){r&&(o[r]=+o[r].toFixed(t))}))}})),this},g.prototype.iterate=function(t,e){var r,n,i,s=this.segments,o={},a=!1,u=0,c=0,h=0,f=0;if(e||this.__evaluateStack(),s.forEach((function(e,r){var n=t(e,r,u,c);Array.isArray(n)&&(o[r]=n,a=!0);var i=e[0]===e[0].toLowerCase();switch(e[0]){case"m":case"M":return u=e[1]+(i?u:0),c=e[2]+(i?c:0),h=u,void(f=c);case"h":case"H":return void(u=e[1]+(i?u:0));case"v":case"V":return void(c=e[1]+(i?c:0));case"z":case"Z":return u=h,void(c=f);default:u=e[e.length-2]+(i?u:0),c=e[e.length-1]+(i?c:0)}})),!a)return this;for(i=[],r=0;r<s.length;r++)if(void 0!==o[r])for(n=0;n<o[r].length;n++)i.push(o[r][n]);else i.push(s[r]);return this.segments=i,this},g.prototype.abs=function(){return this.iterate((function(t,e,r,n){var i,s=t[0],o=s.toUpperCase();if(s!==o)switch(t[0]=o,s){case"v":return void(t[1]+=n);case"a":return t[6]+=r,void(t[7]+=n);default:for(i=1;i<t.length;i++)t[i]+=i%2?r:n}}),!0),this},g.prototype.rel=function(){return this.iterate((function(t,e,r,n){var i,s=t[0],o=s.toLowerCase();if(s!==o&&(0!==e||"M"!==s))switch(t[0]=o,s){case"V":return void(t[1]-=n);case"A":return t[6]-=r,void(t[7]-=n);default:for(i=1;i<t.length;i++)t[i]-=i%2?r:n}}),!0),this},g.prototype.unarc=function(){return this.iterate((function(t,e,r,n){var i,s,o,a=[],u=t[0];return"A"!==u&&"a"!==u?null:("a"===u?(s=r+t[6],o=n+t[7]):(s=t[6],o=t[7]),0===(i=function(t,e,r,n,i,s,o,a,u){var c=Math.sin(u*bt/360),h=Math.cos(u*bt/360),f=h*(t-r)/2+c*(e-n)/2,d=-c*(t-r)/2+h*(e-n)/2;if(0===f&&0===d)return[];if(0===o||0===a)return[];o=Math.abs(o),a=Math.abs(a);var g=f*f/(o*o)+d*d/(a*a);g>1&&(o*=Math.sqrt(g),a*=Math.sqrt(g));var m=l(t,e,r,n,i,s,o,a,c,h),E=[],S=m[2],v=m[3],_=Math.max(Math.ceil(Math.abs(v)/(bt/4)),1);v/=_;for(var y=0;y<_;y++)E.push(p(S,v)),S+=v;return E.map((function(t){for(var e=0;e<t.length;e+=2){var r=t[e+0],n=t[e+1],i=h*(r*=o)-c*(n*=a),s=c*r+h*n;t[e+0]=i+m[0],t[e+1]=s+m[1]}return t}))}(r,n,s,o,t[4],t[5],t[1],t[2],t[3])).length?[["a"===t[0]?"l":"L",t[6],t[7]]]:(i.forEach((function(t){a.push(["C",t[2],t[3],t[4],t[5],t[6],t[7]])})),a))})),this},g.prototype.unshort=function(){var t,e,r,n,i,s=this.segments;return this.iterate((function(o,a,u,c){var h,f=o[0],l=f.toUpperCase();a&&("T"===l?(h="t"===f,"Q"===(r=s[a-1])[0]?(t=r[1]-u,e=r[2]-c):"q"===r[0]?(t=r[1]-r[3],e=r[2]-r[4]):(t=0,e=0),n=-t,i=-e,h||(n+=u,i+=c),s[a]=[h?"q":"Q",n,i,o[1],o[2]]):"S"===l&&(h="s"===f,"C"===(r=s[a-1])[0]?(t=r[3]-u,e=r[4]-c):"c"===r[0]?(t=r[3]-r[5],e=r[4]-r[6]):(t=0,e=0),n=-t,i=-e,h||(n+=u,i+=c),s[a]=[h?"c":"C",n,i,o[1],o[2],o[3],o[4]]))})),this};var Dt=g,Lt={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Ct=/([astvzqmhlc])([^astvzqmhlc]*)/gi,kt=function(t){var e=[];return t.replace(Ct,(function(t,r,n){var i=r.toLowerCase();for(n=function(t){var e=t.match(jt);return e?e.map(Number):[]}(n),"m"===i&&n.length>2&&(e.push([r].concat(n.splice(0,2))),i="l",r="m"===r?"l":"L");n.length>=0;){if(n.length===Lt[i])return n.unshift(r),e.push(n);if(n.length<Lt[i])throw new Error("malformed path data");e.push([r].concat(n.splice(0,Lt[i])))}})),e},jt=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,qt=function(t,e,r,n,i,s,o,a){return new m(t,e,r,n,i,s,o,a)};m.prototype={constructor:m,init:function(){this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y])},getTotalLength:function(){return this.length},getPointAtLength:function(t){var e=v(t,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]);return this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e)},getTangentAtLength:function(t){var e=v(t,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),r=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e),n=Math.sqrt(r.x*r.x+r.y*r.y);return n>0?{x:r.x/n,y:r.y/n}:{x:0,y:0}},getPropertiesAtLength:function(t){var e,r=v(t,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),n=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],r),i=Math.sqrt(n.x*n.x+n.y*n.y);e=i>0?{x:n.x/i,y:n.y/i}:{x:0,y:0};var s=this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],r);return{x:s.x,y:s.y,tangentX:e.x,tangentY:e.y}}};var Gt=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],Ut=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],Vt=[[1],[1,1],[1,2,1],[1,3,3,1]],Ht=2*Math.PI,Bt=function(t,e,r,n,i,s,o,a,u){var c=Math.sin(i*Ht/360),h=Math.cos(i*Ht/360),f=h*(t-a)/2+c*(e-u)/2,l=-c*(t-a)/2+h*(e-u)/2;if(0===f&&0===l)return[];if(0===r||0===n)return[];r=Math.abs(r),n=Math.abs(n);var p=f*f/(r*r)+l*l/(n*n);p>1&&(r*=Math.sqrt(p),n*=Math.sqrt(p));var d=function(t,e,r,n,i,s,o,a,u,c){var h=c*(t-r)/2+u*(e-n)/2,f=-u*(t-r)/2+c*(e-n)/2,l=o*o,p=a*a,d=h*h,g=f*f,m=l*p-l*g-p*d;m<0&&(m=0),m/=l*g+p*d;var E=(m=Math.sqrt(m)*(i===s?-1:1))*o/a*f,S=m*-a/o*h,v=c*E-u*S+(t+r)/2,_=u*E+c*S+(e+n)/2,y=(h-E)/o,x=(f-S)/a,P=(-h-E)/o,A=(-f-S)/a,I=N(1,0,y,x),M=N(y,x,P,A);return 0===s&&M>0&&(M-=Ht),1===s&&M<0&&(M+=Ht),[v,_,I,M]}(t,e,a,u,s,o,r,n,c,h),g=[],m=d[2],E=d[3],S=Math.max(Math.ceil(Math.abs(E)/(Ht/4)),1);E/=S;for(var v=0;v<S;v++)g.push(O(m,E)),m+=E;return g.map((function(t){for(var e=0;e<t.length;e+=2){var i=t[e+0],s=t[e+1],o=h*(i*=r)-c*(s*=n),a=c*i+h*s;t[e+0]=o+d[0],t[e+1]=a+d[1]}return t}))},Kt=function(t,e,r,n,i,s,o,a,u){return new T(t,e,r,n,i,s,o,a,u)};T.prototype={constructor:T,init:function(){},getTotalLength:function(){return this.length},getPointAtLength:function(t){t<0?t=0:t>this.length&&(t=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=t&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var r=0,n=0;n<e;n++)r+=this.partialLengths[n];return this.curves[e].getPointAtLength(t-r)},getTangentAtLength:function(t){t<0?t=0:t>this.length&&(t=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=t&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var r=0,n=0;n<e;n++)r+=this.partialLengths[n];return this.curves[e].getTangentAtLength(t-r)},getPropertiesAtLength:function(t){var e=this.getTangentAtLength(t),r=this.getPointAtLength(t);return{x:r.x,y:r.y,tangentX:e.x,tangentY:e.y}}};var Ft=function(t,e,r,n){return new b(t,e,r,n)};b.prototype.getTotalLength=function(){return Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2))},b.prototype.getPointAtLength=function(t){var e=t/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),r=(this.x1-this.x0)*e,n=(this.y1-this.y0)*e;return{x:this.x0+r,y:this.y0+n}},b.prototype.getTangentAtLength=function(){var t=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/t,y:(this.y1-this.y0)/t}},b.prototype.getPropertiesAtLength=function(t){var e=this.getPointAtLength(t),r=this.getTangentAtLength();return{x:e.x,y:e.y,tangentX:r.x,tangentY:r.y}};var zt=function(t){function e(t){if(!t)return null;for(var s,o=kt(t),a=[0,0],u=[0,0],c=0;c<o.length;c++)"M"===o[c][0]?(a=[o[c][1],o[c][2]],i.push(null)):"m"===o[c][0]?(a=[o[c][1]+a[0],o[c][2]+a[1]],i.push(null)):"L"===o[c][0]?(r+=Math.sqrt(Math.pow(a[0]-o[c][1],2)+Math.pow(a[1]-o[c][2],2)),i.push(new Ft(a[0],o[c][1],a[1],o[c][2])),a=[o[c][1],o[c][2]]):"l"===o[c][0]?(r+=Math.sqrt(Math.pow(o[c][1],2)+Math.pow(o[c][2],2)),i.push(new Ft(a[0],o[c][1]+a[0],a[1],o[c][2]+a[1])),a=[o[c][1]+a[0],o[c][2]+a[1]]):"H"===o[c][0]?(r+=Math.abs(a[0]-o[c][1]),i.push(new Ft(a[0],o[c][1],a[1],a[1])),a[0]=o[c][1]):"h"===o[c][0]?(r+=Math.abs(o[c][1]),i.push(new Ft(a[0],a[0]+o[c][1],a[1],a[1])),a[0]=o[c][1]+a[0]):"V"===o[c][0]?(r+=Math.abs(a[1]-o[c][1]),i.push(new Ft(a[0],a[0],a[1],o[c][1])),a[1]=o[c][1]):"v"===o[c][0]?(r+=Math.abs(o[c][1]),i.push(new Ft(a[0],a[0],a[1],a[1]+o[c][1])),a[1]=o[c][1]+a[1]):"z"===o[c][0]||"Z"===o[c][0]?(r+=Math.sqrt(Math.pow(o[0][1]-a[0],2)+Math.pow(o[0][2]-a[1],2)),i.push(new Ft(a[0],o[0][1],a[1],o[0][2])),a=[o[0][1],o[0][2]]):"C"===o[c][0]?(s=new qt(a[0],a[1],o[c][1],o[c][2],o[c][3],o[c][4],o[c][5],o[c][6]),r+=s.getTotalLength(),a=[o[c][5],o[c][6]],i.push(s)):"c"===o[c][0]?(s=new qt(a[0],a[1],a[0]+o[c][1],a[1]+o[c][2],a[0]+o[c][3],a[1]+o[c][4],a[0]+o[c][5],a[1]+o[c][6]),r+=s.getTotalLength(),a=[o[c][5]+a[0],o[c][6]+a[1]],i.push(s)):"S"===o[c][0]?(s=c>0&&["C","c","S","s"].indexOf(o[c-1][0])>-1?new qt(a[0],a[1],2*a[0]-o[c-1][o[c-1].length-4],2*a[1]-o[c-1][o[c-1].length-3],o[c][1],o[c][2],o[c][3],o[c][4]):new qt(a[0],a[1],a[0],a[1],o[c][1],o[c][2],o[c][3],o[c][4]),r+=s.getTotalLength(),a=[o[c][3],o[c][4]],i.push(s)):"s"===o[c][0]?(s=c>0&&["C","c","S","s"].indexOf(o[c-1][0])>-1?new qt(a[0],a[1],a[0]+s.d.x-s.c.x,a[1]+s.d.y-s.c.y,a[0]+o[c][1],a[1]+o[c][2],a[0]+o[c][3],a[1]+o[c][4]):new qt(a[0],a[1],a[0],a[1],a[0]+o[c][1],a[1]+o[c][2],a[0]+o[c][3],a[1]+o[c][4]),r+=s.getTotalLength(),a=[o[c][3]+a[0],o[c][4]+a[1]],i.push(s)):"Q"===o[c][0]?(s=new qt(a[0],a[1],o[c][1],o[c][2],o[c][3],o[c][4]),r+=s.getTotalLength(),i.push(s),a=[o[c][3],o[c][4]],u=[o[c][1],o[c][2]]):"q"===o[c][0]?(s=new qt(a[0],a[1],a[0]+o[c][1],a[1]+o[c][2],a[0]+o[c][3],a[1]+o[c][4]),r+=s.getTotalLength(),u=[a[0]+o[c][1],a[1]+o[c][2]],a=[o[c][3]+a[0],o[c][4]+a[1]],i.push(s)):"T"===o[c][0]?(s=c>0&&["Q","q","T","t"].indexOf(o[c-1][0])>-1?new qt(a[0],a[1],2*a[0]-u[0],2*a[1]-u[1],o[c][1],o[c][2]):new Ft(a[0],o[c][1],a[1],o[c][2]),i.push(s),r+=s.getTotalLength(),u=[2*a[0]-u[0],2*a[1]-u[1]],a=[o[c][1],o[c][2]]):"t"===o[c][0]?(s=c>0&&["Q","q","T","t"].indexOf(o[c-1][0])>-1?new qt(a[0],a[1],2*a[0]-u[0],2*a[1]-u[1],a[0]+o[c][1],a[1]+o[c][2]):new Ft(a[0],a[0]+o[c][1],a[1],a[1]+o[c][2]),r+=s.getTotalLength(),u=[2*a[0]-u[0],2*a[1]-u[1]],a=[o[c][1]+a[0],o[c][2]+a[0]],i.push(s)):"A"===o[c][0]?(s=new Kt(a[0],a[1],o[c][1],o[c][2],o[c][3],o[c][4],o[c][5],o[c][6],o[c][7]),r+=s.getTotalLength(),a=[o[c][6],o[c][7]],i.push(s)):"a"===o[c][0]&&(s=new Kt(a[0],a[1],o[c][1],o[c][2],o[c][3],o[c][4],o[c][5],a[0]+o[c][6],a[1]+o[c][7]),r+=s.getTotalLength(),a=[a[0]+o[c][6],a[1]+o[c][7]],i.push(s)),n.push(r);return e}var r=0,n=[],i=[];e.getTotalLength=function(){return r},e.getPointAtLength=function(t){var e=s(t);return i[e.i].getPointAtLength(e.fraction)},e.getTangentAtLength=function(t){var e=s(t);return i[e.i].getTangentAtLength(e.fraction)},e.getPropertiesAtLength=function(t){var e=s(t);return i[e.i].getPropertiesAtLength(e.fraction)};var s=function(t){t<0?t=0:t>r&&(t=r);for(var e=n.length-1;n[e]>=t&&n[e]>0;)e--;return e++,{fraction:t-n[e-1],i:e}};return e(t)},Wt='All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).\nExample valid ways of supplying a shape would be:\n[[0, 0], [10, 0], [10, 10]]\n"M0,0 L10,0 L10,10Z"\n',Zt="flubber.all() expects two arrays of equal length as arguments. Each element in both arrays should be an array of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).",Yt=function(t,e){for(var r,n,i,s=t.length,o=1/0,a=0;a<s;a++)!function(i){n=0,e.forEach((function(e,r){var o=R(t[(i+r)%s],e);n+=o*o})),n<o&&(o=n,r=i)}(a);r&&(i=t.splice(0,r),t.splice.apply(t,[t.length,0].concat(i)))},Jt=B;B.deviation=function(t,e,r,n){var i=e&&e.length,s=i?e[0]*r:t.length,o=Math.abs(ft(t,0,s,r));if(i)for(var a=0,u=e.length;a<u;a++){var c=e[a]*r,h=a<u-1?e[a+1]*r:t.length;o-=Math.abs(ft(t,c,h,r))}var f=0;for(a=0;a<n.length;a+=3){var l=n[a]*r,p=n[a+1]*r,d=n[a+2]*r;f+=Math.abs((t[l]-t[d])*(t[p+1]-t[l+1])-(t[l]-t[p])*(t[d+1]-t[l+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},B.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var s=0;s<t[i].length;s++)for(var o=0;o<e;o++)r.vertices.push(t[i][s][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r};var Xt=function(t){return t},Qt=function(t){if(null==t)return Xt;var e,r,n=t.scale[0],i=t.scale[1],s=t.translate[0],o=t.translate[1];return function(t,a){a||(e=r=0);var u=2,c=t.length,h=new Array(c);for(h[0]=(e+=t[0])*n+s,h[1]=(r+=t[1])*i+o;u<c;)h[u]=t[u],++u;return h}},$t=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r},te=function(t,e){return"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return lt(t,e)}))}:lt(t,e)},ee=function(t,e){function r(e){var r,n=t.arcs[e<0?~e:e],i=n[0];return t.transform?(r=[0,0],n.forEach((function(t){r[0]+=t[0],r[1]+=t[1]}))):r=n[n.length-1],e<0?[r,i]:[i,r]}function n(t,e){for(var r in t){var n=t[r];delete e[n.start],delete n.start,delete n.end,n.forEach((function(t){i[t<0?~t:t]=1})),a.push(n)}}var i={},s={},o={},a=[],u=-1;return e.forEach((function(r,n){var i,s=t.arcs[r<0?~r:r];s.length<3&&!s[1][0]&&!s[1][1]&&(i=e[++u],e[u]=r,e[n]=i)})),e.forEach((function(t){var e,n,i=r(t),a=i[0],u=i[1];if(e=o[a])if(delete o[e.end],e.push(t),e.end=u,n=s[u]){delete s[n.start];var c=n===e?e:e.concat(n);s[c.start=e.start]=o[c.end=n.end]=c}else s[e.start]=o[e.end]=e;else if(e=s[u])if(delete s[e.start],e.unshift(t),e.start=a,n=o[a]){delete o[n.end];var h=n===e?e:n.concat(e);s[h.start=n.start]=o[h.end=e.end]=h}else s[e.start]=o[e.end]=e;else s[(e=[t]).start=a]=o[e.end=u]=e})),n(o,s),n(s,o),e.forEach((function(t){i[t<0?~t:t]||a.push([t])})),a},re=function(t,e){for(var r=0,n=t.length;r<n;){var i=r+n>>>1;t[i]<e?r=i+1:n=i}return r},ne=function(t){function e(t,e){t.forEach((function(t){t<0&&(t=~t);var r=n[t];r?r.push(e):n[t]=[e]}))}function r(t,r){t.forEach((function(t){e(t,r)}))}var n={},i=t.map((function(){return[]})),s={LineString:e,MultiLineString:r,Polygon:r,MultiPolygon:function(t,e){t.forEach((function(t){r(t,e)}))}};for(var o in t.forEach((function t(e,r){"GeometryCollection"===e.type?e.geometries.forEach((function(e){t(e,r)})):e.type in s&&s[e.type](e.arcs,r)})),n)for(var a=n[o],u=a.length,c=0;c<u;++c)for(var h=c+1;h<u;++h){var f,l=a[c],p=a[h];(f=i[l])[o=re(f,p)]!==p&&f.splice(o,0,p),(f=i[p])[o=re(f,l)]!==l&&f.splice(o,0,l)}return i},ie=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},se=function(t){return 1===t.length&&(t=function(t){return function(e,r){return ie(t(e),r)}}(t)),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var s=n+i>>>1;t(e[s],r)<0?n=s+1:i=s}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var s=n+i>>>1;t(e[s],r)>0?i=s:n=s+1}return n}}},oe=(se(ie).right,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2),function(t,e){return function(t,e){for(var r=t.objects.triangles.geometries,n=se((function(t){return t.area})).left;r.length>e;)!function(){var e=r[0],i=ne(r)[0][0],s=r[i],o=dt(t,[e,s]);o.area=e.area+s.area,o.type="Polygon",o.arcs=o.arcs[0],r.splice(i,1),r.shift(),r.splice(n(r,o.area),0,o)}();if(e>r.length)throw new RangeError("Can't collapse topology into "+e+" pieces.");return te(t,t.objects.triangles).features.map((function(t){return t.geometry.coordinates[0].pop(),t.geometry.coordinates[0]}))}(function(t,e){var r={},n={type:"Topology",objects:{triangles:{type:"GeometryCollection",geometries:[]}},arcs:[]};return t.forEach((function(t){var i=[];t.forEach((function(t,s){var o=t[0]<t[1]?t.join(","):t[1]+","+t[0],a=t.map((function(t){return e[t]}));o in r?i.push(~r[o]):(i.push(r[o]=n.arcs.length),n.arcs.push(a))})),n.objects.triangles.geometries.push({type:"Polygon",area:Math.abs(_t(t.map((function(t){return e[t[0]]})))),arcs:[i]})})),n.objects.triangles.geometries.sort((function(t,e){return t.area-e.area})),n}(function(t){for(var e=Jt(t.reduce((function(t,e){return t.concat([e[0]],[e[1]])}),[])),r=[],n=0,i=e.length;n<i;n+=3)r.push([[e[n],e[n+1]],[e[n+1],e[n+2]],[e[n+2],e[n]]]);return r}(t),t),e)}),ae=function(t,e){if(t.length>8)return t.map((function(t,e){return e}));var r=t.map((function(t){return e.map((function(e){return function(t,e){var r=R(C(t),C(e));return r*r}(t,e)}))}));return function(t,e,r){var n=1/0,i=t.map((function(t,e){return e}));return function t(e,s,o){void 0===s&&(s=[]),void 0===o&&(o=0);for(var a=0;a<e.length;a++){var u=e.splice(a,1),c=r[u[0]][s.length];o+c<n&&(e.length?t(e.slice(),s.concat(u),o+c):(n=o+c,i=s.concat(u))),e.length&&e.splice(a,0,u[0])}}(i),i}(t,0,r)};t.interpolate=function(t,e,r){void 0===r&&(r={});var n=r.maxSegmentLength;void 0===n&&(n=10);var i=r.string;void 0===i&&(i=!0);var s=H(V(t,n),V(e,n),i);return!i||"string"!=typeof t&&"string"!=typeof e?s:function(r){return r<1e-4&&"string"==typeof t?t:1-r<1e-4&&"string"==typeof e?e:s(r)}},t.separate=gt,t.combine=function(t,e,r){void 0===r&&(r={});var n=r.maxSegmentLength;void 0===n&&(n=10);var i=r.string;void 0===i&&(i=!0);var s=r.single;void 0===s&&(s=!1);var o=gt(e,t,{maxSegmentLength:n,string:i,single:s});return s?function(t){return o(1-t)}:o.map((function(t){return function(e){return t(1-e)}}))},t.interpolateAll=function(t,e,r){void 0===r&&(r={});var n=r.maxSegmentLength;void 0===n&&(n=10);var i=r.string;void 0===i&&(i=!0);var s=r.single;if(void 0===s&&(s=!1),!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length||!t.length)throw new TypeError(Zt);var o,a,u=function(t){return V(t,n)},c=t.map(u),h=e.map(u);return s?(t.every((function(t){return"string"==typeof t}))&&(o=t.slice(0)),e.every((function(t){return"string"==typeof t}))&&(a=e.slice(0))):(o=t.slice(0),a=e.slice(0)),mt(c,h,{string:i,single:s,t0:o,t1:a,match:!1})},t.splitPathString=function(t){return j(k(t))},t.toPathString=q,t.fromCircle=Et,t.toCircle=function(t,e,r,n,i){var s=Et(e,r,n,t,i);return function(t){return s(1-t)}},t.fromRect=St,t.toRect=function(t,e,r,n,i,s){var o=St(e,r,n,i,t,s);return function(t){return o(1-t)}},Object.defineProperty(t,"__esModule",{value:!0})}(e)},10436:function(t,e,r){var n=r(10437),i=r(11257),s=r(11258),o=parseFloat,a=Math.min,u=Math.random;t.exports=function(t,e,r){if(r&&"boolean"!=typeof r&&i(t,e,r)&&(e=r=void 0),void 0===r&&("boolean"==typeof e?(r=e,e=void 0):"boolean"==typeof t&&(r=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=s(t),void 0===e?(e=t,t=0):e=s(e)),t>e){var c=t;t=e,e=c}if(r||t%1||e%1){var h=u();return a(t+h*(e-t+o("1e-"+((h+"").length-1))),e)}return n(t,e)}},10437:function(t,e){var r=Math.floor,n=Math.random;t.exports=function(t,e){return t+r(n()*(e-t+1))}},10475:function(t,e,r){var n=r(11495),i=r(11498),s=r(11499);t.exports=function(t,e,r,o,a,u){var c=1&r,h=t.length,f=e.length;if(h!=f&&!(c&&f>h))return!1;var l=u.get(t);if(l&&u.get(e))return l==e;var p=-1,d=!0,g=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++p<h;){var m=t[p],E=e[p];if(o)var S=c?o(E,m,p,e,t,u):o(m,E,p,t,e,u);if(void 0!==S){if(S)continue;d=!1;break}if(g){if(!i(e,(function(t,e){if(!s(g,e)&&(m===t||a(m,t,r,o,u)))return g.push(e)}))){d=!1;break}}else if(m!==E&&!a(m,E,r,o,u)){d=!1;break}}return u.delete(t),u.delete(e),d}},11061:function(t,e,r){var n=r(1289),i=r(11062);t.exports=function(t){return i(n(t).toLowerCase())}},11062:function(t,e,r){var n=r(11063)("toUpperCase");t.exports=n},11063:function(t,e,r){var n=r(11064),i=r(10381),s=r(11065),o=r(1289);t.exports=function(t){return function(e){e=o(e);var r=i(e)?s(e):void 0,a=r?r[0]:e.charAt(0),u=r?n(r,1).join(""):e.slice(1);return a[t]()+u}}},11064:function(t,e,r){var n=r(10338);t.exports=function(t,e,r){var i=t.length;return r=void 0===r?i:r,!e&&r>=i?t:n(t,e,r)}},11065:function(t,e,r){var n=r(11066),i=r(10381),s=r(11067);t.exports=function(t){return i(t)?s(t):n(t)}},11066:function(t,e){t.exports=function(t){return t.split("")}},11067:function(t,e){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",s="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[s,o,a].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),h="(?:"+[s+n+"?",n,o,a,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+h+c,"g");t.exports=function(t){return t.match(f)||[]}},11068:function(t,e,r){var n=r(11069),i=r(11070),s=r(11073),o=RegExp("['’]","g");t.exports=function(t){return function(e){return n(s(i(e).replace(o,"")),t,"")}}},11069:function(t,e){t.exports=function(t,e,r,n){var i=-1,s=null==t?0:t.length;for(n&&s&&(r=t[++i]);++i<s;)r=e(r,t[i],i,t);return r}},11070:function(t,e,r){var n=r(11071),i=r(1289),s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(t){return(t=i(t))&&t.replace(s,n).replace(o,"")}},11071:function(t,e,r){var n=r(11072)({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});t.exports=n},11072:function(t,e){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},11073:function(t,e,r){var n=r(11074),i=r(11075),s=r(1289),o=r(11076);t.exports=function(t,e,r){return t=s(t),void 0===(e=r?void 0:e)?i(t)?o(t):n(t):t.match(e)||[]}},11074:function(t,e){var r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(t){return t.match(r)||[]}},11075:function(t,e){var r=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(t){return r.test(t)}},11076:function(t,e){var r="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",n="["+r+"]",i="\\d+",s="[\\u2700-\\u27bf]",o="[a-z\\xdf-\\xf6\\xf8-\\xff]",a="[^\\ud800-\\udfff"+r+i+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",h="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+o+"|"+a+")",l="(?:"+h+"|"+a+")",p="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",d="[\\ufe0e\\ufe0f]?"+p+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",u,c].join("|")+")[\\ufe0e\\ufe0f]?"+p+")*"),g="(?:"+[s,u,c].join("|")+")"+d,m=RegExp([h+"?"+o+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[n,h,"$"].join("|")+")",l+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[n,h+f,"$"].join("|")+")",h+"?"+f+"+(?:['’](?:d|ll|m|re|s|t|ve))?",h+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,g].join("|"),"g");t.exports=function(t){return t.match(m)||[]}},11257:function(t,e,r){var n=r(9120),i=r(8841),s=r(9122),o=r(406);t.exports=function(t,e,r){if(!o(r))return!1;var a=typeof e;return!!("number"==a?i(r)&&s(e,r.length):"string"==a&&e in r)&&n(r[e],t)}},11258:function(t,e,r){var n=r(1411);t.exports=function(t){return t?(t=n(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},11494:function(t,e,r){var n=r(9384),i=r(10475),s=r(11500),o=r(11503),a=r(9123),u=r(711),c=r(9385),h=r(10328),f="[object Object]",l=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,p,d,g){var m=u(t),E=u(e),S=m?"[object Array]":a(t),v=E?"[object Array]":a(e),_=(S="[object Arguments]"==S?f:S)==f,y=(v="[object Arguments]"==v?f:v)==f,x=S==v;if(x&&c(t)){if(!c(e))return!1;m=!0,_=!1}if(x&&!_)return g||(g=new n),m||h(t)?i(t,e,r,p,d,g):s(t,e,S,r,p,d,g);if(!(1&r)){var P=_&&l.call(t,"__wrapped__"),A=y&&l.call(e,"__wrapped__");if(P||A){var I=P?t.value():t,M=A?e.value():e;return g||(g=new n),d(I,M,r,p,g)}}return!!x&&(g||(g=new n),o(t,e,r,p,d,g))}},11495:function(t,e,r){var n=r(9379),i=r(11496),s=r(11497);function o(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=s,t.exports=o},11496:function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},11497:function(t,e){t.exports=function(t){return this.__data__.has(t)}},11498:function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},11499:function(t,e){t.exports=function(t,e){return t.has(e)}},11500:function(t,e,r){var n=r(309),i=r(10337),s=r(9120),o=r(10475),a=r(11501),u=r(11502),c=n?n.prototype:void 0,h=c?c.valueOf:void 0;t.exports=function(t,e,r,n,c,f,l){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=a;case"[object Set]":var d=1&n;if(p||(p=u),t.size!=e.size&&!d)return!1;var g=l.get(t);if(g)return g==e;n|=2,l.set(t,e);var m=o(p(t),p(e),n,c,f,l);return l.delete(t),m;case"[object Symbol]":if(h)return h.call(t)==h.call(e)}return!1}},11501:function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}},11502:function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},11503:function(t,e,r){var n=r(10334),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,s,o,a){var u=1&r,c=n(t),h=c.length;if(h!=n(e).length&&!u)return!1;for(var f=h;f--;){var l=c[f];if(!(u?l in e:i.call(e,l)))return!1}var p=a.get(t);if(p&&a.get(e))return p==e;var d=!0;a.set(t,e),a.set(e,t);for(var g=u;++f<h;){var m=t[l=c[f]],E=e[l];if(s)var S=u?s(E,m,l,e,t,a):s(m,E,l,t,e,a);if(!(void 0===S?m===E||o(m,E,r,s,a):S)){d=!1;break}g||(g="constructor"==l)}if(d&&!g){var v=t.constructor,_=e.constructor;v==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _||(d=!1)}return a.delete(t),a.delete(e),d}},11694:function(t,e){var r=function(){"use strict";function t(){this.dataPoints_=[],this.color_="red",this.isVisible_=!0,this.cacheStartTime_=null,this.cacheStepSize_=0,this.cacheValues_=[]}function e(t,e){this.time=t,this.value=e}return t.prototype={toJSON:function(){if(this.dataPoints_.length<1)return{};for(var t=[],e=0;e<this.dataPoints_.length;++e)t.push(this.dataPoints_[e].value);return{startTime:this.dataPoints_[0].time,endTime:this.dataPoints_[this.dataPoints_.length-1].time,values:JSON.stringify(t)}},addPoint:function(t,r){var n=new Date(t);this.dataPoints_.push(new e(n,r)),this.dataPoints_.length>1e3&&this.dataPoints_.shift()},isVisible:function(){return this.isVisible_},show:function(t){this.isVisible_=t},getColor:function(){return this.color_},setColor:function(t){this.color_=t},getCount:function(){return this.dataPoints_.length},getValues:function(t,e,r){return this.cacheStartTime_==t&&this.cacheStepSize_==e&&this.cacheValues_.length==r||(this.cacheValues_=this.getValuesInternal_(t,e,r),this.cacheStartTime_=t,this.cacheStepSize_=e),this.cacheValues_},getValuesInternal_:function(t,e,r){for(var n=[],i=0,s=0,o=t,a=0;a<r;++a){for(;i<this.dataPoints_.length&&this.dataPoints_[i].time<o;)s=this.dataPoints_[i].value,++i;n[a]=s,o+=e}return n}},t}();t.exports=r},11695:function(t,e){var r=function(){"use strict";function t(t){this.scrollbar_={position_:0,range_:0},this.canvas_=t,this.gridColor="#CCC",this.textColor="#000",this.backgroundColor="#FFF",this.timeLocales=[],this.timeOptions={},this.startTime_=0,this.endTime_=1,this.graph_=null,this.scale_=1e3,this.updateScrollbarRange_(!0)}t.prototype={setScale:function(t){this.scale_=t},getLength_:function(){var t=this.endTime_-this.startTime_;return Math.floor(t/this.scale_)},graphScrolledToRightEdge_:function(){return this.scrollbar_.position_==this.scrollbar_.range_},updateScrollbarRange_:function(t){var e=this.getLength_()-this.canvas_.width;e<0&&(e=0),this.scrollbar_.position_>e&&(t=!0),this.scrollbar_.range_=e,t&&(this.scrollbar_.position_=e,this.repaint())},setDateRange:function(t,e){this.startTime_=t.getTime(),this.endTime_=e.getTime(),this.endTime_<=this.startTime_&&(this.startTime_=this.endTime_-1),this.updateScrollbarRange_(!0)},updateEndDate:function(t){this.endTime_=t||(new Date).getTime(),this.updateScrollbarRange_(this.graphScrolledToRightEdge_())},getStartDate:function(){return new Date(this.startTime_)},setDataSeries:function(t){this.graph_=new e;for(var r=0;r<t.length;++r)this.graph_.addDataSeries(t[r]);this.repaint()},addDataSeries:function(t){this.graph_||(this.graph_=new e),this.graph_.addDataSeries(t),this.repaint()},repaint:function(){if(null!==this.canvas_.offsetParent){this.repaintTimerRunning_=!1;var t=this.canvas_.width,e=this.canvas_.height,r=this.canvas_.getContext("2d");r.fillStyle=this.backgroundColor,r.fillRect(0,0,t,e);var n=r.font.match(/([0-9]+)px/)[1],i=parseInt(n);if(!(0==n.length||i<=0||4*i>e||t<50)){r.save(),r.translate(.5,.5);var s=this.scrollbar_.position_;0==this.scrollbar_.range_&&(s=this.getLength_()-this.canvas_.width);var o=this.startTime_+s*this.scale_,a=e;e-=i+4,this.drawTimeLabels(r,t,e,a,o),r.strokeStyle=this.gridColor,r.strokeRect(0,0,t-1,e-1),this.graph_&&(this.graph_.layout(t,e,i,o,this.scale_),this.graph_.drawTicks(r),this.graph_.drawLines(r),this.graph_.drawLabels(r)),r.restore()}}},drawTimeLabels:function(t,e,r,n,i){var s=6e4*Math.ceil(i/6e4);for(t.textBaseline="bottom",t.textAlign="center",t.fillStyle=this.textColor,t.strokeStyle=this.gridColor;;){var o=Math.round((s-i)/this.scale_);if(o>=e)break;var a=new Date(s).toLocaleTimeString(this.timeLocales,this.timeOptions);t.fillText(a,o,n),t.beginPath(),t.lineTo(o,0),t.lineTo(o,r),t.stroke(),s+=6e4}},getDataSeriesCount:function(){return this.graph_?this.graph_.dataSeries_.length:0},hasDataSeries:function(t){return!!this.graph_&&this.graph_.hasDataSeries(t)}};var e=function(){function t(){this.dataSeries_=[],this.width_=0,this.height_=0,this.fontHeight_=0,this.startTime_=0,this.scale_=0,this.min_=0,this.max_=0,this.labels_=[]}return t.prototype={addDataSeries:function(t){this.dataSeries_.push(t)},hasDataSeries:function(t){for(var e=0;e<this.dataSeries_.length;++e)if(this.dataSeries_[e]==t)return!0;return!1},getValues:function(t){return t.isVisible()?t.getValues(this.startTime_,this.scale_,this.width_):null},layout:function(t,e,r,n,i){this.width_=t,this.height_=e,this.fontHeight_=r,this.startTime_=n,this.scale_=i;for(var s=0,o=0,a=0;a<this.dataSeries_.length;++a){var u=this.getValues(this.dataSeries_[a]);if(u)for(var c=0;c<u.length;++c)u[c]>s?s=u[c]:u[c]<o&&(o=u[c])}this.layoutLabels_(o,s)},layoutLabels_:function(t,e){if(e-t<1024)this.layoutLabelsBasic_(t,e,2);else{var r=["","k","M","G","T","P"],n=1;for(t/=1024,e/=1024;r[n+1]&&e-t>=1024;)t/=1024,e/=1024,++n;this.layoutLabelsBasic_(t,e,2);for(var i=0;i<this.labels_.length;++i)this.labels_[i]+=" "+r[n];this.min_*=Math.pow(1024,n),this.max_*=Math.pow(1024,n)}},layoutLabelsBasic_:function(t,e,r){this.labels_=[];var n=e-t;if(0!=n){var i=2*this.fontHeight_+4,s=1+this.height_/i;s<2?s=2:s>6&&(s=6);for(var o=Math.pow(10,-r),a=r;!(Math.ceil(n/o)+1<=s);){if(Math.ceil(n/(2*o))+1<=s){o*=2;break}if(Math.ceil(n/(5*o))+1<=s){o*=5;break}o*=10,a>0&&--a}this.max_=Math.ceil(e/o)*o,this.min_=Math.floor(t/o)*o;for(var u=this.max_;u>=this.min_;u-=o)this.labels_.push(u.toFixed(a))}else this.min_=this.max_=e},drawTicks:function(t){var e,r;e=this.width_-1,r=this.width_-1-10,t.fillStyle=this.gridColor,t.beginPath();for(var n=1;n<this.labels_.length-1;++n){var i=Math.round(this.height_*n/(this.labels_.length-1));t.moveTo(e,i),t.lineTo(r,i)}t.stroke()},drawLines:function(t){var e=0,r=this.height_-1;this.max_&&(e=r/(this.max_-this.min_));for(var n=this.dataSeries_.length-1;n>=0;--n){var i=this.getValues(this.dataSeries_[n]);if(i){t.strokeStyle=this.dataSeries_[n].getColor(),t.beginPath();for(var s=0;s<i.length;++s)t.lineTo(s,r-Math.round((i[s]-this.min_)*e));t.stroke()}}},drawLabels:function(t){if(0!=this.labels_.length){var e=this.width_-3;t.fillStyle=this.textColor,t.textAlign="right",t.textBaseline="top",t.fillText(this.labels_[0],e,0),t.textBaseline="bottom";for(var r=(this.height_-1)/(this.labels_.length-1),n=1;n<this.labels_.length;++n)t.fillText(this.labels_[n],e,r*n)}}},t}();return t}();t.exports=r},9801:function(t,e,r){var n=r(11061),i=r(11068)((function(t,e,r){return e=e.toLowerCase(),t+(r?n(e):e)}));t.exports=i}}]);
//# sourceMappingURL=ba19b6d2d1f3edd4a7eb.js.map
|