/**
 * Modules in this bundle
 * @license
 *
 * @sentry/browser:
 *   license: BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause)
 *   author: Sentry
 *   homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/browser
 *   version: 6.2.1
 *
 * @sentry/core:
 *   license: BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause)
 *   author: Sentry
 *   homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/core
 *   version: 6.2.1
 *
 * @sentry/hub:
 *   license: BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause)
 *   author: Sentry
 *   homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/hub
 *   version: 6.2.1
 *
 * @sentry/minimal:
 *   license: BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause)
 *   author: Sentry
 *   homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/minimal
 *   version: 6.2.1
 *
 * @sentry/tracing:
 *   license: MIT (http://opensource.org/licenses/MIT)
 *   author: Sentry
 *   homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/tracing
 *   version: 6.2.1
 *
 * @sentry/types:
 *   license: BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause)
 *   author: Sentry
 *   homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/types
 *   version: 6.2.1
 *
 * @sentry/utils:
 *   license: BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause)
 *   author: Sentry
 *   homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/utils
 *   version: 6.2.1
 *
 * chart.js:
 *   license: MIT (http://opensource.org/licenses/MIT)
 *   homepage: https://www.chartjs.org
 *   version: 2.9.4
 *
 * dateformat:
 *   license: MIT (http://opensource.org/licenses/MIT)
 *   author: Steven Levithan
 *   contributors: Steven Levithan, Felix Geisendörfer <felix@debuggable.com>, Christoph Tavan <dev@tavan.de>, Jon Schlinkert (https://github.com/jonschlinkert)
 *   homepage: https://github.com/felixge/node-dateformat
 *   version: 3.0.3
 *
 * jquery:
 *   license: MIT (http://opensource.org/licenses/MIT)
 *   author: jQuery Foundation and other contributors
 *   homepage: http://jquery.com
 *   version: 2.2.4
 *
 * lodash:
 *   license: MIT (http://opensource.org/licenses/MIT)
 *   author: John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)
 *   contributors: John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/), Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/), Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/), Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/), Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)
 *   homepage: https://lodash.com/
 *   version: 3.10.1
 *
 * moment:
 *   license: MIT (http://opensource.org/licenses/MIT)
 *   author: Iskren Ivov Chernev <iskren.chernev@gmail.com> (https://github.com/ichernev)
 *   contributors: Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/), Rocky Meza (http://rockymeza.com), Matt Johnson <mj1856@hotmail.com> (http://codeofmatt.com), Isaac Cambron <isaac@isaaccambron.com> (http://isaaccambron.com), Andre Polykanine <andre@oire.org> (https://github.com/oire)
 *   homepage: https://momentjs.com
 *   version: 2.29.1
 *
 * nodelist-foreach-polyfill:
 *   license: ISC (http://opensource.org/licenses/ISC)
 *   author: Jared Williams (imagitama)
 *   homepage: https://github.com/imagitama/nodelist-foreach-polyfill#readme
 *   version: 1.2.0
 *
 * patternomaly:
 *   license: MIT (http://opensource.org/licenses/MIT)
 *   author: Tom Loudon
 *   version: 1.3.2
 *
 * process:
 *   license: MIT (http://opensource.org/licenses/MIT)
 *   author: Roman Shtylman <shtylman@gmail.com>
 *   version: 0.11.10
 *
 * tslib:
 *   license: Apache-2.0 (http://opensource.org/licenses/Apache-2.0)
 *   author: Microsoft Corp.
 *   homepage: http://typescriptlang.org/
 *   version: 1.10.0
 *
 * This header is generated by licensify (https://github.com/twada/licensify)
 */
!function o(s,a,l){function u(e,t){if(!a[e]){if(!s[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(c)return c(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var r=a[e]={exports:{}};s[e][0].call(r.exports,function(t){return u(s[e][1][t]||t)},r,r.exports,o,s,a,l)}return a[e].exports}for(var c="function"==typeof require&&require,t=0;t<l.length;t++)u(l[t]);return u}({1:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i,r=t("tslib"),o=t("@sentry/core"),s=t("@sentry/types"),a=t("@sentry/utils"),l=t("./eventbuilder"),u=t("./transports"),c=(i=o.BaseBackend,r.__extends(d,i),d.prototype.eventFromException=function(t,e){return l.eventFromException(this._options,t,e)},d.prototype.eventFromMessage=function(t,e,n){return void 0===e&&(e=s.Severity.Info),l.eventFromMessage(this._options,t,e,n)},d.prototype._setupTransport=function(){if(!this._options.dsn)return i.prototype._setupTransport.call(this);var t=r.__assign(r.__assign({},this._options.transportOptions),{dsn:this._options.dsn,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(t):a.supportsFetch()?new u.FetchTransport(t):new u.XHRTransport(t)},d);function d(){return null!==i&&i.apply(this,arguments)||this}n.BrowserBackend=c},{"./eventbuilder":3,"./transports":18,"@sentry/core":24,"@sentry/types":68,"@sentry/utils":78,tslib:101}],2:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i,r=t("tslib"),o=t("@sentry/core"),s=t("@sentry/utils"),a=t("./backend"),l=t("./helpers"),u=t("./integrations"),c=(i=o.BaseClient,r.__extends(d,i),d.prototype.showReportDialog=function(t){void 0===t&&(t={}),s.getGlobalObject().document&&(this._isEnabled()?l.injectReportDialog(r.__assign(r.__assign({},t),{dsn:t.dsn||this.getDsn()})):s.logger.error("Trying to call showReportDialog with Sentry Client disabled"))},d.prototype._prepareEvent=function(t,e,n){return t.platform=t.platform||"javascript",i.prototype._prepareEvent.call(this,t,e,n)},d.prototype._sendEvent=function(t){var e=this.getIntegration(u.Breadcrumbs);e&&e.addSentryBreadcrumb(t),i.prototype._sendEvent.call(this,t)},d);function d(t){void 0===t&&(t={});return t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:o.SDK_VERSION}],version:o.SDK_VERSION},i.call(this,a.BrowserBackend,t)||this}n.BrowserClient=c},{"./backend":1,"./helpers":5,"./integrations":9,"@sentry/core":24,"@sentry/utils":78,tslib:101}],3:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var l=t("tslib"),o=t("@sentry/types"),u=t("@sentry/utils"),c=t("./parsers"),d=t("./tracekit");function r(t,e,n){var i;if(void 0===n&&(n={}),u.isErrorEvent(t)&&t.error)return t=t.error,i=c.eventFromStacktrace(d.computeStackTrace(t));if(u.isDOMError(t)||u.isDOMException(t)){var r=t,o=r.name||(u.isDOMError(r)?"DOMError":"DOMException"),s=r.message?o+": "+r.message:o;return i=h(s,e,n),u.addExceptionTypeValue(i,s),"code"in r&&(i.tags=l.__assign(l.__assign({},i.tags),{"DOMException.code":""+r.code})),i}if(u.isError(t))return i=c.eventFromStacktrace(d.computeStackTrace(t));if(u.isPlainObject(t)||u.isEvent(t)){var a=t;return i=c.eventFromPlainObject(a,e,n.rejection),u.addExceptionMechanism(i,{synthetic:!0}),i}return i=h(t,e,n),u.addExceptionTypeValue(i,""+t,void 0),u.addExceptionMechanism(i,{synthetic:!0}),i}function h(t,e,n){void 0===n&&(n={});var i={message:t};if(n.attachStacktrace&&e){var r=d.computeStackTrace(e),o=c.prepareFramesForEvent(r.stack);i.stacktrace={frames:o}}return i}n.eventFromException=function(t,e,n){var i=r(e,n&&n.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return u.addExceptionMechanism(i,{handled:!0,type:"generic"}),i.level=o.Severity.Error,n&&n.event_id&&(i.event_id=n.event_id),u.SyncPromise.resolve(i)},n.eventFromMessage=function(t,e,n,i){void 0===n&&(n=o.Severity.Info);var r=h(e,i&&i.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return r.level=n,i&&i.event_id&&(r.event_id=i.event_id),u.SyncPromise.resolve(r)},n.eventFromUnknownInput=r,n.eventFromString=h},{"./parsers":13,"./tracekit":15,"@sentry/types":68,"@sentry/utils":78,tslib:101}],4:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/types");n.Severity=i.Severity,n.Status=i.Status;var r=t("@sentry/core");n.addGlobalEventProcessor=r.addGlobalEventProcessor,n.addBreadcrumb=r.addBreadcrumb,n.captureException=r.captureException,n.captureEvent=r.captureEvent,n.captureMessage=r.captureMessage,n.configureScope=r.configureScope,n.getHubFromCarrier=r.getHubFromCarrier,n.getCurrentHub=r.getCurrentHub,n.Hub=r.Hub,n.makeMain=r.makeMain,n.Scope=r.Scope,n.startTransaction=r.startTransaction,n.SDK_VERSION=r.SDK_VERSION,n.setContext=r.setContext,n.setExtra=r.setExtra,n.setExtras=r.setExtras,n.setTag=r.setTag,n.setTags=r.setTags,n.setUser=r.setUser,n.withScope=r.withScope;var o=t("./client");n.BrowserClient=o.BrowserClient;var s=t("./helpers");n.injectReportDialog=s.injectReportDialog;var a=t("./eventbuilder");n.eventFromException=a.eventFromException,n.eventFromMessage=a.eventFromMessage;var l=t("./sdk");n.defaultIntegrations=l.defaultIntegrations,n.forceLoad=l.forceLoad,n.init=l.init,n.lastEventId=l.lastEventId,n.onLoad=l.onLoad,n.showReportDialog=l.showReportDialog,n.flush=l.flush,n.close=l.close,n.wrap=l.wrap;var u=t("./version");n.SDK_NAME=u.SDK_NAME},{"./client":2,"./eventbuilder":3,"./helpers":5,"./sdk":14,"./version":20,"@sentry/core":24,"@sentry/types":68}],5:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var s=t("tslib"),a=t("@sentry/core"),l=t("@sentry/utils"),i=0;function u(){i+=1,setTimeout(function(){i-=1})}n.shouldIgnoreOnError=function(){return 0<i},n.ignoreNextOnError=u,n.wrap=function e(i,r,o){if(void 0===r&&(r={}),"function"!=typeof i)return i;try{if(i.__sentry__)return i;if(i.__sentry_wrapped__)return i.__sentry_wrapped__}catch(t){return i}function t(){var n=Array.prototype.slice.call(arguments);try{o&&"function"==typeof o&&o.apply(this,arguments);var t=n.map(function(t){return e(t,r)});return i.handleEvent?i.handleEvent.apply(this,t):i.apply(this,t)}catch(e){throw u(),a.withScope(function(t){t.addEventProcessor(function(t){var e=s.__assign({},t);return r.mechanism&&(l.addExceptionTypeValue(e,void 0,void 0),l.addExceptionMechanism(e,r.mechanism)),e.extra=s.__assign(s.__assign({},e.extra),{arguments:n}),e}),a.captureException(e)}),e}}try{for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}catch(t){}i.prototype=i.prototype||{},t.prototype=i.prototype,Object.defineProperty(i,"__sentry_wrapped__",{enumerable:!1,value:t}),Object.defineProperties(t,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:i}});try{Object.getOwnPropertyDescriptor(t,"name").configurable&&Object.defineProperty(t,"name",{get:function(){return i.name}})}catch(t){}return t},n.injectReportDialog=function(t){if(void 0===t&&(t={}),t.eventId)if(t.dsn){var e=document.createElement("script");e.async=!0,e.src=new a.API(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}else l.logger.error("Missing dsn option in showReportDialog call");else l.logger.error("Missing eventId option in showReportDialog call")}},{"@sentry/core":24,"@sentry/utils":78,tslib:101}],6:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("tslib");i.__exportStar(t("./exports"),n);var r=t("@sentry/core"),o=t("@sentry/utils"),s=t("./integrations"),a=t("./transports");n.Transports=a;var l={},u=o.getGlobalObject();u.Sentry&&u.Sentry.Integrations&&(l=u.Sentry.Integrations);var c=i.__assign(i.__assign(i.__assign({},l),r.Integrations),s);n.Integrations=c},{"./exports":4,"./integrations":9,"./transports":18,"@sentry/core":24,"@sentry/utils":78,tslib:101}],7:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("tslib"),a=t("@sentry/core"),r=t("@sentry/types"),l=t("@sentry/utils"),o=(s.prototype.addSentryBreadcrumb=function(t){this._options.sentry&&a.getCurrentHub().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:l.getEventDescription(t)},{event:t})},s.prototype.setupOnce=function(){var n=this;this._options.console&&l.addInstrumentationHandler({callback:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n._consoleBreadcrumb.apply(n,i.__spread(t))},type:"console"}),this._options.dom&&l.addInstrumentationHandler({callback:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n._domBreadcrumb.apply(n,i.__spread(t))},type:"dom"}),this._options.xhr&&l.addInstrumentationHandler({callback:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n._xhrBreadcrumb.apply(n,i.__spread(t))},type:"xhr"}),this._options.fetch&&l.addInstrumentationHandler({callback:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n._fetchBreadcrumb.apply(n,i.__spread(t))},type:"fetch"}),this._options.history&&l.addInstrumentationHandler({callback:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n._historyBreadcrumb.apply(n,i.__spread(t))},type:"history"})},s.prototype._consoleBreadcrumb=function(t){var e={category:"console",data:{arguments:t.args,logger:"console"},level:r.Severity.fromString(t.level),message:l.safeJoin(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message="Assertion failed: "+(l.safeJoin(t.args.slice(1)," ")||"console.assert"),e.data.arguments=t.args.slice(1)}a.getCurrentHub().addBreadcrumb(e,{input:t.args,level:t.level})},s.prototype._domBreadcrumb=function(t){var e;try{e=t.event.target?l.htmlTreeAsString(t.event.target):l.htmlTreeAsString(t.event)}catch(t){e="<unknown>"}0!==e.length&&a.getCurrentHub().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name,global:t.global})},s.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var e=t.xhr.__sentry_xhr__||{},n=e.method,i=e.url,r=e.status_code,o=e.body;a.getCurrentHub().addBreadcrumb({category:"xhr",data:{method:n,url:i,status_code:r},type:"http"},{xhr:t.xhr,input:o})}},s.prototype._fetchBreadcrumb=function(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?a.getCurrentHub().addBreadcrumb({category:"fetch",data:t.fetchData,level:r.Severity.Error,type:"http"},{data:t.error,input:t.args}):a.getCurrentHub().addBreadcrumb({category:"fetch",data:i.__assign(i.__assign({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))},s.prototype._historyBreadcrumb=function(t){var e=l.getGlobalObject(),n=t.from,i=t.to,r=l.parseUrl(e.location.href),o=l.parseUrl(n),s=l.parseUrl(i);o.path||(o=r),r.protocol===s.protocol&&r.host===s.host&&(i=s.relative),r.protocol===o.protocol&&r.host===o.host&&(n=o.relative),a.getCurrentHub().addBreadcrumb({category:"navigation",data:{from:n,to:i}})},s.id="Breadcrumbs",s);function s(t){this.name=s.id,this._options=i.__assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}n.Breadcrumbs=o},{"@sentry/core":24,"@sentry/types":68,"@sentry/utils":78,tslib:101}],8:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("tslib"),l=t("@sentry/core"),u=t("@sentry/types"),c=t("@sentry/utils"),d=t("../eventbuilder"),h=t("../helpers"),r=(p.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(c.logger.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(c.logger.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},p.prototype._installGlobalOnErrorHandler=function(){var a=this;this._onErrorHandlerInstalled||(c.addInstrumentationHandler({callback:function(t){var e=t.error,n=l.getCurrentHub(),i=n.getIntegration(p),r=e&&!0===e.__sentry_own_request__;if(i&&!h.shouldIgnoreOnError()&&!r){var o=n.getClient(),s=c.isPrimitive(e)?a._eventFromIncompleteOnError(t.msg,t.url,t.line,t.column):a._enhanceEventWithInitialFrame(d.eventFromUnknownInput(e,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);c.addExceptionMechanism(s,{handled:!1,type:"onerror"}),n.captureEvent(s,{originalException:e})}},type:"error"}),this._onErrorHandlerInstalled=!0)},p.prototype._installGlobalOnUnhandledRejectionHandler=function(){var a=this;this._onUnhandledRejectionHandlerInstalled||(c.addInstrumentationHandler({callback:function(t){var e=t;try{"reason"in t?e=t.reason:"detail"in t&&"reason"in t.detail&&(e=t.detail.reason)}catch(t){}var n=l.getCurrentHub(),i=n.getIntegration(p),r=e&&!0===e.__sentry_own_request__;if(!i||h.shouldIgnoreOnError()||r)return!0;var o=n.getClient(),s=c.isPrimitive(e)?a._eventFromRejectionWithPrimitive(e):d.eventFromUnknownInput(e,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});s.level=u.Severity.Error,c.addExceptionMechanism(s,{handled:!1,type:"onunhandledrejection"}),n.captureEvent(s,{originalException:e})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},p.prototype._eventFromIncompleteOnError=function(t,e,n,i){var r,o=c.isErrorEvent(t)?t.message:t;if(c.isString(o)){var s=o.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);s&&(r=s[1],o=s[2])}var a={exception:{values:[{type:r||"Error",value:o}]}};return this._enhanceEventWithInitialFrame(a,e,n,i)},p.prototype._eventFromRejectionWithPrimitive=function(t){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(t)}]}}},p.prototype._enhanceEventWithInitialFrame=function(t,e,n,i){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];var r=isNaN(parseInt(i,10))?void 0:i,o=isNaN(parseInt(n,10))?void 0:n,s=c.isString(e)&&0<e.length?e:c.getLocationHref();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:r,filename:s,function:"?",in_app:!0,lineno:o}),t},p.id="GlobalHandlers",p);function p(t){this.name=p.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=i.__assign({onerror:!0,onunhandledrejection:!0},t)}n.GlobalHandlers=r},{"../eventbuilder":3,"../helpers":5,"@sentry/core":24,"@sentry/types":68,"@sentry/utils":78,tslib:101}],9:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./globalhandlers");n.GlobalHandlers=i.GlobalHandlers;var r=t("./trycatch");n.TryCatch=r.TryCatch;var o=t("./breadcrumbs");n.Breadcrumbs=o.Breadcrumbs;var s=t("./linkederrors");n.LinkedErrors=s.LinkedErrors;var a=t("./useragent");n.UserAgent=a.UserAgent},{"./breadcrumbs":7,"./globalhandlers":8,"./linkederrors":10,"./trycatch":11,"./useragent":12}],10:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var o=t("tslib"),i=t("@sentry/core"),s=t("@sentry/utils"),a=t("../parsers"),l=t("../tracekit"),r=(u.prototype.setupOnce=function(){i.addGlobalEventProcessor(function(t,e){var n=i.getCurrentHub().getIntegration(u);return n?n._handler(t,e):t})},u.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&s.isInstanceOf(e.originalException,Error)))return t;var n=this._walkErrorTree(e.originalException,this._key);return t.exception.values=o.__spread(n,t.exception.values),t},u.prototype._walkErrorTree=function(t,e,n){if(void 0===n&&(n=[]),!s.isInstanceOf(t[e],Error)||n.length+1>=this._limit)return n;var i=l.computeStackTrace(t[e]),r=a.exceptionFromStacktrace(i);return this._walkErrorTree(t[e],e,o.__spread([r],n))},u.id="LinkedErrors",u);function u(t){void 0===t&&(t={}),this.name=u.id,this._key=t.key||"cause",this._limit=t.limit||5}n.LinkedErrors=r},{"../parsers":13,"../tracekit":15,"@sentry/core":24,"@sentry/utils":78,tslib:101}],11:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("tslib"),o=t("@sentry/utils"),s=t("../helpers"),r=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],a=(l.prototype.setupOnce=function(){var t=o.getGlobalObject();this._options.setTimeout&&o.fill(t,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&o.fill(t,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&o.fill(t,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&o.fill(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:r).forEach(this._wrapEventTarget.bind(this))},l.prototype._wrapTimeFunction=function(i){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0];return t[0]=s.wrap(n,{mechanism:{data:{function:o.getFunctionName(i)},handled:!0,type:"instrument"}}),i.apply(this,t)}},l.prototype._wrapRAF=function(e){return function(t){return e.call(this,s.wrap(t,{mechanism:{data:{function:"requestAnimationFrame",handler:o.getFunctionName(e)},handled:!0,type:"instrument"}}))}},l.prototype._wrapEventTarget=function(r){var t=o.getGlobalObject(),e=t[r]&&t[r].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(o.fill(e,"addEventListener",function(i){return function(t,e,n){try{"function"==typeof e.handleEvent&&(e.handleEvent=s.wrap(e.handleEvent.bind(e),{mechanism:{data:{function:"handleEvent",handler:o.getFunctionName(e),target:r},handled:!0,type:"instrument"}}))}catch(t){}return i.call(this,t,s.wrap(e,{mechanism:{data:{function:"addEventListener",handler:o.getFunctionName(e),target:r},handled:!0,type:"instrument"}}),n)}}),o.fill(e,"removeEventListener",function(s){return function(t,e,n){var i,r=e;try{var o=null===(i=r)||void 0===i?void 0:i.__sentry_wrapped__;o&&s.call(this,t,o,n)}catch(t){}return s.call(this,t,r,n)}}))},l.prototype._wrapXHR=function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(function(n){n in i&&"function"==typeof i[n]&&o.fill(i,n,function(t){var e={mechanism:{data:{function:n,handler:o.getFunctionName(t)},handled:!0,type:"instrument"}};return t.__sentry_original__&&(e.mechanism.data.handler=o.getFunctionName(t.__sentry_original__)),s.wrap(t,e)})}),n.apply(this,t)}},l.id="TryCatch",l);function l(t){this.name=l.id,this._options=i.__assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}n.TryCatch=a},{"../helpers":5,"@sentry/utils":78,tslib:101}],12:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var u=t("tslib"),c=t("@sentry/core"),d=t("@sentry/utils").getGlobalObject(),i=(h.prototype.setupOnce=function(){c.addGlobalEventProcessor(function(t){var e,n,i;if(c.getCurrentHub().getIntegration(h)){if(!d.navigator&&!d.location&&!d.document)return t;var r=(null===(e=t.request)||void 0===e?void 0:e.url)||(null===(n=d.location)||void 0===n?void 0:n.href),o=(d.document||{}).referrer,s=(d.navigator||{}).userAgent,a=u.__assign(u.__assign(u.__assign({},null===(i=t.request)||void 0===i?void 0:i.headers),o&&{Referer:o}),s&&{"User-Agent":s}),l=u.__assign(u.__assign({},r&&{url:r}),{headers:a});return u.__assign(u.__assign({},t),{request:l})}return t})},h.id="UserAgent",h);function h(){this.name=h.id}n.UserAgent=i},{"@sentry/core":24,"@sentry/utils":78,tslib:101}],13:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var o=t("@sentry/utils"),s=t("./tracekit"),r=50;function i(t){var e=a(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function a(t){if(!t||!t.length)return[];var e=t,n=e[0].func||"",i=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==i.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,r).map(function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}}).reverse()}n.exceptionFromStacktrace=i,n.eventFromPlainObject=function(t,e,n){var i={exception:{values:[{type:o.isEvent(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+o.extractExceptionKeysForMessage(t)}]},extra:{__serialized__:o.normalizeToSize(t)}};if(e){var r=a(s.computeStackTrace(e).stack);i.stacktrace={frames:r}}return i},n.eventFromStacktrace=function(t){return{exception:{values:[i(t)]}}},n.prepareFramesForEvent=a},{"./tracekit":15,"@sentry/utils":78}],14:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/core"),r=t("@sentry/utils"),o=t("./client"),s=t("./helpers"),a=t("./integrations");n.defaultIntegrations=[new i.Integrations.InboundFilters,new i.Integrations.FunctionToString,new a.TryCatch,new a.Breadcrumbs,new a.GlobalHandlers,new a.LinkedErrors,new a.UserAgent],n.init=function(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=n.defaultIntegrations),void 0===t.release){var e=r.getGlobalObject();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),i.initAndBind(o.BrowserClient,t),t.autoSessionTracking&&function(){if(void 0===r.getGlobalObject().document)return r.logger.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");var t=i.getCurrentHub();t.startSession(),t.captureSession(),r.addInstrumentationHandler({callback:function(){t.startSession(),t.captureSession()},type:"history"})}()},n.showReportDialog=function(t){void 0===t&&(t={}),t.eventId||(t.eventId=i.getCurrentHub().lastEventId());var e=i.getCurrentHub().getClient();e&&e.showReportDialog(t)},n.lastEventId=function(){return i.getCurrentHub().lastEventId()},n.forceLoad=function(){},n.onLoad=function(t){t()},n.flush=function(t){var e=i.getCurrentHub().getClient();return e?e.flush(t):r.SyncPromise.reject(!1)},n.close=function(t){var e=i.getCurrentHub().getClient();return e?e.close(t):r.SyncPromise.reject(!1)},n.wrap=function(t){return s.wrap(t)()}},{"./client":2,"./helpers":5,"./integrations":9,"@sentry/core":24,"@sentry/utils":78}],15:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("tslib"),u="?",l=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,c=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,d=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,h=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,p=/\((\S*)(?::(\d+))(?::(\d+))\)/,r=/Minified React error #\d+;/i;function o(e,t){try{return i.__assign(i.__assign({},e),{stack:e.stack.slice(t)})}catch(t){return e}}function f(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}n.computeStackTrace=function(t){var e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:r.test(t.message)&&(n=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,n=t.stacktrace,i=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,r=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,o=n.split("\n"),s=[],a=0;a<o.length;a+=2){var l=null;(e=i.exec(o[a]))?l={url:e[2],func:e[3],args:[],line:+e[1],column:null}:(e=r.exec(o[a]))&&(l={url:e[6],func:e[3]||e[4],args:e[5]?e[5].split(","):[],line:+e[1],column:+e[2]}),l&&(!l.func&&l.line&&(l.func=u),s.push(l))}return s.length?{message:f(t),name:t.name,stack:s}:null}(t))return o(e,n)}catch(t){}try{if(e=function(t){if(!t||!t.stack)return null;for(var e,n,i,r=[],o=t.stack.split("\n"),s=0;s<o.length;++s){if(n=l.exec(o[s])){var a=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(e=p.exec(n[2]))&&(n[2]=e[1],n[3]=e[2],n[4]=e[3]),i={url:n[2]&&0===n[2].indexOf("address at ")?n[2].substr("address at ".length):n[2],func:n[1]||u,args:a?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=d.exec(o[s]))i={url:n[2],func:n[1]||u,args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=c.exec(o[s])))continue;n[3]&&-1<n[3].indexOf(" > eval")&&(e=h.exec(n[3]))?(n[1]=n[1]||"eval",n[3]=e[1],n[4]=e[2],n[5]=""):0!==s||n[5]||void 0===t.columnNumber||(r[0].column=t.columnNumber+1),i={url:n[3],func:n[1]||u,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!i.func&&i.line&&(i.func=u),r.push(i)}return r.length?{message:f(t),name:t.name,stack:r}:null}(t))return o(e,n)}catch(t){}return{message:f(t),name:t&&t.name,stack:[],failed:!0}}},{tslib:101}],16:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var m=t("tslib"),i=t("@sentry/core"),a=t("@sentry/types"),y=t("@sentry/utils"),r=(o.prototype.sendEvent=function(t){throw new y.SentryError("Transport Class has to implement `sendEvent` method")},o.prototype.close=function(t){return this._buffer.drain(t)},o.prototype._handleResponse=function(t){var e=t.requestType,n=t.response,i=t.headers,r=t.resolve,o=t.reject,s=a.Status.fromHttpCode(n.status);this._handleRateLimit(i)&&y.logger.warn("Too many requests, backing off until: "+this._disabledUntil(e)),s!==a.Status.Success?o(n):r({status:s})},o.prototype._disabledUntil=function(t){return this._rateLimits[t]||this._rateLimits.all},o.prototype._isRateLimited=function(t){return this._disabledUntil(t)>new Date(Date.now())},o.prototype._handleRateLimit=function(t){var e,n,i,r,o=Date.now(),s=t["x-sentry-rate-limits"],a=t["retry-after"];if(s){try{for(var l=m.__values(s.trim().split(",")),u=l.next();!u.done;u=l.next()){var c=u.value.split(":",2),d=parseInt(c[0],10),h=1e3*(isNaN(d)?60:d);try{for(var p=(i=void 0,m.__values(c[1].split(";"))),f=p.next();!f.done;f=p.next()){var g=f.value;this._rateLimits[g||"all"]=new Date(o+h)}}catch(t){i={error:t}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}return!0}return!!a&&(this._rateLimits.all=new Date(o+y.parseRetryAfterHeader(o,a)),!0)},o);function o(t){this.options=t,this._buffer=new y.PromiseBuffer(30),this._rateLimits={},this._api=new i.API(t.dsn,t._metadata),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}n.BaseTransport=r},{"@sentry/core":24,"@sentry/types":68,"@sentry/utils":78,tslib:101}],17:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i,r=t("tslib"),o=t("@sentry/core"),s=t("@sentry/utils"),a=t("./base"),l=s.getGlobalObject(),u=(i=a.BaseTransport,r.__extends(c,i),c.prototype.sendEvent=function(t){return this._sendRequest(o.eventToSentryRequest(t,this._api),t)},c.prototype.sendSession=function(t){return this._sendRequest(o.sessionToSentryRequest(t,this._api),t)},c.prototype._sendRequest=function(r,t){var o=this;if(this._isRateLimited(r.type))return Promise.reject({event:t,type:r.type,reason:"Transport locked till "+this._disabledUntil(r.type)+" due to too many requests.",status:429});var e={body:r.body,method:"POST",referrerPolicy:s.supportsReferrerPolicy()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(e,this.options.fetchParameters),void 0!==this.options.headers&&(e.headers=this.options.headers),this._buffer.add(new s.SyncPromise(function(n,i){l.fetch(r.url,e).then(function(t){var e={"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")};o._handleResponse({requestType:r.type,response:t,headers:e,resolve:n,reject:i})}).catch(i)}))},c);function c(){return null!==i&&i.apply(this,arguments)||this}n.FetchTransport=u},{"./base":16,"@sentry/core":24,"@sentry/utils":78,tslib:101}],18:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./base");n.BaseTransport=i.BaseTransport;var r=t("./fetch");n.FetchTransport=r.FetchTransport;var o=t("./xhr");n.XHRTransport=o.XHRTransport},{"./base":16,"./fetch":17,"./xhr":19}],19:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i,r=t("tslib"),o=t("@sentry/core"),s=t("@sentry/utils"),a=t("./base"),l=(i=a.BaseTransport,r.__extends(u,i),u.prototype.sendEvent=function(t){return this._sendRequest(o.eventToSentryRequest(t,this._api),t)},u.prototype.sendSession=function(t){return this._sendRequest(o.sessionToSentryRequest(t,this._api),t)},u.prototype._sendRequest=function(r,t){var o=this;return this._isRateLimited(r.type)?Promise.reject({event:t,type:r.type,reason:"Transport locked till "+this._disabledUntil(r.type)+" due to too many requests.",status:429}):this._buffer.add(new s.SyncPromise(function(e,n){var i=new XMLHttpRequest;for(var t in i.onreadystatechange=function(){if(4===i.readyState){var t={"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")};o._handleResponse({requestType:r.type,response:i,headers:t,resolve:e,reject:n})}},i.open("POST",r.url),o.options.headers)o.options.headers.hasOwnProperty(t)&&i.setRequestHeader(t,o.options.headers[t]);i.send(r.body)}))},u);function u(){return null!==i&&i.apply(this,arguments)||this}n.XHRTransport=l},{"./base":16,"@sentry/core":24,"@sentry/utils":78,tslib:101}],20:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SDK_NAME="sentry.javascript.browser"},{}],21:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/utils"),r=(o.prototype.getDsn=function(){return this._dsnObject},o.prototype.getBaseApiEndpoint=function(){var t=this._dsnObject,e=t.protocol?t.protocol+":":"",n=t.port?":"+t.port:"";return e+"//"+t.host+n+(t.path?"/"+t.path:"")+"/api/"},o.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},o.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},o.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},o.prototype.getStoreEndpointPath=function(){var t=this._dsnObject;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},o.prototype.getRequestHeaders=function(t,e){var n=this._dsnObject,i=["Sentry sentry_version=7"];return i.push("sentry_client="+t+"/"+e),i.push("sentry_key="+n.publicKey),n.pass&&i.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":i.join(", ")}},o.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this._dsnObject,n=this.getBaseApiEndpoint()+"embed/error-page/",i=[];for(var r in i.push("dsn="+e.toString()),t)if("dsn"!==r)if("user"===r){if(!t.user)continue;t.user.name&&i.push("name="+encodeURIComponent(t.user.name)),t.user.email&&i.push("email="+encodeURIComponent(t.user.email))}else i.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return i.length?n+"?"+i.join("&"):n},o.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},o.prototype._getIngestEndpoint=function(t){return""+this.getBaseApiEndpoint()+this._dsnObject.projectId+"/"+t+"/"},o.prototype._encodedAuth=function(){var t={sentry_key:this._dsnObject.publicKey,sentry_version:"7"};return i.urlEncode(t)},o);function o(t,e){void 0===e&&(e={}),this.dsn=t,this._dsnObject=new i.Dsn(t),this.metadata=e}n.API=r},{"@sentry/utils":78}],22:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/utils"),r=t("./transports/noop"),o=(s.prototype.eventFromException=function(t,e){throw new i.SentryError("Backend has to implement `eventFromException` method")},s.prototype.eventFromMessage=function(t,e,n){throw new i.SentryError("Backend has to implement `eventFromMessage` method")},s.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,function(t){i.logger.error("Error while sending event: "+t)})},s.prototype.sendSession=function(t){this._transport.sendSession?this._transport.sendSession(t).then(null,function(t){i.logger.error("Error while sending session: "+t)}):i.logger.warn("Dropping session because custom transport doesn't implement sendSession")},s.prototype.getTransport=function(){return this._transport},s.prototype._setupTransport=function(){return new r.NoopTransport},s);function s(t){this._options=t,this._options.dsn||i.logger.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}n.BaseBackend=o},{"./transports/noop":31,"@sentry/utils":78}],23:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var f=t("tslib"),u=t("@sentry/hub"),g=t("@sentry/types"),c=t("@sentry/utils"),i=t("./integration"),r=(o.prototype.captureException=function(t,e,n){var i=this,r=e&&e.event_id;return this._process(this._getBackend().eventFromException(t,e).then(function(t){return i._captureEvent(t,e,n)}).then(function(t){r=t})),r},o.prototype.captureMessage=function(t,e,n,i){var r=this,o=n&&n.event_id,s=c.isPrimitive(t)?this._getBackend().eventFromMessage(String(t),e,n):this._getBackend().eventFromException(t,n);return this._process(s.then(function(t){return r._captureEvent(t,n,i)}).then(function(t){o=t})),o},o.prototype.captureEvent=function(t,e,n){var i=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then(function(t){i=t})),i},o.prototype.captureSession=function(t){t.release?(this._sendSession(t),t.update({init:!1})):c.logger.warn("Discarded session because of missing release")},o.prototype.getDsn=function(){return this._dsn},o.prototype.getOptions=function(){return this._options},o.prototype.flush=function(t){var n=this;return this._isClientProcessing(t).then(function(e){return n._getBackend().getTransport().close(t).then(function(t){return e&&t})})},o.prototype.close=function(t){var e=this;return this.flush(t).then(function(t){return e.getOptions().enabled=!1,t})},o.prototype.setupIntegrations=function(){this._isEnabled()&&(this._integrations=i.setupIntegrations(this._options))},o.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch(t){return c.logger.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},o.prototype._updateSessionFromEvent=function(t,e){var n,i,r,o=!1,s=!1,a=e.exception&&e.exception.values;if(a){s=!0;try{for(var l=f.__values(a),u=l.next();!u.done;u=l.next()){var c=u.value.mechanism;if(c&&!1===c.handled){o=!0;break}}}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}}var d=e.user;if(!t.userAgent){var h=e.request?e.request.headers:{};for(var p in h)if("user-agent"===p.toLowerCase()){r=h[p];break}}t.update(f.__assign(f.__assign({},o&&{status:g.SessionStatus.Crashed}),{user:d,userAgent:r,errors:t.errors+Number(s||o)})),this.captureSession(t)},o.prototype._sendSession=function(t){this._getBackend().sendSession(t)},o.prototype._isClientProcessing=function(i){var r=this;return new c.SyncPromise(function(t){var e=0,n=setInterval(function(){0==r._processing?(clearInterval(n),t(!0)):(e+=1,i&&i<=e&&(clearInterval(n),t(!1)))},1)})},o.prototype._getBackend=function(){return this._backend},o.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},o.prototype._prepareEvent=function(t,e,n){var i=this,r=this.getOptions().normalizeDepth,o=void 0===r?3:r,s=f.__assign(f.__assign({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:c.uuid4()),timestamp:t.timestamp||c.dateTimestampInSeconds()});this._applyClientOptions(s),this._applyIntegrationsMetadata(s);var a=e;n&&n.captureContext&&(a=u.Scope.clone(a).update(n.captureContext));var l=c.SyncPromise.resolve(s);return a&&(l=a.applyToEvent(s,n)),l.then(function(t){return"number"==typeof o&&0<o?i._normalizeEvent(t,o):t})},o.prototype._normalizeEvent=function(t,e){if(!t)return null;var n=f.__assign(f.__assign(f.__assign(f.__assign(f.__assign({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(function(t){return f.__assign(f.__assign({},t),t.data&&{data:c.normalize(t.data,e)})})}),t.user&&{user:c.normalize(t.user,e)}),t.contexts&&{contexts:c.normalize(t.contexts,e)}),t.extra&&{extra:c.normalize(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),n},o.prototype._applyClientOptions=function(t){var e=this.getOptions(),n=e.environment,i=e.release,r=e.dist,o=e.maxValueLength,s=void 0===o?250:o;"environment"in t||(t.environment="environment"in e?n:"production"),void 0===t.release&&void 0!==i&&(t.release=i),void 0===t.dist&&void 0!==r&&(t.dist=r),t.message&&(t.message=c.truncate(t.message,s));var a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=c.truncate(a.value,s));var l=t.request;l&&l.url&&(l.url=c.truncate(l.url,s))},o.prototype._applyIntegrationsMetadata=function(t){var e=t.sdk,n=Object.keys(this._integrations);e&&0<n.length&&(e.integrations=n)},o.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},o.prototype._captureEvent=function(t,e,n){return this._processEvent(t,e,n).then(function(t){return t.event_id},function(t){c.logger.error(t)})},o.prototype._processEvent=function(t,n,i){var r=this,e=this.getOptions(),o=e.beforeSend,s=e.sampleRate;if(!this._isEnabled())return c.SyncPromise.reject(new c.SentryError("SDK not enabled, will not send event."));var a="transaction"===t.type;return!a&&"number"==typeof s&&Math.random()>s?c.SyncPromise.reject(new c.SentryError("Discarding event because it's not included in the random sample (sampling rate = "+s+")")):this._prepareEvent(t,i,n).then(function(t){if(null===t)throw new c.SentryError("An event processor returned null, will not send event.");if(n&&n.data&&!0===n.data.__sentry__||a||!o)return t;var e=o(t,n);if(void 0===e)throw new c.SentryError("`beforeSend` method has to return `null` or a valid event.");return c.isThenable(e)?e.then(function(t){return t},function(t){throw new c.SentryError("beforeSend rejected with "+t)}):e}).then(function(t){if(null===t)throw new c.SentryError("`beforeSend` returned `null`, will not send event.");var e=i&&i.getSession&&i.getSession();return!a&&e&&r._updateSessionFromEvent(e,t),r._sendEvent(t),t}).then(null,function(t){if(t instanceof c.SentryError)throw t;throw r.captureException(t,{data:{__sentry__:!0},originalException:t}),new c.SentryError("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)})},o.prototype._process=function(t){var e=this;this._processing+=1,t.then(function(t){return e._processing-=1,t},function(t){return e._processing-=1,t})},o);function o(t,e){this._integrations={},this._processing=0,this._backend=new t(e),(this._options=e).dsn&&(this._dsn=new c.Dsn(e.dsn))}n.BaseClient=r},{"./integration":25,"@sentry/hub":34,"@sentry/types":68,"@sentry/utils":78,tslib:101}],24:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/minimal");n.addBreadcrumb=i.addBreadcrumb,n.captureException=i.captureException,n.captureEvent=i.captureEvent,n.captureMessage=i.captureMessage,n.configureScope=i.configureScope,n.startTransaction=i.startTransaction,n.setContext=i.setContext,n.setExtra=i.setExtra,n.setExtras=i.setExtras,n.setTag=i.setTag,n.setTags=i.setTags,n.setUser=i.setUser,n.withScope=i.withScope;var r=t("@sentry/hub");n.addGlobalEventProcessor=r.addGlobalEventProcessor,n.getCurrentHub=r.getCurrentHub,n.getHubFromCarrier=r.getHubFromCarrier,n.Hub=r.Hub,n.makeMain=r.makeMain,n.Scope=r.Scope;var o=t("./api");n.API=o.API;var s=t("./baseclient");n.BaseClient=s.BaseClient;var a=t("./basebackend");n.BaseBackend=a.BaseBackend;var l=t("./request");n.eventToSentryRequest=l.eventToSentryRequest,n.sessionToSentryRequest=l.sessionToSentryRequest;var u=t("./sdk");n.initAndBind=u.initAndBind;var c=t("./transports/noop");n.NoopTransport=c.NoopTransport;var d=t("./version");n.SDK_VERSION=d.SDK_VERSION;var h=t("./integrations");n.Integrations=h},{"./api":21,"./basebackend":22,"./baseclient":23,"./integrations":28,"./request":29,"./sdk":30,"./transports/noop":31,"./version":32,"@sentry/hub":34,"@sentry/minimal":37}],25:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var a=t("tslib"),i=t("@sentry/hub"),r=t("@sentry/utils");function o(t){var e=t.defaultIntegrations&&a.__spread(t.defaultIntegrations)||[],n=t.integrations,i=[];if(Array.isArray(n)){var r=n.map(function(t){return t.name}),o=[];e.forEach(function(t){-1===r.indexOf(t.name)&&-1===o.indexOf(t.name)&&(i.push(t),o.push(t.name))}),n.forEach(function(t){-1===o.indexOf(t.name)&&(i.push(t),o.push(t.name))})}else i="function"==typeof n?(i=n(e),Array.isArray(i)?i:[i]):a.__spread(e);var s=i.map(function(t){return t.name});return-1!==s.indexOf("Debug")&&i.push.apply(i,a.__spread(i.splice(s.indexOf("Debug"),1))),i}function s(t){-1===n.installedIntegrations.indexOf(t.name)&&(t.setupOnce(i.addGlobalEventProcessor,i.getCurrentHub),n.installedIntegrations.push(t.name),r.logger.log("Integration installed: "+t.name))}n.installedIntegrations=[],n.getIntegrationsToSetup=o,n.setupIntegration=s,n.setupIntegrations=function(t){var e={};return o(t).forEach(function(t){s(e[t.name]=t)}),e}},{"@sentry/hub":34,"@sentry/utils":78,tslib:101}],26:[function(t,e,n){var i;Object.defineProperty(n,"__esModule",{value:!0});var r=(o.prototype.setupOnce=function(){i=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.__sentry_original__||this;return i.apply(n,t)}},o.id="FunctionToString",o);function o(){this.name=o.id}n.FunctionToString=r},{}],27:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("tslib"),s=t("@sentry/hub"),o=t("@sentry/utils"),r=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],a=(l.prototype.setupOnce=function(){s.addGlobalEventProcessor(function(t){var e=s.getCurrentHub();if(!e)return t;var n=e.getIntegration(l);if(n){var i=e.getClient(),r=i?i.getOptions():{},o=n._mergeOptions(r);if(n._shouldDropEvent(t,o))return null}return t})},l.prototype._shouldDropEvent=function(t,e){return this._isSentryError(t,e)?(o.logger.warn("Event dropped due to being internal Sentry Error.\nEvent: "+o.getEventDescription(t)),!0):this._isIgnoredError(t,e)?(o.logger.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+o.getEventDescription(t)),!0):this._isDeniedUrl(t,e)?(o.logger.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+o.getEventDescription(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0):!this._isAllowedUrl(t,e)&&(o.logger.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+o.getEventDescription(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0)},l.prototype._isSentryError=function(t,e){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(t){return!1}},l.prototype._isIgnoredError=function(t,n){return!(!n.ignoreErrors||!n.ignoreErrors.length)&&this._getPossibleEventMessages(t).some(function(e){return n.ignoreErrors.some(function(t){return o.isMatchingPattern(e,t)})})},l.prototype._isDeniedUrl=function(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;var n=this._getEventFilterUrl(t);return!!n&&e.denyUrls.some(function(t){return o.isMatchingPattern(n,t)})},l.prototype._isAllowedUrl=function(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;var n=this._getEventFilterUrl(t);return!n||e.allowUrls.some(function(t){return o.isMatchingPattern(n,t)})},l.prototype._mergeOptions=function(t){return void 0===t&&(t={}),{allowUrls:i.__spread(this._options.whitelistUrls||[],this._options.allowUrls||[],t.whitelistUrls||[],t.allowUrls||[]),denyUrls:i.__spread(this._options.blacklistUrls||[],this._options.denyUrls||[],t.blacklistUrls||[],t.denyUrls||[]),ignoreErrors:i.__spread(this._options.ignoreErrors||[],t.ignoreErrors||[],r),ignoreInternal:void 0===this._options.ignoreInternal||this._options.ignoreInternal}},l.prototype._getPossibleEventMessages=function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,i=t.value,r=void 0===i?"":i;return[""+r,(void 0===n?"":n)+": "+r]}catch(t){return o.logger.error("Cannot extract message for event "+o.getEventDescription(e)),[]}return[]},l.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace){var t=e.stacktrace.frames;return t&&t[t.length-1].filename||null}if(e.exception){var n=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return n&&n[n.length-1].filename||null}return null}catch(t){return o.logger.error("Cannot extract url for event "+o.getEventDescription(e)),null}},l.id="InboundFilters",l);function l(t){void 0===t&&(t={}),this._options=t,this.name=l.id}n.InboundFilters=a},{"@sentry/hub":34,"@sentry/utils":78,tslib:101}],28:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./functiontostring");n.FunctionToString=i.FunctionToString;var r=t("./inboundfilters");n.InboundFilters=r.InboundFilters},{"./functiontostring":26,"./inboundfilters":27}],29:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var p=t("tslib");function f(t){if(t.metadata&&t.metadata.sdk){var e=t.metadata.sdk;return{name:e.name,version:e.version}}}n.sessionToSentryRequest=function(t,e){var n=f(e);return{body:JSON.stringify(p.__assign({sent_at:(new Date).toISOString()},n&&{sdk:n}))+"\n"+JSON.stringify({type:"session"})+"\n"+JSON.stringify(t),type:"session",url:e.getEnvelopeEndpointWithUrlEncodedAuth()}},n.eventToSentryRequest=function(t,e){var n=f(e),i=t.type||"event",r="transaction"===i,o=t.debug_meta||{},s=o.transactionSampling,a=p.__rest(o,["transactionSampling"]),l=s||{},u=l.method,c=l.rate;0===Object.keys(a).length?delete t.debug_meta:t.debug_meta=a;var d={body:JSON.stringify(n?function(t,e){return e&&(t.sdk=t.sdk||{name:e.name,version:e.version},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=p.__spread(t.sdk.integrations||[],e.integrations||[]),t.sdk.packages=p.__spread(t.sdk.packages||[],e.packages||[])),t}(t,e.metadata.sdk):t),type:i,url:r?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(r){var h=JSON.stringify(p.__assign({event_id:t.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}))+"\n"+JSON.stringify({type:t.type,sample_rates:[{id:u,rate:c}]})+"\n"+d.body;d.body=h}return d}},{tslib:101}],30:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=t("@sentry/hub"),o=t("@sentry/utils");n.initAndBind=function(t,e){!0===e.debug&&o.logger.enable();var n=r.getCurrentHub(),i=new t(e);n.bindClient(i)}},{"@sentry/hub":34,"@sentry/utils":78}],31:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/types"),r=t("@sentry/utils"),o=(s.prototype.sendEvent=function(t){return r.SyncPromise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:i.Status.Skipped})},s.prototype.close=function(t){return r.SyncPromise.resolve(!0)},s);function s(){}n.NoopTransport=o},{"@sentry/types":68,"@sentry/utils":78}],32:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SDK_VERSION="6.2.1"},{}],33:[function(t,e,s){Object.defineProperty(s,"__esModule",{value:!0});var p=t("tslib"),u=t("@sentry/types"),f=t("@sentry/utils"),a=t("./scope"),c=t("./session");s.API_VERSION=3;var l=(n.prototype.isOlderThan=function(t){return this._version<t},n.prototype.bindClient=function(t){(this.getStackTop().client=t)&&t.setupIntegrations&&t.setupIntegrations()},n.prototype.pushScope=function(){var t=a.Scope.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},n.prototype.popScope=function(){return!(this.getStack().length<=1||!this.getStack().pop())},n.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},n.prototype.getClient=function(){return this.getStackTop().client},n.prototype.getScope=function(){return this.getStackTop().scope},n.prototype.getStack=function(){return this._stack},n.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},n.prototype.captureException=function(t,e){var n=this._lastEventId=f.uuid4(),i=e;if(!e){var r=void 0;try{throw new Error("Sentry syntheticException")}catch(t){r=t}i={originalException:t,syntheticException:r}}return this._invokeClient("captureException",t,p.__assign(p.__assign({},i),{event_id:n})),n},n.prototype.captureMessage=function(t,e,n){var i=this._lastEventId=f.uuid4(),r=n;if(!n){var o=void 0;try{throw new Error(t)}catch(t){o=t}r={originalException:t,syntheticException:o}}return this._invokeClient("captureMessage",t,e,p.__assign(p.__assign({},r),{event_id:i})),i},n.prototype.captureEvent=function(t,e){var n=this._lastEventId=f.uuid4();return this._invokeClient("captureEvent",t,p.__assign(p.__assign({},e),{event_id:n})),n},n.prototype.lastEventId=function(){return this._lastEventId},n.prototype.addBreadcrumb=function(t,e){var n=this.getStackTop(),i=n.scope,r=n.client;if(i&&r){var o=r.getOptions&&r.getOptions()||{},s=o.beforeBreadcrumb,a=void 0===s?null:s,l=o.maxBreadcrumbs,u=void 0===l?100:l;if(!(u<=0)){var c=f.dateTimestampInSeconds(),d=p.__assign({timestamp:c},t),h=a?f.consoleSandbox(function(){return a(d,e)}):d;null!==h&&i.addBreadcrumb(h,Math.min(u,100))}}},n.prototype.setUser=function(t){var e=this.getScope();e&&e.setUser(t)},n.prototype.setTags=function(t){var e=this.getScope();e&&e.setTags(t)},n.prototype.setExtras=function(t){var e=this.getScope();e&&e.setExtras(t)},n.prototype.setTag=function(t,e){var n=this.getScope();n&&n.setTag(t,e)},n.prototype.setExtra=function(t,e){var n=this.getScope();n&&n.setExtra(t,e)},n.prototype.setContext=function(t,e){var n=this.getScope();n&&n.setContext(t,e)},n.prototype.configureScope=function(t){var e=this.getStackTop(),n=e.scope,i=e.client;n&&i&&t(n)},n.prototype.run=function(t){var e=i(this);try{t(this)}finally{i(e)}},n.prototype.getIntegration=function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return f.logger.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},n.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},n.prototype.startTransaction=function(t,e){return this._callExtensionMethod("startTransaction",t,e)},n.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},n.prototype.captureSession=function(t){if(void 0===t&&(t=!1),t)return this.endSession();this._sendSessionUpdate()},n.prototype.endSession=function(){var t,e,n,i,r;null===(n=null===(e=null===(t=this.getStackTop())||void 0===t?void 0:t.scope)||void 0===e?void 0:e.getSession())||void 0===n||n.close(),this._sendSessionUpdate(),null===(r=null===(i=this.getStackTop())||void 0===i?void 0:i.scope)||void 0===r||r.setSession()},n.prototype.startSession=function(t){var e=this.getStackTop(),n=e.scope,i=e.client,r=i&&i.getOptions()||{},o=r.release,s=r.environment,a=new c.Session(p.__assign(p.__assign({release:o,environment:s},n&&{user:n.getUser()}),t));if(n){var l=n.getSession&&n.getSession();l&&l.status===u.SessionStatus.Ok&&l.update({status:u.SessionStatus.Exited}),this.endSession(),n.setSession(a)}return a},n.prototype._sendSessionUpdate=function(){var t=this.getStackTop(),e=t.scope,n=t.client;if(e){var i=e.getSession&&e.getSession();i&&n&&n.captureSession&&n.captureSession(i)}},n.prototype._invokeClient=function(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=this.getStackTop(),o=r.scope,s=r.client;s&&s[t]&&(e=s)[t].apply(e,p.__spread(n,[o]))},n.prototype._callExtensionMethod=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=d().__SENTRY__;if(i&&i.extensions&&"function"==typeof i.extensions[t])return i.extensions[t].apply(this,e);f.logger.warn("Extension method "+t+" couldn't be found, doing nothing.")},n);function n(t,e,n){void 0===e&&(e=new a.Scope),void 0===n&&(n=s.API_VERSION),this._version=n,this._stack=[{}],this.getStackTop().scope=e,this.bindClient(t)}function d(){var t=f.getGlobalObject();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function i(t){var e=d(),n=g(e);return m(e,t),n}function h(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function g(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new l),t.__SENTRY__.hub}function m(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}s.Hub=l,s.getMainCarrier=d,s.makeMain=i,s.getCurrentHub=function(){var t=d();return h(t)&&!g(t).isOlderThan(s.API_VERSION)||m(t,new l),f.isNodeEnv()?function(e){var t,n,i;try{var r=null===(i=null===(n=null===(t=d().__SENTRY__)||void 0===t?void 0:t.extensions)||void 0===n?void 0:n.domain)||void 0===i?void 0:i.active;if(!r)return g(e);if(!h(r)||g(r).isOlderThan(s.API_VERSION)){var o=g(e).getStackTop();m(r,new l(o.client,a.Scope.clone(o.scope)))}return g(r)}catch(t){return g(e)}}(t):g(t)},s.getActiveDomain=function(){f.logger.warn("Function `getActiveDomain` is deprecated and will be removed in a future version.");var t=d().__SENTRY__;return t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active},s.getHubFromCarrier=g,s.setHubOnCarrier=m},{"./scope":35,"./session":36,"@sentry/types":68,"@sentry/utils":78,tslib:101}],34:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./scope");n.addGlobalEventProcessor=i.addGlobalEventProcessor,n.Scope=i.Scope;var r=t("./session");n.Session=r.Session;var o=t("./hub");n.getActiveDomain=o.getActiveDomain,n.getCurrentHub=o.getCurrentHub,n.getHubFromCarrier=o.getHubFromCarrier,n.getMainCarrier=o.getMainCarrier,n.Hub=o.Hub,n.makeMain=o.makeMain,n.setHubOnCarrier=o.setHubOnCarrier},{"./hub":33,"./scope":35,"./session":36}],35:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var u=t("tslib"),c=t("@sentry/utils"),i=(r.clone=function(t){var e=new r;return t&&(e._breadcrumbs=u.__spread(t._breadcrumbs),e._tags=u.__assign({},t._tags),e._extra=u.__assign({},t._extra),e._contexts=u.__assign({},t._contexts),e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=u.__spread(t._eventProcessors)),e},r.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},r.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},r.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},r.prototype.getUser=function(){return this._user},r.prototype.setTags=function(t){return this._tags=u.__assign(u.__assign({},this._tags),t),this._notifyScopeListeners(),this},r.prototype.setTag=function(t,e){var n;return this._tags=u.__assign(u.__assign({},this._tags),((n={})[t]=e,n)),this._notifyScopeListeners(),this},r.prototype.setExtras=function(t){return this._extra=u.__assign(u.__assign({},this._extra),t),this._notifyScopeListeners(),this},r.prototype.setExtra=function(t,e){var n;return this._extra=u.__assign(u.__assign({},this._extra),((n={})[t]=e,n)),this._notifyScopeListeners(),this},r.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},r.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},r.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},r.prototype.setTransaction=function(t){return this.setTransactionName(t)},r.prototype.setContext=function(t,e){var n;return null===e?delete this._contexts[t]:this._contexts=u.__assign(u.__assign({},this._contexts),((n={})[t]=e,n)),this._notifyScopeListeners(),this},r.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},r.prototype.getSpan=function(){return this._span},r.prototype.getTransaction=function(){var t,e,n,i,r=this.getSpan();return(null===(t=r)||void 0===t?void 0:t.transaction)?null===(e=r)||void 0===e?void 0:e.transaction:(null===(i=null===(n=r)||void 0===n?void 0:n.spanRecorder)||void 0===i?void 0:i.spans[0])?r.spanRecorder.spans[0]:void 0},r.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},r.prototype.getSession=function(){return this._session},r.prototype.update=function(t){if(!t)return this;if("function"!=typeof t)return t instanceof r?(this._tags=u.__assign(u.__assign({},this._tags),t._tags),this._extra=u.__assign(u.__assign({},this._extra),t._extra),this._contexts=u.__assign(u.__assign({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint)):c.isPlainObject(t)&&(t=t,this._tags=u.__assign(u.__assign({},this._tags),t.tags),this._extra=u.__assign(u.__assign({},this._extra),t.extra),this._contexts=u.__assign(u.__assign({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint)),this;var e=t(this);return e instanceof r?e:this},r.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},r.prototype.addBreadcrumb=function(t,e){var n=u.__assign({timestamp:c.dateTimestampInSeconds()},t);return this._breadcrumbs=void 0!==e&&0<=e?u.__spread(this._breadcrumbs,[n]).slice(-e):u.__spread(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},r.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},r.prototype.applyToEvent=function(t,e){var n;if(this._extra&&Object.keys(this._extra).length&&(t.extra=u.__assign(u.__assign({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=u.__assign(u.__assign({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=u.__assign(u.__assign({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=u.__assign(u.__assign({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=u.__assign({trace:this._span.getTraceContext()},t.contexts);var i=null===(n=this._span.transaction)||void 0===n?void 0:n.name;i&&(t.tags=u.__assign({transaction:i},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=u.__spread(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=0<t.breadcrumbs.length?t.breadcrumbs:void 0,this._notifyEventProcessors(u.__spread(o(),this._eventProcessors),t,e)},r.prototype._notifyEventProcessors=function(r,o,s,a){var l=this;return void 0===a&&(a=0),new c.SyncPromise(function(e,t){var n=r[a];if(null===o||"function"!=typeof n)e(o);else{var i=n(u.__assign({},o),s);c.isThenable(i)?i.then(function(t){return l._notifyEventProcessors(r,t,s,a+1).then(e)}).then(null,t):l._notifyEventProcessors(r,i,s,a+1).then(e).then(null,t)}})},r.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(t){t(e)}),this._notifyingListeners=!1)},r.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},r);function r(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}function o(){var t=c.getGlobalObject();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}n.Scope=i,n.addGlobalEventProcessor=function(t){o().push(t)}},{"@sentry/utils":78,tslib:101}],36:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/types"),r=t("@sentry/utils"),o=(s.prototype.update=function(t){void 0===t&&(t={}),t.user&&(t.user.ip_address&&(this.ipAddress=t.user.ip_address),t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Date.now(),t.sid&&(this.sid=32===t.sid.length?t.sid:r.uuid4()),void 0!==t.init&&(this.init=t.init),t.did&&(this.did=""+t.did),"number"==typeof t.started&&(this.started=t.started),"number"==typeof t.duration?this.duration=t.duration:this.duration=this.timestamp-this.started,t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),t.ipAddress&&(this.ipAddress=t.ipAddress),t.userAgent&&(this.userAgent=t.userAgent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)},s.prototype.close=function(t){t?this.update({status:t}):this.status===i.SessionStatus.Ok?this.update({status:i.SessionStatus.Exited}):this.update()},s.prototype.toJSON=function(){return r.dropUndefinedKeys({sid:""+this.sid,init:this.init,started:new Date(this.started).toISOString(),timestamp:new Date(this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:r.dropUndefinedKeys({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},s);function s(t){this.errors=0,this.sid=r.uuid4(),this.timestamp=Date.now(),this.started=Date.now(),this.duration=0,this.status=i.SessionStatus.Ok,this.init=!0,t&&this.update(t)}n.Session=o},{"@sentry/types":68,"@sentry/utils":78}],37:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=t("tslib"),o=t("@sentry/hub");function s(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=o.getCurrentHub();if(i&&i[t])return i[t].apply(i,r.__spread(e));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}n.captureException=function(t,e){var n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return s("captureException",t,{captureContext:e,originalException:t,syntheticException:n})},n.captureMessage=function(t,e){var n;try{throw new Error(t)}catch(t){n=t}var i="string"!=typeof e?{captureContext:e}:void 0;return s("captureMessage",t,"string"==typeof e?e:void 0,r.__assign({originalException:t,syntheticException:n},i))},n.captureEvent=function(t){return s("captureEvent",t)},n.configureScope=function(t){s("configureScope",t)},n.addBreadcrumb=function(t){s("addBreadcrumb",t)},n.setContext=function(t,e){s("setContext",t,e)},n.setExtras=function(t){s("setExtras",t)},n.setTags=function(t){s("setTags",t)},n.setExtra=function(t,e){s("setExtra",t,e)},n.setTag=function(t,e){s("setTag",t,e)},n.setUser=function(t){s("setUser",t)},n.withScope=function(t){s("withScope",t)},n._callOnClient=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.apply(void 0,r.__spread(["_invokeClient",t],e))},n.startTransaction=function(t,e){return s("startTransaction",r.__assign({},t),e)}},{"@sentry/hub":34,tslib:101}],38:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/utils"),r=t("../spanstatus"),o=t("../utils"),s=i.getGlobalObject();n.registerBackgroundTabDetection=function(){s&&s.document?s.document.addEventListener("visibilitychange",function(){var t=o.getActiveTransaction();s.document.hidden&&t&&(i.logger.log("[Tracing] Transaction: "+r.SpanStatus.Cancelled+" -> since tab moved to the background, op: "+t.op),t.status||t.setStatus(r.SpanStatus.Cancelled),t.setTag("visibilitychange","document.hidden"),t.finish())}):i.logger.warn("[Tracing] Could not set up background tab detection due to lack of global document")}},{"../spanstatus":65,"../utils":67,"@sentry/utils":78}],39:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var p=t("tslib"),f=t("@sentry/utils"),g=t("../hubextensions"),i=t("../idletransaction"),m=t("../spanstatus"),y=t("../utils"),h=t("./backgroundtab"),r=t("./metrics"),v=t("./request"),o=t("./router");n.DEFAULT_MAX_TRANSACTION_DURATION_SECONDS=600;var s=p.__assign({idleTimeout:i.DEFAULT_IDLE_TIMEOUT,markBackgroundTransactions:!0,maxTransactionDuration:n.DEFAULT_MAX_TRANSACTION_DURATION_SECONDS,routingInstrumentation:o.defaultRoutingInstrumentation,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0},v.defaultRequestInstrumentationOptions),a=(l.prototype.setupOnce=function(t,e){var n=this;this._getCurrentHub=e,this._emitOptionsWarning&&(f.logger.warn("[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),f.logger.warn("[Tracing] We added a reasonable default for you: "+v.defaultRequestInstrumentationOptions.tracingOrigins));var i=this.options,r=i.routingInstrumentation,o=i.startTransactionOnLocationChange,s=i.startTransactionOnPageLoad,a=i.markBackgroundTransactions,l=i.traceFetch,u=i.traceXHR,c=i.tracingOrigins,d=i.shouldCreateSpanForRequest;r(function(t){return n._createRouteTransaction(t)},s,o),a&&h.registerBackgroundTabDetection(),v.registerRequestInstrumentation({traceFetch:l,traceXHR:u,tracingOrigins:c,shouldCreateSpanForRequest:d})},l.prototype._createRouteTransaction=function(t){var n=this;if(this._getCurrentHub){var e=this.options,i=e.beforeNavigate,r=e.idleTimeout,o=e.maxTransactionDuration,s="pageload"===t.op?b():void 0,a=p.__assign(p.__assign(p.__assign({},t),s),{trimEnd:!0}),l="function"==typeof i?i(a):a,u=void 0===l?p.__assign(p.__assign({},a),{sampled:!1}):l;!1===u.sampled&&f.logger.log("[Tracing] Will not send "+u.op+" transaction because of beforeNavigate."),f.logger.log("[Tracing] Starting "+u.op+" transaction on scope");var c=this._getCurrentHub(),d=f.getGlobalObject().location,h=g.startIdleTransaction(c,u,r,!0,{location:d});return h.registerBeforeFinishCallback(function(t,e){n._metrics.addPerformanceEntries(t),function(t,e,n){var i=n-e.startTimestamp;n&&(t<i||i<0)&&(e.setStatus(m.SpanStatus.DeadlineExceeded),e.setTag("maxTransactionDurationExceeded","true"))}(y.secToMs(o),t,e)}),h}f.logger.warn("[Tracing] Did not create "+t.op+" transaction because _getCurrentHub is invalid.")},l.id="BrowserTracing",l);function l(t){this.name=l.id,this._metrics=new r.MetricsInstrumentation,this._emitOptionsWarning=!1;var e=v.defaultRequestInstrumentationOptions.tracingOrigins;t&&t.tracingOrigins&&Array.isArray(t.tracingOrigins)&&0!==t.tracingOrigins.length?e=t.tracingOrigins:this._emitOptionsWarning=!0,this.options=p.__assign(p.__assign(p.__assign({},s),t),{tracingOrigins:e})}function b(){var t=u("sentry-trace");if(t)return y.extractTraceparentData(t)}function u(t){var e=document.querySelector("meta[name="+t+"]");return e?e.getAttribute("content"):null}n.BrowserTracing=a,n.getHeaderContext=b,n.getMetaContent=u},{"../hubextensions":56,"../idletransaction":57,"../spanstatus":65,"../utils":67,"./backgroundtab":38,"./metrics":41,"./request":42,"./router":43,"@sentry/utils":78,tslib:101}],40:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./browsertracing");n.BrowserTracing=i.BrowserTracing;var r=t("./request");n.registerRequestInstrumentation=r.registerRequestInstrumentation,n.defaultRequestInstrumentationOptions=r.defaultRequestInstrumentationOptions},{"./browsertracing":39,"./request":42}],41:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=t("tslib"),f=t("@sentry/utils"),g=t("../utils"),i=t("./web-vitals/getCLS"),o=t("./web-vitals/getFID"),s=t("./web-vitals/getLCP"),a=t("./web-vitals/getTTFB"),m=t("./web-vitals/lib/getFirstHidden"),y=f.getGlobalObject(),l=(u.prototype.addPerformanceEntries=function(l){var u=this;if(y&&y.performance&&y.performance.getEntries&&f.browserPerformanceTimeOrigin){f.logger.log("[Tracing] Adding & adjusting spans using Performance API");var c,d,h,p=g.msToSec(f.browserPerformanceTimeOrigin);if(y.document)for(var t=0;t<document.scripts.length;t++)if("true"===document.scripts[t].dataset.entry){c=document.scripts[t].src;break}if(y.performance.getEntries().slice(this._performanceCursor).forEach(function(t){var e=g.msToSec(t.startTime),n=g.msToSec(t.duration);if(!("navigation"===l.op&&p+e<l.startTimestamp))switch(t.entryType){case"navigation":!function(t,e,n){b(t,e,"unloadEvent",n),b(t,e,"redirect",n),b(t,e,"domContentLoadedEvent",n),b(t,e,"loadEvent",n),b(t,e,"connect",n),b(t,e,"secureConnection",n,"connectEnd"),b(t,e,"fetch",n,"domainLookupStart"),b(t,e,"domainLookup",n),function(t,e,n){_(t,{op:"browser",description:"request",startTimestamp:n+g.msToSec(e.requestStart),endTimestamp:n+g.msToSec(e.responseEnd)}),_(t,{op:"browser",description:"response",startTimestamp:n+g.msToSec(e.responseStart),endTimestamp:n+g.msToSec(e.responseEnd)})}(t,e,n)}(l,t,p);break;case"mark":case"paint":case"measure":var i=function(t,e,n,i,r){var o=r+n,s=o+i;return _(t,{description:e.name,endTimestamp:s,op:e.entryType,startTimestamp:o}),o}(l,t,e,n,p);void 0===h&&"sentry-tracing-init"===t.name&&(h=i);var r=m.getFirstHidden(),o=t.startTime<r.timeStamp;"first-paint"===t.name&&o&&(f.logger.log("[Measurements] Adding FP"),u._measurements.fp={value:t.startTime},u._measurements["mark.fp"]={value:i}),"first-contentful-paint"===t.name&&o&&(f.logger.log("[Measurements] Adding FCP"),u._measurements.fcp={value:t.startTime},u._measurements["mark.fcp"]={value:i});break;case"resource":var s=t.name.replace(window.location.origin,""),a=v(l,t,s,e,n,p);void 0===d&&-1<(c||"").indexOf(s)&&(d=a)}}),void 0!==d&&void 0!==h&&_(l,{description:"evaluation",endTimestamp:h,op:"script",startTimestamp:d}),this._performanceCursor=Math.max(performance.getEntries().length-1,0),this._trackNavigator(l),"pageload"===l.op){var o=g.msToSec(f.browserPerformanceTimeOrigin);["fcp","fp","lcp","ttfb"].forEach(function(t){if(u._measurements[t]&&!(o>=l.startTimestamp)){var e=u._measurements[t].value,n=o+g.msToSec(e),i=Math.abs(1e3*(n-l.startTimestamp)),r=i-e;f.logger.log("[Measurements] Normalized "+t+" from "+e+" to "+i+" ("+r+")"),u._measurements[t].value=i}}),this._measurements["mark.fid"]&&this._measurements.fid&&_(l,{description:"first input delay",endTimestamp:this._measurements["mark.fid"].value+g.msToSec(this._measurements.fid.value),op:"web.vitals",startTimestamp:this._measurements["mark.fid"].value}),l.setMeasurements(this._measurements)}}},u.prototype._trackCLS=function(){var e=this;i.getCLS(function(t){t.entries.pop()&&(f.logger.log("[Measurements] Adding CLS"),e._measurements.cls={value:t.value})})},u.prototype._trackNavigator=function(t){var e=y.navigator;if(e){var n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),c(n.rtt)&&(this._measurements["connection.rtt"]={value:n.rtt}),c(n.downlink)&&(this._measurements["connection.downlink"]={value:n.downlink})),c(e.deviceMemory)&&t.setTag("deviceMemory",String(e.deviceMemory)),c(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}},u.prototype._trackLCP=function(){var r=this;s.getLCP(function(t){var e=t.entries.pop();if(e){var n=g.msToSec(performance.timeOrigin),i=g.msToSec(e.startTime);f.logger.log("[Measurements] Adding LCP"),r._measurements.lcp={value:t.value},r._measurements["mark.lcp"]={value:n+i}}})},u.prototype._trackFID=function(){var r=this;o.getFID(function(t){var e=t.entries.pop();if(e){var n=g.msToSec(performance.timeOrigin),i=g.msToSec(e.startTime);f.logger.log("[Measurements] Adding FID"),r._measurements.fid={value:t.value},r._measurements["mark.fid"]={value:n+i}}})},u.prototype._trackTTFB=function(){var r=this;a.getTTFB(function(t){var e,n=t.entries.pop();if(n){f.logger.log("[Measurements] Adding TTFB"),r._measurements.ttfb={value:t.value};var i=t.value-(null!=(e=t.entries[0])?e:n).requestStart;r._measurements["ttfb.requestTime"]={value:i}}})},u);function u(){this._measurements={},this._performanceCursor=0,y&&y.performance&&(y.performance.mark&&y.performance.mark("sentry-tracing-init"),this._trackCLS(),this._trackLCP(),this._trackFID(),this._trackTTFB())}function v(t,e,n,i,r,o){if("xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType){var s={};"transferSize"in e&&(s["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(s["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(s["Decoded Body Size"]=e.decodedBodySize);var a=o+i,l=a+r;return _(t,{description:n,endTimestamp:l,op:e.initiatorType?"resource."+e.initiatorType:"resource",startTimestamp:a,data:s}),l}}function b(t,e,n,i,r){var o=r?e[r]:e[n+"End"],s=e[n+"Start"];s&&o&&_(t,{op:"browser",description:n,startTimestamp:i+g.msToSec(s),endTimestamp:i+g.msToSec(o)})}function _(t,e){var n=e.startTimestamp,i=r.__rest(e,["startTimestamp"]);return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild(r.__assign({startTimestamp:n},i))}function c(t){return"number"==typeof t&&isFinite(t)}n.MetricsInstrumentation=l,n.addResourceSpans=v,n._startChild=_},{"../utils":67,"./web-vitals/getCLS":44,"./web-vitals/getFID":45,"./web-vitals/getLCP":46,"./web-vitals/getTTFB":47,"./web-vitals/lib/getFirstHidden":50,"@sentry/utils":78,tslib:101}],42:[function(t,e,c){Object.defineProperty(c,"__esModule",{value:!0});var d=t("tslib"),h=t("@sentry/hub"),p=t("@sentry/utils"),f=t("../utils");function g(t,e,n){var i,r=null===(i=h.getCurrentHub().getClient())||void 0===i?void 0:i.getOptions();if(r&&f.hasTracingEnabled(r)&&t.fetchData&&e(t.fetchData.url))if(t.endTimestamp&&t.fetchData.__span){if(a=n[t.fetchData.__span]){var o=t.response;o&&a.setHttpStatus(o.status),a.finish(),delete n[t.fetchData.__span]}}else{var s=f.getActiveTransaction();if(s){var a=s.startChild({data:d.__assign(d.__assign({},t.fetchData),{type:"fetch"}),description:t.fetchData.method+" "+t.fetchData.url,op:"http"});t.fetchData.__span=a.spanId,n[a.spanId]=a;var l=t.args[0]=t.args[0],u=t.args[1]=t.args[1]||{},c=u.headers;p.isInstanceOf(l,Request)&&(c=l.headers),c?"function"==typeof c.append?c.append("sentry-trace",a.toTraceparent()):c=Array.isArray(c)?d.__spread(c,[["sentry-trace",a.toTraceparent()]]):d.__assign(d.__assign({},c),{"sentry-trace":a.toTraceparent()}):c={"sentry-trace":a.toTraceparent()},u.headers=c}}}function m(t,e,n){var i,r=null===(i=h.getCurrentHub().getClient())||void 0===i?void 0:i.getOptions();if(r&&f.hasTracingEnabled(r)&&t.xhr&&t.xhr.__sentry_xhr__&&e(t.xhr.__sentry_xhr__.url)&&!t.xhr.__sentry_own_request__){var o=t.xhr.__sentry_xhr__;if(t.endTimestamp&&t.xhr.__sentry_xhr_span_id__){(a=n[t.xhr.__sentry_xhr_span_id__])&&(a.setHttpStatus(o.status_code),a.finish(),delete n[t.xhr.__sentry_xhr_span_id__])}else{var s=f.getActiveTransaction();if(s){var a=s.startChild({data:d.__assign(d.__assign({},o.data),{type:"xhr",method:o.method,url:o.url}),description:o.method+" "+o.url,op:"http"});if(t.xhr.__sentry_xhr_span_id__=a.spanId,n[t.xhr.__sentry_xhr_span_id__]=a,t.xhr.setRequestHeader)try{t.xhr.setRequestHeader("sentry-trace",a.toTraceparent())}catch(t){}}}}}c.DEFAULT_TRACING_ORIGINS=["localhost",/^\//],c.defaultRequestInstrumentationOptions={traceFetch:!0,traceXHR:!0,tracingOrigins:c.DEFAULT_TRACING_ORIGINS},c.registerRequestInstrumentation=function(t){function e(e){if(a[e])return a[e];var t=o;return a[e]=t.some(function(t){return p.isMatchingPattern(e,t)})&&!p.isMatchingPattern(e,"sentry_key"),a[e]}var n=d.__assign(d.__assign({},c.defaultRequestInstrumentationOptions),t),i=n.traceFetch,r=n.traceXHR,o=n.tracingOrigins,s=n.shouldCreateSpanForRequest,a={},l=e;"function"==typeof s&&(l=function(t){return e(t)&&s(t)});var u={};i&&p.addInstrumentationHandler({callback:function(t){g(t,l,u)},type:"fetch"}),r&&p.addInstrumentationHandler({callback:function(t){m(t,l,u)},type:"xhr"})},c.fetchCallback=g,c.xhrCallback=m},{"../utils":67,"@sentry/hub":34,"@sentry/utils":78,tslib:101}],43:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var s=t("@sentry/utils"),a=s.getGlobalObject();n.defaultRoutingInstrumentation=function(i,t,e){if(void 0===t&&(t=!0),void 0===e&&(e=!0),a&&a.location){var r,o=a.location.href;t&&(r=i({name:a.location.pathname,op:"pageload"})),e&&s.addInstrumentationHandler({callback:function(t){var e=t.to,n=t.from;void 0===n&&o&&-1!==o.indexOf(e)?o=void 0:n!==e&&(o=void 0,r&&(s.logger.log("[Tracing] Finishing current transaction with op: "+r.op),r.finish()),r=i({name:a.location.pathname,op:"navigation"}))},type:"history"})}else s.logger.warn("Could not initialize routing instrumentation due to invalid location")}},{"@sentry/utils":78}],44:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0});var s=t("./lib/bindReporter"),a=t("./lib/initMetric"),l=t("./lib/observe"),u=t("./lib/onHidden");n.getCLS=function(t,e){void 0===e&&(e=!1);function n(t){t.hadRecentInput||(r.value+=t.value,r.entries.push(t),i())}var i,r=a.initMetric("CLS",0),o=l.observe("layout-shift",n);o&&(i=s.bindReporter(t,r,o,e),u.onHidden(function(t){var e=t.isUnloading;o.takeRecords().map(n),e&&(r.isFinal=!0),i()}))}},{"./lib/bindReporter":48,"./lib/initMetric":51,"./lib/observe":52,"./lib/onHidden":53}],45:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0});var s=t("./lib/bindReporter"),a=t("./lib/getFirstHidden"),l=t("./lib/initMetric"),u=t("./lib/observe"),c=t("./lib/onHidden");n.getFID=function(t){function e(t){t.startTime<i.timeStamp&&(n.value=t.processingStart-t.startTime,n.entries.push(t),n.isFinal=!0,o())}var n=l.initMetric("FID"),i=a.getFirstHidden(),r=u.observe("first-input",e),o=s.bindReporter(t,n,r);r?c.onHidden(function(){r.takeRecords().map(e),r.disconnect()},!0):window.perfMetrics&&window.perfMetrics.onFirstInputDelay&&window.perfMetrics.onFirstInputDelay(function(t,e){e.timeStamp<i.timeStamp&&(n.value=t,n.isFinal=!0,n.entries=[{entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t}],o())})}},{"./lib/bindReporter":48,"./lib/getFirstHidden":50,"./lib/initMetric":51,"./lib/observe":52,"./lib/onHidden":53}],46:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0});var l=t("./lib/bindReporter"),u=t("./lib/getFirstHidden"),c=t("./lib/initMetric"),d=t("./lib/observe"),h=t("./lib/onHidden"),p=t("./lib/whenInput");n.getLCP=function(t,e){void 0===e&&(e=!1);function n(t){var e=t.startTime;e<o.timeStamp?(r.value=e,r.entries.push(t)):r.isFinal=!0,i()}var i,r=c.initMetric("LCP"),o=u.getFirstHidden(),s=d.observe("largest-contentful-paint",n);if(s){i=l.bindReporter(t,r,s,e);function a(){r.isFinal||(s.takeRecords().map(n),r.isFinal=!0,i())}p.whenInput().then(a),h.onHidden(a,!0)}}},{"./lib/bindReporter":48,"./lib/getFirstHidden":50,"./lib/initMetric":51,"./lib/observe":52,"./lib/onHidden":53,"./lib/whenInput":54}],47:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/utils"),r=t("./lib/initMetric"),o=i.getGlobalObject();n.getTTFB=function(e){var n=r.initMetric("TTFB");!function(t){"complete"===document.readyState?setTimeout(t,0):addEventListener("pageshow",t)}(function(){try{var t=o.performance.getEntriesByType("navigation")[0]||function(){var t=o.performance.timing,e={entryType:"navigation",startTime:0};for(var n in t)"navigationStart"!==n&&"toJSON"!==n&&(e[n]=Math.max(t[n]-t.navigationStart,0));return e}();n.value=n.delta=t.responseStart,n.entries=[t],e(n)}catch(t){}})}},{"./lib/initMetric":51,"@sentry/utils":78}],48:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0}),n.bindReporter=function(t,e,n,i){var r;return function(){n&&e.isFinal&&n.disconnect(),0<=e.value&&(i||e.isFinal||"hidden"===document.visibilityState)&&(e.delta=e.value-(r||0),(e.delta||e.isFinal||void 0===r)&&(t(e),r=e.value))}}},{}],49:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0}),n.generateUniqueID=function(){return Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12)}},{}],50:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0});var i,r=t("./onHidden");n.getFirstHidden=function(){return void 0===i&&(i="hidden"===document.visibilityState?0:1/0,r.onHidden(function(t){var e=t.timeStamp;return i=e},!0)),{get timeStamp(){return i}}}},{"./onHidden":53}],51:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0});var i=t("./generateUniqueID");n.initMetric=function(t,e){return void 0===e&&(e=-1),{name:t,value:e,delta:0,entries:[],id:i.generateUniqueID(),isFinal:!1}}},{"./generateUniqueID":49}],52:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0}),n.observe=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var n=new PerformanceObserver(function(t){return t.getEntries().map(e)});return n.observe({type:t,buffered:!0}),n}}catch(t){}}},{}],53:[function(t,e,n){
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0});function i(t){r=!t.persisted}var r=!1,o=!1;n.onHidden=function(n,t){void 0===t&&(t=!1),o||(addEventListener("pagehide",i),addEventListener("beforeunload",function(){}),o=!0),addEventListener("visibilitychange",function(t){var e=t.timeStamp;"hidden"===document.visibilityState&&n({timeStamp:e,isUnloading:r})},{capture:!0,once:t})}},{}],54:[function(t,e,n){var i;
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(n,"__esModule",{value:!0}),n.whenInput=function(){return i=i||new Promise(function(e){return["scroll","keydown","pointerdown"].map(function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})})})}},{}],55:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/utils"),r=t("./spanstatus"),o=t("./utils");function s(){var t=o.getActiveTransaction();t&&(i.logger.log("[Tracing] Transaction: "+r.SpanStatus.InternalError+" -> Global error occured"),t.setStatus(r.SpanStatus.InternalError))}n.registerErrorInstrumentation=function(){i.addInstrumentationHandler({callback:s,type:"error"}),i.addInstrumentationHandler({callback:s,type:"unhandledrejection"})}},{"./spanstatus":65,"./utils":67,"@sentry/utils":78}],56:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var u=t("tslib"),i=t("@sentry/hub"),r=t("@sentry/types"),o=t("@sentry/utils"),s=t("./errors"),c=t("./idletransaction"),a=t("./transaction"),l=t("./utils");function d(){var t=this.getScope();if(t){var e=t.getSpan();if(e)return{"sentry-trace":e.toTraceparent()}}return{}}function h(t,e,n){return l.hasTracingEnabled(e)?void 0!==t.sampled?(t.setMetadata({transactionSampling:{method:r.TransactionSamplingMethod.Explicit}}),t):("function"==typeof e.tracesSampler?(i=e.tracesSampler(n),t.setMetadata({transactionSampling:{method:r.TransactionSamplingMethod.Sampler,rate:Number(i)}})):void 0!==n.parentSampled?(i=n.parentSampled,t.setMetadata({transactionSampling:{method:r.TransactionSamplingMethod.Inheritance}})):(i=e.tracesSampleRate,t.setMetadata({transactionSampling:{method:r.TransactionSamplingMethod.Rate,rate:Number(i)}})),function(t){if(isNaN(t)||"number"!=typeof t&&"boolean"!=typeof t)return o.logger.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got "+JSON.stringify(t)+" of type "+JSON.stringify(typeof t)+"."),!1;if(t<0||1<t)return o.logger.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got "+t+"."),!1;return!0}(i)?i?(t.sampled=Math.random()<i,t.sampled?o.logger.log("[Tracing] starting "+t.op+" transaction - "+t.name):o.logger.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = "+Number(i)+")"),t):(o.logger.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(o.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)):(t.sampled=!1,t);var i}function p(t,e){var n,i,r=(null===(n=this.getClient())||void 0===n?void 0:n.getOptions())||{},o=new a.Transaction(t,this);return(o=h(o,r,u.__assign({parentSampled:t.parentSampled,transactionContext:t},e))).sampled&&o.initSpanRecorder(null===(i=r._experiments)||void 0===i?void 0:i.maxSpans),o}function f(){var t=i.getMainCarrier();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=p),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=d))}n.startIdleTransaction=function(t,e,n,i,r){var o,s,a=(null===(o=t.getClient())||void 0===o?void 0:o.getOptions())||{},l=new c.IdleTransaction(e,t,n,i);return(l=h(l,a,u.__assign({parentSampled:e.parentSampled,transactionContext:e},r))).sampled&&l.initSpanRecorder(null===(s=a._experiments)||void 0===s?void 0:s.maxSpans),l},n._addTracingExtensions=f,n.addExtensionMethods=function(){f(),s.registerErrorInstrumentation()}},{"./errors":55,"./idletransaction":57,"./transaction":66,"./utils":67,"@sentry/hub":34,"@sentry/types":68,"@sentry/utils":78,tslib:101}],57:[function(t,e,o){Object.defineProperty(o,"__esModule",{value:!0});var s=t("tslib"),a=t("@sentry/utils"),n=t("./span"),l=t("./spanstatus"),i=t("./transaction");o.DEFAULT_IDLE_TIMEOUT=1e3;var u,r=(u=n.SpanRecorder,s.__extends(c,u),c.prototype.add=function(e){var n=this;e.spanId!==this.transactionSpanId&&(e.finish=function(t){e.endTimestamp="number"==typeof t?t:a.timestampWithMs(),n._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),u.prototype.add.call(this,e)},c);function c(t,e,n,i){void 0===n&&(n="");var r=u.call(this,i)||this;return r._pushActivity=t,r._popActivity=e,r.transactionSpanId=n,r}o.IdleTransactionSpanRecorder=r;var d,h=(d=i.Transaction,s.__extends(p,d),p.prototype.finish=function(n){var e,t,i=this;if(void 0===n&&(n=a.timestampWithMs()),this._finished=!0,this.activities={},this.spanRecorder){a.logger.log("[Tracing] finishing IdleTransaction",new Date(1e3*n).toISOString(),this.op);try{for(var r=s.__values(this._beforeFinishCallbacks),o=r.next();!o.done;o=r.next())(0,o.value)(this,n)}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this.spanRecorder.spans=this.spanRecorder.spans.filter(function(t){if(t.spanId===i.spanId)return!0;t.endTimestamp||(t.endTimestamp=n,t.setStatus(l.SpanStatus.Cancelled),a.logger.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));var e=t.startTimestamp<n;return e||a.logger.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(t,void 0,2)),e}),a.logger.log("[Tracing] flushing IdleTransaction")}else a.logger.log("[Tracing] No active IdleTransaction");return this._onScope&&f(this._idleHub),d.prototype.finish.call(this,n)},p.prototype.registerBeforeFinishCallback=function(t){this._beforeFinishCallbacks.push(t)},p.prototype.initSpanRecorder=function(t){var e=this;this.spanRecorder||(this.spanRecorder=new r(function(t){e._finished||e._pushActivity(t)},function(t){e._finished||e._popActivity(t)},this.spanId,t),a.logger.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)},p.prototype._pushActivity=function(t){this._initTimeout&&(clearTimeout(this._initTimeout),this._initTimeout=void 0),a.logger.log("[Tracing] pushActivity: "+t),this.activities[t]=!0,a.logger.log("[Tracing] new activities count",Object.keys(this.activities).length)},p.prototype._popActivity=function(t){var e=this;if(this.activities[t]&&(a.logger.log("[Tracing] popActivity "+t),delete this.activities[t],a.logger.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){var n=this._idleTimeout,i=a.timestampWithMs()+n/1e3;setTimeout(function(){e._finished||e.finish(i)},n)}},p.prototype._beat=function(){if(clearTimeout(this._heartbeatTimer),!this._finished){var t=Object.keys(this.activities),e=t.length?t.reduce(function(t,e){return t+e}):"";e===this._prevHeartbeatString?this._heartbeatCounter+=1:this._heartbeatCounter=1,this._prevHeartbeatString=e,3<=this._heartbeatCounter?(a.logger.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus(l.SpanStatus.DeadlineExceeded),this.setTag("heartbeat","failed"),this.finish()):this._pingHeartbeat()}},p.prototype._pingHeartbeat=function(){var t=this;a.logger.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),this._heartbeatTimer=setTimeout(function(){t._beat()},5e3)},p);function p(t,e,n,i){void 0===n&&(n=o.DEFAULT_IDLE_TIMEOUT),void 0===i&&(i=!1);var r=d.call(this,t,e)||this;return r._idleHub=e,r._idleTimeout=n,r._onScope=i,r.activities={},r._heartbeatTimer=0,r._heartbeatCounter=0,r._finished=!1,r._beforeFinishCallbacks=[],e&&i&&(f(e),a.logger.log("Setting idle transaction on scope. Span ID: "+r.spanId),e.configureScope(function(t){return t.setSpan(r)})),r._initTimeout=setTimeout(function(){r._finished||r.finish()},r._idleTimeout),r}function f(t){if(t){var e=t.getScope();if(e)e.getTransaction()&&e.setSpan(void 0)}}o.IdleTransaction=h},{"./span":64,"./spanstatus":65,"./transaction":66,"@sentry/utils":78,tslib:101}],58:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("tslib"),r=t("./browser"),o=t("./hubextensions");n.addExtensionMethods=o.addExtensionMethods;var s=t("./integrations"),a=i.__assign(i.__assign({},s),{BrowserTracing:r.BrowserTracing});n.Integrations=a;var l=t("./span");n.Span=l.Span;var u=t("./transaction");n.Transaction=u.Transaction;var c=t("./browser");n.registerRequestInstrumentation=c.registerRequestInstrumentation,n.defaultRequestInstrumentationOptions=c.defaultRequestInstrumentationOptions;var d=t("./spanstatus");n.SpanStatus=d.SpanStatus;var h=t("./idletransaction");n.IdleTransaction=h.IdleTransaction;var p=t("./hubextensions");n.startIdleTransaction=p.startIdleTransaction,o.addExtensionMethods();var f=t("./utils");n.extractTraceparentData=f.extractTraceparentData,n.getActiveTransaction=f.getActiveTransaction,n.hasTracingEnabled=f.hasTracingEnabled,n.stripUrlQueryAndFragment=f.stripUrlQueryAndFragment,n.TRACEPARENT_REGEXP=f.TRACEPARENT_REGEXP},{"./browser":40,"./hubextensions":56,"./idletransaction":57,"./integrations":60,"./span":64,"./spanstatus":65,"./transaction":66,"./utils":67,tslib:101}],59:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var l=t("tslib"),i=t("@sentry/utils"),r=(o.prototype.setupOnce=function(){this._router?function(e,t){void 0===t&&(t=[]),t.forEach(function(t){return function(t,n){var i=t[n];return t[n]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i.call.apply(i,l.__spread([this],function(t,e){return t.map(function(t){return"function"==typeof t?s(t,e):Array.isArray(t)?t.map(function(t){return"function"==typeof t?s(t,e):t}):t})}(t,n)))},t}(e,t)})}(this._router,this._methods):i.logger.error("ExpressIntegration is missing an Express instance")},o.id="Express",o);function o(t){void 0===t&&(t={}),this.name=o.id,this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}function s(s,a){var t=s.length;switch(t){case 2:return function(t,e){var n=e.__sentry_transaction;if(n){var i=n.startChild({description:s.name,op:"middleware."+a});e.once("finish",function(){i.finish()})}return s.call(this,t,e)};case 3:return function(t,e,i){var n,r=null===(n=e.__sentry_transaction)||void 0===n?void 0:n.startChild({description:s.name,op:"middleware."+a});s.call(this,t,e,function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null===(t=r)||void 0===t||t.finish(),i.call.apply(i,l.__spread([this],e))})};case 4:return function(t,e,n,i){var r,o=null===(r=n.__sentry_transaction)||void 0===r?void 0:r.startChild({description:s.name,op:"middleware."+a});s.call(this,t,e,n,function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null===(t=o)||void 0===t||t.finish(),i.call.apply(i,l.__spread([this],e))})};default:throw new Error("Express middleware takes 2-4 arguments. Got: "+t)}}n.Express=r},{"@sentry/utils":78,tslib:101}],60:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./express");n.Express=i.Express;var r=t("./postgres");n.Postgres=r.Postgres;var o=t("./mysql");n.Mysql=o.Mysql;var s=t("./mongo");n.Mongo=s.Mongo},{"./express":59,"./mongo":61,"./mysql":62,"./postgres":63}],61:[function(t,r,e){Object.defineProperty(e,"__esModule",{value:!0});var g=t("tslib"),m=t("@sentry/utils"),n=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],d={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]},i=(o.prototype.setupOnce=function(t,e){var n,i=this._useMongoose?"mongoose":"mongodb";try{n=m.dynamicRequire(r,i).Collection}catch(t){return void m.logger.error("Mongo Integration was unable to require `"+i+"` package.")}this._instrumentOperations(n,this._operations,e)},o.prototype._instrumentOperations=function(e,t,n){var i=this;t.forEach(function(t){return i._patchOperation(e,t,n)})},o.prototype._patchOperation=function(t,h,p){if(h in t.prototype){var f=this._getSpanContextFromOperationArguments.bind(this);m.fill(t.prototype,h,function(d){return function(){for(var t,e,n,i,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var s=r[r.length-1],a=null===(t=p().getScope())||void 0===t?void 0:t.getSpan();if("function"!=typeof s||"mapReduce"===h&&2===r.length){var l=null===(e=a)||void 0===e?void 0:e.startChild(f(this,h,r)),u=d.call.apply(d,g.__spread([this],r));return m.isThenable(u)?u.then(function(t){var e;return null===(e=l)||void 0===e||e.finish(),t}):(null===(n=l)||void 0===n||n.finish(),u)}var c=null===(i=a)||void 0===i?void 0:i.startChild(f(this,h,r.slice(0,-1)));return d.call.apply(d,g.__spread([this],r.slice(0,-1),[function(t,e){var n;null===(n=c)||void 0===n||n.finish(),s(t,e)}]))}})}},o.prototype._getSpanContextFromOperationArguments=function(t,e,n){var i={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace},r={op:"db",description:e,data:i},o=d[e],s=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations;if(!o||!s)return r;try{if("mapReduce"===e){var a=g.__read(n,2),l=a[0],u=a[1];i[o[0]]="string"==typeof l?l:l.name||"<anonymous>",i[o[1]]="string"==typeof u?u:u.name||"<anonymous>"}else for(var c=0;c<o.length;c++)i[o[c]]=JSON.stringify(n[c])}catch(t){}return r},o.id="Mongo",o);function o(t){void 0===t&&(t={}),this.name=o.id,this._operations=Array.isArray(t.operations)?t.operations:n,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}e.Mongo=i},{"@sentry/utils":78,tslib:101}],62:[function(t,n,e){Object.defineProperty(e,"__esModule",{value:!0});var i=t("@sentry/utils"),r=(o.prototype.setupOnce=function(t,a){var e;try{e=i.dynamicRequire(n,"mysql/lib/Connection.js")}catch(t){return void i.logger.error("Mysql Integration was unable to require `mysql` package.")}i.fill(e.prototype,"query",function(i){return function(t,r,o){var e,n,s=null===(n=null===(e=a().getScope())||void 0===e?void 0:e.getSpan())||void 0===n?void 0:n.startChild({description:"string"==typeof t?t:t.sql,op:"db"});return"function"==typeof o?i.call(this,t,r,function(t,e,n){var i;null===(i=s)||void 0===i||i.finish(),o(t,e,n)}):"function"==typeof r?i.call(this,t,function(t,e,n){var i;null===(i=s)||void 0===i||i.finish(),r(t,e,n)}):i.call(this,t,r,o)}})},o.id="Mysql",o);function o(){this.name=o.id}e.Mysql=r},{"@sentry/utils":78}],63:[function(t,n,e){Object.defineProperty(e,"__esModule",{value:!0});var i=t("@sentry/utils"),r=(o.prototype.setupOnce=function(t,a){var e;try{e=i.dynamicRequire(n,"pg").Client}catch(t){return void i.logger.error("Postgres Integration was unable to require `pg` package.")}i.fill(e.prototype,"query",function(s){return function(t,i,r){var e,n,o=null===(n=null===(e=a().getScope())||void 0===e?void 0:e.getSpan())||void 0===n?void 0:n.startChild({description:"string"==typeof t?t:t.text,op:"db"});return"function"==typeof r?s.call(this,t,i,function(t,e){var n;null===(n=o)||void 0===n||n.finish(),r(t,e)}):"function"==typeof i?s.call(this,t,function(t,e){var n;null===(n=o)||void 0===n||n.finish(),i(t,e)}):s.call(this,t,i).then(function(t){var e;return null===(e=o)||void 0===e||e.finish(),t})}})},o.id="Postgres",o);function o(){this.name=o.id}e.Postgres=r},{"@sentry/utils":78}],64:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("tslib"),r=t("@sentry/utils"),o=t("./spanstatus"),s=(a.prototype.add=function(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)},a);function a(t){void 0===t&&(t=1e3),this.spans=[],this._maxlen=t}n.SpanRecorder=s;var l=(u.prototype.child=function(t){return this.startChild(t)},u.prototype.startChild=function(t){var e=new u(i.__assign(i.__assign({},t),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));return e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,e},u.prototype.setTag=function(t,e){var n;return this.tags=i.__assign(i.__assign({},this.tags),((n={})[t]=e,n)),this},u.prototype.setData=function(t,e){var n;return this.data=i.__assign(i.__assign({},this.data),((n={})[t]=e,n)),this},u.prototype.setStatus=function(t){return this.status=t,this},u.prototype.setHttpStatus=function(t){this.setTag("http.status_code",String(t));var e=o.SpanStatus.fromHttpCode(t);return e!==o.SpanStatus.UnknownError&&this.setStatus(e),this},u.prototype.isSuccess=function(){return this.status===o.SpanStatus.Ok},u.prototype.finish=function(t){this.endTimestamp="number"==typeof t?t:r.timestampWithMs()},u.prototype.toTraceparent=function(){var t="";return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),this.traceId+"-"+this.spanId+t},u.prototype.toContext=function(){return r.dropUndefinedKeys({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})},u.prototype.updateWithContext=function(t){var e,n,i,r,o;return this.data=null!=(e=t.data)?e:{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=null!=(n=t.spanId)?n:this.spanId,this.startTimestamp=null!=(i=t.startTimestamp)?i:this.startTimestamp,this.status=t.status,this.tags=null!=(r=t.tags)?r:{},this.traceId=null!=(o=t.traceId)?o:this.traceId,this},u.prototype.getTraceContext=function(){return r.dropUndefinedKeys({data:0<Object.keys(this.data).length?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:0<Object.keys(this.tags).length?this.tags:void 0,trace_id:this.traceId})},u.prototype.toJSON=function(){return r.dropUndefinedKeys({data:0<Object.keys(this.data).length?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:0<Object.keys(this.tags).length?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})},u);function u(t){if(this.traceId=r.uuid4(),this.spanId=r.uuid4().substring(16),this.startTimestamp=r.timestampWithMs(),this.tags={},this.data={},!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp)}n.Span=l},{"./spanstatus":65,"@sentry/utils":78,tslib:101}],65:[function(t,e,n){var i,r;Object.defineProperty(n,"__esModule",{value:!0}),(i=n.SpanStatus||(n.SpanStatus={})).Ok="ok",i.DeadlineExceeded="deadline_exceeded",i.Unauthenticated="unauthenticated",i.PermissionDenied="permission_denied",i.NotFound="not_found",i.ResourceExhausted="resource_exhausted",i.InvalidArgument="invalid_argument",i.Unimplemented="unimplemented",i.Unavailable="unavailable",i.InternalError="internal_error",i.UnknownError="unknown_error",i.Cancelled="cancelled",i.AlreadyExists="already_exists",i.FailedPrecondition="failed_precondition",i.Aborted="aborted",i.OutOfRange="out_of_range",i.DataLoss="data_loss",(r=n.SpanStatus||(n.SpanStatus={})).fromHttpCode=function(t){if(t<400)return r.Ok;if(400<=t&&t<500)switch(t){case 401:return r.Unauthenticated;case 403:return r.PermissionDenied;case 404:return r.NotFound;case 409:return r.AlreadyExists;case 413:return r.FailedPrecondition;case 429:return r.ResourceExhausted;default:return r.InvalidArgument}if(500<=t&&t<600)switch(t){case 501:return r.Unimplemented;case 503:return r.Unavailable;case 504:return r.DeadlineExceeded;default:return r.InternalError}return r.UnknownError}},{}],66:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var r,i=t("tslib"),o=t("@sentry/hub"),s=t("@sentry/utils"),a=t("./span"),l=(r=a.Span,i.__extends(u,r),u.prototype.setName=function(t){this.name=t},u.prototype.initSpanRecorder=function(t){void 0===t&&(t=1e3),this.spanRecorder||(this.spanRecorder=new a.SpanRecorder(t)),this.spanRecorder.add(this)},u.prototype.setMeasurements=function(t){this._measurements=i.__assign({},t)},u.prototype.setMetadata=function(t){this._metadata=i.__assign(i.__assign({},this._metadata),t)},u.prototype.finish=function(t){var e=this;if(void 0===this.endTimestamp){if(this.name||(s.logger.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),r.prototype.finish.call(this,t),!0===this.sampled){var n=this.spanRecorder?this.spanRecorder.spans.filter(function(t){return t!==e&&t.endTimestamp}):[];this._trimEnd&&0<n.length&&(this.endTimestamp=n.reduce(function(t,e){return t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t}).endTimestamp);var i={contexts:{trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",debug_meta:this._metadata};return 0<Object.keys(this._measurements).length&&(s.logger.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),this._hub.captureEvent(i)}s.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.")}},u.prototype.toContext=function(){var t=r.prototype.toContext.call(this);return s.dropUndefinedKeys(i.__assign(i.__assign({},t),{name:this.name,trimEnd:this._trimEnd}))},u.prototype.updateWithContext=function(t){var e;return r.prototype.updateWithContext.call(this,t),this.name=null!=(e=t.name)?e:"",this._trimEnd=t.trimEnd,this},u);function u(t,e){var n=r.call(this,t)||this;return n._metadata={},n._measurements={},n._hub=o.getCurrentHub(),s.isInstanceOf(e,o.Hub)&&(n._hub=e),n.name=t.name||"",n._trimEnd=t.trimEnd,n.transaction=n}n.Transaction=l},{"./span":64,"@sentry/hub":34,"@sentry/utils":78,tslib:101}],67:[function(t,e,i){Object.defineProperty(i,"__esModule",{value:!0});var r=t("@sentry/hub");i.TRACEPARENT_REGEXP=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$"),i.hasTracingEnabled=function(t){return"tracesSampleRate"in t||"tracesSampler"in t},i.extractTraceparentData=function(t){var e=t.match(i.TRACEPARENT_REGEXP);if(e){var n=void 0;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}},i.getActiveTransaction=function(t){var e,n;return void 0===t&&(t=r.getCurrentHub()),null===(n=null===(e=t)||void 0===e?void 0:e.getScope())||void 0===n?void 0:n.getTransaction()},i.msToSec=function(t){return t/1e3},i.secToMs=function(t){return 1e3*t};var n=t("@sentry/utils");i.stripUrlQueryAndFragment=n.stripUrlQueryAndFragment},{"@sentry/hub":34,"@sentry/utils":78}],68:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./loglevel");n.LogLevel=i.LogLevel;var r=t("./session");n.SessionStatus=r.SessionStatus;var o=t("./severity");n.Severity=o.Severity;var s=t("./status");n.Status=s.Status;var a=t("./transaction");n.TransactionSamplingMethod=a.TransactionSamplingMethod},{"./loglevel":69,"./session":70,"./severity":71,"./status":72,"./transaction":73}],69:[function(t,e,n){var i;Object.defineProperty(n,"__esModule",{value:!0}),(i=n.LogLevel||(n.LogLevel={}))[i.None=0]="None",i[i.Error=1]="Error",i[i.Debug=2]="Debug",i[i.Verbose=3]="Verbose"},{}],70:[function(t,e,n){var i;Object.defineProperty(n,"__esModule",{value:!0}),(i=n.SessionStatus||(n.SessionStatus={})).Ok="ok",i.Exited="exited",i.Crashed="crashed",i.Abnormal="abnormal"},{}],71:[function(t,e,n){var i,r;Object.defineProperty(n,"__esModule",{value:!0}),(i=n.Severity||(n.Severity={})).Fatal="fatal",i.Error="error",i.Warning="warning",i.Log="log",i.Info="info",i.Debug="debug",i.Critical="critical",(r=n.Severity||(n.Severity={})).fromString=function(t){switch(t){case"debug":return r.Debug;case"info":return r.Info;case"warn":case"warning":return r.Warning;case"error":return r.Error;case"fatal":return r.Fatal;case"critical":return r.Critical;case"log":default:return r.Log}}},{}],72:[function(t,e,n){var i,r;Object.defineProperty(n,"__esModule",{value:!0}),(i=n.Status||(n.Status={})).Unknown="unknown",i.Skipped="skipped",i.Success="success",i.RateLimit="rate_limit",i.Invalid="invalid",i.Failed="failed",(r=n.Status||(n.Status={})).fromHttpCode=function(t){return 200<=t&&t<300?r.Success:429===t?r.RateLimit:400<=t&&t<500?r.Invalid:500<=t?r.Failed:r.Unknown}},{}],73:[function(t,e,n){var i;Object.defineProperty(n,"__esModule",{value:!0}),(i=n.TransactionSamplingMethod||(n.TransactionSamplingMethod={})).Explicit="explicitly_set",i.Sampler="client_sampler",i.Rate="client_rate",i.Inheritance="inheritance"},{}],74:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.forget=function(t){t.then(null,function(t){console.error(t)})}},{}],75:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var u=t("./is");function a(t){var e,n,i,r,o,s=t,a=[];if(!s||!s.tagName)return"";if(a.push(s.tagName.toLowerCase()),s.id&&a.push("#"+s.id),(e=s.className)&&u.isString(e))for(n=e.split(/\s+/),o=0;o<n.length;o++)a.push("."+n[o]);var l=["type","name","title","alt"];for(o=0;o<l.length;o++)i=l[o],(r=s.getAttribute(i))&&a.push("["+i+'="'+r+'"]');return a.join("")}n.htmlTreeAsString=function(t){try{for(var e=t,n=[],i=0,r=0,o=" > ".length,s=void 0;e&&i++<5&&!("html"===(s=a(e))||1<i&&80<=r+n.length*o+s.length);)n.push(s),r+=s.length,e=e.parentNode;return n.reverse().join(" > ")}catch(t){return"<unknown>"}}},{"./is":80}],76:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var f=t("tslib"),g=t("./error"),m=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,y="Invalid Dsn",i=(r.prototype.toString=function(t){void 0===t&&(t=!1);var e=this,n=e.host,i=e.path,r=e.pass,o=e.port,s=e.projectId;return e.protocol+"://"+e.publicKey+(t&&r?":"+r:"")+"@"+n+(o?":"+o:"")+"/"+(i?i+"/":i)+s},r.prototype._fromString=function(t){var e=m.exec(t);if(!e)throw new g.SentryError(y);var n=f.__read(e.slice(1),6),i=n[0],r=n[1],o=n[2],s=void 0===o?"":o,a=n[3],l=n[4],u=void 0===l?"":l,c="",d=n[5],h=d.split("/");if(1<h.length&&(c=h.slice(0,-1).join("/"),d=h.pop()),d){var p=d.match(/^\d+/);p&&(d=p[0])}this._fromComponents({host:a,pass:s,path:c,projectId:d,port:u,protocol:i,publicKey:r})},r.prototype._fromComponents=function(t){"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),this.user=t.publicKey||"",this.protocol=t.protocol,this.publicKey=t.publicKey||"",this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},r.prototype._validate=function(){var e=this;if(["protocol","publicKey","host","projectId"].forEach(function(t){if(!e[t])throw new g.SentryError(y+": "+t+" missing")}),!this.projectId.match(/^\d+$/))throw new g.SentryError(y+": Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new g.SentryError(y+": Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new g.SentryError(y+": Invalid port "+this.port)},r);function r(t){"string"==typeof t?this._fromString(t):this._fromComponents(t),this._validate()}n.Dsn=i},{"./error":77,tslib:101}],77:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i,r=t("tslib"),o=t("./polyfill"),s=(i=Error,r.__extends(a,i),a);function a(t){var e=this.constructor,n=i.call(this,t)||this;return n.message=t,n.name=e.prototype.constructor.name,o.setPrototypeOf(n,e.prototype),n}n.SentryError=s},{"./polyfill":87,tslib:101}],78:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("tslib");i.__exportStar(t("./async"),n),i.__exportStar(t("./browser"),n),i.__exportStar(t("./dsn"),n),i.__exportStar(t("./error"),n),i.__exportStar(t("./instrument"),n),i.__exportStar(t("./is"),n),i.__exportStar(t("./logger"),n),i.__exportStar(t("./memo"),n),i.__exportStar(t("./misc"),n),i.__exportStar(t("./node"),n),i.__exportStar(t("./object"),n),i.__exportStar(t("./path"),n),i.__exportStar(t("./promisebuffer"),n),i.__exportStar(t("./stacktrace"),n),i.__exportStar(t("./string"),n),i.__exportStar(t("./supports"),n),i.__exportStar(t("./syncpromise"),n),i.__exportStar(t("./time"),n)},{"./async":74,"./browser":75,"./dsn":76,"./error":77,"./instrument":79,"./is":80,"./logger":81,"./memo":82,"./misc":83,"./node":84,"./object":85,"./path":86,"./promisebuffer":88,"./stacktrace":89,"./string":90,"./supports":91,"./syncpromise":92,"./time":93,tslib:101}],79:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var s,a=t("tslib"),l=t("./is"),u=t("./logger"),i=t("./misc"),c=t("./object"),d=t("./stacktrace"),r=t("./supports"),o=i.getGlobalObject(),h={},p={};function f(t){if(!p[t])switch(p[t]=!0,t){case"console":!function(){if(!("console"in o))return;["debug","info","warn","error","log","assert"].forEach(function(i){i in o.console&&c.fill(o.console,i,function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];g("console",{args:t,level:i}),n&&Function.prototype.apply.call(n,o.console,t)}})})}();break;case"dom":!function(){if(!("document"in o))return;var a=g.bind(null,"dom"),t=b(a,!0);o.document.addEventListener("click",t,!1),o.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(function(t){var e=o[t]&&o[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(c.fill(e,"addEventListener",function(s){return function(t,e,n){if("click"===t||"keypress"==t)try{var i=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},r=i[t]=i[t]||{refCount:0};if(!r.handler){var o=b(a);r.handler=o,s.call(this,t,o,n)}r.refCount+=1}catch(t){}return s.call(this,t,e,n)}}),c.fill(e,"removeEventListener",function(o){return function(t,e,n){if("click"===t||"keypress"==t)try{var i=this.__sentry_instrumentation_handlers__||{},r=i[t];r&&(r.refCount-=1,r.refCount<=0&&(o.call(this,t,r.handler,n),r.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete this.__sentry_instrumentation_handlers__)}catch(t){}return o.call(this,t,e,n)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in o))return;var s=[],a=[],t=XMLHttpRequest.prototype;c.fill(t,"open",function(o){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this,e=n[1];i.__sentry_xhr__={method:l.isString(n[0])?n[0].toUpperCase():n[0],url:n[1]},l.isString(e)&&"POST"===i.__sentry_xhr__.method&&e.match(/sentry_key/)&&(i.__sentry_own_request__=!0);function r(){if(4===i.readyState){try{i.__sentry_xhr__&&(i.__sentry_xhr__.status_code=i.status)}catch(t){}try{var t=s.indexOf(i);if(-1!==t){s.splice(t);var e=a.splice(t)[0];i.__sentry_xhr__&&void 0!==e[0]&&(i.__sentry_xhr__.body=e[0])}}catch(t){}g("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}}return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?c.fill(i,"onreadystatechange",function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(),n.apply(i,t)}}):i.addEventListener("readystatechange",r),o.apply(i,n)}}),c.fill(t,"send",function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return s.push(this),a.push(t),g("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),n.apply(this,t)}})}();break;case"fetch":!function(){if(!r.supportsNativeFetch())return;c.fill(o,"fetch",function(i){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n={args:t,fetchData:{method:function(t){void 0===t&&(t=[]);if("Request"in o&&l.isInstanceOf(t[0],Request)&&t[0].method)return String(t[0].method).toUpperCase();if(t[1]&&t[1].method)return String(t[1].method).toUpperCase();return"GET"}(t),url:function(t){void 0===t&&(t=[]);if("string"==typeof t[0])return t[0];if("Request"in o&&l.isInstanceOf(t[0],Request))return t[0].url;return String(t[0])}(t)},startTimestamp:Date.now()};return g("fetch",a.__assign({},n)),i.apply(o,t).then(function(t){return g("fetch",a.__assign(a.__assign({},n),{endTimestamp:Date.now(),response:t})),t},function(t){throw g("fetch",a.__assign(a.__assign({},n),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!r.supportsHistory())return;var i=o.onpopstate;function t(o){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=2<t.length?t[2]:void 0;if(n){var i=s,r=String(n);g("history",{from:i,to:s=r})}return o.apply(this,t)}}o.onpopstate=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.location.href;if(g("history",{from:s,to:s=n}),i)return i.apply(this,t)},c.fill(o.history,"pushState",t),c.fill(o.history,"replaceState",t)}();break;case"error":_=o.onerror,o.onerror=function(t,e,n,i,r){return g("error",{column:i,error:r,line:n,msg:t,url:e}),!!_&&_.apply(this,arguments)};break;case"unhandledrejection":w=o.onunhandledrejection,o.onunhandledrejection=function(t){return g("unhandledrejection",t),!w||w.apply(this,arguments)};break;default:u.logger.warn("unknown instrumentation type:",t)}}function g(e,t){var n,i;if(e&&h[e])try{for(var r=a.__values(h[e]||[]),o=r.next();!o.done;o=r.next()){var s=o.value;try{s(t)}catch(t){u.logger.error("Error while triggering instrumentation handler.\nType: "+e+"\nName: "+d.getFunctionName(s)+"\nError: "+t)}}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}}n.addInstrumentationHandler=function(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(h[t.type]=h[t.type]||[],h[t.type].push(t.callback),f(t.type))};var m,y,v=1e3;function b(n,i){return void 0===i&&(i=!1),function(t){if(t&&y!==t&&!function(t){if("keypress"!==t.type)return!1;try{var e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(t)){var e="keypress"===t.type?"input":t.type;void 0===m?(n({event:t,name:e,global:i}),y=t):function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(y,t)&&(n({event:t,name:e,global:i}),y=t),clearTimeout(m),m=o.setTimeout(function(){m=void 0},v)}}}var _=null;var w=null},{"./is":80,"./logger":81,"./misc":83,"./object":85,"./stacktrace":89,"./supports":91,tslib:101}],80:[function(t,e,n){function i(t){return"[object Object]"===Object.prototype.toString.call(t)}function r(t,e){try{return t instanceof e}catch(t){return!1}}Object.defineProperty(n,"__esModule",{value:!0}),n.isError=function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return r(t,Error)}},n.isErrorEvent=function(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)},n.isDOMError=function(t){return"[object DOMError]"===Object.prototype.toString.call(t)},n.isDOMException=function(t){return"[object DOMException]"===Object.prototype.toString.call(t)},n.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},n.isPrimitive=function(t){return null===t||"object"!=typeof t&&"function"!=typeof t},n.isPlainObject=i,n.isEvent=function(t){return"undefined"!=typeof Event&&r(t,Event)},n.isElement=function(t){return"undefined"!=typeof Element&&r(t,Element)},n.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},n.isThenable=function(t){return Boolean(t&&t.then&&"function"==typeof t.then)},n.isSyntheticEvent=function(t){return i(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t},n.isInstanceOf=r},{}],81:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./misc"),r=i.getGlobalObject(),o="Sentry Logger ",s=(a.prototype.disable=function(){this._enabled=!1},a.prototype.enable=function(){this._enabled=!0},a.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&i.consoleSandbox(function(){r.console.log(o+"[Log]: "+t.join(" "))})},a.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&i.consoleSandbox(function(){r.console.warn(o+"[Warn]: "+t.join(" "))})},a.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&i.consoleSandbox(function(){r.console.error(o+"[Error]: "+t.join(" "))})},a);function a(){this._enabled=!1}r.__SENTRY__=r.__SENTRY__||{};var l=r.__SENTRY__.logger||(r.__SENTRY__.logger=new s);n.logger=l},{"./misc":83}],82:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=(r.prototype.memoize=function(t){if(this._hasWeakSet)return!!this._inner.has(t)||(this._inner.add(t),!1);for(var e=0;e<this._inner.length;e++)if(this._inner[e]===t)return!0;return this._inner.push(t),!1},r.prototype.unmemoize=function(t){if(this._hasWeakSet)this._inner.delete(t);else for(var e=0;e<this._inner.length;e++)if(this._inner[e]===t){this._inner.splice(e,1);break}},r);function r(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}n.Memo=i},{}],83:[function(i,t,r){(function(t){Object.defineProperty(r,"__esModule",{value:!0});var e=i("./node"),s=i("./string"),n={};function o(){return e.isNodeEnv()?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:n}r.getGlobalObject=o,r.uuid4=function(){var t=o(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){var n=new Uint16Array(8);e.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;function i(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e}return i(n[0])+i(n[1])+i(n[2])+i(n[3])+i(n[4])+i(n[5])+i(n[6])+i(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},r.parseUrl=function(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};var n=e[6]||"",i=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+i}},r.getEventDescription=function(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var e=t.exception.values[0];return e.type&&e.value?e.type+": "+e.value:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"},r.consoleSandbox=function(t){var e=o();if(!("console"in e))return t();var n=e.console,i={};["debug","info","warn","error","log","assert"].forEach(function(t){t in e.console&&n[t].__sentry_original__&&(i[t]=n[t],n[t]=n[t].__sentry_original__)});var r=t();return Object.keys(i).forEach(function(t){n[t]=i[t]}),r},r.addExceptionTypeValue=function(t,e,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"},r.addExceptionMechanism=function(e,n){void 0===n&&(n={});try{e.exception.values[0].mechanism=e.exception.values[0].mechanism||{},Object.keys(n).forEach(function(t){e.exception.values[0].mechanism[t]=n[t]})}catch(t){}},r.getLocationHref=function(){try{return document.location.href}catch(t){return""}};var a=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;r.parseSemver=function(t){var e=t.match(a)||[],n=parseInt(e[1],10),i=parseInt(e[2],10),r=parseInt(e[3],10);return{buildmetadata:e[5],major:isNaN(n)?void 0:n,minor:isNaN(i)?void 0:i,patch:isNaN(r)?void 0:r,prerelease:e[4]}};r.parseRetryAfterHeader=function(t,e){if(!e)return 6e4;var n=parseInt(""+e,10);if(!isNaN(n))return 1e3*n;var i=Date.parse(""+e);return isNaN(i)?6e4:i-t},r.addContextToFrame=function(t,e,n){void 0===n&&(n=5);var i=e.lineno||0,r=t.length,o=Math.max(Math.min(r,i-1),0);e.pre_context=t.slice(Math.max(0,o-n),o).map(function(t){return s.snipLine(t,0)}),e.context_line=s.snipLine(t[Math.min(r-1,o)],e.colno||0),e.post_context=t.slice(Math.min(o+1,r),o+1+n).map(function(t){return s.snipLine(t,0)})},r.stripUrlQueryAndFragment=function(t){return t.split(/[\?#]/,1)[0]}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./node":84,"./string":90}],84:[function(t,e,n){(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.isNodeEnv=function(){return"[object process]"===Object.prototype.toString.call(void 0!==t?t:0)},n.dynamicRequire=function(t,e){return t.require(e)}}).call(this,t("_process"))},{_process:100}],85:[function(t,e,r){(function(n){Object.defineProperty(r,"__esModule",{value:!0});var u=t("tslib"),s=t("./browser"),c=t("./is"),l=t("./memo"),i=t("./stacktrace"),o=t("./string");function d(t){if(c.isError(t)){var e=t,n={message:e.message,name:e.name,stack:e.stack};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}if(c.isEvent(t)){var r=t,o={};o.type=r.type;try{o.target=c.isElement(r.target)?s.htmlTreeAsString(r.target):Object.prototype.toString.call(r.target)}catch(t){o.target="<unknown>"}try{o.currentTarget=c.isElement(r.currentTarget)?s.htmlTreeAsString(r.currentTarget):Object.prototype.toString.call(r.currentTarget)}catch(t){o.currentTarget="<unknown>"}for(var i in"undefined"!=typeof CustomEvent&&c.isInstanceOf(t,CustomEvent)&&(o.detail=r.detail),r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r);return o}return t}function a(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function h(t,e){return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":void 0!==n&&t===n?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":c.isSyntheticEvent(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+i.getFunctionName(t)+"]":"symbol"==typeof t?"["+String(t)+"]":"bigint"==typeof t?"[BigInt: "+String(t)+"]":t}function p(t,e,n,i){if(void 0===n&&(n=1/0),void 0===i&&(i=new l.Memo),0===n)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var n=h(t);return c.isPrimitive(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();var r=h(e,t);if(c.isPrimitive(r))return r;var o=d(e),s=Array.isArray(e)?[]:{};if(i.memoize(e))return"[Circular ~]";for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(s[a]=p(a,o[a],n-1,i));return i.unmemoize(e),s}function f(t,n){try{return JSON.parse(JSON.stringify(t,function(t,e){return p(t,e,n)}))}catch(t){return"**non-serializable**"}}r.fill=function(t,e,n){if(e in t){var i=t[e],r=n(i);if("function"==typeof r)try{r.prototype=r.prototype||{},Object.defineProperties(r,{__sentry_original__:{enumerable:!1,value:i}})}catch(t){}t[e]=r}},r.urlEncode=function(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")},r.normalizeToSize=function t(e,n,i){void 0===n&&(n=3),void 0===i&&(i=102400);var r=f(e,n);return a(r)>i?t(e,n-1,i):r},r.walk=p,r.normalize=f,r.extractExceptionKeysForMessage=function(t,e){void 0===e&&(e=40);var n=Object.keys(d(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return o.truncate(n[0],e);for(var i=n.length;0<i;i--){var r=n.slice(0,i).join(", ");if(!(r.length>e))return i===n.length?r:o.truncate(r,e)}return""},r.dropUndefinedKeys=function t(e){var n,i;if(c.isPlainObject(e)){var r=e,o={};try{for(var s=u.__values(Object.keys(r)),a=s.next();!a.done;a=s.next()){var l=a.value;void 0!==r[l]&&(o[l]=t(r[l]))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o}return Array.isArray(e)?e.map(t):e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./browser":75,"./is":80,"./memo":82,"./stacktrace":89,"./string":90,tslib:101}],86:[function(t,e,n){function s(t,e){for(var n=0,i=t.length-1;0<=i;i--){var r=t[i];"."===r?t.splice(i,1):".."===r?(t.splice(i,1),n++):n&&(t.splice(i,1),n--)}if(e)for(;n--;)t.unshift("..");return t}Object.defineProperty(n,"__esModule",{value:!0});var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function r(t){var e=i.exec(t);return e?e.slice(1):[]}function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n="",i=!1,r=t.length-1;-1<=r&&!i;r--){var o=0<=r?t[r]:"/";o&&(n=o+"/"+n,i="/"===o.charAt(0))}return(i?"/":"")+(n=s(n.split("/").filter(function(t){return!!t}),!i).join("/"))||"."}function u(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;0<=n&&""===t[n];n--);return n<e?[]:t.slice(e,n-e+1)}function o(t){var e=a(t),n="/"===t.substr(-1),i=s(t.split("/").filter(function(t){return!!t}),!e).join("/");return i||e||(i="."),i&&n&&(i+="/"),(e?"/":"")+i}function a(t){return"/"===t.charAt(0)}n.resolve=l,n.relative=function(t,e){t=l(t).substr(1),e=l(e).substr(1);for(var n=u(t.split("/")),i=u(e.split("/")),r=Math.min(n.length,i.length),o=r,s=0;s<r;s++)if(n[s]!==i[s]){o=s;break}var a=[];for(s=o;s<n.length;s++)a.push("..");return(a=a.concat(i.slice(o))).join("/")},n.normalizePath=o,n.isAbsolute=a,n.join=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t.join("/"))},n.dirname=function(t){var e=r(t),n=e[0],i=e[1];return n||i?n+(i=i&&i.substr(0,i.length-1)):"."},n.basename=function(t,e){var n=r(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n}},{}],87:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.setPrototypeOf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n]);return t})},{}],88:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./error"),r=t("./syncpromise"),o=(s.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},s.prototype.add=function(t){var e=this;return this.isReady()?(-1===this._buffer.indexOf(t)&&this._buffer.push(t),t.then(function(){return e.remove(t)}).then(null,function(){return e.remove(t).then(null,function(){})}),t):r.SyncPromise.reject(new i.SentryError("Not adding Promise due to buffer limit reached."))},s.prototype.remove=function(t){return this._buffer.splice(this._buffer.indexOf(t),1)[0]},s.prototype.length=function(){return this._buffer.length},s.prototype.drain=function(n){var i=this;return new r.SyncPromise(function(t){var e=setTimeout(function(){n&&0<n&&t(!1)},n);r.SyncPromise.all(i._buffer).then(function(){clearTimeout(e),t(!0)}).then(null,function(){t(!0)})})},s);function s(t){this._limit=t,this._buffer=[]}n.PromiseBuffer=o},{"./error":77,"./syncpromise":92}],89:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i="<anonymous>";n.getFunctionName=function(t){try{return t&&"function"==typeof t&&t.name||i}catch(t){return i}}},{}],90:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./is");n.truncate=function(t,e){return void 0===e&&(e=0),"string"!=typeof t||0===e?t:t.length<=e?t:t.substr(0,e)+"..."},n.snipLine=function(t,e){var n=t,i=n.length;if(i<=150)return n;i<e&&(e=i);var r=Math.max(e-60,0);r<5&&(r=0);var o=Math.min(r+140,i);return i-5<o&&(o=i),o===i&&(r=Math.max(o-140,0)),n=n.slice(r,o),0<r&&(n="'{snip} "+n),o<i&&(n+=" {snip}"),n},n.safeJoin=function(t,e){if(!Array.isArray(t))return"";for(var n=[],i=0;i<t.length;i++){var r=t[i];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)},n.isMatchingPattern=function(t,e){return!!i.isString(t)&&(i.isRegExp(e)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e))}},{"./is":80}],91:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=t("./logger"),o=t("./misc");function s(){if(!("fetch"in o.getGlobalObject()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function a(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}n.supportsErrorEvent=function(){try{return new ErrorEvent(""),!0}catch(t){return!1}},n.supportsDOMError=function(){try{return new DOMError(""),!0}catch(t){return!1}},n.supportsDOMException=function(){try{return new DOMException(""),!0}catch(t){return!1}},n.supportsFetch=s,n.supportsNativeFetch=function(){if(!s())return!1;var t=o.getGlobalObject();if(a(t.fetch))return!0;var e=!1,n=t.document;if(n&&"function"==typeof n.createElement)try{var i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i),i.contentWindow&&i.contentWindow.fetch&&(e=a(i.contentWindow.fetch)),n.head.removeChild(i)}catch(t){r.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e},n.supportsReportingObserver=function(){return"ReportingObserver"in o.getGlobalObject()},n.supportsReferrerPolicy=function(){if(!s())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}},n.supportsHistory=function(){var t=o.getGlobalObject(),e=t.chrome,n=e&&e.app&&e.app.runtime,i="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&i}},{"./logger":81,"./misc":83}],92:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i,r,o=t("./is");(r=i=i||{}).PENDING="PENDING",r.RESOLVED="RESOLVED",r.REJECTED="REJECTED";var s=(a.resolve=function(e){return new a(function(t){t(e)})},a.reject=function(n){return new a(function(t,e){e(n)})},a.all=function(t){return new a(function(n,i){if(Array.isArray(t))if(0!==t.length){var r=t.length,o=[];t.forEach(function(t,e){a.resolve(t).then(function(t){o[e]=t,0==(r-=1)&&n(o)}).then(null,i)})}else n([]);else i(new TypeError("Promise.all requires an array as input."))})},a.prototype.then=function(i,r){var t=this;return new a(function(e,n){t._attachHandler({done:!1,onfulfilled:function(t){if(i)try{return void e(i(t))}catch(t){return void n(t)}else e(t)},onrejected:function(t){if(r)try{return void e(r(t))}catch(t){return void n(t)}else n(t)}})})},a.prototype.catch=function(t){return this.then(function(t){return t},t)},a.prototype.finally=function(r){var o=this;return new a(function(t,e){var n,i;return o.then(function(t){i=!1,n=t,r&&r()},function(t){i=!0,n=t,r&&r()}).then(function(){i?e(n):t(n)})})},a.prototype.toString=function(){return"[object SyncPromise]"},a);function a(t){var n=this;this._state=i.PENDING,this._handlers=[],this._resolve=function(t){n._setResult(i.RESOLVED,t)},this._reject=function(t){n._setResult(i.REJECTED,t)},this._setResult=function(t,e){n._state===i.PENDING&&(o.isThenable(e)?e.then(n._resolve,n._reject):(n._state=t,n._value=e,n._executeHandlers()))},this._attachHandler=function(t){n._handlers=n._handlers.concat(t),n._executeHandlers()},this._executeHandlers=function(){if(n._state!==i.PENDING){var t=n._handlers.slice();n._handlers=[],t.forEach(function(t){t.done||(n._state===i.RESOLVED&&t.onfulfilled&&t.onfulfilled(n._value),n._state===i.REJECTED&&t.onrejected&&t.onrejected(n._value),t.done=!0)})}};try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}n.SyncPromise=s},{"./is":80}],93:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=t("./misc"),r=t("./node"),o={nowSeconds:function(){return Date.now()/1e3}};var s=r.isNodeEnv()?function(){try{return r.dynamicRequire(e,"perf_hooks").performance}catch(t){return}}():function(){var t=i.getGlobalObject().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),a=void 0===s?o:{nowSeconds:function(){return(s.timeOrigin+s.now())/1e3}};n.dateTimestampInSeconds=o.nowSeconds.bind(o),n.timestampInSeconds=a.nowSeconds.bind(a),n.timestampWithMs=n.timestampInSeconds,n.usingPerformanceAPI=void 0!==s,n.browserPerformanceTimeOrigin=function(){var t=i.getGlobalObject().performance;if(t)return t.timeOrigin?t.timeOrigin:t.timing&&t.timing.navigationStart||Date.now()}()},{"./misc":83,"./node":84}],94:[function(t,e,n){
/*!
 * Chart.js v2.9.4
 * https://www.chartjs.org
 * (c) 2020 Chart.js Contributors
 * Released under the MIT License
 */var i,r;i=this,r=function(i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;var t,c={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u=(function(t){
/* MIT license */
var u={};for(var e in c)c.hasOwnProperty(e)&&(u[c[e]]=e);var s=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var n in s)if(s.hasOwnProperty(n)){if(!("channels"in s[n]))throw new Error("missing channels property: "+n);if(!("labels"in s[n]))throw new Error("missing channel labels property: "+n);if(s[n].labels.length!==s[n].channels)throw new Error("channel and label counts mismatch: "+n);var i=s[n].channels,r=s[n].labels;delete s[n].channels,delete s[n].labels,Object.defineProperty(s[n],"channels",{value:i}),Object.defineProperty(s[n],"labels",{value:r})}s.rgb.hsl=function(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,s=Math.min(i,r,o),a=Math.max(i,r,o),l=a-s;return a===s?e=0:i===a?e=(r-o)/l:r===a?e=2+(o-i)/l:o===a&&(e=4+(i-r)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(s+a)/2,[e,100*(a===s?0:n<=.5?l/(a+s):l/(2-a-s)),100*n]},s.rgb.hsv=function(t){function e(t){return(c-t)/6/d+.5}var n,i,r,o,s,a=t[0]/255,l=t[1]/255,u=t[2]/255,c=Math.max(a,l,u),d=c-Math.min(a,l,u);return 0==d?o=s=0:(s=d/c,n=e(a),i=e(l),r=e(u),a===c?o=r-i:l===c?o=1/3+n-r:u===c&&(o=2/3+i-n),o<0?o+=1:1<o&&(o-=1)),[360*o,100*s,100*c]},s.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[s.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},s.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,r=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-r)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-r-e)/(1-e)||0),100*e]},s.rgb.keyword=function(t){var e=u[t];if(e)return e;var n,i,r,o=1/0;for(var s in c)if(c.hasOwnProperty(s)){var a=c[s],l=(i=t,r=a,Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2)+Math.pow(i[2]-r[2],2));l<o&&(o=l,n=s)}return n},s.keyword.rgb=function(t){return c[t]},s.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=.04045<e?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=.04045<i?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},s.rgb.lab=function(t){var e=s.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=.008856<(n/=95.047)?Math.pow(n,1/3):7.787*n+16/116,[116*(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=.008856<r?Math.pow(r,1/3):7.787*r+16/116))]},s.hsl.rgb=function(t){var e,n,i,r,o,s=t[0]/360,a=t[1]/100,l=t[2]/100;if(0==a)return[o=255*l,o,o];e=2*l-(n=l<.5?l*(1+a):l+a-l*a),r=[0,0,0];for(var u=0;u<3;u++)(i=s+1/3*-(u-1))<0&&i++,1<i&&i--,o=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,r[u]=255*o;return r},s.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,r=n,o=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,r*=o<=1?o:2-o,[e,100*(0===i?2*r/(o+r):2*n/(i+n)),100*((i+n)/2)]},s.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),s=255*i*(1-n),a=255*i*(1-n*o),l=255*i*(1-n*(1-o));switch(i*=255,r){case 0:return[i,l,s];case 1:return[a,i,s];case 2:return[s,i,l];case 3:return[s,a,i];case 4:return[l,s,i];case 5:return[i,s,a]}},s.hsv.hsl=function(t){var e,n,i,r=t[0],o=t[1]/100,s=t[2]/100,a=Math.max(s,.01);return i=(2-o)*s,n=o*a,[r,100*(n=(n/=(e=(2-o)*a)<=1?e:2-e)||0),100*(i/=2)]},s.hwb.rgb=function(t){var e,n,i,r,o,s,a,l=t[0]/360,u=t[1]/100,c=t[2]/100,d=u+c;switch(1<d&&(u/=d,c/=d),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),r=u+i*((n=1-c)-u),e){default:case 6:case 0:o=n,s=r,a=u;break;case 1:o=r,s=n,a=u;break;case 2:o=u,s=n,a=r;break;case 3:o=u,s=r,a=n;break;case 4:o=r,s=u,a=n;break;case 5:o=n,s=u,a=r}return[255*o,255*s,255*a]},s.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r))]},s.xyz.rgb=function(t){var e,n,i,r=t[0]/100,o=t[1]/100,s=t[2]/100;return n=-.9689*r+1.8758*o+.0415*s,i=.0557*r+-.204*o+1.057*s,e=.0031308<(e=3.2406*r+-1.5372*o+-.4986*s)?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=.0031308<i?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},s.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=.008856<(e/=95.047)?Math.pow(e,1/3):7.787*e+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116))]},s.lab.xyz=function(t){var e,n,i,r=t[0];e=t[1]/500+(n=(r+16)/116),i=n-t[2]/200;var o=Math.pow(n,3),s=Math.pow(e,3),a=Math.pow(i,3);return n=.008856<o?o:(n-16/116)/7.787,e=.008856<s?s:(e-16/116)/7.787,i=.008856<a?a:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},s.lab.lch=function(t){var e,n=t[0],i=t[1],r=t[2];return(e=360*Math.atan2(r,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+r*r),e]},s.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},s.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:s.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},s.hsv.ansi16=function(t){return s.rgb.ansi16(s.hsv.rgb(t),t[2])},s.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:248<e?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},s.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return 50<t&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(50<t));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},s.ansi256.rgb=function(t){if(232<=t){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},s.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},s.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map(function(t){return t+t}).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},s.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,r=t[2]/255,o=Math.max(Math.max(n,i),r),s=Math.min(Math.min(n,i),r),a=o-s;return e=a<=0?0:o===n?(i-r)/a%6:o===i?2+(r-n)/a:4+(n-i)/a+4,e/=6,[360*(e%=1),100*a,100*(a<1?s/(1-a):0)]},s.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,r=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(r=(n-.5*i)/(1-i)),[t[0],100*i,100*r]},s.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,r=0;return i<1&&(r=(n-i)/(1-i)),[t[0],100*i,100*r]},s.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0==n)return[255*i,255*i,255*i];var r,o=[0,0,0],s=e%1*6,a=s%1,l=1-a;switch(Math.floor(s)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return r=(1-n)*i,[255*(n*o[0]+r),255*(n*o[1]+r),255*(n*o[2]+r)]},s.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return 0<n&&(i=e/n),[t[0],100*i,100*n]},s.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return 0<n&&n<.5?i=e/(2*n):.5<=n&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},s.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},s.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,r=0;return i<1&&(r=(n-i)/(1-i)),[t[0],100*i,100*r]},s.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},s.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},s.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},s.gray.hsl=s.gray.hsv=function(t){return[0,0,t[0]]},s.gray.hwb=function(t){return[0,100,t[0]]},s.gray.cmyk=function(t){return[0,0,0,t[0]]},s.gray.lab=function(t){return[t[0],0,0]},s.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},s.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}(t={exports:{}},t.exports),t.exports);u.rgb,u.hsl,u.hsv,u.hwb,u.cmyk,u.xyz,u.lab,u.lch,u.hex,u.keyword,u.ansi16,u.ansi256,u.hcg,u.apple,u.gray;function a(t){var e=function(){for(var t={},e=Object.keys(u),n=e.length,i=0;i<n;i++)t[e[i]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var i=n.pop(),r=Object.keys(u[i]),o=r.length,s=0;s<o;s++){var a=r[s],l=e[a];-1===l.distance&&(l.distance=e[i].distance+1,l.parent=i,n.unshift(a))}return e}function o(e,n){return function(t){return n(e(t))}}function l(t,e){for(var n=[e[t].parent,t],i=u[e[t].parent][t],r=e[t].parent;e[r].parent;)n.unshift(e[r].parent),i=o(u[e[r].parent][r],i),r=e[r].parent;return i.conversion=n,i}var r={};function s(e){function t(t){return null==t?t:(1<arguments.length&&(t=Array.prototype.slice.call(arguments)),e(t))}return"conversion"in e&&(t.conversion=e.conversion),t}function d(r){function t(t){if(null==t)return t;1<arguments.length&&(t=Array.prototype.slice.call(arguments));var e=r(t);if("object"==typeof e)for(var n=e.length,i=0;i<n;i++)e[i]=Math.round(e[i]);return e}return"conversion"in r&&(t.conversion=r.conversion),t}Object.keys(u).forEach(function(n){r[n]={},Object.defineProperty(r[n],"channels",{value:u[n].channels}),Object.defineProperty(r[n],"labels",{value:u[n].labels});var i=function(t){for(var e=a(t),n={},i=Object.keys(e),r=i.length,o=0;o<r;o++){var s=i[o];null!==e[s].parent&&(n[s]=l(s,e))}return n}(n);Object.keys(i).forEach(function(t){var e=i[t];r[n][t]=d(e),r[n][t].raw=s(e)})});var h=r,p={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n={getRgba:f,getHsla:g,getRgb:function(t){var e=f(t);return e&&e.slice(0,3)},getHsl:function(t){var e=g(t);return e&&e.slice(0,3)},getHwb:m,getAlpha:function(t){var e=f(t);{if(e)return e[3];if(e=g(t))return e[3];if(e=m(t))return e[3]}},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+w(t[0])+w(t[1])+w(t[2])+(0<=e&&e<1?w(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return y(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:y,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return v(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+r+"%)"},percentaString:v,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return b(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:b,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return e[t.slice(0,3)]}};function f(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),r="";if(i){r=(i=i[1])[3];for(var o=0;o<e.length;o++)e[o]=parseInt(i[o]+i[o],16);r&&(n=Math.round(parseInt(r+r,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){r=i[2],i=i[1];for(o=0;o<e.length;o++)e[o]=parseInt(i.slice(2*o,2*o+2),16);r&&(n=Math.round(parseInt(r,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=parseInt(i[o+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=Math.round(2.55*parseFloat(i[o+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=p[i[1]]))return}for(o=0;o<e.length;o++)e[o]=_(e[o],0,255);return n=n||0==n?_(n,0,1):1,e[3]=n,e}}function g(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[_(parseInt(e[1]),0,360),_(parseFloat(e[2]),0,100),_(parseFloat(e[3]),0,100),_(isNaN(n)?1:n,0,1)]}}}function m(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[_(parseInt(e[1]),0,360),_(parseFloat(e[2]),0,100),_(parseFloat(e[3]),0,100),_(isNaN(n)?1:n,0,1)]}}}function y(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function v(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function b(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function _(t,e,n){return Math.min(Math.max(e,t),n)}function w(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var e={};for(var x in p)e[p[x]]=x;
/* MIT license */var k=function(t){return t instanceof k?t:this instanceof k?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=n.getRgba(t))?this.setValues("rgb",e):(e=n.getHsla(t))?this.setValues("hsl",e):(e=n.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new k(t);var e};k.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t=t&&((t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return n.hexString(this.values.rgb)},rgbString:function(){return n.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return n.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return n.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return n.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return n.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return n.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return n.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((.055+i)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return n<e?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return 7.1<=e?"AAA":4.5<=e?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,i=t,r=void 0===e?.5:e,o=2*r-1,s=n.alpha()-i.alpha(),a=(1+(o*s==-1?o:(o+s)/(1+o*s)))/2,l=1-a;return this.rgb(a*n.red()+l*i.red(),a*n.green()+l*i.green(),a*n.blue()+l*i.blue()).alpha(n.alpha()*r+i.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new k,i=this.values,r=n.values;for(var o in i)i.hasOwnProperty(o)&&(t=i[o],"[object Array]"===(e={}.toString.call(t))?r[o]=t.slice(0):"[object Number]"===e?r[o]=t:console.error("unexpected color value:",t));return n}},k.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},k.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},k.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},k.prototype.setValues=function(t,e){var n,i,r=this.values,o=this.spaces,s=this.maxes,a=1;if(this.valid=!0,"alpha"===t)a=e;else if(e.length)r[t]=e.slice(0,t.length),a=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)r[t][n]=e[t.charAt(n)];a=e.a}else if(void 0!==e[o[t][0]]){var l=o[t];for(n=0;n<t.length;n++)r[t][n]=e[l[n]];a=e.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===a?r.alpha:a)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(s[t][n],r[t][n])),r[t][n]=Math.round(i);for(var u in o)u!==t&&(r[u]=h[t][u](r[t]));return!0},k.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},k.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:(n===i[e]||(i[e]=n,this.setValues(t,i)),this)},"undefined"!=typeof window&&(window.Color=k);var C=k;function S(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var P,E={noop:function(){},uid:(P=0,function(){return P++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return E.valueOrDefault(E.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var r,o,s;if(E.isArray(t))if(o=t.length,i)for(r=o-1;0<=r;r--)e.call(n,t[r],r);else for(r=0;r<o;r++)e.call(n,t[r],r);else if(E.isObject(t))for(o=(s=Object.keys(t)).length,r=0;r<o;r++)e.call(n,t[s[r]],s[r])},arrayEquals:function(t,e){var n,i,r,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],o=e[n],r instanceof Array&&o instanceof Array){if(!E.arrayEquals(r,o))return!1}else if(r!==o)return!1;return!0},clone:function(t){if(E.isArray(t))return t.map(E.clone);if(E.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,r=0;r<i;++r)e[n[r]]=E.clone(t[n[r]]);return e}return t},_merger:function(t,e,n,i){if(S(t)){var r=e[t],o=n[t];E.isObject(r)&&E.isObject(o)?E.merge(r,o,i):e[t]=E.clone(o)}},_mergerIf:function(t,e,n){if(S(t)){var i=e[t],r=n[t];E.isObject(i)&&E.isObject(r)?E.mergeIf(i,r):e.hasOwnProperty(t)||(e[t]=E.clone(r))}},merge:function(t,e,n){var i,r,o,s,a,l=E.isArray(e)?e:[e],u=l.length;if(!E.isObject(t))return t;for(i=(n=n||{}).merger||E._merger,r=0;r<u;++r)if(e=l[r],E.isObject(e))for(a=0,s=(o=Object.keys(e)).length;a<s;++a)i(o[a],t,e,n);return t},mergeIf:function(t,e){return E.merge(t,e,{merger:E._mergerIf})},extend:Object.assign||function(t){return E.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){function e(){this.constructor=i}var n=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return n.apply(this,arguments)};return e.prototype=n.prototype,i.prototype=new e,i.extend=E.inherits,t&&E.extend(i.prototype,t),i.__super__=n.prototype,i},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},T=E;E.callCallback=E.callback,E.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},E.getValueOrDefault=E.valueOrDefault,E.getValueAtIndexOrDefault=E.valueAtIndexOrDefault;var O={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return 1<=t?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n=n||.3,e=i<1?(i=1,n/4):n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n=n||.3,e=i<1?(i=1,n/4):n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n=n||.45,e=i<1?(i=1,n/4):n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-O.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*O.easeInBounce(2*t):.5*O.easeOutBounce(2*t-1)+.5}},M={effects:O};T.easingEffects=O;var j=Math.PI,D=j/180,F=2*j,L=j/2,A=j/4,I=2*j/3,$={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,r,o){if(o){var s=Math.min(o,r/2,i/2),a=e+s,l=n+s,u=e+i-s,c=n+r-s;t.moveTo(e,l),a<u&&l<c?(t.arc(a,l,s,-j,-L),t.arc(u,l,s,-L,0),t.arc(u,c,s,0,L),t.arc(a,c,s,L,j)):a<u?(t.moveTo(a,n),t.arc(u,l,s,-L,L),t.arc(a,l,s,L,j+L)):l<c?(t.arc(a,l,s,-j,0),t.arc(a,c,s,0,j)):t.arc(a,l,s,-j,j),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,r)},drawPoint:function(t,e,n,i,r,o){var s,a,l,u,c,d=(o||0)*D;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(s=e.toString())||"[object HTMLCanvasElement]"===s))return t.save(),t.translate(i,r),t.rotate(d),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,r,n,0,F),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(d)*n,r-Math.cos(d)*n),d+=I,t.lineTo(i+Math.sin(d)*n,r-Math.cos(d)*n),d+=I,t.lineTo(i+Math.sin(d)*n,r-Math.cos(d)*n),t.closePath();break;case"rectRounded":u=n-(c=.516*n),a=Math.cos(d+A)*u,l=Math.sin(d+A)*u,t.arc(i-a,r-l,c,d-j,d-L),t.arc(i+l,r-a,c,d-L,d),t.arc(i+a,r+l,c,d,d+L),t.arc(i-l,r+a,c,d+L,d+j),t.closePath();break;case"rect":if(!o){u=Math.SQRT1_2*n,t.rect(i-u,r-u,2*u,2*u);break}d+=A;case"rectRot":a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(i-a,r-l),t.lineTo(i+l,r-a),t.lineTo(i+a,r+l),t.lineTo(i-l,r+a),t.closePath();break;case"crossRot":d+=A;case"cross":a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(i-a,r-l),t.lineTo(i+a,r+l),t.moveTo(i+l,r-a),t.lineTo(i-l,r+a);break;case"star":a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(i-a,r-l),t.lineTo(i+a,r+l),t.moveTo(i+l,r-a),t.lineTo(i-l,r+a),d+=A,a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(i-a,r-l),t.lineTo(i+a,r+l),t.moveTo(i+l,r-a),t.lineTo(i-l,r+a);break;case"line":a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(i-a,r-l),t.lineTo(i+a,r+l);break;case"dash":t.moveTo(i,r),t.lineTo(i+Math.cos(d)*n,r+Math.sin(d)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var r=n.steppedLine;if(r){if("middle"===r){var o=(e.x+n.x)/2;t.lineTo(o,i?n.y:e.y),t.lineTo(o,i?e.y:n.y)}else"after"===r&&!i||"after"!==r&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},B=$;T.clear=$.clear,T.drawRoundedRectangle=function(t){t.beginPath(),$.roundedRect.apply($,arguments)};var R={_set:function(t,e){return T.merge(this[t]||(this[t]={}),e)}};R._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var N=R,V=T.valueOrDefault;var W={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,r;return T.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,r=+t.left||0):e=n=i=r=+t||0,{top:e,right:n,bottom:i,left:r,height:e+i,width:r+n}},_parseFont:function(t){var e=N.global,n=V(t.fontSize,e.defaultFontSize),i={family:V(t.fontFamily,e.defaultFontFamily),lineHeight:T.options.toLineHeight(V(t.lineHeight,e.defaultLineHeight),n),size:n,style:V(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||T.isNullOrUndef(t.size)||T.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n,i){var r,o,s,a=!0;for(r=0,o=t.length;r<o;++r)if(void 0!==(s=t[r])&&(void 0!==e&&"function"==typeof s&&(s=s(e),a=!1),void 0!==n&&T.isArray(s)&&(s=s[n],a=!1),void 0!==s))return i&&!a&&(i.cacheable=!1),s}},H={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort(function(t,e){return t-e}).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},U=H;T.log10=H.log10;var q=T,z=M,Y=B,G=W,K=U,X={getRtlAdapter:function(t,e,n){return t?function(e,n){return{x:function(t){return e+e+n-t},setWidth:function(t){n=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};q.easing=z,q.canvas=Y,q.options=G,q.math=K,q.rtl=X;function J(t){q.extend(this,t),this.initialize.apply(this,arguments)}q.extend(J.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){return this._view||(this._view=q.extend({},this._model)),this._start={},this},transition:function(t){var e=this._model,n=this._start,i=this._view;return e&&1!==t?(i=i||(this._view={}),function(t,e,n,i){var r,o,s,a,l,u,c,d,h,p=Object.keys(n);for(r=0,o=p.length;r<o;++r)if(u=n[s=p[r]],e.hasOwnProperty(s)||(e[s]=u),(a=e[s])!==u&&"_"!==s[0]){if(t.hasOwnProperty(s)||(t[s]=a),(c=typeof u)==typeof(l=t[s]))if("string"==c){if((d=C(l)).valid&&(h=C(u)).valid){e[s]=h.mix(d,i).rgbString();continue}}else if(q.isFinite(l)&&q.isFinite(u)){e[s]=l+(u-l)*i;continue}e[s]=u}}(n=n||(this._start={}),i,e,t)):(this._view=q.extend({},e),this._start=null),this},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return q.isNumber(this._model.x)&&q.isNumber(this._model.y)}}),J.extend=q.inherits;var Z=J,Q=Z.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),tt=Q;Object.defineProperty(Q.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Q.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),N._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:q.noop,onComplete:q.noop}});var et={animations:[],request:null,addAnimation:function(t,e,n,i){var r,o,s=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),r=0,o=s.length;r<o;++r)if(s[r].chart===t)return void(s[r]=e);s.push(e),1===s.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=q.findIndex(this.animations,function(t){return t.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=q.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){this.advance(),0<this.animations.length&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,r=this.animations,o=0;o<r.length;)e=(t=r[o]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),q.callback(t.render,[e,t],e),q.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(q.callback(t.onAnimationComplete,[t],e),e.animating=!1,r.splice(o,1)):++o}},nt=q.options.resolve,it=["push","pop","shift","splice","unshift"];function rt(e,t){var n=e._chartjs;if(n){var i=n.listeners,r=i.indexOf(t);-1!==r&&i.splice(r,1),0<i.length||(it.forEach(function(t){delete e[t]}),delete e._chartjs)}}function ot(t,e){this.initialize(t,e)}q.extend(ot.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements(),this._type=this.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),r=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||r.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||r.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&rt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],r=n.data;for(t=0,e=i.length;t<e;++t)r[t]=r[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this.getDataset(),e=t.data||(t.data=[]);this._data!==e&&(this._data&&rt(this._data,this),e&&Object.isExtensible(e)&&function(r,t){r._chartjs?r._chartjs.listeners.push(t):(Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),it.forEach(function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=r[t];Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),t=i.apply(this,e);return q.each(r._chartjs.listeners,function(t){"function"==typeof t[n]&&t[n].apply(t,e)}),t}})}))}(e,this),this._data=e),this.resyncElements()},_configure:function(){this._config=q.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&q._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:q.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,r=0;r<i;++r)n[r].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),!1!==(e=i&&void 0===t?this._resolveDatasetElementOptions(i||{}):(t=t||0,this._resolveDataElementOptions(n.data[t]||{},t))).fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,r,o,s=this.chart,a=this._config,l=t.custom||{},u=s.options.elements[this.datasetElementType.prototype._type]||{},c=this._datasetElementOptions,d={},h={chart:s,dataset:this.getDataset(),datasetIndex:this.index,hover:e};for(n=0,i=c.length;n<i;++n)r=c[n],o=e?"hover"+r.charAt(0).toUpperCase()+r.slice(1):r,d[r]=nt([l[o],a[o],u[o]],h);return d},_resolveDataElementOptions:function(t,e){var n=t&&t.custom,i=this._cachedDataOpts;if(i&&!n)return i;var r,o,s,a,l=this.chart,u=this._config,c=l.options.elements[this.dataElementType.prototype._type]||{},d=this._dataElementOptions,h={},p={chart:l,dataIndex:e,dataset:this.getDataset(),datasetIndex:this.index},f={cacheable:!n};if(n=n||{},q.isArray(d))for(o=0,s=d.length;o<s;++o)h[a=d[o]]=nt([n[a],u[a],c[a]],p,e,f);else for(o=0,s=(r=Object.keys(d)).length;o<s;++o)h[a=r[o]]=nt([n[a],u[d[a]],u[a],c[a]],p,e,f);return f.cacheable&&(this._cachedDataOpts=Object.freeze(h)),h},removeHoverStyle:function(t){q.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},r=t._model,o=q.getHoverColor;t.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth},r.backgroundColor=nt([i.hoverBackgroundColor,e.hoverBackgroundColor,o(r.backgroundColor)],void 0,n),r.borderColor=nt([i.hoverBorderColor,e.hoverBorderColor,o(r.borderColor)],void 0,n),r.borderWidth=nt([i.hoverBorderWidth,e.hoverBorderWidth,r.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,r,o,s=this.getMeta().dataset,a={};if(s){for(o=s._model,r=this._resolveDatasetElementOptions(s,!0),t=0,e=(i=Object.keys(r)).length;t<e;++t)a[n=i[t]]=o[n],o[n]=r[n];s.$previousStyle=a}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):n<i&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),ot.extend=q.inherits;var st=ot,at=2*Math.PI;function lt(t,e){var n=e.startAngle,i=e.endAngle,r=e.pixelMargin,o=r/e.outerRadius,s=e.x,a=e.y;t.beginPath(),t.arc(s,a,e.outerRadius,n-o,i+o),e.innerRadius>r?(o=r/e.innerRadius,t.arc(s,a,e.innerRadius-r,i+o,n-o,!0)):t.arc(s,a,r,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function ut(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var r,o=n.endAngle;for(i&&(n.endAngle=n.startAngle+at,lt(t,n),n.endAngle=o,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=at,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+at,n.startAngle,!0),r=0;r<n.fullCircles;++r)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+at),r=0;r<n.fullCircles;++r)t.stroke()}(t,e,n,i),i&&lt(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}N._set("global",{elements:{arc:{backgroundColor:N.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ct=Z.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=q.getAngleFromPoint(n,{x:t,y:e}),r=i.angle,o=i.distance,s=n.startAngle,a=n.endAngle;a<s;)a+=at;for(;a<r;)r-=at;for(;r<s;)r+=at;var l=s<=r&&r<=a,u=o>=n.innerRadius&&o<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,r={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/at)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,r.fullCircles){for(r.endAngle=r.startAngle+at,e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),t=0;t<r.fullCircles;++t)e.fill();r.endAngle=r.startAngle+n.circumference%at}e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&ut(e,n,r),e.restore()}}),dt=q.valueOrDefault,ht=N.global.defaultColor;N._set("global",{elements:{line:{tension:.4,backgroundColor:ht,borderWidth:3,borderColor:ht,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var pt=Z.extend({_type:"line",draw:function(){var t,e,n,i=this._view,r=this._chart.ctx,o=i.spanGaps,s=this._children.slice(),a=N.global,l=a.elements.line,u=-1,c=this._loop;if(s.length){if(this._loop){for(t=0;t<s.length;++t)if(e=q.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),c=o;break}c&&s.push(s[0])}for(r.save(),r.lineCap=i.borderCapStyle||l.borderCapStyle,r.setLineDash&&r.setLineDash(i.borderDash||l.borderDash),r.lineDashOffset=dt(i.borderDashOffset,l.borderDashOffset),r.lineJoin=i.borderJoinStyle||l.borderJoinStyle,r.lineWidth=dt(i.borderWidth,l.borderWidth),r.strokeStyle=i.borderColor||a.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),u=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===u?q.previousItem(s,t):s[u],n.skip||(u!==t-1&&!o||-1===u?r.moveTo(n.x,n.y):q.canvas.lineTo(r,e._view,n),u=t);c&&r.closePath(),r.stroke(),r.restore()}}}),ft=q.valueOrDefault,gt=N.global.defaultColor;function mt(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}N._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:gt,borderColor:gt,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var yt=Z.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:mt,inXRange:mt,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,r=e.rotation,o=e.radius,s=e.x,a=e.y,l=N.global,u=l.defaultColor;e.skip||void 0!==t&&!q.canvas._isPointInArea(e,t)||(n.strokeStyle=e.borderColor||u,n.lineWidth=ft(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,q.canvas.drawPoint(n,i,o,s,a,r))}}),vt=N.global.defaultColor;function bt(t){return t&&void 0!==t.width}function _t(t){var e,n,i,r,o;return r=bt(t)?(o=t.width/2,e=t.x-o,n=t.x+o,i=Math.min(t.y,t.base),Math.max(t.y,t.base)):(o=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-o,t.y+o),{left:e,top:i,right:n,bottom:r}}function wt(t,e,n){return t===e?n:t===n?e:t}function xt(t,e,n){var i,r,o,s,a=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e&&(t.horizontal?t.base>t.x&&(e=wt(e,"left","right")):t.base<t.y&&(e=wt(e,"bottom","top")),n[e]=!0),n}(t);return q.isObject(a)?(i=+a.top||0,r=+a.right||0,o=+a.bottom||0,s=+a.left||0):i=r=o=s=+a||0,{t:l.top||i<0?0:n<i?n:i,r:l.right||r<0?0:e<r?e:r,b:l.bottom||o<0?0:n<o?n:o,l:l.left||s<0?0:e<s?e:s}}function kt(t,e,n){var i=null===e,r=null===n,o=!(!t||i&&r)&&_t(t);return o&&(i||e>=o.left&&e<=o.right)&&(r||n>=o.top&&n<=o.bottom)}N._set("global",{elements:{rectangle:{backgroundColor:vt,borderColor:vt,borderSkipped:"bottom",borderWidth:0}}});var Ct=Z.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=_t(t),n=e.right-e.left,i=e.bottom-e.top,r=xt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b}}}(e),i=n.outer,r=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===r.w&&i.h===r.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(r.x,r.y,r.w,r.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return kt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return bt(n)?kt(n,t,null):kt(n,null,e)},inXRange:function(t){return kt(this._view,t,null)},inYRange:function(t){return kt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return e=bt(n)?(t=n.x,(n.y+n.base)/2):(t=(n.x+n.base)/2,n.y),{x:t,y:e}},getArea:function(){var t=this._view;return bt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),St={},Pt=ct,Et=pt,Tt=yt,Ot=Ct;St.Arc=Pt,St.Line=Et,St.Point=Tt,St.Rectangle=Ot;var Mt=q._deprecated,jt=q.valueOrDefault;function Dt(t,e,n){var i,r,o=n.barThickness,s=e.stackCount,a=e.pixels[t],l=q.isNullOrUndef(o)?function(t,e){var n,i,r,o,s=t._length;for(r=1,o=e.length;r<o;++r)s=Math.min(s,Math.abs(e[r]-e[r-1]));for(r=0,o=t.getTicks().length;r<o;++r)i=t.getPixelForTick(r),s=0<r?Math.min(s,Math.abs(i-n)):s,n=i;return s}(e.scale,e.pixels):-1;return r=q.isNullOrUndef(o)?(i=l*n.categoryPercentage,n.barPercentage):(i=o*s,1),{chunk:i/s,ratio:r,start:a-i/2}}N._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),N._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Ft=st.extend({dataElementType:St.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e;st.prototype.initialize.apply(this,arguments),(t=this.getMeta()).stack=this.getDataset().stack,t.bar=!0,e=this._getIndexScale().options,Mt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Mt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Mt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Mt("bar chart",this._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Mt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this.getMeta(),r=this.getDataset(),o=this._resolveDataElementOptions(t,e);t._xScale=this.getScaleForId(i.xAxisID),t._yScale=this.getScaleForId(i.yAxisID),t._datasetIndex=this.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:this.chart.data.labels[e]},q.isArray(r.data[e])&&(t._model.borderSkipped=null),this._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var r=t._model,o=this._getValueScale(),s=o.getBasePixel(),a=o.isHorizontal(),l=this._ruler||this.getRuler(),u=this.calculateBarValuePixels(this.index,e,i),c=this.calculateBarIndexPixels(this.index,e,l,i);r.horizontal=a,r.base=n?s:u.base,r.x=a?n?s:u.head:c.center,r.y=a?c.center:n?s:u.head,r.height=a?c.size:void 0,r.width=a?void 0:c.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),r=i._getMatchingVisibleMetas(this._type),o=i.options.stacked,s=r.length,a=[];for(e=0;e<s&&(n=r[e],(!1===o||-1===a.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&a.push(n.stack),n.index!==t);++e);return a},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,r,o,s,a,l,u,c=this.chart,d=this._getValueScale(),h=d.isHorizontal(),p=c.data.datasets,f=d._getMatchingVisibleMetas(this._type),g=d._parseValue(p[t].data[e]),m=n.minBarLength,y=d.options.stacked,v=this.getMeta().stack,b=void 0===g.start?0:0<=g.max&&0<=g.min?g.min:g.max,_=void 0===g.start?g.end:0<=g.max&&0<=g.min?g.max-g.min:g.min-g.max,w=f.length;if(y||void 0===y&&void 0!==v)for(i=0;i<w&&(r=f[i]).index!==t;++i)r.stack===v&&(o=void 0===(u=d._parseValue(p[r.index].data[e])).start?u.end:0<=u.min&&0<=u.max?u.max:u.min,(g.min<0&&o<0||0<=g.max&&0<o)&&(b+=o));return s=d.getPixelForValue(b),l=(a=d.getPixelForValue(b+_))-s,void 0!==m&&Math.abs(l)<m&&(l=m,a=0<=_&&!h||_<0&&h?s-m:s+m),{size:l,base:s,head:a,center:a+l/2}},calculateBarIndexPixels:function(t,e,n,i){var r="flex"===i.barThickness?function(t,e,n){var i,r=e.pixels,o=r[t],s=0<t?r[t-1]:null,a=t<r.length-1?r[t+1]:null,l=n.categoryPercentage;return null===s&&(s=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-s),i=o-(o-Math.min(s,a))/2*l,{chunk:Math.abs(a-s)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):Dt(e,n,i),o=this.getStackIndex(t,this.getMeta().stack),s=r.start+r.chunk*o+r.chunk/2,a=Math.min(jt(i.maxBarThickness,1/0),r.chunk*r.ratio);return{base:s-a/2,head:s+a/2,center:s,size:a}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),r=n.length,o=0;for(q.canvas.clipArea(t.ctx,t.chartArea);o<r;++o){var s=e._parseValue(i.data[o]);isNaN(s.min)||isNaN(s.max)||n[o].draw()}q.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=q.extend({},st.prototype._resolveDataElementOptions.apply(this,arguments)),e=this._getIndexScale().options,n=this._getValueScale().options;return t.barPercentage=jt(e.barPercentage,t.barPercentage),t.barThickness=jt(e.barThickness,t.barThickness),t.categoryPercentage=jt(e.categoryPercentage,t.categoryPercentage),t.maxBarThickness=jt(e.maxBarThickness,t.maxBarThickness),t.minBarLength=jt(n.minBarLength,t.minBarLength),t}}),Lt=q.valueOrDefault,At=q.options.resolve;N._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var It=st.extend({dataElementType:St.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(n){var i=this,t=i.getMeta().data;q.each(t,function(t,e){i.updateElement(t,e,n)})},updateElement:function(t,e,n){var i=this.getMeta(),r=t.custom||{},o=this.getScaleForId(i.xAxisID),s=this.getScaleForId(i.yAxisID),a=this._resolveDataElementOptions(t,e),l=this.getDataset().data[e],u=this.index,c=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof l?l:NaN,e,u),d=n?s.getBasePixel():s.getPixelForValue(l,e,u);t._xScale=o,t._yScale=s,t._options=a,t._datasetIndex=u,t._index=e,t._model={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth,hitRadius:a.hitRadius,pointStyle:a.pointStyle,rotation:a.rotation,radius:n?0:a.radius,skip:r.skip||isNaN(c)||isNaN(d),x:c,y:d},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=q.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this.chart,i=this.getDataset(),r=t.custom||{},o=i.data[e]||{},s=st.prototype._resolveDataElementOptions.apply(this,arguments),a={chart:n,dataIndex:e,dataset:i,datasetIndex:this.index};return this._cachedDataOpts===s&&(s=q.extend({},s)),s.radius=At([r.radius,o.r,this._config.radius,n.options.elements.point.radius],a,e),s}}),$t=q.valueOrDefault,Bt=Math.PI,Rt=2*Bt,Nt=Bt/2;N._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,r=document.createElement("ul"),o=t.data,s=o.datasets,a=o.labels;if(r.setAttribute("class",t.id+"-legend"),s.length)for(n=s[e=0].data.length;e<n;++e)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=s[0].backgroundColor[e],a[e]&&i.appendChild(document.createTextNode(a[e]));return r.outerHTML},legend:{labels:{generateLabels:function(r){var o=r.data;return o.labels.length&&o.datasets.length?o.labels.map(function(t,e){var n=r.getDatasetMeta(0),i=n.controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(o.datasets[0].data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var n,i,r,o=e.index,s=this.chart;for(n=0,i=(s.data.datasets||[]).length;n<i;++n)(r=s.getDatasetMeta(n)).data[o]&&(r.data[o].hidden=!r.data[o].hidden);s.update()}},cutoutPercentage:50,rotation:-Nt,circumference:Rt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return q.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Vt=st.extend({dataElementType:St.Arc,linkScales:q.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,r,o=this,s=o.chart,a=s.chartArea,l=s.options,u=1,c=1,d=0,h=0,p=o.getMeta(),f=p.data,g=l.cutoutPercentage/100||0,m=l.circumference,y=o._getRingWeight(o.index);if(m<Rt){var v=l.rotation%Rt,b=(v+=Bt<=v?-Rt:v<-Bt?Rt:0)+m,_=Math.cos(v),w=Math.sin(v),x=Math.cos(b),k=Math.sin(b),C=v<=0&&0<=b||Rt<=b,S=v<=Nt&&Nt<=b||Rt+Nt<=b,P=v<=-Nt&&-Nt<=b||Bt+Nt<=b,E=v===-Bt||Bt<=b?-1:Math.min(_,_*g,x,x*g),T=P?-1:Math.min(w,w*g,k,k*g),O=C?1:Math.max(_,_*g,x,x*g),M=S?1:Math.max(w,w*g,k,k*g);u=(O-E)/2,c=(M-T)/2,d=-(O+E)/2,h=-(M+T)/2}for(i=0,r=f.length;i<r;++i)f[i]._options=o._resolveDataElementOptions(f[i],i);for(s.borderWidth=o.getMaxBorderWidth(),e=(a.right-a.left-s.borderWidth)/u,n=(a.bottom-a.top-s.borderWidth)/c,s.outerRadius=Math.max(Math.min(e,n)/2,0),s.innerRadius=Math.max(s.outerRadius*g,0),s.radiusLength=(s.outerRadius-s.innerRadius)/(o._getVisibleDatasetWeightTotal()||1),s.offsetX=d*s.outerRadius,s.offsetY=h*s.outerRadius,p.total=o.calculateTotal(),o.outerRadius=s.outerRadius-s.radiusLength*o._getRingWeightOffset(o.index),o.innerRadius=Math.max(o.outerRadius-s.radiusLength*y,0),i=0,r=f.length;i<r;++i)o.updateElement(f[i],i,t)},updateElement:function(t,e,n){var i=this.chart,r=i.chartArea,o=i.options,s=o.animation,a=(r.left+r.right)/2,l=(r.top+r.bottom)/2,u=o.rotation,c=o.rotation,d=this.getDataset(),h=n&&s.animateRotate?0:t.hidden?0:this.calculateCircumference(d.data[e])*(o.circumference/Rt),p=n&&s.animateScale?0:this.innerRadius,f=n&&s.animateScale?0:this.outerRadius,g=t._options||{};q.extend(t,{_datasetIndex:this.index,_index:e,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:a+i.offsetX,y:l+i.offsetY,startAngle:u,endAngle:c,circumference:h,outerRadius:f,innerRadius:p,label:q.valueAtIndexOrDefault(d.label,e,i.data.labels[e])}});var m=t._model;n&&s.animateRotate||(m.startAngle=0===e?o.rotation:this.getMeta().data[e-1]._model.endAngle,m.endAngle=m.startAngle+m.circumference),t.pivot()},calculateTotal:function(){var n,i=this.getDataset(),t=this.getMeta(),r=0;return q.each(t.data,function(t,e){n=i.data[e],isNaN(n)||t.hidden||(r+=Math.abs(n))}),r},calculateCircumference:function(t){var e=this.getMeta().total;return 0<e&&!isNaN(t)?Rt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,r,o,s,a,l,u=0,c=this.chart;if(!t)for(e=0,n=c.data.datasets.length;e<n;++e)if(c.isDatasetVisible(e)){t=(i=c.getDatasetMeta(e)).data,e!==this.index&&(o=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)r=t[e],"inner"!==(s=o?(o._configure(),o._resolveDataElementOptions(r,e)):r._options).borderAlign&&(u=(u=u<(a=s.borderWidth)?a:u)<(l=s.hoverBorderWidth)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=q.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=$t(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=$t(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=$t(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max($t(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});N._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),N._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Wt=Ft.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Ht=q.valueOrDefault,Ut=q.options.resolve,qt=q.canvas._isPointInArea;function zt(t,e){var n=t&&t.options.ticks||{},i=n.reverse,r=void 0===n.min?e:0,o=void 0===n.max?e:0;return{start:i?o:r,end:i?r:o}}N._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Yt=st.extend({datasetElementType:St.Line,dataElementType:St.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,r=i.getMeta(),o=r.dataset,s=r.data||[],a=i.chart.options,l=i._config,u=i._showLine=Ht(l.showLine,a.showLines);for(i._xScale=i.getScaleForId(r.xAxisID),i._yScale=i.getScaleForId(r.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=i._yScale,o._datasetIndex=i.index,o._children=s,o._model=i._resolveDatasetElementOptions(o),o.pivot()),e=0,n=s.length;e<n;++e)i.updateElement(s[e],e,t);for(u&&0!==o._model.tension&&i.updateBezierControlPoints(),e=0,n=s.length;e<n;++e)s[e].pivot()},updateElement:function(t,e,n){var i,r,o=this.getMeta(),s=t.custom||{},a=this.getDataset(),l=this.index,u=a.data[e],c=this._xScale,d=this._yScale,h=o.dataset._model,p=this._resolveDataElementOptions(t,e);i=c.getPixelForValue("object"==typeof u?u:NaN,e,l),r=n?d.getBasePixel():this.calculatePointY(u,e,l),t._xScale=c,t._yScale=d,t._options=p,t._datasetIndex=l,t._index=e,t._model={x:i,y:r,skip:s.skip||isNaN(i)||isNaN(r),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:Ht(s.tension,h?h.tension:0),steppedLine:!!h&&h.steppedLine,hitRadius:p.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this._config,n=t.custom||{},i=this.chart.options,r=i.elements.line,o=st.prototype._resolveDatasetElementOptions.apply(this,arguments);return o.spanGaps=Ht(e.spanGaps,i.spanGaps),o.tension=Ht(e.lineTension,r.tension),o.steppedLine=Ut([n.steppedLine,e.steppedLine,r.stepped]),o.clip=function(t){var e,n,i,r;return q.isObject(t)?(e=t.top,n=t.right,i=t.bottom,r=t.left):e=n=i=r=t,{top:e,right:n,bottom:i,left:r}}(Ht(e.clip,function(t,e,n){var i=n/2,r=zt(t,i),o=zt(e,i);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}(this._xScale,this._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,r,o,s,a,l,u,c=this.chart,d=this._yScale,h=0,p=0;if(d.options.stacked){for(a=+d.getRightValue(t),u=(l=c._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(o=l[i]).index!==n;++i)r=c.data.datasets[o.index],"line"===o.type&&o.yAxisID===d.id&&((s=+d.getRightValue(r.data[e]))<0?p+=s||0:h+=s||0);return a<0?d.getPixelForValue(p+a):d.getPixelForValue(h+a)}return d.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,r=this.chart,o=this.getMeta(),s=o.dataset._model,a=r.chartArea,l=o.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(s.spanGaps&&(l=l.filter(function(t){return!t._model.skip})),"monotone"===s.cubicInterpolationMode)q.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=q.splineCurve(q.previousItem(l,t)._model,n,q.nextItem(l,t)._model,s.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(r.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,qt(n,a)&&(0<t&&qt(l[t-1]._model,a)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,a.left,a.right),n.controlPointPreviousY=u(n.controlPointPreviousY,a.top,a.bottom)),t<l.length-1&&qt(l[t+1]._model,a)&&(n.controlPointNextX=u(n.controlPointNextX,a.left,a.right),n.controlPointNextY=u(n.controlPointNextY,a.top,a.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],r=e.chartArea,o=e.canvas,s=0,a=i.length;for(this._showLine&&(t=n.dataset._model.clip,q.canvas.clipArea(e.ctx,{left:!1===t.left?0:r.left-t.left,right:!1===t.right?o.width:r.right+t.right,top:!1===t.top?0:r.top-t.top,bottom:!1===t.bottom?o.height:r.bottom+t.bottom}),n.dataset.draw(),q.canvas.unclipArea(e.ctx));s<a;++s)i[s].draw(r)},setHoverStyle:function(t){var e=t._model,n=t._options,i=q.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ht(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Ht(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Ht(n.hoverBorderWidth,n.borderWidth),e.radius=Ht(n.hoverRadius,n.radius)}}),Gt=q.options.resolve;N._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,r=document.createElement("ul"),o=t.data,s=o.datasets,a=o.labels;if(r.setAttribute("class",t.id+"-legend"),s.length)for(n=s[e=0].data.length;e<n;++e)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=s[0].backgroundColor[e],a[e]&&i.appendChild(document.createTextNode(a[e]));return r.outerHTML},legend:{labels:{generateLabels:function(r){var o=r.data;return o.labels.length&&o.datasets.length?o.labels.map(function(t,e){var n=r.getDatasetMeta(0),i=n.controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(o.datasets[0].data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var n,i,r,o=e.index,s=this.chart;for(n=0,i=(s.data.datasets||[]).length;n<i;++n)(r=s.getDatasetMeta(n)).data[o].hidden=!r.data[o].hidden;s.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Kt=st.extend({dataElementType:St.Arc,linkScales:q.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,r=this,o=r.getDataset(),s=r.getMeta(),a=r.chart.options.startAngle||0,l=r._starts=[],u=r._angles=[],c=s.data;for(r._updateRadius(),s.count=r.countVisibleElements(),e=0,n=o.data.length;e<n;e++)l[e]=a,i=r._computeAngle(e),a+=u[e]=i;for(e=0,n=c.length;e<n;++e)c[e]._options=r._resolveDataElementOptions(c[e],e),r.updateElement(c[e],e,t)},_updateRadius:function(){var t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top);t.outerRadius=Math.max(i/2,0),t.innerRadius=Math.max(n.cutoutPercentage?t.outerRadius/100*n.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),this.outerRadius=t.outerRadius-t.radiusLength*this.index,this.innerRadius=this.outerRadius-t.radiusLength},updateElement:function(t,e,n){var i=this.chart,r=this.getDataset(),o=i.options,s=o.animation,a=i.scale,l=i.data.labels,u=a.xCenter,c=a.yCenter,d=o.startAngle,h=t.hidden?0:a.getDistanceFromCenterForValue(r.data[e]),p=this._starts[e],f=p+(t.hidden?0:this._angles[e]),g=s.animateScale?0:a.getDistanceFromCenterForValue(r.data[e]),m=t._options||{};q.extend(t,{_datasetIndex:this.index,_index:e,_scale:a,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:u,y:c,innerRadius:0,outerRadius:n?g:h,startAngle:n&&s.animateRotate?d:p,endAngle:n&&s.animateRotate?d:f,label:q.valueAtIndexOrDefault(l,e,l[e])}}),t.pivot()},countVisibleElements:function(){var n=this.getDataset(),t=this.getMeta(),i=0;return q.each(t.data,function(t,e){isNaN(n.data[e])||t.hidden||i++}),i},setHoverStyle:function(t){var e=t._model,n=t._options,i=q.getHoverColor,r=q.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=r(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=r(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=r(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this.getMeta().count,n=this.getDataset(),i=this.getMeta();if(isNaN(n.data[t])||i.data[t].hidden)return 0;var r={chart:this.chart,dataIndex:t,dataset:n,datasetIndex:this.index};return Gt([this.chart.options.elements.arc.angle,2*Math.PI/e],r,t)}});N._set("pie",q.clone(N.doughnut)),N._set("pie",{cutoutPercentage:0});var Xt=Vt,Jt=q.valueOrDefault;N._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Zt=st.extend({datasetElementType:St.Line,dataElementType:St.Point,linkScales:q.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this.getMeta(),r=i.dataset,o=i.data||[],s=this.chart.scale,a=this._config;for(void 0!==a.tension&&void 0===a.lineTension&&(a.lineTension=a.tension),r._scale=s,r._datasetIndex=this.index,r._children=o,r._loop=!0,r._model=this._resolveDatasetElementOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)this.updateElement(o[e],e,t);for(this.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=t.custom||{},r=this.getDataset(),o=this.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),a=this._resolveDataElementOptions(t,e),l=this.getMeta().dataset._model,u=n?o.xCenter:s.x,c=n?o.yCenter:s.y;t._scale=o,t._options=a,t._datasetIndex=this.index,t._index=e,t._model={x:u,y:c,skip:i.skip||isNaN(u)||isNaN(c),radius:a.radius,pointStyle:a.pointStyle,rotation:a.rotation,backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth,tension:Jt(i.tension,l?l.tension:0),hitRadius:a.hitRadius}},_resolveDatasetElementOptions:function(){var t=this._config,e=this.chart.options,n=st.prototype._resolveDatasetElementOptions.apply(this,arguments);return n.spanGaps=Jt(t.spanGaps,e.spanGaps),n.tension=Jt(t.lineTension,e.elements.line.tension),n},updateBezierControlPoints:function(){var t,e,n,i,r=this.getMeta(),o=this.chart.chartArea,s=r.data||[];function a(t,e,n){return Math.max(Math.min(t,n),e)}for(r.dataset._model.spanGaps&&(s=s.filter(function(t){return!t._model.skip})),t=0,e=s.length;t<e;++t)n=s[t]._model,i=q.splineCurve(q.previousItem(s,t,!0)._model,n,q.nextItem(s,t,!0)._model,n.tension),n.controlPointPreviousX=a(i.previous.x,o.left,o.right),n.controlPointPreviousY=a(i.previous.y,o.top,o.bottom),n.controlPointNextX=a(i.next.x,o.left,o.right),n.controlPointNextY=a(i.next.y,o.top,o.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=q.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Jt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Jt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Jt(n.hoverBorderWidth,n.borderWidth),e.radius=Jt(n.hoverRadius,n.radius)}});N._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),N._set("global",{datasets:{scatter:{showLine:!1}}});var Qt={bar:Ft,bubble:It,doughnut:Vt,horizontalBar:Wt,line:Yt,polarArea:Kt,pie:Xt,radar:Zt,scatter:Yt};function te(t,e){return t.native?{x:t.x,y:t.y}:q.getRelativePosition(t,e)}function ee(t,e){var n,i,r,o,s,a,l=t._getSortedVisibleDatasetMetas();for(i=0,o=l.length;i<o;++i)for(r=0,s=(n=l[i].data).length;r<s;++r)(a=n[r])._view.skip||e(a)}function ne(t,e){var n=[];return ee(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function ie(t,i,r,o){var s=Number.POSITIVE_INFINITY,a=[];return ee(t,function(t){if(!r||t.inRange(i.x,i.y)){var e=t.getCenterPoint(),n=o(i,e);n<s?(a=[t],s=n):n===s&&a.push(t)}}),a}function re(t){var r=-1!==t.indexOf("x"),o=-1!==t.indexOf("y");return function(t,e){var n=r?Math.abs(t.x-e.x):0,i=o?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}}function oe(t,e,n){var i=te(e,t);n.axis=n.axis||"x";var r=re(n.axis),o=n.intersect?ne(t,i):ie(t,i,!1,r),s=[];return o.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[o[0]._index];e&&!e._view.skip&&s.push(e)}),s):[]}var se={modes:{single:function(t,e){var n=te(e,t),i=[];return ee(t,function(t){if(t.inRange(n.x,n.y))return i.push(t),i}),i.slice(0,1)},label:oe,index:oe,dataset:function(t,e,n){var i=te(e,t);n.axis=n.axis||"xy";var r=re(n.axis),o=n.intersect?ne(t,i):ie(t,i,!1,r);return 0<o.length&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return oe(t,e,{intersect:!1})},point:function(t,e){return ne(t,te(e,t))},nearest:function(t,e,n){var i=te(e,t);n.axis=n.axis||"xy";var r=re(n.axis);return ie(t,i,n.intersect,r)},x:function(t,e,n){var i=te(e,t),r=[],o=!1;return ee(t,function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(o=!0)}),n.intersect&&!o&&(r=[]),r},y:function(t,e,n){var i=te(e,t),r=[],o=!1;return ee(t,function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(o=!0)}),n.intersect&&!o&&(r=[]),r}}},ae=q.extend;function le(t,e){return q.where(t,function(t){return t.pos===e})}function ue(t,r){return t.sort(function(t,e){var n=r?e:t,i=r?t:e;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function ce(t){var e=function(t){var e,n,i,r=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],r.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return r}(t),n=ue(le(e,"left"),!0),i=ue(le(e,"right")),r=ue(le(e,"top"),!0),o=ue(le(e,"bottom"));return{leftAndTop:n.concat(r),rightAndBottom:i.concat(o),chartArea:le(e,"chartArea"),vertical:n.concat(i),horizontal:r.concat(o)}}function de(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function he(t,e,n){var i,r,o=n.box,s=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?o.height:o.width,t[n.pos]+=n.size,o.getPadding){var a=o.getPadding();s.top=Math.max(s.top,a.top),s.left=Math.max(s.left,a.left),s.bottom=Math.max(s.bottom,a.bottom),s.right=Math.max(s.right,a.right)}if(i=e.outerWidth-de(s,t,"left","right"),r=e.outerHeight-de(s,t,"top","bottom"),i!==t.w||r!==t.h){t.w=i,t.h=r;var l=n.horizontal?[i,t.w]:[r,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function pe(t,n){var i=n.maxPadding;function e(t){var e={left:0,top:0,right:0,bottom:0};return t.forEach(function(t){e[t]=Math.max(n[t],i[t])}),e}return e(t?["left","right"]:["top","bottom"])}function fe(t,e,n){var i,r,o,s,a,l,u=[];for(i=0,r=t.length;i<r;++i)(s=(o=t[i]).box).update(o.width||e.w,o.height||e.h,pe(o.horizontal,e)),he(e,n,o)&&(l=!0,u.length&&(a=!0)),s.fullWidth||u.push(o);return a&&fe(u,e,n)||l}function ge(t,e,n){var i,r,o,s,a=n.padding,l=e.x,u=e.y;for(i=0,r=t.length;i<r;++i)s=(o=t[i]).box,o.horizontal?(s.left=s.fullWidth?a.left:e.left,s.right=s.fullWidth?n.outerWidth-a.right:e.left+e.w,s.top=u,s.bottom=u+s.height,s.width=s.right-s.left,u=s.bottom):(s.left=l,s.right=l+s.width,s.top=e.top,s.bottom=e.top+e.h,s.height=s.bottom-s.top,l=s.right);e.x=l,e.y=u}N._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var me,ye={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,r=["fullWidth","position","weight"],o=r.length,s=0;s<o;++s)i=r[s],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(n,t,e){if(n){var i=n.options.layout||{},r=q.options.toPadding(i.padding),o=t-r.width,s=e-r.height,a=ce(n.boxes),l=a.vertical,u=a.horizontal,c=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:o,vBoxMaxWidth:o/2/l.length,hBoxMaxHeight:s/2}),d=ae({maxPadding:ae({},r),w:o,h:s,x:r.left,y:r.top},r);!function(t,e){var n,i,r;for(n=0,i=t.length;n<i;++n)(r=t[n]).width=r.horizontal?r.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,r.height=r.horizontal&&e.hBoxMaxHeight}(l.concat(u),c),fe(l,d,c),fe(u,d,c)&&fe(l,d,c),function(n){var i=n.maxPadding;function t(t){var e=Math.max(i[t]-n[t],0);return n[t]+=e,e}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}(d),ge(a.leftAndTop,d,c),d.x+=d.w,d.y+=d.h,ge(a.rightAndBottom,d,c),n.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h},q.each(a.chartArea,function(t){var e=t.box;ae(e,n.chartArea),e.update(d.w,d.h)})}}},ve=(me=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&me.default||me,be="$chartjs",_e="chartjs-",we=_e+"size-monitor",xe=_e+"render-monitor",ke=_e+"render-animation",Ce=["animationstart","webkitAnimationStart"],Se={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function Pe(t,e){var n=q.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Ee=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Te(t,e,n){t.addEventListener(e,n,Ee)}function Oe(t,e,n){t.removeEventListener(e,n,Ee)}function Me(t,e,n,i,r){return{type:t,chart:e,native:r||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function je(t){var e=document.createElement("div");return e.className=t||"",e}function De(n,i,r){var o=n[be]||(n[be]={}),e=o.resizer=function(t){var e=je(we),n=je(we+"-expand"),i=je(we+"-shrink");function r(){e._reset(),t()}return n.appendChild(je()),i.appendChild(je()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6},Te(n,"scroll",r.bind(n,"expand")),Te(i,"scroll",r.bind(i,"shrink")),e}(function(t,e){var n=!1,i=[];return function(){i=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,q.requestAnimFrame.call(window,function(){n=!1,t.apply(e,i)}))}}(function(){if(o.resizer){var t=r.options.maintainAspectRatio&&n.parentNode,e=t?t.clientWidth:0;i(Me("resize",r)),t&&t.clientWidth<e&&r.canvas&&i(Me("resize",r))}}));!function(e,n){var t=e[be]||(e[be]={}),i=t.renderProxy=function(t){t.animationName===ke&&n()};q.each(Ce,function(t){Te(e,t,i)}),t.reflow=!!e.offsetParent,e.classList.add(xe)}(n,function(){if(o.resizer){var t=n.parentNode;t&&t!==e.parentNode&&t.insertBefore(e,t.firstChild),e._reset()}})}function Fe(t){var e=t[be]||{},n=e.resizer;delete e.resizer,function(e){var t=e[be]||{},n=t.renderProxy;n&&(q.each(Ce,function(t){Oe(e,t,n)}),delete t.renderProxy),e.classList.remove(xe)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Le={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[be]||(t[be]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,ve)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[be]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===r||""===r){var o=Pe(t,"width");void 0!==o&&(t.width=o)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=Pe(t,"height");void 0!==o&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var n=t.canvas;if(n[be]){var i=n[be].initial;["height","width"].forEach(function(t){var e=i[t];q.isNullOrUndef(e)?n.removeAttribute(t):n.setAttribute(t,e)}),q.each(i.style||{},function(t,e){n.style[e]=t}),n.width=n.width,delete n[be]}},addEventListener:function(e,t,n){var i=e.canvas;if("resize"!==t){var r=n[be]||(n[be]={});Te(i,t,(r.proxies||(r.proxies={}))[e.id+"_"+t]=function(t){n(function(t,e){var n=Se[t.type]||t.type,i=q.getRelativePosition(t,e);return Me(n,e,i.x,i.y,t)}(t,e))})}else De(i,n,e)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var r=((n[be]||{}).proxies||{})[t.id+"_"+e];r&&Oe(i,e,r)}else Fe(i)}};q.addEvent=Te,q.removeEvent=Oe;var Ae=Le._enabled?Le:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Ie=q.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ae);N._set("global",{plugins:{}});var $e={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var n=this._plugins;[].concat(t).forEach(function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,r,o,s,a,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(a=(o=(r=l[i]).plugin)[e])&&((s=[t].concat(n||[])).push(r.options),!1===a.apply(o,s)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],r=[],n=t&&t.config||{},o=n.options&&n.options.plugins||{};return this._plugins.concat(n.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,n=o[e];!1!==n&&(!0===n&&(n=q.clone(N.global.plugins[e])),i.push(t),r.push({plugin:t,options:n||{}}))}}),e.descriptors=r,e.id=this._cacheId,r},_invalidate:function(t){delete t.$plugins}},Be={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=q.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?q.merge(Object.create(null),[N.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=q.extend(this.defaults[t],e))},addScalesToLayout:function(e){q.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,ye.addBox(e,t)})}},Re=q.valueOrDefault,Ne=q.rtl.getRtlAdapter;N._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:q.noop,title:function(t,e){var n="",i=e.labels,r=i?i.length:0;if(0<t.length){var o=t[0];o.label?n=o.label:o.xLabel?n=o.xLabel:0<r&&o.index<r&&(n=i[o.index])}return n},afterTitle:q.noop,beforeBody:q.noop,beforeLabel:q.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),q.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:q.noop,afterBody:q.noop,beforeFooter:q.noop,footer:q.noop,afterFooter:q.noop}}});var Ve={average:function(t){if(!t.length)return!1;var e,n,i=0,r=0,o=0;for(e=0,n=t.length;e<n;++e){var s=t[e];if(s&&s.hasValue()){var a=s.tooltipPosition();i+=a.x,r+=a.y,++o}}return{x:i/o,y:r/o}},nearest:function(t,e){var n,i,r,o=e.x,s=e.y,a=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),c=q.distanceBetweenPoints(e,u);c<a&&(a=c,r=l)}}if(r){var d=r.tooltipPosition();o=d.x,s=d.y}return{x:o,y:s}}};function We(t,e){return e&&(q.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function He(t){return("string"==typeof t||t instanceof String)&&-1<t.indexOf("\n")?t.split("\n"):t}function Ue(t){var e=N.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Re(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Re(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Re(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Re(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Re(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Re(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Re(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Re(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Re(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function qe(t,e){var n=t._chart.ctx,i=2*e.yPadding,r=0,o=e.body,s=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);s+=e.beforeBody.length+e.afterBody.length;var a=e.title.length,l=e.footer.length,u=e.titleFontSize,c=e.bodyFontSize,d=e.footerFontSize;i+=a*u,i+=a?(a-1)*e.titleSpacing:0,i+=a?e.titleMarginBottom:0,i+=s*c,i+=s?(s-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*d,i+=l?(l-1)*e.footerSpacing:0;function h(t){r=Math.max(r,n.measureText(t).width+p)}var p=0;return n.font=q.fontString(u,e._titleFontStyle,e._titleFontFamily),q.each(e.title,h),n.font=q.fontString(c,e._bodyFontStyle,e._bodyFontFamily),q.each(e.beforeBody.concat(e.afterBody),h),p=e.displayColors?c+2:0,q.each(o,function(t){q.each(t.before,h),q.each(t.lines,h),q.each(t.after,h)}),p=0,n.font=q.fontString(d,e._footerFontStyle,e._footerFontFamily),q.each(e.footer,h),{width:r+=2*e.xPadding,height:i}}function ze(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ye(t){return We([],He(t))}var Ge=Z.extend({initialize:function(){this._model=Ue(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),n=t.title.apply(this,arguments),i=t.afterTitle.apply(this,arguments),r=[];return r=We(r,He(e)),r=We(r,He(n)),r=We(r,He(i))},getBeforeBody:function(){return Ye(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,n){var i=this,r=i._options.callbacks,o=[];return q.each(t,function(t){var e={before:[],lines:[],after:[]};We(e.before,He(r.beforeLabel.call(i,t,n))),We(e.lines,r.label.call(i,t,n)),We(e.after,He(r.afterLabel.call(i,t,n))),o.push(e)}),o},getAfterBody:function(){return Ye(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),n=t.footer.apply(this,arguments),i=t.afterFooter.apply(this,arguments),r=[];return r=We(r,He(e)),r=We(r,He(n)),r=We(r,He(i))},update:function(t){var e,n,i,r,o,s,a,l,u,c,d=this,h=d._options,p=d._model,f=d._model=Ue(h),g=d._active,m=d._data,y={xAlign:p.xAlign,yAlign:p.yAlign},v={x:p.x,y:p.y},b={width:p.width,height:p.height},_={x:p.caretX,y:p.caretY};if(g.length){f.opacity=1;var w=[],x=[];_=Ve[h.position].call(d,g,d._eventPosition);var k=[];for(e=0,n=g.length;e<n;++e)k.push((i=g[e],c=u=l=o=r=void 0,r=i._xScale,o=i._yScale||i._scale,s=i._index,a=i._datasetIndex,l=i._chart.getDatasetMeta(a).controller,u=l._getIndexScale(),c=l._getValueScale(),{xLabel:r?r.getLabelForIndex(s,a):"",yLabel:o?o.getLabelForIndex(s,a):"",label:u?""+u.getLabelForIndex(s,a):"",value:c?""+c.getLabelForIndex(s,a):"",index:s,datasetIndex:a,x:i._model.x,y:i._model.y}));h.filter&&(k=k.filter(function(t){return h.filter(t,m)})),h.itemSort&&(k=k.sort(function(t,e){return h.itemSort(t,e,m)})),q.each(k,function(t){w.push(h.callbacks.labelColor.call(d,t,d._chart)),x.push(h.callbacks.labelTextColor.call(d,t,d._chart))}),f.title=d.getTitle(k,m),f.beforeBody=d.getBeforeBody(k,m),f.body=d.getBody(k,m),f.afterBody=d.getAfterBody(k,m),f.footer=d.getFooter(k,m),f.x=_.x,f.y=_.y,f.caretPadding=h.caretPadding,f.labelColors=w,f.labelTextColors=x,f.dataPoints=k,v=function(t,e,n,i){var r=t.x,o=t.y,s=t.caretSize,a=t.caretPadding,l=t.cornerRadius,u=n.xAlign,c=n.yAlign,d=s+a,h=l+a;return"right"===u?r-=e.width:"center"===u&&((r-=e.width/2)+e.width>i.width&&(r=i.width-e.width),r<0&&(r=0)),"top"===c?o+=d:o-="bottom"===c?e.height+d:e.height/2,"center"===c?"left"===u?r+=d:"right"===u&&(r-=d):"left"===u?r-=h:"right"===u&&(r+=h),{x:r,y:o}}(f,b=qe(this,f),y=function(t,e){var n,i,r,o,s,a=t._model,l=t._chart,u=t._chart.chartArea,c="center",d="center";a.y<e.height?d="top":a.y>l.height-e.height&&(d="bottom");var h=(u.left+u.right)/2,p=(u.top+u.bottom)/2;i="center"===d?(n=function(t){return t<=h},function(t){return h<t}):(n=function(t){return t<=e.width/2},function(t){return t>=l.width-e.width/2}),r=function(t){return t+e.width+a.caretSize+a.caretPadding>l.width},o=function(t){return t-e.width-a.caretSize-a.caretPadding<0},s=function(t){return t<=p?"top":"bottom"},n(a.x)?(c="left",r(a.x)&&(c="center",d=s(a.y))):i(a.x)&&(c="right",o(a.x)&&(c="center",d=s(a.y)));var f=t._options;return{xAlign:f.xAlign?f.xAlign:c,yAlign:f.yAlign?f.yAlign:d}}(this,b),d._chart)}else f.opacity=0;return f.xAlign=y.xAlign,f.yAlign=y.yAlign,f.x=v.x,f.y=v.y,f.width=b.width,f.height=b.height,f.caretX=_.x,f.caretY=_.y,d._model=f,t&&h.custom&&h.custom.call(d,f),d},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,r=this.getCaretPosition(t,e,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,n){var i,r,o,s,a,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,p=t.x,f=t.y,g=e.width,m=e.height;if("center"===h)a=f+m/2,l="left"===d?(r=(i=p)-u,o=i,s=a+u,a-u):(r=(i=p+g)+u,o=i,s=a-u,a+u);else if(o=(i="left"===d?(r=p+c+u)-u:"right"===d?(r=p+g-c-u)-u:(r=n.caretX)-u,r+u),"top"===h)a=(s=f)-u,l=s;else{a=(s=f+m)+u,l=s;var y=o;o=i,i=y}return{x1:i,x2:r,x3:o,y1:s,y2:a,y3:l}},drawTitle:function(t,e,n){var i,r,o,s=e.title,a=s.length;if(a){var l=Ne(e.rtl,e.x,e.width);for(t.x=ze(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,r=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=q.fontString(i,e._titleFontStyle,e._titleFontFamily),o=0;o<a;++o)n.fillText(s[o],l.x(t.x),t.y+i/2),t.y+=i+r,o+1===a&&(t.y+=e.titleMarginBottom-r)}},drawBody:function(e,t,n){function i(t){n.fillText(t,b.x(e.x+y),e.y+h/2),e.y+=h+p}var r,o,s,a,l,u,c,d,h=t.bodyFontSize,p=t.bodySpacing,f=t._bodyAlign,g=t.body,m=t.displayColors,y=0,v=m?ze(t,"left"):0,b=Ne(t.rtl,t.x,t.width),_=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=q.fontString(h,t._bodyFontStyle,t._bodyFontFamily),e.x=ze(t,_),n.fillStyle=t.bodyFontColor,q.each(t.beforeBody,i),y=m&&"right"!==_?"center"===f?h/2+1:h+2:0,l=0,c=g.length;l<c;++l){for(r=g[l],o=t.labelTextColors[l],s=t.labelColors[l],n.fillStyle=o,q.each(r.before,i),u=0,d=(a=r.lines).length;u<d;++u){if(m){var w=b.x(v);n.fillStyle=t.legendColorBackground,n.fillRect(b.leftForLtr(w,h),e.y,h,h),n.lineWidth=1,n.strokeStyle=s.borderColor,n.strokeRect(b.leftForLtr(w,h),e.y,h,h),n.fillStyle=s.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(w,1),h-2),e.y+1,h-2,h-2),n.fillStyle=o}i(a[u])}q.each(r.after,i)}y=0,q.each(t.afterBody,i),e.y-=p},drawFooter:function(t,e,n){var i,r,o=e.footer,s=o.length;if(s){var a=Ne(e.rtl,e.x,e.width);for(t.x=ze(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=a.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=q.fontString(i,e._footerFontStyle,e._footerFontFamily),r=0;r<s;++r)n.fillText(o[r],a.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var r=e.xAlign,o=e.yAlign,s=t.x,a=t.y,l=i.width,u=i.height,c=e.cornerRadius;n.beginPath(),n.moveTo(s+c,a),"top"===o&&this.drawCaret(t,i),n.lineTo(s+l-c,a),n.quadraticCurveTo(s+l,a,s+l,a+c),"center"===o&&"right"===r&&this.drawCaret(t,i),n.lineTo(s+l,a+u-c),n.quadraticCurveTo(s+l,a+u,s+l-c,a+u),"bottom"===o&&this.drawCaret(t,i),n.lineTo(s+c,a+u),n.quadraticCurveTo(s,a+u,s,a+u-c),"center"===o&&"left"===r&&this.drawCaret(t,i),n.lineTo(s,a+c),n.quadraticCurveTo(s,a,s+c,a),n.closePath(),n.fill(),0<e.borderWidth&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},r=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(i,e,t,n),i.y+=e.yPadding,q.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),q.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!q.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),Ke=Ve,Xe=Ge;Xe.positioners=Ke;var Je=q.valueOrDefault;function Ze(){return q.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var r,o,s,a=n[t].length;for(e[t]||(e[t]=[]),r=0;r<a;++r)s=n[t][r],o=Je(s.type,"xAxes"===t?"category":"linear"),r>=e[t].length&&e[t].push({}),!e[t][r].type||s.type&&s.type!==e[t][r].type?q.merge(e[t][r],[Be.getScaleDefaults(o),s]):q.merge(e[t][r],s)}else q._merger(t,e,n,i)}})}function Qe(){return q.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var r=e[t]||Object.create(null),o=n[t];"scales"===t?e[t]=Ze(r,o):"scale"===t?e[t]=q.merge(r,[Be.getScaleDefaults(o.type),o]):q._merger(t,e,n,i)}})}function tn(t,e,n){for(var i,r=function(t){return t.id===i};i=e+n++,0<=q.findIndex(t,r););return i}function en(t){return"top"===t||"bottom"===t}function nn(n,i){return function(t,e){return t[n]===e[n]?t[i]-e[i]:t[n]-e[n]}}N._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});function rn(t,e){return this.construct(t,e),this}q.extend(rn.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Qe(N.global,N[t.type],t.options||{}),t}(e);var i=Ie.acquireContext(t,e),r=i&&i.canvas,o=r&&r.height,s=r&&r.width;n.id=q.uid(),n.ctx=i,n.canvas=r,n.config=e,n.width=s,n.height=o,n.aspectRatio=o?s/o:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],(n.chart=n).controller=n,rn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&r?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){return $e.notify(this,"beforeInit"),q.retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.options.responsive&&this.resize(!0),this.initToolTip(),$e.notify(this,"afterInit"),this},clear:function(){return q.canvas.clear(this),this},stop:function(){return et.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,r=n.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(q.getMaximumWidth(i))),s=Math.max(0,Math.floor(r?o/r:q.getMaximumHeight(i)));if((e.width!==o||e.height!==s)&&(i.width=e.width=o,i.height=e.height=s,i.style.width=o+"px",i.style.height=s+"px",q.retinaScale(e,n.devicePixelRatio),!t)){var a={width:o,height:s};$e.notify(e,"resize",[a]),n.onResize&&n.onResize(e,a),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,n=t.scales||{},e=t.scale;q.each(n.xAxes,function(t,e){t.id||(t.id=tn(n.xAxes,"x-axis-",e))}),q.each(n.yAxes,function(t,e){t.id||(t.id=tn(n.yAxes,"y-axis-",e))}),e&&(e.id=e.id||"scale")},buildOrUpdateScales:function(){var s=this,t=s.options,a=s.scales||{},e=[],l=Object.keys(a).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),q.each(e,function(t){var e=t.options,n=e.id,i=Je(e.type,t.dtype);en(e.position)!==en(t.dposition)&&(e.position=t.dposition),l[n]=!0;var r=null;if(n in a&&a[n].type===i)(r=a[n]).options=e,r.ctx=s.ctx,r.chart=s;else{var o=Be.getScaleConstructor(i);if(!o)return;r=new o({id:n,type:i,options:e,ctx:s.ctx,chart:s}),a[r.id]=r}r.mergeTicksOptions(),t.isDefault&&(s.scale=r)}),q.each(l,function(t,e){t||delete a[e]}),s.scales=a,Be.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=[],i=this.data.datasets;for(t=0,e=i.length;t<e;t++){var r=i[t],o=this.getDatasetMeta(t),s=r.type||this.config.type;if(o.type&&o.type!==s&&(this.destroyDatasetMeta(t),o=this.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var a=Qt[o.type];if(void 0===a)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new a(this,t),n.push(o.controller)}}return n},resetElements:function(){var n=this;q.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),function(e){var t=e.options;q.each(e.scales,function(t){ye.removeBox(e,t)}),t=Qe(N.global,N[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}(i),$e._invalidate(i),!1!==$e.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var r=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&q.each(r,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],$e.notify(i,"afterUpdate"),i._layers.sort(nn("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var e=this;!1!==$e.notify(e,"beforeLayout")&&(ye.update(this,this.width,this.height),e._layers=[],q.each(e.boxes,function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())},e),e._layers.forEach(function(t,e){t._idx=e}),$e.notify(e,"afterScaleUpdate"),$e.notify(e,"afterLayout"))},updateDatasets:function(){if(!1!==$e.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);$e.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==$e.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),$e.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Je(t.duration,n&&n.duration),r=t.lazy;if(!1!==$e.notify(e,"beforeRender")){var o=function(t){$e.notify(e,"afterRender"),q.callback(n&&n.onComplete,[t],e)};if(n&&i){var s=new tt({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=q.easing.effects[e.easing],i=e.currentStep,r=i/e.numSteps;t.draw(n(r),r,i)},onAnimationProgress:n.onProgress,onAnimationComplete:o});et.addAnimation(e,s,i,r)}else e.draw(),o(new tt({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),q.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==$e.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),$e.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||i.push(this.getDatasetMeta(e));return i.sort(nn("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==$e.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;0<=n;--n)this.drawDataset(e[n],t);$e.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==$e.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),$e.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==$e.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),$e.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return se.modes.single(this,t)},getElementsAtEvent:function(t){return se.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return se.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=se.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return se.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n=n||(e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t})},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),q.canvas.clear(n),Ie.releaseContext(n.ctx),n.canvas=null,n.ctx=null),$e.notify(n,"destroy"),delete rn.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){this.tooltip=new Xe({_chart:this,_chartInstance:this,_data:this.data,_options:this.options.tooltips},this)},bindEvents:function(){var e=this,n=e._listeners={},i=function(){e.eventHandler.apply(e,arguments)};q.each(e.options.events,function(t){Ie.addEventListener(e,t,i),n[t]=i}),e.options.responsive&&(i=function(){e.resize()},Ie.addEventListener(e,"resize",i),n.resize=i)},unbindEvents:function(){var n=this,t=n._listeners;t&&(delete n._listeners,q.each(t,function(t,e){Ie.removeEventListener(n,e,t)}))},updateHoverStyle:function(t,e,n){var i,r,o,s=n?"set":"remove";for(r=0,o=t.length;r<o;++r)(i=t[r])&&this.getDatasetMeta(i._datasetIndex).controller[s+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+s+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==$e.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),$e.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;return r?e.render(r):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},r=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,r.mode,r),q.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,r.mode,!1),n.active.length&&r.mode&&n.updateHoverStyle(n.active,r.mode,!0),e=!q.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),rn.instances={};var on=rn;(rn.Controller=rn).types={},q.configMerge=Qe,q.scaleMerge=Ze;function sn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function an(t){this.options=t||{}}q.extend(an.prototype,{formats:sn,parse:sn,format:sn,add:sn,diff:sn,startOf:sn,endOf:sn,_create:function(t){return t}}),an.override=function(t){q.extend(an.prototype,t)};var ln={_date:an},un={formatters:{values:function(t){return q.isArray(t)?t:""+t},linear:function(t,e,n){var i=3<n.length?n[2]-n[1]:n[1]-n[0];1<Math.abs(i)&&t!==Math.floor(t)&&(i=t-Math.floor(t));var r=q.log10(Math.abs(i)),o="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var s=q.log10(Math.abs(t)),a=Math.floor(s)-Math.floor(r);a=Math.max(Math.min(a,20),0),o=t.toExponential(a)}else{var l=-1*Math.floor(r);l=Math.max(Math.min(l,20),0),o=t.toFixed(l)}else o="0";return o},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(q.log10(t)));return 0===t?"0":1==i||2==i||5==i||0===e||e===n.length-1?t.toExponential():""}}},cn=q.isArray,dn=q.isNullOrUndef,hn=q.valueOrDefault,pn=q.valueAtIndexOrDefault;function fn(t,e,n){var i,r=t.getTicks().length,o=Math.min(e,r-1),s=t.getPixelForTick(o),a=t._startPixel,l=t._endPixel;if(!(n&&(i=1===r?Math.max(s-a,l-s):0===e?(t.getPixelForTick(1)-s)/2:(s-t.getPixelForTick(o-1))/2,(s+=o<e?i:-i)<a-1e-6||l+1e-6<s)))return s}function gn(t,e,n,i){var r,o,s,a,l,u,c,d,h,p,f,g,m,y=n.length,v=[],b=[],_=[],w=0,x=0;for(r=0;r<y;++r){if(a=n[r].label,l=n[r].major?e.major:e.minor,t.font=u=l.string,c=i[u]=i[u]||{data:{},gc:[]},d=l.lineHeight,h=p=0,dn(a)||cn(a)){if(cn(a))for(o=0,s=a.length;o<s;++o)f=a[o],dn(f)||cn(f)||(h=q.measureText(t,c.data,c.gc,h,f),p+=d)}else h=q.measureText(t,c.data,c.gc,h,a),p=d;v.push(h),b.push(p),_.push(d/2),w=Math.max(h,w),x=Math.max(p,x)}function k(t){return{width:v[t]||0,height:b[t]||0,offset:_[t]||0}}return function(t,r){q.each(t,function(t){var e,n=t.gc,i=n.length/2;if(r<i){for(e=0;e<i;++e)delete t.data[n[e]];n.splice(0,i)}})}(i,y),g=v.indexOf(w),m=b.indexOf(x),{first:k(0),last:k(y-1),widest:k(g),highest:k(m)}}function mn(t){return t.drawTicks?t.tickMarkLength:0}function yn(t){var e,n;return t.display?(e=q.options._parseFont(t),n=q.options.toPadding(t.padding),e.lineHeight+n.height):0}function vn(t,e){return q.extend(q.options._parseFont({fontFamily:hn(e.fontFamily,t.fontFamily),fontSize:hn(e.fontSize,t.fontSize),fontStyle:hn(e.fontStyle,t.fontStyle),lineHeight:hn(e.lineHeight,t.lineHeight)}),{color:q.options.resolve([e.fontColor,t.fontColor,N.global.defaultFontColor])})}function bn(t){var e=vn(t,t.minor);return{minor:e,major:t.major.enabled?vn(t,t.major):e}}function _n(t){var e,n,i,r=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&r.push(e);return r}function wn(t,e,n,i){var r,o,s,a,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(s=0,a=(r=q.math._factorize(l)).length-1;s<a;s++)if(u<(o=r[s]))return o;return Math.max(u,1)}function xn(t,e,n,i){var r,o,s,a,l=hn(n,0),u=Math.min(hn(i,t.length),t.length),c=0;for(e=Math.ceil(e),i&&(e=(r=i-n)/Math.floor(r/e)),a=l;a<0;)c++,a=Math.round(l+c*e);for(o=Math.max(l,0);o<u;o++)s=t[o],o===a?(s._index=o,c++,a=Math.round(l+c*e)):delete s.label}N._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:un.formatters.values,minor:{},major:{}}});var kn=Z.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){q.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,r,o,s,a,l=this,u=l.options.ticks,c=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=q.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),s=l.buildTicks()||[],(!(s=l.afterBuildTicks(s)||s)||!s.length)&&l.ticks)for(s=[],i=0,r=l.ticks.length;i<r;++i)s.push({value:l.ticks[i],major:!1});return a=c<(l._ticks=s).length,o=l._convertTicksToLabels(a?function(t,e){for(var n=[],i=t.length/e,r=0,o=t.length;r<o;r+=i)n.push(t[Math.floor(r)]);return n}(s,c):s),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(s):s,a&&(o=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=o,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){q.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){q.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){q.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){q.callback(this.options.beforeDataLimits,[this])},determineDataLimits:q.noop,afterDataLimits:function(){q.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){q.callback(this.options.beforeBuildTicks,[this])},buildTicks:q.noop,afterBuildTicks:function(t){return cn(t)&&t.length?q.callback(this.options.afterBuildTicks,[this,t]):(this.ticks=q.callback(this.options.afterBuildTicks,[this,this.ticks])||this.ticks,t)},beforeTickToLabelConversion:function(){q.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){q.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){q.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,r,o,s,a=this,l=a.options,u=l.ticks,c=a.getTicks().length,d=u.minRotation||0,h=u.maxRotation,p=d;!a._isVisible()||!u.display||h<=d||c<=1||!a.isHorizontal()?a.labelRotation=d:(e=(t=a._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(a.maxWidth,a.chart.width-e),(r=l.offset?a.maxWidth/c:i/(c-1))<e+6&&(r=i/(c-(l.offset?.5:1)),o=a.maxHeight-mn(l.gridLines)-u.padding-yn(l.scaleLabel),s=Math.sqrt(e*e+n*n),p=q.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/r,1)),Math.asin(Math.min(o/s,1))-Math.asin(n/s))),p=Math.max(d,Math.min(h,p))),a.labelRotation=p)},afterCalculateTickRotation:function(){q.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){q.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,r=i.ticks,o=i.scaleLabel,s=i.gridLines,a=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:a&&(e.width=mn(s)+yn(o)),u?a&&(e.height=mn(s)+yn(o)):e.height=t.maxHeight,r.display&&a){var c=bn(r),d=t._getLabelSizes(),h=d.first,p=d.last,f=d.widest,g=d.highest,m=.4*c.minor.lineHeight,y=r.padding;if(u){var v=0!==t.labelRotation,b=q.toRadians(t.labelRotation),_=Math.cos(b),w=Math.sin(b),x=w*f.width+_*(g.height-(v?g.offset:0))+(v?0:m);e.height=Math.min(t.maxHeight,e.height+x+y);var k,C,S=t.getPixelForTick(0)-t.left,P=t.right-t.getPixelForTick(t.getTicks().length-1);C=v?(k=l?_*h.width+w*h.offset:w*(h.height-h.offset),l?w*(p.height-p.offset):_*p.width+w*p.offset):(k=h.width/2,p.width/2),t.paddingLeft=Math.max((k-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((C-P)*t.width/(t.width-P),0)+3}else{var E=r.mirror?0:f.width+y+m;e.width=Math.min(t.maxWidth,e.width+E),t.paddingTop=h.height/2,t.paddingBottom=p.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){q.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(dn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i;for(this.ticks=t.map(function(t){return t.value}),this.beforeTickToLabelConversion(),e=this.convertTicksToLabels(t)||this.ticks,this.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this._labelSizes;return t||(this._labelSizes=t=gn(this.ctx,bn(this.options.ticks),this.getTicks(),this.longestTextCache),this.longestLabelWidth=t.widest.width),t},_parseValue:function(t){var e,n,i,r;return r=cn(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),Math.max(e,n)):(e=void 0,i=n=t=+this.getRightValue(t)),{min:i,max:r,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:q.noop,getPixelForValue:q.noop,getValueForPixel:q.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||n-1<t?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0<t&&0<e?t:0},_autoSkip:function(t){var e,n,i,r,o=this.options.ticks,s=this._length,a=o.maxTicksLimit||s/this._tickSize()+1,l=o.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,c=l[0],d=l[u-1];if(a<u)return function(t,e,n){var i,r,o=0,s=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)r=t[i],i===s?(r._index=i,s=e[++o*n]):delete r.label}(t,l,u/a),_n(t);if(i=wn(l,t,0,a),0<u){for(e=0,n=u-1;e<n;e++)xn(t,i,l[e],l[e+1]);return r=1<u?(d-c)/(u-1):null,xn(t,i,q.isNullOrUndef(r)?0:c-r,c),xn(t,i,d,q.isNullOrUndef(r)?t.length:d+r),_n(t)}return xn(t,i),_n(t)},_tickSize:function(){var t=this.options.ticks,e=q.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),r=this._getLabelSizes(),o=t.autoSkipPadding||0,s=r?r.widest.width+o:0,a=r?r.highest.height+o:0;return this.isHorizontal()?s*i<a*n?s/n:a/i:a*i<s*n?a/n:s/i},_isVisible:function(){var t,e,n,i=this.chart,r=this.options.display;if("auto"!==r)return!!r;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){function e(t){return D(_,t,M)}var n,i,r,o,s,a,l,u,c,d,h,p,f,g,m,y,v,b=this,_=b.chart,w=b.options,x=w.gridLines,k=w.position,C=x.offsetGridLines,S=b.isHorizontal(),P=b._ticksToDraw,E=P.length+(C?1:0),T=mn(x),O=[],M=x.drawBorder?pn(x.lineWidth,0,0):0,j=M/2,D=q._alignPixel;for("top"===k?(n=e(b.bottom),l=b.bottom-T,c=n-j,h=e(t.top)+j,f=t.bottom):"bottom"===k?(n=e(b.top),h=t.top,f=e(t.bottom)-j,l=n+j,c=b.top+T):"left"===k?(n=e(b.right),a=b.right-T,u=n-j,d=e(t.left)+j,p=t.right):(n=e(b.left),d=t.left,p=e(t.right)-j,a=n+j,u=b.left+T),i=0;i<E;++i)r=P[i]||{},dn(r.label)&&i<P.length||(v=i===b.zeroLineIndex&&w.offset===C?(g=x.zeroLineWidth,m=x.zeroLineColor,y=x.zeroLineBorderDash||[],x.zeroLineBorderDashOffset||0):(g=pn(x.lineWidth,i,1),m=pn(x.color,i,"rgba(0,0,0,0.1)"),y=x.borderDash||[],x.borderDashOffset||0),void 0!==(o=fn(b,r._index||i,C))&&(s=D(_,o,g),S?a=u=d=p=s:l=c=h=f=s,O.push({tx1:a,ty1:l,tx2:u,ty2:c,x1:d,y1:h,x2:p,y2:f,width:g,color:m,borderDash:y,borderDashOffset:v})));return O.ticksLength=E,O.borderValue=n,O},_computeLabelItems:function(){var t,e,n,i,r,o,s,a,l,u,c,d,h=this.options,p=h.ticks,f=h.position,g=p.mirror,m=this.isHorizontal(),y=this._ticksToDraw,v=bn(p),b=p.padding,_=mn(h.gridLines),w=-q.toRadians(this.labelRotation),x=[];for(s="top"===f?(o=this.bottom-_-b,w?"left":"center"):"bottom"===f?(o=this.top+_+b,w?"right":"center"):"left"===f?(r=this.right-(g?0:_)-b,g?"left":"right"):(r=this.left+(g?0:_)+b,g?"right":"left"),t=0,e=y.length;t<e;++t)i=(n=y[t]).label,dn(i)||(a=this.getPixelForTick(n._index||t)+p.labelOffset,u=(l=n.major?v.major:v.minor).lineHeight,c=cn(i)?i.length:1,d=m?(r=a,"top"===f?((w?1:.5)-c)*u:(w?0:.5)*u):(o=a,(1-c)*u/2),x.push({x:r,y:o,rotation:w,label:i,font:l,textOffset:d,textAlign:s}));return x},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,r,o,s,a,l=e.ctx,u=e.chart,c=q._alignPixel,d=n.drawBorder?pn(n.lineWidth,0,0):0,h=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(o=0,s=h.length;o<s;++o)i=(a=h[o]).width,r=a.color,i&&r&&(l.save(),l.lineWidth=i,l.strokeStyle=r,l.setLineDash&&(l.setLineDash(a.borderDash),l.lineDashOffset=a.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(a.tx1,a.ty1),l.lineTo(a.tx2,a.ty2)),n.drawOnChartArea&&(l.moveTo(a.x1,a.y1),l.lineTo(a.x2,a.y2)),l.stroke(),l.restore());if(d){var p,f,g,m,y=d,v=pn(n.lineWidth,h.ticksLength-1,1),b=h.borderValue;e.isHorizontal()?(p=c(u,e.left,y)-y/2,f=c(u,e.right,v)+v/2,g=m=b):(g=c(u,e.top,y)-y/2,m=c(u,e.bottom,v)+v/2,p=f=b),l.lineWidth=d,l.strokeStyle=pn(n.color,0),l.beginPath(),l.moveTo(p,g),l.lineTo(f,m),l.stroke()}}},_drawLabels:function(){if(this.options.ticks.display){var t,e,n,i,r,o,s,a,l=this.ctx,u=this._labelItems||(this._labelItems=this._computeLabelItems());for(t=0,n=u.length;t<n;++t){if(o=(r=u[t]).font,l.save(),l.translate(r.x,r.y),l.rotate(r.rotation),l.font=o.string,l.fillStyle=o.color,l.textBaseline="middle",l.textAlign=r.textAlign,s=r.label,a=r.textOffset,cn(s))for(e=0,i=s.length;e<i;++e)l.fillText(""+s[e],0,a),a+=o.lineHeight;else l.fillText(s,0,a);l.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var r,o,s=hn(i.fontColor,N.global.defaultFontColor),a=q.options._parseFont(i),l=q.options.toPadding(i.padding),u=a.lineHeight/2,c=n.position,d=0;if(t.isHorizontal())r=t.left+t.width/2,o="bottom"===c?t.bottom-u-l.bottom:t.top+u+l.top;else{var h="left"===c;r=h?t.left+u+l.top:t.right-u-l.top,o=t.top+t.height/2,d=h?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(r,o),e.rotate(d),e.textAlign="center",e.textBaseline="middle",e.fillStyle=s,e.font=a.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(e){var n=this,i=n.isHorizontal();return n.chart._getSortedVisibleDatasetMetas().filter(function(t){return(!e||t.type===e)&&(i?t.xAxisID===n.id:t.yAxisID===n.id)})}});kn.prototype._draw=kn.prototype.draw;var Cn=kn,Sn=q.isNullOrUndef,Pn=Cn.extend({determineDataLimits:function(){var t,e=this._getLabels(),n=this.options.ticks,i=n.min,r=n.max,o=0,s=e.length-1;void 0!==i&&0<=(t=e.indexOf(i))&&(o=t),void 0!==r&&0<=(t=e.indexOf(r))&&(s=t),this.minIndex=o,this.maxIndex=s,this.min=e[o],this.max=e[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this.options.offset,e=this.ticks;Cn.prototype._configure.call(this),this.isHorizontal()||(this._reversePixels=!this._reversePixels),e&&(this._startValue=this.minIndex-(t?.5:0),this._valueRange=Math.max(e.length-(t?0:1),1))},getPixelForValue:function(t,e,n){var i,r,o;return Sn(e)||Sn(n)||(t=this.chart.data.datasets[n].data[e]),Sn(t)||(i=this.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(r=this._getLabels(),t=q.valueOrDefault(i,t),e=-1!==(o=r.indexOf(t))?o:e,isNaN(e)&&(e=t)),this.getPixelForDecimal((e-this._startValue)/this._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),En={position:"bottom"};Pn._defaults=En;var Tn=q.noop,On=q.isNullOrUndef;var Mn=Cn.extend({getRightValue:function(t){return"string"==typeof t?+t:Cn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=q.sign(t.min),i=q.sign(t.max);n<0&&i<0?t.max=0:0<n&&0<i&&(t.min=0)}var r=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),r!=o&&t.min>=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Tn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:q.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=function(t,e){var n,i,r,o,s=[],a=t.stepSize,l=a||1,u=t.maxTicks-1,c=t.min,d=t.max,h=t.precision,p=e.min,f=e.max,g=q.niceNum((f-p)/u/l)*l;if(g<1e-14&&On(c)&&On(d))return[p,f];u<(o=Math.ceil(f/g)-Math.floor(p/g))&&(g=q.niceNum(o*g/u/l)*l),a||On(h)?n=Math.pow(10,q._decimalPlaces(g)):(n=Math.pow(10,h),g=Math.ceil(g*n)/n),i=Math.floor(p/g)*g,r=Math.ceil(f/g)*g,a&&(!On(c)&&q.almostWhole(c/g,g/1e3)&&(i=c),!On(d)&&q.almostWhole(d/g,g/1e3)&&(r=d)),o=(r-i)/g,o=q.almostEquals(o,Math.round(o),g/1e3)?Math.round(o):Math.ceil(o),i=Math.round(i*n)/n,r=Math.round(r*n)/n,s.push(On(c)?i:c);for(var m=1;m<o;++m)s.push(Math.round((i+m*g)*n)/n);return s.push(On(d)?r:d),s}(i,t);t.handleDirectionalChanges(),t.max=q.max(r),t.min=q.min(r),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),Cn.prototype.convertTicksToLabels.call(this)},_configure:function(){var t,e=this.getTicks(),n=this.min,i=this.max;Cn.prototype._configure.call(this),this.options.offset&&e.length&&(n-=t=(i-n)/Math.max(e.length-1,1)/2,i+=t),this._startValue=n,this._endValue=i,this._valueRange=i-n}}),jn={position:"left",ticks:{callback:un.formatters.linear}};function Dn(t,e,n,i){var r,o,s=t.options,a=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,s.stacked,n),l=a.pos,u=a.neg,c=i.length;for(r=0;r<c;++r)o=t._parseValue(i[r]),isNaN(o.min)||isNaN(o.max)||n.data[r].hidden||(l[r]=l[r]||0,u[r]=u[r]||0,s.relativePoints?l[r]=100:o.min<0||o.max<0?u[r]+=o.min:l[r]+=o.max)}function Fn(t,e,n){var i,r,o=n.length;for(i=0;i<o;++i)r=t._parseValue(n[i]),isNaN(r.min)||isNaN(r.max)||e.data[i].hidden||(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}var Ln=Mn.extend({determineDataLimits:function(){var t,e,n,i,r=this,o=r.options,s=r.chart.data.datasets,a=r._getMatchingVisibleMetas(),l=o.stacked,u={},c=a.length;if(r.min=Number.POSITIVE_INFINITY,r.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<c;++t)l=void 0!==(e=a[t]).stack;for(t=0;t<c;++t)n=s[(e=a[t]).index].data,l?Dn(r,u,e,n):Fn(r,e,n);q.each(u,function(t){i=t.pos.concat(t.neg),r.min=Math.min(r.min,q.min(i)),r.max=Math.max(r.max,q.max(i))}),r.min=q.isFinite(r.min)&&!isNaN(r.min)?r.min:0,r.max=q.isFinite(r.max)&&!isNaN(r.max)?r.max:1,r.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=q.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),An=jn;Ln._defaults=An;var In=q.valueOrDefault,$n=q.math.log10;var Bn={position:"left",ticks:{callback:un.formatters.logarithmic}};function Rn(t,e){return q.isFinite(t)&&0<=t?t:e}var Nn=Cn.extend({determineDataLimits:function(){var t,e,n,i,r,o,s=this,a=s.options,l=s.chart,u=l.data.datasets,c=s.isHorizontal();function d(t){return c?t.xAxisID===s.id:t.yAxisID===s.id}s.min=Number.POSITIVE_INFINITY,s.max=Number.NEGATIVE_INFINITY,s.minNotZero=Number.POSITIVE_INFINITY;var h=a.stacked;if(void 0===h)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e)&&void 0!==e.stack){h=!0;break}if(a.stacked||h){var p={};for(t=0;t<u.length;t++){var f=[(e=l.getDatasetMeta(t)).type,void 0===a.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&d(e))for(void 0===p[f]&&(p[f]=[]),r=0,o=(i=u[t].data).length;r<o;r++){var g=p[f];n=s._parseValue(i[r]),isNaN(n.min)||isNaN(n.max)||e.data[r].hidden||n.min<0||n.max<0||(g[r]=g[r]||0,g[r]+=n.max)}}q.each(p,function(t){if(0<t.length){var e=q.min(t),n=q.max(t);s.min=Math.min(s.min,e),s.max=Math.max(s.max,n)}})}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e))for(r=0,o=(i=u[t].data).length;r<o;r++)n=s._parseValue(i[r]),isNaN(n.min)||isNaN(n.max)||e.data[r].hidden||n.min<0||n.max<0||(s.min=Math.min(n.min,s.min),s.max=Math.max(n.max,s.max),0!==n.min&&(s.minNotZero=Math.min(n.min,s.minNotZero)));s.min=q.isFinite(s.min)?s.min:null,s.max=q.isFinite(s.max)?s.max:null,s.minNotZero=q.isFinite(s.minNotZero)?s.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=Rn(e.min,t.min),t.max=Rn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor($n(t.min))-1),t.max=Math.pow(10,Math.floor($n(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor($n(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor($n(t.min))+1):10),null===t.minNotZero&&(0<t.min?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor($n(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Rn(e.min),max:Rn(e.max)},r=t.ticks=function(t,e){var n,i,r=[],o=In(t.min,Math.pow(10,Math.floor($n(e.min)))),s=Math.floor($n(e.max)),a=Math.ceil(e.max/Math.pow(10,s));0===o?(n=Math.floor($n(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),r.push(o),o=i*Math.pow(10,n)):(n=Math.floor($n(o)),i=Math.floor(o/Math.pow(10,n)));for(var l=n<0?Math.pow(10,Math.abs(n)):1;r.push(o),10===++i&&(i=1,l=0<=++n?1:l),o=Math.round(i*Math.pow(10,n)*l)/l,n<s||n===s&&i<a;);var u=In(t.max,o);return r.push(u),r}(i,t);t.max=q.max(r),t.min=q.min(r),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),Cn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor($n(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;Cn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=In(t.options.ticks.fontSize,N.global.defaultFontSize)/t._length),t._startValue=$n(e),t._valueOffset=n,t._valueRange=($n(t.max)-$n(e))/(1-n)},getPixelForValue:function(t){var e=0;return(t=+this.getRightValue(t))>this.min&&0<t&&(e=($n(t)-this._startValue)/this._valueRange+this._valueOffset),this.getPixelForDecimal(e)},getValueForPixel:function(t){var e=this.getDecimalForPixel(t);return 0===e&&0===this.min?0:Math.pow(10,this._startValue+(e-this._valueOffset)*this._valueRange)}}),Vn=Bn;Nn._defaults=Vn;var Wn=q.valueOrDefault,Hn=q.valueAtIndexOrDefault,Un=q.options.resolve,qn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:un.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function zn(t){var e=t.ticks;return e.display&&t.display?Wn(e.fontSize,N.global.defaultFontSize)+2*e.backdropPaddingY:0}function Yn(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||r<t?{start:e-n,end:e}:{start:e,end:e+n}}function Gn(t,e,n,i){var r,o,s=n.y+i/2;if(q.isArray(e))for(r=0,o=e.length;r<o;++r)t.fillText(e[r],n.x,s),s+=i;else t.fillText(e,n.x,s)}function Kn(t){return q.isNumber(t)?t:0}var Xn=Mn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=zn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var r=this,n=r.chart,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;q.each(n.data.datasets,function(t,e){if(n.isDatasetVisible(e)){var i=n.getDatasetMeta(e);q.each(t.data,function(t,e){var n=+r.getRightValue(t);isNaN(n)||i.data[e].hidden||(o=Math.min(n,o),s=Math.max(n,s))})}}),r.min=o===Number.POSITIVE_INFINITY?0:o,r.max=s===Number.NEGATIVE_INFINITY?0:s,r.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/zn(this.options))},convertTicksToLabels:function(){var e=this;Mn.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=q.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,r=q.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},s={};t.ctx.font=r.string,t._pointLabelSizes=[];var a,l,u,c=t.chart.data.labels.length;for(e=0;e<c;e++){i=t.getPointPosition(e,t.drawingArea+5),a=t.ctx,l=r.lineHeight,u=t.pointLabels[e],n=q.isArray(u)?{w:q.longestText(a,a.font,u),h:u.length*l}:{w:a.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var d=t.getIndexAngle(e),h=q.toDegrees(d)%360,p=Yn(h,i.x,n.w,0,180),f=Yn(h,i.y,n.h,90,270);p.start<o.l&&(o.l=p.start,s.l=d),p.end>o.r&&(o.r=p.end,s.r=d),f.start<o.t&&(o.t=f.start,s.t=d),f.end>o.b&&(o.b=f.end,s.b=d)}t.setReductions(t.drawingArea,o,s)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=e.l/Math.sin(n.l),r=Math.max(e.r-this.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(n.b);i=Kn(i),r=Kn(r),o=Kn(o),s=Kn(s),this.drawingArea=Math.min(Math.floor(t-(i+r)/2),Math.floor(t-(o+s)/2)),this.setCenterPoint(i,r,o,s)},setCenterPoint:function(t,e,n,i){var r=this,o=r.width-e-r.drawingArea,s=t+r.drawingArea,a=n+r.drawingArea,l=r.height-r.paddingTop-i-r.drawingArea;r.xCenter=Math.floor((s+o)/2+r.left),r.yCenter=Math.floor((a+l)/2+r.top+r.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?360+n:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){if(q.isNullOrUndef(t))return NaN;var e=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-t)*e:(t-this.min)*e},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:0<e&&0<n?e:0)},_drawGrid:function(){var t,n,e,i=this,r=i.ctx,o=i.options,s=o.gridLines,a=o.angleLines,l=Wn(a.lineWidth,s.lineWidth),u=Wn(a.color,s.color);if(o.pointLabels.display&&function(t){var e,n,i,r,o=t.ctx,s=t.options,a=s.pointLabels,l=zn(s),u=t.getDistanceFromCenterForValue(s.ticks.reverse?t.min:t.max),c=q.options._parseFont(a);o.save(),o.font=c.string,o.textBaseline="middle";for(var d=t.chart.data.labels.length-1;0<=d;d--){var h=0===d?l/2:0,p=t.getPointPosition(d,u+h+5),f=Hn(a.fontColor,d,N.global.defaultFontColor);o.fillStyle=f;var g=t.getIndexAngle(d),m=q.toDegrees(g);o.textAlign=0===(r=m)||180===r?"center":r<180?"left":"right",e=m,n=t._pointLabelSizes[d],i=p,90===e||270===e?i.y-=n.h/2:(270<e||e<90)&&(i.y-=n.h),Gn(o,t.pointLabels[d],p,c.lineHeight)}o.restore()}(i),s.display&&q.each(i.ticks,function(t,e){0!==e&&(n=i.getDistanceFromCenterForValue(i.ticksAsNumbers[e]),function(t,e,n,i){var r,o=t.ctx,s=e.circular,a=t.chart.data.labels.length,l=Hn(e.color,i-1),u=Hn(e.lineWidth,i-1);if((s||a)&&l&&u){if(o.save(),o.strokeStyle=l,o.lineWidth=u,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),s)o.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{r=t.getPointPosition(0,n),o.moveTo(r.x,r.y);for(var c=1;c<a;c++)r=t.getPointPosition(c,n),o.lineTo(r.x,r.y)}o.closePath(),o.stroke(),o.restore()}}(i,s,n,e))}),a.display&&l&&u){for(r.save(),r.lineWidth=l,r.strokeStyle=u,r.setLineDash&&(r.setLineDash(Un([a.borderDash,s.borderDash,[]])),r.lineDashOffset=Un([a.borderDashOffset,s.borderDashOffset,0])),t=i.chart.data.labels.length-1;0<=t;t--)n=i.getDistanceFromCenterForValue(o.ticks.reverse?i.min:i.max),e=i.getPointPosition(t,n),r.beginPath(),r.moveTo(i.xCenter,i.yCenter),r.lineTo(e.x,e.y),r.stroke();r.restore()}},_drawLabels:function(){var n=this,i=n.ctx,r=n.options.ticks;if(r.display){var o,s,t=n.getIndexAngle(0),a=q.options._parseFont(r),l=Wn(r.fontColor,N.global.defaultFontColor);i.save(),i.font=a.string,i.translate(n.xCenter,n.yCenter),i.rotate(t),i.textAlign="center",i.textBaseline="middle",q.each(n.ticks,function(t,e){0===e&&!r.reverse||(o=n.getDistanceFromCenterForValue(n.ticksAsNumbers[e]),r.showLabelBackdrop&&(s=i.measureText(t).width,i.fillStyle=r.backdropColor,i.fillRect(-s/2-r.backdropPaddingX,-o-a.size/2-r.backdropPaddingY,s+2*r.backdropPaddingX,a.size+2*r.backdropPaddingY)),i.fillStyle=l,i.fillText(t,0,-o))}),i.restore()}},_drawTitle:q.noop}),Jn=qn;Xn._defaults=Jn;var Zn=q._deprecated,Qn=q.options.resolve,ti=q.valueOrDefault,ei=Number.MIN_SAFE_INTEGER||-9007199254740991,ni=Number.MAX_SAFE_INTEGER||9007199254740991,ii={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ri=Object.keys(ii);function oi(t,e){return t-e}function si(t){return q.valueOrDefault(t.time.min,t.ticks.min)}function ai(t){return q.valueOrDefault(t.time.max,t.ticks.max)}function li(t,e,n,i){var r=function(t,e,n){for(var i,r,o,s=0,a=t.length-1;0<=s&&s<=a;){if(r=t[(i=s+a>>1)-1]||null,o=t[i],!r)return{lo:null,hi:o};if(o[e]<n)s=1+i;else{if(!(r[e]>n))return{lo:r,hi:o};a=i-1}}return{lo:o,hi:null}}(t,e,n),o=r.lo?r.hi?r.lo:t[t.length-2]:t[0],s=r.lo?r.hi?r.hi:t[t.length-1]:t[1],a=s[e]-o[e],l=a?(n-o[e])/a:0,u=(s[i]-o[i])*l;return o[i]+u}function ui(t,e){var n=t._adapter,i=t.options.time,r=i.parser,o=r||i.format,s=e;return"function"==typeof r&&(s=r(s)),q.isFinite(s)||(s="string"==typeof o?n.parse(s,o):n.parse(s)),null!==s?+s:(r||"function"!=typeof o||(s=o(e),q.isFinite(s)||(s=n.parse(s))),s)}function ci(t,e){if(q.isNullOrUndef(e))return null;var n=t.options.time,i=ui(t,t.getRightValue(e));return null===i||n.round&&(i=+t._adapter.startOf(i,n.round)),i}function di(t,e,n,i){var r,o,s,a=ri.length;for(r=ri.indexOf(t);r<a-1;++r)if(s=(o=ii[ri[r]]).steps?o.steps:ni,o.common&&Math.ceil((n-e)/(s*o.size))<=i)return ri[r];return ri[a-1]}function hi(t,e,n){var i,r,o=[],s={},a=e.length;for(i=0;i<a;++i)s[r=e[i]]=i,o.push({value:r,major:!1});return 0!==a&&n?function(t,e,n,i){var r,o,s=t._adapter,a=+s.startOf(e[0].value,i),l=e[e.length-1].value;for(r=a;r<=l;r=+s.add(r,1,i))0<=(o=n[r])&&(e[o].major=!0);return e}(t,o,s,n):o}var pi=Cn.extend({initialize:function(){this.mergeTicksOptions(),Cn.prototype.initialize.call(this)},update:function(){var t=this.options,e=t.time||(t.time={}),n=this._adapter=new ln._date(t.adapters.date);return Zn("time scale",e.format,"time.format","time.parser"),Zn("time scale",e.min,"time.min","ticks.min"),Zn("time scale",e.max,"time.max","ticks.max"),q.mergeIf(e.displayFormats,n.formats()),Cn.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),Cn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,r,o,s,a=this,l=a.chart,u=a._adapter,c=a.options,d=c.time.unit||"day",h=ni,p=ei,f=[],g=[],m=[],y=a._getLabels();for(t=0,n=y.length;t<n;++t)m.push(ci(a,y[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(r=l.data.datasets[t].data,q.isObject(r[0]))for(g[t]=[],e=0,i=r.length;e<i;++e)o=ci(a,r[e]),f.push(o),g[t][e]=o;else g[t]=m.slice(0),s||(f=f.concat(m),s=!0);else g[t]=[];m.length&&(h=Math.min(h,m[0]),p=Math.max(p,m[m.length-1])),f.length&&(f=1<n?function(t){var e,n,i,r={},o=[];for(e=0,n=t.length;e<n;++e)r[i=t[e]]||(r[i]=!0,o.push(i));return o}(f).sort(oi):f.sort(oi),h=Math.min(h,f[0]),p=Math.max(p,f[f.length-1])),h=ci(a,si(c))||h,p=ci(a,ai(c))||p,h=h===ni?+u.startOf(Date.now(),d):h,p=p===ei?+u.endOf(Date.now(),d)+1:p,a.min=Math.min(h,p),a.max=Math.max(h+1,p),a._table=[],a._timestamps={data:f,datasets:g,labels:m}},buildTicks:function(){var t,e,n,i=this,r=i.min,o=i.max,s=i.options,a=s.ticks,l=s.time,u=i._timestamps,c=[],d=i.getLabelCapacity(r),h=a.source,p=s.distribution;for(u="data"===h||"auto"===h&&"series"===p?u.data:"labels"===h?u.labels:function(t,e,n,i){var r,o=t._adapter,s=t.options,a=s.time,l=a.unit||di(a.minUnit,e,n,i),u=Qn([a.stepSize,a.unitStepSize,1]),c="week"===l&&a.isoWeekday,d=e,h=[];if(c&&(d=+o.startOf(d,"isoWeek",c)),d=+o.startOf(d,c?"day":l),o.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(r=d;r<n;r=+o.add(r,u,l))h.push(r);return r!==n&&"ticks"!==s.bounds||h.push(r),h}(i,r,o,d),"ticks"===s.bounds&&u.length&&(r=u[0],o=u[u.length-1]),r=ci(i,si(s))||r,o=ci(i,ai(s))||o,t=0,e=u.length;t<e;++t)r<=(n=u[t])&&n<=o&&c.push(n);return i.min=r,i.max=o,i._unit=l.unit||(a.autoSkip?di(l.minUnit,i.min,i.max,d):function(t,e,n,i,r){var o,s;for(o=ri.length-1;o>=ri.indexOf(n);o--)if(s=ri[o],ii[s].common&&t._adapter.diff(r,i,s)>=e-1)return s;return ri[n?ri.indexOf(n):0]}(i,c.length,l.minUnit,i.min,i.max)),i._majorUnit=a.major.enabled&&"year"!==i._unit?function(t){for(var e=ri.indexOf(t)+1,n=ri.length;e<n;++e)if(ii[ri[e]].common)return ri[e]}(i._unit):void 0,i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var r,o,s,a,l,u=[],c=[e];for(r=0,o=t.length;r<o;++r)e<(a=t[r])&&a<n&&c.push(a);for(c.push(n),r=0,o=c.length;r<o;++r)l=c[r+1],s=c[r-1],a=c[r],void 0!==s&&void 0!==l&&Math.round((l+s)/2)===a||u.push({time:a,pos:r/(o-1)});return u}(i._timestamps.data,r,o,p),i._offsets=function(t,e,n,i,r){var o,s,a=0,l=0;return r.offset&&e.length&&(o=li(t,"time",e[0],"pos"),a=1===e.length?1-o:(li(t,"time",e[1],"pos")-o)/2,s=li(t,"time",e[e.length-1],"pos"),l=1===e.length?s:(s-li(t,"time",e[e.length-2],"pos"))/2),{start:a,end:l,factor:1/(a+1+l)}}(i._table,c,0,0,s),a.reverse&&c.reverse(),hi(i,c,i._majorUnit)},getLabelForIndex:function(t,e){var n=this._adapter,i=this.chart.data,r=this.options.time,o=i.labels&&t<i.labels.length?i.labels[t]:"",s=i.datasets[e].data[t];return q.isObject(s)&&(o=this.getRightValue(s)),r.tooltipFormat?n.format(ui(this,o),r.tooltipFormat):"string"==typeof o?o:n.format(ui(this,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var r=this._adapter,o=this.options,s=o.time.displayFormats,a=s[this._unit],l=this._majorUnit,u=s[l],c=n[e],d=o.ticks,h=l&&u&&c&&c.major,p=r.format(t,i||(h?u:a)),f=h?d.major:d.minor,g=Qn([f.callback,f.userCallback,d.callback,d.userCallback]);return g?g(p,e,n):p},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=li(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=ci(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return 0<=t&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=li(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=q.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(i),o=Math.sin(i),s=ti(e.fontSize,N.global.defaultFontSize);return{w:n*r+s*o,h:n*o+s*r}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,r=this.tickFormatFunction(t,0,hi(this,[t],this._majorUnit),i),o=this._getLabelSize(r),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h);return this.options.offset&&s--,0<s?s:1}}),fi={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};pi._defaults=fi;var gi={category:Pn,linear:Ln,logarithmic:Nn,radialLinear:Xn,time:pi},mi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};ln._date.override("function"==typeof i?{_id:"moment",formats:function(){return mi},parse:function(t,e){return"string"==typeof t&&"string"==typeof e?t=i(t,e):t instanceof i||(t=i(t)),t.isValid()?t.valueOf():null},format:function(t,e){return i(t).format(e)},add:function(t,e,n){return i(t).add(e,n).valueOf()},diff:function(t,e,n){return i(t).diff(i(e),n)},startOf:function(t,e,n){return t=i(t),"isoWeek"===e?t.isoWeekday(n).valueOf():t.startOf(e).valueOf()},endOf:function(t,e){return i(t).endOf(e).valueOf()},_create:function(t){return i(t)}}:{}),N._set("global",{plugins:{filler:{propagate:!0}}});var yi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),r=i&&n.isDatasetVisible(e)&&i.dataset._children||[],o=r.length||0;return o?function(t,e){return e<o&&r[e]._view||null}:null},boundary:function(t){var n=t.boundary,e=n?n.x:null,i=n?n.y:null;return q.isArray(n)?function(t,e){return n[e]}:function(t){return{x:null===e?t.x:e,y:null===i?t.y:i}}}};function vi(t,e,n){var i,r=t._model||{},o=r.fill;if(void 0===o&&(o=!!r.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(i=parseFloat(o,10),isFinite(i)&&Math.floor(i)===i)return"-"!==o[0]&&"+"!==o[0]||(i=e+i),!(i===e||i<0||n<=i)&&i;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function bi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,r,o,s=t.el._scale,a=s.options,l=s.chart.data.labels.length,u=t.fill,c=[];if(!l)return null;for(e=a.ticks.reverse?s.max:s.min,n=a.ticks.reverse?s.min:s.max,i=s.getPointPositionForValue(0,e),r=0;r<l;++r)o="start"===u||"end"===u?s.getPointPositionForValue(r,"start"===u?e:n):s.getBasePosition(r),a.gridLines.circular&&(o.cx=i.x,o.cy=i.y,o.angle=s.getIndexAngle(r)-Math.PI/2),c.push(o);return c}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},r=t.fill,o=null;if(isFinite(r))return null;if("start"===r?o=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===r?o=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:i.getBasePixel&&(o=i.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(q.isFinite(o))return{x:(e=i.isHorizontal())?o:null,y:e?null:o}}return null}(t)}function _i(t,e,n){var i,r=t[e].fill,o=[e];if(!n)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!isFinite(r))return r;if(!(i=t[r]))return!1;if(i.visible)return r;o.push(r),r=i.fill}return!1}function wi(t){return t&&!t.skip}function xi(t,e,n,i,r){var o,s,a,l;if(i&&r){for(t.moveTo(e[0].x,e[0].y),o=1;o<i;++o)q.canvas.lineTo(t,e[o-1],e[o]);if(void 0===n[0].angle)for(t.lineTo(n[r-1].x,n[r-1].y),o=r-1;0<o;--o)q.canvas.lineTo(t,n[o],n[o-1],!0);else for(s=n[0].cx,a=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-s,2)+Math.pow(n[0].y-a,2)),o=r-1;0<o;--o)t.arc(s,a,l,n[o].angle,n[o-1].angle,!0)}}function ki(t,e,n,i,r,o){var s,a,l,u,c,d,h,p,f=e.length,g=i.spanGaps,m=[],y=[],v=0,b=0;for(t.beginPath(),s=0,a=f;s<a;++s)c=n(u=e[l=s%f]._view,l,i),d=wi(u),h=wi(c),o&&void 0===p&&d&&(a=f+(p=s+1)),d&&h?(v=m.push(u),b=y.push(c)):v&&b&&(g?(d&&m.push(u),h&&y.push(c)):(xi(t,m,y,v,b),v=b=0,m=[],y=[]));xi(t,m,y,v,b),t.closePath(),t.fillStyle=r,t.fill()}var Ci={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,r,o,s,a,l,u=(t.data.datasets||[]).length,c=e.propagate,d=[];for(i=0;i<u;++i)o=null,(r=(n=t.getDatasetMeta(i)).dataset)&&r._model&&r instanceof St.Line&&(o={visible:t.isDatasetVisible(i),fill:vi(r,i,u),chart:t,el:r}),n.$filler=o,d.push(o);for(i=0;i<u;++i)(o=d[i])&&(o.fill=_i(d,i,c),o.boundary=bi(o),o.mapper=(l=void 0,a=(s=o).fill,!(l="dataset")===a?null:(isFinite(a)||(l="boundary"),yi[l](s))))},beforeDatasetsDraw:function(t){var e,n,i,r,o,s,a,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;0<=n;--n)(e=l[n].$filler)&&e.visible&&(r=(i=e.el)._view,o=i._children||[],s=e.mapper,a=r.backgroundColor||N.global.defaultColor,s&&a&&o.length&&(q.canvas.clipArea(u,t.chartArea),ki(u,o,s,r,a,i._loop),q.canvas.unclipArea(u)))}},Si=q.rtl.getRtlAdapter,Pi=q.noop,Ei=q.valueOrDefault;function Ti(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}N._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,r=i.getDatasetMeta(n);r.hidden=null===r.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(n){var i=n.data.datasets,t=n.options.legend||{},r=t.labels&&t.labels.usePointStyle;return n._getSortedDatasetMetas().map(function(t){var e=t.controller.getStyle(r?0:void 0);return{text:i[t.index].label,fillStyle:e.backgroundColor,hidden:!n.isDatasetVisible(t.index),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,rotation:e.rotation,datasetIndex:t.index}},this)}}},legendCallback:function(t){var e,n,i,r=document.createElement("ul"),o=t.data.datasets;for(r.setAttribute("class",t.id+"-legend"),e=0,n=o.length;e<n;e++)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[e].backgroundColor,o[e].label&&i.appendChild(document.createTextNode(o[e].label));return r.outerHTML}});var Oi=Z.extend({initialize:function(t){q.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:Pi,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Pi,beforeSetDimensions:Pi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Pi,beforeBuildLabels:Pi,buildLabels:function(){var e=this,n=e.options.labels||{},t=q.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:Pi,beforeFit:Pi,fit:function(){var t=this,e=t.options,i=e.labels,n=e.display,r=t.ctx,o=q.options._parseFont(i),s=o.size,a=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=n?10:0):(l.width=n?10:0,l.height=t.maxHeight),n){if(r.font=o.string,u){var c=t.lineWidths=[0],d=0;r.textAlign="left",r.textBaseline="middle",q.each(t.legendItems,function(t,e){var n=Ti(i,s)+s/2+r.measureText(t.text).width;(0===e||c[c.length-1]+n+2*i.padding>l.width)&&(d+=s+i.padding,c[c.length-(0<e?0:1)]=0),a[e]={left:0,top:0,width:n,height:s},c[c.length-1]+=n+i.padding}),l.height+=d}else{var h=i.padding,p=t.columnWidths=[],f=t.columnHeights=[],g=i.padding,m=0,y=0;q.each(t.legendItems,function(t,e){var n=Ti(i,s)+s/2+r.measureText(t.text).width;0<e&&y+s+2*h>l.height&&(g+=m+i.padding,p.push(m),f.push(y),y=m=0),m=Math.max(m,n),y+=s+h,a[e]={left:0,top:0,width:n,height:s}}),g+=m,p.push(m),f.push(y),l.width+=g}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Pi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var a=this,n=a.options,l=n.labels,t=N.global,u=t.defaultColor,c=t.elements.line,d=a.height,h=a.columnHeights,p=a.width,f=a.lineWidths;if(n.display){var g,m=Si(n.rtl,a.left,a.minSize.width),y=a.ctx,e=Ei(l.fontColor,t.defaultFontColor),i=q.options._parseFont(l),v=i.size;y.textAlign=m.textAlign("left"),y.textBaseline="middle",y.lineWidth=.5,y.strokeStyle=e,y.fillStyle=e,y.font=i.string;var b=Ti(l,v),_=a.legendHitBoxes,w=function(t,e){switch(n.align){case"start":return l.padding;case"end":return t-e;default:return(t-e+l.padding)/2}},x=a.isHorizontal();g=x?{x:a.left+w(p,f[0]),y:a.top+l.padding,line:0}:{x:a.left+l.padding,y:a.top+w(d,h[0]),line:0},q.rtl.overrideTextDirection(a.ctx,n.textDirection);var k=v+l.padding;q.each(a.legendItems,function(t,e){var n=y.measureText(t.text).width,i=b+v/2+n,r=g.x,o=g.y;m.setWidth(a.minSize.width),x?0<e&&r+i+l.padding>a.left+a.minSize.width&&(o=g.y+=k,g.line++,r=g.x=a.left+w(p,f[g.line])):0<e&&o+k>a.top+a.minSize.height&&(r=g.x=r+a.columnWidths[g.line]+l.padding,g.line++,o=g.y=a.top+w(d,h[g.line]));var s=m.x(r);!function(t,e,n){if(!(isNaN(b)||b<=0)){y.save();var i=Ei(n.lineWidth,c.borderWidth);if(y.fillStyle=Ei(n.fillStyle,u),y.lineCap=Ei(n.lineCap,c.borderCapStyle),y.lineDashOffset=Ei(n.lineDashOffset,c.borderDashOffset),y.lineJoin=Ei(n.lineJoin,c.borderJoinStyle),y.lineWidth=i,y.strokeStyle=Ei(n.strokeStyle,u),y.setLineDash&&y.setLineDash(Ei(n.lineDash,c.borderDash)),l&&l.usePointStyle){var r=b*Math.SQRT2/2,o=m.xPlus(t,b/2),s=e+v/2;q.canvas.drawPoint(y,n.pointStyle,r,o,s,n.rotation)}else y.fillRect(m.leftForLtr(t,b),e,b,v),0!==i&&y.strokeRect(m.leftForLtr(t,b),e,b,v);y.restore()}}(s,o,t),_[e].left=m.leftForLtr(s,_[e].width),function(t,e,n,i){var r=v/2,o=m.xPlus(t,b+r),s=e+r;y.fillText(n.text,o,s),n.hidden&&(y.beginPath(),y.lineWidth=2,y.moveTo(o,s),y.lineTo(m.xPlus(o,i),s),y.stroke())}(s,_[e].top=o,t,n),x?g.x+=i+l.padding:g.y+=k}),q.rtl.restoreTextDirection(a.ctx,n.textDirection)}},_getLegendItemAt:function(t,e){var n,i,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,n=0;n<r.length;++n)if(t>=(i=r[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return this.legendItems[n];return null},handleEvent:function(t){var e,n=this.options,i="mouseup"===t.type?"click":t.type;if("mousemove"===i){if(!n.onHover&&!n.onLeave)return}else{if("click"!==i)return;if(!n.onClick)return}e=this._getLegendItemAt(t.x,t.y),"click"===i?e&&n.onClick&&n.onClick.call(this,t.native,e):(n.onLeave&&e!==this._hoveredItem&&(this._hoveredItem&&n.onLeave.call(this,t.native,this._hoveredItem),this._hoveredItem=e),n.onHover&&e&&n.onHover.call(this,t.native,e))}});function Mi(t,e){var n=new Oi({ctx:t.ctx,options:e,chart:t});ye.configure(t,n,e),ye.addBox(t,n),t.legend=n}var ji={id:"legend",_element:Oi,beforeInit:function(t){var e=t.options.legend;e&&Mi(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(q.mergeIf(e,N.global.legend),n?(ye.configure(t,n,e),n.options=e):Mi(t,e)):n&&(ye.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Di=q.noop;N._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Fi=Z.extend({initialize:function(t){q.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Di,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Di,beforeSetDimensions:Di,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Di,beforeBuildLabels:Di,buildLabels:Di,afterBuildLabels:Di,beforeFit:Di,fit:function(){var t,e=this.options,n=this.minSize={},i=this.isHorizontal();e.display?(t=(q.isArray(e.text)?e.text.length:1)*q.options._parseFont(e).lineHeight+2*e.padding,this.width=n.width=i?this.maxWidth:t,this.height=n.height=i?t:this.maxHeight):this.width=n.width=this.height=n.height=0},afterFit:Di,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=this.options;if(e.display){var n,i,r,o=q.options._parseFont(e),s=o.lineHeight,a=s/2+e.padding,l=0,u=this.top,c=this.left,d=this.bottom,h=this.right;t.fillStyle=q.valueOrDefault(e.fontColor,N.global.defaultFontColor),t.font=o.string,this.isHorizontal()?(i=c+(h-c)/2,r=u+a,n=h-c):(i="left"===e.position?c+a:h-a,r=u+(d-u)/2,n=d-u,l=Math.PI*("left"===e.position?-.5:.5)),t.save(),t.translate(i,r),t.rotate(l),t.textAlign="center",t.textBaseline="middle";var p=e.text;if(q.isArray(p))for(var f=0,g=0;g<p.length;++g)t.fillText(p[g],0,f,n),f+=s;else t.fillText(p,0,0,n);t.restore()}}});function Li(t,e){var n=new Fi({ctx:t.ctx,options:e,chart:t});ye.configure(t,n,e),ye.addBox(t,n),t.titleBlock=n}var Ai={},Ii=Ci,$i=ji,Bi={id:"title",_element:Fi,beforeInit:function(t){var e=t.options.title;e&&Li(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(q.mergeIf(e,N.global.title),n?(ye.configure(t,n,e),n.options=e):Li(t,e)):n&&(ye.removeBox(t,n),delete t.titleBlock)}};function Ri(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function Ni(t){return null!=t&&"none"!==t}function Vi(t,e,n){var i=document.defaultView,r=q._getParentNode(t),o=i.getComputedStyle(t)[e],s=i.getComputedStyle(r)[e],a=Ni(o),l=Ni(s),u=Number.POSITIVE_INFINITY;return a||l?Math.min(a?Ri(o,t,n):u,l?Ri(s,r,n):u):"none"}for(var Wi in Ai.filler=Ii,Ai.legend=$i,Ai.title=Bi,(on.helpers=q).where=function(t,e){if(q.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return q.each(t,function(t){e(t)&&n.push(t)}),n},q.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,r=t.length;i<r;++i)if(e.call(n,t[i],i,t))return i;return-1},q.findNextWhere=function(t,e,n){q.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var r=t[i];if(e(r))return r}},q.findPreviousWhere=function(t,e,n){q.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;0<=i;i--){var r=t[i];if(e(r))return r}},q.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},q.almostEquals=function(t,e,n){return Math.abs(t-e)<n},q.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&t<=n+e},q.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},q.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},q.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:0<t?1:-1},q.toRadians=function(t){return t*(Math.PI/180)},q.toDegrees=function(t){return t*(180/Math.PI)},q._decimalPlaces=function(t){if(q.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},q.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i),o=Math.atan2(i,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:r}},q.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},q.aliasPixel=function(t){return t%2==0?0:.5},q._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,r=n/2;return Math.round((e-r)*i)/i+r},q.splineCurve=function(t,e,n,i){var r=t.skip?e:t,o=e,s=n.skip?e:n,a=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),l=Math.sqrt(Math.pow(s.x-o.x,2)+Math.pow(s.y-o.y,2)),u=a/(a+l),c=l/(a+l),d=i*(u=isNaN(u)?0:u),h=i*(c=isNaN(c)?0:c);return{previous:{x:o.x-d*(s.x-r.x),y:o.y-d*(s.y-r.y)},next:{x:o.x+h*(s.x-r.x),y:o.y+h*(s.y-r.y)}}},q.EPSILON=Number.EPSILON||1e-14,q.splineCurveMonotone=function(t){var e,n,i,r,o,s,a,l,u,c=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),d=c.length;for(e=0;e<d;++e)if(!(i=c[e]).model.skip){if(n=0<e?c[e-1]:null,(r=e<d-1?c[e+1]:null)&&!r.model.skip){var h=r.model.x-i.model.x;i.deltaK=0!=h?(r.model.y-i.model.y)/h:0}!n||n.model.skip?i.mK=i.deltaK:!r||r.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<d-1;++e)i=c[e],r=c[e+1],i.model.skip||r.model.skip||(q.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=r.mK=0:(o=i.mK/i.deltaK,s=r.mK/i.deltaK,(l=Math.pow(o,2)+Math.pow(s,2))<=9||(a=3/Math.sqrt(l),i.mK=o*a*i.deltaK,r.mK=s*a*i.deltaK)));for(e=0;e<d;++e)(i=c[e]).model.skip||(n=0<e?c[e-1]:null,r=e<d-1?c[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),r&&!r.model.skip&&(u=(r.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.mK))},q.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},q.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},q.niceNum=function(t,e){var n=Math.floor(q.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},q.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},q.getRelativePosition=function(t,e){var n,i,r=t.originalEvent||t,o=t.target||t.srcElement,s=o.getBoundingClientRect(),a=r.touches;i=a&&0<a.length?(n=a[0].clientX,a[0].clientY):(n=r.clientX,r.clientY);var l=parseFloat(q.getStyle(o,"padding-left")),u=parseFloat(q.getStyle(o,"padding-top")),c=parseFloat(q.getStyle(o,"padding-right")),d=parseFloat(q.getStyle(o,"padding-bottom")),h=s.right-s.left-l-c,p=s.bottom-s.top-u-d;return{x:n=Math.round((n-s.left-l)/h*o.width/e.currentDevicePixelRatio),y:i=Math.round((i-s.top-u)/p*o.height/e.currentDevicePixelRatio)}},q.getConstraintWidth=function(t){return Vi(t,"max-width","clientWidth")},q.getConstraintHeight=function(t){return Vi(t,"max-height","clientHeight")},q._calculatePadding=function(t,e,n){return-1<(e=q.getStyle(t,e)).indexOf("%")?n*parseInt(e,10)/100:parseInt(e,10)},q._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},q.getMaximumWidth=function(t){var e=q._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-q._calculatePadding(e,"padding-left",n)-q._calculatePadding(e,"padding-right",n),r=q.getConstraintWidth(t);return isNaN(r)?i:Math.min(i,r)},q.getMaximumHeight=function(t){var e=q._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-q._calculatePadding(e,"padding-top",n)-q._calculatePadding(e,"padding-bottom",n),r=q.getConstraintHeight(t);return isNaN(r)?i:Math.min(i,r)},q.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},q.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,r=t.height,o=t.width;i.height=r*n,i.width=o*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=r+"px",i.style.width=o+"px")}},q.fontString=function(t,e,n){return e+" "+t+"px "+n},q.longestText=function(t,e,n,i){var r=(i=i||{}).data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},o=i.garbageCollect=[],i.font=e),t.font=e;var s,a,l,u,c,d=0,h=n.length;for(s=0;s<h;s++)if(null!=(u=n[s])&&!0!==q.isArray(u))d=q.measureText(t,r,o,d,u);else if(q.isArray(u))for(a=0,l=u.length;a<l;a++)null==(c=u[a])||q.isArray(c)||(d=q.measureText(t,r,o,d,c));var p=o.length/2;if(p>n.length){for(s=0;s<p;s++)delete r[o[s]];o.splice(0,p)}return d},q.measureText=function(t,e,n,i,r){var o=e[r];return o||(o=e[r]=t.measureText(r).width,n.push(r)),i<o&&(i=o),i},q.numberOfLabelLines=function(t){var e=1;return q.each(t,function(t){q.isArray(t)&&t.length>e&&(e=t.length)}),e},q.color=C?function(t){return t instanceof CanvasGradient&&(t=N.global.defaultColor),C(t)}:function(t){return console.error("Color.js not found!"),t},q.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:q.color(t).saturate(.5).darken(.1).rgbString()},on._adapters=ln,on.Animation=tt,on.animationService=et,on.controllers=Qt,on.DatasetController=st,on.defaults=N,on.Element=Z,on.elements=St,on.Interaction=se,on.layouts=ye,on.platform=Ie,on.plugins=$e,on.Scale=Cn,on.scaleService=Be,on.Ticks=un,on.Tooltip=Xe,on.helpers.each(gi,function(t,e){on.scaleService.registerScaleType(e,t,t._defaults)}),Ai)Ai.hasOwnProperty(Wi)&&on.plugins.register(Ai[Wi]);on.platform.initialize();var Hi=on;return"undefined"!=typeof window&&(window.Chart=on),(on.Chart=on).Legend=Ai.legend._element,on.Title=Ai.title._element,on.pluginService=on.plugins,on.PluginBase=on.Element.extend({}),on.canvasHelpers=on.helpers.canvas,on.layoutService=on.layouts,on.LinearScaleBase=Mn,on.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(n){on[n]=function(t,e){return new on(t,on.helpers.merge(e||{},{type:n.charAt(0).toLowerCase()+n.slice(1)}))}}),Hi},"object"==typeof n&&void 0!==e?e.exports=r(function(){try{return t("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],function(t){return r(function(){try{return t("moment")}catch(t){}}())}):(i=i||self).Chart=r(i.moment)},{moment:97}],95:[function(t,e,n){
/*
 * Date Format 1.2.3
 * (c) 2007-2009 Steven Levithan <stevenlevithan.com>
 * MIT license
 *
 * Includes enhancements by Scott Trenda <scott.trenda.net>
 * and Kris Kowal <cixar.com/~kris.kowal/>
 *
 * Accepts a date, a mask, or a date and a mask.
 * Returns a formatted version of the given date.
 * The date defaults to the current date/time.
 * The mask defaults to dateFormat.masks.default.
 */
!function(t){"use strict";var v,b,_,w=(v=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,b=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,_=/[^-+\dA-Z]/g,function(t,e,n,i){if(1!==arguments.length||"string"!==function(t){return null===t?"null":void 0===t?"undefined":"object"!=typeof t?typeof t:Array.isArray(t)?"array":{}.toString.call(t).slice(8,-1).toLowerCase()}(t)||/\d/.test(t)||(e=t,t=void 0),(t=t||new Date)instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");var r=(e=String(w.masks[e]||e||w.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(e=e.slice(4),n=!0,"GMT:"===r&&(i=!0));var o=n?"getUTC":"get",s=t[o+"Date"](),a=t[o+"Day"](),l=t[o+"Month"](),u=t[o+"FullYear"](),c=t[o+"Hours"](),d=t[o+"Minutes"](),h=t[o+"Seconds"](),p=t[o+"Milliseconds"](),f=n?0:t.getTimezoneOffset(),g=function(t){var e=new Date(t.getFullYear(),t.getMonth(),t.getDate());e.setDate(e.getDate()-(e.getDay()+6)%7+3);var n=new Date(e.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var i=e.getTimezoneOffset()-n.getTimezoneOffset();e.setHours(e.getHours()-i);var r=(e-n)/6048e5;return 1+Math.floor(r)}(t),m=function(t){var e=t.getDay();return 0===e&&(e=7),e}(t),y={d:s,dd:x(s),ddd:w.i18n.dayNames[a],dddd:w.i18n.dayNames[a+7],m:l+1,mm:x(l+1),mmm:w.i18n.monthNames[l],mmmm:w.i18n.monthNames[l+12],yy:String(u).slice(2),yyyy:u,h:c%12||12,hh:x(c%12||12),H:c,HH:x(c),M:d,MM:x(d),s:h,ss:x(h),l:x(p,3),L:x(Math.round(p/10)),t:c<12?w.i18n.timeNames[0]:w.i18n.timeNames[1],tt:c<12?w.i18n.timeNames[2]:w.i18n.timeNames[3],T:c<12?w.i18n.timeNames[4]:w.i18n.timeNames[5],TT:c<12?w.i18n.timeNames[6]:w.i18n.timeNames[7],Z:i?"GMT":n?"UTC":(String(t).match(b)||[""]).pop().replace(_,""),o:(0<f?"-":"+")+x(100*Math.floor(Math.abs(f)/60)+Math.abs(f)%60,4),S:["th","st","nd","rd"][3<s%10?0:(s%100-s%10!=10)*s%10],W:g,N:m};return e.replace(v,function(t){return t in y?y[t]:t.slice(1,t.length-1)})});function x(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t}w.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},w.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},"function"==typeof define&&define.amd?define(function(){return w}):"object"==typeof n?e.exports=w:t.dateFormat=w}(this)},{}],96:[function(t,e,n){
/*!
 * jQuery JavaScript Library v2.2.4
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2016-05-20T17:23Z
 */var i,r;i="undefined"!=typeof window?window:this,r=function(k,t){function e(t,e){return e.toUpperCase()}var n=[],C=k.document,c=n.slice,g=n.concat,a=n.push,r=n.indexOf,i={},o=i.toString,f=i.hasOwnProperty,m={},S=function(t,e){return new S.fn.init(t,e)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,l=/^-ms-/,u=/-([\da-z])/gi;function d(t){var e=!!t&&"length"in t&&t.length,n=S.type(t);return"function"!==n&&!S.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&0<e&&e-1 in t)}S.fn=S.prototype={jquery:"2.2.4",constructor:S,selector:"",length:0,toArray:function(){return c.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:c.call(this)},pushStack:function(t){var e=S.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return S.each(this,t)},map:function(n){return this.pushStack(S.map(this,function(t,e){return n.call(t,e,t)}))},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(0<=n&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},S.extend=S.fn.extend=function(){var t,e,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||S.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=s[e],s!==(i=t[e])&&(u&&i&&(S.isPlainObject(i)||(r=S.isArray(i)))?(o=r?(r=!1,n&&S.isArray(n)?n:[]):n&&S.isPlainObject(n)?n:{},s[e]=S.extend(u,o,i)):void 0!==i&&(s[e]=i));return s},S.extend({expando:"jQuery"+("2.2.4"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===S.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!S.isArray(t)&&0<=e-parseFloat(e)+1},isPlainObject:function(t){var e;if("object"!==S.type(t)||t.nodeType||S.isWindow(t))return!1;if(t.constructor&&!f.call(t,"constructor")&&!f.call(t.constructor.prototype||{},"isPrototypeOf"))return!1;for(e in t);return void 0===e||f.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?i[o.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;(t=S.trim(t))&&(1===t.indexOf("use strict")?((e=C.createElement("script")).text=t,C.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(l,"ms-").replace(u,e)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var n,i=0;if(d(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:function(t){return null==t?"":(t+"").replace(s,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(d(Object(t))?S.merge(n,"string"==typeof t?[t]:t):a.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:r.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;i<n;i++)t[r++]=e[i];return t.length=r,t},grep:function(t,e,n){for(var i=[],r=0,o=t.length,s=!n;r<o;r++)!e(t[r],r)!=s&&i.push(t[r]);return i},map:function(t,e,n){var i,r,o=0,s=[];if(d(t))for(i=t.length;o<i;o++)null!=(r=e(t[o],o,n))&&s.push(r);else for(o in t)null!=(r=e(t[o],o,n))&&s.push(r);return g.apply([],s)},guid:1,proxy:function(t,e){var n,i,r;if("string"==typeof e&&(n=t[e],e=t,t=n),S.isFunction(t))return i=c.call(arguments,2),(r=function(){return t.apply(e||this,i.concat(c.call(arguments)))}).guid=t.guid=t.guid||S.guid++,r},now:Date.now,support:m}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=n[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){i["[object "+e+"]"]=e.toLowerCase()});var h=
/*!
 * Sizzle CSS Selector Engine v2.2.1
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2015-10-17
 */
function(n){function d(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(65536+i):String.fromCharCode(i>>10|55296,1023&i|56320)}function r(){x()}var t,f,_,o,s,g,h,m,w,l,u,x,k,a,C,y,c,p,v,S="sizzle"+1*new Date,b=n.document,P=0,i=0,E=rt(),T=rt(),O=rt(),M=function(t,e){return t===e&&(u=!0),0},j={}.hasOwnProperty,e=[],D=e.pop,F=e.push,L=e.push,A=e.slice,I=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},$="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",B="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+B+"*("+R+")(?:"+B+"*([*^$|!~]?=)"+B+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+B+"*\\]",V=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",W=new RegExp(B+"+","g"),H=new RegExp("^"+B+"+|((?:^|[^\\\\])(?:\\\\.)*)"+B+"+$","g"),U=new RegExp("^"+B+"*,"+B+"*"),q=new RegExp("^"+B+"*([>+~]|"+B+")"+B+"*"),z=new RegExp("="+B+"*([^\\]'\"]*?)"+B+"*\\]","g"),Y=new RegExp(V),G=new RegExp("^"+R+"$"),K={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+V),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+$+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=/'|\\/g,nt=new RegExp("\\\\([\\da-f]{1,6}"+B+"?|("+B+")|.)","ig");try{L.apply(e=A.call(b.childNodes),b.childNodes),e[b.childNodes.length].nodeType}catch(t){L={apply:e.length?function(t,e){F.apply(t,A.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function it(t,e,n,i){var r,o,s,a,l,u,c,d,h=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!i&&((e?e.ownerDocument||e:b)!==k&&x(e),e=e||k,C)){if(11!==p&&(u=Q.exec(t)))if(r=u[1]){if(9===p){if(!(s=e.getElementById(r)))return n;if(s.id===r)return n.push(s),n}else if(h&&(s=h.getElementById(r))&&v(e,s)&&s.id===r)return n.push(s),n}else{if(u[2])return L.apply(n,e.getElementsByTagName(t)),n;if((r=u[3])&&f.getElementsByClassName&&e.getElementsByClassName)return L.apply(n,e.getElementsByClassName(r)),n}if(f.qsa&&!O[t+" "]&&(!y||!y.test(t))){if(1!==p)h=e,d=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(et,"\\$&"):e.setAttribute("id",a=S),o=(c=g(t)).length,l=G.test(a)?"#"+a:"[id='"+a+"']";o--;)c[o]=l+" "+ft(c[o]);d=c.join(","),h=tt.test(t)&&ht(e.parentNode)||e}if(d)try{return L.apply(n,h.querySelectorAll(d)),n}catch(t){}finally{a===S&&e.removeAttribute("id")}}}return m(t.replace(H,"$1"),e,n,i)}function rt(){var i=[];return function t(e,n){return i.push(e+" ")>_.cacheLength&&delete t[i.shift()],t[e+" "]=n}}function ot(t){return t[S]=!0,t}function st(t){var e=k.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function at(t,e){for(var n=t.split("|"),i=n.length;i--;)_.attrHandle[n[i]]=e}function lt(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||1<<31)-(~t.sourceIndex||1<<31);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ut(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ct(n){return function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&t.type===n}}function dt(s){return ot(function(o){return o=+o,ot(function(t,e){for(var n,i=s([],t.length,o),r=i.length;r--;)t[n=i[r]]&&(t[n]=!(e[n]=t[n]))})})}function ht(t){return t&&void 0!==t.getElementsByTagName&&t}for(t in f=it.support={},s=it.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},x=it.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:b;return i!==k&&9===i.nodeType&&i.documentElement&&(a=(k=i).documentElement,C=!s(k),(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",r,!1):n.attachEvent&&n.attachEvent("onunload",r)),f.attributes=st(function(t){return t.className="i",!t.getAttribute("className")}),f.getElementsByTagName=st(function(t){return t.appendChild(k.createComment("")),!t.getElementsByTagName("*").length}),f.getElementsByClassName=Z.test(k.getElementsByClassName),f.getById=st(function(t){return a.appendChild(t).id=S,!k.getElementsByName||!k.getElementsByName(S).length}),f.getById?(_.find.ID=function(t,e){if(void 0!==e.getElementById&&C){var n=e.getElementById(t);return n?[n]:[]}},_.filter.ID=function(t){var e=t.replace(nt,d);return function(t){return t.getAttribute("id")===e}}):(delete _.find.ID,_.filter.ID=function(t){var n=t.replace(nt,d);return function(t){var e=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===n}}),_.find.TAG=f.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):f.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"!==t)return o;for(;n=o[r++];)1===n.nodeType&&i.push(n);return i},_.find.CLASS=f.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&C)return e.getElementsByClassName(t)},c=[],y=[],(f.qsa=Z.test(k.querySelectorAll))&&(st(function(t){a.appendChild(t).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+B+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||y.push("\\["+B+"*(?:value|"+$+")"),t.querySelectorAll("[id~="+S+"-]").length||y.push("~="),t.querySelectorAll(":checked").length||y.push(":checked"),t.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]")}),st(function(t){var e=k.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&y.push("name"+B+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||y.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),y.push(",.*:")})),(f.matchesSelector=Z.test(p=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&st(function(t){f.disconnectedMatch=p.call(t,"div"),p.call(t,"[s!='']:x"),c.push("!=",V)}),y=y.length&&new RegExp(y.join("|")),c=c.length&&new RegExp(c.join("|")),e=Z.test(a.compareDocumentPosition),v=e||Z.test(a.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},M=e?function(t,e){if(t===e)return u=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!f.sortDetached&&e.compareDocumentPosition(t)===n?t===k||t.ownerDocument===b&&v(b,t)?-1:e===k||e.ownerDocument===b&&v(b,e)?1:l?I(l,t)-I(l,e):0:4&n?-1:1)}:function(t,e){if(t===e)return u=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!r||!o)return t===k?-1:e===k?1:r?-1:o?1:l?I(l,t)-I(l,e):0;if(r===o)return lt(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?lt(s[i],a[i]):s[i]===b?-1:a[i]===b?1:0}),k},it.matches=function(t,e){return it(t,null,null,e)},it.matchesSelector=function(t,e){if((t.ownerDocument||t)!==k&&x(t),e=e.replace(z,"='$1']"),f.matchesSelector&&C&&!O[e+" "]&&(!c||!c.test(e))&&(!y||!y.test(e)))try{var n=p.call(t,e);if(n||f.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return 0<it(e,k,null,[t]).length},it.contains=function(t,e){return(t.ownerDocument||t)!==k&&x(t),v(t,e)},it.attr=function(t,e){(t.ownerDocument||t)!==k&&x(t);var n=_.attrHandle[e.toLowerCase()],i=n&&j.call(_.attrHandle,e.toLowerCase())?n(t,e,!C):void 0;return void 0!==i?i:f.attributes||!C?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},it.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},it.uniqueSort=function(t){var e,n=[],i=0,r=0;if(u=!f.detectDuplicates,l=!f.sortStable&&t.slice(0),t.sort(M),u){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return l=null,t},o=it.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=o(e);return n},(_=it.selectors={cacheLength:50,createPseudo:ot,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(nt,d),t[3]=(t[3]||t[4]||t[5]||"").replace(nt,d),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||it.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&it.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return K.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&Y.test(n)&&(e=g(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(nt,d).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=E[t+" "];return e||(e=new RegExp("(^|"+B+")"+t+"("+B+"|$)"))&&E(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(n,i,r){return function(t){var e=it.attr(t,n);return null==e?"!="===i:!i||(e+="","="===i?e===r:"!="===i?e!==r:"^="===i?r&&0===e.indexOf(r):"*="===i?r&&-1<e.indexOf(r):"$="===i?r&&e.slice(-r.length)===r:"~="===i?-1<(" "+e.replace(W," ")+" ").indexOf(r):"|="===i&&(e===r||e.slice(0,r.length+1)===r+"-"))}},CHILD:function(f,t,e,g,m){var y="nth"!==f.slice(0,3),v="last"!==f.slice(-4),b="of-type"===t;return 1===g&&0===m?function(t){return!!t.parentNode}:function(t,e,n){var i,r,o,s,a,l,u=y!=v?"nextSibling":"previousSibling",c=t.parentNode,d=b&&t.nodeName.toLowerCase(),h=!n&&!b,p=!1;if(c){if(y){for(;u;){for(s=t;s=s[u];)if(b?s.nodeName.toLowerCase()===d:1===s.nodeType)return!1;l=u="only"===f&&!l&&"nextSibling"}return!0}if(l=[v?c.firstChild:c.lastChild],v&&h){for(p=(a=(i=(r=(o=(s=c)[S]||(s[S]={}))[s.uniqueID]||(o[s.uniqueID]={}))[f]||[])[0]===P&&i[1])&&i[2],s=a&&c.childNodes[a];s=++a&&s&&s[u]||(p=a=0)||l.pop();)if(1===s.nodeType&&++p&&s===t){r[f]=[P,a,p];break}}else if(h&&(p=a=(i=(r=(o=(s=t)[S]||(s[S]={}))[s.uniqueID]||(o[s.uniqueID]={}))[f]||[])[0]===P&&i[1]),!1===p)for(;(s=++a&&s&&s[u]||(p=a=0)||l.pop())&&((b?s.nodeName.toLowerCase()!==d:1!==s.nodeType)||!++p||(h&&((r=(o=s[S]||(s[S]={}))[s.uniqueID]||(o[s.uniqueID]={}))[f]=[P,p]),s!==t)););return(p-=m)===g||p%g==0&&0<=p/g}}},PSEUDO:function(t,o){var e,s=_.pseudos[t]||_.setFilters[t.toLowerCase()]||it.error("unsupported pseudo: "+t);return s[S]?s(o):1<s.length?(e=[t,t,"",o],_.setFilters.hasOwnProperty(t.toLowerCase())?ot(function(t,e){for(var n,i=s(t,o),r=i.length;r--;)t[n=I(t,i[r])]=!(e[n]=i[r])}):function(t){return s(t,0,e)}):s}},pseudos:{not:ot(function(t){var i=[],r=[],a=h(t.replace(H,"$1"));return a[S]?ot(function(t,e,n,i){for(var r,o=a(t,null,i,[]),s=t.length;s--;)(r=o[s])&&(t[s]=!(e[s]=r))}):function(t,e,n){return i[0]=t,a(i,null,n,r),i[0]=null,!r.pop()}}),has:ot(function(e){return function(t){return 0<it(e,t).length}}),contains:ot(function(e){return e=e.replace(nt,d),function(t){return-1<(t.textContent||t.innerText||o(t)).indexOf(e)}}),lang:ot(function(n){return G.test(n||"")||it.error("unsupported lang: "+n),n=n.replace(nt,d).toLowerCase(),function(t){var e;do{if(e=C?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(e=e.toLowerCase())===n||0===e.indexOf(n+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var e=n.location&&n.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===a},focus:function(t){return t===k.activeElement&&(!k.hasFocus||k.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!_.pseudos.empty(t)},header:function(t){return J.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:dt(function(){return[0]}),last:dt(function(t,e){return[e-1]}),eq:dt(function(t,e,n){return[n<0?n+e:n]}),even:dt(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:dt(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:dt(function(t,e,n){for(var i=n<0?n+e:n;0<=--i;)t.push(i);return t}),gt:dt(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}}).pseudos.nth=_.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[t]=ut(t);for(t in{submit:!0,reset:!0})_.pseudos[t]=ct(t);function pt(){}function ft(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function gt(a,t,e){var l=t.dir,u=e&&"parentNode"===l,c=i++;return t.first?function(t,e,n){for(;t=t[l];)if(1===t.nodeType||u)return a(t,e,n)}:function(t,e,n){var i,r,o,s=[P,c];if(n){for(;t=t[l];)if((1===t.nodeType||u)&&a(t,e,n))return!0}else for(;t=t[l];)if(1===t.nodeType||u){if((i=(r=(o=t[S]||(t[S]={}))[t.uniqueID]||(o[t.uniqueID]={}))[l])&&i[0]===P&&i[1]===c)return s[2]=i[2];if((r[l]=s)[2]=a(t,e,n))return!0}}}function mt(r){return 1<r.length?function(t,e,n){for(var i=r.length;i--;)if(!r[i](t,e,n))return!1;return!0}:r[0]}function yt(t,e,n,i,r){for(var o,s=[],a=0,l=t.length,u=null!=e;a<l;a++)(o=t[a])&&(n&&!n(o,i,r)||(s.push(o),u&&e.push(a)));return s}function vt(p,f,g,m,y,t){return m&&!m[S]&&(m=vt(m)),y&&!y[S]&&(y=vt(y,t)),ot(function(t,e,n,i){var r,o,s,a=[],l=[],u=e.length,c=t||function(t,e,n){for(var i=0,r=e.length;i<r;i++)it(t,e[i],n);return n}(f||"*",n.nodeType?[n]:n,[]),d=!p||!t&&f?c:yt(c,a,p,n,i),h=g?y||(t?p:u||m)?[]:e:d;if(g&&g(d,h,n,i),m)for(r=yt(h,l),m(r,[],n,i),o=r.length;o--;)(s=r[o])&&(h[l[o]]=!(d[l[o]]=s));if(t){if(y||p){if(y){for(r=[],o=h.length;o--;)(s=h[o])&&r.push(d[o]=s);y(null,h=[],r,i)}for(o=h.length;o--;)(s=h[o])&&-1<(r=y?I(t,s):a[o])&&(t[r]=!(e[r]=s))}}else h=yt(h===e?h.splice(u,h.length):h),y?y(null,e,h,i):L.apply(e,h)})}function bt(t){for(var r,e,n,i=t.length,o=_.relative[t[0].type],s=o||_.relative[" "],a=o?1:0,l=gt(function(t){return t===r},s,!0),u=gt(function(t){return-1<I(r,t)},s,!0),c=[function(t,e,n){var i=!o&&(n||e!==w)||((r=e).nodeType?l(t,e,n):u(t,e,n));return r=null,i}];a<i;a++)if(e=_.relative[t[a].type])c=[gt(mt(c),e)];else{if((e=_.filter[t[a].type].apply(null,t[a].matches))[S]){for(n=++a;n<i&&!_.relative[t[n].type];n++);return vt(1<a&&mt(c),1<a&&ft(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(H,"$1"),e,a<n&&bt(t.slice(a,n)),n<i&&bt(t=t.slice(n)),n<i&&ft(t))}c.push(e)}return mt(c)}function _t(m,y){function t(t,e,n,i,r){var o,s,a,l=0,u="0",c=t&&[],d=[],h=w,p=t||b&&_.find.TAG("*",r),f=P+=null==h?1:Math.random()||.1,g=p.length;for(r&&(w=e===k||e||r);u!==g&&null!=(o=p[u]);u++){if(b&&o){for(s=0,e||o.ownerDocument===k||(x(o),n=!C);a=m[s++];)if(a(o,e||k,n)){i.push(o);break}r&&(P=f)}v&&((o=!a&&o)&&l--,t&&c.push(o))}if(l+=u,v&&u!==l){for(s=0;a=y[s++];)a(c,d,e,n);if(t){if(0<l)for(;u--;)c[u]||d[u]||(d[u]=D.call(i));d=yt(d)}L.apply(i,d),r&&!t&&0<d.length&&1<l+y.length&&it.uniqueSort(i)}return r&&(P=f,w=h),c}var v=0<y.length,b=0<m.length;return v?ot(t):t}return pt.prototype=_.filters=_.pseudos,_.setFilters=new pt,g=it.tokenize=function(t,e){var n,i,r,o,s,a,l,u=T[t+" "];if(u)return e?0:u.slice(0);for(s=t,a=[],l=_.preFilter;s;){for(o in n&&!(i=U.exec(s))||(i&&(s=s.slice(i[0].length)||s),a.push(r=[])),n=!1,(i=q.exec(s))&&(n=i.shift(),r.push({value:n,type:i[0].replace(H," ")}),s=s.slice(n.length)),_.filter)!(i=K[o].exec(s))||l[o]&&!(i=l[o](i))||(n=i.shift(),r.push({value:n,type:o,matches:i}),s=s.slice(n.length));if(!n)break}return e?s.length:s?it.error(t):T(t,a).slice(0)},h=it.compile=function(t,e){var n,i=[],r=[],o=O[t+" "];if(!o){for(n=(e=e||g(t)).length;n--;)(o=bt(e[n]))[S]?i.push(o):r.push(o);(o=O(t,_t(r,i))).selector=t}return o},m=it.select=function(t,e,n,i){var r,o,s,a,l,u="function"==typeof t&&t,c=!i&&g(t=u.selector||t);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(s=o[0]).type&&f.getById&&9===e.nodeType&&C&&_.relative[o[1].type]){if(!(e=(_.find.ID(s.matches[0].replace(nt,d),e)||[])[0]))return n;u&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=K.needsContext.test(t)?0:o.length;r--&&(s=o[r],!_.relative[a=s.type]);)if((l=_.find[a])&&(i=l(s.matches[0].replace(nt,d),tt.test(o[0].type)&&ht(e.parentNode)||e))){if(o.splice(r,1),!(t=i.length&&ft(o)))return L.apply(n,i),n;break}}return(u||h(t,c))(i,e,!C,n,!e||tt.test(t)&&ht(e.parentNode)||e),n},f.sortStable=S.split("").sort(M).join("")===S,f.detectDuplicates=!!u,x(),f.sortDetached=st(function(t){return 1&t.compareDocumentPosition(k.createElement("div"))}),st(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||at("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),f.attributes&&st(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||at("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),st(function(t){return null==t.getAttribute("disabled")})||at($,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),it}(k);S.find=h,S.expr=h.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=h.uniqueSort,S.text=h.getText,S.isXMLDoc=h.isXML,S.contains=h.contains;function p(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&S(t).is(n))break;i.push(t)}return i}function y(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}var v=S.expr.match.needsContext,b=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,_=/^.[^:#\[\.,]*$/;function w(t,n,i){if(S.isFunction(n))return S.grep(t,function(t,e){return!!n.call(t,e,t)!==i});if(n.nodeType)return S.grep(t,function(t){return t===n!==i});if("string"==typeof n){if(_.test(n))return S.filter(n,t,i);n=S.filter(n,t)}return S.grep(t,function(t){return-1<r.call(n,t)!==i})}S.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?S.find.matchesSelector(i,t)?[i]:[]:S.find.matches(t,S.grep(e,function(t){return 1===t.nodeType}))},S.fn.extend({find:function(t){var e,n=this.length,i=[],r=this;if("string"!=typeof t)return this.pushStack(S(t).filter(function(){for(e=0;e<n;e++)if(S.contains(r[e],this))return!0}));for(e=0;e<n;e++)S.find(t,r[e],i);return(i=this.pushStack(1<n?S.unique(i):i)).selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(w(this,t||[],!1))},not:function(t){return this.pushStack(w(this,t||[],!0))},is:function(t){return!!w(this,"string"==typeof t&&v.test(t)?S(t):t||[],!1).length}});var x,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(S.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||x,"string"!=typeof t)return t.nodeType?(this.context=this[0]=t,this.length=1,this):S.isFunction(t)?void 0!==n.ready?n.ready(t):t(S):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),S.makeArray(t,this));if(!(i="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:P.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof S?e[0]:e,S.merge(this,S.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:C,!0)),b.test(i[1])&&S.isPlainObject(e))for(i in e)S.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=C.getElementById(i[2]))&&r.parentNode&&(this.length=1,this[0]=r),this.context=C,this.selector=t,this}).prototype=S.fn,x=S(C);var E=/^(?:parents|prev(?:Until|All))/,T={children:!0,contents:!0,next:!0,prev:!0};function O(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}S.fn.extend({has:function(t){var e=S(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(S.contains(this,e[t]))return!0})},closest:function(t,e){for(var n,i=0,r=this.length,o=[],s=v.test(t)||"string"!=typeof t?S(t,e||this.context):0;i<r;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&S.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?r.call(S(t),this[0]):r.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),S.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return p(t,"parentNode")},parentsUntil:function(t,e,n){return p(t,"parentNode",n)},next:function(t){return O(t,"nextSibling")},prev:function(t){return O(t,"previousSibling")},nextAll:function(t){return p(t,"nextSibling")},prevAll:function(t){return p(t,"previousSibling")},nextUntil:function(t,e,n){return p(t,"nextSibling",n)},prevUntil:function(t,e,n){return p(t,"previousSibling",n)},siblings:function(t){return y((t.parentNode||{}).firstChild,t)},children:function(t){return y(t.firstChild)},contents:function(t){return t.contentDocument||S.merge([],t.childNodes)}},function(i,r){S.fn[i]=function(t,e){var n=S.map(this,r,t);return"Until"!==i.slice(-5)&&(e=t),e&&"string"==typeof e&&(n=S.filter(e,n)),1<this.length&&(T[i]||S.uniqueSort(n),E.test(i)&&n.reverse()),this.pushStack(n)}});var M,j=/\S+/g;function D(){C.removeEventListener("DOMContentLoaded",D),k.removeEventListener("load",D),S.ready()}S.Callbacks=function(i){i="string"==typeof i?function(t){var n={};return S.each(t.match(j)||[],function(t,e){n[e]=!0}),n}(i):S.extend({},i);function n(){for(o=i.once,e=r=!0;a.length;l=-1)for(t=a.shift();++l<s.length;)!1===s[l].apply(t[0],t[1])&&i.stopOnFalse&&(l=s.length,t=!1);i.memory||(t=!1),r=!1,o&&(s=t?[]:"")}var r,t,e,o,s=[],a=[],l=-1,u={add:function(){return s&&(t&&!r&&(l=s.length-1,a.push(t)),function n(t){S.each(t,function(t,e){S.isFunction(e)?i.unique&&u.has(e)||s.push(e):e&&e.length&&"string"!==S.type(e)&&n(e)})}(arguments),t&&!r&&n()),this},remove:function(){return S.each(arguments,function(t,e){for(var n;-1<(n=S.inArray(e,s,n));)s.splice(n,1),n<=l&&l--}),this},has:function(t){return t?-1<S.inArray(t,s):0<s.length},empty:function(){return s=s&&[],this},disable:function(){return o=a=[],s=t="",this},disabled:function(){return!s},lock:function(){return o=a=[],t||(s=t=""),this},locked:function(){return!!o},fireWith:function(t,e){return o||(e=[t,(e=e||[]).slice?e.slice():e],a.push(e),r||n()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!e}};return u},S.extend({Deferred:function(t){var o=[["resolve","done",S.Callbacks("once memory"),"resolved"],["reject","fail",S.Callbacks("once memory"),"rejected"],["notify","progress",S.Callbacks("memory")]],r="pending",s={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},then:function(){var r=arguments;return S.Deferred(function(i){S.each(o,function(t,e){var n=S.isFunction(r[t])&&r[t];a[e[1]](function(){var t=n&&n.apply(this,arguments);t&&S.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[e[0]+"With"](this===s?i.promise():this,n?[t]:arguments)})}),r=null}).promise()},promise:function(t){return null!=t?S.extend(t,s):s}},a={};return s.pipe=s.then,S.each(o,function(t,e){var n=e[2],i=e[3];s[e[1]]=n.add,i&&n.add(function(){r=i},o[1^t][2].disable,o[2][2].lock),a[e[0]]=function(){return a[e[0]+"With"](this===a?s:this,arguments),this},a[e[0]+"With"]=n.fireWith}),s.promise(a),t&&t.call(a,a),a},when:function(t){function e(e,n,i){return function(t){n[e]=this,i[e]=1<arguments.length?c.call(arguments):t,i===r?u.notifyWith(n,i):--l||u.resolveWith(n,i)}}var r,n,i,o=0,s=c.call(arguments),a=s.length,l=1!==a||t&&S.isFunction(t.promise)?a:0,u=1===l?t:S.Deferred();if(1<a)for(r=new Array(a),n=new Array(a),i=new Array(a);o<a;o++)s[o]&&S.isFunction(s[o].promise)?s[o].promise().progress(e(o,n,r)).done(e(o,i,s)).fail(u.reject):--l;return l||u.resolveWith(i,s),u.promise()}}),S.fn.ready=function(t){return S.ready.promise().done(t),this},S.extend({isReady:!1,readyWait:1,holdReady:function(t){t?S.readyWait++:S.ready(!0)},ready:function(t){(!0===t?--S.readyWait:S.isReady)||(S.isReady=!0)!==t&&0<--S.readyWait||(M.resolveWith(C,[S]),S.fn.triggerHandler&&(S(C).triggerHandler("ready"),S(C).off("ready")))}}),S.ready.promise=function(t){return M||(M=S.Deferred(),"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?k.setTimeout(S.ready):(C.addEventListener("DOMContentLoaded",D),k.addEventListener("load",D))),M.promise(t)},S.ready.promise();function F(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}var L=function(t,e,n,i,r,o,s){var a=0,l=t.length,u=null==n;if("object"===S.type(n))for(a in r=!0,n)L(t,e,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,S.isFunction(i)||(s=!0),u&&(e=s?(e.call(t,i),null):(u=e,function(t,e,n){return u.call(S(t),n)})),e))for(;a<l;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return r?t:u?e.call(t):l?e(t[0],n):o};function A(){this.expando=S.expando+A.uid++}A.uid=1,A.prototype={register:function(t,e){var n=e||{};return t.nodeType?t[this.expando]=n:Object.defineProperty(t,this.expando,{value:n,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!F(t))return{};var e=t[this.expando];return e||(e={},F(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,r=this.cache(t);if("string"==typeof e)r[e]=n;else for(i in e)r[i]=e[i];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,n){var i;return void 0===e||e&&"string"==typeof e&&void 0===n?void 0!==(i=this.get(t,e))?i:this.get(t,S.camelCase(e)):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i,r,o=t[this.expando];if(void 0!==o){if(void 0===e)this.register(t);else{n=(i=S.isArray(e)?e.concat(e.map(S.camelCase)):(r=S.camelCase(e),e in o?[e,r]:(i=r)in o?[i]:i.match(j)||[])).length;for(;n--;)delete o[i[n]]}void 0!==e&&!S.isEmptyObject(o)||(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!S.isEmptyObject(e)}};var I=new A,$=new A,B=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,R=/[A-Z]/g;function N(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(R,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:B.test(n)?S.parseJSON(n):n)}catch(t){}$.set(t,e,n)}else n=void 0;return n}S.extend({hasData:function(t){return $.hasData(t)||I.hasData(t)},data:function(t,e,n){return $.access(t,e,n)},removeData:function(t,e){$.remove(t,e)},_data:function(t,e,n){return I.access(t,e,n)},_removeData:function(t,e){I.remove(t,e)}}),S.fn.extend({data:function(i,t){var e,n,r,o=this[0],s=o&&o.attributes;if(void 0!==i)return"object"==typeof i?this.each(function(){$.set(this,i)}):L(this,function(e){var t,n;if(o&&void 0===e)return void 0!==(t=$.get(o,i)||$.get(o,i.replace(R,"-$&").toLowerCase()))?t:(n=S.camelCase(i),void 0!==(t=$.get(o,n))?t:void 0!==(t=N(o,n,void 0))?t:void 0);n=S.camelCase(i),this.each(function(){var t=$.get(this,n);$.set(this,n,e),-1<i.indexOf("-")&&void 0!==t&&$.set(this,i,e)})},null,t,1<arguments.length,null,!0);if(this.length&&(r=$.get(o),1===o.nodeType&&!I.get(o,"hasDataAttrs"))){for(e=s.length;e--;)s[e]&&0===(n=s[e].name).indexOf("data-")&&(n=S.camelCase(n.slice(5)),N(o,n,r[n]));I.set(o,"hasDataAttrs",!0)}return r},removeData:function(t){return this.each(function(){$.remove(this,t)})}}),S.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=I.get(t,e),n&&(!i||S.isArray(n)?i=I.access(t,e,S.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=S.queue(t,e),i=n.length,r=n.shift(),o=S._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,function(){S.dequeue(t,e)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return I.get(t,n)||I.access(t,n,{empty:S.Callbacks("once memory").add(function(){I.remove(t,[e+"queue",n])})})}}),S.fn.extend({queue:function(e,n){var t=2;return"string"!=typeof e&&(n=e,e="fx",t--),arguments.length<t?S.queue(this[0],e):void 0===n?this:this.each(function(){var t=S.queue(this,e,n);S._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&S.dequeue(this,e)})},dequeue:function(t){return this.each(function(){S.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){function n(){--r||o.resolveWith(s,[s])}var i,r=1,o=S.Deferred(),s=this,a=this.length;for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(i=I.get(s[a],t+"queueHooks"))&&i.empty&&(r++,i.empty.add(n));return n(),o.promise(e)}});function V(t,e){return t=e||t,"none"===S.css(t,"display")||!S.contains(t.ownerDocument,t)}var W=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,H=new RegExp("^(?:([+-])=|)("+W+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"];function q(t,e,n,i){var r,o=1,s=20,a=i?function(){return i.cur()}:function(){return S.css(t,e,"")},l=a(),u=n&&n[3]||(S.cssNumber[e]?"":"px"),c=(S.cssNumber[e]||"px"!==u&&+l)&&H.exec(S.css(t,e));if(c&&c[3]!==u)for(u=u||c[3],n=n||[],c=+l||1;c/=o=o||".5",S.style(t,e,c+u),o!==(o=a()/l)&&1!==o&&--s;);return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}var z=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,G=/^$|\/(?:java|ecma)script/i,K={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function X(t,e){var n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&S.nodeName(t,e)?S.merge([t],n):n}function J(t,e){for(var n=0,i=t.length;n<i;n++)I.set(t[n],"globalEval",!e||I.get(e[n],"globalEval"))}K.optgroup=K.option,K.tbody=K.tfoot=K.colgroup=K.caption=K.thead,K.th=K.td;var Z,Q,tt=/<|&#?\w+;/;function et(t,e,n,i,r){for(var o,s,a,l,u,c,d=e.createDocumentFragment(),h=[],p=0,f=t.length;p<f;p++)if((o=t[p])||0===o)if("object"===S.type(o))S.merge(h,o.nodeType?[o]:o);else if(tt.test(o)){for(s=s||d.appendChild(e.createElement("div")),a=(Y.exec(o)||["",""])[1].toLowerCase(),l=K[a]||K._default,s.innerHTML=l[1]+S.htmlPrefilter(o)+l[2],c=l[0];c--;)s=s.lastChild;S.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",p=0;o=h[p++];)if(i&&-1<S.inArray(o,i))r&&r.push(o);else if(u=S.contains(o.ownerDocument,o),s=X(d.appendChild(o),"script"),u&&J(s),n)for(c=0;o=s[c++];)G.test(o.type||"")&&n.push(o);return d}Z=C.createDocumentFragment().appendChild(C.createElement("div")),(Q=C.createElement("input")).setAttribute("type","radio"),Q.setAttribute("checked","checked"),Q.setAttribute("name","t"),Z.appendChild(Q),m.checkClone=Z.cloneNode(!0).cloneNode(!0).lastChild.checked,Z.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!Z.cloneNode(!0).lastChild.defaultValue;var nt=/^key/,it=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rt=/^([^.]*)(?:\.(.+)|)/;function ot(){return!0}function st(){return!1}function at(){try{return C.activeElement}catch(t){}}function lt(t,e,n,i,r,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)lt(t,a,n,i,e[a],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=st;else if(!r)return t;return 1===o&&(s=r,(r=function(t){return S().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=S.guid++)),t.each(function(){S.event.add(this,e,r,i,n)})}S.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,u,c,d,h,p,f,g,m=I.get(e);if(m)for(n.handler&&(n=(o=n).handler,r=o.selector),n.guid||(n.guid=S.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(j)||[""]).length;u--;)p=g=(a=rt.exec(t[u])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=S.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,d=S.event.special[p]||{},c=S.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&S.expr.match.needsContext.test(r),namespace:f.join(".")},o),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(p,s)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),S.event.global[p]=!0)},remove:function(t,e,n,i,r){var o,s,a,l,u,c,d,h,p,f,g,m=I.hasData(t)&&I.get(t);if(m&&(l=m.events)){for(u=(e=(e||"").match(j)||[""]).length;u--;)if(p=g=(a=rt.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=S.event.special[p]||{},h=l[p=(i?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)c=h[o],!r&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,f,m.handle)||S.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)S.event.remove(t,p+e[u],n,i,!0);S.isEmptyObject(l)&&I.remove(t,"handle events")}},dispatch:function(t){t=S.event.fix(t);var e,n,i,r,o,s,a=c.call(arguments),l=(I.get(this,"events")||{})[t.type]||[],u=S.event.special[t.type]||{};if((a[0]=t).delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,t)){for(s=S.event.handlers.call(this,t,l),e=0;(r=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(o.namespace)||(t.handleObj=o,t.data=o.data,void 0!==(i=((S.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,r,o,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(i=[],n=0;n<a;n++)void 0===i[r=(o=e[n]).selector+" "]&&(i[r]=o.needsContext?-1<S(r,this).index(l):S.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&s.push({elem:l,handlers:i})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,r,o=e.button;return null==t.pageX&&null!=e.clientX&&(i=(n=t.target.ownerDocument||C).documentElement,r=n.body,t.pageX=e.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),t.pageY=e.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},fix:function(t){if(t[S.expando])return t;var e,n,i,r=t.type,o=t,s=this.fixHooks[r];for(s||(this.fixHooks[r]=s=it.test(r)?this.mouseHooks:nt.test(r)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,t=new S.Event(o),e=i.length;e--;)t[n=i[e]]=o[n];return t.target||(t.target=C),3===t.target.nodeType&&(t.target=t.target.parentNode),s.filter?s.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===at()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&S.nodeName(this,"input"))return this.click(),!1},_default:function(t){return S.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},S.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},S.Event=function(t,e){if(!(this instanceof S.Event))return new S.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?ot:st):this.type=t,e&&S.extend(this,e),this.timeStamp=t&&t.timeStamp||S.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:st,isPropagationStopped:st,isImmediatePropagationStopped:st,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=ot,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=ot,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=ot,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,r){S.event.special[t]={delegateType:r,bindType:r,handle:function(t){var e,n=t.relatedTarget,i=t.handleObj;return n&&(n===this||S.contains(this,n))||(t.type=i.origType,e=i.handler.apply(this,arguments),t.type=r),e}}}),S.fn.extend({on:function(t,e,n,i){return lt(this,t,e,n,i)},one:function(t,e,n,i){return lt(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,S(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"!=typeof t)return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=st),this.each(function(){S.event.remove(this,t,n,e)});for(r in t)this.off(r,e,t[r]);return this}});var ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ct=/<script|<style|<link/i,dt=/checked\s*(?:[^=]|=\s*.checked.)/i,ht=/^true\/(.*)/,pt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function ft(t,e){return S.nodeName(t,"table")&&S.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function gt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function mt(t){var e=ht.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function yt(t,e){var n,i,r,o,s,a,l,u;if(1===e.nodeType){if(I.hasData(t)&&(o=I.access(t),s=I.set(e,o),u=o.events))for(r in delete s.handle,s.events={},u)for(n=0,i=u[r].length;n<i;n++)S.event.add(e,r,u[r][n]);$.hasData(t)&&(a=$.access(t),l=S.extend({},a),$.set(e,l))}}function vt(n,i,r,o){i=g.apply([],i);var t,e,s,a,l,u,c=0,d=n.length,h=d-1,p=i[0],f=S.isFunction(p);if(f||1<d&&"string"==typeof p&&!m.checkClone&&dt.test(p))return n.each(function(t){var e=n.eq(t);f&&(i[0]=p.call(this,t,e.html())),vt(e,i,r,o)});if(d&&(e=(t=et(i,n[0].ownerDocument,!1,n,o)).firstChild,1===t.childNodes.length&&(t=e),e||o)){for(a=(s=S.map(X(t,"script"),gt)).length;c<d;c++)l=t,c!==h&&(l=S.clone(l,!0,!0),a&&S.merge(s,X(l,"script"))),r.call(n[c],l,c);if(a)for(u=s[s.length-1].ownerDocument,S.map(s,mt),c=0;c<a;c++)l=s[c],G.test(l.type||"")&&!I.access(l,"globalEval")&&S.contains(u,l)&&(l.src?S._evalUrl&&S._evalUrl(l.src):S.globalEval(l.textContent.replace(pt,"")))}return n}function bt(t,e,n){for(var i,r=e?S.filter(e,t):t,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||S.cleanData(X(i)),i.parentNode&&(n&&S.contains(i.ownerDocument,i)&&J(X(i,"script")),i.parentNode.removeChild(i));return t}S.extend({htmlPrefilter:function(t){return t.replace(ut,"<$1></$2>")},clone:function(t,e,n){var i,r,o,s,a,l,u,c=t.cloneNode(!0),d=S.contains(t.ownerDocument,t);if(!(m.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||S.isXMLDoc(t)))for(s=X(c),i=0,r=(o=X(t)).length;i<r;i++)a=o[i],l=s[i],void 0,"input"===(u=l.nodeName.toLowerCase())&&z.test(a.type)?l.checked=a.checked:"input"!==u&&"textarea"!==u||(l.defaultValue=a.defaultValue);if(e)if(n)for(o=o||X(t),s=s||X(c),i=0,r=o.length;i<r;i++)yt(o[i],s[i]);else yt(t,c);return 0<(s=X(c,"script")).length&&J(s,!d&&X(t,"script")),c},cleanData:function(t){for(var e,n,i,r=S.event.special,o=0;void 0!==(n=t[o]);o++)if(F(n)){if(e=n[I.expando]){if(e.events)for(i in e.events)r[i]?S.event.remove(n,i):S.removeEvent(n,i,e.handle);n[I.expando]=void 0}n[$.expando]&&(n[$.expando]=void 0)}}}),S.fn.extend({domManip:vt,detach:function(t){return bt(this,t,!0)},remove:function(t){return bt(this,t)},text:function(t){return L(this,function(t){return void 0===t?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return vt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ft(this,t).appendChild(t)})},prepend:function(){return vt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=ft(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return vt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return vt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(S.cleanData(X(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return S.clone(this,t,e)})},html:function(t){return L(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!ct.test(t)&&!K[(Y.exec(t)||["",""])[1].toLowerCase()]){t=S.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(S.cleanData(X(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var n=[];return vt(this,arguments,function(t){var e=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(X(this)),e&&e.replaceChild(t,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,s){S.fn[t]=function(t){for(var e,n=[],i=S(t),r=i.length-1,o=0;o<=r;o++)e=o===r?this:this.clone(!0),S(i[o])[s](e),a.apply(n,e.get());return this.pushStack(n)}});var _t,wt={HTML:"block",BODY:"block"};function xt(t,e){var n=S(e.createElement(t)).appendTo(e.body),i=S.css(n[0],"display");return n.detach(),i}function kt(t){var e=C,n=wt[t];return n||("none"!==(n=xt(t,e))&&n||((e=(_t=(_t||S("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement))[0].contentDocument).write(),e.close(),n=xt(t,e),_t.detach()),wt[t]=n),n}function Ct(t,e,n,i){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];for(o in r=n.apply(t,i||[]),e)t.style[o]=s[o];return r}var St,Pt,Et,Tt,Ot,Mt,jt=/^margin/,Dt=new RegExp("^("+W+")(?!px)[a-z%]+$","i"),Ft=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=k),e.getComputedStyle(t)},Lt=C.documentElement;function At(){Mt.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",Mt.innerHTML="",Lt.appendChild(Ot);var t=k.getComputedStyle(Mt);St="1%"!==t.top,Tt="2px"===t.marginLeft,Pt="4px"===t.width,Mt.style.marginRight="50%",Et="4px"===t.marginRight,Lt.removeChild(Ot)}function It(t,e,n){var i,r,o,s,a=t.style;return""!==(s=(n=n||Ft(t))?n.getPropertyValue(e)||n[e]:void 0)&&void 0!==s||S.contains(t.ownerDocument,t)||(s=S.style(t,e)),n&&!m.pixelMarginRight()&&Dt.test(s)&&jt.test(e)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o),void 0!==s?s+"":s}function $t(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}Ot=C.createElement("div"),(Mt=C.createElement("div")).style&&(Mt.style.backgroundClip="content-box",Mt.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===Mt.style.backgroundClip,Ot.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",Ot.appendChild(Mt),S.extend(m,{pixelPosition:function(){return At(),St},boxSizingReliable:function(){return null==Pt&&At(),Pt},pixelMarginRight:function(){return null==Pt&&At(),Et},reliableMarginLeft:function(){return null==Pt&&At(),Tt},reliableMarginRight:function(){var t,e=Mt.appendChild(C.createElement("div"));return e.style.cssText=Mt.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",Mt.style.width="1px",Lt.appendChild(Ot),t=!parseFloat(k.getComputedStyle(e).marginRight),Lt.removeChild(Ot),Mt.removeChild(e),t}}));var Bt=/^(none|table(?!-c[ea]).+)/,Rt={position:"absolute",visibility:"hidden",display:"block"},Nt={letterSpacing:"0",fontWeight:"400"},Vt=["Webkit","O","Moz","ms"],Wt=C.createElement("div").style;function Ht(t){if(t in Wt)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=Vt.length;n--;)if((t=Vt[n]+e)in Wt)return t}function Ut(t,e,n){var i=H.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function qt(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,s=0;o<4;o+=2)"margin"===n&&(s+=S.css(t,n+U[o],!0,r)),i?("content"===n&&(s-=S.css(t,"padding"+U[o],!0,r)),"margin"!==n&&(s-=S.css(t,"border"+U[o]+"Width",!0,r))):(s+=S.css(t,"padding"+U[o],!0,r),"padding"!==n&&(s+=S.css(t,"border"+U[o]+"Width",!0,r)));return s}function zt(t,e,n){var i=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=Ft(t),s="border-box"===S.css(t,"boxSizing",!1,o);if(r<=0||null==r){if(((r=It(t,e,o))<0||null==r)&&(r=t.style[e]),Dt.test(r))return r;i=s&&(m.boxSizingReliable()||r===t.style[e]),r=parseFloat(r)||0}return r+qt(t,e,n||(s?"border":"content"),i,o)+"px"}function Yt(t,e){for(var n,i,r,o=[],s=0,a=t.length;s<a;s++)(i=t[s]).style&&(o[s]=I.get(i,"olddisplay"),n=i.style.display,e?(o[s]||"none"!==n||(i.style.display=""),""===i.style.display&&V(i)&&(o[s]=I.access(i,"olddisplay",kt(i.nodeName)))):(r=V(i),"none"===n&&r||I.set(i,"olddisplay",r?n:S.css(i,"display"))));for(s=0;s<a;s++)(i=t[s]).style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?o[s]||"":"none"));return t}function Gt(t,e,n,i,r){return new Gt.prototype.init(t,e,n,i,r)}S.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=It(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=S.camelCase(e),l=t.style;if(e=S.cssProps[a]||(S.cssProps[a]=Ht(a)||a),s=S.cssHooks[e]||S.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(t,!1,i))?r:l[e];"string"===(o=typeof n)&&(r=H.exec(n))&&r[1]&&(n=q(t,e,r),o="number"),null!=n&&n==n&&("number"===o&&(n+=r&&r[3]||(S.cssNumber[a]?"":"px")),m.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(l[e]=n))}},css:function(t,e,n,i){var r,o,s,a=S.camelCase(e);return e=S.cssProps[a]||(S.cssProps[a]=Ht(a)||a),(s=S.cssHooks[e]||S.cssHooks[a])&&"get"in s&&(r=s.get(t,!0,n)),void 0===r&&(r=It(t,e,i)),"normal"===r&&e in Nt&&(r=Nt[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),S.each(["height","width"],function(t,s){S.cssHooks[s]={get:function(t,e,n){if(e)return Bt.test(S.css(t,"display"))&&0===t.offsetWidth?Ct(t,Rt,function(){return zt(t,s,n)}):zt(t,s,n)},set:function(t,e,n){var i,r=n&&Ft(t),o=n&&qt(t,s,n,"border-box"===S.css(t,"boxSizing",!1,r),r);return o&&(i=H.exec(e))&&"px"!==(i[3]||"px")&&(t.style[s]=e,e=S.css(t,s)),Ut(0,e,o)}}}),S.cssHooks.marginLeft=$t(m.reliableMarginLeft,function(t,e){if(e)return(parseFloat(It(t,"marginLeft"))||t.getBoundingClientRect().left-Ct(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),S.cssHooks.marginRight=$t(m.reliableMarginRight,function(t,e){if(e)return Ct(t,{display:"inline-block"},It,[t,"marginRight"])}),S.each({margin:"",padding:"",border:"Width"},function(r,o){S.cssHooks[r+o]={expand:function(t){for(var e=0,n={},i="string"==typeof t?t.split(" "):[t];e<4;e++)n[r+U[e]+o]=i[e]||i[e-2]||i[0];return n}},jt.test(r)||(S.cssHooks[r+o].set=Ut)}),S.fn.extend({css:function(t,e){return L(this,function(t,e,n){var i,r,o={},s=0;if(S.isArray(e)){for(i=Ft(t),r=e.length;s<r;s++)o[e[s]]=S.css(t,e[s],!1,i);return o}return void 0!==n?S.style(t,e,n):S.css(t,e)},t,e,1<arguments.length)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){V(this)?S(this).show():S(this).hide()})}}),((S.Tween=Gt).prototype={constructor:Gt,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||S.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var t=Gt.propHooks[this.prop];return t&&t.get?t.get(this):Gt.propHooks._default.get(this)},run:function(t){var e,n=Gt.propHooks[this.prop];return this.options.duration?this.pos=e=S.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Gt.propHooks._default.set(this),this}}).init.prototype=Gt.prototype,(Gt.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=S.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){S.fx.step[t.prop]?S.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[S.cssProps[t.prop]]&&!S.cssHooks[t.prop]?t.elem[t.prop]=t.now:S.style(t.elem,t.prop,t.now+t.unit)}}}).scrollTop=Gt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},S.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},S.fx=Gt.prototype.init,S.fx.step={};var Kt,Xt,Jt,Zt,Qt,te=/^(?:toggle|show|hide)$/,ee=/queueHooks$/;function ne(){return k.setTimeout(function(){Kt=void 0}),Kt=S.now()}function ie(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=U[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function re(t,e,n){for(var i,r=(oe.tweeners[e]||[]).concat(oe.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,e,t))return i}function oe(o,t,e){var n,s,i=0,r=oe.prefilters.length,a=S.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var t=Kt||ne(),e=Math.max(0,u.startTime+u.duration-t),n=1-(e/u.duration||0),i=0,r=u.tweens.length;i<r;i++)u.tweens[i].run(n);return a.notifyWith(o,[u,n,e]),n<1&&r?e:(a.resolveWith(o,[u]),!1)},u=a.promise({elem:o,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},e),originalProperties:t,originalOptions:e,startTime:Kt||ne(),duration:e.duration,tweens:[],createTween:function(t,e){var n=S.Tween(o,u.opts,t,e,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(n),n},stop:function(t){var e=0,n=t?u.tweens.length:0;if(s)return this;for(s=!0;e<n;e++)u.tweens[e].run(1);return t?(a.notifyWith(o,[u,1,0]),a.resolveWith(o,[u,t])):a.rejectWith(o,[u,t]),this}}),c=u.props;for(!function(t,e){var n,i,r,o,s;for(n in t)if(r=e[i=S.camelCase(n)],o=t[n],S.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),(s=S.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete t[i],o)n in t||(t[n]=o[n],e[n]=r);else e[i]=r}(c,u.opts.specialEasing);i<r;i++)if(n=oe.prefilters[i].call(u,o,c,u.opts))return S.isFunction(n.stop)&&(S._queueHooks(u.elem,u.opts.queue).stop=S.proxy(n.stop,n)),n;return S.map(c,re,u),S.isFunction(u.opts.start)&&u.opts.start.call(o,u),S.fx.timer(S.extend(l,{elem:o,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}S.Animation=S.extend(oe,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return q(n.elem,t,H.exec(e),n),n}]},tweener:function(t,e){for(var n,i=0,r=(t=S.isFunction(t)?(e=t,["*"]):t.match(j)).length;i<r;i++)n=t[i],oe.tweeners[n]=oe.tweeners[n]||[],oe.tweeners[n].unshift(e)},prefilters:[function(e,t,n){var i,r,o,s,a,l,u,c=this,d={},h=e.style,p=e.nodeType&&V(e),f=I.get(e,"fxshow");for(i in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],"inline"===("none"===(u=S.css(e,"display"))?I.get(e,"olddisplay")||kt(e.nodeName):u)&&"none"===S.css(e,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",c.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),t)if(r=t[i],te.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!f||void 0===f[i])continue;p=!0}d[i]=f&&f[i]||S.style(e,i)}else u=void 0;if(S.isEmptyObject(d))"inline"===("none"===u?kt(e.nodeName):u)&&(h.display=u);else for(i in f?"hidden"in f&&(p=f.hidden):f=I.access(e,"fxshow",{}),o&&(f.hidden=!p),p?S(e).show():c.done(function(){S(e).hide()}),c.done(function(){var t;for(t in I.remove(e,"fxshow"),d)S.style(e,t,d[t])}),d)s=re(p?f[i]:0,i,c),i in f||(f[i]=s.start,p&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}],prefilter:function(t,e){e?oe.prefilters.unshift(t):oe.prefilters.push(t)}}),S.speed=function(t,e,n){var i=t&&"object"==typeof t?S.extend({},t):{complete:n||!n&&e||S.isFunction(t)&&t,duration:t,easing:n&&e||e&&!S.isFunction(e)&&e};return i.duration=S.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in S.fx.speeds?S.fx.speeds[i.duration]:S.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){S.isFunction(i.old)&&i.old.call(this),i.queue&&S.dequeue(this,i.queue)},i},S.fn.extend({fadeTo:function(t,e,n,i){return this.filter(V).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(e,t,n,i){function r(){var t=oe(this,S.extend({},e),s);(o||I.get(this,"finish"))&&t.stop(!0)}var o=S.isEmptyObject(e),s=S.speed(t,n,i);return r.finish=r,o||!1===s.queue?this.each(r):this.queue(s.queue,r)},stop:function(r,t,o){function s(t){var e=t.stop;delete t.stop,e(o)}return"string"!=typeof r&&(o=t,t=r,r=void 0),t&&!1!==r&&this.queue(r||"fx",[]),this.each(function(){var t=!0,e=null!=r&&r+"queueHooks",n=S.timers,i=I.get(this);if(e)i[e]&&i[e].stop&&s(i[e]);else for(e in i)i[e]&&i[e].stop&&ee.test(e)&&s(i[e]);for(e=n.length;e--;)n[e].elem!==this||null!=r&&n[e].queue!==r||(n[e].anim.stop(o),t=!1,n.splice(e,1));!t&&o||S.dequeue(this,r)})},finish:function(s){return!1!==s&&(s=s||"fx"),this.each(function(){var t,e=I.get(this),n=e[s+"queue"],i=e[s+"queueHooks"],r=S.timers,o=n?n.length:0;for(e.finish=!0,S.queue(this,s,[]),i&&i.stop&&i.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===s&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<o;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete e.finish})}}),S.each(["toggle","show","hide"],function(t,i){var r=S.fn[i];S.fn[i]=function(t,e,n){return null==t||"boolean"==typeof t?r.apply(this,arguments):this.animate(ie(i,!0),t,e,n)}}),S.each({slideDown:ie("show"),slideUp:ie("hide"),slideToggle:ie("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,i){S.fn[t]=function(t,e,n){return this.animate(i,t,e,n)}}),S.timers=[],S.fx.tick=function(){var t,e=0,n=S.timers;for(Kt=S.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||S.fx.stop(),Kt=void 0},S.fx.timer=function(t){S.timers.push(t),t()?S.fx.start():S.timers.pop()},S.fx.interval=13,S.fx.start=function(){Xt=Xt||k.setInterval(S.fx.tick,S.fx.interval)},S.fx.stop=function(){k.clearInterval(Xt),Xt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(i,t){return i=S.fx&&S.fx.speeds[i]||i,t=t||"fx",this.queue(t,function(t,e){var n=k.setTimeout(t,i);e.stop=function(){k.clearTimeout(n)}})},Jt=C.createElement("input"),Zt=C.createElement("select"),Qt=Zt.appendChild(C.createElement("option")),Jt.type="checkbox",m.checkOn=""!==Jt.value,m.optSelected=Qt.selected,Zt.disabled=!0,m.optDisabled=!Qt.disabled,(Jt=C.createElement("input")).value="t",Jt.type="radio",m.radioValue="t"===Jt.value;var se,ae=S.expr.attrHandle;S.fn.extend({attr:function(t,e){return L(this,S.attr,t,e,1<arguments.length)},removeAttr:function(t){return this.each(function(){S.removeAttr(this,t)})}}),S.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?S.prop(t,e,n):(1===o&&S.isXMLDoc(t)||(e=e.toLowerCase(),r=S.attrHooks[e]||(S.expr.match.bool.test(e)?se:void 0)),void 0!==n?null===n?void S.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=S.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!m.radioValue&&"radio"===e&&S.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(j);if(o&&1===t.nodeType)for(;n=o[r++];)i=S.propFix[n]||n,S.expr.match.bool.test(n)&&(t[i]=!1),t.removeAttribute(n)}}),se={set:function(t,e,n){return!1===e?S.removeAttr(t,n):t.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(t,e){var o=ae[e]||S.find.attr;ae[e]=function(t,e,n){var i,r;return n||(r=ae[e],ae[e]=i,i=null!=o(t,e,n)?e.toLowerCase():null,ae[e]=r),i}});var le=/^(?:input|select|textarea|button)$/i,ue=/^(?:a|area)$/i;S.fn.extend({prop:function(t,e){return L(this,S.prop,t,e,1<arguments.length)},removeProp:function(t){return this.each(function(){delete this[S.propFix[t]||t]})}}),S.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(t)||(e=S.propFix[e]||e,r=S.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=S.find.attr(t,"tabindex");return e?parseInt(e,10):le.test(t.nodeName)||ue.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(S.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this});var ce=/[\t\r\n\f]/g;function de(t){return t.getAttribute&&t.getAttribute("class")||""}S.fn.extend({addClass:function(e){var t,n,i,r,o,s,a,l=0;if(S.isFunction(e))return this.each(function(t){S(this).addClass(e.call(this,t,de(this)))});if("string"==typeof e&&e)for(t=e.match(j)||[];n=this[l++];)if(r=de(n),i=1===n.nodeType&&(" "+r+" ").replace(ce," ")){for(s=0;o=t[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=S.trim(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,r,o,s,a,l=0;if(S.isFunction(e))return this.each(function(t){S(this).removeClass(e.call(this,t,de(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(j)||[];n=this[l++];)if(r=de(n),i=1===n.nodeType&&(" "+r+" ").replace(ce," ")){for(s=0;o=t[s++];)for(;-1<i.indexOf(" "+o+" ");)i=i.replace(" "+o+" "," ");r!==(a=S.trim(i))&&n.setAttribute("class",a)}return this},toggleClass:function(r,e){var o=typeof r;return"boolean"==typeof e&&"string"==o?e?this.addClass(r):this.removeClass(r):S.isFunction(r)?this.each(function(t){S(this).toggleClass(r.call(this,t,de(this),e),e)}):this.each(function(){var t,e,n,i;if("string"==o)for(e=0,n=S(this),i=r.match(j)||[];t=i[e++];)n.hasClass(t)?n.removeClass(t):n.addClass(t);else void 0!==r&&"boolean"!=o||((t=de(this))&&I.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===r?"":I.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&-1<(" "+de(n)+" ").replace(ce," ").indexOf(e))return!0;return!1}});var he=/\r/g,pe=/[\x20\t\r\n\f]+/g;S.fn.extend({val:function(n){var i,t,r,e=this[0];return arguments.length?(r=S.isFunction(n),this.each(function(t){var e;1===this.nodeType&&(null==(e=r?n.call(this,t,S(this).val()):n)?e="":"number"==typeof e?e+="":S.isArray(e)&&(e=S.map(e,function(t){return null==t?"":t+""})),(i=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in i&&void 0!==i.set(this,e,"value")||(this.value=e))})):e?(i=S.valHooks[e.type]||S.valHooks[e.nodeName.toLowerCase()])&&"get"in i&&void 0!==(t=i.get(e,"value"))?t:"string"==typeof(t=e.value)?t.replace(he,""):null==t?"":t:void 0}}),S.extend({valHooks:{option:{get:function(t){var e=S.find.attr(t,"value");return null!=e?e:S.trim(S.text(t)).replace(pe," ")}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o="select-one"===t.type||r<0,s=o?null:[],a=o?r+1:i.length,l=r<0?a:o?r:0;l<a;l++)if(((n=i[l]).selected||l===r)&&(m.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!S.nodeName(n.parentNode,"optgroup"))){if(e=S(n).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var n,i,r=t.options,o=S.makeArray(e),s=r.length;s--;)((i=r[s]).selected=-1<S.inArray(S.valHooks.option.get(i),o))&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(t,e){if(S.isArray(e))return t.checked=-1<S.inArray(S(t).val(),e)}},m.checkOn||(S.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var fe=/^(?:focusinfocus|focusoutblur)$/;S.extend(S.event,{trigger:function(t,e,n,i){var r,o,s,a,l,u,c,d=[n||C],h=f.call(t,"type")?t.type:t,p=f.call(t,"namespace")?t.namespace.split("."):[];if(o=s=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!fe.test(h+S.event.triggered)&&(-1<h.indexOf(".")&&(h=(p=h.split(".")).shift(),p.sort()),l=h.indexOf(":")<0&&"on"+h,(t=t[S.expando]?t:new S.Event(h,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:S.makeArray(e,[t]),c=S.event.special[h]||{},i||!c.trigger||!1!==c.trigger.apply(n,e))){if(!i&&!c.noBubble&&!S.isWindow(n)){for(a=c.delegateType||h,fe.test(a+h)||(o=o.parentNode);o;o=o.parentNode)d.push(o),s=o;s===(n.ownerDocument||C)&&d.push(s.defaultView||s.parentWindow||k)}for(r=0;(o=d[r++])&&!t.isPropagationStopped();)t.type=1<r?a:c.bindType||h,(u=(I.get(o,"events")||{})[t.type]&&I.get(o,"handle"))&&u.apply(o,e),(u=l&&o[l])&&u.apply&&F(o)&&(t.result=u.apply(o,e),!1===t.result&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||c._default&&!1!==c._default.apply(d.pop(),e)||!F(n)||l&&S.isFunction(n[h])&&!S.isWindow(n)&&((s=n[l])&&(n[l]=null),n[S.event.triggered=h](),S.event.triggered=void 0,s&&(n[l]=s)),t.result}},simulate:function(t,e,n){var i=S.extend(new S.Event,n,{type:t,isSimulated:!0});S.event.trigger(i,null,e)}}),S.fn.extend({trigger:function(t,e){return this.each(function(){S.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return S.event.trigger(t,e,n,!0)}}),S.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,n){S.fn[n]=function(t,e){return 0<arguments.length?this.on(n,null,t,e):this.trigger(n)}}),S.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),m.focusin="onfocusin"in k,m.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,i){function r(t){S.event.simulate(i,t.target,S.event.fix(t))}S.event.special[i]={setup:function(){var t=this.ownerDocument||this,e=I.access(t,i);e||t.addEventListener(n,r,!0),I.access(t,i,(e||0)+1)},teardown:function(){var t=this.ownerDocument||this,e=I.access(t,i)-1;e?I.access(t,i,e):(t.removeEventListener(n,r,!0),I.remove(t,i))}}});var ge=k.location,me=S.now(),ye=/\?/;S.parseJSON=function(t){return JSON.parse(t+"")},S.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new k.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+t),e};var ve=/#.*$/,be=/([?&])_=[^&]*/,_e=/^(.*?):[ \t]*([^\r\n]*)$/gm,we=/^(?:GET|HEAD)$/,xe=/^\/\//,ke={},Ce={},Se="*/".concat("*"),Pe=C.createElement("a");function Ee(o){return function(t,e){"string"!=typeof t&&(e=t,t="*");var n,i=0,r=t.toLowerCase().match(j)||[];if(S.isFunction(e))for(;n=r[i++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(e)):(o[n]=o[n]||[]).push(e)}}function Te(e,r,o,s){var a={},l=e===Ce;function u(t){var i;return a[t]=!0,S.each(e[t]||[],function(t,e){var n=e(r,o,s);return"string"!=typeof n||l||a[n]?l?!(i=n):void 0:(r.dataTypes.unshift(n),u(n),!1)}),i}return u(r.dataTypes[0])||!a["*"]&&u("*")}function Oe(t,e){var n,i,r=S.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i=i||{})[n]=e[n]);return i&&S.extend(!0,t,i),t}Pe.href=ge.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ge.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ge.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Se,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":S.parseJSON,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Oe(Oe(t,S.ajaxSettings),e):Oe(S.ajaxSettings,t)},ajaxPrefilter:Ee(ke),ajaxTransport:Ee(Ce),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var c,d,h,n,p,i,f,r,g=S.ajaxSetup({},e),m=g.context||g,y=g.context&&(m.nodeType||m.jquery)?S(m):S.event,v=S.Deferred(),b=S.Callbacks("once memory"),_=g.statusCode||{},o={},s={},w=0,a="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!n)for(n={};e=_e.exec(h);)n[e[1].toLowerCase()]=e[2];e=n[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?h:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return w||(t=s[n]=s[n]||t,o[t]=e),this},overrideMimeType:function(t){return w||(g.mimeType=t),this},statusCode:function(t){var e;if(t)if(w<2)for(e in t)_[e]=[_[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||a;return c&&c.abort(e),l(0,e),this}};if(v.promise(x).complete=b.add,x.success=x.done,x.error=x.fail,g.url=((t||g.url||ge.href)+"").replace(ve,"").replace(xe,ge.protocol+"//"),g.type=e.method||e.type||g.method||g.type,g.dataTypes=S.trim(g.dataType||"*").toLowerCase().match(j)||[""],null==g.crossDomain){i=C.createElement("a");try{i.href=g.url,i.href=i.href,g.crossDomain=Pe.protocol+"//"+Pe.host!=i.protocol+"//"+i.host}catch(t){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=S.param(g.data,g.traditional)),Te(ke,g,e,x),2===w)return x;for(r in(f=S.event&&g.global)&&0==S.active++&&S.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!we.test(g.type),d=g.url,g.hasContent||(g.data&&(d=g.url+=(ye.test(d)?"&":"?")+g.data,delete g.data),!1===g.cache&&(g.url=be.test(d)?d.replace(be,"$1_="+me++):d+(ye.test(d)?"&":"?")+"_="+me++)),g.ifModified&&(S.lastModified[d]&&x.setRequestHeader("If-Modified-Since",S.lastModified[d]),S.etag[d]&&x.setRequestHeader("If-None-Match",S.etag[d])),(g.data&&g.hasContent&&!1!==g.contentType||e.contentType)&&x.setRequestHeader("Content-Type",g.contentType),x.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Se+"; q=0.01":""):g.accepts["*"]),g.headers)x.setRequestHeader(r,g.headers[r]);if(g.beforeSend&&(!1===g.beforeSend.call(m,x,g)||2===w))return x.abort();for(r in a="abort",{success:1,error:1,complete:1})x[r](g[r]);if(c=Te(Ce,g,e,x)){if(x.readyState=1,f&&y.trigger("ajaxSend",[x,g]),2===w)return x;g.async&&0<g.timeout&&(p=k.setTimeout(function(){x.abort("timeout")},g.timeout));try{w=1,c.send(o,l)}catch(t){if(!(w<2))throw t;l(-1,t)}}else l(-1,"No Transport");function l(t,e,n,i){var r,o,s,a,l,u=e;2!==w&&(w=2,p&&k.clearTimeout(p),c=void 0,h=i||"",x.readyState=0<t?4:0,r=200<=t&&t<300||304===t,n&&(a=function(t,e,n){for(var i,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}s=s||r}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(g,x,n)),a=function(t,e,n,i){var r,o,s,a,l,u={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(r in u)if((a=r.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[r]:!0!==u[r]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(g,a,x,r),r?(g.ifModified&&((l=x.getResponseHeader("Last-Modified"))&&(S.lastModified[d]=l),(l=x.getResponseHeader("etag"))&&(S.etag[d]=l)),204===t||"HEAD"===g.type?u="nocontent":304===t?u="notmodified":(u=a.state,o=a.data,r=!(s=a.error))):(s=u,!t&&u||(u="error",t<0&&(t=0))),x.status=t,x.statusText=(e||u)+"",r?v.resolveWith(m,[o,u,x]):v.rejectWith(m,[x,u,s]),x.statusCode(_),_=void 0,f&&y.trigger(r?"ajaxSuccess":"ajaxError",[x,g,r?o:s]),b.fireWith(m,[x,u]),f&&(y.trigger("ajaxComplete",[x,g]),--S.active||S.event.trigger("ajaxStop")))}return x},getJSON:function(t,e,n){return S.get(t,e,n,"json")},getScript:function(t,e){return S.get(t,void 0,e,"script")}}),S.each(["get","post"],function(t,r){S[r]=function(t,e,n,i){return S.isFunction(e)&&(i=i||n,n=e,e=void 0),S.ajax(S.extend({url:t,type:r,dataType:i,data:e,success:n},S.isPlainObject(t)&&t))}}),S._evalUrl=function(t){return S.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},S.fn.extend({wrapAll:function(e){var t;return S.isFunction(e)?this.each(function(t){S(this).wrapAll(e.call(this,t))}):(this[0]&&(t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(n){return S.isFunction(n)?this.each(function(t){S(this).wrapInner(n.call(this,t))}):this.each(function(){var t=S(this),e=t.contents();e.length?e.wrapAll(n):t.append(n)})},wrap:function(e){var n=S.isFunction(e);return this.each(function(t){S(this).wrapAll(n?e.call(this,t):e)})},unwrap:function(){return this.parent().each(function(){S.nodeName(this,"body")||S(this).replaceWith(this.childNodes)}).end()}}),S.expr.filters.hidden=function(t){return!S.expr.filters.visible(t)},S.expr.filters.visible=function(t){return 0<t.offsetWidth||0<t.offsetHeight||0<t.getClientRects().length};var Me=/%20/g,je=/\[\]$/,De=/\r?\n/g,Fe=/^(?:submit|button|image|reset|file)$/i,Le=/^(?:input|select|textarea|keygen)/i;function Ae(n,t,i,r){var e;if(S.isArray(t))S.each(t,function(t,e){i||je.test(n)?r(n,e):Ae(n+"["+("object"==typeof e&&null!=e?t:"")+"]",e,i,r)});else if(i||"object"!==S.type(t))r(n,t);else for(e in t)Ae(n+"["+e+"]",t[e],i,r)}S.param=function(t,e){function n(t,e){e=S.isFunction(e)?e():null==e?"":e,r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)}var i,r=[];if(void 0===e&&(e=S.ajaxSettings&&S.ajaxSettings.traditional),S.isArray(t)||t.jquery&&!S.isPlainObject(t))S.each(t,function(){n(this.name,this.value)});else for(i in t)Ae(i,t[i],e,n);return r.join("&").replace(Me,"+")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=S.prop(this,"elements");return t?S.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!S(this).is(":disabled")&&Le.test(this.nodeName)&&!Fe.test(t)&&(this.checked||!z.test(t))}).map(function(t,e){var n=S(this).val();return null==n?null:S.isArray(n)?S.map(n,function(t){return{name:e.name,value:t.replace(De,"\r\n")}}):{name:e.name,value:n.replace(De,"\r\n")}}).get()}}),S.ajaxSettings.xhr=function(){try{return new k.XMLHttpRequest}catch(t){}};var Ie={0:200,1223:204},$e=S.ajaxSettings.xhr();m.cors=!!$e&&"withCredentials"in $e,m.ajax=$e=!!$e,S.ajaxTransport(function(r){var o,s;if(m.cors||$e&&!r.crossDomain)return{send:function(t,e){var n,i=r.xhr();if(i.open(r.type,r.url,r.async,r.username,r.password),r.xhrFields)for(n in r.xhrFields)i[n]=r.xhrFields[n];for(n in r.mimeType&&i.overrideMimeType&&i.overrideMimeType(r.mimeType),r.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest"),t)i.setRequestHeader(n,t[n]);o=function(t){return function(){o&&(o=s=i.onload=i.onerror=i.onabort=i.onreadystatechange=null,"abort"===t?i.abort():"error"===t?"number"!=typeof i.status?e(0,"error"):e(i.status,i.statusText):e(Ie[i.status]||i.status,i.statusText,"text"!==(i.responseType||"text")||"string"!=typeof i.responseText?{binary:i.response}:{text:i.responseText},i.getAllResponseHeaders()))}},i.onload=o(),s=i.onerror=o("error"),void 0!==i.onabort?i.onabort=s:i.onreadystatechange=function(){4===i.readyState&&k.setTimeout(function(){o&&s()})},o=o("abort");try{i.send(r.hasContent&&r.data||null)}catch(t){if(o)throw t}},abort:function(){o&&o()}}}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return S.globalEval(t),t}}}),S.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),S.ajaxTransport("script",function(n){var i,r;if(n.crossDomain)return{send:function(t,e){i=S("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",r=function(t){i.remove(),r=null,t&&e("error"===t.type?404:200,t.type)}),C.head.appendChild(i[0])},abort:function(){r&&r()}}});var Be=[],Re=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Be.pop()||S.expando+"_"+me++;return this[t]=!0,t}}),S.ajaxPrefilter("json jsonp",function(t,e,n){var i,r,o,s=!1!==t.jsonp&&(Re.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Re.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=S.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Re,"$1"+i):!1!==t.jsonp&&(t.url+=(ye.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||S.error(i+" was not called"),o[0]},t.dataTypes[0]="json",r=k[i],k[i]=function(){o=arguments},n.always(function(){void 0===r?S(k).removeProp(i):k[i]=r,t[i]&&(t.jsonpCallback=e.jsonpCallback,Be.push(i)),o&&S.isFunction(r)&&r(o[0]),o=r=void 0}),"script"}),S.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||C;var i=b.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=et([t],e,r),r&&r.length&&S(r).remove(),S.merge([],i.childNodes))};var Ne=S.fn.load;function Ve(t){return S.isWindow(t)?t:9===t.nodeType&&t.defaultView}S.fn.load=function(t,e,n){if("string"!=typeof t&&Ne)return Ne.apply(this,arguments);var i,r,o,s=this,a=t.indexOf(" ");return-1<a&&(i=S.trim(t.slice(a)),t=t.slice(0,a)),S.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),0<s.length&&S.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,s.html(i?S("<div>").append(S.parseHTML(t)).find(i):t)}).always(n&&function(t,e){s.each(function(){n.apply(this,o||[t.responseText,e,t])})}),this},S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){S.fn[e]=function(t){return this.on(e,t)}}),S.expr.filters.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(t,e,n){var i,r,o,s,a,l,u=S.css(t,"position"),c=S(t),d={};"static"===u&&(t.style.position="relative"),a=c.offset(),o=S.css(t,"top"),l=S.css(t,"left"),r=("absolute"===u||"fixed"===u)&&-1<(o+l).indexOf("auto")?(s=(i=c.position()).top,i.left):(s=parseFloat(o)||0,parseFloat(l)||0),S.isFunction(e)&&(e=e.call(t,n,S.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):c.css(d)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,i=this[0],r={top:0,left:0},o=i&&i.ownerDocument;return o?(t=o.documentElement,S.contains(t,i)?(r=i.getBoundingClientRect(),n=Ve(o),{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r):void 0},position:function(){if(this[0]){var t,e,n=this[0],i={top:0,left:0};return"fixed"===S.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),S.nodeName(t[0],"html")||(i=t.offset()),i.top+=S.css(t[0],"borderTopWidth",!0),i.left+=S.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-S.css(n,"marginTop",!0),left:e.left-i.left-S.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===S.css(t,"position");)t=t.offsetParent;return t||Lt})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,r){var o="pageYOffset"===r;S.fn[e]=function(t){return L(this,function(t,e,n){var i=Ve(t);if(void 0===n)return i?i[r]:t[e];i?i.scrollTo(o?i.pageXOffset:n,o?n:i.pageYOffset):t[e]=n},e,t,arguments.length)}}),S.each(["top","left"],function(t,n){S.cssHooks[n]=$t(m.pixelPosition,function(t,e){if(e)return e=It(t,n),Dt.test(e)?S(t).position()[n]+"px":e})}),S.each({Height:"height",Width:"width"},function(o,s){S.each({padding:"inner"+o,content:s,"":"outer"+o},function(i,t){S.fn[t]=function(t,e){var n=arguments.length&&(i||"boolean"!=typeof t),r=i||(!0===t||!0===e?"margin":"border");return L(this,function(t,e,n){var i;return S.isWindow(t)?t.document.documentElement["client"+o]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+o],i["scroll"+o],t.body["offset"+o],i["offset"+o],i["client"+o])):void 0===n?S.css(t,e,r):S.style(t,e,n,r)},s,n?t:void 0,n,null)}})}),S.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},size:function(){return this.length}}),S.fn.andSelf=S.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var We=k.jQuery,He=k.$;return S.noConflict=function(t){return k.$===S&&(k.$=He),t&&k.jQuery===S&&(k.jQuery=We),S},t||(k.jQuery=k.$=S),S},"object"==typeof e&&"object"==typeof e.exports?e.exports=i.document?r(i,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return r(t)}:r(i)},{}],97:[function(ei,ni,t){var e,n;e=this,n=function(){"use strict";var t,r;function p(){return t.apply(null,arguments)}function s(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function l(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(f(t,e))return!1;return!0}function o(t){return void 0===t}function u(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function i(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function d(t,e){for(var n in e)f(e,n)&&(t[n]=e[n]);return f(e,"toString")&&(t.toString=e.toString),f(e,"valueOf")&&(t.valueOf=e.valueOf),t}function h(t,e,n,i){return Te(t,e,n,i,!0).utc()}function g(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function m(t){if(null==t._isValid){var e=g(t),n=r.call(e.parsedDateParts,function(t){return null!=t}),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function y(t){var e=h(NaN);return null!=t?d(g(e),t):g(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){var e,n=Object(this),i=n.length>>>0;for(e=0;e<i;e++)if(e in n&&t.call(this,n[e],e,n))return!0;return!1};var v=p.momentProperties=[],e=!1;function b(t,e){var n,i,r;if(o(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),o(e._i)||(t._i=e._i),o(e._f)||(t._f=e._f),o(e._l)||(t._l=e._l),o(e._strict)||(t._strict=e._strict),o(e._tzm)||(t._tzm=e._tzm),o(e._isUTC)||(t._isUTC=e._isUTC),o(e._offset)||(t._offset=e._offset),o(e._pf)||(t._pf=g(e)),o(e._locale)||(t._locale=e._locale),0<v.length)for(n=0;n<v.length;n++)o(r=e[i=v[n]])||(t[i]=r);return t}function _(t){b(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===e&&(e=!0,p.updateOffset(this),e=!1)}function w(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function x(t){!1===p.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function n(r,o){var s=!0;return d(function(){if(null!=p.deprecationHandler&&p.deprecationHandler(null,r),s){var t,e,n,i=[];for(e=0;e<arguments.length;e++){if(t="","object"==typeof arguments[e]){for(n in t+="\n["+e+"] ",arguments[0])f(arguments[0],n)&&(t+=n+": "+arguments[0][n]+", ");t=t.slice(0,-2)}else t=arguments[e];i.push(t)}x(r+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),s=!1}return o.apply(this,arguments)},o)}var k,C={};function S(t,e){null!=p.deprecationHandler&&p.deprecationHandler(t,e),C[t]||(x(e),C[t]=!0)}function P(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function E(t,e){var n,i=d({},t);for(n in e)f(e,n)&&(a(t[n])&&a(e[n])?(i[n]={},d(i[n],t[n]),d(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)f(t,n)&&!f(e,n)&&a(t[n])&&(i[n]=d({},i[n]));return i}function T(t){null!=t&&this.set(t)}p.suppressDeprecationWarnings=!1,p.deprecationHandler=null,k=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)f(t,e)&&n.push(e);return n};function O(t,e,n){var i=""+Math.abs(t),r=e-i.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var M=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,j=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,D={},F={};function L(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(F[t]=r),e&&(F[e[0]]=function(){return O(r.apply(this,arguments),e[1],e[2])}),n&&(F[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function A(t,e){return t.isValid()?(e=I(e,t.localeData()),D[e]=D[e]||function(i){var t,r,e,o=i.match(M);for(t=0,r=o.length;t<r;t++)F[o[t]]?o[t]=F[o[t]]:o[t]=(e=o[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(t){var e,n="";for(e=0;e<r;e++)n+=P(o[e])?o[e].call(t,i):o[e];return n}}(e),D[e](t)):t.localeData().invalidDate()}function I(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}for(j.lastIndex=0;0<=n&&j.test(t);)t=t.replace(j,i),j.lastIndex=0,n-=1;return t}var $={};function B(t,e){var n=t.toLowerCase();$[n]=$[n+"s"]=$[e]=t}function R(t){return"string"==typeof t?$[t]||$[t.toLowerCase()]:void 0}function N(t){var e,n,i={};for(n in t)f(t,n)&&(e=R(n))&&(i[e]=t[n]);return i}var V={};function W(t,e){V[t]=e}function H(t){return t%4==0&&t%100!=0||t%400==0}function U(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function q(t){var e=+t,n=0;return 0!=e&&isFinite(e)&&(n=U(e)),n}function z(e,n){return function(t){return null!=t?(G(this,e,t),p.updateOffset(this,n),this):Y(this,e)}}function Y(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function G(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&H(t.year())&&1===t.month()&&29===t.date()?(n=q(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Tt(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}var K,X=/\d/,J=/\d\d/,Z=/\d{3}/,Q=/\d{4}/,tt=/[+-]?\d{6}/,et=/\d\d?/,nt=/\d\d\d\d?/,it=/\d\d\d\d\d\d?/,rt=/\d{1,3}/,ot=/\d{1,4}/,st=/[+-]?\d{1,6}/,at=/\d+/,lt=/[+-]?\d+/,ut=/Z|[+-]\d\d:?\d\d/gi,ct=/Z|[+-]\d\d(?::?\d\d)?/gi,dt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function ht(t,n,i){K[t]=P(n)?n:function(t,e){return t&&i?i:n}}function pt(t,e){return f(K,t)?K[t](e._strict,e._locale):new RegExp(function(t){return ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}))}(t))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}K={};var gt={};function mt(t,n){var e,i=n;for("string"==typeof t&&(t=[t]),u(n)&&(i=function(t,e){e[n]=q(t)}),e=0;e<t.length;e++)gt[t[e]]=i}function yt(t,r){mt(t,function(t,e,n,i){n._w=n._w||{},r(t,n._w,n,i)})}var vt,bt=0,_t=1,wt=2,xt=3,kt=4,Ct=5,St=6,Pt=7,Et=8;function Tt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=function(t,e){return(t%e+e)%e}(e,12);return t+=(e-n)/12,1===n?H(t)?29:28:31-n%7%2}vt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},L("M",["MM",2],"Mo",function(){return this.month()+1}),L("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),L("MMMM",0,0,function(t){return this.localeData().months(this,t)}),B("month","M"),W("month",8),ht("M",et),ht("MM",et,J),ht("MMM",function(t,e){return e.monthsShortRegex(t)}),ht("MMMM",function(t,e){return e.monthsRegex(t)}),mt(["M","MM"],function(t,e){e[_t]=q(t)-1}),mt(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);null!=r?e[_t]=r:g(n).invalidMonth=t});var Ot="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Mt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),jt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Dt=dt,Ft=dt;function Lt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=q(e);else if(!u(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Tt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function At(t){return null!=t?(Lt(this,t),p.updateOffset(this,!0),this):Y(this,"Month")}function It(){function t(t,e){return e.length-t.length}var e,n,i=[],r=[],o=[];for(e=0;e<12;e++)n=h([2e3,e]),i.push(this.monthsShort(n,"")),r.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(i.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)i[e]=ft(i[e]),r[e]=ft(r[e]);for(e=0;e<24;e++)o[e]=ft(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function $t(t){return H(t)?366:365}L("Y",0,0,function(){var t=this.year();return t<=9999?O(t,4):"+"+t}),L(0,["YY",2],0,function(){return this.year()%100}),L(0,["YYYY",4],0,"year"),L(0,["YYYYY",5],0,"year"),L(0,["YYYYYY",6,!0],0,"year"),B("year","y"),W("year",1),ht("Y",lt),ht("YY",et,J),ht("YYYY",ot,Q),ht("YYYYY",st,tt),ht("YYYYYY",st,tt),mt(["YYYYY","YYYYYY"],bt),mt("YYYY",function(t,e){e[bt]=2===t.length?p.parseTwoDigitYear(t):q(t)}),mt("YY",function(t,e){e[bt]=p.parseTwoDigitYear(t)}),mt("Y",function(t,e){e[bt]=parseInt(t,10)}),p.parseTwoDigitYear=function(t){return q(t)+(68<q(t)?1900:2e3)};var Bt=z("FullYear",!0);function Rt(t){var e,n;return t<100&&0<=t?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Nt(t,e,n){var i=7+e-n;return i-(7+Rt(t,0,i).getUTCDay()-e)%7-1}function Vt(t,e,n,i,r){var o,s,a=1+7*(e-1)+(7+n-i)%7+Nt(t,i,r);return s=a<=0?$t(o=t-1)+a:a>$t(t)?(o=t+1,a-$t(t)):(o=t,a),{year:o,dayOfYear:s}}function Wt(t,e,n){var i,r,o=Nt(t.year(),e,n),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?i=s+Ht(r=t.year()-1,e,n):s>Ht(t.year(),e,n)?(i=s-Ht(t.year(),e,n),r=t.year()+1):(r=t.year(),i=s),{week:i,year:r}}function Ht(t,e,n){var i=Nt(t,e,n),r=Nt(t+1,e,n);return($t(t)-i+r)/7}L("w",["ww",2],"wo","week"),L("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),W("week",5),W("isoWeek",5),ht("w",et),ht("ww",et,J),ht("W",et),ht("WW",et,J),yt(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=q(t)});function Ut(t,e){return t.slice(e,7).concat(t.slice(0,e))}L("d",0,"do","day"),L("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),L("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),L("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),L("e",0,0,"weekday"),L("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),ht("d",et),ht("e",et),ht("E",et),ht("dd",function(t,e){return e.weekdaysMinRegex(t)}),ht("ddd",function(t,e){return e.weekdaysShortRegex(t)}),ht("dddd",function(t,e){return e.weekdaysRegex(t)}),yt(["dd","ddd","dddd"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);null!=r?e.d=r:g(n).invalidWeekday=t}),yt(["d","e","E"],function(t,e,n,i){e[i]=q(t)});var qt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),zt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Yt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Gt=dt,Kt=dt,Xt=dt;function Jt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,s=[],a=[],l=[],u=[];for(e=0;e<7;e++)n=h([2e3,1]).day(e),i=ft(this.weekdaysMin(n,"")),r=ft(this.weekdaysShort(n,"")),o=ft(this.weekdays(n,"")),s.push(i),a.push(r),l.push(o),u.push(i),u.push(r),u.push(o);s.sort(t),a.sort(t),l.sort(t),u.sort(t),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Zt(){return this.hours()%12||12}function Qt(t,e){L(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function te(t,e){return e._meridiemParse}L("H",["HH",2],0,"hour"),L("h",["hh",2],0,Zt),L("k",["kk",2],0,function(){return this.hours()||24}),L("hmm",0,0,function(){return""+Zt.apply(this)+O(this.minutes(),2)}),L("hmmss",0,0,function(){return""+Zt.apply(this)+O(this.minutes(),2)+O(this.seconds(),2)}),L("Hmm",0,0,function(){return""+this.hours()+O(this.minutes(),2)}),L("Hmmss",0,0,function(){return""+this.hours()+O(this.minutes(),2)+O(this.seconds(),2)}),Qt("a",!0),Qt("A",!1),B("hour","h"),W("hour",13),ht("a",te),ht("A",te),ht("H",et),ht("h",et),ht("k",et),ht("HH",et,J),ht("hh",et,J),ht("kk",et,J),ht("hmm",nt),ht("hmmss",it),ht("Hmm",nt),ht("Hmmss",it),mt(["H","HH"],xt),mt(["k","kk"],function(t,e,n){var i=q(t);e[xt]=24===i?0:i}),mt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),mt(["h","hh"],function(t,e,n){e[xt]=q(t),g(n).bigHour=!0}),mt("hmm",function(t,e,n){var i=t.length-2;e[xt]=q(t.substr(0,i)),e[kt]=q(t.substr(i)),g(n).bigHour=!0}),mt("hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[xt]=q(t.substr(0,i)),e[kt]=q(t.substr(i,2)),e[Ct]=q(t.substr(r)),g(n).bigHour=!0}),mt("Hmm",function(t,e,n){var i=t.length-2;e[xt]=q(t.substr(0,i)),e[kt]=q(t.substr(i))}),mt("Hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[xt]=q(t.substr(0,i)),e[kt]=q(t.substr(i,2)),e[Ct]=q(t.substr(r))});var ee=z("Hours",!0);var ne,ie={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ot,monthsShort:Mt,week:{dow:0,doy:6},weekdays:qt,weekdaysMin:Yt,weekdaysShort:zt,meridiemParse:/[ap]\.?m?\.?/i},re={},oe={};function se(t,e){var n,i=Math.min(t.length,e.length);for(n=0;n<i;n+=1)if(t[n]!==e[n])return n;return i}function ae(t){return t?t.toLowerCase().replace("_","-"):t}function le(e){var t=null;if(void 0===re[e]&&void 0!==ni&&ni&&ni.exports)try{t=ne._abbr,ei("./locale/"+e),ue(t)}catch(t){re[e]=null}return re[e]}function ue(t,e){var n;return t&&((n=o(e)?de(t):ce(t,e))?ne=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ne._abbr}function ce(t,e){if(null===e)return delete re[t],null;var n,i=ie;if(e.abbr=t,null!=re[t])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=re[t]._config;else if(null!=e.parentLocale)if(null!=re[e.parentLocale])i=re[e.parentLocale]._config;else{if(null==(n=le(e.parentLocale)))return oe[e.parentLocale]||(oe[e.parentLocale]=[]),oe[e.parentLocale].push({name:t,config:e}),null;i=n._config}return re[t]=new T(E(i,e)),oe[t]&&oe[t].forEach(function(t){ce(t.name,t.config)}),ue(t),re[t]}function de(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ne;if(!s(t)){if(e=le(t))return e;t=[t]}return function(t){for(var e,n,i,r,o=0;o<t.length;){for(e=(r=ae(t[o]).split("-")).length,n=(n=ae(t[o+1]))?n.split("-"):null;0<e;){if(i=le(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&se(r,n)>=e-1)break;e--}o++}return ne}(t)}function he(t){var e,n=t._a;return n&&-2===g(t).overflow&&(e=n[_t]<0||11<n[_t]?_t:n[wt]<1||n[wt]>Tt(n[bt],n[_t])?wt:n[xt]<0||24<n[xt]||24===n[xt]&&(0!==n[kt]||0!==n[Ct]||0!==n[St])?xt:n[kt]<0||59<n[kt]?kt:n[Ct]<0||59<n[Ct]?Ct:n[St]<0||999<n[St]?St:-1,g(t)._overflowDayOfYear&&(e<bt||wt<e)&&(e=wt),g(t)._overflowWeeks&&-1===e&&(e=Pt),g(t)._overflowWeekday&&-1===e&&(e=Et),g(t).overflow=e),t}var pe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ge=/Z|[+-]\d\d(?::?\d\d)?/,me=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ye=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ve=/^\/?Date\((-?\d+)/i,be=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,_e={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function we(t){var e,n,i,r,o,s,a=t._i,l=pe.exec(a)||fe.exec(a);if(l){for(g(t).iso=!0,e=0,n=me.length;e<n;e++)if(me[e][1].exec(l[1])){r=me[e][0],i=!1!==me[e][2];break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,n=ye.length;e<n;e++)if(ye[e][1].exec(l[3])){o=(l[2]||" ")+ye[e][0];break}if(null==o)return void(t._isValid=!1)}if(!i&&null!=o)return void(t._isValid=!1);if(l[4]){if(!ge.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=r+(o||"")+(s||""),Pe(t)}else t._isValid=!1}function xe(t,e,n,i,r,o){var s=[function(t){var e=parseInt(t,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(t),Mt.indexOf(e),parseInt(n,10),parseInt(i,10),parseInt(r,10)];return o&&s.push(parseInt(o,10)),s}function ke(t){var e,n=be.exec(function(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}(t._i));if(n){if(e=xe(n[4],n[3],n[2],n[5],n[6],n[7]),!function(t,e,n){return!t||zt.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1)}(n[1],e,t))return;t._a=e,t._tzm=function(t,e,n){if(t)return _e[t];if(e)return 0;var i=parseInt(n,10),r=i%100;return 60*((i-r)/100)+r}(n[8],n[9],n[10]),t._d=Rt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),g(t).rfc2822=!0}else t._isValid=!1}function Ce(t,e,n){return null!=t?t:null!=e?e:n}function Se(t){var e,n,i,r,o,s=[];if(!t._d){for(i=function(t){var e=new Date(p.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[wt]&&null==t._a[_t]&&function(t){var e,n,i,r,o,s,a,l,u;null!=(e=t._w).GG||null!=e.W||null!=e.E?(o=1,s=4,n=Ce(e.GG,t._a[bt],Wt(Oe(),1,4).year),i=Ce(e.W,1),((r=Ce(e.E,1))<1||7<r)&&(l=!0)):(o=t._locale._week.dow,s=t._locale._week.doy,u=Wt(Oe(),o,s),n=Ce(e.gg,t._a[bt],u.year),i=Ce(e.w,u.week),null!=e.d?((r=e.d)<0||6<r)&&(l=!0):null!=e.e?(r=e.e+o,(e.e<0||6<e.e)&&(l=!0)):r=o);i<1||i>Ht(n,o,s)?g(t)._overflowWeeks=!0:null!=l?g(t)._overflowWeekday=!0:(a=Vt(n,i,r,o,s),t._a[bt]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(o=Ce(t._a[bt],i[bt]),(t._dayOfYear>$t(o)||0===t._dayOfYear)&&(g(t)._overflowDayOfYear=!0),n=Rt(o,0,t._dayOfYear),t._a[_t]=n.getUTCMonth(),t._a[wt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[xt]&&0===t._a[kt]&&0===t._a[Ct]&&0===t._a[St]&&(t._nextDay=!0,t._a[xt]=0),t._d=(t._useUTC?Rt:function(t,e,n,i,r,o,s){var a;return t<100&&0<=t?(a=new Date(t+400,e,n,i,r,o,s),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,i,r,o,s),a}).apply(null,s),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[xt]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(g(t).weekdayMismatch=!0)}}function Pe(t){if(t._f!==p.ISO_8601)if(t._f!==p.RFC_2822){t._a=[],g(t).empty=!0;var e,n,i,r,o,s,a,l,u,c=""+t._i,d=c.length,h=0;for(i=I(t._f,t._locale).match(M)||[],e=0;e<i.length;e++)r=i[e],(n=(c.match(pt(r,t))||[])[0])&&(0<(o=c.substr(0,c.indexOf(n))).length&&g(t).unusedInput.push(o),c=c.slice(c.indexOf(n)+n.length),h+=n.length),F[r]?(n?g(t).empty=!1:g(t).unusedTokens.push(r),a=r,u=t,null!=(l=n)&&f(gt,a)&&gt[a](l,u._a,u,a)):t._strict&&!n&&g(t).unusedTokens.push(r);g(t).charsLeftOver=d-h,0<c.length&&g(t).unusedInput.push(c),t._a[xt]<=12&&!0===g(t).bigHour&&0<t._a[xt]&&(g(t).bigHour=void 0),g(t).parsedDateParts=t._a.slice(0),g(t).meridiem=t._meridiem,t._a[xt]=function(t,e,n){var i;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0)),e)}(t._locale,t._a[xt],t._meridiem),null!==(s=g(t).era)&&(t._a[bt]=t._locale.erasConvertYear(s,t._a[bt])),Se(t),he(t)}else ke(t);else we(t)}function Ee(t){var e=t._i,n=t._f;return t._locale=t._locale||de(t._l),null===e||void 0===n&&""===e?y({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),w(e)?new _(he(e)):(c(e)?t._d=e:s(n)?function(t){var e,n,i,r,o,s,a=!1;if(0===t._f.length)return g(t).invalidFormat=!0,t._d=new Date(NaN);for(r=0;r<t._f.length;r++)o=0,s=!1,e=b({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],Pe(e),m(e)&&(s=!0),o+=g(e).charsLeftOver,o+=10*g(e).unusedTokens.length,g(e).score=o,a?o<i&&(i=o,n=e):(null==i||o<i||s)&&(i=o,n=e,s&&(a=!0));d(t,n||e)}(t):n?Pe(t):function(t){var e=t._i;o(e)?t._d=new Date(p.now()):c(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=ve.exec(t._i);null===e?(we(t),!1===t._isValid&&(delete t._isValid,ke(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:p.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):s(e)?(t._a=i(e.slice(0),function(t){return parseInt(t,10)}),Se(t)):a(e)?function(t){if(!t._d){var e=N(t._i),n=void 0===e.day?e.date:e.day;t._a=i([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),Se(t)}}(t):u(e)?t._d=new Date(e):p.createFromInputFallback(t)}(t),m(t)||(t._d=null),t))}function Te(t,e,n,i,r){var o={};return!0!==e&&!1!==e||(i=e,e=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(a(t)&&l(t)||s(t)&&0===t.length)&&(t=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=r,o._l=n,o._i=t,o._f=e,o._strict=i,function(t){var e=new _(he(Ee(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}(o)}function Oe(t,e,n,i){return Te(t,e,n,i,!1)}p.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),p.ISO_8601=function(){},p.RFC_2822=function(){};var Me=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Oe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()}),je=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Oe.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()});function De(t,e){var n,i;if(1===e.length&&s(e[0])&&(e=e[0]),!e.length)return Oe();for(n=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](n)||(n=e[i]);return n}var Fe=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Le(t){var e=N(t),n=e.year||0,i=e.quarter||0,r=e.month||0,o=e.week||e.isoWeek||0,s=e.day||0,a=e.hour||0,l=e.minute||0,u=e.second||0,c=e.millisecond||0;this._isValid=function(t){var e,n,i=!1;for(e in t)if(f(t,e)&&(-1===vt.call(Fe,e)||null!=t[e]&&isNaN(t[e])))return!1;for(n=0;n<Fe.length;++n)if(t[Fe[n]]){if(i)return!1;parseFloat(t[Fe[n]])!==q(t[Fe[n]])&&(i=!0)}return!0}(e),this._milliseconds=+c+1e3*u+6e4*l+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*i+12*n,this._data={},this._locale=de(),this._bubble()}function Ae(t){return t instanceof Le}function Ie(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function $e(t,n){L(t,0,0,function(){var t=this.utcOffset(),e="+";return t<0&&(t=-t,e="-"),e+O(~~(t/60),2)+n+O(~~t%60,2)})}$e("Z",":"),$e("ZZ",""),ht("Z",ct),ht("ZZ",ct),mt(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Re(ct,t)});var Be=/([\+\-]|\d\d)/gi;function Re(t,e){var n,i,r=(e||"").match(t);return null===r?null:0===(i=60*(n=((r[r.length-1]||[])+"").match(Be)||["-",0,0])[1]+q(n[2]))?0:"+"===n[0]?i:-i}function Ne(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(w(t)||c(t)?t.valueOf():Oe(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),p.updateOffset(n,!1),n):Oe(t).local()}function Ve(t){return-Math.round(t._d.getTimezoneOffset())}function We(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}p.updateOffset=function(){};var He=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ue=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function qe(t,e){var n,i,r,o=t,s=null;return Ae(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:u(t)||!isNaN(+t)?(o={},e?o[e]=+t:o.milliseconds=+t):(s=He.exec(t))?(n="-"===s[1]?-1:1,o={y:0,d:q(s[wt])*n,h:q(s[xt])*n,m:q(s[kt])*n,s:q(s[Ct])*n,ms:q(Ie(1e3*s[St]))*n}):(s=Ue.exec(t))?(n="-"===s[1]?-1:1,o={y:ze(s[2],n),M:ze(s[3],n),w:ze(s[4],n),d:ze(s[5],n),h:ze(s[6],n),m:ze(s[7],n),s:ze(s[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=function(t,e){var n;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=Ne(e,t),t.isBefore(e)?n=Ye(t,e):((n=Ye(e,t)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Oe(o.from),Oe(o.to)),(o={}).ms=r.milliseconds,o.M=r.months),i=new Le(o),Ae(t)&&f(t,"_locale")&&(i._locale=t._locale),Ae(t)&&f(t,"_isValid")&&(i._isValid=t._isValid),i}function ze(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ye(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=e-t.clone().add(n.months,"M"),n}function Ge(i,r){return function(t,e){var n;return null===e||isNaN(+e)||(S(r,"moment()."+r+"(period, number) is deprecated. Please use moment()."+r+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=t,t=e,e=n),Ke(this,qe(t,e),i),this}}function Ke(t,e,n,i){var r=e._milliseconds,o=Ie(e._days),s=Ie(e._months);t.isValid()&&(i=null==i||i,s&&Lt(t,Y(t,"Month")+s*n),o&&G(t,"Date",Y(t,"Date")+o*n),r&&t._d.setTime(t._d.valueOf()+r*n),i&&p.updateOffset(t,o||s))}qe.fn=Le.prototype,qe.invalid=function(){return qe(NaN)};var Xe=Ge(1,"add"),Je=Ge(-1,"subtract");function Ze(t){return"string"==typeof t||t instanceof String}function Qe(t){return w(t)||c(t)||Ze(t)||u(t)||function(e){var t=s(e),n=!1;t&&(n=0===e.filter(function(t){return!u(t)&&Ze(e)}).length);return t&&n}(t)||function(t){var e,n,i=a(t)&&!l(t),r=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(e=0;e<o.length;e+=1)n=o[e],r=r||f(t,n);return i&&r}(t)||null==t}function tn(t,e){if(t.date()<e.date())return-tn(e,t);var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,"months");return-(n+(e-i<0?(e-i)/(i-t.clone().add(n-1,"months")):(e-i)/(t.clone().add(1+n,"months")-i)))||0}function en(t){var e;return void 0===t?this._locale._abbr:(null!=(e=de(t))&&(this._locale=e),this)}p.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",p.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function rn(){return this._locale}var on=126227808e5;function sn(t,e){return(t%e+e)%e}function an(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-on:new Date(t,e,n).valueOf()}function ln(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-on:Date.UTC(t,e,n)}function un(t,e){return e.erasAbbrRegex(t)}function cn(){var t,e,n=[],i=[],r=[],o=[],s=this.eras();for(t=0,e=s.length;t<e;++t)i.push(ft(s[t].name)),n.push(ft(s[t].abbr)),r.push(ft(s[t].narrow)),o.push(ft(s[t].name)),o.push(ft(s[t].abbr)),o.push(ft(s[t].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function dn(t,e){L(0,[t,t.length],0,e)}function hn(t,e,n,i,r){var o;return null==t?Wt(this,i,r).year:((o=Ht(t,i,r))<e&&(e=o),function(t,e,n,i,r){var o=Vt(t,e,n,i,r),s=Rt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}.call(this,t,e,n,i,r))}L("N",0,0,"eraAbbr"),L("NN",0,0,"eraAbbr"),L("NNN",0,0,"eraAbbr"),L("NNNN",0,0,"eraName"),L("NNNNN",0,0,"eraNarrow"),L("y",["y",1],"yo","eraYear"),L("y",["yy",2],0,"eraYear"),L("y",["yyy",3],0,"eraYear"),L("y",["yyyy",4],0,"eraYear"),ht("N",un),ht("NN",un),ht("NNN",un),ht("NNNN",function(t,e){return e.erasNameRegex(t)}),ht("NNNNN",function(t,e){return e.erasNarrowRegex(t)}),mt(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,i){var r=n._locale.erasParse(t,i,n._strict);r?g(n).era=r:g(n).invalidEra=t}),ht("y",at),ht("yy",at),ht("yyy",at),ht("yyyy",at),ht("yo",function(t,e){return e._eraYearOrdinalRegex||at}),mt(["y","yy","yyy","yyyy"],bt),mt(["yo"],function(t,e,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[bt]=n._locale.eraYearOrdinalParse(t,r):e[bt]=parseInt(t,10)}),L(0,["gg",2],0,function(){return this.weekYear()%100}),L(0,["GG",2],0,function(){return this.isoWeekYear()%100}),dn("gggg","weekYear"),dn("ggggg","weekYear"),dn("GGGG","isoWeekYear"),dn("GGGGG","isoWeekYear"),B("weekYear","gg"),B("isoWeekYear","GG"),W("weekYear",1),W("isoWeekYear",1),ht("G",lt),ht("g",lt),ht("GG",et,J),ht("gg",et,J),ht("GGGG",ot,Q),ht("gggg",ot,Q),ht("GGGGG",st,tt),ht("ggggg",st,tt),yt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=q(t)}),yt(["gg","GG"],function(t,e,n,i){e[i]=p.parseTwoDigitYear(t)}),L("Q",0,"Qo","quarter"),B("quarter","Q"),W("quarter",7),ht("Q",X),mt("Q",function(t,e){e[_t]=3*(q(t)-1)}),L("D",["DD",2],"Do","date"),B("date","D"),W("date",9),ht("D",et),ht("DD",et,J),ht("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),mt(["D","DD"],wt),mt("Do",function(t,e){e[wt]=q(t.match(et)[0])});var pn=z("Date",!0);L("DDD",["DDDD",3],"DDDo","dayOfYear"),B("dayOfYear","DDD"),W("dayOfYear",4),ht("DDD",rt),ht("DDDD",Z),mt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=q(t)}),L("m",["mm",2],0,"minute"),B("minute","m"),W("minute",14),ht("m",et),ht("mm",et,J),mt(["m","mm"],kt);var fn=z("Minutes",!1);L("s",["ss",2],0,"second"),B("second","s"),W("second",15),ht("s",et),ht("ss",et,J),mt(["s","ss"],Ct);var gn,mn,yn=z("Seconds",!1);for(L("S",0,0,function(){return~~(this.millisecond()/100)}),L(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),L(0,["SSS",3],0,"millisecond"),L(0,["SSSS",4],0,function(){return 10*this.millisecond()}),L(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),L(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),L(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),L(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),L(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),B("millisecond","ms"),W("millisecond",16),ht("S",rt,X),ht("SS",rt,J),ht("SSS",rt,Z),gn="SSSS";gn.length<=9;gn+="S")ht(gn,at);function vn(t,e){e[St]=q(1e3*("0."+t))}for(gn="S";gn.length<=9;gn+="S")mt(gn,vn);mn=z("Milliseconds",!1),L("z",0,0,"zoneAbbr"),L("zz",0,0,"zoneName");var bn=_.prototype;function _n(t){return t}bn.add=Xe,bn.calendar=function(t,e){1===arguments.length&&(arguments[0]?Qe(arguments[0])?(t=arguments[0],e=void 0):function(t){var e,n=a(t)&&!l(t),i=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<r.length;e+=1)i=i||f(t,r[e]);return n&&i}(arguments[0])&&(e=arguments[0],t=void 0):e=t=void 0);var n=t||Oe(),i=Ne(n,this).startOf("day"),r=p.calendarFormat(this,i)||"sameElse",o=e&&(P(e[r])?e[r].call(this,n):e[r]);return this.format(o||this.localeData().calendar(r,this,Oe(n)))},bn.clone=function(){return new _(this)},bn.diff=function(t,e,n){var i,r,o;if(!this.isValid())return NaN;if(!(i=Ne(t,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),e=R(e)){case"year":o=tn(this,i)/12;break;case"month":o=tn(this,i);break;case"quarter":o=tn(this,i)/3;break;case"second":o=(this-i)/1e3;break;case"minute":o=(this-i)/6e4;break;case"hour":o=(this-i)/36e5;break;case"day":o=(this-i-r)/864e5;break;case"week":o=(this-i-r)/6048e5;break;default:o=this-i}return n?o:U(o)},bn.endOf=function(t){var e,n;if(void 0===(t=R(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?ln:an,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-sn(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-sn(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-sn(e,1e3)-1}return this._d.setTime(e),p.updateOffset(this,!0),this},bn.format=function(t){t=t||(this.isUtc()?p.defaultFormatUtc:p.defaultFormat);var e=A(this,t);return this.localeData().postformat(e)},bn.from=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Oe(t).isValid())?qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},bn.fromNow=function(t){return this.from(Oe(),t)},bn.to=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Oe(t).isValid())?qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},bn.toNow=function(t){return this.to(Oe(),t)},bn.get=function(t){return P(this[t=R(t)])?this[t]():this},bn.invalidAt=function(){return g(this).overflow},bn.isAfter=function(t,e){var n=w(t)?t:Oe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=R(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},bn.isBefore=function(t,e){var n=w(t)?t:Oe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=R(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},bn.isBetween=function(t,e,n,i){var r=w(t)?t:Oe(t),o=w(e)?e:Oe(e);return!!(this.isValid()&&r.isValid()&&o.isValid())&&(("("===(i=i||"()")[0]?this.isAfter(r,n):!this.isBefore(r,n))&&(")"===i[1]?this.isBefore(o,n):!this.isAfter(o,n)))},bn.isSame=function(t,e){var n,i=w(t)?t:Oe(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=R(e)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},bn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},bn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},bn.isValid=function(){return m(this)},bn.lang=nn,bn.locale=en,bn.localeData=rn,bn.max=je,bn.min=Me,bn.parsingFlags=function(){return d({},g(this))},bn.set=function(t,e){if("object"==typeof t){var n,i=function(t){var e,n=[];for(e in t)f(t,e)&&n.push({unit:e,priority:V[e]});return n.sort(function(t,e){return t.priority-e.priority}),n}(t=N(t));for(n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit])}else if(P(this[t=R(t)]))return this[t](e);return this},bn.startOf=function(t){var e,n;if(void 0===(t=R(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?ln:an,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=sn(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=sn(e,6e4);break;case"second":e=this._d.valueOf(),e-=sn(e,1e3)}return this._d.setTime(e),p.updateOffset(this,!0),this},bn.subtract=Je,bn.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},bn.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},bn.toDate=function(){return new Date(this.valueOf())},bn.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):P(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(n,"Z")):A(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},bn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,n,i="moment",r="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),t="["+i+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",n=r+'[")]',this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(bn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),bn.toJSON=function(){return this.isValid()?this.toISOString():null},bn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},bn.unix=function(){return Math.floor(this.valueOf()/1e3)},bn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},bn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},bn.eraName=function(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until)return i[t].name;if(i[t].until<=n&&n<=i[t].since)return i[t].name}return""},bn.eraNarrow=function(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until)return i[t].narrow;if(i[t].until<=n&&n<=i[t].since)return i[t].narrow}return""},bn.eraAbbr=function(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until)return i[t].abbr;if(i[t].until<=n&&n<=i[t].since)return i[t].abbr}return""},bn.eraYear=function(){var t,e,n,i,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=r[t].since<=r[t].until?1:-1,i=this.clone().startOf("day").valueOf(),r[t].since<=i&&i<=r[t].until||r[t].until<=i&&i<=r[t].since)return(this.year()-p(r[t].since).year())*n+r[t].offset;return this.year()},bn.year=Bt,bn.isLeapYear=function(){return H(this.year())},bn.weekYear=function(t){return hn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},bn.isoWeekYear=function(t){return hn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},bn.quarter=bn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},bn.month=At,bn.daysInMonth=function(){return Tt(this.year(),this.month())},bn.week=bn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},bn.isoWeek=bn.isoWeeks=function(t){var e=Wt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},bn.weeksInYear=function(){var t=this.localeData()._week;return Ht(this.year(),t.dow,t.doy)},bn.weeksInWeekYear=function(){var t=this.localeData()._week;return Ht(this.weekYear(),t.dow,t.doy)},bn.isoWeeksInYear=function(){return Ht(this.year(),1,4)},bn.isoWeeksInISOWeekYear=function(){return Ht(this.isoWeekYear(),1,4)},bn.date=pn,bn.day=bn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},bn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},bn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)},bn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},bn.hour=bn.hours=ee,bn.minute=bn.minutes=fn,bn.second=bn.seconds=yn,bn.millisecond=bn.milliseconds=mn,bn.utcOffset=function(t,e,n){var i,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?r:Ve(this);if("string"==typeof t){if(null===(t=Re(ct,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(i=Ve(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?Ke(this,qe(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,p.updateOffset(this,!0),this._changeInProgress=null)),this},bn.utc=function(t){return this.utcOffset(0,t)},bn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ve(this),"m")),this},bn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Re(ut,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},bn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Oe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},bn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},bn.isLocal=function(){return!!this.isValid()&&!this._isUTC},bn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},bn.isUtc=We,bn.isUTC=We,bn.zoneAbbr=function(){return this._isUTC?"UTC":""},bn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},bn.dates=n("dates accessor is deprecated. Use date instead.",pn),bn.months=n("months accessor is deprecated. Use month instead",At),bn.years=n("years accessor is deprecated. Use year instead",Bt),bn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),bn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t,e={};return b(e,this),(e=Ee(e))._a?(t=e._isUTC?h(e._a):Oe(e._a),this._isDSTShifted=this.isValid()&&0<function(t,e,n){var i,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(i=0;i<r;i++)(n&&t[i]!==e[i]||!n&&q(t[i])!==q(e[i]))&&s++;return s+o}(e._a,t.toArray())):this._isDSTShifted=!1,this._isDSTShifted});var wn=T.prototype;function xn(t,e,n,i){var r=de(),o=h().set(i,e);return r[n](o,t)}function kn(t,e,n){if(u(t)&&(e=t,t=void 0),t=t||"",null!=e)return xn(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=xn(t,i,n,"month");return r}function Cn(t,e,n,i){e=("boolean"==typeof t?u(e)&&(n=e,e=void 0):(e=t,t=!1,u(n=e)&&(n=e,e=void 0)),e||"");var r,o=de(),s=t?o._week.dow:0,a=[];if(null!=n)return xn(e,(n+s)%7,i,"day");for(r=0;r<7;r++)a[r]=xn(e,(r+s)%7,i,"day");return a}wn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return P(i)?i.call(e,n):i},wn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(M).map(function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t}).join(""),this._longDateFormat[t])},wn.invalidDate=function(){return this._invalidDate},wn.ordinal=function(t){return this._ordinal.replace("%d",t)},wn.preparse=_n,wn.postformat=_n,wn.relativeTime=function(t,e,n,i){var r=this._relativeTime[n];return P(r)?r(t,e,n,i):r.replace(/%d/i,t)},wn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return P(n)?n(e):n.replace(/%s/i,e)},wn.set=function(t){var e,n;for(n in t)f(t,n)&&(P(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},wn.eras=function(t,e){var n,i,r,o=this._eras||de("en")._eras;for(n=0,i=o.length;n<i;++n){switch(typeof o[n].since){case"string":r=p(o[n].since).startOf("day"),o[n].since=r.valueOf()}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":r=p(o[n].until).startOf("day").valueOf(),o[n].until=r.valueOf()}}return o},wn.erasParse=function(t,e,n){var i,r,o,s,a,l=this.eras();for(t=t.toUpperCase(),i=0,r=l.length;i<r;++i)if(o=l[i].name.toUpperCase(),s=l[i].abbr.toUpperCase(),a=l[i].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(s===t)return l[i];break;case"NNNN":if(o===t)return l[i];break;case"NNNNN":if(a===t)return l[i]}else if(0<=[o,s,a].indexOf(t))return l[i]},wn.erasConvertYear=function(t,e){var n=t.since<=t.until?1:-1;return void 0===e?p(t.since).year():p(t.since).year()+(e-t.offset)*n},wn.erasAbbrRegex=function(t){return f(this,"_erasAbbrRegex")||cn.call(this),t?this._erasAbbrRegex:this._erasRegex},wn.erasNameRegex=function(t){return f(this,"_erasNameRegex")||cn.call(this),t?this._erasNameRegex:this._erasRegex},wn.erasNarrowRegex=function(t){return f(this,"_erasNarrowRegex")||cn.call(this),t?this._erasNarrowRegex:this._erasRegex},wn.months=function(t,e){return t?s(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||jt).test(e)?"format":"standalone"][t.month()]:s(this._months)?this._months:this._months.standalone},wn.monthsShort=function(t,e){return t?s(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[jt.test(e)?"format":"standalone"][t.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},wn.monthsParse=function(t,e,n){var i,r,o;if(this._monthsParseExact)return function(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)o=h([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(r=vt.call(this._shortMonthsParse,s))?r:null:-1!==(r=vt.call(this._longMonthsParse,s))?r:null:"MMM"===e?-1!==(r=vt.call(this._shortMonthsParse,s))?r:-1!==(r=vt.call(this._longMonthsParse,s))?r:null:-1!==(r=vt.call(this._longMonthsParse,s))?r:-1!==(r=vt.call(this._shortMonthsParse,s))?r:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=h([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},wn.monthsRegex=function(t){return this._monthsParseExact?(f(this,"_monthsRegex")||It.call(this),t?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Ft),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},wn.monthsShortRegex=function(t){return this._monthsParseExact?(f(this,"_monthsRegex")||It.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Dt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},wn.week=function(t){return Wt(t,this._week.dow,this._week.doy).week},wn.firstDayOfYear=function(){return this._week.doy},wn.firstDayOfWeek=function(){return this._week.dow},wn.weekdays=function(t,e){var n=s(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ut(n,this._week.dow):t?n[t.day()]:n},wn.weekdaysMin=function(t){return!0===t?Ut(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},wn.weekdaysShort=function(t){return!0===t?Ut(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},wn.weekdaysParse=function(t,e,n){var i,r,o;if(this._weekdaysParseExact)return function(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=h([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(r=vt.call(this._weekdaysParse,s))?r:null:"ddd"===e?-1!==(r=vt.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=vt.call(this._minWeekdaysParse,s))?r:null:"dddd"===e?-1!==(r=vt.call(this._weekdaysParse,s))?r:-1!==(r=vt.call(this._shortWeekdaysParse,s))?r:-1!==(r=vt.call(this._minWeekdaysParse,s))?r:null:"ddd"===e?-1!==(r=vt.call(this._shortWeekdaysParse,s))?r:-1!==(r=vt.call(this._weekdaysParse,s))?r:-1!==(r=vt.call(this._minWeekdaysParse,s))?r:null:-1!==(r=vt.call(this._minWeekdaysParse,s))?r:-1!==(r=vt.call(this._weekdaysParse,s))?r:-1!==(r=vt.call(this._shortWeekdaysParse,s))?r:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=h([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},wn.weekdaysRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Gt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},wn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Kt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},wn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},wn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},wn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ue("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===q(t%100/10)?"th":1==e?"st":2==e?"nd":3==e?"rd":"th")}}),p.lang=n("moment.lang is deprecated. Use moment.locale instead.",ue),p.langData=n("moment.langData is deprecated. Use moment.localeData instead.",de);var Sn=Math.abs;function Pn(t,e,n,i){var r=qe(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function En(t){return t<0?Math.floor(t):Math.ceil(t)}function Tn(t){return 4800*t/146097}function On(t){return 146097*t/4800}function Mn(t){return function(){return this.as(t)}}var jn=Mn("ms"),Dn=Mn("s"),Fn=Mn("m"),Ln=Mn("h"),An=Mn("d"),In=Mn("w"),$n=Mn("M"),Bn=Mn("Q"),Rn=Mn("y");function Nn(t){return function(){return this.isValid()?this._data[t]:NaN}}var Vn=Nn("milliseconds"),Wn=Nn("seconds"),Hn=Nn("minutes"),Un=Nn("hours"),qn=Nn("days"),zn=Nn("months"),Yn=Nn("years");var Gn=Math.round,Kn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xn(t,e,n,i){var r=qe(t).abs(),o=Gn(r.as("s")),s=Gn(r.as("m")),a=Gn(r.as("h")),l=Gn(r.as("d")),u=Gn(r.as("M")),c=Gn(r.as("w")),d=Gn(r.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),(h=h||u<=1&&["M"]||u<n.M&&["MM",u]||d<=1&&["y"]||["yy",d])[2]=e,h[3]=0<+t,h[4]=i,function(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}.apply(null,h)}var Jn=Math.abs;function Zn(t){return(0<t)-(t<0)||+t}function Qn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,i,r,o,s,a,l=Jn(this._milliseconds)/1e3,u=Jn(this._days),c=Jn(this._months),d=this.asSeconds();return d?(t=U(l/60),e=U(t/60),l%=60,t%=60,n=U(c/12),c%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=d<0?"-":"",o=Zn(this._months)!==Zn(d)?"-":"",s=Zn(this._days)!==Zn(d)?"-":"",a=Zn(this._milliseconds)!==Zn(d)?"-":"",r+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?s+u+"D":"")+(e||t||l?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(l?a+i+"S":"")):"P0D"}var ti=Le.prototype;return ti.isValid=function(){return this._isValid},ti.abs=function(){var t=this._data;return this._milliseconds=Sn(this._milliseconds),this._days=Sn(this._days),this._months=Sn(this._months),t.milliseconds=Sn(t.milliseconds),t.seconds=Sn(t.seconds),t.minutes=Sn(t.minutes),t.hours=Sn(t.hours),t.months=Sn(t.months),t.years=Sn(t.years),this},ti.add=function(t,e){return Pn(this,t,e,1)},ti.subtract=function(t,e){return Pn(this,t,e,-1)},ti.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=R(t))||"quarter"===t||"year"===t)switch(e=this._days+i/864e5,n=this._months+Tn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(On(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},ti.asMilliseconds=jn,ti.asSeconds=Dn,ti.asMinutes=Fn,ti.asHours=Ln,ti.asDays=An,ti.asWeeks=In,ti.asMonths=$n,ti.asQuarters=Bn,ti.asYears=Rn,ti.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12):NaN},ti._bubble=function(){var t,e,n,i,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return 0<=o&&0<=s&&0<=a||o<=0&&s<=0&&a<=0||(o+=864e5*En(On(a)+s),a=s=0),l.milliseconds=o%1e3,t=U(o/1e3),l.seconds=t%60,e=U(t/60),l.minutes=e%60,n=U(e/60),l.hours=n%24,s+=U(n/24),a+=r=U(Tn(s)),s-=En(On(r)),i=U(a/12),a%=12,l.days=s,l.months=a,l.years=i,this},ti.clone=function(){return qe(this)},ti.get=function(t){return t=R(t),this.isValid()?this[t+"s"]():NaN},ti.milliseconds=Vn,ti.seconds=Wn,ti.minutes=Hn,ti.hours=Un,ti.days=qn,ti.weeks=function(){return U(this.days()/7)},ti.months=zn,ti.years=Yn,ti.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,i,r=!1,o=Kn;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(r=t),"object"==typeof e&&(o=Object.assign({},Kn,e),null!=e.s&&null==e.ss&&(o.ss=e.s-1)),n=this.localeData(),i=Xn(this,!r,o,n),r&&(i=n.pastFuture(+this,i)),n.postformat(i)},ti.toISOString=Qn,ti.toString=Qn,ti.toJSON=Qn,ti.locale=en,ti.localeData=rn,ti.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qn),ti.lang=nn,L("X",0,0,"unix"),L("x",0,0,"valueOf"),ht("x",lt),ht("X",/[+-]?\d+(\.\d{1,3})?/),mt("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t))}),mt("x",function(t,e,n){n._d=new Date(q(t))}),p.version="2.29.1",t=Oe,p.fn=bn,p.min=function(){return De("isBefore",[].slice.call(arguments,0))},p.max=function(){return De("isAfter",[].slice.call(arguments,0))},p.now=function(){return Date.now?Date.now():+new Date},p.utc=h,p.unix=function(t){return Oe(1e3*t)},p.months=function(t,e){return kn(t,e,"months")},p.isDate=c,p.locale=ue,p.invalid=y,p.duration=qe,p.isMoment=w,p.weekdays=function(t,e,n){return Cn(t,e,n,"weekdays")},p.parseZone=function(){return Oe.apply(null,arguments).parseZone()},p.localeData=de,p.isDuration=Ae,p.monthsShort=function(t,e){return kn(t,e,"monthsShort")},p.weekdaysMin=function(t,e,n){return Cn(t,e,n,"weekdaysMin")},p.defineLocale=ce,p.updateLocale=function(t,e){if(null!=e){var n,i,r=ie;null!=re[t]&&null!=re[t].parentLocale?re[t].set(E(re[t]._config,e)):(null!=(i=le(t))&&(r=i._config),e=E(r,e),null==i&&(e.abbr=t),(n=new T(e)).parentLocale=re[t],re[t]=n),ue(t)}else null!=re[t]&&(null!=re[t].parentLocale?(re[t]=re[t].parentLocale,t===ue()&&ue(t)):null!=re[t]&&delete re[t]);return re[t]},p.locales=function(){return k(re)},p.weekdaysShort=function(t,e,n){return Cn(t,e,n,"weekdaysShort")},p.normalizeUnits=R,p.relativeTimeRounding=function(t){return void 0===t?Gn:"function"==typeof t&&(Gn=t,!0)},p.relativeTimeThreshold=function(t,e){return void 0!==Kn[t]&&(void 0===e?Kn[t]:(Kn[t]=e,"s"===t&&(Kn.ss=e-1),!0))},p.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},p.prototype=bn,p.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},p},"object"==typeof t&&void 0!==ni?ni.exports=n():"function"==typeof define&&define.amd?define(n):e.moment=n()},{}],98:[function(t,e,n){window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(t,e){e=e||window;for(var n=0;n<this.length;n++)t.call(e,this[n],n,this)})},{}],99:[function(t,e,n){var i,r;i=this,r=function(){"use strict";"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(t){return this._invoke("next",t)},t.prototype.throw=function(t){return this._invoke("throw",t)},t.prototype.return=function(t){return this._invoke("return",t)};function u(t){this.value=t}function t(r){var o,s;function a(t,e){try{var n=r[t](e),i=n.value;i instanceof u?Promise.resolve(i.value).then(function(t){a("next",t)},function(t){a("throw",t)}):l(n.done?"return":"normal",n.value)}catch(t){l("throw",t)}}function l(t,e){switch(t){case"return":o.resolve({value:e,done:!0});break;case"throw":o.reject(e);break;default:o.resolve({value:e,done:!1})}(o=o.next)?a(o.key,o.arg):s=null}this._invoke=function(i,r){return new Promise(function(t,e){var n={key:i,arg:r,resolve:t,reject:e,next:null};s?s=s.next=n:(o=s=n,a(i,r))})},"function"!=typeof r.return&&(this.return=void 0)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var e=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t};function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},a=(e(l,[{key:"setStrokeProps",value:function(){this._context.strokeStyle=this._patternColor,this._context.lineWidth=this._size/10,this._context.lineJoin="round",this._context.lineCap="round"}},{key:"setFillProps",value:function(){this._context.fillStyle=this._patternColor}}]),l);function l(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:20,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"rgba(100, 100, 100, 0.7)",n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"rgba(255, 255, 255, 0.8)";return i(this,l),this._canvas=document.createElement("canvas"),this._context=this._canvas.getContext("2d"),this._canvas.width=t,this._canvas.height=t,this._context.fillStyle=e,this._context.fillRect(0,0,this._canvas.width,this._canvas.height),this._size=t,this._patternColor=n,this}var c=(n(d,a),e(d,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setStrokeProps(),this.drawPlus(),this.drawPlus(t,t),this._context.stroke(),this._canvas}},{key:"drawPlus",value:function(t,e){var n=0<arguments.length&&void 0!==t?t:0,i=1<arguments.length&&void 0!==e?e:0,r=this._size,o=r/2,s=r/4;this._context.moveTo(s+n,0+i),this._context.lineTo(s+n,o+i),this._context.moveTo(0+n,s+i),this._context.lineTo(o+n,s+i),this._context.closePath()}}]),d);function d(){return i(this,d),o(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}var h=(n(p,a),e(p,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setStrokeProps(),this.drawCross(),this.drawCross(t,t),this._context.stroke(),this._canvas}},{key:"drawCross",value:function(t,e){var n=0<arguments.length&&void 0!==t?t:0,i=1<arguments.length&&void 0!==e?e:0,r=this._size/2;this._context.moveTo(n+2,i+2),this._context.lineTo(r-2+n,r-2+i),this._context.moveTo(n+2,r-2+i),this._context.lineTo(r-2+n,i+2),this._context.closePath()}}]),p);function p(){return i(this,p),o(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}var f=(n(g,a),e(g,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setStrokeProps(),this.drawDash(),this.drawDash(t,t),this._context.stroke(),this._canvas}},{key:"drawDash",value:function(t,e){var n=0<arguments.length&&void 0!==t?t:0,i=1<arguments.length&&void 0!==e?e:0,r=this._size/2;this._context.moveTo(n+2,i+2),this._context.lineTo(r-2+n,r-2+i),this._context.closePath()}}]),g);function g(){return i(this,g),o(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}var m=(n(y,a),e(y,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setStrokeProps(),(new h).drawCross.call(this),(new f).drawDash.call(this,t,t),this._context.stroke(),this._canvas}}]),y);function y(){return i(this,y),o(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}var v=(n(b,a),e(b,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setFillProps(),this.drawDot(),this.drawDot(t,t),this._context.fill(),this._canvas}},{key:"drawDot",value:function(t,e,n){var i=0<arguments.length&&void 0!==t?t:0,r=1<arguments.length&&void 0!==e?e:0,o=2<arguments.length&&void 0!==n?n:this._size/10,s=this._size/4,a=s+i,l=s+r;this._context.moveTo(a+s,l),this._context.arc(a,l,o,0,2*Math.PI),this._context.closePath()}}]),b);function b(){return i(this,b),o(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}var _=(n(w,a),e(w,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setStrokeProps(),(new f).drawDash.call(this,t,t),this._context.closePath(),this._context.stroke(),this.setFillProps(),(new v).drawDot.call(this),this._context.fill(),this._canvas}}]),w);function w(){return i(this,w),o(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}var x=(n(k,v),e(k,[{key:"drawTile",value:function(){var t=this._size/2,e=this._size/5;return this._context.beginPath(),this.setFillProps(),this.drawDot(0,0,e),this.drawDot(t,t,e),this._context.fill(),this._canvas}}]),k);function k(){return i(this,k),o(this,(k.__proto__||Object.getPrototypeOf(k)).apply(this,arguments))}var C=(n(S,v),e(S,[{key:"drawTile",value:function(){var t=this._size/2,e=this._size/5;return this._context.beginPath(),this.setStrokeProps(),this.drawDot(0,0,e),this.drawDot(t,t,e),this._context.stroke(),this._canvas}}]),S);function S(){return i(this,S),o(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}var P=(n(E,a),e(E,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setStrokeProps(),this.drawLine(),this.drawLine(t,t),this._context.stroke(),this._canvas}},{key:"drawLine",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:0,i=this._size/4;this._context.moveTo(0,i+n),this._context.lineTo(this._size,i+n),this._context.closePath()}}]),E);function E(){return i(this,E),o(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}var T=(n(O,P),e(O,[{key:"drawTile",value:function(){return this._context.translate(this._size,0),this._context.rotate(90*Math.PI/180),P.prototype.drawTile.call(this),this._canvas}}]),O);function O(){return i(this,O),o(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}var M=(n(j,a),e(j,[{key:"drawTile",value:function(){return this._context.beginPath(),this.setStrokeProps(),this.drawWeave(0,0),this._context.stroke(),this._canvas}},{key:"drawWeave",value:function(t,e){var n=this._size,i=n/2;this._context.moveTo(t+1,e+1),this._context.lineTo(i-1,i-1),this._context.moveTo(1+i,n-1),this._context.lineTo(n-1,1+i),this._context.closePath()}}]),j);function j(){return i(this,j),o(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}var D=(n(F,a),e(F,[{key:"drawTile",value:function(){return this._context.beginPath(),this.setStrokeProps(),this.drawZigzag(),this.drawZigzag(this._size/2),this._context.stroke(),this._canvas}},{key:"drawZigzag",value:function(t){var e=0<arguments.length&&void 0!==t?t:0,n=this._size,i=n/4,r=n/2,o=n/10;this._context.moveTo(0,o+e),this._context.lineTo(i,r-o+e),this._context.lineTo(r,o+e),this._context.lineTo(n-i,r-o+e),this._context.lineTo(n,o+e)}}]),F);function F(){return i(this,F),o(this,(F.__proto__||Object.getPrototypeOf(F)).apply(this,arguments))}var L=(n(A,D),e(A,[{key:"drawTile",value:function(){return this._context.translate(this._size,0),this._context.rotate(90*Math.PI/180),D.prototype.drawTile.call(this),this._canvas}}]),A);function A(){return i(this,A),o(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}var I=(n($,a),e($,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setStrokeProps(),this.drawDiagonalLine(),this.drawDiagonalLine(t,t),this._context.stroke(),this._canvas}},{key:"drawDiagonalLine",value:function(t,e){var n=0<arguments.length&&void 0!==t?t:0,i=1<arguments.length&&void 0!==e?e:0,r=this._size,o=r/2;this._context.moveTo(o-1-n,-1+i),this._context.lineTo(r+1-n,1+o+i),this._context.closePath()}}]),$);function $(){return i(this,$),o(this,($.__proto__||Object.getPrototypeOf($)).apply(this,arguments))}var B=(n(R,I),e(R,[{key:"drawTile",value:function(){return this._context.translate(this._size,0),this._context.rotate(90*Math.PI/180),I.prototype.drawTile.call(this),this._canvas}}]),R);function R(){return i(this,R),o(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}var N=(n(V,a),e(V,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setFillProps(),this.drawSquare(),this.drawSquare(t,t),this._context.fill(),this._canvas}},{key:"drawSquare",value:function(t,e){var n=0<arguments.length&&void 0!==t?t:0,i=1<arguments.length&&void 0!==e?e:0,r=this._size,o=r/2,s=r/20;this._context.fillRect(n+s,i+s,o-2*s,o-2*s),this._context.closePath()}}]),V);function V(){return i(this,V),o(this,(V.__proto__||Object.getPrototypeOf(V)).apply(this,arguments))}var W=(n(H,a),e(H,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setStrokeProps(),this.drawBox(),this.drawBox(t,t),this._context.stroke(),this._canvas}},{key:"drawBox",value:function(t,e){var n=0<arguments.length&&void 0!==t?t:0,i=1<arguments.length&&void 0!==e?e:0,r=this._size,o=r/2,s=r/20;this._context.strokeRect(n+s,i+s,o-4*s,o-4*s),this._context.closePath()}}]),H);function H(){return i(this,H),o(this,(H.__proto__||Object.getPrototypeOf(H)).apply(this,arguments))}var U=(n(q,a),e(q,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setFillProps(),this.drawTriangle(),this.drawTriangle(t,t),this._context.fill(),this._canvas}},{key:"drawTriangle",value:function(t,e){var n=0<arguments.length&&void 0!==t?t:0,i=1<arguments.length&&void 0!==e?e:0,r=this._size,o=r/2,s=r/4;this._context.moveTo(s+n,i),this._context.lineTo(o+n,o+i),this._context.lineTo(n,o+i),this._context.closePath()}}]),q);function q(){return i(this,q),o(this,(q.__proto__||Object.getPrototypeOf(q)).apply(this,arguments))}var z=(n(Y,U),e(Y,[{key:"drawTile",value:function(){var t=this._size;return this._context.translate(t,t),this._context.rotate(180*Math.PI/180),U.prototype.drawTile.call(this),this._canvas}}]),Y);function Y(){return i(this,Y),o(this,(Y.__proto__||Object.getPrototypeOf(Y)).apply(this,arguments))}var G=(n(K,a),e(K,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setFillProps(),this.drawDiamond(),this.drawDiamond(t,t),this._context.fill(),this._canvas}},{key:"drawDiamond",value:function(t,e){var n=0<arguments.length&&void 0!==t?t:0,i=1<arguments.length&&void 0!==e?e:0,r=this._size,o=r/2,s=r/4;this._context.moveTo(s+n,i),this._context.lineTo(o+n,s+i),this._context.lineTo(s+n,o+i),this._context.lineTo(n,s+i),this._context.closePath()}}]),K);function K(){return i(this,K),o(this,(K.__proto__||Object.getPrototypeOf(K)).apply(this,arguments))}var X=(n(J,G),e(J,[{key:"drawTile",value:function(){var t=this._size/2;return this._context.beginPath(),this.setStrokeProps(),this.drawDiamond(),this.drawDiamond(t,t),this._context.stroke(),this._canvas}},{key:"drawDiamond",value:function(t,e){var n=0<arguments.length&&void 0!==t?t:0,i=1<arguments.length&&void 0!==e?e:0,r=this._size,o=r/2-1,s=r/4;this._context.moveTo(s+n,i+1),this._context.lineTo(o+n,s+i),this._context.lineTo(s+n,o+i),this._context.lineTo(n+1,s+i),this._context.closePath()}}]),J);function J(){return i(this,J),o(this,(J.__proto__||Object.getPrototypeOf(J)).apply(this,arguments))}var Z={plus:c,cross:h,dash:f,"cross-dash":m,dot:v,"dot-dash":_,disc:x,ring:C,line:P,"line-vertical":T,weave:M,zigzag:D,"zigzag-vertical":L,diagonal:I,"diagonal-right-left":B,square:N,box:W,triangle:U,"triangle-inverted":z,diamond:G,"diamond-box":X},Q={circle:Z.disc,"triangle-vertical":Z["triangle-inverted"],"line-horizontal":Z.line,"line-diagonal-lr":Z.diagonal,"line-diagonal-rl":Z["diagonal-right-left"],"zigzag-horizontal":Z.zigzag,"diamond-outline":Z["diamond-box"]},tt=[];function et(t){var e=0<arguments.length&&void 0!==t?t:[],n=Object.keys(Z);e.forEach(function(t){n.splice(n.indexOf(t),1)});var i=Math.floor(Math.random()*n.length);return n[i]}function nt(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"square",e=arguments[1],n=arguments[2],i=arguments[3],r=document.createElement("canvas"),o=r.getContext("2d"),s=2*i,a=new tt[t](i,e,n),l=o.createPattern(a.drawTile(),"repeat");return r.width=s,r.height=s,l.shapeType=t,l}return s(tt,Z,Q),{draw:nt,generate:function(t){var r=void 0,o=void 0;return t.map(function(t,e,n){var i=void 0;return 0===e?(i=et(),r=o=i):e===n.length-1?i=et([o,r]):(i=et([o]),o=i),nt(i,t)})}}},"object"==typeof n&&void 0!==e?e.exports=r():"function"==typeof define&&define.amd?define(r):i.pattern=r()},{}],100:[function(t,e,n){var i,r,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(e){if(i===setTimeout)return setTimeout(e,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],d=!1,h=-1;function p(){d&&u&&(d=!1,u.length?c=u.concat(c):h=-1,c.length&&f())}function f(){if(!d){var t=l(p);d=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new g(t,e)),1!==c.length||d||l(f)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],101:[function(t,i,e){(function(t){
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var e,n,r,o,s,a,l,u,c,d,h,p,f,g,m,y,v,b,_,w;!function(e){var r="object"==typeof t?t:"object"==typeof self?self:"object"==typeof this?this:{};function n(n,i){return n!==r&&("function"==typeof Object.create?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(t,e){return n[t]=i?i(t,e):e}}"function"==typeof define&&define.amd?define("tslib",["exports"],function(t){e(n(r,n(t)))}):"object"==typeof i&&"object"==typeof i.exports?e(n(r,n(i.exports))):e(n(r))}(function(t){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};e=function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},r=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n},o=function(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,n,s):r(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s},s=function(n,i){return function(t,e){i(t,e,n)}},a=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},l=function(o,s,a,l){return new(a=a||Promise)(function(t,e){function n(t){try{r(l.next(t))}catch(t){e(t)}}function i(t){try{r(l.throw(t))}catch(t){e(t)}}function r(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(n,i)}r((l=l.apply(o,s||[])).next())})},u=function(n,i){var r,o,s,t,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,o=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=i.call(n,a)}catch(t){e=[6,t],o=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},c=function(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])},d=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}},h=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s},p=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(h(arguments[e]));return t},f=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},g=function(t){return this instanceof g?(this.v=t,this):new g(t)},m=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),s=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(i){o[i]&&(r[i]=function(n){return new Promise(function(t,e){1<s.push([i,n,t,e])||a(i,n)})})}function a(t,e){try{!function(t){t.value instanceof g?Promise.resolve(t.value.v).then(l,u):c(s[0][2],t)}(o[t](e))}catch(t){c(s[0][3],t)}}function l(t){a("next",t)}function u(t){a("throw",t)}function c(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}},y=function(i){var t,r;return t={},e("next"),e("throw",function(t){throw t}),e("return"),t[Symbol.iterator]=function(){return this},t;function e(e,n){t[e]=i[e]?function(t){return(r=!r)?{value:g(i[e](t)),done:"return"===e}:n?n(t):t}:n}},v=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=r[Symbol.asyncIterator];return e?e.call(r):(r=d(r),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=r[i]&&function(n){return new Promise(function(t,e){(function(e,t,n,i){Promise.resolve(i).then(function(t){e({value:t,done:n})},t)})(t,e,(n=r[i](n)).done,n.value)})}}},b=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},_=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},w=function(t){return t&&t.__esModule?t:{default:t}},t("__extends",e),t("__assign",n),t("__rest",r),t("__decorate",o),t("__param",s),t("__metadata",a),t("__awaiter",l),t("__generator",u),t("__exportStar",c),t("__values",d),t("__read",h),t("__spread",p),t("__spreadArrays",f),t("__await",g),t("__asyncGenerator",m),t("__asyncDelegator",y),t("__asyncValues",v),t("__makeTemplateObject",b),t("__importStar",_),t("__importDefault",w)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],102:[function(t,b,_){(function(v){(function(){var mr,t,e,yr="3.10.1",vr=1,br=2,_r=4,wr=8,xr=16,kr=32,Cr=64,Sr=128,Pr=256,Er=30,Tr="...",Or=150,Mr=16,jr=200,Dr=1,Fr=2,Lr="Expected a function",Ar="__lodash_placeholder__",Ir="[object Arguments]",$r="[object Array]",Br="[object Boolean]",Rr="[object Date]",Nr="[object Error]",Vr="[object Function]",n="[object Map]",Wr="[object Number]",Hr="[object Object]",Ur="[object RegExp]",i="[object Set]",qr="[object String]",r="[object WeakMap]",zr="[object ArrayBuffer]",Yr="[object Float32Array]",Gr="[object Float64Array]",Kr="[object Int8Array]",Xr="[object Int16Array]",Jr="[object Int32Array]",Zr="[object Uint8Array]",Qr="[object Uint8ClampedArray]",to="[object Uint16Array]",eo="[object Uint32Array]",no=/\b__p \+= '';/g,io=/\b(__p \+=) '' \+/g,ro=/(__e\(.*?\)|\b__t\)) \+\n'';/g,oo=/&(?:amp|lt|gt|quot|#39|#96);/g,so=/[&<>"'`]/g,ao=RegExp(oo.source),lo=RegExp(so.source),uo=/<%-([\s\S]+?)%>/g,co=/<%([\s\S]+?)%>/g,ho=/<%=([\s\S]+?)%>/g,po=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,fo=/^\w*$/,go=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,mo=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,yo=RegExp(mo.source),vo=/[\u0300-\u036f\ufe20-\ufe23]/g,bo=/\\(\\)?/g,_o=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wo=/\w*$/,xo=/^0[xX]/,ko=/^\[object .+?Constructor\]$/,Co=/^\d+$/,So=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Po=/($^)/,Eo=/['\n\r\u2028\u2029\\]/g,To=(t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+",RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")),Oo=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Mo=-1,jo={};jo[Yr]=jo[Gr]=jo[Kr]=jo[Xr]=jo[Jr]=jo[Zr]=jo[Qr]=jo[to]=jo[eo]=!0,jo[Ir]=jo[$r]=jo[zr]=jo[Br]=jo[Rr]=jo[Nr]=jo[Vr]=jo[n]=jo[Wr]=jo[Hr]=jo[Ur]=jo[i]=jo[qr]=jo[r]=!1;var Do={};Do[Ir]=Do[$r]=Do[zr]=Do[Br]=Do[Rr]=Do[Yr]=Do[Gr]=Do[Kr]=Do[Xr]=Do[Jr]=Do[Wr]=Do[Hr]=Do[Ur]=Do[qr]=Do[Zr]=Do[Qr]=Do[to]=Do[eo]=!0,Do[Nr]=Do[Vr]=Do[n]=Do[i]=Do[r]=!1;var o={"À":"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"},s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},a={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},l={function:!0,object:!0},u={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},c={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},d=l[typeof _]&&_&&!_.nodeType&&_,h=l[typeof b]&&b&&!b.nodeType&&b,p=d&&h&&"object"==typeof v&&v&&v.Object&&v,f=l[typeof self]&&self&&self.Object&&self,g=l[typeof window]&&window&&window.Object&&window,m=h&&h.exports===d&&d,Fo=p||g!==(this&&this.window)&&g||f||this;function Lo(t,e){if(t!==e){var n=null===t,i=t===mr,r=t==t,o=null===e,s=e===mr,a=e==e;if(e<t&&!o||!r||n&&!s&&a||i&&a)return 1;if(t<e&&!n||!a||o&&!i&&r||s&&r)return-1}return 0}function Ao(t,e,n){for(var i=t.length,r=n?i:-1;n?r--:++r<i;)if(e(t[r],r,t))return r;return-1}function Io(t,e,n){if(e!=e)return zo(t,n);for(var i=n-1,r=t.length;++i<r;)if(t[i]===e)return i;return-1}function $o(t){return"function"==typeof t||!1}function Bo(t){return null==t?"":t+""}function Ro(t,e){for(var n=-1,i=t.length;++n<i&&-1<e.indexOf(t.charAt(n)););return n}function No(t,e){for(var n=t.length;n--&&-1<e.indexOf(t.charAt(n)););return n}function Vo(t,e){return Lo(t.criteria,e.criteria)||t.index-e.index}function Wo(t){return o[t]}function Ho(t){return s[t]}function Uo(t,e,n){return e?t=u[t]:n&&(t=c[t]),"\\"+t}function qo(t){return"\\"+c[t]}function zo(t,e,n){for(var i=t.length,r=e+(n?0:-1);n?r--:++r<i;){var o=t[r];if(o!=o)return r}return-1}function Yo(t){return!!t&&"object"==typeof t}function y(t){return t<=160&&9<=t&&t<=13||32==t||160==t||5760==t||6158==t||8192<=t&&(t<=8202||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function Go(t,e){for(var n=-1,i=t.length,r=-1,o=[];++n<i;)t[n]===e&&(t[n]=Ar,o[++r]=n);return o}function Ko(t){for(var e=-1,n=t.length;++e<n&&y(t.charCodeAt(e)););return e}function Xo(t){for(var e=t.length;e--&&y(t.charCodeAt(e)););return e}function Jo(t){return a[t]}var Zo=function t(e){var O=(e=e?Zo.defaults(Fo.Object(),e,Zo.pick(Fo,Oo)):Fo).Array,n=e.Date,i=e.Error,m=e.Function,r=e.Math,o=e.Number,h=e.Object,y=e.RegExp,s=e.String,v=e.TypeError,a=O.prototype,l=h.prototype,u=s.prototype,c=m.prototype.toString,b=l.hasOwnProperty,d=0,_=l.toString,p=Fo._,f=y("^"+c.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),g=e.ArrayBuffer,w=e.clearTimeout,x=e.parseFloat,k=r.pow,C=l.propertyIsEnumerable,S=$e(e,"Set"),P=e.setTimeout,E=a.splice,T=e.Uint8Array,M=$e(e,"WeakMap"),j=r.ceil,D=$e(h,"create"),F=r.floor,L=$e(O,"isArray"),A=e.isFinite,I=$e(h,"keys"),$=r.max,B=r.min,R=$e(n,"now"),N=e.parseInt,V=r.random,W=o.NEGATIVE_INFINITY,H=o.POSITIVE_INFINITY,U=4294967295,q=U-1,z=U>>>1,Y=9007199254740991,G=M&&new M,K={};function X(t){if(Yo(t)&&!hi(t)&&!(t instanceof Q)){if(t instanceof Z)return t;if(b.call(t,"__chain__")&&b.call(t,"__wrapped__"))return en(t)}return new Z(t)}function J(){}function Z(t,e,n){this.__wrapped__=t,this.__actions__=n||[],this.__chain__=!!e}X.support={};function Q(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=H,this.__views__=[]}function tt(){this.__data__={}}function et(t){var e=t?t.length:0;for(this.data={hash:D(null),set:new S};e--;)this.push(t[e])}function nt(t,e){var n=t.data;return("string"==typeof e||mi(e)?n.set.has(e):n.hash[e])?0:-1}function it(t,e){var n=-1,i=t.length;for(e=e||O(i);++n<i;)e[n]=t[n];return e}function rt(t,e){for(var n=-1,i=t.length;++n<i&&!1!==e(t[n],n,t););return t}function ot(t,e){for(var n=-1,i=t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}function st(t,e){for(var n=-1,i=t.length,r=-1,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[++r]=s)}return o}function at(t,e){for(var n=-1,i=t.length,r=O(i);++n<i;)r[n]=e(t[n],n,t);return r}function lt(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}function ut(t,e,n,i){var r=-1,o=t.length;for(i&&o&&(n=t[++r]);++r<o;)n=e(n,t[r],r,t);return n}function ct(t,e){for(var n=-1,i=t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function dt(t,e,n,i){return t!==mr&&b.call(i,n)?t:e}function ht(t,e,n){for(var i=-1,r=$i(e),o=r.length;++i<o;){var s=r[i],a=t[s],l=n(a,e[s],s,t,e);(l==l?l===a:a!=a)&&(a!==mr||s in t)||(t[s]=l)}return t}function pt(t,e){return null==e?t:gt(e,$i(e),t)}function ft(t,e){for(var n=-1,i=null==t,r=!i&&Re(t),o=r?t.length:0,s=e.length,a=O(s);++n<s;){var l=e[n];a[n]=r?Ne(l,o)?t[l]:mr:i?mr:t[l]}return a}function gt(t,e,n){n=n||{};for(var i=-1,r=e.length;++i<r;){var o=e[i];n[o]=t[o]}return n}function mt(t,e,n){var i=typeof t;return"function"==i?e===mr?t:te(t,e,n):null==t?ir:"object"==i?Bt(t):e===mr?ur(t):Rt(t,e)}function yt(n,i,r,t,e,o,s){var a;if(r&&(a=e?r(n,t,e):r(n)),a!==mr)return a;if(!mi(n))return n;var l=hi(n);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&b.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(n),!i)return it(n,a)}else{var u=_.call(n),c=u==Vr;if(u!=Hr&&u!=Ir&&(!c||e))return Do[u]?function(t,e,n){var i=t.constructor;switch(e){case zr:return ee(t);case Br:case Rr:return new i(+t);case Yr:case Gr:case Kr:case Xr:case Jr:case Zr:case Qr:case to:case eo:var r=t.buffer;return new i(n?ee(r):r,t.byteOffset,t.length);case Wr:case qr:return new i(t);case Ur:var o=new i(t.source,wo.exec(t));o.lastIndex=t.lastIndex}return o}(n,u,i):e?n:{};if(a=function(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=h),new e}(c?{}:n),!i)return pt(a,n)}s=s||[];for(var d=(o=o||[]).length;d--;)if(o[d]==n)return s[d];return o.push(n),s.push(a),(l?rt:jt)(n,function(t,e){a[e]=yt(t,i,r,e,n,o,s)}),a}X.templateSettings={escape:uo,evaluate:co,interpolate:ho,variable:"",imports:{_:X}};var vt=function(t){if(mi(t)){bt.prototype=t;var e=new bt;bt.prototype=mr}return e||{}};function bt(){}function _t(t,e,n){if("function"!=typeof t)throw new v(Lr);return P(function(){t.apply(mr,n)},e)}function wt(t,e){var n=t?t.length:0,i=[];if(!n)return i;var r=-1,o=Le(),s=o==Io,a=s&&e.length>=jr?le(e):null,l=e.length;a&&(o=nt,s=!1,e=a);t:for(;++r<n;){var u=t[r];if(s&&u==u){for(var c=l;c--;)if(e[c]===u)continue t;i.push(u)}else o(e,u,0)<0&&i.push(u)}return i}var xt=se(jt),kt=se(Dt,!0);function Ct(t,i){var r=!0;return xt(t,function(t,e,n){return r=!!i(t,e,n)}),r}function St(t,i){var r=[];return xt(t,function(t,e,n){i(t,e,n)&&r.push(t)}),r}function Pt(t,i,e,r){var o;return e(t,function(t,e,n){if(i(t,e,n))return o=r?e:t,!1}),o}function Et(t,e,n,i){i=i||[];for(var r=-1,o=t.length;++r<o;){var s=t[r];Yo(s)&&Re(s)&&(n||hi(s)||di(s))?e?Et(s,e,n,i):lt(i,s):n||(i[i.length]=s)}return i}var Tt=ae(),Ot=ae(!0);function Mt(t,e){return Tt(t,e,Bi)}function jt(t,e){return Tt(t,e,$i)}function Dt(t,e){return Ot(t,e,$i)}function Ft(t,e){for(var n=-1,i=e.length,r=-1,o=[];++n<i;){var s=e[n];gi(t[s])&&(o[++r]=s)}return o}function Lt(t,e,n){if(null!=t){n!==mr&&n in Qe(t)&&(e=[n]);for(var i=0,r=e.length;null!=t&&i<r;)t=t[e[i++]];return i&&i==r?t:mr}}function At(t,e,n,i,r,o){return t===e||(null==t||null==e||!mi(t)&&!Yo(e)?t!=t&&e!=e:function(t,e,n,i,r,o,s){var a=hi(t),l=hi(e),u=$r,c=$r;a||((u=_.call(t))==Ir?u=Hr:u!=Hr&&(a=xi(t))),l||((c=_.call(e))==Ir?c=Hr:c!=Hr&&(l=xi(e)));var d=u==Hr,h=c==Hr,p=u==c;if(p&&!a&&!d)return function(t,e,n){switch(n){case Br:case Rr:return+t==+e;case Nr:return t.name==e.name&&t.message==e.message;case Wr:return t!=+t?e!=+e:t==+e;case Ur:case qr:return t==e+""}return!1}(t,e,u);if(!r){var f=d&&b.call(t,"__wrapped__"),g=h&&b.call(e,"__wrapped__");if(f||g)return n(f?t.value():t,g?e.value():e,i,r,o,s)}if(!p)return!1;s=s||[];for(var m=(o=o||[]).length;m--;)if(o[m]==t)return s[m]==e;o.push(t),s.push(e);var y=(a?function(t,e,n,i,r,o,s){var a=-1,l=t.length,u=e.length;if(l!=u&&!(r&&l<u))return!1;for(;++a<l;){var c=t[a],d=e[a],h=i?i(r?d:c,r?c:d,a):mr;if(h!==mr){if(h)continue;return!1}if(r){if(!ct(e,function(t){return c===t||n(c,t,i,r,o,s)}))return!1}else if(c!==d&&!n(c,d,i,r,o,s))return!1}return!0}:function(t,e,n,i,r,o,s){var a=$i(t),l=a.length,u=$i(e).length;if(l!=u&&!r)return!1;for(var c=l;c--;){var d=a[c];if(!(r?d in e:b.call(e,d)))return!1}for(var h=r;++c<l;){d=a[c];var p=t[d],f=e[d],g=i?i(r?f:p,r?p:f,d):mr;if(!(g===mr?n(p,f,i,r,o,s):g))return!1;h=h||"constructor"==d}if(!h){var m=t.constructor,y=e.constructor;if(m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y))return!1}return!0})(t,e,n,i,r,o,s);return o.pop(),s.pop(),y}(t,e,At,n,i,r,o))}function It(t,e,n){var i=e.length,r=i,o=!n;if(null==t)return!r;for(t=Qe(t);i--;){var s=e[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<r;){var a=(s=e[i])[0],l=t[a],u=s[1];if(o&&s[2]){if(l===mr&&!(a in t))return!1}else{var c=n?n(l,u,a):mr;if(!(c===mr?At(u,l,n,!0):c))return!1}}return!0}function $t(t,i){var r=-1,o=Re(t)?O(t.length):[];return xt(t,function(t,e,n){o[++r]=i(t,e,n)}),o}function Bt(t){var e=Ie(t);if(1==e.length&&e[0][2]){var n=e[0][0],i=e[0][1];return function(t){return null!=t&&t[n]===i&&(i!==mr||n in Qe(t))}}return function(t){return It(t,e)}}function Rt(n,i){var r=hi(n),o=We(n)&&qe(i),s=n+"";return n=tn(n),function(t){if(null==t)return!1;var e=s;if(t=Qe(t),(r||!o)&&!(e in t)){if(null==(t=1==n.length?t:Lt(t,Ut(n,0,-1))))return!1;e=dn(n),t=Qe(t)}return t[e]===i?i!==mr||e in t:At(i,t[e],mr,!0)}}function Nt(e){return function(t){return null==t?mr:t[e]}}function Vt(t,e){for(var n=t?e.length:0;n--;){var i=e[n];if(i!=r&&Ne(i)){var r=i;E.call(t,i,1)}}return t}function Wt(t,e){return t+F(V()*(e-t+1))}var Ht=G?function(t,e){return G.set(t,e),t}:ir;function Ut(t,e,n){var i=-1,r=t.length;(e=null==e?0:+e||0)<0&&(e=r<-e?0:r+e),(n=n===mr||r<n?r:+n||0)<0&&(n+=r),r=n<e?0:n-e>>>0,e>>>=0;for(var o=O(r);++i<r;)o[i]=t[i+e];return o}function qt(t,i){var r;return xt(t,function(t,e,n){return!(r=i(t,e,n))}),!!r}function zt(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Yt(t,n,i){var e=je(),r=-1;return n=at(n,function(t){return e(t)}),zt($t(t,function(e){return{criteria:at(n,function(t){return t(e)}),index:++r,value:e}}),function(t,e){return function(t,e,n){for(var i=-1,r=t.criteria,o=e.criteria,s=r.length,a=n.length;++i<s;){var l=Lo(r[i],o[i]);if(l){if(a<=i)return l;var u=n[i];return l*("asc"===u||!0===u?1:-1)}}return t.index-e.index}(t,e,i)})}function Gt(t,e){var n=-1,i=Le(),r=t.length,o=i==Io,s=o&&jr<=r,a=s?le():null,l=[];a?(i=nt,o=!1):(s=!1,a=e?[]:l);t:for(;++n<r;){var u=t[n],c=e?e(u,n,t):u;if(o&&u==u){for(var d=a.length;d--;)if(a[d]===c)continue t;e&&a.push(c),l.push(u)}else i(a,c,0)<0&&((e||s)&&a.push(c),l.push(u))}return l}function Kt(t,e){for(var n=-1,i=e.length,r=O(i);++n<i;)r[n]=t[e[n]];return r}function Xt(t,e,n,i){for(var r=t.length,o=i?r:-1;(i?o--:++o<r)&&e(t[o],o,t););return n?Ut(t,i?0:o,i?o+1:r):Ut(t,i?o+1:0,i?r:o)}function Jt(t,e){var n=t;n instanceof Q&&(n=n.value());for(var i=-1,r=e.length;++i<r;){var o=e[i];n=o.func.apply(o.thisArg,lt([n],o.args))}return n}function Zt(t,e,n){var i=0,r=t?t.length:i;if("number"==typeof e&&e==e&&r<=z){for(;i<r;){var o=i+r>>>1,s=t[o];(n?s<=e:s<e)&&null!==s?i=1+o:r=o}return r}return Qt(t,e,ir,n)}function Qt(t,e,n,i){e=n(e);for(var r=0,o=t?t.length:0,s=e!=e,a=null===e,l=e===mr;r<o;){var u=F((r+o)/2),c=n(t[u]),d=c!==mr,h=c==c;if(s)var p=h||i;else p=a?h&&d&&(i||null!=c):l?h&&(i||d):null!=c&&(i?c<=e:c<e);p?r=u+1:o=u}return B(o,q)}function te(o,s,t){if("function"!=typeof o)return ir;if(s===mr)return o;switch(t){case 1:return function(t){return o.call(s,t)};case 3:return function(t,e,n){return o.call(s,t,e,n)};case 4:return function(t,e,n,i){return o.call(s,t,e,n,i)};case 5:return function(t,e,n,i,r){return o.call(s,t,e,n,i,r)}}return function(){return o.apply(s,arguments)}}function ee(t){var e=new g(t.byteLength);return new T(e).set(new T(t)),e}function ne(t,e,n){for(var i=n.length,r=-1,o=$(t.length-i,0),s=-1,a=e.length,l=O(a+o);++s<a;)l[s]=e[s];for(;++r<i;)l[n[r]]=t[r];for(;o--;)l[s++]=t[r++];return l}function ie(t,e,n){for(var i=-1,r=n.length,o=-1,s=$(t.length-r,0),a=-1,l=e.length,u=O(s+l);++o<s;)u[o]=t[o];for(var c=o;++a<l;)u[c+a]=e[a];for(;++i<r;)u[c+n[i]]=t[o++];return u}function re(a,l){return function(t,i,e){var r=l?l():{};if(i=je(i,e,3),hi(t))for(var n=-1,o=t.length;++n<o;){var s=t[n];a(r,s,i(s,n,t),t)}else xt(t,function(t,e,n){a(r,t,i(t,e,n),n)});return r}}function oe(l){return ui(function(t,e){var n=-1,i=null==t?0:e.length,r=2<i?e[i-2]:mr,o=2<i?e[2]:mr,s=1<i?e[i-1]:mr;for("function"==typeof r?(r=te(r,s,5),i-=2):i-=(r="function"==typeof s?s:mr)?1:0,o&&Ve(e[0],e[1],o)&&(r=i<3?mr:r,i=1);++n<i;){var a=e[n];a&&l(t,a,r)}return t})}function se(o,s){return function(t,e){var n=t?Ae(t):0;if(!Ue(n))return o(t,e);for(var i=s?n:-1,r=Qe(t);(s?i--:++i<n)&&!1!==e(r[i],i,r););return t}}function ae(l){return function(t,e,n){for(var i=Qe(t),r=n(t),o=r.length,s=l?o:-1;l?s--:++s<o;){var a=r[s];if(!1===e(i[a],a,i))break}return t}}function le(t){return D&&S?new et(t):null}function ue(o){return function(t){for(var e=-1,n=tr(zi(t)),i=n.length,r="";++e<i;)r=o(r,n[e],e);return r}}function ce(i){return function(){var t=arguments;switch(t.length){case 0:return new i;case 1:return new i(t[0]);case 2:return new i(t[0],t[1]);case 3:return new i(t[0],t[1],t[2]);case 4:return new i(t[0],t[1],t[2],t[3]);case 5:return new i(t[0],t[1],t[2],t[3],t[4]);case 6:return new i(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new i(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var e=vt(i.prototype),n=i.apply(e,t);return mi(n)?n:e}}function de(o){return function t(e,n,i){i&&Ve(e,n,i)&&(n=mr);var r=Me(e,o,mr,mr,mr,mr,mr,n);return r.placeholder=t.placeholder,r}}function he(n,i){return ui(function(t){var e=t[0];return null==e?e:(t.push(i),n.apply(mr,t))})}function pe(r,o){return function(t,e,n){if(n&&Ve(t,e,n)&&(e=mr),1==(e=je(e,n,3)).length){var i=function(t,e,n,i){for(var r=-1,o=t.length,s=i,a=s;++r<o;){var l=t[r],u=+e(l);n(u,s)&&(s=u,a=l)}return a}(t=hi(t)?t:Ze(t),e,r,o);if(!t.length||i!==o)return i}return function(t,r,o,s){var a=s,l=a;return xt(t,function(t,e,n){var i=+r(t,e,n);(o(i,a)||i===s&&i===l)&&(a=i,l=t)}),l}(t,e,r,o)}}function fe(r,o){return function(t,e,n){if(e=je(e,n,3),hi(t)){var i=Ao(t,e,o);return-1<i?t[i]:mr}return Pt(t,e,r)}}function ge(i){return function(t,e,n){return t&&t.length?Ao(t,e=je(e,n,3),i):-1}}function me(i){return function(t,e,n){return Pt(t,e=je(e,n,3),i,!0)}}function ye(l){return function(){for(var r,o=arguments.length,t=l?o:-1,e=0,s=O(o);l?t--:++t<o;){var n=s[e++]=arguments[t];if("function"!=typeof n)throw new v(Lr);!r&&Z.prototype.thru&&"wrapper"==Fe(n)&&(r=new Z([],!0))}for(t=r?-1:o;++t<o;){var i=Fe(n=s[t]),a="wrapper"==i?De(n):mr;r=a&&He(a[0])&&a[1]==(Sr|wr|kr|Pr)&&!a[4].length&&1==a[9]?r[Fe(a[0])].apply(r,a[3]):1==n.length&&He(n)?r[i]():r.thru(n)}return function(){var t=arguments,e=t[0];if(r&&1==t.length&&hi(e)&&e.length>=jr)return r.plant(e).value();for(var n=0,i=o?s[n].apply(this,t):e;++n<o;)i=s[n].call(this,i);return i}}}function ve(i,r){return function(t,e,n){return"function"==typeof e&&n===mr&&hi(t)?i(t,e):r(t,te(e,n,3))}}function be(i){return function(t,e,n){return"function"==typeof e&&n===mr||(e=te(e,n,3)),i(t,e,Bi)}}function _e(i){return function(t,e,n){return"function"==typeof e&&n===mr||(e=te(e,n,3)),i(t,e)}}function we(s){return function(t,r,e){var o={};return r=je(r,e,3),jt(t,function(t,e,n){var i=r(t,e,n);t=s?t:i,o[e=s?i:e]=t}),o}}function xe(i){return function(t,e,n){return t=Bo(t),(i?t:"")+Pe(t,e,n)+(i?"":t)}}function ke(i){var r=ui(function(t,e){var n=Go(e,r.placeholder);return Me(t,i,mr,e,n)});return r}function Ce(o,s){return function(t,e,n,i){var r=arguments.length<3;return"function"==typeof e&&i===mr&&hi(t)?o(t,e,n,r):function(t,i,r,o,e){return e(t,function(t,e,n){r=o?(o=!1,t):i(r,t,e,n)}),r}(t,je(e,i,4),n,r,s)}}function Se(h,p,f,g,m,y,v,b,_,w){var x=p&Sr,k=p&vr,C=p&br,S=p&wr,P=p&_r,E=p&xr,T=C?mr:ce(h);return function t(){for(var e=arguments.length,n=e,i=O(e);n--;)i[n]=arguments[n];if(g&&(i=ne(i,g,m)),y&&(i=ie(i,y,v)),S||E){var r=t.placeholder,o=Go(i,r);if((e-=o.length)<w){var s=b?it(b):mr,a=$(w-e,0);p|=S?kr:Cr,p&=~(S?Cr:kr),P||(p&=~(vr|br));var l=[h,p,f,S?i:mr,S?o:mr,S?mr:i,S?mr:o,s,_,a],u=Se.apply(mr,l);return He(h)&&Xe(u,l),u.placeholder=r,u}}var c=k?f:this,d=C?c[h]:h;return b&&(i=function(t,e){for(var n=t.length,i=B(e.length,n),r=it(t);i--;){var o=e[i];t[i]=Ne(o,n)?r[o]:mr}return t}(i,b)),x&&_<i.length&&(i.length=_),this&&this!==Fo&&this instanceof t&&(d=T||ce(h)),d.apply(c,i)}}function Pe(t,e,n){var i=t.length;if((e=+e)<=i||!A(e))return"";var r=e-i;return Xi(n=null==n?" ":n+"",j(r/n.length)).slice(0,r)}function Ee(s,t,a,l){var u=t&vr,c=ce(s);return function t(){for(var e=-1,n=arguments.length,i=-1,r=l.length,o=O(r+n);++i<r;)o[i]=l[i];for(;n--;)o[i++]=arguments[++e];return(this&&this!==Fo&&this instanceof t?c:s).apply(u?a:this,o)}}function Te(t){var n=r[t];return function(t,e){return(e=e===mr?0:+e||0)?(e=k(10,e),n(t*e)/e):n(t)}}function Oe(o){return function(t,e,n,i){var r=je(n);return null==n&&r===mt?Zt(t,e,o):Qt(t,e,r(n,i,1),o)}}function Me(t,e,n,i,r,o,s,a){var l=e&br;if(!l&&"function"!=typeof t)throw new v(Lr);var u=i?i.length:0;if(u||(e&=~(kr|Cr),i=r=mr),u-=r?r.length:0,e&Cr){var c=i,d=r;i=r=mr}var h=l?mr:De(t),p=[t,e,n,i,r,c,d,o,s,a];if(h&&(function(t,e){var n=t[1],i=e[1],r=n|i,o=r<Sr,s=i==Sr&&n==wr||i==Sr&&n==Pr&&t[7].length<=e[8]||i==(Sr|Pr)&&n==wr;if(o||s){i&vr&&(t[2]=e[2],r|=n&vr?0:_r);var a=e[3];if(a){var l=t[3];t[3]=l?ne(l,a,e[4]):it(a),t[4]=l?Go(t[3],Ar):it(e[4])}(a=e[5])&&(l=t[5],t[5]=l?ie(l,a,e[6]):it(a),t[6]=l?Go(t[5],Ar):it(e[6])),(a=e[7])&&(t[7]=it(a)),i&Sr&&(t[8]=null==t[8]?e[8]:B(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=r}}(p,h),e=p[1],a=p[9]),p[9]=null==a?l?0:t.length:$(a-u,0)||0,e==vr)var f=function(e,n){var i=ce(e);return function t(){return(this&&this!==Fo&&this instanceof t?i:e).apply(n,arguments)}}(p[0],p[2]);else f=e!=kr&&e!=(vr|kr)||p[4].length?Se.apply(mr,p):Ee.apply(mr,p);return(h?Ht:Xe)(f,p)}function je(t,e,n){var i=X.callback||nr;return i=i===nr?mt:i,n?i(t,e,n):i}var De=G?function(t){return G.get(t)}:lr;function Fe(t){for(var e=t.name,n=K[e],i=n?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==t)return r.name}return e}function Le(t,e,n){var i=X.indexOf||un;return i=i===un?Io:i,t?i(t,e,n):i}var Ae=Nt("length");function Ie(t){for(var e=Wi(t),n=e.length;n--;)e[n][2]=qe(e[n][1]);return e}function $e(t,e){var n=null==t?mr:t[e];return yi(n)?n:mr}function Be(t,e,n){null==t||We(e,t)||(t=1==(e=tn(e)).length?t:Lt(t,Ut(e,0,-1)),e=dn(e));var i=null==t?t:t[e];return null==i?mr:i.apply(t,n)}function Re(t){return null!=t&&Ue(Ae(t))}function Ne(t,e){return t="number"==typeof t||Co.test(t)?+t:-1,e=null==e?Y:e,-1<t&&t%1==0&&t<e}function Ve(t,e,n){if(!mi(n))return!1;var i=typeof e;if("number"==i?Re(n)&&Ne(e,n.length):"string"==i&&e in n){var r=n[e];return t==t?t===r:r!=r}return!1}function We(t,e){var n=typeof t;return!!("string"==n&&fo.test(t)||"number"==n)||!hi(t)&&(!po.test(t)||null!=e&&t in Qe(e))}function He(t){var e=Fe(t);if(!(e in Q.prototype))return!1;var n=X[e];if(t===n)return!0;var i=De(n);return!!i&&t===i[0]}function Ue(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=Y}function qe(t){return t==t&&!mi(t)}function ze(t,e){t=Qe(t);for(var n=-1,i=e.length,r={};++n<i;){var o=e[n];o in t&&(r[o]=t[o])}return r}function Ye(t,i){var r={};return Mt(t,function(t,e,n){i(t,e,n)&&(r[e]=t)}),r}var Ge,Ke,Xe=(Ke=Ge=0,function(t,e){var n=zn(),i=Mr-(n-Ke);if(Ke=n,0<i){if(++Ge>=Or)return t}else Ge=0;return Ht(t,e)});function Je(t){for(var e=Bi(t),n=e.length,i=n&&t.length,r=!!i&&Ue(i)&&(hi(t)||di(t)),o=-1,s=[];++o<n;){var a=e[o];(r&&Ne(a,i)||b.call(t,a))&&s.push(a)}return s}function Ze(t){return null==t?[]:Re(t)?mi(t)?t:h(t):Ui(t)}function Qe(t){return mi(t)?t:h(t)}function tn(t){if(hi(t))return t;var r=[];return Bo(t).replace(go,function(t,e,n,i){r.push(n?i.replace(bo,"$1"):e||t)}),r}function en(t){return t instanceof Q?t.clone():new Z(t.__wrapped__,t.__chain__,it(t.__actions__))}var nn=ui(function(t,e){return Yo(t)&&Re(t)?wt(t,Et(e,!1,!0)):[]});function rn(t,e,n){return t&&t.length?((n?Ve(t,e,n):null==e)&&(e=1),Ut(t,e<0?0:e)):[]}function on(t,e,n){var i=t?t.length:0;return i?((n?Ve(t,e,n):null==e)&&(e=1),Ut(t,0,(e=i-(+e||0))<0?0:e)):[]}var sn=ge(),an=ge(!0);function ln(t){return t?t[0]:mr}function un(t,e,n){var i=t?t.length:0;if(!i)return-1;if("number"==typeof n)n=n<0?$(i+n,0):n;else if(n){var r=Zt(t,e);return r<i&&(e==e?e===t[r]:t[r]!=t[r])?r:-1}return Io(t,e,n||0)}var cn=ui(function(t){for(var e=t.length,n=e,i=O(c),r=Le(),o=r==Io,s=[];n--;){var a=t[n]=Re(a=t[n])?a:[];i[n]=o&&120<=a.length?le(n&&a):null}var l=t[0],u=-1,c=l?l.length:0,d=i[0];t:for(;++u<c;)if(a=l[u],(d?nt(d,a):r(s,a,0))<0){for(n=e;--n;){var h=i[n];if((h?nt(h,a):r(t[n],a,0))<0)continue t}d&&d.push(a),s.push(a)}return s});function dn(t){var e=t?t.length:0;return e?t[e-1]:mr}var hn=ui(function(t,e){var n=ft(t,e=Et(e));return Vt(t,e.sort(Lo)),n});function pn(t){return rn(t,1)}var fn=Oe(),gn=Oe(!0);var mn=ui(function(t){return Gt(Et(t,!1,!0))});function yn(t,e,n,i){if(!t||!t.length)return[];null!=e&&"boolean"!=typeof e&&(n=Ve(t,e,i=n)?mr:e,e=!1);var r=je();return null==n&&r===mt||(n=r(n,i,3)),e&&Le()==Io?function(t,e){for(var n,i=-1,r=t.length,o=-1,s=[];++i<r;){var a=t[i],l=e?e(a,i,t):a;i&&n===l||(n=l,s[++o]=a)}return s}(t,n):Gt(t,n)}function vn(t){if(!t||!t.length)return[];var e=-1,n=0;t=st(t,function(t){if(Re(t))return n=$(t.length,n),!0});for(var i=O(n);++e<n;)i[e]=at(t,Nt(e));return i}function bn(t,e,n){if(!t||!t.length)return[];var i=vn(t);return null==e?i:(e=te(e,n,4),at(i,function(t){return ut(t,e,mr,!0)}))}var _n=ui(function(t,e){return Re(t)?wt(t,e):[]});var wn=ui(vn);function xn(t,e){var n=-1,i=t?t.length:0,r={};for(!i||e||hi(t[0])||(e=[]);++n<i;){var o=t[n];e?r[o]=e[n]:o&&(r[o[0]]=o[1])}return r}var kn=ui(function(t){var e=t.length,n=2<e?t[e-2]:mr,i=1<e?t[e-1]:mr;return 2<e&&"function"==typeof n?e-=2:(n=1<e&&"function"==typeof i?(--e,i):mr,i=mr),t.length=e,bn(t,n,i)});function Cn(t){var e=X(t);return e.__chain__=!0,e}function Sn(t,e,n){return e.call(n,t)}var Pn=ui(function(e){return e=Et(e),this.thru(function(t){return function(t,e){for(var n=-1,i=t.length,r=-1,o=e.length,s=O(i+o);++n<i;)s[n]=t[n];for(;++r<o;)s[n++]=e[r];return s}(hi(t)?t:[Qe(t)],e)})});var En=ui(function(t,e){return ft(t,Et(e))}),Tn=re(function(t,e,n){b.call(t,n)?++t[n]:t[n]=1});function On(t,e,n){var i=hi(t)?ot:Ct;return n&&Ve(t,e,n)&&(e=mr),"function"==typeof e&&n===mr||(e=je(e,n,3)),i(t,e)}function Mn(t,e,n){return(hi(t)?st:St)(t,e=je(e,n,3))}var jn=fe(xt),Dn=fe(kt,!0);var Fn=ve(rt,xt),Ln=ve(function(t,e){for(var n=t.length;n--&&!1!==e(t[n],n,t););return t},kt),An=re(function(t,e,n){b.call(t,n)?t[n].push(e):t[n]=[e]});function In(t,e,n,i){var r=t?Ae(t):0;return Ue(r)||(r=(t=Ui(t)).length),n="number"!=typeof n||i&&Ve(e,n,i)?0:n<0?$(r+n,0):n||0,"string"==typeof t||!hi(t)&&wi(t)?n<=r&&-1<t.indexOf(e,n):!!r&&-1<Le(t,e,n)}var $n=re(function(t,e,n){t[n]=e}),Bn=ui(function(t,n,i){var r=-1,o="function"==typeof n,s=We(n),a=Re(t)?O(t.length):[];return xt(t,function(t){var e=o?n:s&&null!=t?t[n]:mr;a[++r]=e?e.apply(t,i):Be(t,n,i)}),a});function Rn(t,e,n){return(hi(t)?at:$t)(t,e=je(e,n,3))}var Nn=re(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Vn=Ce(ut,xt),Wn=Ce(function(t,e,n,i){var r=t.length;for(i&&r&&(n=t[--r]);r--;)n=e(n,t[r],r,t);return n},kt);function Hn(t,e,n){if(n?Ve(t,e,n):null==e)return 0<(i=(t=Ze(t)).length)?t[Wt(0,i-1)]:mr;var i,r=-1,o=Ci(t),s=(i=o.length)-1;for(e=B(e<0?0:+e||0,i);++r<e;){var a=Wt(r,s),l=o[a];o[a]=o[r],o[r]=l}return o.length=e,o}function Un(t,e,n){var i=hi(t)?ct:qt;return n&&Ve(t,e,n)&&(e=mr),"function"==typeof e&&n===mr||(e=je(e,n,3)),i(t,e)}var qn=ui(function(t,e){if(null==t)return[];var n=e[2];return n&&Ve(e[0],e[1],n)&&(e.length=1),Yt(t,Et(e),[])});var zn=R||function(){return(new n).getTime()};function Yn(t,e){var n;if("function"!=typeof e){if("function"!=typeof t)throw new v(Lr);var i=t;t=e,e=i}return function(){return 0<--t&&(n=e.apply(this,arguments)),t<=1&&(e=mr),n}}var Gn=ui(function(t,e,n){var i=vr;if(n.length){var r=Go(n,Gn.placeholder);i|=kr}return Me(t,i,e,n,r)}),Kn=ui(function(t,e){for(var n=-1,i=(e=e.length?Et(e):Ii(t)).length;++n<i;){var r=e[n];t[r]=Me(t[r],vr,t)}return t}),Xn=ui(function(t,e,n){var i=vr|br;if(n.length){var r=Go(n,Xn.placeholder);i|=kr}return Me(e,i,t,n,r)}),Jn=de(wr),Zn=de(xr);function Qn(i,r,t){var o,s,a,l,u,c,d,h=0,p=!1,f=!0;if("function"!=typeof i)throw new v(Lr);if(r=r<0?0:+r||0,!0===t){var g=!0;f=!1}else mi(t)&&(g=!!t.leading,p="maxWait"in t&&$(+t.maxWait||0,r),f="trailing"in t?!!t.trailing:f);function e(t,e){e&&w(e),s=c=d=mr,t&&(h=zn(),a=i.apply(u,o),c||s||(o=u=mr))}function m(){var t=r-(zn()-l);t<=0||r<t?e(d,s):c=P(m,t)}function y(){e(f,c)}function n(){if(o=arguments,l=zn(),u=this,d=f&&(c||!g),!1===p)var t=g&&!c;else{s||g||(h=l);var e=p-(l-h),n=e<=0||p<e;n?(s=s&&w(s),h=l,a=i.apply(u,o)):s=s||P(y,e)}return n&&c?c=w(c):c||r===p||(c=P(m,r)),t&&(n=!0,a=i.apply(u,o)),!n||c||s||(o=u=mr),a}return n.cancel=function(){c&&w(c),s&&w(s),h=0,s=c=d=mr},n}var ti=ui(function(t,e){return _t(t,1,e)}),ei=ui(function(t,e,n){return _t(t,e,n)}),ni=ye(),ii=ye(!0);function ri(r,o){if("function"!=typeof r||o&&"function"!=typeof o)throw new v(Lr);var s=function(){var t=arguments,e=o?o.apply(this,t):t[0],n=s.cache;if(n.has(e))return n.get(e);var i=r.apply(this,t);return s.cache=n.set(e,i),i};return s.cache=new ri.Cache,s}var oi=ui(function(n,i){if(i=Et(i),"function"!=typeof n||!ot(i,$o))throw new v(Lr);var r=i.length;return ui(function(t){for(var e=B(t.length,r);e--;)t[e]=i[e](t[e]);return n.apply(this,t)})});var si=ke(kr),ai=ke(Cr),li=ui(function(t,e){return Me(t,Pr,mr,mr,mr,Et(e))});function ui(o,s){if("function"!=typeof o)throw new v(Lr);return s=$(s===mr?o.length-1:+s||0,0),function(){for(var t=arguments,e=-1,n=$(t.length-s,0),i=O(n);++e<n;)i[e]=t[s+e];switch(s){case 0:return o.call(this,i);case 1:return o.call(this,t[0],i);case 2:return o.call(this,t[0],t[1],i)}var r=O(s+1);for(e=-1;++e<s;)r[e]=t[e];return r[s]=i,o.apply(this,r)}}function ci(t,e){return e<t}function di(t){return Yo(t)&&Re(t)&&b.call(t,"callee")&&!C.call(t,"callee")}var hi=L||function(t){return Yo(t)&&Ue(t.length)&&_.call(t)==$r};function pi(t,e,n,i){var r=(n="function"==typeof n?te(n,i,3):mr)?n(t,e):mr;return r===mr?At(t,e,n):!!r}function fi(t){return Yo(t)&&"string"==typeof t.message&&_.call(t)==Nr}function gi(t){return mi(t)&&_.call(t)==Vr}function mi(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function yi(t){return null!=t&&(gi(t)?f.test(c.call(t)):Yo(t)&&ko.test(t))}function vi(t){return"number"==typeof t||Yo(t)&&_.call(t)==Wr}function bi(t){var e,n;return!(!Yo(t)||_.call(t)!=Hr||di(t)||!(b.call(t,"constructor")||"function"!=typeof(e=t.constructor)||e instanceof e))&&(Mt(t,function(t,e){n=e}),n===mr||b.call(t,n))}function _i(t){return mi(t)&&_.call(t)==Ur}function wi(t){return"string"==typeof t||Yo(t)&&_.call(t)==qr}function xi(t){return Yo(t)&&Ue(t.length)&&!!jo[_.call(t)]}function ki(t,e){return t<e}function Ci(t){var e=t?Ae(t):0;return Ue(e)?e?it(t):[]:Ui(t)}function Si(t){return gt(t,Bi(t))}var Pi=oe(function o(s,a,l,u,c){if(!mi(s))return s;var d=Re(a)&&(hi(a)||xi(a)),h=d?mr:$i(a);return rt(h||a,function(t,e){if(h&&(t=a[e=t]),Yo(t))!function(t,e,n,i,r,o,s){for(var a=o.length,l=e[n];a--;)if(o[a]==l)return t[n]=s[a];var u=t[n],c=r?r(u,l,n,t,e):mr,d=c===mr;d&&(Re(c=l)&&(hi(l)||xi(l))?c=hi(u)?u:Re(u)?it(u):[]:bi(l)||di(l)?c=di(u)?Si(u):bi(u)?u:{}:d=!1),o.push(l),s.push(c),d?t[n]=i(c,l,r,o,s):(c==c?c!==u:u==u)&&(t[n]=c)}(s,a,e,o,l,u=u||[],c=c||[]);else{var n=s[e],i=l?l(n,t,e,s,a):mr,r=i===mr;r&&(i=t),i===mr&&(!d||e in s)||!r&&(i==i?i===n:n!=n)||(s[e]=i)}}),s}),Ei=oe(function(t,e,n){return n?ht(t,e,n):pt(t,e)});var Ti=he(Ei,function(t,e){return t===mr?e:t}),Oi=he(Pi,function t(e,n){return e===mr?n:Pi(e,n,t)}),Mi=me(jt),ji=me(Dt),Di=be(Tt),Fi=be(Ot),Li=_e(jt),Ai=_e(Dt);function Ii(t){return Ft(t,Bi(t))}var $i=I?function(t){var e=null==t?mr:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&Re(t)?Je(t):mi(t)?I(t):[]}:Je;function Bi(t){if(null==t)return[];mi(t)||(t=h(t));var e=t.length;e=e&&Ue(e)&&(hi(t)||di(t))&&e||0;for(var n=t.constructor,i=-1,r="function"==typeof n&&n.prototype===t,o=O(e),s=0<e;++i<e;)o[i]=i+"";for(var a in t)s&&Ne(a,e)||"constructor"==a&&(r||!b.call(t,a))||o.push(a);return o}var Ri=we(!0),Ni=we(),Vi=ui(function(t,e){if(null==t)return{};if("function"!=typeof e[0])return e=at(Et(e),s),ze(t,wt(Bi(t),e));var i=te(e[0],e[1],3);return Ye(t,function(t,e,n){return!i(t,e,n)})});function Wi(t){t=Qe(t);for(var e=-1,n=$i(t),i=n.length,r=O(i);++e<i;){var o=n[e];r[e]=[o,t[o]]}return r}var Hi=ui(function(t,e){return null==t?{}:"function"==typeof e[0]?Ye(t,te(e[0],e[1],3)):ze(t,Et(e))});function Ui(t){return Kt(t,$i(t))}var qi=ue(function(t,e,n){return e=e.toLowerCase(),t+(n?e.charAt(0).toUpperCase()+e.slice(1):e)});function zi(t){return(t=Bo(t))&&t.replace(So,Wo).replace(vo,"")}var Yi=ue(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()});var Gi=xe(),Ki=xe(!0);function Xi(t,e){var n="";if(t=Bo(t),(e=+e)<1||!t||!A(e))return n;for(;e%2&&(n+=t),t+=t,e=F(e/2););return n}var Ji=ue(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Zi=ue(function(t,e,n){return t+(n?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))});function Qi(t,e,n){var i=t;return(t=Bo(t))?(n?Ve(i,e,n):null==e)?t.slice(Ko(t),Xo(t)+1):(e+="",t.slice(Ro(t,e),No(t,e)+1)):t}function tr(t,e,n){return n&&Ve(t,e,n)&&(e=mr),(t=Bo(t)).match(e||To)||[]}var er=ui(function(t,e){try{return t.apply(mr,e)}catch(t){return fi(t)?t:new i(t)}});function nr(t,e,n){return n&&Ve(t,e,n)&&(e=mr),Yo(t)?rr(t):mt(t,e)}function ir(t){return t}function rr(t){return Bt(yt(t,!0))}var or=ui(function(e,n){return function(t){return Be(t,e,n)}}),sr=ui(function(e,n){return function(t){return Be(e,t,n)}});function ar(i,t,e){if(null==e){var n=mi(t),r=n?$i(t):mr,o=r&&r.length?Ft(t,r):mr;(o?o.length:n)||(o=!1,e=t,t=i,i=this)}o=o||Ft(t,$i(t));var s=!0,a=-1,l=gi(i),u=o.length;!1===e?s=!1:mi(e)&&"chain"in e&&(s=e.chain);for(;++a<u;){var c=o[a],d=t[c];i[c]=d,l&&(i.prototype[c]=function(n){return function(){var t=this.__chain__;if(s||t){var e=i(this.__wrapped__);return(e.__actions__=it(this.__actions__)).push({func:n,args:arguments,thisArg:i}),e.__chain__=t,e}return n.apply(i,lt([this.value()],arguments))}}(d))}return i}function lr(){}function ur(t){return We(t)?Nt(t):function(e){var n=e+"";return e=tn(e),function(t){return Lt(t,e,n)}}(t)}var cr,dr=Te("ceil"),hr=Te("floor"),pr=pe(ci,W),fr=pe(ki,H),gr=Te("round");return X.prototype=J.prototype,(Z.prototype=vt(J.prototype)).constructor=Z,(Q.prototype=vt(J.prototype)).constructor=Q,tt.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},tt.prototype.get=function(t){return"__proto__"==t?mr:this.__data__[t]},tt.prototype.has=function(t){return"__proto__"!=t&&b.call(this.__data__,t)},tt.prototype.set=function(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this},et.prototype.push=function(t){var e=this.data;"string"==typeof t||mi(t)?e.set.add(t):e.hash[t]=!0},ri.Cache=tt,X.after=function(t,e){if("function"!=typeof e){if("function"!=typeof t)throw new v(Lr);var n=t;t=e,e=n}return t=A(t=+t)?t:0,function(){if(--t<1)return e.apply(this,arguments)}},X.ary=function(t,e,n){return n&&Ve(t,e,n)&&(e=mr),e=t&&null==e?t.length:$(+e||0,0),Me(t,Sr,mr,mr,mr,mr,e)},X.assign=Ei,X.at=En,X.before=Yn,X.bind=Gn,X.bindAll=Kn,X.bindKey=Xn,X.callback=nr,X.chain=Cn,X.chunk=function(t,e,n){e=(n?Ve(t,e,n):null==e)?1:$(F(e)||1,1);for(var i=0,r=t?t.length:0,o=-1,s=O(j(r/e));i<r;)s[++o]=Ut(t,i,i+=e);return s},X.compact=function(t){for(var e=-1,n=t?t.length:0,i=-1,r=[];++e<n;){var o=t[e];o&&(r[++i]=o)}return r},X.constant=function(t){return function(){return t}},X.countBy=Tn,X.create=function(t,e,n){var i=vt(t);return n&&Ve(t,e,n)&&(e=mr),e?pt(i,e):i},X.curry=Jn,X.curryRight=Zn,X.debounce=Qn,X.defaults=Ti,X.defaultsDeep=Oi,X.defer=ti,X.delay=ei,X.difference=nn,X.drop=rn,X.dropRight=on,X.dropRightWhile=function(t,e,n){return t&&t.length?Xt(t,je(e,n,3),!0,!0):[]},X.dropWhile=function(t,e,n){return t&&t.length?Xt(t,je(e,n,3),!0):[]},X.fill=function(t,e,n,i){var r=t?t.length:0;return r?(n&&"number"!=typeof n&&Ve(t,e,n)&&(n=0,i=r),function(t,e,n,i){var r=t.length;for((n=null==n?0:+n||0)<0&&(n=r<-n?0:r+n),(i=i===mr||r<i?r:+i||0)<0&&(i+=r),r=i<n?0:i>>>0,n>>>=0;n<r;)t[n++]=e;return t}(t,e,n,i)):[]},X.filter=Mn,X.flatten=function(t,e,n){var i=t?t.length:0;return n&&Ve(t,e,n)&&(e=!1),i?Et(t,e):[]},X.flattenDeep=function(t){return t&&t.length?Et(t,!0):[]},X.flow=ni,X.flowRight=ii,X.forEach=Fn,X.forEachRight=Ln,X.forIn=Di,X.forInRight=Fi,X.forOwn=Li,X.forOwnRight=Ai,X.functions=Ii,X.groupBy=An,X.indexBy=$n,X.initial=function(t){return on(t,1)},X.intersection=cn,X.invert=function(t,e,n){n&&Ve(t,e,n)&&(e=mr);for(var i=-1,r=$i(t),o=r.length,s={};++i<o;){var a=r[i],l=t[a];e?b.call(s,l)?s[l].push(a):s[l]=[a]:s[l]=a}return s},X.invoke=Bn,X.keys=$i,X.keysIn=Bi,X.map=Rn,X.mapKeys=Ri,X.mapValues=Ni,X.matches=rr,X.matchesProperty=function(t,e){return Rt(t,yt(e,!0))},X.memoize=ri,X.merge=Pi,X.method=or,X.methodOf=sr,X.mixin=ar,X.modArgs=oi,X.negate=function(t){if("function"!=typeof t)throw new v(Lr);return function(){return!t.apply(this,arguments)}},X.omit=Vi,X.once=function(t){return Yn(2,t)},X.pairs=Wi,X.partial=si,X.partialRight=ai,X.partition=Nn,X.pick=Hi,X.pluck=function(t,e){return Rn(t,ur(e))},X.property=ur,X.propertyOf=function(e){return function(t){return Lt(e,tn(t),t+"")}},X.pull=function(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var n=0,i=Le(),r=t.length;++n<r;)for(var o=0,s=t[n];-1<(o=i(e,s,o));)E.call(e,o,1);return e},X.pullAt=hn,X.range=function(t,e,n){n&&Ve(t,e,n)&&(e=n=mr),t=+t||0,null==e?(e=t,t=0):e=+e||0;for(var i=-1,r=$(j((e-t)/((n=null==n?1:+n||0)||1)),0),o=O(r);++i<r;)o[i]=t,t+=n;return o},X.rearg=li,X.reject=function(t,i,e){var n=hi(t)?st:St;return i=je(i,e,3),n(t,function(t,e,n){return!i(t,e,n)})},X.remove=function(t,e,n){var i=[];if(!t||!t.length)return i;var r=-1,o=[],s=t.length;for(e=je(e,n,3);++r<s;){var a=t[r];e(a,r,t)&&(i.push(a),o.push(r))}return Vt(t,o),i},X.rest=pn,X.restParam=ui,X.set=function(t,e,n){if(null==t)return t;for(var i=e+"",r=-1,o=(e=null!=t[i]||We(e,t)?[i]:tn(e)).length,s=o-1,a=t;null!=a&&++r<o;){var l=e[r];mi(a)&&(r==s?a[l]=n:null==a[l]&&(a[l]=Ne(e[r+1])?[]:{})),a=a[l]}return t},X.shuffle=function(t){return Hn(t,H)},X.slice=function(t,e,n){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&Ve(t,e,n)&&(e=0,n=i),Ut(t,e,n)):[]},X.sortBy=function(t,i,e){if(null==t)return[];e&&Ve(t,i,e)&&(i=mr);var r=-1;return i=je(i,e,3),zt($t(t,function(t,e,n){return{criteria:i(t,e,n),index:++r,value:t}}),Vo)},X.sortByAll=qn,X.sortByOrder=function(t,e,n,i){return null==t?[]:(i&&Ve(e,n,i)&&(n=mr),hi(e)||(e=null==e?[]:[e]),hi(n)||(n=null==n?[]:[n]),Yt(t,e,n))},X.spread=function(e){if("function"!=typeof e)throw new v(Lr);return function(t){return e.apply(this,t)}},X.take=function(t,e,n){return t&&t.length?((n?Ve(t,e,n):null==e)&&(e=1),Ut(t,0,e<0?0:e)):[]},X.takeRight=function(t,e,n){var i=t?t.length:0;return i?((n?Ve(t,e,n):null==e)&&(e=1),Ut(t,(e=i-(+e||0))<0?0:e)):[]},X.takeRightWhile=function(t,e,n){return t&&t.length?Xt(t,je(e,n,3),!1,!0):[]},X.takeWhile=function(t,e,n){return t&&t.length?Xt(t,je(e,n,3)):[]},X.tap=function(t,e,n){return e.call(n,t),t},X.throttle=function(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new v(Lr);return!1===n?i=!1:mi(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Qn(t,e,{leading:i,maxWait:+e,trailing:r})},X.thru=Sn,X.times=function(t,e,n){if((t=F(t))<1||!A(t))return[];var i=-1,r=O(B(t,U));for(e=te(e,n,1);++i<t;)i<U?r[i]=e(i):e(i);return r},X.toArray=Ci,X.toPlainObject=Si,X.transform=function(t,i,r,e){var n=hi(t)||xi(t);if(i=je(i,e,4),null==r)if(n||mi(t)){var o=t.constructor;r=n?hi(t)?new o:[]:vt(gi(o)?o.prototype:mr)}else r={};return(n?rt:jt)(t,function(t,e,n){return i(r,t,e,n)}),r},X.union=mn,X.uniq=yn,X.unzip=vn,X.unzipWith=bn,X.values=Ui,X.valuesIn=function(t){return Kt(t,Bi(t))},X.where=function(t,e){return Mn(t,Bt(e))},X.without=_n,X.wrap=function(t,e){return Me(e=null==e?ir:e,kr,mr,[t],[])},X.xor=function(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(Re(n))var i=i?lt(wt(i,n),wt(n,i)):n}return i?Gt(i):[]},X.zip=wn,X.zipObject=xn,X.zipWith=kn,X.backflow=ii,X.collect=Rn,X.compose=ii,X.each=Fn,X.eachRight=Ln,X.extend=Ei,X.iteratee=nr,X.methods=Ii,X.object=xn,X.select=Mn,X.tail=pn,X.unique=yn,ar(X,X),X.add=function(t,e){return(+t||0)+(+e||0)},X.attempt=er,X.camelCase=qi,X.capitalize=function(t){return(t=Bo(t))&&t.charAt(0).toUpperCase()+t.slice(1)},X.ceil=dr,X.clone=function(t,e,n,i){return e&&"boolean"!=typeof e&&Ve(t,e,n)?e=!1:"function"==typeof e&&(i=n,n=e,e=!1),"function"==typeof n?yt(t,e,te(n,i,1)):yt(t,e)},X.cloneDeep=function(t,e,n){return"function"==typeof e?yt(t,!0,te(e,n,1)):yt(t,!0)},X.deburr=zi,X.endsWith=function(t,e,n){e+="";var i=(t=Bo(t)).length;return n=n===mr?i:B(n<0?0:+n||0,i),0<=(n-=e.length)&&t.indexOf(e,n)==n},X.escape=function(t){return(t=Bo(t))&&lo.test(t)?t.replace(so,Ho):t},X.escapeRegExp=function(t){return(t=Bo(t))&&yo.test(t)?t.replace(mo,Uo):t||"(?:)"},X.every=On,X.find=jn,X.findIndex=sn,X.findKey=Mi,X.findLast=Dn,X.findLastIndex=an,X.findLastKey=ji,X.findWhere=function(t,e){return jn(t,Bt(e))},X.first=ln,X.floor=hr,X.get=function(t,e,n){var i=null==t?mr:Lt(t,tn(e),e+"");return i===mr?n:i},X.gt=ci,X.gte=function(t,e){return e<=t},X.has=function(t,e){if(null==t)return!1;var n=b.call(t,e);if(!n&&!We(e)){if(null==(t=1==(e=tn(e)).length?t:Lt(t,Ut(e,0,-1))))return!1;e=dn(e),n=b.call(t,e)}return n||Ue(t.length)&&Ne(e,t.length)&&(hi(t)||di(t))},X.identity=ir,X.includes=In,X.indexOf=un,X.inRange=function(t,e,n){return e=+e||0,n===mr?(n=e,e=0):n=+n||0,t>=B(e,n)&&t<$(e,n)},X.isArguments=di,X.isArray=hi,X.isBoolean=function(t){return!0===t||!1===t||Yo(t)&&_.call(t)==Br},X.isDate=function(t){return Yo(t)&&_.call(t)==Rr},X.isElement=function(t){return!!t&&1===t.nodeType&&Yo(t)&&!bi(t)},X.isEmpty=function(t){return null==t||(Re(t)&&(hi(t)||wi(t)||di(t)||Yo(t)&&gi(t.splice))?!t.length:!$i(t).length)},X.isEqual=pi,X.isError=fi,X.isFinite=function(t){return"number"==typeof t&&A(t)},X.isFunction=gi,X.isMatch=function(t,e,n,i){return n="function"==typeof n?te(n,i,3):mr,It(t,Ie(e),n)},X.isNaN=function(t){return vi(t)&&t!=+t},X.isNative=yi,X.isNull=function(t){return null===t},X.isNumber=vi,X.isObject=mi,X.isPlainObject=bi,X.isRegExp=_i,X.isString=wi,X.isTypedArray=xi,X.isUndefined=function(t){return t===mr},X.kebabCase=Yi,X.last=dn,X.lastIndexOf=function(t,e,n){var i=t?t.length:0;if(!i)return-1;var r=i;if("number"==typeof n)r=(n<0?$(i+n,0):B(n||0,i-1))+1;else if(n){var o=t[r=Zt(t,e,!0)-1];return(e==e?e===o:o!=o)?r:-1}if(e!=e)return zo(t,r,!0);for(;r--;)if(t[r]===e)return r;return-1},X.lt=ki,X.lte=function(t,e){return t<=e},X.max=pr,X.min=fr,X.noConflict=function(){return Fo._=p,this},X.noop=lr,X.now=zn,X.pad=function(t,e,n){e=+e;var i=(t=Bo(t)).length;if(e<=i||!A(e))return t;var r=(e-i)/2,o=F(r);return(n=Pe("",j(r),n)).slice(0,o)+t+n},X.padLeft=Gi,X.padRight=Ki,X.parseInt=function(t,e,n){return e=(n?Ve(t,e,n):null==e)?0:e&&+e,t=Qi(t),N(t,e||(xo.test(t)?16:10))},X.random=function(t,e,n){n&&Ve(t,e,n)&&(e=n=mr);var i=null==t,r=null==e;if(null==n&&(r&&"boolean"==typeof t?(n=t,t=1):"boolean"==typeof e&&(n=e,r=!0)),i&&r&&(r=!(e=1)),t=+t||0,r?(e=t,t=0):e=+e||0,n||t%1||e%1){var o=V();return B(t+o*(e-t+x("1e-"+((o+"").length-1))),e)}return Wt(t,e)},X.reduce=Vn,X.reduceRight=Wn,X.repeat=Xi,X.result=function(t,e,n){var i=null==t?mr:t[e];return i===mr&&(null==t||We(e,t)||(i=null==(t=1==(e=tn(e)).length?t:Lt(t,Ut(e,0,-1)))?mr:t[dn(e)]),i=i===mr?n:i),gi(i)?i.call(t):i},X.round=gr,X.runInContext=t,X.size=function(t){var e=t?Ae(t):0;return Ue(e)?e:$i(t).length},X.snakeCase=Ji,X.some=Un,X.sortedIndex=fn,X.sortedLastIndex=gn,X.startCase=Zi,X.startsWith=function(t,e,n){return t=Bo(t),n=null==n?0:B(n<0?0:+n||0,t.length),t.lastIndexOf(e,n)==n},X.sum=function(t,e,n){return n&&Ve(t,e,n)&&(e=mr),1==(e=je(e,n,3)).length?function(t,e){for(var n=t.length,i=0;n--;)i+=+e(t[n])||0;return i}(hi(t)?t:Ze(t),e):function(t,i){var r=0;return xt(t,function(t,e,n){r+=+i(t,e,n)||0}),r}(t,e)},X.template=function(s,t,e){var n=X.templateSettings;e&&Ve(s,t,e)&&(t=e=mr),s=Bo(s),t=ht(pt({},e||t),n,dt);var a,l,i=ht(pt({},t.imports),n.imports,dt),r=$i(i),o=Kt(i,r),u=0,c=t.interpolate||Po,d="__p += '",h=y((t.escape||Po).source+"|"+c.source+"|"+(c===ho?_o:Po).source+"|"+(t.evaluate||Po).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Mo+"]")+"\n";s.replace(h,function(t,e,n,i,r,o){return n=n||i,d+=s.slice(u,o).replace(Eo,qo),e&&(a=!0,d+="' +\n__e("+e+") +\n'"),r&&(l=!0,d+="';\n"+r+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=o+t.length,t}),d+="';\n";var f=t.variable;f||(d="with (obj) {\n"+d+"\n}\n"),d=(l?d.replace(no,""):d).replace(io,"$1").replace(ro,"$1;"),d="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(l?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=er(function(){return m(r,p+"return "+d).apply(mr,o)});if(g.source=d,fi(g))throw g;return g},X.trim=Qi,X.trimLeft=function(t,e,n){var i=t;return(t=Bo(t))?(n?Ve(i,e,n):null==e)?t.slice(Ko(t)):t.slice(Ro(t,e+"")):t},X.trimRight=function(t,e,n){var i=t;return(t=Bo(t))?(n?Ve(i,e,n):null==e)?t.slice(0,Xo(t)+1):t.slice(0,No(t,e+"")+1):t},X.trunc=function(t,e,n){n&&Ve(t,e,n)&&(e=mr);var i=Er,r=Tr;if(null!=e)if(mi(e)){var o="separator"in e?e.separator:o;i="length"in e?+e.length||0:i,r="omission"in e?Bo(e.omission):r}else i=+e||0;if(i>=(t=Bo(t)).length)return t;var s=i-r.length;if(s<1)return r;var a=t.slice(0,s);if(null==o)return a+r;if(_i(o)){if(t.slice(s).search(o)){var l,u,c=t.slice(0,s);for(o.global||(o=y(o.source,(wo.exec(o)||"")+"g")),o.lastIndex=0;l=o.exec(c);)u=l.index;a=a.slice(0,null==u?s:u)}}else if(t.indexOf(o,s)!=s){var d=a.lastIndexOf(o);-1<d&&(a=a.slice(0,d))}return a+r},X.unescape=function(t){return(t=Bo(t))&&ao.test(t)?t.replace(oo,Jo):t},X.uniqueId=function(t){var e=++d;return Bo(t)+e},X.words=tr,X.all=On,X.any=Un,X.contains=In,X.eq=pi,X.detect=jn,X.foldl=Vn,X.foldr=Wn,X.head=ln,X.include=In,X.inject=Vn,ar(X,(cr={},jt(X,function(t,e){X.prototype[e]||(cr[e]=t)}),cr),!1),X.sample=Hn,X.prototype.sample=function(e){return this.__chain__||null!=e?this.thru(function(t){return Hn(t,e)}):Hn(this.value())},X.VERSION=yr,rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){X[t].placeholder=X}),rt(["drop","take"],function(i,r){Q.prototype[i]=function(t){var e=this.__filtered__;if(e&&!r)return new Q(this);t=null==t?1:$(F(t)||0,0);var n=this.clone();return e?n.__takeCount__=B(n.__takeCount__,t):n.__views__.push({size:t,type:i+(n.__dir__<0?"Right":"")}),n},Q.prototype[i+"Right"]=function(t){return this.reverse()[i](t).reverse()}}),rt(["filter","map","takeWhile"],function(t,e){var i=e+1,r=i!=Fr;Q.prototype[t]=function(t,e){var n=this.clone();return n.__iteratees__.push({iteratee:je(t,e,1),type:i}),n.__filtered__=n.__filtered__||r,n}}),rt(["first","last"],function(t,e){var n="take"+(e?"Right":"");Q.prototype[t]=function(){return this[n](1).value()[0]}}),rt(["initial","rest"],function(t,e){var n="drop"+(e?"":"Right");Q.prototype[t]=function(){return this.__filtered__?new Q(this):this[n](1)}}),rt(["pluck","where"],function(t,e){var n=e?"filter":"map",i=e?Bt:ur;Q.prototype[t]=function(t){return this[n](i(t))}}),Q.prototype.compact=function(){return this.filter(ir)},Q.prototype.reject=function(e,t){return e=je(e,t,1),this.filter(function(t){return!e(t)})},Q.prototype.slice=function(t,e){t=null==t?0:+t||0;var n=this;return n.__filtered__&&(0<t||e<0)?new Q(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==mr&&(n=(e=+e||0)<0?n.dropRight(-e):n.take(e-t)),n)},Q.prototype.takeRightWhile=function(t,e){return this.reverse().takeWhile(t,e).reverse()},Q.prototype.toArray=function(){return this.take(H)},jt(Q.prototype,function(d,t){var h=/^(?:filter|map|reject)|While$/.test(t),p=/^(?:first|last)$/.test(t),f=X[p?"take"+("last"==t?"Right":""):t];f&&(X.prototype[t]=function(){var e=p?[1]:arguments,n=this.__chain__,t=this.__wrapped__,i=!!this.__actions__.length,r=t instanceof Q,o=e[0],s=r||hi(t);function a(t){return p&&n?f(t,1)[0]:f.apply(mr,lt([t],e))}s&&h&&"function"==typeof o&&1!=o.length&&(r=s=!1);var l={func:Sn,args:[a],thisArg:mr},u=r&&!i;if(p&&!n)return u?((t=t.clone()).__actions__.push(l),d.call(t)):f.call(mr,this.value())[0];if(p||!s)return this.thru(a);t=u?t:new Q(this);var c=d.apply(t,e);return c.__actions__.push(l),new Z(c,n)})}),rt(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?u:a)[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:join|pop|replace|shift)$/.test(t);X.prototype[t]=function(){var e=arguments;return r&&!this.__chain__?n.apply(this.value(),e):this[i](function(t){return n.apply(t,e)})}}),jt(Q.prototype,function(t,e){var n=X[e];if(n){var i=n.name;(K[i]||(K[i]=[])).push({name:e,func:n})}}),K[Se(mr,br).name]=[{name:"wrapper",func:mr}],Q.prototype.clone=function(){var t=new Q(this.__wrapped__);return t.__actions__=it(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=it(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=it(this.__views__),t},Q.prototype.reverse=function(){if(this.__filtered__){var t=new Q(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Q.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=hi(t),i=e<0,r=n?t.length:0,o=function(t,e,n){for(var i=-1,r=n.length;++i<r;){var o=n[i],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=B(e,t+s);break;case"takeRight":t=$(t,e-s)}}return{start:t,end:e}}(0,r,this.__views__),s=o.start,a=o.end,l=a-s,u=i?a:s-1,c=this.__iteratees__,d=c.length,h=0,p=B(l,this.__takeCount__);if(!n||r<jr||r==l&&p==l)return Jt(i&&n?t.reverse():t,this.__actions__);var f=[];t:for(;l--&&h<p;){for(var g=-1,m=t[u+=e];++g<d;){var y=c[g],v=y.iteratee,b=y.type,_=v(m);if(b==Fr)m=_;else if(!_){if(b==Dr)continue t;break t}}f[h++]=m}return f},X.prototype.chain=function(){return Cn(this)},X.prototype.commit=function(){return new Z(this.value(),this.__chain__)},X.prototype.concat=Pn,X.prototype.plant=function(t){for(var e,n=this;n instanceof J;){var i=en(n);e?r.__wrapped__=i:e=i;var r=i;n=n.__wrapped__}return r.__wrapped__=t,e},X.prototype.reverse=function(){function t(t){return n&&n.__dir__<0?t:t.reverse()}var e=this.__wrapped__;if(e instanceof Q){var n=e;return this.__actions__.length&&(n=new Q(this)),(n=n.reverse()).__actions__.push({func:Sn,args:[t],thisArg:mr}),new Z(n,this.__chain__)}return this.thru(t)},X.prototype.toString=function(){return this.value()+""},X.prototype.run=X.prototype.toJSON=X.prototype.valueOf=X.prototype.value=function(){return Jt(this.__wrapped__,this.__actions__)},X.prototype.collect=X.prototype.map,X.prototype.head=X.prototype.first,X.prototype.select=X.prototype.filter,X.prototype.tail=X.prototype.rest,X}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Fo._=Zo,define(function(){return Zo})):d&&h?m?(h.exports=Zo)._=Zo:d._=Zo:Fo._=Zo}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],103:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),t("./modules/initializeSentry");var l=t("jquery");t("nodelist-foreach-polyfill");var a=t("./modules/Display"),i=t("./view_presenter/WorkEditor"),r=t("./view_presenter/WorkEditor/OpenOption"),o=t("./view_presenter/WorkEditor/BaseColorSampler"),u=t("./view_presenter/WorkEditor/TableOfContentsEditor"),c=t("./view_presenter/WorkEditor/TableOfContentsSelector"),d=t("./view_presenter/WorkEditor/TableOfContentsDefaultBulkAction"),h=t("./view_presenter/WorkEditor/TableOfContentsEditBulkAction"),s=t("./view_presenter/WorkEditor/UserEventSelector"),p=t("./view_presenter/FormInputProtector"),f=t("./view_presenter/TabButtons"),g=t("./view_presenter/EpisodeEditor"),m=t("./view_presenter/My/RewardBarPopup"),y=t("./view_presenter/My/RewardWithdrawSlider"),v=t("./view_presenter/FollowButtons"),b=t("./view_presenter/FollowerCounter"),_=t("./view_presenter/WorkReviewLikeButton"),w=t("./view_presenter/ReviewPointChanger"),x=t("./view_presenter/ReviewForm"),k=t("./view_presenter/ConfirmSubmitForm"),C=t("./view_presenter/OnetimeForm"),S=t("./view_presenter/LoginForm"),P=t("./view_presenter/ContentLoadView"),E=t("./view_presenter/SearchingConditionHistoryList"),T=t("./view_presenter/XHRForm"),O=t("./view_presenter/ReadMoreButton"),M=t("./view_presenter/ModelessMessageBox"),j=t("./view_presenter/EpisodeViewer"),D=t("./view_presenter/EpisodeCommentList"),F=t("./view_presenter/Notification/NoticesPanelButton"),L=t("./view_presenter/TouchGlobalNavOthersPopupButton"),A=t("./view_presenter/TouchAppLinkButton"),I=t("./view_presenter/FaviconSwitcher"),$=t("./view_presenter/SearchContestFilter"),B=t("./view_presenter/FormNoteOpener"),R=t("./view_presenter/OnetimeFocusReaction"),N=t("./view_presenter/PopupPanelButton"),V=t("./view_presenter/ModalWindow"),W=t("./view_presenter/OpenModalWindowButton"),H=t("./view_presenter/TogglePanelButton"),U=t("./view_presenter/ToggleSearchCustomRangeInputPanel"),q=t("./view_presenter/LoadPanelButton"),z=t("./router/global_router"),Y=t("./view_presenter/FeedList"),G=t("./view_presenter/PublicationFeedList"),K=t("./view_presenter/ShareButtonWindow"),X=t("./view_presenter/PageSelector"),J=t("./view_presenter/EditingModeSwitcher"),Z=t("./view_presenter/PersistentHideablePanel"),Q=t("./view_presenter/PersistentTogglePanelButton"),tt=t("./view_presenter/DeleteHistoryButtons"),et=t("./view_presenter/WritingSideHeader"),nt=t("./view_presenter/CreateWorkFollowingLabelTypePanel"),it=t("./view_presenter/AntennaWorks/AntennaWorksModeContainer"),rt=t("./view_presenter/OverallCheckbox"),ot=t("./view_presenter/AntennaWorks/WorkFollowingLabelTypesContainer"),st=t("./view_presenter/AntennaWorks/RenameWorkFollowingLabelTypePanel"),at=t("./view_presenter/AddWorkFollowingLabelTypesPanel"),lt=t("./view_presenter/AntennaWorks/WorkFollowingLabelTypeNameContainer"),ut=t("./view_presenter/AntennaWorks/AntennaWorkList"),ct=t("./view_presenter/RemoveWorkFollowingLabelTypeButton"),dt=t("./view_presenter/AntennaWorks/TouchAntennaWorksModeContainer"),ht=t("./view_presenter/MultiplePanel"),pt=t("./view_presenter/AntennaWorks/TouchAntennaWorksBulkActionsMenuContainer"),ft=t("./view_presenter/AntennaWorks/TouchAntennaWorksFilterSelectorModeHeader"),gt=t("./view_presenter/AddWorkFollowingLabelTypeButtonContainer"),mt=t("./view_presenter/AntennaWorks/SelectedWorkCount"),yt=t("./view_presenter/DeleteWorkUserEventModal"),vt=t("./view_presenter/EditWorkUserEvent"),bt=t("./view_presenter/VerticalScrollButton"),_t=t("./view_presenter/TagsAndUsersLazySearchView"),wt=t("./view_presenter/SearchForm"),xt=t("./view_presenter/WorkCollectionEditor"),kt=t("./view_presenter/WorkCollectionPinEditor"),Ct=t("./view_presenter/ReadingRecordChartView"),St=t("./view_presenter/ClipboardButton"),Pt=t("./view_presenter/ImageUploadButton");z.default.connect(/^/,function(){var t=l(".js-modeless-message-box");t.length&&new M.ModelessMessageBoxView(t);var e=!!+l(document.documentElement).attr("data-is-guest");e||new v.FollowButtonsView(l(document.body)),e||l(".js-work-review-like-button").each(function(t,e){var n=l(e);new _.WorkReviewLikeButtonView(n,n.closest(".js-work-review-like-button-container"))}),new k.ConfirmSubmitFormView,new C.OnetimeFormView;var n=l(".js-notification-notices-button");n.length&&new F.NoticesPanelButtonView(n);var i=l(".js-touch-global-sidebar-open-button");i.length&&new W.OpenModalWindowButtonView(i);var r=l(".js-touch-global-sidebar-modal-container");r.length&&new V.ModalWindowView(r);var o=l(".js-touch-global-nav-others-popup-button");o.length&&new L.TouchGlobalNavOthersPopupButtonView(o),l(".js-touch-app-link-button").each(function(t,e){new A.TouchAppLinkButtonView(l(e))}),l(".js-dynamic-links-button-panel").each(function(t,e){new Z.PersistentHideablePanelView(l(e))});var s=l(".js-share-button-window");s.length&&new K.ShareButtonWindowView(s),document.querySelectorAll(".js-clipboard-button").forEach(function(t){return new St.ClipboardButtonView(t)}),l(".js-guest-signup-modal-open-button").each(function(t,e){new W.OpenModalWindowButtonView(l(e))}),l(".js-guest-signup-modal-container").each(function(t,e){new V.ModalWindowView(l(e))});var a=l(".js-global-header-search-container");!e&&a.length&&new wt.SearchFormView(a),new I.FaviconSwitcherView(l(".js-favicon")),l(".js-parsisent-toggle-panel-button").each(function(t,e){new Q.PersistentTogglePanelButtonView(l(e))})}),z.default.connect("public:top",function(){l(".js-start-modal-container").each(function(t,e){new V.ModalWindowView(l(e))}),new Y.FeedListView(l(".js-top-blog-feed-container"));var t=document.querySelector(".js-reading-histories-for-guest-container");t&&new P.ContentLoadView(t)}),z.default.connect("public:top.touch",function(){l(".js-start-modal-container").each(function(t,e){new V.ModalWindowView(l(e))}),new Y.FeedListView(l(".js-top-blog-feed-container"));var t=document.querySelector(".js-reading-histories-for-guest-container");t&&new P.ContentLoadView(t)}),z.default.connect("public:explore",function(){var t=!!+document.documentElement.dataset.isGuest,e=l(".js-searching-condition-history-section .js-searching-condition-history-list");!t&&e.length&&new E.SearchingConditionHistoryListView(e)}),z.default.connect("public:search",function(){var t=l(".js-search-contest-filter-container");t.length&&new $.SearchContestFilterView(t),document.querySelectorAll(".js-custom-range-input-container").forEach(function(t){new U.ToggleSearchCustomRangeInputPanelView(t)});var e=!!+document.documentElement.dataset.isGuest,n=l(".js-searching-condition-history-section .js-searching-condition-history-list");!e&&n.length&&new E.SearchingConditionHistoryListView(n);var i=document.querySelector("#js-search-result-tags-and-users-container");i&&new _t.TagsAndUsersLazySearchView(i)}),z.default.connect("public:search.touch",function(){var t=l(".js-search-contest-filter-container");t.length&&new $.SearchContestFilterView(t),new N.PopupPanelButtonView(l(".js-sort-popup-panel-button")),new N.PopupPanelButtonView(l(".js-filter-popup-panel-button"));var e=document.querySelector("#js-search-result-tags-and-users-container");e&&new _t.TagsAndUsersLazySearchView(e),document.querySelectorAll(".js-custom-range-input-container").forEach(function(t){new U.ToggleSearchCustomRangeInputPanelView(t)})}),z.default.connect("public:signup",function(){new B.FormNoteOpenerView(l(".js-signup-form-field-container"))}),z.default.connect(/^public:my\b/,function(){var t=l(".js-viewer-writing-side-header");t.length&&new et.WritingSideHeaderView(t)}),z.default.connect("public:my:dashboard",function(){new Y.FeedListView(l(".js-my-feed-container"));var t=l(".js-reward-bar-popup-container");t.length&&new m.RewardBarPopupView(t)}),z.default.connect("public:my:works_detail",function(){l(".js-scroll-button").each(function(t,e){new bt.VerticalScrollButtonView(l(e))});var t=l(".js-toc-editor-list");if(t.length){var e=l(".js-toc"),n=new c.TableOfContentsSelectorView(e);new d.TableOfContentsDefaultBulkActionView(e,n.overallCheckbox);var i=l(".js-toc-editor-insertion-point-field"),r=l(".js-toc-editor-insert-chapter-button");new u.TableOfContentsEditorView(t,i,r),l(".js-chapter-modal-open-button").each(function(t,e){new W.OpenModalWindowButtonView(l(e))}),l(".js-chapter-modal-container").each(function(t,e){new V.ModalWindowView(l(e))});var o=l(".js-toc-edit"),s=new c.TableOfContentsSelectorView(o);new h.TableOfContentsEditBulkActionView(o,s.overallCheckbox),e.find(".js-toc-edit-button").on("click",function(){a.toggleDisplayClass(e,!1),a.toggleDisplayClass(o,!0)})}}),z.default.connect("public:my:works:edit",function(){var e=l(".js-work-editor-form");new i.WorkEditorView(e),new r.OpenOptionView(l(".js-work-editor-option")),new o.BaseColorSamplerView(l(".js-work-base-color-section")),new f.TabButtonsView(l(".js-work-base-color-tab-button")),new O.ReadMoreButtonView(l(".js-work-tag-sample"));var t=l(".js-user-event-selector");t.length&&new s.UserEventSelectorView(t),new f.TabButtonsView(l(".js-work-editing-tab-button")),new p.FormInputProtectorView(e);function n(t){e.trigger("dcv:forminputprotector:command:dismiss")}e.on("dcv:workeditorform:save",n),l(".js-work-delete-form").on("dcv:confirmsubmitform:submit",n),l(".js-work-unpublish-form").on("dcv:confirmsubmitform:submit",n)}),z.default.connect("public:my:collections:edit",function(){new xt.WorkCollectionEditorView(l(".js-work-collection-form"),l(".js-collection-work-selector"),l(".js-collection-work-template"))}),z.default.connect("public:my:reactions",function(){new D.EpisodeCommentListView(l(".js-episode-comment-list"));var e=l(".js-filter-reaction-type-form");e.on("change",function(t){e.submit()}),l(".js-reaction-text-container").each(function(t,e){new O.ReadMoreButtonView(l(e))})}),z.default.connect("public:my:works:episodes:edit",function(){new g.EpisodeEditorView}),z.default.connect("public:my:works:episodes:published",function(){new H.TogglePanelButtonView(l(".js-toggle-copy-work-url-panel-button"))}),z.default.connect("public:my:rewards.loyalty",function(){var t=l(".js-reward-bar-popup-container");t.length&&new m.RewardBarPopupView(t);var e=l(".js-recent-ad-pv-tab-button");e.length&&new f.TabButtonsView(e);var n=l(".js-recent-ad-score-tab-button");n.length&&new f.TabButtonsView(n)}),z.default.connect("public:my:rewards:withdrawal",function(){var t=l(".js-reward-slider-container");t.length&&new y.RewardWithdrawSliderView(t)}),z.default.connect("public:my:antenna:works",function(){new ot.WorkFollowingLabelTypesContainerView(l(".js-work-following-label-type-container")),new nt.CreateWorkFollowingLabelTypePanelView(l(".js-createPopup-container").find(".js-work-following-label-type-create-panel")),new N.PopupPanelButtonView(l(".js-work-following-label-type-create-panel-button"));var t=l(".js-multiple-panel"),e=l(".js-work-following-label-types-add-panel-button");new at.AddWorkFollowingLabelTypesPanelView(l(".js-work-following-label-types-add-panel"),l(".js-antenna-work-list"),e),new nt.CreateWorkFollowingLabelTypePanelView(t.find(".js-work-following-label-type-create-panel")),new N.PopupPanelButtonView(e),new ht.MultiplePanelView(t);var n=l(".js-work-following-label-type-remove-button");0<n.length&&new ct.RemoveWorkFollowingLabelTypeButtonView(n,l(".js-antenna-work-list"));var i=l(".js-overall-checkbox"),r=new rt.OverallCheckboxView(i,l(".js-overall-checkbox-container"),".js-overall-checkbox-element");new it.AntennaWorksModeContainerView(l(".js-antenna-works-mode-container"),r),new st.RenameWorkFollowingLabelTypePanelView(l(".js-rename-work-following-label-type-panel"),l(".js-rename-work-following-label-type-panel-open-button")),new lt.WorkFollowingLabelTypeNameContainerView(l(".js-work-following-label-type-name-container")),new ut.AntennaWorkListView(l(".js-antenna-work-list"),l(".js-antenna-works-pager-container"),i)}),z.default.connect("public:my:antenna:works.touch",function(){var t=l(".js-antenna-work-list");new dt.TouchAntennaWorksModeContainerView(l(".js-antenna-works-mode-container"),t),new ot.WorkFollowingLabelTypesContainerView(l(".js-work-following-label-type-container"));var e=l(".js-overall-checkbox"),n=new rt.OverallCheckboxView(e,l(".js-overall-checkbox-container"),".js-overall-checkbox-element");new pt.TouchAntennaWorksBulkActionsMenuContainerView(l(".js-antenna-works-bulk-actions-menu-container"),l(".js-antenna-works-bulk-actions-menu-container-default-button"),n),new W.OpenModalWindowButtonView(l(".js-create-work-following-label-type-button"));var i=l(".js-create-work-following-label-type-modal-container");new V.ModalWindowView(i),new nt.CreateWorkFollowingLabelTypePanelView(i.find(".js-work-following-label-type-create-panel")),new f.TabButtonsView(l(".js-select-work-filter-button")),new ft.TouchAntennaWorksFilterSelectorModeHeaderView(l(".js-filter-selector-mode-header"),l(".js-filter-selector-mode-header-show-top-button"),l(".js-filter-selector-mode-header-show-genre-button"),l(".js-filter-selector-mode-header-show-status-button"),l(".js-filter-selector-mode-header-show-order-button"));var r=l(".js-edit-work-following-label-type-modal-container");r.length&&(new W.OpenModalWindowButtonView(l(".js-edit-work-following-label-type-button")),new V.ModalWindowView(r),new st.RenameWorkFollowingLabelTypePanelView(l(".js-rename-work-following-label-type-panel"),l(".js-rename-work-following-label-type-panel-open-button")),new lt.WorkFollowingLabelTypeNameContainerView(l(".js-work-following-label-type-name-container"))),new W.OpenModalWindowButtonView(l(".js-add-work-following-label-type-button"));var o=l(".js-add-work-following-label-type-modal-container");new V.ModalWindowView(o),new gt.AddWorkFollowingLabelTypeButtonContainerView(l(".js-work-following-label-type-add-button-container"),t);var s=l("#modal-addWorkFollowingLabelType").find(".js-multiple-panel");new ht.MultiplePanelView(s),new nt.CreateWorkFollowingLabelTypePanelView(s.find(".js-work-following-label-type-create-panel")),new mt.SelectedWorkCountView(l(".js-work-selected-work-count"),n);var a=l(".js-remove-work-following-label-type-modal-container");a.length&&(new W.OpenModalWindowButtonView(l(".js-remove-work-following-label-type-button")),new V.ModalWindowView(a),new ct.RemoveWorkFollowingLabelTypeButtonView(l(".js-remove-work-following-label-type-modal-submit-button"),t)),new ut.AntennaWorkListView(t,l(".js-antenna-works-pager-container"),e)}),z.default.connect("public:my:antenna:reading_histories",function(){var t=l(".js-reading-histories-container");new J.EditingModeSwitcherView(t,l(".js-reading-history-edit-button"),l(".js-editable-element")),new tt.DeleteHistoryButtonsView(t);var e=l(".js-work-following-label-type-container");0<e.length&&new ot.WorkFollowingLabelTypesContainerView(e),new nt.CreateWorkFollowingLabelTypePanelView(l(".js-work-following-label-type-create-panel")),new N.PopupPanelButtonView(l(".js-work-following-label-type-create-panel-button"))}),z.default.connect("public:my:antenna:users",function(){l(".js-load-user-activities-button").each(function(t,e){new q.LoadPanelButtonView(l(e))})}),z.default.connect("public:my:reading_records",function(){var t=document.querySelector(".js-reading-chart-container");t&&new Ct.ReadingRecordChartView(t)}),z.default.connect("public:my:searching_condition",function(){var t=l(".js-searching-condition-history-section");new J.EditingModeSwitcherView(t,l(".js-searching-condition-history-edit-button"),l(".js-editable-element")),new E.SearchingConditionHistoryListView(t)}),z.default.connect(/^public:works:/,function(){var t=!!+l(document.documentElement).attr("data-is-guest"),e=l(".js-review-point-container");if(!t&&0!==e.length){var n={$totalReviewPointElements:l(".js-total-review-point-element"),$reviewCountElements:l(".js-review-count-element"),$reviewEditingLink:l(".js-review-editing-link")};new w.ReviewPointChangerView(e,n)}var i=l(".js-signup-balloon-tab-button");i.length&&new f.TabButtonsView(i)}),z.default.connect(/^public:works:work(?:\.touch)?$/,function(){!+l(document.documentElement).attr("data-is-guest")&&new b.FollowerCounterView(l(".js-follow-button-follower-counter"),l(".js-follow-button"));var t=l(".js-work-introduction");t.length&&new O.ReadMoreButtonView(t)}),z.default.connect("public:works:episodes:episode",function(){new j.EpisodeViewerView}),z.default.connect("public:works:episodes:comments",function(){new D.EpisodeCommentListView(l(".js-episode-comment-list"))}),z.default.connect("public:login",function(){new S.LoginFormView(l(".js-login-form"))}),z.default.connect("public:violation_report",function(){new T.XHRFormView(l(".js-violation-report"))}),z.default.connect(/^public:users:/,function(){new O.ReadMoreButtonView(l(".js-user-profile-text-container"));var t=l(".js-user-block-ui-container");l(".js-follow-button").on("dcv:followbuttons:unblock",function(){a.toggleDisplayClass(t,!0)}),l(".js-follow-button").on("dcv:followbuttons:follow",function(){a.toggleDisplayClass(t,!1)}),l(".js-follow-button").on("dcv:followbuttons:unfollow",function(){a.toggleDisplayClass(t,!0)});var e=l(".js-user-block-modal-open-button");e.length&&new W.OpenModalWindowButtonView(e);var n=l(".js-user-block-modal-container");n.length&&new V.ModalWindowView(n)}),z.default.connect("public:users:user",function(){var t=l(".js-publication-label-feed-container").first();t.length&&new Y.FeedListView(t)}),z.default.connect("public:users:collections:show",function(){var t=l(".js-collection-description");t.length&&new O.ReadMoreButtonView(t)}),z.default.connect("public:my:news:edit",function(){var t=l(".js-news-upload-image");t.length&&new Pt.ImageUploadButtonView(t)}),z.default.connect("public:users:news:entry",function(){var t=l(".js-onetime-focus-reaction-field");t.length&&new R.OnetimeFocusReactionView(t)}),z.default.connect("public:works:reviews:edit",function(){var t=l(".js-review-form");new x.ReviewFormView(t),new p.FormInputProtectorView(t),l("form").on("submit",function(){t.trigger("dcv:forminputprotector:command:dismiss")})}),z.default.connect(/^public:contests:/,function(){var t=l(".js-contest-feed-container");t.length&&new Y.FeedListView(t);var e=l(".js-page-selector");e.length&&new X.PageSelectorView(e)}),z.default.connect("public:anatanomachi:default",function(){var t=l(".js-anatanomachi-feed-container");new Y.FeedListView(t);var e=l(".js-text-toggle-button"),n=l(".js-text-panel");e.on("click",function(t){n.toggleClass("isOpen")})}),z.default.connect("public:official",function(){new Y.FeedListView(l(".js-official-info-feed-container")),new G.PublicationFeedListView(l(".js-publication-feed-container"))}),z.default.connect("public:official.touch",function(){new Y.FeedListView(l(".js-official-info-feed-container")),new G.PublicationFeedListView(l(".js-publication-feed-container")),l(".js-official-label-panel-button").each(function(t,e){new H.TogglePanelButtonView(l(e))})}),z.default.connect("public:guide:write",function(){new Y.FeedListView(l(".js-publication-feed-container"))}),z.default.connect("public:settings",function(){new f.TabButtonsView(l(".js-setting-tab-button"))}),z.default.connect("public:settings:profile",function(){new kt.WorkCollectionPinEditorView(l(".js-profile-form"),l(".js-collection-selector"),l(".js-collection-template"))}),z.default.connect("public:settings:loyalty:enter",function(){new O.ReadMoreButtonView(l(".js-loyalty-policy-container"))}),z.default.connect("public:settings:loyalty:edit_bank",function(){new B.FormNoteOpenerView(l(".js-noted-form-field-container"))}),z.default.connect("public:user_events:user_event",function(){var t=l(".js-pc-edit-work-user-event-button");t.length&&new J.EditingModeSwitcherView(l(".js-entered-works-list"),t,l(".js-editable-element"));var e=l(".js-touch-edit-work-user-event-button");e.length&&new vt.EditWorkUserEventView(l(".js-entered-works"),e,l(".js-work-userevent-done-panel"));var n=l(".js-work-userevent-delete-modal");n.length&&new yt.DeleteWorkUserEventModalView(l(".js-entered-works-list"),n,l(".js-entered-works-count"))}),z.default.connect("public:rankings",function(){var t=l(".js-touch-ranking-genre-popup-panel-button");t.length&&new N.PopupPanelButtonView(t)}),z.default.connect("public:error_page:not_found",function(){new G.PublicationFeedListView(l(".js-publication-feed-container")),new O.ReadMoreButtonView(l(".js-not-found-information-container"))}),z.default.connect("app:view:works:work_end",function(){new f.TabButtonsView(l(".js-work-end-tab-button"));var t=!!+l(document.documentElement).attr("data-is-guest");t||new b.FollowerCounterView(l(".js-follow-button-follower-counter"),l(".js-follow-button"));var e=l(".js-review-point-container");if(!t&&0!==e.length){var n={$totalReviewPointElements:l(".js-total-review-point-element"),$reviewCountElements:l(".js-review-count-element"),$reviewEditingLink:l(".js-review-editing-link")};new w.ReviewPointChangerView(e,n)}}),l().ready(function(){var t=l(document.documentElement).attr("data-route")||"";z.default.dispatch(t)}),window.$=l},{"./modules/Display":116,"./modules/initializeSentry":130,"./router/global_router":132,"./view_presenter/AddWorkFollowingLabelTypeButtonContainer":133,"./view_presenter/AddWorkFollowingLabelTypesPanel":134,"./view_presenter/AntennaWorks/AntennaWorkList":135,"./view_presenter/AntennaWorks/AntennaWorksModeContainer":136,"./view_presenter/AntennaWorks/RenameWorkFollowingLabelTypePanel":137,"./view_presenter/AntennaWorks/SelectedWorkCount":138,"./view_presenter/AntennaWorks/TouchAntennaWorksBulkActionsMenuContainer":139,"./view_presenter/AntennaWorks/TouchAntennaWorksFilterSelectorModeHeader":140,"./view_presenter/AntennaWorks/TouchAntennaWorksModeContainer":141,"./view_presenter/AntennaWorks/WorkFollowingLabelTypeNameContainer":142,"./view_presenter/AntennaWorks/WorkFollowingLabelTypesContainer":143,"./view_presenter/ClipboardButton":145,"./view_presenter/ConfirmSubmitForm":147,"./view_presenter/ContentLoadView":148,"./view_presenter/CreateWorkFollowingLabelTypePanel":149,"./view_presenter/DeleteHistoryButtons":150,"./view_presenter/DeleteWorkUserEventModal":151,"./view_presenter/EditWorkUserEvent":152,"./view_presenter/EditingModeSwitcher":153,"./view_presenter/EpisodeCommentList":154,"./view_presenter/EpisodeEditor":158,"./view_presenter/EpisodeViewer":170,"./view_presenter/FaviconSwitcher":191,"./view_presenter/FeedList":192,"./view_presenter/FollowButtons":193,"./view_presenter/FollowerCounter":194,"./view_presenter/FormInputProtector":195,"./view_presenter/FormNoteOpener":196,"./view_presenter/ImageUploadButton":197,"./view_presenter/LoadPanelButton":198,"./view_presenter/LoginForm":199,"./view_presenter/ModalWindow":200,"./view_presenter/ModelessMessageBox":201,"./view_presenter/MultiplePanel":202,"./view_presenter/My/RewardBarPopup":203,"./view_presenter/My/RewardWithdrawSlider":204,"./view_presenter/Notification/NoticesPanelButton":205,"./view_presenter/OnetimeFocusReaction":206,"./view_presenter/OnetimeForm":207,"./view_presenter/OpenModalWindowButton":208,"./view_presenter/OverallCheckbox":209,"./view_presenter/PageSelector":210,"./view_presenter/PersistentHideablePanel":211,"./view_presenter/PersistentTogglePanelButton":212,"./view_presenter/PopupPanelButton":213,"./view_presenter/PublicationFeedList":214,"./view_presenter/ReadMoreButton":215,"./view_presenter/ReadingRecordChartView":216,"./view_presenter/RemoveWorkFollowingLabelTypeButton":217,"./view_presenter/ReviewForm":218,"./view_presenter/ReviewPointChanger":219,"./view_presenter/SearchContestFilter":220,"./view_presenter/SearchForm":221,"./view_presenter/SearchingConditionHistoryList":222,"./view_presenter/ShareButtonWindow":223,"./view_presenter/TabButtons":224,"./view_presenter/TagsAndUsersLazySearchView":225,"./view_presenter/TogglePanelButton":226,"./view_presenter/ToggleSearchCustomRangeInputPanel":227,"./view_presenter/TouchAppLinkButton":228,"./view_presenter/TouchGlobalNavOthersPopupButton":229,"./view_presenter/VerticalScrollButton":231,"./view_presenter/WorkCollectionEditor":232,"./view_presenter/WorkCollectionPinEditor":233,"./view_presenter/WorkEditor":234,"./view_presenter/WorkEditor/BaseColorSampler":235,"./view_presenter/WorkEditor/OpenOption":236,"./view_presenter/WorkEditor/TableOfContentsDefaultBulkAction":237,"./view_presenter/WorkEditor/TableOfContentsEditBulkAction":238,"./view_presenter/WorkEditor/TableOfContentsEditor":239,"./view_presenter/WorkEditor/TableOfContentsSelector":240,"./view_presenter/WorkEditor/UserEventSelector":241,"./view_presenter/WorkReviewLikeButton":244,"./view_presenter/WritingSideHeader":245,"./view_presenter/XHRForm":246,jquery:96,"nodelist-foreach-polyfill":98}],104:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r=t("../modules/Net"),o=t("jquery"),s="countupdate",a="cheersupdate",l=(u.getInstance=function(t){var e=u.instances;return e[t]||(e[t]=new u(t))},Object.defineProperty(u.prototype,"count",{get:function(){return this.hasBeenFetched?this.cheers.length:this.summaryCount},enumerable:!0,configurable:!0}),u.prototype.setSummaryCount=function(t){this.summaryCount=t,this.hasBeenFetched||this.emit(s)},u.prototype.fetch=function(){var n=this,t=this.episodePermalinkPath+"/cheers.json";return r.ajax(t).then(function(t){var e=t.cheers.map(function(t){return{cheererPermalinkPath:t.cheerer.permalink_path,cheererActivityName:t.cheerer.activity_name,createdAt:new Date(1e3*t.created_at)}});n.cheers=e,n.hasBeenFetched=!0,n.emit(a),n.emit(s)},function(t){var e=t&&t.error&&t.error.message||"";return o.Deferred().reject(new Error(e)).promise()})},u.prototype.addCheer=function(e,t,n){this.hasBeenFetched?this.cheers.some(function(t){return t.cheererPermalinkPath===e})||(this.cheers.unshift({cheererPermalinkPath:e,cheererActivityName:t,createdAt:n}),this.emit(a),this.emit(s)):this.setSummaryCount(this.summaryCount+1)},u.prototype.removeCheer=function(t){if(this.hasBeenFetched){for(var e=0;e<this.cheers.length;e++)if(this.cheers[e].cheererPermalinkPath===t)return this.cheers.splice(e,1),this.emit(a),void this.emit(s)}else 0<this.summaryCount&&this.setSummaryCount(this.summaryCount-1)},u.instances={},u);function u(t){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit,this.episodePermalinkPath=t,this.cheers=[],this.summaryCount=0,this.hasBeenFetched=!1}n.default=l},{"../modules/Emittable":117,"../modules/Net":122,jquery:96}],105:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r=t("./EpisodeCheerCollection"),o=t("../modules/Net"),s=t("jquery"),a=(l.getInstance=function(t,e,n){var i=l.instances,r=t+" "+n;return i[r]||(i[r]=new l(t,e,n))},l.prototype.setIsCheering=function(t){t!==this.isCheering&&(this.isCheering=t,this.emit("statusupdate"))},l.prototype.createCheer=function(){return this.createOrDeleteCheer(!0)},l.prototype.deleteCheer=function(){return this.createOrDeleteCheer(!1)},l.prototype.createOrDeleteCheer=function(t){var n=this,i=this.isCheering,e=this.episodePermalinkPath+(t?"/cheers":"/cheers/delete"),r=o.ajax({method:"POST",url:e}).then(function(t){},function(t){n.setIsCheering(i),n.updateCheerCollection();var e=t&&t.error&&t.error.message||"";return s.Deferred().reject(new Error(e)).promise()});return this.setIsCheering(t),this.updateCheerCollection(),r},l.prototype.updateCheerCollection=function(){var t=r.default.getInstance(this.episodePermalinkPath);this.isCheering?t.addCheer(this.cheererPermalinkPath,this.cheererActivityName,new Date):t.removeCheer(this.cheererPermalinkPath)},l.instances={},l);function l(t,e,n){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit,this.cheererPermalinkPath=t,this.cheererActivityName=e,this.episodePermalinkPath=n,this.isCheering=!1}n.default=a},{"../modules/Emittable":117,"../modules/Net":122,"./EpisodeCheerCollection":104,jquery:96}],106:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r=t("./EpisodeCommentLives"),o=(s.getInstance=function(t,e,n){var i=s.instances,r=t+" "+e;return i[r]||(i[r]=new s(t,e,n))},s.prototype.setHasWritten=function(t){if(t!==this.hasWritten){this.hasWritten=t;var e=r.default.getInstance(this.episodePermalinkPath);t?e.notifyAddition():e.notifyRemoval(),this.emit("statusupdate")}},s.instances={},s);function s(t,e,n){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit,this.commentAuthorPermalinkPath=t,this.episodePermalinkPath=e,this.hasWritten=n}n.default=o},{"../modules/Emittable":117,"./EpisodeCommentLives":108}],107:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r=(o.getInstance=function(t){var e=o.instances;return e[t]||(e[t]=new o(t))},o.prototype.setCount=function(t){this.count=t,this.emit("countupdate")},o.instances={},o);function o(t){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit,this.episodePermalinkPath=t,this.count=0}n.default=r},{"../modules/Emittable":117}],108:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r=(o.getInstance=function(t){var e=o.instances;return e[t]||(e[t]=new o(t))},o.prototype.notifyAddition=function(){this.emit("commentadd")},o.prototype.notifyRemoval=function(){this.emit("commentremove")},o.instances={},o);function o(t){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit,this.episodePermalinkPath=t}n.default=r},{"../modules/Emittable":117}],109:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var d=t("../modules/Emittable"),r=t("../modules/storage-accessor"),h={font_size:{small:!1,medium:!0,large:!1,xLarge:!1},color_theme:{white:!0,black:!1,kinari:!1,blue:!1},font_family:{serif:!0,sans:!1},writing_direction:{horizontal:!0,vertical:!1}},i={font_size:!0,font_family:!0,writing_direction:!0},o=(s.getInstance=function(t){var e=s.instances,n=e[t];if(!n){var i=r.createLocalStorageAccessor(t);n=e[t]=new s(i)}return n},s.prototype.isAvailableKey=function(t){return h.hasOwnProperty(t)},s.prototype.getKeys=function(){return this.keys.concat()},s.prototype.getValue=function(t){return this.currentValueMap[t]},s.prototype.getAvailableValues=function(t){var e=h[t];return Object.keys(e)},s.prototype.setValue=function(t,e){var n=h[t];n&&n.hasOwnProperty(e)&&e!==this.currentValueMap[t]&&(this.currentValueMap[t]=e,this.storageAccessor.setItem(t,e),this.emit("settingupdate",t,e))},s.prototype.affectsSize=function(t){return!!i[t]},s.instances={},s);function s(t){this.on=d.default.on,this.off=d.default.off,this.emit=d.default.emit,this.storageAccessor=t;for(var e=Object.keys(h),n={},i=0,r=e;i<r.length;i++){var o=r[i],s=h[o],a=t.getItem(o);if(a&&s.hasOwnProperty(a))n[o]=a;else for(var l=0,u=Object.keys(s);l<u.length;l++){var c=u[l];if(s[c]){n[o]=c;break}}}this.keys=e,this.currentValueMap=n}n.default=o},{"../modules/Emittable":117,"../modules/storage-accessor":131}],110:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r=t("../modules/Net"),o="followingWorksAdd";n.FOLLOWING_WORKS_ADD_LABELS_EVENT_TYPE=o;var s="followingWorksRemove";n.FOLLOWING_WORKS_REMOVE_LABELS_EVENT_TYPE=s;var a=(l.getInstance=function(){return l.instance||(l.instance=new l)},l.prototype.addLabels=function(t,e){var n=this;return r.ajax({method:"POST",url:"/my/work_following/add_labels",data:this.careateFields(t,e)}).done(function(){n.emit(o,t)})},l.prototype.removeLabels=function(t,e){var n=this;return r.ajax({method:"POST",url:"/my/work_following/remove_labels",data:this.careateFields(t,e)}).done(function(){n.emit(s,t)})},l.prototype.careateFields=function(t,e){return[].concat(t.map(function(t){return{name:"work_id",value:t}}),e.map(function(t){return{name:"label_type_id",value:t}}))},l);function l(){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit}n.MyFollowingWorks=a},{"../modules/Emittable":117,"../modules/Net":122}],111:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../../modules/Emittable"),r=t("../../modules/Net"),o=(s.getInstance=function(){return s.instance||(s.instance=new s)},s.prototype.fetchOnce=function(){this.hasBeenFetched||this.fetch()},s.prototype.fetch=function(){var e=this;this.hasBeenFetched=!0,r.ajax("/notifications/unread_count.json").then(function(t){e.setUnreadCount(+t.unread_count)},function(){e.hasBeenFetched=!1})},s.prototype.setUnreadCount=function(t){t!==this._unreadCount&&(this._unreadCount=t,this.emit("unreadcountupdate"))},Object.defineProperty(s.prototype,"unreadCount",{get:function(){return this._unreadCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasUnreadNotices",{get:function(){return 0<this._unreadCount},enumerable:!0,configurable:!0}),s.prototype.markAsRead=function(){r.ajax({method:"POST",url:"/notifications/read"}),this.setUnreadCount(0)},s.instance=null,s);function s(){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit,this._unreadCount=0,this.hasBeenFetched=!1}n.default=o},{"../../modules/Emittable":117,"../../modules/Net":122}],112:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r=(h.getInstance=function(t){var e=h.instances,n=e[t];return n=n||(e[t]=new h)},h.prototype.setItems=function(t){this.items=t,this.refreshItemProperties()},h.prototype.moveItem=function(t,e){if(!(e<0||this.items.length<=e)){var n=this.getItemIndex(t);if(!(n<0||n===e)){var i=this.items.splice(n,1)[0];this.items.splice(e,0,i),this.refreshItemProperties()}}},h.prototype.moveItemBackward=function(t){this.moveItem(t,this.getItemIndex(t)-1)},h.prototype.moveItemForward=function(t){this.moveItem(t,this.getItemIndex(t)+1)},h.prototype.moveItemsAfterItem=function(t,n){for(var i=[],r=[],o=[],s=null===n,e=function(e){t.some(function(t){return t===e.id})?i.push(e):s?o.push(e):(r.push(e),e.id===n&&(s=!0))},a=0,l=this.items;a<l.length;a++)e(l[a]);this.items=r.concat(i,o),this.refreshItemProperties()},h.prototype.moveItemsToChapterTail=function(t,n){for(var i=n.id,e=function(e){if(e.level<=n.level)return"break";t.some(function(t){return t===e.id})||(i=e.id)},r=0,o=this.items.slice(this.getItemIndex(n.id)+1);r<o.length&&"break"!==e(o[r]);r++);this.moveItemsAfterItem(t,i)},h.prototype.moveItemsIntoTarget=function(t,e){var n=null!==e?this.getItemIndex(e):-1,i=0<=n?this.items[n]:null;i&&i.isChapter?this.moveItemsToChapterTail(t,i):this.moveItemsAfterItem(t,e)},h.prototype.insertChapter=function(t){if(!(t<0||this.items.length<t)){var e={id:"chapter:"+--this.itemIdSeed,title:"",level:1,isPublished:!1,characterCount:0,isChapter:!0,isEpisode:!1,episodeNumber:0};this.items.splice(t,0,e),this.refreshItemProperties(),this.emit(h.Events.INSERTE_CHAPTER,e.id)}},h.prototype.deleteChapter=function(t){var e=this.getItemIndex(t);e<0||!this.items[e].isChapter||(this.items.splice(e,1),this.refreshItemProperties())},h.prototype.changeChapterTitleAndLevel=function(t,e,n){var i=this.getItemIndex(t);if(!(i<0)){var r=this.items[i];r.isChapter&&(r.title=e,r.level=n,this.refreshItemProperties())}},h.prototype.changeEpisodeTitle=function(t,e){var n=this.getItemIndex(t);if(!(n<0)){var i=this.items[n];i.isEpisode&&(i.title=e,this.refreshItemProperties())}},h.prototype.getItemIndex=function(t){for(var e=this.items,n=0;n<e.length;n++)if(e[n].id===t)return n;return-1},h.prototype.refreshItemProperties=function(){for(var t=this.items,e=[],n=0,i=t;n<i.length;n++)if((d=i[n]).isChapter)e.length=d.level-1,e.push(d),d.isPublished=!1,d.characterCount=0;else for(var r=0,o=e;r<o.length;r++){var s=o[r];s&&(s.isPublished=s.isPublished||d.isPublished,s.characterCount+=d.characterCount)}for(var a=1,l=0,u=0,c=t;u<c.length;u++){var d;(d=c[u]).isChapter?a=d.level+1:(d.level=a,d.episodeNumber=++l)}this.emit(h.Events.UPDATE_LIST)},h.instances={},h.Events={UPDATE_LIST:"updatelist",INSERTE_CHAPTER:"insertchapter"},h);function h(){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit,this.items=[],this.itemIdSeed=0}n.TableOfContents=r},{"../modules/Emittable":117}],113:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r=t("../modules/Net"),o="labelcreated";n.LABEL_CREATED_EVENT_TYPE=o;var s="labelupdated";n.LABEL_UPDATED_EVENT_TYPE=s;var a=(l.getInstance=function(){return l.instance||(l.instance=new l)},l.prototype.createLabelType=function(t){var n=this;return r.ajax({method:"POST",url:"/my/work_following/label_types/new",data:{label_type_name:t}}).then(function(t){var e={id:t.work_following_label_type.id,name:t.work_following_label_type.name,count:0,permalinkPath:t.work_following_label_type.permalink_path};return n._labelTypes.push(e),n.emit(o,e),e})},l.prototype.renameLabelTypeName=function(n,t){var i=this;return r.ajax({method:"POST",url:"/my/work_following/label_types/"+n+"/rename",data:{label_type_name:t}}).done(function(t){var e=i.labelTypes.filter(function(t){return t.id===n})[0];e&&(e.name=t.work_following_label_type.name,i.emit(s,e))})},l.prototype.addWorkCount=function(e,t){var n=this.labelTypes.filter(function(t){return t.id===e})[0];n&&(n.count+=t,this.emit(s,n))},l.prototype.subtractWorkCount=function(e,t){var n=this.labelTypes.filter(function(t){return t.id===e})[0];n&&(n.count-=t,this.emit(s,n))},Object.defineProperty(l.prototype,"labelTypes",{get:function(){return this._labelTypes},enumerable:!0,configurable:!0}),l.prototype.setLabelTypes=function(t){this._labelTypes=t},l.instance=null,l);function l(){this._labelTypes=[],this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit}n.WorkFollowingLabelTypes=a},{"../modules/Emittable":117,"../modules/Net":122}],114:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r="countupdate",o=(s.getInstance=function(t){var e=s.instances;return e[t]||(e[t]=new s(t))},s.prototype.setInitialCount=function(t){this.count=t},s.prototype.increment=function(){this.count++,this.emit(r)},s.prototype.decrement=function(){this.count--,this.emit(r)},s.instances={},s);function s(t){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit,this.workReviewPermalinkPath=t,this.count=0}n.default=o},{"../modules/Emittable":117}],115:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Emittable"),r=t("./WorkReviewLikeCounter"),o=t("../modules/Net"),s=t("jquery"),a=(l.getInstance=function(t){var e=l.instances;return e[t]||(e[t]=new l(t))},l.prototype.setInitialIsLiking=function(t){this.isLiking=t},l.prototype.toggleLike=function(){var n=this,i=this.isLiking,t=this.workReviewPermalinkPath+(i?"/likes/delete":"/likes"),e=o.ajax({method:"POST",url:t}).then(function(t){},function(t){n.setIsLiking(i);var e=t&&t.error&&t.error.message||"";return s.Deferred().reject(new Error(e)).promise()});return this.setIsLiking(!i),e},l.prototype.setIsLiking=function(t){if(t!==this.isLiking){this.isLiking=t,this.emit("statusupdate");var e=r.default.getInstance(this.workReviewPermalinkPath);t?e.increment():e.decrement()}},l.instances={},l);function l(t){this.on=i.default.on,this.off=i.default.off,this.emit=i.default.emit,this.workReviewPermalinkPath=t}n.default=a},{"../modules/Emittable":117,"../modules/Net":122,"./WorkReviewLikeCounter":114,jquery:96}],116:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toggleDisplayClass=function(t,e){t.toggleClass("isShown",e),t.toggleClass("isHidden",!e)}},{}],117:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default={on:function(t,e){var n=this.emit.listenersMap,i=n[t]||(n[t]=[]);0<=i.indexOf(e)||i.push(e)},off:function(t,e){var n=this.emit.listenersMap[t];if(n){var i=n.indexOf(e);i<0||n.splice(i,1)}},get emit(){var s=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=s.listenersMap[t];if(i)for(var r=0,o=i.concat();r<o.length;r++){o[r].apply(null,e)}};return s.listenersMap={},s}}},{}],118:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PANEL_SHOW_EVENT="dcv:panelshow",n.PANEL_HIDE_EVENT="dcv:panelhide"},{}],119:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i="js-disabled-by-formfields",r=["input","button","textarea","select"].map(function(t){return t+":enabled"}).join(",");function o(t){t.find(r).prop("disabled",!0).addClass(i)}function s(t){t.find("."+i).prop("disabled",!1).removeClass(i)}n.disableFields=o,n.enableFields=s,n.toggleFields=function(t,e){e?s(t):o(t)}},{}],120:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("lodash"),r=(Object.defineProperty(o,"default",{get:function(){return new o(window.dataLayer)},enumerable:!0,configurable:!0}),o.prototype.sendEvent=function(t,e){if(void 0===e&&(e={}),void 0!==this.dataLayer){var n=i.assign({},e,{event:t});this.dataLayer.push(n)}},o);function o(t){this.dataLayer=t}n.GoogleTagManager=r},{lodash:102}],121:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("dateformat");n.formatNumber=function(t){var e=+t,n=e<0,i=String(n?-e:e),r=i;if(isFinite(e)){var o=i.indexOf("."),s=0<=o?o:i.length,a=s%3||3;r=i.substring(0,a);for(var l=a;l<s;l+=3)r+=","+i.substring(l,l+3);r+=i.substring(s)}return n?"-"+r:r},n.formatISODate=function(t){return i(t,"yyyy-mm-dd")},n.formatDateTime=function(t){return t.getFullYear()+"年"+(t.getMonth()+1)+"月"+t.getDate()+"日 "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)},n.formatDate=function(t){return t.getFullYear()+"年"+(t.getMonth()+1)+"月"+t.getDate()+"日"}},{dateformat:95}],122:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t("jquery");n.ajax=function(t){"string"==typeof t&&(t=o.extend({url:t},arguments[1]));var e=o.ajax(t);return e.then(null,function(t,e,n){var i=t.responseText,r=t.getResponseHeader("Content-Type");if(r&&/^application\/json\b/i.test(r))try{i=JSON.parse(i)}catch(t){}return o.Deferred().rejectWith(this,[i,e,t]).promise()}).promise(e),e}},{jquery:96}],123:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=new RegExp([/[｜|]([^｜|《》\n]{1,20})《[^《》\n]{1,50}》/.source,/([\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005-\u3007\u3021-\u3029\u3038-\u303B\u30F6\u3400-\u4DB5\u4E00-\u9FCC\uF900-\uFA6D\uFA70-\uFAD9])《[^《》\n]{1,50}》/.source,/《《(.+?)》》/.source].join("|"),"g");function r(t,e,n,i){return e||n||i}n.countCharacters=function(t){return(t=(t=t.replace(i,r)).replace(/\s+/g,"")).length}},{}],124:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=(r.prototype.connect=function(t,e){var n="string"==typeof t?new RegExp("^"+t.replace(/\W/g,"\\$&")+"$"):t;this.connections.push({pattern:n,action:e})},r.prototype.dispatch=function(n){var i=this;this.connections.forEach(function(t){var e=n.match(t.pattern);e&&t.action.call(i,e,n)})},r);function r(){this.connections=[]}n.default=i},{}],125:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery");n.cloneTemplateChildren=function(t){var e=t[0],n=e.content;return n?i(document.importNode(n,!0)).children().detach():i(e.cloneNode(!0)).children().detach()}},{jquery:96}],126:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isAndroid=function(t){return 0<=t.indexOf("Android")},n.isIOS=function(t){return/\b(?:iPhone|iPad)\b/.test(t)},n.isMac=function(t){return 0<=t.indexOf("Mac OS")},n.isIE=function(t){return!(!t.match(/(msie|MSIE)/)&&!t.match(/(T|t)rident/))}},{}],127:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stringLength=function(t){return t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length},n.truncateText=function(t,e,n){return n=n||e,t.length<=e?t:t.substring(0,n-1).replace(/[\uD800-\uDBFF]$/,"")+"…"}},{}],128:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.updateLocation=function(t){location.href=t},n.replaceLocation=function(t){location.replace(t)}},{}],129:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var g,i,m=t("./Util/String");n.calculatePrincipalScrollOffset=function(t,e,n){return t?n:e<0?-e:n},(i=g=g||{})[i.AS_IS=0]="AS_IS",i[i.TATECHUYOKO_1=1]="TATECHUYOKO_1",i[i.TATECHUYOKO_2=2]="TATECHUYOKO_2",i[i.TATECHUYOKO_3=3]="TATECHUYOKO_3",i[i.LEADER_MARKS=4]="LEADER_MARKS",n.CompositionPartType=g;var r=new RegExp("[\\u0000-\\u0009\\u000B\\u000C\\u000E-\\u10FF\\u1200-\\u17FF\\u18B0-\\u2013\\u2016-\\u2025\\u2027-\\u2E7F\\uA000-\\uA83F\\uA880-\\uA95F\\uA980-\\uABFF\\uE000-\\uF8FF\\uFB00-\\uFDFF\\uFE20-\\uFE2F\\uFE50-\\uFEFF\\uFFF0-\\uFFFF]|[\\uD800-\\uD804][\\uDC00-\\uDFFF]|\\uD805[\\uDC00-\\uDD7F\\uDE00-\\uDE5F\\uDE80-\\uDFFF]|[\\uD806-\\uD81A][\\uDC00-\\uDFFF]|\\uD81B[\\uDC00-\\uDFDF]|\\uD822[\\uDF00-\\uDFFF]|[\\uD823-\\uD82B][\\uDC00-\\uDFFF]|\\uD82C[\\uDD30-\\uDD6F\\uDF00-\\uDFFF]|[\\uD82D-\\uD833][\\uDC00-\\uDFFF]|\\uD834[\\uDC00-\\uDEFF\\uDF80-\\uDFFF]|[\\uD835-\\uD83B][\\uDC00-\\uDFFF]|\\uD83C[\\uDC00-\\uDDFF\\uDF00-\\uDFFF]|[\\uD83D-\\uD83F][\\uDC00-\\uDFFF]|[\\uD880-\\uDB3F][\\uDC00-\\uDFFF]|\\uDB40[\\uDC00-\\uDCFF\\uDDF0-\\uDFFF]|[\\uDB41-\\uDBFF][\\uDC00-\\uDFFF]"),y=new RegExp("([\\u2014\\u2015\\u2026]+)|([！？]{2,})|(?:"+r.source+")+","g"),v=new RegExp("[\\u0000-\\u0020\"'()\\-:<=>\\[\\]`{|}~\\u007F-\\u00A0\\u00A6\\u00A7\\u00A9\\u00AB\\u00AD\\u00AE\\u00B1\\u00BB-\\u00BE\\u00D7\\u00F7\\u02EA\\u02EB\\u1401-\\u167F\\u18B0-\\u18FF\\u2000-\\u203C\\u203E-\\u2043\\u2045-\\u2049\\u204C\\u204D\\u2050\\u2051\\u2053-\\u206F\\u20D0-\\u2101\\u2103-\\u2109\\u210F\\u2113\\u2114\\u2116\\u2117\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u2135-\\u213F\\u2145-\\u214A\\u214C\\u214D\\u214F-\\u2189\\u218C-\\u21FF\\u2208-\\u220D\\u2212\\u221D\\u221E\\u2223-\\u222A\\u2234\\u2235\\u2238-\\u223E\\u2240-\\u2292\\u22B0-\\u22BD\\u22C8-\\u2321\\u2324-\\u232B\\u237D-\\u23B6\\u23B8-\\u23CD\\u23CF-\\u23DB\\u23E2-\\u2422\\u2424-\\u2794\\u2798-\\u27AF\\u27B1-\\u27BE\\u27C3\\u27C4\\u27C8\\u27C9\\u27E6-\\u2980\\u2983-\\u299A\\u29FC\\u29FD\\u2A40-\\u2AD8\\u2AEE-\\u2AFD\\u2B00-\\u2BFF\\uA000-\\uA4CF\\uE000-\\uF8FF\\uFE50-\\uFE6F\\uFFF0-\\uFFFF]|\\uD802[\\uDD80-\\uDD9F]|\\uD80C[\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2F]|\\uD811[\\uDC00-\\uDE7F]|\\uD834[\\uDC00-\\uDDFF]|\\uD836[\\uDC00-\\uDEAF]|\\uD83C[\\uDC00-\\uDDFF\\uDF00-\\uDFFF]|\\uD83D[\\uDC00-\\uDFFF]|\\uD83E[\\uDC00-\\uDDFF]|[\\uD880-\\uD8BF][\\uDC00-\\uDFFF]|\\uDB40[\\uDC00-\\uDC7F]|[\\uDB80-\\uDBFF][\\uDC00-\\uDFFF]"),b=new RegExp("^(?:([0-9]{1,3})([%\\u2030\\u2031\\u2103\\u2109])?|(#)([0-9]{1,3})|[!?]{1,3}|[！？]{2,3})$"),_=/[\u0000-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w={1:g.TATECHUYOKO_1,2:g.TATECHUYOKO_2,3:g.TATECHUYOKO_3},x=4;function k(t){for(var e=[],n=0,i=null;i=y.exec(t);){var r=i[0],o=i.index;if(i[1])n<o&&e.push({type:g.AS_IS,text:t.substring(n,o)}),e.push({type:g.LEADER_MARKS,text:r}),n=o+r.length;else if(!(r.length>2*x)){var s=b.exec(r);if(s){var a=s[3],l=s[2],u=a?s[4]:l?s[1]:r;n<o&&(e.push({type:g.AS_IS,text:t.substring(n,o)}),n=o),a&&(e.push({type:g.TATECHUYOKO_1,text:a}),n+=a.length),e.push({type:w[u.length],text:u}),n+=u.length,l&&!v.test(l)&&(e.push({type:g.TATECHUYOKO_1,text:l}),n+=l.length)}else if(!i[2]){var c=r.match(_);if(!(c.length>x))for(var d=o,h=0,p=c;h<p.length;h++){var f=p[h];v.test(f)?d+=f.length:(n<d&&e.push({type:g.AS_IS,text:t.substring(n,d)}),e.push({type:g.TATECHUYOKO_1,text:f}),n=d+=f.length)}}}}return n<t.length&&e.push({type:g.AS_IS,text:t.substring(n)}),e}n.composeParts=k,n.composePartsList=function(t){for(var e=[],n=k(t.join("")),i=0,r=0,o=0,s=t;o<s.length;o++){for(var a=[],l=s[o].length;0<l;){var u=n[i],c=u.text.length-r;if(!(c<=l)){var d=u.text.substring(r,r+l);p=u.type===g.TATECHUYOKO_2||u.type===g.TATECHUYOKO_3?w[m.stringLength(d)]:u.type;a.push({type:p,text:d}),r+=l;break}var h=void 0;if(0===r)h=u;else{var p,f=u.text.substring(r);h={type:p=u.type===g.TATECHUYOKO_2||u.type===g.TATECHUYOKO_3?w[m.stringLength(f)]:u.type,text:f}}a.push(h),l-=c,i++,r=0}e.push(a)}return e}},{"./Util/String":127}],130:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("@sentry/browser"),r=t("@sentry/tracing"),o=document.querySelector("html").dataset.env?document.querySelector("html").dataset.env:"",s=document.querySelector("html").dataset.revision?document.querySelector("html").dataset.revision:"";i.init({dsn:"https://e0effc20f5314766866db97cb6b04fb1@o148425.ingest.sentry.io/5334071",release:s,environment:o,sampleRate:"production"===o||""===o?.01:1,integrations:[new r.Integrations.BrowserTracing],tracesSampleRate:"production"===o||""===o?.001:1})},{"@sentry/browser":6,"@sentry/tracing":58}],131:[function(t,e,n){"use strict";function i(t,e){return t?new r(t,e):new s}Object.defineProperty(n,"__esModule",{value:!0}),n.createStorageAccessor=i,n.createLocalStorageAccessor=function(t){var e=null;try{e=window.localStorage}catch(t){}return i(e,t)},n.createSessionStorageAccessor=function(t){var e=null;try{e=window.sessionStorage}catch(t){}return i(e,t)};var r=(o.prototype.getItem=function(t){var e=this.storage.getItem(this.prefix+t);try{return JSON.parse(e)}catch(t){return e}},o.prototype.setItem=function(t,e){try{this.storage.setItem(this.prefix+t,JSON.stringify(e))}catch(t){}},o.prototype.removeItem=function(t){this.storage.removeItem(this.prefix+t)},o);function o(t,e){this.storage=t,this.prefix=e?e+".":""}var s=(a.prototype.getItem=function(t){return null},a.prototype.setItem=function(t,e){},a.prototype.removeItem=function(t){},a);function a(){}},{}],132:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=new(t("../modules/Router").default);n.default=i},{"../modules/Router":124}],133:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("jquery"),l=t("../model/MyFollowingWorks"),u=t("../model/WorkFollowingLabelTypes"),c=t("../modules/TemplateElement"),d=t("../modules/Locale"),h=(o=s.Presenter,r(p,o),p.prototype.setup=function(){var e=this;this.workFollowingLabelTypes.on(u.LABEL_CREATED_EVENT_TYPE,function(t){e.view.createAddButton(t.id,t.name,t.count)}),this.workFollowingLabelTypes.on(u.LABEL_UPDATED_EVENT_TYPE,function(t){e.view.updateAddButton(t.id,t.name,t.count)})},p.prototype.handleSubmitButton=function(t,e){var n=this;this.isLoading=!0,this.view.updateViewStatus(),this.myFollowingWorks.addLabels(e,[t]).done(function(){n.workFollowingLabelTypes.addWorkCount(t,e.length)}).fail(function(t){var e=t&&t.error&&t.error.message||"ラベルを付与できませんでした。";n.setError(new Error(e))}).always(function(){n.isLoading=!1,n.view.updateViewStatus()})},Object.defineProperty(p.prototype,"shouldEnableView",{get:function(){return!this.isLoading},enumerable:!0,configurable:!0}),p);function p(t,e){var n=o.call(this,t)||this;return n.myFollowingWorks=l.MyFollowingWorks.getInstance(),n.workFollowingLabelTypes=u.WorkFollowingLabelTypes.getInstance(),n.isLoading=!1,n}n.AddWorkFollowingLabelTypeButtonContainerPresenter=h;var f,g=(f=s.View,r(m,f),m.prototype.initMembers=function(t,e){this.$addButtonContainer=t,this.$workList=e;var n=c.cloneTemplateChildren(this.$addButtonContainer.find(".js-work-following-label-type-add-button-template"));this.addButtonTemplate={element:n[0],nameElement:n.find(".js-work-following-label-type-add-button-name")[0],countElement:n.find(".js-work-following-label-type-add-button-count")[0]}},m.prototype.registerEvents=function(){this.$addButtonContainer.on("click",".js-work-following-label-type-add-button",a.proxy(this.onClickSubmitButton,this))},m.prototype.onClickSubmitButton=function(t){var e=t.currentTarget.getAttribute("data-work-following-label-type-id"),n=this.$workCheckboxes.filter("input:checked").get().map(function(t){return t.getAttribute("data-antenna-work-id")});this.presenter.handleSubmitButton(e,n)},m.prototype.createPresenter=function(){return new h(this,{})},m.prototype.updateViewStatus=function(){this.$addButtonContainer.find(".js-work-following-label-type-add-button").prop("disabled",!this.presenter.shouldEnableView)},m.prototype.updateError=function(){var t=this.presenter.lastError;t&&window.alert(t.message)},m.prototype.createAddButton=function(t,e,n){var i=this.addButtonTemplate;i.element.setAttribute("data-work-following-label-type-id",t),i.nameElement.textContent=e,i.countElement.textContent=d.formatNumber(n),this.$addButtonContainer.append(i.element.cloneNode(!0))},m.prototype.updateAddButton=function(t,e,n){var i=this.$addButtonContainer.find('.js-work-following-label-type-add-button[data-work-following-label-type-id="'+t+'"]');i.find(".js-work-following-label-type-add-button-name").text(e),i.find(".js-work-following-label-type-add-button-count").text(d.formatNumber(n))},Object.defineProperty(m.prototype,"$workCheckboxes",{get:function(){return this.$workList.find(".js-antenna-work-list-item-checkbox")},enumerable:!0,configurable:!0}),m);function m(t,e){return f.call(this,t,e)||this}n.AddWorkFollowingLabelTypeButtonContainerView=g},{"../model/MyFollowingWorks":110,"../model/WorkFollowingLabelTypes":113,"../modules/Locale":121,"../modules/TemplateElement":125,"./base":247,jquery:96}],134:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Locale"),l=t("jquery"),u=t("./WorkFollowingLabelTypeSelector"),c=t("../model/MyFollowingWorks"),d=t("../model/WorkFollowingLabelTypes"),h=t("../modules/EventType"),p=(o=s.Presenter,r(f,o),f.prototype.handleCheckbox=function(t){this.checkedLabelIds=t,this.view.updateSubmitButtonTitle(),this.view.updateViewStatuses()},f.prototype.handlePanelShowEvent=function(t){this.checkedWorkIds=t},f.prototype.handleSubmitButton=function(){var n=this;this.isLoading=!0,this.view.updateViewStatuses(),this.myFollowingWorks.addLabels(this.checkedWorkIds,this.checkedLabelIds).done(function(){n.checkedLabelIds.forEach(function(t){n.workFollowingLabelTypes.addWorkCount(t,n.checkedWorkIds.length)}),n.view.closePanel()}).fail(function(t){var e=t&&t.error&&t.error.message||"ラベルを付与できませんでした。";n.setError(new Error(e))}).always(function(){n.isLoading=!1,n.view.updateViewStatuses()})},Object.defineProperty(f.prototype,"shouldEnableSubmitButton",{get:function(){return 0<this.checkedLabelIds.length&&this.shouldEnableViews},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"shouldEnableViews",{get:function(){return!this.isLoading},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"selectedLabelIdsCount",{get:function(){return this.checkedLabelIds.length},enumerable:!0,configurable:!0}),f);function f(t,e){var n=o.call(this,t)||this;return n.checkedLabelIds=[],n.checkedWorkIds=[],n.myFollowingWorks=c.MyFollowingWorks.getInstance(),n.workFollowingLabelTypes=d.WorkFollowingLabelTypes.getInstance(),n}n.AddWorkFollowingLabelTypesPanelPresenter=p;var g,m=(g=s.View,r(y,g),y.prototype.initMembers=function(t,e,n){this.$panel=t,this.$workList=e,this.$submitButton=t.find(".js-add-work-following-label-types-submit-button"),this.$popupButton=n,this.$labelTypeContainer=this.$panel.find(".js-work-following-label-type-selector-label-type-container")},y.prototype.createPresenter=function(){return new p(this,{})},y.prototype.registerEvents=function(){this.$labelTypeContainer.on(u.WorkFollowingLabelTypeSelectorView.CHANGE_EVENT_TYPE,l.proxy(this.onChangeCheckbox,this)),this.$panel.on(h.PANEL_SHOW_EVENT,l.proxy(this.onPanelShow,this)),this.$panel.on(h.PANEL_HIDE_EVENT,l.proxy(this.onPanelHide,this)),this.$submitButton.on("click",l.proxy(this.onClickSubmitdButton,this))},y.prototype.initSubViews=function(){this.selectorView=new u.WorkFollowingLabelTypeSelectorView(this.$panel.find(".js-work-following-label-type-selector-text-input"),this.$labelTypeContainer)},y.prototype.onPanelShow=function(){var t=this.$workCheckboxes.filter("input:checked").get().map(function(t){return t.getAttribute("data-antenna-work-id")});this.presenter.handlePanelShowEvent(t)},y.prototype.onPanelHide=function(){this.selectorView.resetInputValues()},y.prototype.onChangeCheckbox=function(){this.presenter.handleCheckbox(this.selectorView.selectedLabelTypeIds)},y.prototype.onClickSubmitdButton=function(){this.presenter.handleSubmitButton()},y.prototype.updateSubmitButtonTitle=function(){this.$submitButton.find(".js-add-work-following-label-types-submit-button-count").text(a.formatNumber(this.presenter.selectedLabelIdsCount))},y.prototype.updateViewStatuses=function(){this.$submitButton.prop("disabled",!this.presenter.shouldEnableSubmitButton),this.selectorView.updateViewStatuses(this.presenter.shouldEnableViews)},y.prototype.closePanel=function(){this.$workCheckboxes.prop("checked",!1).trigger("change"),this.$popupButton.trigger("click")},y.prototype.updateError=function(){var t=this.presenter.lastError;t&&window.alert(t.message)},Object.defineProperty(y.prototype,"$workCheckboxes",{get:function(){return this.$workList.find(".js-antenna-work-list-item-checkbox")},enumerable:!0,configurable:!0}),y);function y(t,e,n){return g.call(this,t,e,n)||this}n.AddWorkFollowingLabelTypesPanelView=m},{"../model/MyFollowingWorks":110,"../model/WorkFollowingLabelTypes":113,"../modules/EventType":118,"../modules/Locale":121,"./WorkFollowingLabelTypeSelector":243,"./base":247,jquery:96}],135:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),l=t("jquery"),a=t("../../modules/Net"),u=t("../../model/MyFollowingWorks"),c=t("../OverallCheckbox"),d=(o=s.Presenter,r(h,o),h.prototype.setup=function(){var t=this;this.myFollowingWorks.on(u.FOLLOWING_WORKS_ADD_LABELS_EVENT_TYPE,function(){t.reloadWorks()}),this.myFollowingWorks.on(u.FOLLOWING_WORKS_REMOVE_LABELS_EVENT_TYPE,function(){t.reloadWorks()})},h.prototype.reloadWorks=function(){var e=this;a.ajax({method:"GET",url:this.worksReloadUrl}).done(function(t){e.view.updateWorks(t)})},h.prototype.handleWorkCellCheckbox=function(){this.view.updateWorkCheckState()},h);function h(t,e){var n=o.call(this,t)||this;return n.worksReloadUrl=e.worksReloadUrl,n.myFollowingWorks=u.MyFollowingWorks.getInstance(),n}n.AntennaWorkListPresenter=d;var p,f=(p=s.View,r(g,p),g.prototype.initMembers=function(t,e,n){this.$workList=t,this.$pagerContainer=e,this.$overallCheckbox=n},g.prototype.createPresenter=function(){return new d(this,{worksReloadUrl:this.$workList.attr("data-page-reload-url")})},g.prototype.registerEvents=function(){this.$overallCheckbox.on(c.OverallCheckboxView.CHANGED_EVENT_TYPE,l.proxy(this.onChangeWorkCellCheckbox,this))},g.prototype.updateWorks=function(t){var e=this,n=".js-antenna-work-list-item",i=".js-antenna-works-pager",r=l(l.parseHTML(t)),o=this.$workList.find(".js-antenna-work-list-item-checkbox:checked").get().map(function(t){return t.getAttribute("data-antenna-work-id")}),s=r.find(n);this.$workList.find(n).remove(),this.$workList.append(s),o.forEach(function(t){e.$workList.find(".js-antenna-work-list-item-checkbox[data-antenna-work-id="+t+"]").prop("checked",!0).trigger("change")});var a=r.find(i);this.$pagerContainer.find(i).remove(),this.$pagerContainer.append(a),this.$workList.trigger("dcv:worklist:refresh")},g.prototype.updateWorkCheckState=function(){this.$workList.find(".js-antenna-work-list-item").each(function(t,e){var n=l(e),i=n.find(".js-antenna-work-list-item-checkbox");n.toggleClass("isChecked",i.prop("checked"))})},g.prototype.onChangeWorkCellCheckbox=function(t){this.presenter.handleWorkCellCheckbox()},g);function g(t,e,n){return p.call(this,t,e,n)||this}n.AntennaWorkListView=f},{"../../model/MyFollowingWorks":110,"../../modules/Net":122,"../OverallCheckbox":209,"../base":247,jquery:96}],136:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../../modules/Display"),o=t("jquery"),r=t("../../view_presenter/OverallCheckbox"),s=(Object.defineProperty(a.prototype,"$antennaWorkDefaultModeElements",{get:function(){return this.$container.find(".js-antenna-works-default-mode-view")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"$antennaWorkEditModeElements",{get:function(){return this.$container.find(".js-antenna-works-edit-mode-view")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"$antennaWorkBulkActionsModeElements",{get:function(){return this.$container.find(".js-antenna-works-bulk-actions-mode-view")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"$antennaWorkHasDefaultModeClassElements",{get:function(){return this.$container.find(".js-antenna-works-has-default-mode-class")},enumerable:!0,configurable:!0}),a.prototype.initMembers=function(t,e){this.$container=t,this.$defaultModeButton=t.find(".js-antenna-works-default-mode-button"),this.$editModeButton=t.find(".js-antenna-works-edit-mode-button"),this.overallCheckboxView=e},a.prototype.registerEvents=function(){this.$defaultModeButton.on("click",o.proxy(this.onClickDefaultModeButton,this)),this.$editModeButton.on("click",o.proxy(this.onClickEditModeButton,this)),this.overallCheckboxView.$overallCheckbox.on(r.OverallCheckboxView.CHANGED_EVENT_TYPE,o.proxy(this.onChangeAntennaWorkCheckbox,this))},a.prototype.showDefaultModeView=function(){this.overallCheckboxView.clearAllChecked(),i.toggleDisplayClass(this.$antennaWorkEditModeElements,!1),i.toggleDisplayClass(this.$antennaWorkBulkActionsModeElements,!1),i.toggleDisplayClass(this.$antennaWorkDefaultModeElements,!0),this.toggleClassesWithModeChange(!0)},a.prototype.showEditModeView=function(){i.toggleDisplayClass(this.$antennaWorkDefaultModeElements,!1),i.toggleDisplayClass(this.$antennaWorkBulkActionsModeElements,!1),i.toggleDisplayClass(this.$antennaWorkEditModeElements,!0),this.toggleClassesWithModeChange(!1)},a.prototype.showBulkActionsModeView=function(){i.toggleDisplayClass(this.$antennaWorkDefaultModeElements,!1),i.toggleDisplayClass(this.$antennaWorkEditModeElements,!1),i.toggleDisplayClass(this.$antennaWorkBulkActionsModeElements,!0),this.toggleClassesWithModeChange(!1)},a.prototype.toggleClassesWithModeChange=function(r){var t=this.$antennaWorkHasDefaultModeClassElements;t.each(function(t,e){var n=o(e),i=1==+n.attr("data-is-unread");n.toggleClass("isUnread",r&&i)}),t.toggleClass("isEditing",!r)},a.prototype.onClickDefaultModeButton=function(t){this.showDefaultModeView()},a.prototype.onClickEditModeButton=function(t){this.showEditModeView()},a.prototype.onChangeAntennaWorkCheckbox=function(t,e){e.someChecked?this.showBulkActionsModeView():this.showDefaultModeView()},a);function a(t,e){this.initMembers(t,e),this.registerEvents()}n.AntennaWorksModeContainerView=s},{"../../modules/Display":116,"../../view_presenter/OverallCheckbox":209,jquery:96}],137:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("jquery"),l=t("../WorkFollowingLabelTypeInputPane"),u=t("../../model/WorkFollowingLabelTypes"),c=(o=s.Presenter,r(d,o),d.prototype.renameLabelTypeName=function(t){var n=this;this.isLoading=!0,this.view.updateViewStatuses(),this.workFollowingLabelTypes.renameLabelTypeName(this.labelTypeId,t).done(function(){n._labelTypeName=t,n.view.updateLabelTypeName(),n.view.closePanel()}).fail(function(t){var e=t&&t.error&&t.error.message||"ラベルの名前を変更できませんでした。";n.setError(new Error(e))}).always(function(){n.isLoading=!1,n.view.updateViewStatuses()})},d.prototype.handleOpenButton=function(){this.view.focusInput()},d.prototype.handleCancelButton=function(){this.view.updateLabelTypeName()},d.prototype.handleSubmitEvent=function(t){this.renameLabelTypeName(t)},d.prototype.handlePanelHide=function(){this.view.updateLabelTypeName()},Object.defineProperty(d.prototype,"shouldEnablePanelViews",{get:function(){return!this.isLoading},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"labelTypeName",{get:function(){return this._labelTypeName},enumerable:!0,configurable:!0}),d);function d(t,e){var n=o.call(this,t)||this;return n.workFollowingLabelTypes=u.WorkFollowingLabelTypes.getInstance(),n.labelTypeId=e.labelTypeId,n._labelTypeName=e.labelTypeName,n}n.RenameWorkFollowingLabelTypePanelPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t,e){this.$panel=t,this.$input=t.find(".js-work-following-label-type-input-pane-input"),this.$submitButton=t.find(".js-work-following-label-type-input-pane-submit-button"),this.$openButton=e,this.$cancelButton=t.find(".js-rename-work-following-label-type-panel-cancel-button")},f.prototype.createPresenter=function(){return new c(this,{labelTypeId:this.$panel.attr("data-rename-work-following-label-type-panel-label-type-id"),labelTypeName:this.$input.val()})},f.prototype.registerEvents=function(){this.$openButton.on("click",a.proxy(this.onClickOpenButton,this)),this.$cancelButton.on("click",a.proxy(this.onClickCancelButton,this)),this.$input.on(l.WorkFollowingLabelTypeInputPaneView.SUBMIT_EVENT_TYPE,a.proxy(this.onSubmitEvent,this)),this.$panel.on("dcv:modalwindow:hide",a.proxy(this.onPanelHide,this))},f.prototype.initSubViews=function(){this.workFollowingLabelTypeInputPaneView=new l.WorkFollowingLabelTypeInputPaneView(this.$input,this.$submitButton)},f.prototype.onClickOpenButton=function(t){this.presenter.handleOpenButton()},f.prototype.onClickCancelButton=function(t){this.presenter.handleCancelButton()},f.prototype.onPanelHide=function(){this.presenter.handlePanelHide()},f.prototype.onSubmitEvent=function(t,e){this.presenter.handleSubmitEvent(e)},f.prototype.updateLabelTypeName=function(){this.workFollowingLabelTypeInputPaneView.inputValue(this.presenter.labelTypeName)},f.prototype.updateViewStatuses=function(){var t=this.presenter.shouldEnablePanelViews;this.workFollowingLabelTypeInputPaneView.updateFieldStatues(t),this.$cancelButton.prop("disabled",!t)},f.prototype.focusInput=function(){this.workFollowingLabelTypeInputPaneView.focusInput()},f.prototype.closePanel=function(){this.$cancelButton.trigger("click")},f.prototype.updateError=function(){var t=this.presenter.lastError;t&&window.alert(t.message)},f);function f(t,e){return h.call(this,t,e)||this}n.RenameWorkFollowingLabelTypePanelView=p},{"../../model/WorkFollowingLabelTypes":113,"../WorkFollowingLabelTypeInputPane":242,"../base":247,jquery:96}],138:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../OverallCheckbox"),r=t("jquery"),o=t("../../modules/Locale"),s=(a.prototype.initMembbers=function(t,e){this.$count=t,this.overallCheckboxView=e},a.prototype.registerEvents=function(){this.overallCheckboxView.$overallCheckbox.on(i.OverallCheckboxView.CHANGED_EVENT_TYPE,r.proxy(this.onChangeAntennaWorkCheckbox,this))},a.prototype.onChangeAntennaWorkCheckbox=function(t,e){this.$count.text(o.formatNumber(e.$checkedCheckboxes.length))},a);function a(t,e){this.initMembbers(t,e),this.registerEvents()}n.SelectedWorkCountView=s},{"../../modules/Locale":121,"../OverallCheckbox":209,jquery:96}],139:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../../modules/Display"),r=t("jquery"),o=t("../OverallCheckbox"),s=(a.prototype.initMembers=function(t,e,n){this.$defaultMenu=t.find(".js-antenna-works-bulk-actions-menu-default"),this.$editMenu=t.find(".js-antenna-works-bulk-actions-menu-edit"),this.$changeToDefaultMenuButton=e,this.overallCheckboxView=n},a.prototype.registerEvents=function(){this.$changeToDefaultMenuButton.on("click",r.proxy(this.onClickDefaultMenuButton,this)),this.overallCheckboxView.$overallCheckbox.on(o.OverallCheckboxView.CHANGED_EVENT_TYPE,r.proxy(this.onChangeAntennaWorkCheckbox,this))},a.prototype.onClickDefaultMenuButton=function(t){this.overallCheckboxView.clearAllChecked(),this.showDefaultMenu()},a.prototype.showDefaultMenu=function(){i.toggleDisplayClass(this.$defaultMenu,!0),i.toggleDisplayClass(this.$editMenu,!1)},a.prototype.showEditMenu=function(){i.toggleDisplayClass(this.$defaultMenu,!1),i.toggleDisplayClass(this.$editMenu,!0)},a.prototype.onChangeAntennaWorkCheckbox=function(t,e){e.someChecked?this.showEditMenu():this.showDefaultMenu()},a);function a(t,e,n){this.initMembers(t,e,n),this.registerEvents()}n.TouchAntennaWorksBulkActionsMenuContainerView=s},{"../../modules/Display":116,"../OverallCheckbox":209,jquery:96}],140:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../../modules/Display"),r=t("jquery"),o=(s.prototype.initMembers=function(t,e,n,i,r){this.$header=t,this.$topTitle=t.find(".js-filter-selector-mode-header-title-top"),this.$genreTitle=t.find(".js-filter-selector-mode-header-title-genre"),this.$statusTitle=t.find(".js-filter-selector-mode-header-title-status"),this.$orderTitle=t.find(".js-filter-selector-mode-header-title-order"),this.$backButton=t.find(".js-filter-selector-mode-header-back-button"),this.$showTopContentButton=e,this.$showGenreContentButton=n,this.$showStatusContentButton=i,this.$showOrderContentButton=r},s.prototype.registorEvents=function(){this.$showTopContentButton.on("click",r.proxy(this.onClickTopButton,this)),this.$showGenreContentButton.on("click",r.proxy(this.onClickGenreButton,this)),this.$showStatusContentButton.on("click",r.proxy(this.onClickStatusButton,this)),this.$showOrderContentButton.on("click",r.proxy(this.onClickOrderButton,this)),this.$backButton.on("click",r.proxy(this.onClickBackButton,this))},s.prototype.onClickTopButton=function(t){this.showTopContent()},s.prototype.onClickGenreButton=function(t){this.showGenreContent()},s.prototype.onClickStatusButton=function(t){this.showStatusContent()},s.prototype.onClickOrderButton=function(t){this.showOrderContent()},s.prototype.onClickBackButton=function(t){this.showTopContent()},s.prototype.showTopContent=function(){i.toggleDisplayClass(this.$topTitle,!0),i.toggleDisplayClass(this.$genreTitle,!1),i.toggleDisplayClass(this.$statusTitle,!1),i.toggleDisplayClass(this.$orderTitle,!1),i.toggleDisplayClass(this.$backButton,!1)},s.prototype.showGenreContent=function(){i.toggleDisplayClass(this.$genreTitle,!0),i.toggleDisplayClass(this.$topTitle,!1),i.toggleDisplayClass(this.$statusTitle,!1),i.toggleDisplayClass(this.$orderTitle,!1),i.toggleDisplayClass(this.$backButton,!0)},s.prototype.showStatusContent=function(){i.toggleDisplayClass(this.$statusTitle,!0),i.toggleDisplayClass(this.$topTitle,!1),i.toggleDisplayClass(this.$genreTitle,!1),i.toggleDisplayClass(this.$orderTitle,!1),i.toggleDisplayClass(this.$backButton,!0)},s.prototype.showOrderContent=function(){i.toggleDisplayClass(this.$orderTitle,!0),i.toggleDisplayClass(this.$topTitle,!1),i.toggleDisplayClass(this.$genreTitle,!1),i.toggleDisplayClass(this.$statusTitle,!1),i.toggleDisplayClass(this.$backButton,!0)},s);function s(t,e,n,i,r){this.initMembers(t,e,n,i,r),this.registorEvents()}n.TouchAntennaWorksFilterSelectorModeHeaderView=o},{"../../modules/Display":116,jquery:96}],141:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s,a=t("../../modules/Display"),l=t("jquery"),u=t("../base");(s=o=o||{})[s.Default=0]="Default",s[s.LabelSelector=1]="LabelSelector",s[s.BulkActions=2]="BulkActions",s[s.FilterSelector=3]="FilterSelector";var c,d=(c=u.Presenter,r(h,c),h.prototype.handleDefaultButton=function(){this.modeChange(o.Default)},h.prototype.handleLabelSelectorButton=function(){this.modeChange(o.LabelSelector)},h.prototype.handleBulkActionsButton=function(){this.modeChange(o.BulkActions)},h.prototype.handleFilterSelectorButton=function(){this.modeChange(o.FilterSelector)},h.prototype.handleRefreshWorkList=function(){this.modeChange(this.mode)},h.prototype.modeChange=function(t){switch(this.mode=t,this.mode){case o.Default:this.view.showDefaultModeView();break;case o.LabelSelector:this.view.showLabelSelectorModeView();break;case o.BulkActions:this.view.showBulkActionsModeView();break;case o.FilterSelector:this.view.showFilterSelectorModeView()}},h);function h(t,e){var n=c.call(this,t)||this;return n.mode=o.Default,n}n.TouchAntennaWorksModeContainerPresenter=d;var p,f=(p=u.View,r(g,p),Object.defineProperty(g.prototype,"$antennaWorkDefaultModeElements",{get:function(){return this.$container.find(".js-antenna-works-default-mode-view")},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"$antennaWorkLabelSelectorModeElements",{get:function(){return this.$container.find(".js-antenna-works-label-selector-mode-view")},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"$antennaWorkBulkActionsModeElements",{get:function(){return this.$container.find(".js-antenna-works-bulk-actions-mode-view")},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"$antennaWorkFilterSelectorModeElements",{get:function(){return this.$container.find(".js-antenna-works-filter-selector-mode-view")},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"$antennaWorkHasDefaultModeClassElements",{get:function(){return this.$container.find(".js-antenna-works-has-default-mode-class")},enumerable:!0,configurable:!0}),g.prototype.initMembers=function(t,e){this.$container=t,this.$workList=e,this.$antennaWorkModalBackdrop=t.find(".js-antenna-works-modal-backdrop"),this.$defaultModeButton=t.find(".js-antenna-works-default-mode-button"),this.$labelSelectorModeButton=t.find(".js-antenna-works-label-selector-mode-button"),this.$bulkActionsModeButton=t.find(".js-antenna-works-bulk-actions-mode-button"),this.$filterSelectorModeButton=t.find(".js-antenna-works-filter-selector-mode-button")},g.prototype.createPresenter=function(){return new d(this,{})},g.prototype.registerEvents=function(){this.$workList.on("dcv:worklist:refresh",l.proxy(this.onRefreshWorkList,this)),this.$antennaWorkModalBackdrop.on("click",l.proxy(this.onClickModeContent,this)),this.$defaultModeButton.on("click",l.proxy(this.onClickDefaultModeButton,this)),this.$labelSelectorModeButton.on("click",l.proxy(this.onClickLabelSelectorModeButton,this)),this.$bulkActionsModeButton.on("click",l.proxy(this.onClickBulkActionsModeButton,this)),this.$filterSelectorModeButton.on("click",l.proxy(this.onClickFilterSelectorModeButton,this))},g.prototype.showDefaultModeView=function(){a.toggleDisplayClass(this.$antennaWorkLabelSelectorModeElements,!1),a.toggleDisplayClass(this.$antennaWorkBulkActionsModeElements,!1),a.toggleDisplayClass(this.$antennaWorkFilterSelectorModeElements,!1),a.toggleDisplayClass(this.$antennaWorkDefaultModeElements,!0),this.toggleUnreadClass(this.$antennaWorkHasDefaultModeClassElements,!0)},g.prototype.showLabelSelectorModeView=function(){a.toggleDisplayClass(this.$antennaWorkDefaultModeElements,!1),a.toggleDisplayClass(this.$antennaWorkBulkActionsModeElements,!1),a.toggleDisplayClass(this.$antennaWorkFilterSelectorModeElements,!1),a.toggleDisplayClass(this.$antennaWorkLabelSelectorModeElements,!0),this.toggleUnreadClass(this.$antennaWorkHasDefaultModeClassElements,!0)},g.prototype.showBulkActionsModeView=function(){a.toggleDisplayClass(this.$antennaWorkDefaultModeElements,!1),a.toggleDisplayClass(this.$antennaWorkLabelSelectorModeElements,!1),a.toggleDisplayClass(this.$antennaWorkFilterSelectorModeElements,!1),a.toggleDisplayClass(this.$antennaWorkBulkActionsModeElements,!0),this.toggleUnreadClass(this.$antennaWorkHasDefaultModeClassElements,!1)},g.prototype.showFilterSelectorModeView=function(){a.toggleDisplayClass(this.$antennaWorkDefaultModeElements,!1),a.toggleDisplayClass(this.$antennaWorkLabelSelectorModeElements,!1),a.toggleDisplayClass(this.$antennaWorkBulkActionsModeElements,!1),a.toggleDisplayClass(this.$antennaWorkFilterSelectorModeElements,!0),this.toggleUnreadClass(this.$antennaWorkHasDefaultModeClassElements,!0)},g.prototype.toggleUnreadClass=function(t,r){t.each(function(t,e){var n=l(e),i=1==+n.attr("data-is-unread");n.toggleClass("isUnread",r&&i)})},g.prototype.onClickModeContent=function(t){t.target===t.currentTarget&&this.presenter.handleDefaultButton()},g.prototype.onClickDefaultModeButton=function(t){this.presenter.handleDefaultButton()},g.prototype.onClickLabelSelectorModeButton=function(t){this.presenter.handleLabelSelectorButton()},g.prototype.onClickBulkActionsModeButton=function(t){this.presenter.handleBulkActionsButton()},g.prototype.onClickFilterSelectorModeButton=function(t){this.presenter.handleFilterSelectorButton()},g.prototype.onRefreshWorkList=function(){this.presenter.handleRefreshWorkList()},g);function g(t,e){return p.call(this,t,e)||this}n.TouchAntennaWorksModeContainerView=f},{"../../modules/Display":116,"../base":247,jquery:96}],142:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/WorkFollowingLabelTypes"),l=(o=s.Presenter,r(u,o),u.prototype.setup=function(){var e=this;this.workFollowingLabelTypes.on(a.LABEL_UPDATED_EVENT_TYPE,function(t){e.view.updateLabelTypeName(t.id,t.name)})},u);function u(t,e){var n=o.call(this,t)||this;return n.workFollowingLabelTypes=a.WorkFollowingLabelTypes.getInstance(),n}n.WorkFollowingLabelTypeNameContainerPresenter=l;var c,d=(c=s.View,r(h,c),h.prototype.initMembers=function(t){this.$container=t},h.prototype.createPresenter=function(){return new l(this,{})},h.prototype.updateLabelTypeName=function(t,e){this.$container.find(".js-work-following-label-type-name[data-work-following-label-type-id="+t+"]").text(e)},h);function h(t){return c.call(this,t)||this}n.WorkFollowingLabelTypeNameContainerView=d},{"../../model/WorkFollowingLabelTypes":113,"../base":247}],143:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/Locale"),l=t("jquery"),u=t("../../modules/TemplateElement"),c=t("../../model/WorkFollowingLabelTypes"),d=(o=s.Presenter,r(h,o),h.prototype.setup=function(){var e=this;this.workFollowingLabelTypes.on(c.LABEL_CREATED_EVENT_TYPE,function(t){e.view.createLabelType(t.id,t.name,t.count,t.permalinkPath)}),this.workFollowingLabelTypes.on(c.LABEL_UPDATED_EVENT_TYPE,function(t){e.view.updateLabelType(t.id,t.name,t.count)})},h);function h(t,e){var n=o.call(this,t)||this;return n.workFollowingLabelTypes=c.WorkFollowingLabelTypes.getInstance(),n.workFollowingLabelTypes.setLabelTypes(e.labelTypes),n}n.WorkFollowingLabelTypesContainerPresenter=d;var p,f=(p=s.View,r(g,p),g.prototype.initMembers=function(t){this.$container=t;var e=u.cloneTemplateChildren(this.$container.find(".js-work-following-label-type-container-item-template"));this.listItemTemplate={element:e[0],labelUrlElement:e.find(".js-work-following-label-type-item-link")[0],labelNameElement:e.find(".js-work-following-label-type-item-name")[0],labelCountElement:e.find(".js-work-following-label-type-item-count")[0]}},g.prototype.createPresenter=function(){var i={labelTypes:[]};return this.$container.find(".js-work-following-label-type-container-item").each(function(t,e){var n=l(e);i.labelTypes.push({id:n.attr("data-work-following-label-type-id"),name:n.find(".js-work-following-label-type-item-name").text(),count:+n.attr("data-work-following-label-type-works-count"),permalinkPath:n.attr("data-work-following-label-type-permalink-path")})}),new d(this,i)},g.prototype.createLabelType=function(t,e,n,i){var r=this.listItemTemplate;r.element.setAttribute("data-work-following-label-type-id",t),r.labelUrlElement.setAttribute("href",i),r.labelNameElement.textContent=e,r.labelCountElement.textContent=a.formatNumber(n),this.$container.append(r.element.cloneNode(!0))},g.prototype.updateLabelType=function(t,e,n){var i=this.$container.find('.js-work-following-label-type-container-item[data-work-following-label-type-id="'+t+'"]');i.attr("data-work-following-label-type-works-count",n),i.find(".js-work-following-label-type-item-name").text(e),i.find(".js-work-following-label-type-item-count").text(a.formatNumber(n))},g);function g(t){return p.call(this,t)||this}n.WorkFollowingLabelTypesContainerView=f},{"../../model/WorkFollowingLabelTypes":113,"../../modules/Locale":121,"../../modules/TemplateElement":125,"../base":247,jquery:96}],144:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=(o.prototype.toggleParentClass=function(t){t.each(function(){i(this).parent().toggleClass("isActive",this.checked)})},o.prototype.onChange=function(t){var e=t.currentTarget;"radio"!==e.type&&"checkbox"!==e.type||this.toggleParentClass(this.$container.find('input[name="'+e.name+'"]'))},o);function o(t){this.$container=t,this.toggleParentClass(this.$container.find('input[type="radio"]')),this.toggleParentClass(this.$container.find('input[type="checkbox"]')),this.$container.on("change","input",i.proxy(this.onChange,this))}n.CheckedParentActivatorView=r},{jquery:96}],145:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function i(t){var i=t,r=t.querySelector(".js-copied-message");t.addEventListener("click",function(t){var e=i.dataset.clipboardText,n=document.createElement("textarea");n.style.display="hidden",n.value=e,document.body.appendChild(n),n.select();try{document.execCommand("copy"),r&&(r.classList.remove("isHidden"),r.classList.add("isShown"),setTimeout(function(){r.classList.remove("isShown"),r.classList.add("isHidden")},2e3))}catch(t){}n.remove()})}n.ClipboardButtonView=i},{}],146:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t("jquery"),i=(r.prototype.onListChange=function(t){this.$textField.val(this.$listField.val());var e=this.$listField[0],n=(o(e.options[e.selectedIndex]).attr("data-selection-range")||"").match(/^([0-9]+),([0-9]+)$/);if(n){var i=+n[1],r=+n[2];this.$textField[0].setSelectionRange(i,r)}this.$textField.focus(),this.$textField.trigger("input")},r);function r(t){this.$container=t,this.$textField=t.find("input").first(),this.$listField=t.find("select").first(),this.$listField.on("change",o.proxy(this.onListChange,this))}n.ComboBoxView=i},{jquery:96}],147:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=(o.prototype.onSubmit=function(t){if(!t.isDefaultPrevented()){var e=i(t.currentTarget),n=e.attr("data-confirm-message");window.confirm(n)?e.trigger("dcv:confirmsubmitform:submit"):t.preventDefault()}},o);function o(){i(document).on("submit","form[data-confirm-message]",i.proxy(this.onSubmit,this))}n.ConfirmSubmitFormView=r},{jquery:96}],148:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Net"),r=t("../modules/Emittable"),o=(s.prototype.load=function(t){var e=this;i.ajax({method:"GET",url:t}).done(function(t){e.container.innerHTML=t,e.emit(s.LOADED_EVENT_TYPE)})},s.LOADED_EVENT_TYPE="loaded",s);function s(t){this.on=r.default.on,this.off=r.default.off,this.emit=r.default.emit;var e=t.dataset.endpointUrl?t.dataset.endpointUrl:"";this.container=t,e&&this.load(e)}n.ContentLoadView=o},{"../modules/Emittable":117,"../modules/Net":122}],149:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/EventType"),l=t("../model/WorkFollowingLabelTypes"),u=t("jquery"),c=t("./WorkFollowingLabelTypeInputPane"),d=t("../modules/Util/UpdateLocation"),h=(o=s.Presenter,r(p,o),Object.defineProperty(p.prototype,"shouldDisablePanelViews",{get:function(){return this.isLoading},enumerable:!0,configurable:!0}),p.prototype.handlePostEvent=function(t){this.createLabelType(t)},p.prototype.createLabelType=function(t){var n=this;this.setError(null),this.isLoading=!0,this.view.updateFieldStatuses(),this.workFollowingLabelTypes.createLabelType(t).done(function(t){n.view.closePanel(),n.shouldRedirect&&(n.locationURL=t.permalinkPath,n.view.updateLocation())}).fail(function(t){var e=t&&t.error&&t.error.message||"ラベルを作成できませんでした。";n.setError(new Error(e))}).always(function(){n.isLoading=!1,n.view.updateFieldStatuses()})},p);function p(t,e){var n=o.call(this,t)||this;return n.workFollowingLabelTypes=l.WorkFollowingLabelTypes.getInstance(),n.isLoading=!1,n.shouldRedirect=e.shouldRedirect,n.locationURL=null,n}n.CreateWorkFollowingLabelTypePanelPresenter=h;var f,g=(f=s.View,r(m,f),m.prototype.initMembers=function(t){this.$panel=t,this.$input=t.find(".js-work-following-label-type-input-pane-input"),this.$submitButton=t.find(".js-work-following-label-type-input-pane-submit-button"),this.$cancelButton=t.find(".js-work-following-label-type-create-panel-hide-button")},m.prototype.createPresenter=function(){return new h(this,{shouldRedirect:!!+this.$submitButton.attr("data-redirect-to-new-label-type")})},m.prototype.registerEvents=function(){this.$input.on(c.WorkFollowingLabelTypeInputPaneView.SUBMIT_EVENT_TYPE,u.proxy(this.onSubmitEvent,this)),this.$panel.on(a.PANEL_SHOW_EVENT,u.proxy(this.onPanelShow,this)),this.$panel.on(a.PANEL_HIDE_EVENT,u.proxy(this.onPanelHide,this)),this.$panel.on("dcv:modalwindow:show",u.proxy(this.onPanelShow,this)),this.$panel.on("dcv:modalwindow:hide",u.proxy(this.onPanelHide,this))},m.prototype.initSubViews=function(){this.workFollowingLabelTypeInputPaneView=new c.WorkFollowingLabelTypeInputPaneView(this.$input,this.$submitButton)},m.prototype.onPanelShow=function(){this.workFollowingLabelTypeInputPaneView.focusInput()},m.prototype.onPanelHide=function(){this.workFollowingLabelTypeInputPaneView.inputValue("")},m.prototype.onSubmitEvent=function(t,e){this.presenter.handlePostEvent(e)},m.prototype.updateFieldStatuses=function(){this.workFollowingLabelTypeInputPaneView.updateFieldStatues(!this.presenter.shouldDisablePanelViews),this.$cancelButton.prop("disabled",this.presenter.shouldDisablePanelViews)},m.prototype.closePanel=function(){this.$cancelButton.trigger("click")},m.prototype.updateLocation=function(){null!==this.presenter.locationURL&&d.updateLocation(this.presenter.locationURL)},m.prototype.updateError=function(){var t=this.presenter.lastError;t&&window.alert(t.message)},m);function m(t){return f.call(this,t)||this}n.CreateWorkFollowingLabelTypePanelView=g},{"../model/WorkFollowingLabelTypes":113,"../modules/EventType":118,"../modules/Util/UpdateLocation":128,"./WorkFollowingLabelTypeInputPane":242,"./base":247,jquery:96}],150:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Net"),l=t("jquery"),u=t("../modules/Display"),c=(o=s.Presenter,r(d,o),d.prototype.deleteHistory=function(r){var o=this;this.view.hideHistory(r),this.setError(null),a.ajax({method:"POST",url:r}).done(function(t,e,n){o.view.removeHistory(r)}).fail(function(t,e,n){o.view.showHistory(r);var i=t&&t.error&&t.error.message||"閲覧履歴を削除できませんでした";o.setError(new Error(i))})},d);function d(t,e){return o.call(this,t)||this}n.DeleteHistoryButtonsPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$container=t},f.prototype.createPresenter=function(){return new c(this,{})},f.prototype.registerEvents=function(){this.$container.on("click",".js-reading-history-delete-button",l.proxy(this.onClickButton,this))},f.prototype.onClickButton=function(t){this.presenter.deleteHistory(l(t.currentTarget).attr("data-action-path"))},f.prototype.getHistoryElementByActionPath=function(t){return this.$container.find('.js-reading-history-delete-button[data-action-path="'+t+'"]').closest(".js-reading-history")},f.prototype.hideHistory=function(t){var e=this.getHistoryElementByActionPath(t);u.toggleDisplayClass(e,!1)},f.prototype.showHistory=function(t){var e=this.getHistoryElementByActionPath(t);u.toggleDisplayClass(e,!0)},f.prototype.removeHistory=function(t){this.getHistoryElementByActionPath(t).remove()},f.prototype.updateError=function(){var t=this.presenter.lastError;t&&alert(t.message)},f);function f(t){return h.call(this,t)||this}n.DeleteHistoryButtonsView=p},{"../modules/Display":116,"../modules/Net":122,"./base":247,jquery:96}],151:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("jquery"),a=t("./base"),l=t("../modules/Net"),u=t("./ModalWindow"),c=t("../modules/Display"),d=t("../modules/Util/String"),h=t("../modules/Locale"),p=(o=a.Presenter,r(f,o),f.prototype.rejectWork=function(r){var o=this;this.view.hideWork(r),this.enteredWorkCount--,this.view.updateWorkCount(),this.setError(null),l.ajax({method:"POST",url:r}).done(function(t,e,n){o.view.removeWork(r)}).fail(function(t,e,n){o.enteredWorkCount++,o.view.updateWorkCount(),o.view.showWork(r);var i=t&&t.error&&t.error.message||"作品を削除できませんでした";o.setError(new Error(i))})},f);function f(t,e){var n=o.call(this,t)||this;return n.enteredWorkCount=e.enteredWorkCount,n}n.DeleteWorkUserEventModalPresenter=p;var g,m=(g=a.View,r(y,g),y.prototype.initMembers=function(t,e,n){this.$entiredWorksList=t,this.$modalContainer=e,this.$enteredWorkCount=n,this.$rejectWorkButton=e.find(".js-reject-work-button"),this.$rejectedWorkTitle=e.find(".js-rejected-work-title")},y.prototype.createPresenter=function(){return new p(this,{enteredWorkCount:+this.$enteredWorkCount.attr("data-entered-work-count")})},y.prototype.initSubViews=function(){new u.ModalWindowView(this.$modalContainer)},y.prototype.registerEvents=function(){this.$entiredWorksList.on("click",".js-work-userevent-delete-button",s.proxy(this.onClickOpenButton,this)),this.$rejectWorkButton.on("click",s.proxy(this.onClickRejectWorkButton,this))},y.prototype.onClickOpenButton=function(t){this.$modalContainer.trigger("dcv:modalwindow:command:open"),this.$rejectWorkButton.attr("data-action-path",s(t.currentTarget).attr("data-action-path"));var e=s(t.currentTarget).closest(".js-work-userevent-delete-button").attr("data-work-title");this.$rejectedWorkTitle.text(d.truncateText(e,30,28)),this.$rejectedWorkTitle.attr("title",e)},y.prototype.onClickRejectWorkButton=function(t){this.presenter.rejectWork(s(t.currentTarget).attr("data-action-path"))},y.prototype.getTargetWorkElementByActionPath=function(t){return this.$entiredWorksList.find(".js-work-userevent-delete-button").filter('[data-action-path="'+t+'"]').closest(".js-entered-work")},y.prototype.hideWork=function(t){var e=this.getTargetWorkElementByActionPath(t);c.toggleDisplayClass(e,!1)},y.prototype.showWork=function(t){var e=this.getTargetWorkElementByActionPath(t);c.toggleDisplayClass(e,!0)},y.prototype.removeWork=function(t){this.getTargetWorkElementByActionPath(t).remove()},y.prototype.updateWorkCount=function(){this.$enteredWorkCount.text(h.formatNumber(this.presenter.enteredWorkCount))},y);function y(t,e,n){return g.call(this,t,e,n)||this}n.DeleteWorkUserEventModalView=m},{"../modules/Display":116,"../modules/Locale":121,"../modules/Net":122,"../modules/Util/String":127,"./ModalWindow":200,"./base":247,jquery:96}],152:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=t("../modules/Display"),o=(s.prototype.onClickEditButton=function(){this.onClickButton(!0,this.$enteredWorks.offset().top)},s.prototype.onClickDonePanel=function(){this.onClickButton(!1,0)},s.prototype.onClickButton=function(t,e){if(this.isEditing!==t){this.isEditing=t,this.$enteredWorks.find(".js-entered-works-list").toggleClass("isEditing",this.isEditing);var n=this.$enteredWorks.find(".js-work-userevent-delete-button");r.toggleDisplayClass(n,this.isEditing),this.$editButton.prop("disabled",this.isEditing),this.$htmlAndBody.animate({scrollTop:e}),r.toggleDisplayClass(this.$donePanel,this.isEditing)}},s);function s(t,e,n){this.$enteredWorks=t,this.$editButton=e,this.$donePanel=n,this.$htmlAndBody=i("html,body"),this.isEditing=!1,this.$editButton.on("click",i.proxy(this.onClickEditButton,this)),this.$donePanel.on("click",i.proxy(this.onClickDonePanel,this))}n.EditWorkUserEventView=o},{"../modules/Display":116,jquery:96}],153:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=t("../modules/Display"),o=(s.prototype.onClickEditButton=function(){this.isEditing=!this.isEditing,r.toggleDisplayClass(this.$container.find(".js-for-editing-mode"),!this.isEditing),r.toggleDisplayClass(this.$container.find(".js-is-editing-mode"),this.isEditing),this.$editButton.find(".js-edit-button-label").text(this.isEditing?this.isEditingLabel:this.forEditingLabel),this.$editableElements.toggleClass(this.forEditingClass,!this.isEditing),this.$editableElements.toggleClass(this.isEditingClass,this.isEditing)},s);function s(t,e,n){this.$container=t,this.$editButton=e,this.$editableElements=n,this.isEditing=!1,this.forEditingLabel=e.attr("data-for-editing-label"),this.isEditingLabel=e.attr("data-is-editing-label"),this.forEditingClass=n.attr("data-for-editing-class"),this.isEditingClass=n.attr("data-is-editing-class"),this.$editButton.on("click",i.proxy(this.onClickEditButton,this))}n.EditingModeSwitcherView=o},{"../modules/Display":116,jquery:96}],154:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("./EpisodeCommentListItem"),r=t("jquery"),o=(s.prototype.initMembers=function(t){this.$list=t},s.prototype.registerEvents=function(){this.$list.on("dcv:episodecommentlistitem:refresh",r.proxy(this.onListItemRefresh,this))},s.prototype.initSubViews=function(){this.$list.find(".js-episode-comment-list-item").each(function(t,e){new i.EpisodeCommentListItemView(r(e))})},s.prototype.onListItemRefresh=function(t){new i.EpisodeCommentListItemView(r(t.target))},s);function s(t){this.initMembers(t),this.registerEvents(),this.initSubViews()}n.EpisodeCommentListView=o},{"./EpisodeCommentListItem":155,jquery:96}],155:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../model/EpisodeCommentAuthor"),l=t("../modules/Net"),u=t("./TabButtons"),c=t("./TogglePanelButton"),d=t("../modules/Display"),h=t("../modules/EventType"),p=t("jquery"),f=(o=s.Presenter,r(g,o),g.prototype.editCommentOrReply=function(t,e){var n=this;this.setError(null),l.ajax({method:"POST",url:t,data:this.buildData(e)}).done(function(t){n.view.replaceSelf(t.episode_comment_html)}).fail(function(t){n.isLoading=!1,n.view.updateIsLoading();var e=t&&t.error&&t.error.message||"編集できませんでした。";n.setError(new Error(e))}),this.isLoading=!0,this.view.updateIsLoading()},g.prototype.deleteCommentOrReply=function(t){var n=this;l.ajax({method:"POST",url:t,data:this.buildData([])}).done(function(t){var e=t.episode_comment_html;n.view.replaceSelf(e),e||a.default.getInstance(n.commentAuthorPermalinkPath,n.episodePermalinkPath,!0).setHasWritten(!1)}).fail(function(t){n.isLoading=!1,n.view.updateIsLoading();var e=t&&t.error&&t.error.message||"削除できませんでした。";n.view.showErrorMessage(e)}),this.isLoading=!0,this.view.updateIsLoading()},g.prototype.buildData=function(t){return this.isForWork?t.concat({name:"is_for_work",value:"1"}):t},g);function g(t,e){var n=o.call(this,t)||this;return n.commentAuthorPermalinkPath=e.commentAuthorPermalinkPath,n.episodePermalinkPath=e.episodePermalinkPath,n.isForWork=e.isForWork,n}n.EpisodeCommentListItemPresenter=f;var m,y=(m=s.View,r(v,m),v.prototype.initMembers=function(t){this.$listItem=t,this.$editForm=t.find(".js-episode-comment-edit-form"),this.$deleteButtons=t.find(".js-episode-comment-delete-button"),this.$errorMessageBox=t.find(".js-episode-comment-error-message-box"),this.$statusChangeableReplyButton=t.find('.js-episode-comment-reply-panel-button[data-disabled-when-panel-shown="1"]'),this.$statusChangeableReplyPanel=this.$statusChangeableReplyButton.length?p("#"+this.$statusChangeableReplyButton.attr("aria-controls")):p()},v.prototype.createPresenter=function(){return new f(this,{commentAuthorPermalinkPath:this.$listItem.attr("data-comment-author-permalink-path"),episodePermalinkPath:this.$listItem.attr("data-episode-permalink-path"),isForWork:!!+this.$listItem.attr("data-is-for-work")})},v.prototype.registerEvents=function(){this.$editForm.on("submit",p.proxy(this.onEditFormSubmit,this)),this.$deleteButtons.on("click",p.proxy(this.onDeleteButtonClick,this)),this.$statusChangeableReplyPanel.on(h.PANEL_SHOW_EVENT,p.proxy(this.onReplyPanelShow,this)),this.$statusChangeableReplyPanel.on(h.PANEL_HIDE_EVENT,p.proxy(this.onReplyPanelHide,this))},v.prototype.initSubViews=function(){this.editPanelButtonsView=new u.TabButtonsView(this.$listItem.find(".js-episode-comment-edit-panel-button")),this.replyPanelButtonsView=new c.TogglePanelButtonView(this.$listItem.find(".js-episode-comment-reply-panel-button"))},v.prototype.onEditFormSubmit=function(t){t.preventDefault();var e=p(t.currentTarget);this.presenter.editCommentOrReply(e.attr("action"),e.serializeArray())},v.prototype.onDeleteButtonClick=function(t){var e=p(t.currentTarget),n=e.attr("data-confirm-message");window.confirm(n)&&this.presenter.deleteCommentOrReply(e.attr("data-action-url"))},v.prototype.onReplyPanelShow=function(t){t.target===t.currentTarget&&this.$statusChangeableReplyButton.prop("disabled",!0)},v.prototype.onReplyPanelHide=function(t){t.target===t.currentTarget&&this.$statusChangeableReplyButton.prop("disabled",!1)},v.prototype.updateIsLoading=function(){this.$editForm.find('button[type="submit"]').add(this.$deleteButtons).prop("disabled",this.presenter.isLoading)},v.prototype.replaceSelf=function(t){var e=p.parseHTML(t),n=p(e).filter("*");this.$listItem.replaceWith(n),n.trigger("dcv:episodecommentlistitem:refresh")},v.prototype.showErrorMessage=function(t){window.alert(t)},v.prototype.updateError=function(){var t=this.presenter.lastError;this.$errorMessageBox.text(t?t.message:""),d.toggleDisplayClass(this.$errorMessageBox,!!t)},v);function v(t){return m.call(this,t)||this}n.EpisodeCommentListItemView=y},{"../model/EpisodeCommentAuthor":106,"../modules/Display":116,"../modules/EventType":118,"../modules/Net":122,"./TabButtons":224,"./TogglePanelButton":226,"./base":247,jquery:96}],156:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../model/EpisodeDisplaySettings"),l=t("../modules/Display"),u=t("../modules/UserAgent"),c=t("./CheckedParentActivator"),d=t("jquery"),h=(o=s.Presenter,r(p,o),p.prototype.setup=function(){var n=this,t=this.displaySettings;t.on("settingupdate",function(t,e){n.isHandlingSettingChange||n.view.changeSettingField(t,e)});for(var e=0,i=t.getKeys();e<i.length;e++){var r=i[e];this.view.changeSettingField(r,t.getValue(r))}},p.prototype.handleSettingChange=function(t,e){this.displaySettings.isAvailableKey(t)&&(this.isHandlingSettingChange=!0,this.displaySettings.setValue(t,e),this.isHandlingSettingChange=!1)},p);function p(t,e){var n=o.call(this,t)||this;return n.displaySettings=a.default.getInstance(e.storageSegment),n.isHandlingSettingChange=!1,n}n.EpisodeDisplaySettingsPanelPresenter=h;var f,g=(f=s.View,r(m,f),m.prototype.initMembers=function(t,e){this.$settingContainer=t,this.$fontFamilyWarning=e},m.prototype.createPresenter=function(){var t=this.$settingContainer.attr("data-storage-segment");return new h(this,{storageSegment:t})},m.prototype.registerEvents=function(){this.$settingContainer.on("change",d.proxy(this.onChange,this))},m.prototype.initSubViews=function(){this.checkedParentActivatorView=new c.CheckedParentActivatorView(this.$settingContainer),u.isAndroid(navigator.userAgent)&&l.toggleDisplayClass(this.$fontFamilyWarning,!0)},m.prototype.onChange=function(t){var e=t.target;this.presenter.handleSettingChange(e.name,e.value)},m.prototype.changeSettingField=function(t,e){var n=this.$settingContainer.find('input[name="'+t+'"][value="'+e+'"]');n.prop("checked",!0),n.trigger("change")},m);function m(t,e){return f.call(this,t,e)||this}n.EpisodeDisplaySettingsPanelView=g},{"../model/EpisodeDisplaySettings":109,"../modules/Display":116,"../modules/UserAgent":126,"./CheckedParentActivator":144,"./base":247,jquery:96}],157:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../model/EpisodeDisplaySettings"),l=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.setup=function(){var n=this,t=this.displaySettings;t.on("settingupdate",function(t,e){n.applySetting(t,e),n.shouldUpdateRootWritingDirection&&"writing_direction"===t&&n.view.updateRootWritingDirection(),n.displaySettings.affectsSize(t)&&n.view.notifyResize()});for(var e=0,i=t.getKeys();e<i.length;e++){var r=i[e];this.applySetting(r,t.getValue(r))}this.shouldUpdateRootWritingDirection&&this.view.updateRootWritingDirection()},c.prototype.applySetting=function(t,e){var n=this.displaySettings.getAvailableValues(t).filter(function(t){return t!==e});this.view.updateDisplay(t,e,n)},Object.defineProperty(c.prototype,"isWritingDirectionVertical",{get:function(){return"vertical"===this.displaySettings.getValue("writing_direction")},enumerable:!0,configurable:!0}),c);function c(t,e){var n=o.call(this,t)||this;return n.shouldUpdateRootWritingDirection=e.shouldUpdateRootWritingDirection,n.displaySettings=a.default.getInstance(e.storageSegment),n}n.EpisodeDisplaySwitcherPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t,e){this.$body=l(document.body),this.storageSegment=t,this.shouldUpdateRootWritingDirection=e},p.prototype.createPresenter=function(){return new u(this,{storageSegment:this.storageSegment,shouldUpdateRootWritingDirection:this.shouldUpdateRootWritingDirection})},p.prototype.updateDisplay=function(t,e,n){for(var i=t.replace(/_(.)/g,function(t,e){return e.toUpperCase()})+"-",r=0,o=n;r<o.length;r++){var s=o[r];this.$body.removeClass(i+s)}this.$body.addClass(i+e)},p.prototype.updateRootWritingDirection=function(){l(document.documentElement).toggleClass("writingDirection-vertical",this.presenter.isWritingDirectionVertical)},p.prototype.notifyResize=function(){l(window).trigger("resize")},p);function p(t,e){return d.call(this,t,e)||this}n.EpisodeDisplaySwitcherView=h},{"../model/EpisodeDisplaySettings":109,"./base":247,jquery:96}],158:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var f=t("./EpisodeEditor/EditorForm"),g=t("./EpisodeEditor/BodyFieldPositioner"),m=t("./EpisodeEditor/BodyFieldAttender"),y=t("./FormInputProtector"),v=t("./TabButtons"),b=t("./ComboBox"),_=t("./PopupPanelButton"),w=t("./EpisodeDisplaySwitcher"),x=t("./EpisodeDisplaySettingsPanel"),k=t("./EpisodeEditor/ReservationPanel"),C=t("./EpisodeEditor/PreviewPanel"),S=t("./EpisodeEditor/ToggleSidebar"),P=t("./EpisodeEditor/NotationInjector"),E=t("./EpisodeEditor/NotationButtons"),T=t("./EpisodeEditor/SharedDraftWidget"),O=t("./EpisodeEditor/CharacterCounter"),i=t("./EpisodeViewer/WheelScroller"),r=t("./VerticalComposition"),M=t("./PersistentHideablePanel"),o=t("../modules/EventType"),s=t("../modules/Display"),a=t("../modules/UserAgent"),j=t("jquery"),l=(u.prototype.initMembers=function(){this.$editorContainer=j(".js-episode-editor-container"),this.$editorForm=j(".js-episode-editor-form"),this.$bodyField=this.$editorForm.find('textarea[name="body"]'),this.$errorMessageBox=this.$editorForm.find(".js-error-message-box"),this.$notationButtons=j(".js-notation-button"),this.$deleteForm=j(".js-episode-delete-form"),this.$previewPanel=j(".js-episode-preview-panel"),this.displaySettingsStorageSegment=j(".js-episode-display-setting-container").attr("data-storage-segment"),this.$ctrlSHideablePanel=j(".js-saveButton-news-panel")},u.prototype.registerEvents=function(){j(document).on("dcv:notationinjector:command",j.proxy(this.onNotationCommand,this)),j(document).on("keydown",j.proxy(this.onKeyDown,this)),this.$editorForm.on(o.PANEL_SHOW_EVENT,j.proxy(this.onPanelShow,this)),this.$editorForm.on(o.PANEL_HIDE_EVENT,j.proxy(this.onPanelHide,this)),this.$bodyField.on("dcv:episodebodyfieldattender:attend",j.proxy(this.onBodyFieldAttend,this)),this.$editorForm.on("dcv:episodeeditorform:tryingtosave",j.proxy(this.onTryingToSave,this)),this.$editorForm.on("dcv:episodeeditorform:save",j.proxy(this.onCommit,this)),this.$deleteForm.on("dcv:confirmsubmitform:submit",j.proxy(this.onCommit,this)),this.$editorContainer.on("dcv:editorsidebar:open dcv:editorsidebar:close dcv:episodeeditorform:errorupdate",j.proxy(this.onBodyFieldReflow,this)),this.$previewPanel.on("dcv:previewpanel:previewshow",j.proxy(this.onPreviewShow,this)),this.$ctrlSHideablePanel.on("dcv:ctrlshideablepanel:hide",j.proxy(this.onNewsPanelHide,this))},u.prototype.initSubViews=function(){var t=this.$editorForm;this.editorFormView=new f.EditorFormView(t),this.toggleSidebarView=new S.ToggleSidebarView(j(".js-toggle-aside-button"),j(".js-toggle-aside")),this.sidebarTabButtonsView=new v.TabButtonsView(j(".js-sidebar-tab-button")),this.notationInjectorView=new P.NotationInjectorView(this.$bodyField),this.notationButtonsView=new E.NotationButtonsView(this.$notationButtons),this.sharedDraftWidgetView=new T.SharedDraftWidgetView(j(".js-shared-draft-widget"));var e=j(".js-body-character-counter");this.characterCounterView=new O.CharacterCounterView(this.$bodyField,e);var n=j(".js-body-field-container"),i=j(".js-episode-editor-header"),r=j(".js-episode-editor-footer");this.bodyFieldPositionerView=new g.BodyFieldPositionerView(n,i,r);var o=j(".js-body-field-surrounding"),s=j(".js-body-field-exit");this.bodyFieldAttenderView=new m.BodyFieldAttenderView(this.$bodyField,o,s),this.initTitleFieldSelection();var a=j(".js-episode-display-setting-container"),l=a.attr("data-storage-segment"),u=!!+a.attr("data-should-update-root-writing-direction");this.displaySwitcherView=new w.EpisodeDisplaySwitcherView(l,u),this.displaySettingsPanelView=new x.EpisodeDisplaySettingsPanelView(a,j(".js-episode-display-setting-font-family-warning"));var c=j(".js-episode-reservation-panel");if(c.length){var d=c.find(".js-combo-box-container");this.comboBoxViews=d.get().map(function(t){return new b.ComboBoxView(j(t))}),this.reservationPanelView=new k.ReservationPanelView(c);var h=j(".js-reservation-panel-button");this.reservationPanelButtonView=new _.PopupPanelButtonView(h)}else this.comboBoxViews=[],this.reservationPanelView=null,this.reservationPanelButtonView=null;var p=this.$ctrlSHideablePanel;this.ctrlSHideablePanelView=new M.PersistentHideablePanelView(p),this.previewPanelView=new C.PreviewPanelView(this.$previewPanel,t,this.$errorMessageBox),this.formInputProtectorView=new y.FormInputProtectorView(t),this.tabButtonsView=new v.TabButtonsView(j(".js-editor-preview-tab-button")),this.verticalCompositionViews=[],this.wheelScrollerView=null,this.toggleSidebarView.updateIsOpen()},u.prototype.initTitleFieldSelection=function(){var t=this.$editorForm.find('input[name="title"]')[0],e=t.value.length;t.setSelectionRange(e,e)},u.prototype.onNotationCommand=function(t,e){t.isDefaultPrevented()||(t.preventDefault(),this.$bodyField.trigger(t.type,[e]))},u.prototype.onPanelShow=function(t){var e=j(t.target);if(this.isMainTabPanel(e)){var n=e.hasClass("js-episode-edit-panel");this.notationButtonsView.presenter.setIsEnabled(n),this.bodyFieldPositionerView.receivePanelShow(n),this.togglePreviewClass(j(document.body),!n)}},u.prototype.onPanelHide=function(t){this.isMainTabPanel(j(t.target))&&(this.$errorMessageBox.text(""),s.toggleDisplayClass(this.$errorMessageBox,!1))},u.prototype.isMainTabPanel=function(t){return t.hasClass("js-episode-edit-panel")||t.hasClass("js-episode-preview-panel")},u.prototype.onNewsPanelHide=function(t){this.ctrlSHideablePanelView.presenter.hide()},u.prototype.isNewsPanel=function(t){return t.hasClass("js-saveButton-news-panel")},u.prototype.onBodyFieldAttend=function(t){this.toggleSidebarView.presenter.toggleAsideState(!1)},u.prototype.onTryingToSave=function(t){this.ctrlSHideablePanelView.$panel.trigger("dcv:ctrlshideablepanel:hide")},u.prototype.onCommit=function(t){this.$editorForm.trigger("dcv:forminputprotector:command:dismiss")},u.prototype.onBodyFieldReflow=function(t){this.bodyFieldPositionerView.receiveBodyFieldReflow()},u.prototype.onPreviewShow=function(t){this.wheelScrollerView&&this.wheelScrollerView.destroy(),this.verticalCompositionViews.forEach(function(t){t.destroy()});var e=this.$previewPanel.find(".js-episode-body");this.verticalCompositionViews=[new r.VerticalCompositionView(j(document.body),this.displaySettingsStorageSegment),new r.VerticalCompositionView(e,this.displaySettingsStorageSegment,"p")],this.wheelScrollerView=i.WheelScrollerView.createIfNeeded(this.$previewPanel.find(j(".js-episode-preview-scroller")),this.displaySettingsStorageSegment)},u.prototype.togglePreviewClass=function(t,e){t.toggleClass("isPreview",e),t.toggleClass("isEditing",!e)},u.prototype.onKeyDown=function(t){(a.isMac(navigator.userAgent)?t.metaKey:t.ctrlKey)&&83===t.which&&(t.preventDefault(),this.editorFormView.$saveButton&&!this.editorFormView.$saveButton.prop("disabled")&&"draft"===this.editorFormView.$statusField.val()&&(t.target===document.activeElement&&this.isInputChangeElement(t.target)&&(j(t.target).blur(),j(t.target).focus()),this.editorFormView.saveEpisode(),this.ctrlSHideablePanelView.notifyPanelHide()))},u.prototype.isInputChangeElement=function(t){return"TEXTAREA"===t.tagName||"INPUT"===t.tagName&&"text"===t.getAttribute("type")},u);function u(){this.initMembers(),this.registerEvents(),this.initSubViews()}n.EpisodeEditorView=l},{"../modules/Display":116,"../modules/EventType":118,"../modules/UserAgent":126,"./ComboBox":146,"./EpisodeDisplaySettingsPanel":156,"./EpisodeDisplaySwitcher":157,"./EpisodeEditor/BodyFieldAttender":159,"./EpisodeEditor/BodyFieldPositioner":160,"./EpisodeEditor/CharacterCounter":161,"./EpisodeEditor/EditorForm":162,"./EpisodeEditor/NotationButtons":163,"./EpisodeEditor/NotationInjector":164,"./EpisodeEditor/PreviewPanel":165,"./EpisodeEditor/ReservationPanel":166,"./EpisodeEditor/SharedDraftWidget":167,"./EpisodeEditor/ToggleSidebar":168,"./EpisodeViewer/WheelScroller":189,"./FormInputProtector":195,"./PersistentHideablePanel":211,"./PopupPanelButton":213,"./TabButtons":224,"./VerticalComposition":230,jquery:96}],159:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/Display"),l=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.setup=function(){this.view.updateAttention()},Object.defineProperty(c.prototype,"shouldAttend",{get:function(){return this.viewportWidth<=640&&this.hasFocus},enumerable:!0,configurable:!0}),c.prototype.setViewportWidth=function(t){this.viewportWidth=t,this.view.updateAttention()},c.prototype.setHasFocus=function(t){this.hasFocus=t,this.view.updateAttention()},c);function c(t,e){var n=o.call(this,t)||this;return n.viewportWidth=e.viewportWidth,n.hasFocus=e.hasFocus,n}n.BodyFieldAttenderPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t,e,n){this.$bodyField=t,this.$surroundings=e,this.$exits=n},p.prototype.createPresenter=function(){return new u(this,{viewportWidth:window.innerWidth,hasFocus:document.activeElement===this.$bodyField[0]})},p.prototype.registerEvents=function(){this.$bodyField.on("focus",l.proxy(this.onFocus,this)),this.$bodyField.on("blur",l.proxy(this.onBlur,this)),l(window).on("resize",l.proxy(this.onResize,this))},p.prototype.onFocus=function(t){this.presenter.setHasFocus(!0)},p.prototype.onBlur=function(t){this.presenter.setHasFocus(!1)},p.prototype.onResize=function(t){this.presenter.setViewportWidth(window.innerWidth)},p.prototype.updateAttention=function(){var t=this.presenter.shouldAttend;a.toggleDisplayClass(this.$surroundings,!t),a.toggleDisplayClass(this.$exits,t),t&&this.$bodyField.trigger("dcv:episodebodyfieldattender:attend")},p);function p(t,e,n){return d.call(this,t,e,n)||this}n.BodyFieldAttenderView=h},{"../../modules/Display":116,"../base":247,jquery:96}],160:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/UserAgent"),l=t("jquery"),u=t("lodash"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){this.view.updateElementProperties()},Object.defineProperty(d.prototype,"fieldContainerHeight",{get:function(){return this.fieldContentHeight+this.footerHeight+(this.isOverflowClippedByContent?50:0)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"fieldLeft",{get:function(){return this.fieldStaticLeft},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"fieldWidth",{get:function(){return this.fieldStaticWidth+this.scrollbarWidth+30},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"fieldHeight",{get:function(){return this.viewportHeight-this.fieldTop-this.footerHeight},enumerable:!0,configurable:!0}),d.prototype.setIsFieldShown=function(t){this.isFieldShown=t,this.refreshViewportSize()},d.prototype.refreshViewportSize=function(){if(this.isFieldShown){var t=this.view.getViewportSize();this.viewportWidth=Math.round(t.width),this.viewportHeight=Math.round(t.height),this.isSeamlessScrollMode=640<this.viewportWidth&&!this.forbidsSeamlessScroll,this.view.updateScrollMode(),this.adjustField()}},d.prototype.adjustField=function(){this.isFieldShown&&this.isSeamlessScrollMode&&(this.adjustFieldDimension(),this.adjustFieldContainerSize(),this.adjustFieldScroll())},d.prototype.adjustFieldDimension=function(){if(this.isFieldShown&&this.isSeamlessScrollMode){var t=this.view.getElementDimension();this.headerHeight=Math.round(t.headerHeight),this.footerHeight=Math.round(t.footerHeight),this.fieldStaticTop=Math.round(t.fieldStaticTop),this.fieldStaticLeft=Math.round(t.fieldStaticLeft),this.fieldStaticWidth=Math.round(t.fieldStaticWidth),this.fieldTop<0&&(this.fieldTop=this.fieldStaticTop),this.view.updateFieldDimension()}},d.prototype.adjustFieldContainerSize=function(){if(this.isFieldShown&&this.isSeamlessScrollMode){var t=Math.round(this.view.getFieldContentHeight());t!==this.fieldContentHeight&&(this.fieldContentHeight=t,this.view.updateFieldContainerSize())}},d.prototype.adjustFieldScroll=function(){if(this.isFieldShown&&this.isSeamlessScrollMode){var t=Math.round(this.view.getWindowScrollOffset()),e=Math.max(this.fieldStaticTop-t,this.headerHeight);if(e!==this.fieldTop){if(this.isScrollingInField)return void(this.shouldAdjustLater=!0);this.fieldTop=e,this.view.updateFieldDimension()}var n=Math.max(t+this.headerHeight-this.fieldStaticTop,0);n!==this.fieldScrollOffset&&(this.fieldScrollOffset=n,this.view.updateFieldScrollOffset())}},d.prototype.adjustWindowScroll=function(){if(this.isFieldShown&&this.isSeamlessScrollMode){var t=Math.round(this.view.getFieldScrollOffset()),e=t-this.fieldScrollOffset;e&&(this.isScrollingInField=!0,this.dismissScrollingLater(),this.fieldScrollOffset=t,this.view.scrollWindowBy(e))}},d.prototype.doDismissScrollingLater=function(){this.isScrollingInField=!1,this.shouldAdjustLater&&(this.shouldAdjustLater=!1,this.adjustFieldScroll())},d.prototype.doHandleWindowScroll=function(){this.adjustFieldScroll()},d.prototype.doHandleFieldScroll=function(){this.adjustWindowScroll()},d);function d(t,e){var n=o.call(this,t)||this;return n.viewportWidth=-1,n.viewportHeight=-1,n.headerHeight=-1,n.footerHeight=-1,n.fieldStaticLeft=-1,n.fieldStaticTop=-1,n.fieldStaticWidth=-1,n.fieldTop=-1,n.fieldContentHeight=-1,n.fieldScrollOffset=-1,n.scrollbarWidth=Math.round(e.scrollbarWidth),n.isFieldShown=!1,n.isSeamlessScrollMode=!1,n.isOverflowClippedByContent=e.isOverflowClippedByContent,n.forbidsSeamlessScroll=e.forbidsSeamlessScroll,n.isScrollingInField=!1,n.shouldAdjustLater=!1,n.handleWindowScroll=u.throttle(n.doHandleWindowScroll,42),n.handleFieldScroll=u.throttle(n.doHandleFieldScroll,42),n.dismissScrollingLater=u.debounce(n.doDismissScrollingLater,83,{maxWait:750}),n}n.BodyFieldPositionerPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t,e,n){this.$bodyFieldContainer=t,this.$bodyFieldPane=t.find(".js-body-field-pane"),this.$bodyField=t.find("textarea").first(),this.$header=e,this.$footer=n},f.prototype.createPresenter=function(){var t=this.$bodyField[0],e=navigator.userAgent;return new c(this,{scrollbarWidth:t.offsetWidth-t.clientWidth,isOverflowClippedByContent:0<=e.indexOf("Gecko/"),forbidsSeamlessScroll:a.isIOS(e)})},f.prototype.registerEvents=function(){this.$bodyField.on("input change",l.proxy(this.onFieldInput,this)),this.$bodyField.on("scroll",l.proxy(this.onFieldScroll,this)),l(window).on("scroll",l.proxy(this.onWindowScroll,this)),l(window).on("resize",l.proxy(this.onWindowResize,this))},f.prototype.onFieldInput=function(t){this.presenter.adjustFieldContainerSize()},f.prototype.onFieldScroll=function(t){this.presenter.handleFieldScroll()},f.prototype.onWindowScroll=function(t){this.presenter.handleWindowScroll()},f.prototype.onWindowResize=function(t){this.presenter.refreshViewportSize()},f.prototype.receivePanelShow=function(t){this.presenter.setIsFieldShown(t)},f.prototype.receiveBodyFieldReflow=function(){this.presenter.adjustField()},f.prototype.getViewportSize=function(){return{width:window.innerWidth,height:window.innerHeight}},f.prototype.getElementDimension=function(){var t=this.$bodyFieldContainer.offset();return{headerHeight:this.$header.outerHeight(),footerHeight:this.$footer.outerHeight(),fieldStaticLeft:t.left,fieldStaticTop:t.top,fieldStaticWidth:this.$bodyFieldContainer.outerWidth()}},f.prototype.getFieldContentHeight=function(){return this.$bodyField[0].scrollHeight},f.prototype.getWindowScrollOffset=function(){return window.pageYOffset},f.prototype.getFieldScrollOffset=function(){return this.$bodyField[0].scrollTop},f.prototype.updateElementProperties=function(){this.$bodyField.toggleClass("isOverflowClippedByContent",this.presenter.isOverflowClippedByContent)},f.prototype.updateScrollMode=function(){var t=this.presenter.isSeamlessScrollMode;l(document.body).toggleClass("isSeamlessScrollMode",t),this.$bodyFieldPane.toggleClass("isSeamlessScrollMode",t),this.$bodyField.toggleClass("isSeamlessScrollMode",t),t||(this.$bodyFieldContainer[0].style.cssText="",this.$bodyFieldPane[0].style.cssText="",this.$bodyField[0].style.cssText="")},f.prototype.updateFieldDimension=function(){var t=this.presenter;this.$bodyFieldPane.css({left:t.fieldLeft,top:t.fieldTop,width:t.fieldStaticWidth,height:t.fieldHeight}),this.$bodyField.css({width:t.fieldWidth,height:t.fieldHeight})},f.prototype.updateFieldContainerSize=function(){this.$bodyFieldContainer.css("height",this.presenter.fieldContainerHeight)},f.prototype.updateFieldScrollOffset=function(){this.$bodyField[0].scrollTop=this.presenter.fieldScrollOffset},f.prototype.scrollWindowBy=function(t){window.scrollBy(0,t)},f);function f(t,e,n){return h.call(this,t,e,n)||this}n.BodyFieldPositionerView=p},{"../../modules/UserAgent":126,"../base":247,jquery:96,lodash:102}],161:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/NotationCounter"),l=t("../../modules/Locale"),u=t("lodash"),c=t("jquery"),d=(o=s.Presenter,r(h,o),h.prototype.setup=function(){this.refreshCount()},h.prototype.refreshCount=function(){var t=this.view.getText(),e=a.countCharacters(t),n=100<=e,i=e<1e3?10:100,r=n?Math.round(e/i)*i:e;this.count=r,this.isRounded=n,this.view.updateCount()},h);function h(t,e){var n=o.call(this,t)||this;return n.count=0,n.isRounded=!1,n.handleInput=u.throttle(n.refreshCount,1e3,{leading:!1}),n}n.CharacterCounterPresenter=d;var p,f=(p=s.View,r(g,p),g.prototype.initMembers=function(t,e){this.$textField=t,this.$counter=e,this.$prefix=e.find(".js-character-counter-prefix"),this.$count=e.find(".js-character-counter-count")},g.prototype.createPresenter=function(){return new d(this,{})},g.prototype.registerEvents=function(){this.$textField.on("input",c.proxy(this.onInput,this))},g.prototype.onInput=function(t){this.presenter.handleInput()},g.prototype.updateCount=function(){this.$prefix.text(this.presenter.isRounded?"約":""),this.$count.text(l.formatNumber(this.presenter.count))},g.prototype.getText=function(){return this.$textField[0].value},g);function g(t,e){return p.call(this,t,e)||this}n.CharacterCounterView=f},{"../../modules/Locale":121,"../../modules/NotationCounter":123,"../base":247,jquery:96,lodash:102}],162:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/Net"),l=t("../../modules/FormFields"),u=t("../../modules/Display"),c=t("../../modules/Util/String"),d=t("../../modules/Util/UpdateLocation"),h=t("jquery"),p=(o=s.Presenter,r(f,o),f.prototype.setup=function(){for(var t=0,e=this.initialFields;t<e.length;t++){var n=e[t];this.updateFieldValidity(n.name,n.value)}this.view.updateUndoRedoButton()},Object.defineProperty(f.prototype,"canSubmit",{get:function(){return this.isValidTitle&&this.isValidBody},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isNewEpisode",{get:function(){return/\/episodes\/new$/.test(this.actionURL)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"shouldDisableSubmitButtons",{get:function(){return this.isLoading&&this.shouldKeepEditing&&!this.isNewEpisode},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"shouldDisableFields",{get:function(){return this.isLoading&&!this.shouldDisableSubmitButtons},enumerable:!0,configurable:!0}),f.prototype.handleInput=function(t,e){this.updateFieldValidity(t,e),this.view.updateUndoRedoButton()},f.prototype.updateFieldValidity=function(t,e){switch(t){case"title":var n=c.stringLength(e);this.isValidTitle=0<n&&n<=this.maxTitleLength,this.view.updateTitleValidity();break;case"body":this.isValidBody=!!e,this.view.updateBodyValidity()}},f.prototype.handleSubmit=function(t){var r=this;this.setError(null),this.view.notifyTryingToSave(),this.isChecking&&(window.clearTimeout(this.checkDurationID),this.isChecking=!1,this.view.updateIsChecking()),this.shouldKeepEditing=t.some(function(t){return"keep_editing"===t.name&&"1"===t.value});var i=h.Deferred(function(t){window.setTimeout(t.resolve,700)}).promise();a.ajax({method:"POST",url:this.actionURL,data:t}).done(function(t,e,n){r.view.notifySave(),r.shouldKeepEditing&&r.isNewEpisode?(r.locationURL=t.location,r.view.replaceLocation()):r.shouldKeepEditing?i.done(function(){r.isLoading=!1,r.view.updateIsLoading(),r.isChecking=!0,r.view.updateIsChecking(),h.Deferred(function(t){r.checkDurationID=window.setTimeout(t.resolve,2e3)}).promise().done(function(){r.isChecking=!1,r.view.updateIsChecking()})}):(r.locationURL=t.location,r.view.updateLocation())}).fail(function(t,e,n){r.isLoading=!1,r.view.updateIsLoading();var i=t&&t.error&&t.error.message||"エピソードを保存できませんでした";r.setError(new Error(i))}),this.isLoading=!0,this.view.updateIsLoading()},f.prototype.handleUndo=function(){this.view.undo(),this.view.updateUndoRedoButton()},f.prototype.handleRedo=function(){this.view.redo(),this.view.updateUndoRedoButton()},f.prototype.handlePageHide=function(){this.isLoading=!1,this.view.updateIsLoading()},f.prototype.handleVisibilityChange=function(){this.view.updateUndoRedoButton()},f);function f(t,e){var n=o.call(this,t)||this;return n.actionURL=e.actionURL,n.maxTitleLength=e.maxTitleLength,n.initialFields=e.fields,n.isValidTitle=!1,n.isValidBody=!1,n.episodeStatus="",n.isLoading=!1,n.isChecking=!1,n.checkDurationID=-1,n.shouldKeepEditing=!1,n.locationURL="",n}n.EditorFormPresenter=p;var g,m=(g=s.View,r(y,g),y.prototype.initMembers=function(t){this.$form=t,this.$titleField=t.find('input[name="title"]'),this.$bodyField=t.find('textarea[name="body"]'),this.$statusField=t.find('input[name="status"]'),this.$editReservationField=t.find('input[name="edit_reservation"]'),this.$keepEditingField=t.find('input[name="keep_editing"]'),this.$submitButtons=t.find('button[type="submit"]'),this.$saveButton=this.$submitButtons.filter('[data-keep-editing="1"]'),this.$undoRedoContainer=t.find(".js-undo-redo"),this.$undoButton=t.find(".js-undo-button"),this.$redoButton=t.find(".js-redo-button"),this.$errorMessageBox=t.find(".js-error-message-box")},y.prototype.createPresenter=function(){return new p(this,{actionURL:this.$form.attr("action"),maxTitleLength:+this.$titleField.attr("data-max-length"),fields:this.$form.serializeArray()})},y.prototype.registerEvents=function(){this.$form.on("input change",h.proxy(this.onInput,this)),this.$form.on("keypress",h.proxy(this.onKeyPress,this)),this.$submitButtons.on("click",h.proxy(this.onSubmitButtonClick,this)),this.$form.on("submit",h.proxy(this.onSubmit,this)),this.$undoButton.on("click",h.proxy(this.onUndo,this)),this.$redoButton.on("click",h.proxy(this.onRedo,this)),h(window).on("pagehide",h.proxy(this.onPageHide,this)),h(document).on("visibilitychange",h.proxy(this.onVisibilityChange,this))},y.prototype.onInput=function(t){var e=t.target;this.presenter.handleInput(e.name,e.value)},y.prototype.onKeyPress=function(t){"input"===t.target.tagName.toLowerCase()&&13===t.which&&t.preventDefault()},y.prototype.onSubmitButtonClick=function(t){var e=h(t.currentTarget),n=e.attr("data-episode-status");this.$statusField.val(n);var i=e.attr("data-edit-reservation");this.$editReservationField.val(i);var r=e.attr("data-keep-editing");this.$keepEditingField.val(r),this.$statusField.trigger("input")},y.prototype.onSubmit=function(t){t.preventDefault(),this.presenter.handleSubmit(this.$form.serializeArray())},y.prototype.onUndo=function(t){this.presenter.handleUndo()},y.prototype.onRedo=function(t){this.presenter.handleRedo()},y.prototype.onPageHide=function(t){this.presenter.handlePageHide()},y.prototype.onVisibilityChange=function(t){this.presenter.handleVisibilityChange()},y.prototype.updateTitleValidity=function(){this.updateFieldValidity(this.$titleField,this.presenter.isValidTitle)},y.prototype.updateBodyValidity=function(){this.updateFieldValidity(this.$bodyField,this.presenter.isValidBody)},y.prototype.updateFieldValidity=function(t,e){var n=t[0];if(n&&n.setCustomValidity){var i=e?"":t.attr("data-validation-message");n.setCustomValidity(i)}this.$submitButtons.prop("disabled",!this.presenter.canSubmit)},y.prototype.updateUndoRedoButton=function(){var t=!1;try{t=document.queryCommandEnabled("undo")}catch(t){}this.$undoButton.prop("disabled",!t);var e=!1;try{e=document.queryCommandEnabled("redo")}catch(t){}this.$redoButton.prop("disabled",!e)},y.prototype.updateIsLoading=function(){this.$submitButtons.prop("disabled",this.presenter.shouldDisableSubmitButtons),this.$saveButton.toggleClass("isLoading",this.presenter.shouldDisableSubmitButtons),l.toggleFields(this.$form,!this.presenter.shouldDisableFields)},y.prototype.updateIsChecking=function(){this.$saveButton.toggleClass("isChecking",this.presenter.isChecking)},y.prototype.notifySave=function(){this.$form.trigger("dcv:episodeeditorform:save")},y.prototype.notifyTryingToSave=function(){this.$form.trigger("dcv:episodeeditorform:tryingtosave")},y.prototype.saveEpisode=function(){this.$keepEditingField.val(1),this.$editReservationField.val(0),this.$statusField.trigger("input"),this.presenter.handleSubmit(this.$form.serializeArray())},y.prototype.updateLocation=function(){this.presenter.locationURL&&d.updateLocation(this.presenter.locationURL)},y.prototype.replaceLocation=function(){this.presenter.locationURL&&d.replaceLocation(this.presenter.locationURL)},y.prototype.updateError=function(){var t=this.presenter.lastError;this.$errorMessageBox.text(t?t.message:""),u.toggleDisplayClass(this.$errorMessageBox,!!t),this.$errorMessageBox.trigger("dcv:episodeeditorform:errorupdate")},y.prototype.undo=function(){try{document.execCommand("undo")}catch(t){}},y.prototype.redo=function(){try{document.execCommand("redo")}catch(t){}},y);function y(t){var e=g.call(this,t)||this,n=-1===navigator.userAgent.indexOf("Gecko/");return u.toggleDisplayClass(e.$undoRedoContainer,n),e}n.EditorFormView=m},{"../../modules/Display":116,"../../modules/FormFields":119,"../../modules/Net":122,"../../modules/Util/String":127,"../../modules/Util/UpdateLocation":128,"../base":247,jquery:96}],163:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("jquery"),l=(o=s.Presenter,r(u,o),u.prototype.setIsEnabled=function(t){this.isEnabled!==t&&(this.isEnabled=t,this.view.updateButtons())},u);function u(t,e){var n=o.call(this,t)||this;return n.isEnabled=!0,n}n.NotationButtonsPresenter=l;var c,d=(c=s.View,r(h,c),h.prototype.initMembers=function(t){this.$buttons=t},h.prototype.createPresenter=function(){return new l(this,{})},h.prototype.registerEvents=function(){this.$buttons.on("click",a.proxy(this.onButtonClick,this))},h.prototype.onButtonClick=function(t){var e=a(t.currentTarget),n=e.attr("data-command-name");e.trigger("dcv:notationinjector:command",[n])},h.prototype.updateButtons=function(){this.$buttons.prop("disabled",!this.presenter.isEnabled)},h);function h(t){return c.call(this,t)||this}n.NotationButtonsView=d},{"../base":247,jquery:96}],164:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("jquery"),l=(o=s.Presenter,r(u,o),u.prototype.injectRuby=function(t,e,n){var i=e,r=n;i<r&&"\n"===t.charAt(r-1)&&(r-=1);var o=t.substring(Math.max(r-41,0),r),s=o.lastIndexOf("\n");if(0<=s&&(o=o.substring(s+1),i=Math.max(i,r-o.length)),i===r){var a=new RegExp("(?:[｜|]("+this.RB_CHAR_PATTERN.source+"{1,20})|("+this.HAN_PATTERN.source+"{1,20}))$");i=r-((l=o.match(a))?l[1]||l[2]:"").length}else{var l,u=new RegExp(this.RB_CHAR_PATTERN.source+"{1,20}$"),c=(l=o.match(u))?l[0]:"";i=Math.max(i,r-c.length)}var d=t.substring(i,r),h=o.slice(-d.length-2,-d.length),p=new RegExp("^"+this.HAN_PATTERN.source+"+$"),f=new RegExp(this.HAN_PATTERN.source+"$"),g=((p.test(d)?f.test(h):!/[｜|]$/.test(h))?"｜":"")+d+"《",m=i+g.length,y=m+"ルビを入力…".length;this.view.replacePartialText(i,r,g+"ルビを入力…》",m,y)},u.prototype.injectEmphasisDots=function(t,e,n){var i=e,r=n;i<r&&"\n"===t.charAt(r-1)&&(r-=1);var o=i<r?t.lastIndexOf("\n",r-1):-1;i<=o&&(i=o+1);var s=t.substring(i,r),a="《《"+s+"》》",l=i+a.length;s||(l-=2),this.view.replacePartialText(i,r,a,l,l)},u.prototype.injectParagraphIndent=function(t,e,n){var i=new RegExp("^(\\u0020*)([｜|]|《《)?([^\\u0028\\u005B\\u007B\\u0F3A\\u0F3C\\u169B\\u201A\\u201E\\u2045\\u207D\\u208D\\u2308\\u230A\\u2329\\u2768\\u276A\\u276C\\u276E\\u2770\\u2772\\u2774\\u27C5\\u27E6\\u27E8\\u27EA\\u27EC\\u27EE\\u2983\\u2985\\u2987\\u2989\\u298B\\u298D\\u298F\\u2991\\u2993\\u2995\\u2997\\u29D8\\u29DA\\u29FC\\u2E22\\u2E24\\u2E26\\u2E28\\u3008\\u300A\\u300C\\u300E\\u3010\\u3014\\u3016\\u3018\\u301A\\u301D\\uFD3E\\uFE17\\uFE35\\uFE37\\uFE39\\uFE3B\\uFE3D\\uFE3F\\uFE41\\uFE43\\uFE47\\uFE59\\uFE5B\\uFE5D\\uFF08\\uFF3B\\uFF5B\\uFF5F\\uFF62\\u00AB\\u2018\\u201B-\\u201C\\u201F\\u2039\\u2E02\\u2E04\\u2E09\\u2E0C\\u2E1C\\u2E20\\u3000\\r\\n\\u0020｜|《\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])","gm"),r=t.replace(i,function(t,e,n,i){return e+"　"+(n||"")+i});this.view.replaceEntireText(r)},u.prototype.convertRuby=function(t,e,n){var i=new RegExp("([｜|](?:[^｜|（(《\\r\\n\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]){1,10}|"+this.HAN_PATTERN.source+")[（(]((?:[\\u3041-\\u3096\\u309D-\\u309F]|\\uD82C\\uDC01|\\uD83C\\uDE00|[\\u30A1-\\u30FA\\u30FD-\\u30FF\\u31F0-\\u31FF\\u32D0-\\u32FE\\u3300-\\u3357\\uFF66-\\uFF6F\\uFF71-\\uFF9D]|\\uD82C\\uDC00|[\\u30FB\\u30FC\\u0020\\u3000]){1,20})[）)]|[｜|]([（(])","g"),r=t.replace(i,function(t,e,n,i){return i||e+"《"+n+"》"});this.view.replaceEntireText(r)},u.prototype.handleCommand=function(t,e,n,i){switch(t){case"injectRuby":case"injectEmphasisDots":case"injectParagraphIndent":case"convertRuby":this[t](e,n,i);break;default:throw new Error("Unknown command: "+t)}},u);function u(t,e){var n=o.call(this,t)||this;return n.HAN_PATTERN=/(?:[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005-\u3007\u3021-\u3029\u3038-\u303B\u30F6\u3400-\u4DB5\u4E00-\u9FCC\uF900-\uFA6D\uFA70-\uFAD9]|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D])/,n.RB_CHAR_PATTERN=/(?:[\u0000-\u007B\u007D-\u3009\u300C-\uD7FF\uE000-\uFF5B\uFF5D-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])/,n}n.NotationInjectorPresenter=l;var c,d=(c=s.View,r(h,c),h.prototype.initMembers=function(t){this.$field=t},h.prototype.createPresenter=function(){return new l(this,{})},h.prototype.registerEvents=function(){this.$field.on("dcv:notationinjector:command",a.proxy(this.onCommand,this))},h.prototype.onCommand=function(t,e){if(!t.isDefaultPrevented()){t.preventDefault();var n=this.$field[0];this.presenter.handleCommand(e,n.value,n.selectionStart,n.selectionEnd)}},h.prototype.replacePartialText=function(t,e,n,i,r){var o=window.pageYOffset,s=this.$field[0];s.setSelectionRange(t,e),s.focus();var a=!1;if(this.supportsExecCommand)try{a=document.execCommand("insertText",!1,n)}catch(t){}if(!a){var l=s.value;s.value=l.substring(0,t)+n+l.substring(e)}s.setSelectionRange(i,r),window.pageYOffset!==o&&window.scrollTo(window.pageXOffset,o),this.$field.trigger("input")},h.prototype.replaceEntireText=function(t){var e=this.$field[0];this.replacePartialText(0,e.value.length,t,0,0)},h);function h(t){var e=c.call(this,t)||this,n=navigator.userAgent;return e.supportsExecCommand=-1===n.indexOf("SamsungBrowser"),e}n.NotationInjectorView=d},{"../base":247,jquery:96}],165:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/Net"),l=t("../../modules/EventType"),u=t("../../modules/Display"),c=t("jquery"),d=(o=s.Presenter,r(h,o),Object.defineProperty(h.prototype,"isLoading",{get:function(){return!!this.loader},enumerable:!0,configurable:!0}),h.prototype.show=function(){var n=this;this.isShown=!0,this.shouldLoad&&(this.shouldLoad=!1,this.setError(null),this.loader=a.ajax({method:"POST",url:"/my/works/episode_preview",data:{title:this.title,body:this.body}}).always(function(){n.loader=null,n.view.updateIsLoading()}).done(function(t){n.view.showPreviewContent(t)}).fail(function(t,e){"abort"!==e&&(n.shouldLoad=!0,n.isShown&&n.setError(new Error("プレビューを表示できません。")))}),this.view.updateIsLoading())},h.prototype.hide=function(){this.isShown=!1},h.prototype.handleInput=function(t,e){switch(t){case"title":this.title=e,this.abortLoading();break;case"body":this.body=e,this.abortLoading()}},h.prototype.abortLoading=function(){this.loader&&(this.loader.abort(),this.loader=null,this.view.updateIsLoading()),this.shouldLoad=!0},h);function h(t,e){var n=o.call(this,t)||this;return n.isShown=e.isShown,n.title=e.title,n.body=e.body,n.loader=null,n.shouldLoad=!0,n}n.PreviewPanelPresenter=d;var p,f=(p=s.View,r(g,p),g.prototype.initMembers=function(t,e,n){this.$panel=t,this.$loading=t.find(".js-episode-preview-loading"),this.$content=t.find(".js-episode-preview-content"),this.$form=e,this.$errorMessageBox=n},g.prototype.createPresenter=function(){return new d(this,{isShown:this.$panel.hasClass("isShown"),title:this.$form.find('input[name="title"]').val(),body:this.$form.find('textarea[name="body"]').val()})},g.prototype.registerEvents=function(){this.$panel.on(l.PANEL_SHOW_EVENT,c.proxy(this.onPanelShow,this)),this.$panel.on(l.PANEL_HIDE_EVENT,c.proxy(this.onPanelHide,this)),this.$form.on("input change",c.proxy(this.onFormInput,this))},g.prototype.onPanelShow=function(t){t.target===t.currentTarget&&this.presenter.show()},g.prototype.onPanelHide=function(t){t.target===t.currentTarget&&this.presenter.hide()},g.prototype.onFormInput=function(t){var e=t.target;this.presenter.handleInput(e.name,e.value)},g.prototype.showPreviewContent=function(t){this.$content.html(t),this.$content.trigger("dcv:previewpanel:previewshow")},g.prototype.updateIsLoading=function(){var t=this.presenter.isLoading;u.toggleDisplayClass(this.$loading,t),u.toggleDisplayClass(this.$content,!t),t&&this.$content.contents().detach()},g.prototype.updateError=function(){var t=this.presenter.lastError;this.$errorMessageBox.text(t?t.message:""),u.toggleDisplayClass(this.$errorMessageBox,!!t)},g);function g(t,e,n){return p.call(this,t,e,n)||this}n.PreviewPanelView=f},{"../../modules/Display":116,"../../modules/EventType":118,"../../modules/Net":122,"../base":247,jquery:96}],166:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../../modules/EventType"),r=t("../../modules/Display"),o=t("jquery"),s=(a.prototype.onReservationChange=function(t){this.updateContent()},a.prototype.onPanelShow=function(t){t.target===t.currentTarget&&this.$reservationFields.filter(":checked").focus()},a.prototype.updateContent=function(){for(var t=this.$reservationFields.filter(":checked"),e=0,n=["data-episode-status","data-edit-reservation"];e<n.length;e++){var i=n[e];this.$submitButton.attr(i,t.attr(i))}this.$submitButton.text(t.attr("data-submit-button-label")),"publishing"===t.val()&&r.toggleDisplayClass(this.$datetimeContainer,!0)},a);function a(t){this.$panel=t,this.$reservationFields=t.find('input[name="reservation"]'),this.$datetimeContainer=t.find(".js-episode-reservation-datetime-container"),this.$submitButton=t.find('button[type="submit"]'),this.$reservationFields.on("change",o.proxy(this.onReservationChange,this)),this.$panel.on(i.PANEL_SHOW_EVENT,o.proxy(this.onPanelShow,this)),this.updateContent()}n.ReservationPanelView=s},{"../../modules/Display":116,"../../modules/EventType":118,jquery:96}],167:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/Net"),l=t("../../modules/FormFields"),u=t("jquery"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){this.view.updateSharedDraftURL()},Object.defineProperty(d.prototype,"isEnabled",{get:function(){return!!this.sharedDraftURL},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"actionPath",{get:function(){return this.isEnabled?this.revocationPath:this.creationPath},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"failedMessage",{get:function(){return this.isEnabled?"下書き共有を無効にできませんでした":"下書き共有を有効にできませんでした"},enumerable:!0,configurable:!0}),d.prototype.toggle=function(){var i=this;this.setError(null),a.ajax({method:"POST",url:this.actionPath}).done(function(t,e,n){i.sharedDraftURL=t.shared_draft_url||"",i.hasChanged=!0}).fail(function(t,e,n){i.setError(new Error(i.failedMessage))}).always(function(t,e,n){i.view.updateSharedDraftURL(),i.isLoading=!1,i.view.updateIsLoading()}),this.isLoading=!0,this.view.updateIsLoading()},d);function d(t,e){var n=o.call(this,t)||this;return n.sharedDraftURL=e.sharedDraftURL,n.creationPath=e.creationPath,n.revocationPath=e.revocationPath,n.hasChanged=!1,n.isLoading=!1,n}n.SharedDraftWidgetPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$widget=t,this.$toggleCheckbox=t.find(".js-shared-draft-toggle-checkbox"),this.$urlTextboxContainer=t.find(".js-shared-draft-url-textbox-container"),this.$urlTextbox=t.find(".js-shared-draft-url-textbox"),this.$urlLink=t.find(".js-shared-draft-url-link"),this.$statusLabels=t.find(".js-shared-draft-status-label")},f.prototype.createPresenter=function(){return new c(this,{sharedDraftURL:this.$urlTextbox.val(),creationPath:this.$widget.attr("data-creation-path"),revocationPath:this.$widget.attr("data-revocation-path")})},f.prototype.registerEvents=function(){this.$toggleCheckbox.on("change",u.proxy(this.onCheckboxChange,this)),this.$urlTextboxContainer.on("transitionend",u.proxy(this.onURLTextboxContainerTransitionEnd,this)),this.$urlTextbox.on("focus",u.proxy(this.onURLTextboxFocus,this))},f.prototype.onCheckboxChange=function(t){this.presenter.toggle()},f.prototype.onURLTextboxContainerTransitionEnd=function(t){this.presenter.isEnabled&&this.$urlTextbox.focus()},f.prototype.onURLTextboxFocus=function(t){t.target.select()},f.prototype.updateSharedDraftURL=function(){var t=this.presenter.isEnabled;this.$widget.toggleClass("isEnabled",t).toggleClass("isDisabled",!t).toggleClass("hasChanged",this.presenter.hasChanged),this.$toggleCheckbox.prop("checked",t),this.$urlTextbox.val(this.presenter.sharedDraftURL),this.$urlLink.attr("href",this.presenter.sharedDraftURL);var r=t?"data-status-label-enabled":"data-status-label-disabled";this.$statusLabels.each(function(t,e){var n=u(e),i=n.attr(r);i&&n.text(i)})},f.prototype.updateIsLoading=function(){l.toggleFields(this.$widget,!this.presenter.isLoading)},f.prototype.updateError=function(){var t=this.presenter.lastError;t&&alert(t.message)},f);function f(t){return h.call(this,t)||this}n.SharedDraftWidgetView=p},{"../../modules/FormFields":119,"../../modules/Net":122,"../base":247,jquery:96}],168:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("jquery"),l=t("../../modules/storage-accessor"),u=(o=s.Presenter,r(c,o),c.prototype.toggleAsideState=function(t){void 0===t&&(t=!this.isOpen),t!==this.isOpen&&(this.isOpen=t,this.storageAccessor&&this.storageAccessor.setItem("is_open",this.isOpen),this.view.updateIsOpen())},c);function c(t,e){var n=o.call(this,t)||this;if(n.storageAccessor=e.storageAccessor,n.storageAccessor){var i=n.storageAccessor.getItem("is_open");return n.isOpen=!!i,n}return n.isOpen=!1,n}n.ToggleSidebarPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t,e){this.$buttons=t,this.$asideContainer=e},p.prototype.createPresenter=function(){var t=a(".js-episode-editor-container").attr("data-editor-sidebar-storage-segment"),e=t?l.createLocalStorageAccessor(t):null;return new u(this,{storageAccessor:e})},p.prototype.registerEvents=function(){this.$buttons.on("click",a.proxy(this.onButtonClick,this)),this.$buttons.on("mouseup",a.proxy(this.onButtonMouseUp,this))},p.prototype.onButtonClick=function(t){this.presenter.toggleAsideState()},p.prototype.onButtonMouseUp=function(t){t.currentTarget.blur()},p.prototype.updateIsOpen=function(){var t=this.presenter.isOpen;this.$asideContainer.toggleClass("contentAside-isShown",t).toggleClass("contentAside-isHidden",!t);var r=t?"data-label-toggle-close":"data-label-toggle-open";this.$buttons.each(function(t,e){var n=a(e),i=n.attr(r);i&&n.attr("data-ui-tooltip-label",i).attr("aria-label",i)}),this.$asideContainer.trigger(t?"dcv:editorsidebar:open":"dcv:editorsidebar:close")},p);function p(t,e){return d.call(this,t,e)||this}n.ToggleSidebarView=h},{"../../modules/storage-accessor":131,"../base":247,jquery:96}],169:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o=t("./base"),s=t("../modules/storage-accessor"),a=t("../modules/GoogleTagManager"),l=t("jquery"),u="dcv.episode_viewer.read_setting";n.EPISODE_VIEWER_READ_SETTING_STORAGE_SEGMENT=u;var c="click_scroll_enabled";n.CLICK_SCROLL_ENABLED_KEY=c;n.CLICK_SCROLL_ENABLED_DEFAULT_VALUE=!1;var d,h=(d=o.Presenter,r(p,d),p.prototype.setup=function(){this.view.updateClickScrollEnabled()},Object.defineProperty(p.prototype,"isClickScrollEnabled",{get:function(){var t=this.storageAccessor.getItem(c);return null!==t&&t},enumerable:!0,configurable:!0}),p.prototype.setClickScrollEnabled=function(t){this.storageAccessor.setItem("click_scroll_enabled",t)},p.prototype.handleSettingChange=function(t,e){switch(t){case"click_scroll_enabled":this.setClickScrollEnabled(e),this.view.updateClickScrollEnabled()}},p);function p(t,e){var n=d.call(this,t)||this;return n.storageAccessor=e.storageAccessor,n}n.EpisodeReadSettingPresenter=h;var f,g=(f=o.View,r(m,f),m.prototype.initMembers=function(t,e){this.$settingContainer=t,this.$clickScrollCheckbox=t.find('input[name="click_scroll_enabled"]'),this.googleTagManager=e},m.prototype.createPresenter=function(){var t=s.createLocalStorageAccessor(u);return new h(this,{storageAccessor:t})},m.prototype.registerEvents=function(){this.$settingContainer.on("change",l.proxy(this.onChange,this))},m.prototype.onChange=function(t){var e=t.target,n=e.checked;this.presenter.handleSettingChange(e.name,n),this.googleTagManager.sendEvent("EpisodeViewer_ClickScrollEnabled_ChangeEnabled",{EpisodeViewer_ClickScrollEnabled:n})},m.prototype.updateClickScrollEnabled=function(){var t=this.presenter.isClickScrollEnabled;this.$clickScrollCheckbox.prop("checked",t)},m);function m(t,e){return void 0===e&&(e=a.GoogleTagManager.default),f.call(this,t,e)||this}n.EpisodeReadSettingView=g},{"../modules/GoogleTagManager":120,"../modules/storage-accessor":131,"./base":247,jquery:96}],170:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function i(){var t=U(".js-episode-display-setting-container"),e=t.attr("data-storage-segment"),n=!!+t.attr("data-should-update-root-writing-direction");new E.EpisodeDisplaySwitcherView(e,n),new x.SidebarView(U(".js-viewer-sidebar-container"),e),new k.GlobalHeaderView(U(".js-viewer-globalheader"),e),new C.ReadCounterView(U(".js-viewer-read-counter"));var i=!!+U(document.documentElement).attr("data-is-guest"),r=U(".js-episode-body");i||new S.HistoryRecorderView(r,e);var o=U(document.body).hasClass("isTouch");o&&new P.PageScrollerView(U(".js-page-scroller-container"),e),m.toggleDisplayClass(U(".js-episode-setting-tab-container"),o),new v.OpenModalWindowButtonView(U(".js-viewer-setting-modal-open-button")),new y.ModalWindowView(U(".js-viewer-setting-modal-container")),new b.TabButtonsView(U(".js-episode-setting-tab-button")),new T.EpisodeDisplaySettingsPanelView(t,U(".js-episode-display-setting-font-family-warning")),new O.EpisodeReadSettingView(U(".js-episode-read-setting-container")),new M.VerticalCompositionView(r,e,"p"),new M.VerticalCompositionView(U(document.body),e),j.WheelScrollerView.createForDocumentIfNeeded(e),j.WheelScrollerView.createIfNeeded(U(".js-viewer-sidebar-panel"),e);var s=U(".js-cheer-button");s.length&&new D.CheerButtonView(s),new F.ToggleCheersButtonView(U(".js-toggle-cheers-button")),new L.CheersPanelView(U(".js-cheers-panel"));var a=U(".js-episode-comment-creation-panel");if(a.length){var l=a.find(".js-episode-comment-creation-form"),u=l.find('[name="body"]');new A.CommentCreationPanelView(a),new I.CommentCreationFormView(l),new w.OnetimeFocusReactionView(u)}var c=U(".js-toggle-comments-button");c.length&&(new $.ToggleCommentsButtonView(c),new B.CommentsPanelAttentionView(c));var d=U(".js-comments-panel");d.length&&new R.CommentsPanelView(d,e);var h=d.find(".js-comments-panel-cheer-pane");h.length&&new N.CommentsPanelCheerPaneView(h);var p=U(".js-cheers-and-comments-panel-button");new _.ExclusivePanelButtonsView(p);var f=U(".js-cheer-recommendation-container");f.length&&new V.CheerRecommendationContainerView(f);var g=U(".js-has-next-episode-panel");g.length&&new H.RelatedWorkPanelView(g,document.referrer),W.IOSVerticalPositionerView.createIfNeeded(e)}var m=t("../modules/Display"),y=t("./ModalWindow"),v=t("./OpenModalWindowButton"),b=t("./TabButtons"),_=t("./ExclusivePanelButtons"),w=t("./OnetimeFocusReaction"),x=t("./EpisodeViewer/Sidebar"),k=t("./EpisodeViewer/GlobalHeader"),C=t("./EpisodeViewer/ReadCounter"),S=t("./EpisodeViewer/HistoryRecorder"),P=t("./EpisodeViewer/PageScroller"),E=t("./EpisodeDisplaySwitcher"),T=t("./EpisodeDisplaySettingsPanel"),O=t("./EpisodeReadSetting"),M=t("./VerticalComposition"),j=t("./EpisodeViewer/WheelScroller"),D=t("./EpisodeViewer/CheerButton"),F=t("./EpisodeViewer/ToggleCheersButton"),L=t("./EpisodeViewer/CheersPanel"),A=t("./EpisodeViewer/CommentCreationPanel"),I=t("./EpisodeViewer/CommentCreationForm"),$=t("./EpisodeViewer/ToggleCommentsButton"),B=t("./EpisodeViewer/CommentsPanelAttention"),R=t("./EpisodeViewer/CommentsPanel"),N=t("./EpisodeViewer/CommentsPanelCheerPane"),V=t("./EpisodeViewer/CheerRecommendationContainer"),W=t("./EpisodeViewer/IOSVerticalPositioner"),H=t("./EpisodeViewer/RelatedWorkPanel"),U=t("jquery");n.EpisodeViewerView=i},{"../modules/Display":116,"./EpisodeDisplaySettingsPanel":156,"./EpisodeDisplaySwitcher":157,"./EpisodeReadSetting":169,"./EpisodeViewer/CheerButton":171,"./EpisodeViewer/CheerRecommendationContainer":172,"./EpisodeViewer/CheersPanel":173,"./EpisodeViewer/CommentCreationForm":175,"./EpisodeViewer/CommentCreationPanel":176,"./EpisodeViewer/CommentsPanel":177,"./EpisodeViewer/CommentsPanelAttention":178,"./EpisodeViewer/CommentsPanelCheerPane":179,"./EpisodeViewer/GlobalHeader":180,"./EpisodeViewer/HistoryRecorder":181,"./EpisodeViewer/IOSVerticalPositioner":182,"./EpisodeViewer/PageScroller":183,"./EpisodeViewer/ReadCounter":184,"./EpisodeViewer/RelatedWorkPanel":185,"./EpisodeViewer/Sidebar":186,"./EpisodeViewer/ToggleCheersButton":187,"./EpisodeViewer/ToggleCommentsButton":188,"./EpisodeViewer/WheelScroller":189,"./ExclusivePanelButtons":190,"./ModalWindow":200,"./OnetimeFocusReaction":206,"./OpenModalWindowButton":208,"./TabButtons":224,"./VerticalComposition":230,jquery:96}],171:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s,a=t("../base"),l=t("../../model/EpisodeCheerer"),u=t("../../modules/Display"),c=t("jquery");(s=o=o||{})[s.NONE=0]="NONE",s[s.CREATED=1]="CREATED",s[s.DELETED=2]="DELETED";var d,h=(d=a.Presenter,r(p,d),p.prototype.setup=function(){var t=this;this.cheerer.on("statusupdate",function(){t.view.updateButton()})},Object.defineProperty(p.prototype,"isCheering",{get:function(){return this.cheerer.isCheering},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"isCreatedMessageShown",{get:function(){return this.shownMessageType===o.CREATED},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"isDeletedMessageShown",{get:function(){return this.shownMessageType===o.DELETED},enumerable:!0,configurable:!0}),p.prototype.toggle=function(){var n=this;this.setError(null);var i=this.cheerer.isCheering;(i?this.cheerer.deleteCheer():this.cheerer.createCheer()).fail(function(t){n.hideMessage();var e=t.message||(i?"応援を取り消しできませんでした。":"応援できませんでした。");n.setError(new Error(e))}),this.showMessage(i?o.DELETED:o.CREATED)},p.prototype.showMessage=function(t){var e=this;this.messageTimerId&&window.clearTimeout(this.messageTimerId),this.messageTimerId=window.setTimeout(function(){e.messageTimerId=0,e.hideMessage()},3e3),this.shownMessageType=t,this.view.updateMessage()},p.prototype.hideMessage=function(){this.shownMessageType!==o.NONE&&(this.shownMessageType=o.NONE,this.view.updateMessage())},p);function p(t,e){var n=d.call(this,t)||this;return n.cheerer=l.default.getInstance(e.cheererPermalinkPath,e.cheererActivityName,e.episodePermalinkPath),n.cheerer.setIsCheering(e.isCheering),n.shownMessageType=o.NONE,n.messageTimerId=0,n}n.CheerButtonPresenter=h;var f,g=(f=a.View,r(m,f),m.prototype.initMembers=function(t){this.$button=t,this.$createLabel=t.find(".js-cheer-button-create-label"),this.$deleteLabel=t.find(".js-cheer-button-delete-label"),this.$createdMessage=t.find(".js-cheer-button-created-message"),this.$deletedMessage=t.find(".js-cheer-button-deleted-message")},m.prototype.createPresenter=function(){return new h(this,{cheererPermalinkPath:this.$button.attr("data-cheerer-permalink-path"),cheererActivityName:this.$button.attr("data-cheerer-activity-name"),episodePermalinkPath:this.$button.attr("data-episode-permalink-path"),isCheering:!!+this.$button.attr("data-is-cheering")})},m.prototype.registerEvents=function(){this.$button.on("click",c.proxy(this.onButtonClick,this))},m.prototype.onButtonClick=function(t){this.presenter.toggle()},m.prototype.updateButton=function(){var t=this.presenter.isCheering;u.toggleDisplayClass(this.$createLabel,!t),u.toggleDisplayClass(this.$deleteLabel,t)},m.prototype.updateMessage=function(){u.toggleDisplayClass(this.$createdMessage,this.presenter.isCreatedMessageShown),u.toggleDisplayClass(this.$deletedMessage,this.presenter.isDeletedMessageShown)},m.prototype.updateError=function(){var t=this.presenter.lastError;t&&window.alert(t.message)},m);function m(t){return f.call(this,t)||this}n.CheerButtonView=g},{"../../model/EpisodeCheerer":105,"../../modules/Display":116,"../base":247,jquery:96}],172:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../PersistentHideablePanel"),r=t("../../modules/EventType"),o=t("jquery"),s=(a.prototype.initMembers=function(t){this.$container=t,this.$panel=t.find(".js-cheer-recommendation-panel")},a.prototype.registerEvents=function(){this.$panel.on(r.PANEL_SHOW_EVENT,o.proxy(this.onPanelShow,this)),this.$panel.on(r.PANEL_HIDE_EVENT,o.proxy(this.onPanelHide,this))},a.prototype.initSubViews=function(){this.panelView=new i.PersistentHideablePanelView(this.$panel)},a.prototype.onPanelShow=function(t){t.target===t.currentTarget&&this.$container.addClass("isRecommendCheerAction")},a.prototype.onPanelHide=function(t){t.target===t.currentTarget&&this.$container.removeClass("isRecommendCheerAction")},a);function a(t){this.initMembers(t),this.registerEvents(),this.initSubViews()}n.CheerRecommendationContainerView=s},{"../../modules/EventType":118,"../PersistentHideablePanel":211,jquery:96}],173:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeCheerCollection"),l=t("../../modules/EventType"),u=t("../../modules/TemplateElement"),c=t("../../modules/Locale"),d=t("jquery"),h=(o=s.Presenter,r(p,o),p.prototype.setup=function(){var t=this;this.cheerCollection.on("cheersupdate",function(){t.view.updatePanel()})},Object.defineProperty(p.prototype,"cheerListItems",{get:function(){return this.cheerCollection.cheers},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hasCheerListItems",{get:function(){return!!this.cheerCollection.cheers.length},enumerable:!0,configurable:!0}),p.prototype.load=function(){var t=this;this.shouldLoad&&(this.shouldLoad=!1,this.cheerCollection.fetch().fail(function(){t.shouldLoad=!0}))},p);function p(t,e){var n=o.call(this,t)||this;return n.cheerCollection=a.default.getInstance(e.episodePermalinkPath),n.shouldLoad=!0,n}n.CheersPanelPresenter=h;var f,g=(f=s.View,r(m,f),m.prototype.initMembers=function(t){this.$panel=t,this.$content=u.cloneTemplateChildren(t.find(".js-cheers-panel-content-template")),this.$list=this.$content.filter(".js-cheers-panel-list").add(this.$content.find(".js-cheers-panel-list"));var e=this.$list.find(".js-cheers-panel-list-item");this.listItemTemplate={element:e[0],cheererLinkElement:e.find(".js-cheers-panel-cheerer-link")[0],creationTimeElement:e.find(".js-cheers-panel-creation-time")[0],creationTimeContentElement:e.find(".js-cheers-panel-creation-time-content")[0]},this.$emptyContent=u.cloneTemplateChildren(t.find(".js-cheers-panel-empty-content-template")),this.$loading=t.find(".js-cheers-panel-loading")},m.prototype.createPresenter=function(){return new h(this,{episodePermalinkPath:this.$panel.attr("data-episode-permalink-path")})},m.prototype.registerEvents=function(){this.$panel.on(l.PANEL_SHOW_EVENT,d.proxy(this.onPanelShow,this))},m.prototype.onPanelShow=function(t){t.target===t.currentTarget&&this.presenter.load()},m.prototype.updatePanel=function(){this.$loading.detach(),this.presenter.hasCheerListItems?(this.updateList(),this.$emptyContent.detach(),this.$content.parent().length||this.$panel.append(this.$content)):(this.$content.detach(),this.$emptyContent.parent().length||this.$panel.append(this.$emptyContent))},m.prototype.updateList=function(){for(var t=this.presenter.cheerListItems,e={},n=0,i=t;n<i.length;n++)e[(p=i[n]).cheererPermalinkPath]=!0;for(var r=function(t){return t&&t.getAttribute("data-cheerer-permalink-path")||""},o=this.$list[0],s={},a=0,l=this.$list.children().toArray();a<l.length;a++)e[f=r(g=l[a])]?s[f]=g:o.removeChild(g);for(var u=o.firstElementChild,c=r(u),d=0,h=t;d<h.length;d++){var p,f;if((f=(p=h[d]).cheererPermalinkPath)!==c){var g=s[f]||this.createListItemElement(p);o.insertBefore(g,u)}else c=r(u=u.nextElementSibling)}},m.prototype.createListItemElement=function(t){var e=this.listItemTemplate;return e.element.setAttribute("data-cheerer-permalink-path",t.cheererPermalinkPath),e.cheererLinkElement.setAttribute("href",t.cheererPermalinkPath),e.cheererLinkElement.textContent=t.cheererActivityName,e.creationTimeElement.setAttribute("datetime",t.createdAt.toISOString()),e.creationTimeContentElement.textContent=c.formatDateTime(t.createdAt),e.element.cloneNode(!0)},m);function m(t){return f.call(this,t)||this}n.CheersPanelView=g},{"../../model/EpisodeCheerCollection":104,"../../modules/EventType":118,"../../modules/Locale":121,"../../modules/TemplateElement":125,"../base":247,jquery:96}],174:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeCommentCounter"),l=(o=s.Presenter,r(u,o),u);function u(t,e){var n=o.call(this,t)||this;return a.default.getInstance(e.episodePermalinkPath).setCount(e.commentSummaryCount),n}n.CommentCounterSourcePresenter=l;var c,d=(c=s.View,r(h,c),h.prototype.initMembers=function(t){this.$source=t},h.prototype.createPresenter=function(){return new l(this,{episodePermalinkPath:this.$source.attr("data-episode-permalink-path"),commentSummaryCount:+this.$source.attr("data-comment-summary-count")})},h);function h(t){return c.call(this,t)||this}n.CommentCounterSourceView=d},{"../../model/EpisodeCommentCounter":107,"../base":247}],175:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeCommentAuthor"),l=t("../../modules/Net"),u=t("../../modules/Display"),c=t("jquery"),d=(o=s.Presenter,r(h,o),h.prototype.submit=function(t){var n=this;this.setError(null),l.ajax({method:"POST",url:this.actionURL,data:t}).done(function(t){a.default.getInstance(n.commentAuthorPermalinkPath,n.episodePermalinkPath,!1).setHasWritten(!0),n.view.resetForm()}).fail(function(t){var e=t&&t.error&&t.error.message||"コメントできませんでした。";n.setError(new Error(e))}).always(function(){n.isLoading=!1,n.view.updateIsLoading()}),this.isLoading=!0,this.view.updateIsLoading()},h);function h(t,e){var n=o.call(this,t)||this;return n.actionURL=e.actionURL,n.isLoading=!1,n.commentAuthorPermalinkPath=e.commentAuthorPermalinkPath,n.episodePermalinkPath=e.episodePermalinkPath,n}n.CommentCreationFormPresenter=d;var p,f=(p=s.View,r(g,p),g.prototype.initMembers=function(t){this.$form=t,this.$submitButton=t.find('button[type="submit"]'),this.$errorMessageBox=t.find(".js-episode-comment-error-message-box")},g.prototype.createPresenter=function(){return new d(this,{actionURL:this.$form.attr("action"),commentAuthorPermalinkPath:this.$form.attr("data-comment-author-permalink-path"),episodePermalinkPath:this.$form.attr("data-episode-permalink-path")})},g.prototype.registerEvents=function(){this.$form.on("submit",c.proxy(this.onSubmit,this))},g.prototype.onSubmit=function(t){t.preventDefault(),this.presenter.submit(this.$form.serializeArray())},g.prototype.updateIsLoading=function(){this.$submitButton.prop("disabled",this.presenter.isLoading)},g.prototype.resetForm=function(){this.$form[0].reset()},g.prototype.updateError=function(){var t=this.presenter.lastError;this.$errorMessageBox.text(t?t.message:""),u.toggleDisplayClass(this.$errorMessageBox,!!t)},g);function g(t){return p.call(this,t)||this}n.CommentCreationFormView=f},{"../../model/EpisodeCommentAuthor":106,"../../modules/Display":116,"../../modules/Net":122,"../base":247,jquery:96}],176:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeCheerer"),l=t("../../model/EpisodeCommentAuthor"),u=t("../../modules/Display"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){var t=this;this.cheerer.on("statusupdate",function(){t.view.updatePanel()}),this.commentAuthor.on("statusupdate",function(){t.view.updatePanel()}),this.view.updatePanel()},Object.defineProperty(d.prototype,"isShown",{get:function(){return this.cheerer.isCheering&&!this.commentAuthor.hasWritten},enumerable:!0,configurable:!0}),d);function d(t,e){var n=o.call(this,t)||this;return n.cheerer=a.default.getInstance(e.commentAuthorPermalinkPath,e.commentAuthorActivityName,e.episodePermalinkPath),n.commentAuthor=l.default.getInstance(e.commentAuthorPermalinkPath,e.episodePermalinkPath,e.hasWritten),n}n.CommentCreationPanelPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$panel=t},f.prototype.createPresenter=function(){return new c(this,{episodePermalinkPath:this.$panel.attr("data-episode-permalink-path"),commentAuthorPermalinkPath:this.$panel.attr("data-comment-author-permalink-path"),commentAuthorActivityName:this.$panel.attr("data-comment-author-activity-name"),hasWritten:!!+this.$panel.attr("data-has-written")})},f.prototype.updatePanel=function(){u.toggleDisplayClass(this.$panel,this.presenter.isShown)},f);function f(t){return h.call(this,t)||this}n.CommentCreationPanelView=p},{"../../model/EpisodeCheerer":105,"../../model/EpisodeCommentAuthor":106,"../../modules/Display":116,"../base":247}],177:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeCommentLives"),l=t("../../modules/Net"),u=t("../EpisodeCommentList"),c=t("./CommentCounterSource"),d=t("../VerticalComposition"),h=t("../../modules/EventType"),p=t("jquery"),f=(o=s.Presenter,r(g,o),g.prototype.setup=function(){var t=this;this.commentLives.on("commentadd",function(){t.load()}),this.commentLives.on("commentremove",function(){t.load()})},g.prototype.loadOnce=function(){this.hasBeenLoaded||this.load()},g.prototype.load=function(){var e=this;this.hasBeenLoaded=!0,l.ajax(this.commentsPanelPath).done(function(t){e.view.renderPanelContent(t)}).fail(function(){e.hasBeenLoaded=!1})},g);function g(t,e){var n=o.call(this,t)||this;return n.commentLives=a.default.getInstance(e.episodePermalinkPath),n.commentsPanelPath=e.commentsPanelPath,n.hasBeenLoaded=!1,n}n.CommentsPanelPresenter=f;var m,y=(m=s.View,r(v,m),v.prototype.initMembers=function(t,e){this.$panel=t,this.$mainContent=t.find(".js-comments-panel-main-content"),this.displaySettingsStorageSegment=e},v.prototype.createPresenter=function(){return new f(this,{episodePermalinkPath:this.$panel.attr("data-episode-permalink-path"),commentsPanelPath:this.$panel.attr("data-comments-panel-path")})},v.prototype.registerEvents=function(){this.$panel.on(h.PANEL_SHOW_EVENT,p.proxy(this.onPanelShow,this)),this.$panel.on("dcv:episodecommentlistitem:refresh",p.proxy(this.onListItemRefresh,this))},v.prototype.onPanelShow=function(t){t.target===t.currentTarget&&this.presenter.loadOnce()},v.prototype.onListItemRefresh=function(t){new d.VerticalCompositionView(p(t.target),this.displaySettingsStorageSegment)},v.prototype.renderPanelContent=function(t){var e=this.$mainContent;e.html(t);var n=e.find(".js-episode-comment-list");n.length&&(new u.EpisodeCommentListView(n),new d.VerticalCompositionView(n,this.displaySettingsStorageSegment));var i=e.find(".js-comment-counter-source");i.length&&new c.CommentCounterSourceView(i)},v);function v(t,e){return m.call(this,t,e)||this}n.CommentsPanelView=y},{"../../model/EpisodeCommentLives":108,"../../modules/EventType":118,"../../modules/Net":122,"../EpisodeCommentList":154,"../VerticalComposition":230,"../base":247,"./CommentCounterSource":174,jquery:96}],178:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeCommentLives"),l=t("../../modules/EventType"),u=t("jquery"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){var t=this;this.commentLives.on("commentadd",function(){window.setTimeout(function(){t.showPanel()},0)})},d.prototype.showPanel=function(){this.isPanelShown||this.view.togglePanel()},d.prototype.setIsPanelShown=function(t){this.isPanelShown=t},d);function d(t,e){var n=o.call(this,t)||this;return n.commentLives=a.default.getInstance(e.episodePermalinkPath),n.isPanelShown=e.isPanelShown,n}n.CommentsPanelAttentionPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$button=t,this.$panel=u("#"+t.attr("aria-controls"))},f.prototype.createPresenter=function(){return new c(this,{episodePermalinkPath:this.$button.attr("data-episode-permalink-path"),isPanelShown:this.$button.hasClass("isPanelShown")})},f.prototype.registerEvents=function(){this.$panel.on(l.PANEL_SHOW_EVENT,u.proxy(this.onPanelShow,this)),this.$panel.on(l.PANEL_HIDE_EVENT,u.proxy(this.onPanelHide,this))},f.prototype.onPanelShow=function(t){t.target===t.currentTarget&&this.presenter.setIsPanelShown(!0)},f.prototype.onPanelHide=function(t){t.target===t.currentTarget&&this.presenter.setIsPanelShown(!1)},f.prototype.togglePanel=function(){this.$button.trigger("click")},f);function f(t){return h.call(this,t)||this}n.CommentsPanelAttentionView=p},{"../../model/EpisodeCommentLives":108,"../../modules/EventType":118,"../base":247,jquery:96}],179:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeCheerer"),l=t("../../model/EpisodeCommentAuthor"),u=t("../../modules/Display"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){var t=this;this.cheerer.on("statusupdate",function(){t.view.updatePane()}),this.commentAuthor.on("statusupdate",function(){t.view.updatePane()}),this.view.updatePane()},Object.defineProperty(d.prototype,"isShown",{get:function(){return!this.cheerer.isCheering&&!this.commentAuthor.hasWritten},enumerable:!0,configurable:!0}),d);function d(t,e){var n=o.call(this,t)||this;return n.cheerer=a.default.getInstance(e.commentAuthorPermalinkPath,e.commentAuthorActivityName,e.episodePermalinkPath),n.commentAuthor=l.default.getInstance(e.commentAuthorPermalinkPath,e.episodePermalinkPath,e.hasWritten),n}n.CommentsPanelCheerPanePresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$pane=t},f.prototype.createPresenter=function(){return new c(this,{episodePermalinkPath:this.$pane.attr("data-episode-permalink-path"),commentAuthorPermalinkPath:this.$pane.attr("data-comment-author-permalink-path"),commentAuthorActivityName:this.$pane.attr("data-comment-author-activity-name"),hasWritten:!!+this.$pane.attr("data-has-written")})},f.prototype.updatePane=function(){u.toggleDisplayClass(this.$pane,this.presenter.isShown)},f);function f(t){return h.call(this,t)||this}n.CommentsPanelCheerPaneView=p},{"../../model/EpisodeCheerer":105,"../../model/EpisodeCommentAuthor":106,"../../modules/Display":116,"../base":247}],180:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeDisplaySettings"),l=t("../../modules/WritingDirectionHelper"),u=t("../../modules/Display"),c=t("jquery"),d=t("lodash"),h=(o=s.Presenter,r(p,o),Object.defineProperty(p.prototype,"isHorizontal",{get:function(){return"horizontal"===this.displaySettings.getValue("writing_direction")},enumerable:!0,configurable:!0}),p.prototype.setScrollOffset=function(t,e){var n=l.calculatePrincipalScrollOffset(this.isHorizontal,t,e),i=this.calculateIsShown(this.scrollOffset,n);i!==this.isShown&&(this.isShown=i,this.view.updateIsShown()),this.scrollOffset=n},p.prototype.setViewportBlockSize=function(t,e){this.viewportBlockSize=this.isHorizontal?e:t},p.prototype.setDocumentBlockSize=function(t,e){this.documentBlockSize=this.isHorizontal?e:t},p.prototype.calculateIsShown=function(t,e){return e<=200||e>=this.documentBlockSize-this.viewportBlockSize-20||e+20<t||e-10<t&&this.isShown},p);function p(t,e){var n=o.call(this,t)||this;n.displaySettings=a.default.getInstance(e.displaySettingsStorageSegment);var i=n.isHorizontal;return n.viewportBlockSize=i?e.viewportHeight:e.viewportWidth,n.documentBlockSize=i?e.documentHeight:e.documentWidth,n.scrollOffset=l.calculatePrincipalScrollOffset(i,e.scrollX,e.scrollY),n.isShown=!0,n}n.GlobalHeaderPresenter=h;var f,g=(f=s.View,r(m,f),m.prototype.initMembers=function(t,e){this.$globalHeader=t,this.displaySettingsStorageSegment=e},m.prototype.createPresenter=function(){var t=c(window),e=c(document);return new h(this,{scrollX:window.pageXOffset,scrollY:window.pageYOffset,viewportWidth:t.width(),viewportHeight:t.height(),documentWidth:e.width(),documentHeight:e.height(),displaySettingsStorageSegment:this.displaySettingsStorageSegment})},m.prototype.registerEvents=function(){var t=d.throttle(this.doOnWindowScroll,42);c(window).on("scroll",c.proxy(t,this)),c(window).on("resize",c.proxy(this.onWindowResize,this))},m.prototype.doOnWindowScroll=function(t){this.presenter.setScrollOffset(window.pageXOffset,window.pageYOffset)},m.prototype.onWindowResize=function(t){var e=c(window);this.presenter.setViewportBlockSize(e.width(),e.height());var n=c(document);this.presenter.setDocumentBlockSize(n.width(),n.height())},m.prototype.updateIsShown=function(){u.toggleDisplayClass(this.$globalHeader,this.presenter.isShown)},m);function m(t,e){return f.call(this,t,e)||this}n.GlobalHeaderView=g},{"../../model/EpisodeDisplaySettings":109,"../../modules/Display":116,"../../modules/WritingDirectionHelper":129,"../base":247,jquery:96,lodash:102}],181:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeDisplaySettings"),l=t("../../modules/Net"),u=t("jquery"),c=t("lodash"),d=t("../../modules/UserAgent"),h=(o=s.Presenter,r(p,o),p.prototype.setup=function(){var t=this.view.getReadingPosition();this.lastPosition=t,this.poolReadingQuantityLog(t,"access")},Object.defineProperty(p.prototype,"isHorizontal",{get:function(){return"horizontal"===this.displaySettings.getValue("writing_direction")},enumerable:!0,configurable:!0}),p.prototype.record=function(t){t!==this.lastPosition&&(l.ajax({method:"POST",url:this.historyPath,data:{position:t}}),this.lastPosition=t)},p.prototype.poolReadingQuantityLog=function(t,e){if(!this.isHandledNavigate){"next"!==e&&"leave"!==e||(this.isHandledNavigate=!0);var n=Math.floor(Date.now()/1e3);this.readingQuantityLogs=this.readingQuantityLogs.concat({event:e,position:t,readAt:n})}},p.prototype.recordReadingQuantityLog=function(){if(this.readingQuantityLogs.length){var t=JSON.stringify(this.readingQuantityLogs);if(this.readingQuantityLogs=[],window.fetch){var e=new FormData;e.append("reading_quantity_logs",t),fetch(this.readingQuantityPath,{method:"POST",credentials:"same-origin",headers:{"X-Requested-With":"XMLHttpRequest"},keepalive:!0,body:e})}else l.ajax({method:"POST",url:this.readingQuantityPath,async:!1,data:{reading_quantity_logs:t}})}},p.prototype.doHandleScroll=function(){var t=this.view.getReadingPosition();this.poolReadingQuantityLog(t,"scroll"),this.record(t)},p.prototype.doHandleNavigateToNext=function(){this.poolReadingQuantityLog(":end","next"),this.recordReadingQuantityLog()},p.prototype.doHandleStartReading=function(){this.isHandledNavigate=!1;var t=this.view.getReadingPosition();this.poolReadingQuantityLog(t,"access")},p.prototype.doHandleResumeReading=function(){var t=this.view.getReadingPosition();this.poolReadingQuantityLog(t,"leave"),this.recordReadingQuantityLog()},p);function p(t,e){var n=o.call(this,t)||this;return n.historyPath=e.historyPath,n.lastPosition="",n.isHandledNavigate=!1,n.readingQuantityPath=e.readingQuantityPath,n.readingQuantityLogs=[],n.displaySettings=a.default.getInstance(e.displaySettingsStorageSegment),n.handleScroll=c.debounce(n.doHandleScroll,3e3,{maxWait:1e4}),n}n.HistoryRecorderPresenter=h;var f,g=(f=s.View,r(m,f),m.prototype.initMembers=function(t,e){this.$episodeBody=t,this.displaySettingsStorageSegment=e},m.prototype.createPresenter=function(){return new h(this,{historyPath:this.$episodeBody.attr("data-viewer-history-path"),readingQuantityPath:this.$episodeBody.attr("data-viewer-reading-quantity-path"),displaySettingsStorageSegment:this.displaySettingsStorageSegment})},m.prototype.registerEvents=function(){u(window).on("scroll",u.proxy(this.onScroll,this)),u(".js-read-next-episode").on("click",u.proxy(this.onNavigateToNext,this)),u(document).on("visibilitychange",u.proxy(this.onVisibilitychange,this)),u(window).on("pagehide",u.proxy(this.onPagehide,this)),d.isIE(navigator.userAgent)&&u(window).on("beforeunload",u.proxy(this.onBeforeUnload,this))},m.prototype.onScroll=function(t){this.presenter.handleScroll()},m.prototype.onNavigateToNext=function(t){this.presenter.doHandleNavigateToNext()},m.prototype.onVisibilityStateHiddenAndPagehideProcess=function(){this.presenter.doHandleResumeReading()},m.prototype.onVisibilitychange=function(t){var e=document.visibilityState;"hidden"===e?this.onVisibilityStateHiddenAndPagehideProcess():"visible"===e&&this.presenter.doHandleStartReading()},m.prototype.onPagehide=function(t){this.onVisibilityStateHiddenAndPagehideProcess()},m.prototype.onBeforeUnload=function(t){this.onVisibilityStateHiddenAndPagehideProcess()},m.prototype.getReadingPosition=function(){var t=this.getReadingElement(this.$episodeBody[0]);return t&&t.id?"#"+t.id:location.hash&&location.hash.match(/^#p[0-9]+$/g)?location.hash:":root"},m.prototype.getReadingElement=function(t){var e=t.children,n=0,i=e.length-1,r=this.presenter.isHorizontal,o=r?0:window.innerWidth,s=t.getBoundingClientRect();if(r?0<s.top:s.right<o)return null;if(r?s.bottom<0:s.left>o)return e[i];for(;n<i;){var a=Math.floor((n+i)/2),l=e[a],u=l.getBoundingClientRect();if(r?0<u.top:u.right<o)i=a-1;else{if(!(r?u.bottom<0:u.left>o))return l;n=a+1}}return e[n]},m);function m(t,e){return f.call(this,t,e)||this}n.HistoryRecorderView=g},{"../../model/EpisodeDisplaySettings":109,"../../modules/Net":122,"../../modules/UserAgent":126,"../base":247,jquery:96,lodash:102}],182:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeDisplaySettings"),l=t("../../modules/UserAgent"),u=t("lodash"),c=t("jquery"),d=(o=s.Presenter,r(h,o),h.prototype.setup=function(){var n=this;this.displaySettings.on("settingupdate",function(t,e){"writing_direction"===t&&(n.view.updateHeaderPosition(),n.view.updateSidebarPosition(),n.view.updateSidebarContentPosition(),n.view.updateModalContainerPositions())}),this.view.updateHeaderPosition(),this.view.updateModalContainerPositions()},Object.defineProperty(h.prototype,"isHorizontal",{get:function(){return"horizontal"===this.displaySettings.getValue("writing_direction")},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"headerStyle",{get:function(){return this.isHorizontal||this.isScrolling?{position:"",marginRight:""}:{position:"absolute",marginRight:-this.scrollX+"px"}},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"sidebarStyle",{get:function(){return!this.isHorizontal&&this.isSidebarShown&&this.isSidebarLoaded?{position:"absolute",width:"auto",minWidth:"100%",overflowX:"visible"}:{position:"",width:"",minWidth:"",overflowX:""}},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"sidebarStyleForContent",{get:function(){if(this.isHorizontal||!this.isSidebarLoaded)return{paddingRight:""};if(!this.isSidebarShown)return{};var t=this.view.getSidebarContentPosition(),e=Math.round(t.right-t.left),n=this.view.getDocumentWidth(),i=this.view.getViewportWidth(),r=n-e,o={};if(t.right<i){var s=-this.scrollX;o.paddingRight=Math.max(Math.min(s,r),0)+"px"}else 0<t.left&&(s=-this.scrollX+i-e,o.paddingRight=Math.max(Math.min(s,r),0)+"px");return o},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"modalContainerStyle",{get:function(){return this.isHorizontal?{position:"",width:"",left:"",right:""}:{position:"absolute",width:"100vw",left:"auto",right:-this.scrollX+"px"}},enumerable:!0,configurable:!0}),h.prototype.beginScrollSession=function(){this.isHorizontal||(this.isScrolling||(this.isScrolling=!0,this.view.updateHeaderPosition()),this.endScrollSessionLater())},h.prototype.endScrollSession=function(){this.isHorizontal||this.isScrolling&&(this.isScrolling=!1,this.view.updateHeaderPosition(),this.view.updateSidebarPosition(),this.view.updateSidebarContentPosition(),this.view.updateModalContainerPositions())},h.prototype.handleScroll=function(t){this.scrollX=t,this.beginScrollSession()},h.prototype.handleTouchStart=function(t){t||this.beginScrollSession()},h.prototype.handleSidebarToggle=function(t){this.isSidebarShown=t,this.view.updateSidebarPosition(),this.view.updateSidebarContentPosition()},h.prototype.handleSidebarLoad=function(){this.isSidebarLoaded=!0,this.view.updateSidebarPosition(),this.view.updateSidebarContentPosition()},h);function h(t,e){var n=o.call(this,t)||this;return n.isScrolling=!1,n.scrollX=e.scrollX,n.endScrollSessionLater=u.debounce(n.endScrollSession,80),n.isSidebarShown=e.isSidebarShown,n.isSidebarLoaded=!1,n.displaySettings=a.default.getInstance(e.displaySettingsStorageSegment),n}n.IOSVerticalPositionerPresenter=d;var p,f=(p=s.View,r(g,p),g.createIfNeeded=function(t){var e=navigator.userAgent,n=null;return l.isIOS(e)&&(n=e.match(/\bAppleWebKit\/([0-9]+)/))?new g(c(".js-viewer-globalheader"),c(".js-viewer-sidebar-container"),c(".js-viewer-sidebar-panel"),+n[1]<604?c(".js-viewer-setting-modal-container, .js-guest-signup-modal-container"):c(),t):null},g.prototype.initMembers=function(t,e,n,i,r){this.$header=t,this.$sidebarContainer=e,this.$sidebar=n,this.$modalContainers=i,this.displaySettingsStorageSegment=r},g.prototype.createPresenter=function(){return new d(this,{scrollX:window.pageXOffset,isSidebarShown:this.$sidebarContainer.hasClass("contentAside-isShown"),displaySettingsStorageSegment:this.displaySettingsStorageSegment})},g.prototype.registerEvents=function(){c(window).on("scroll",c.proxy(this.onScroll,this)),c(window).on("touchstart",c.proxy(this.onTouchStart,this)),this.$sidebar.on("dcv:episodeviewersidebar:show",c.proxy(this.onSidebarShow,this)),this.$sidebar.on("dcv:episodeviewersidebar:hide",c.proxy(this.onSidebarHide,this)),this.$sidebar.on("dcv:episodeviewersidebar:load",c.proxy(this.onSidebarLoad,this))},g.prototype.onScroll=function(t){this.presenter.handleScroll(window.pageXOffset)},g.prototype.onTouchStart=function(t){var e=this.$header[0].contains(t.target);this.presenter.handleTouchStart(e)},g.prototype.onSidebarShow=function(t){this.presenter.handleSidebarToggle(!0)},g.prototype.onSidebarHide=function(t){this.presenter.handleSidebarToggle(!1)},g.prototype.onSidebarLoad=function(t){this.presenter.handleSidebarLoad()},g.prototype.updateHeaderPosition=function(){this.$header.css(this.presenter.headerStyle)},g.prototype.getSidebarContentPosition=function(){var t=this.$sidebar[0].firstElementChild;if(!t)return{left:0,right:0};var e=t.getBoundingClientRect();return{left:e.left-60,right:e.right}},g.prototype.getDocumentWidth=function(){return c(document).width()},g.prototype.getViewportWidth=function(){return c(window).width()},g.prototype.updateSidebarPosition=function(){this.$sidebar.css(this.presenter.sidebarStyle)},g.prototype.updateSidebarContentPosition=function(){this.$sidebar.css(this.presenter.sidebarStyleForContent)},g.prototype.updateModalContainerPositions=function(){this.$modalContainers.css(this.presenter.modalContainerStyle)},g);function g(t,e,n,i,r){return p.call(this,t,e,n,i,r)||this}n.IOSVerticalPositionerView=f},{"../../model/EpisodeDisplaySettings":109,"../../modules/UserAgent":126,"../base":247,jquery:96,lodash:102}],183:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../../modules/GoogleTagManager"),a=t("../../modules/storage-accessor"),l=t("../../model/EpisodeDisplaySettings"),d=t("../../modules/WritingDirectionHelper"),u=t("../base"),c=t("../EpisodeReadSetting"),h=t("jquery"),p=(o=u.Presenter,r(f,o),f.prototype.handleClick=function(t,e){if(!this.isClickScrollEnabled)return!1;if(this.isScrollingPage)return!1;if(e)return!1;var n=this.view.getViewportSize();return!!this.isInScrollArea(t,n)&&(this.scrollPage(n),!0)},Object.defineProperty(f.prototype,"isClickScrollEnabled",{get:function(){var t=this.storageAccessor.getItem(c.CLICK_SCROLL_ENABLED_KEY);return null!==t?t:c.CLICK_SCROLL_ENABLED_DEFAULT_VALUE},enumerable:!0,configurable:!0}),f.prototype.isInScrollArea=function(t,e){return this.isHorizontal?.7<t.y/e.height:t.x/e.width<.5},f.prototype.scrollPage=function(t){var e,n,i=this,r=this.isHorizontal,o=r?t.height:t.width,s=this.view.getScrollPosition(),a=d.calculatePrincipalScrollOffset(r,s.x,s.y)+o-this.view.getLineHeight()/2,l=this.view.getDocumentSize(),u=(r?l.height:l.width)-o-60;n=a<=u?(e=a,300):(e=u,900);var c={};r||(c.scrollLeft=-e),c.scrollTop=e,this.isScrollingPage=!0,this.view.scroll(c,n).always(function(){i.isScrollingPage=!1})},Object.defineProperty(f.prototype,"isHorizontal",{get:function(){return"horizontal"===this.displaySettings.getValue("writing_direction")},enumerable:!0,configurable:!0}),f);function f(t,e){var n=o.call(this,t)||this;return n.storageAccessor=e.storageAccessor,n.displaySettings=l.default.getInstance(e.displaySettingsStorageSegment),n.isScrollingPage=!1,n}n.PageScrollerPresenter=p;var g,m=(g=u.View,r(y,g),y.prototype.initMembers=function(t,e,n){this.$container=t,this.$episodeBodyContainer=t.find(".js-episode-body-container"),this.$htmlAndBody=h("html,body"),this.$window=h(window),this.$document=h(document),this.displaySettingsStorageSegment=e,this.googleTagManager=n},y.prototype.createPresenter=function(){var t=a.createLocalStorageAccessor(c.EPISODE_VIEWER_READ_SETTING_STORAGE_SEGMENT);return new p(this,{storageAccessor:t,displaySettingsStorageSegment:this.displaySettingsStorageSegment})},y.prototype.registerEvents=function(){this.$container.on("click",h.proxy(this.onClick,this))},y.prototype.onClick=function(t){var e=!!h(t.target).closest("a").length,n={x:t.clientX,y:t.clientY};this.presenter.handleClick(n,e)&&t.preventDefault()},y.prototype.getViewportSize=function(){return{width:this.$window.width(),height:this.$window.height()}},y.prototype.getDocumentSize=function(){return{width:this.$document.width(),height:this.$document.height()}},y.prototype.getScrollPosition=function(){return{x:window.pageXOffset,y:window.pageYOffset}},y.prototype.getLineHeight=function(){return parseFloat(this.$episodeBodyContainer.css("line-height"))},y.prototype.scroll=function(t,e){var n=this.$htmlAndBody.animate(t,e).promise();return this.googleTagManager.sendEvent("EpisodeViewer_PageScroller_scroll"),n},y);function y(t,e,n){return void 0===n&&(n=s.GoogleTagManager.default),g.call(this,t,e,n)||this}n.PageScrollerView=m},{"../../model/EpisodeDisplaySettings":109,"../../modules/GoogleTagManager":120,"../../modules/WritingDirectionHelper":129,"../../modules/storage-accessor":131,"../EpisodeReadSetting":169,"../base":247,jquery:96}],184:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/Net"),l=(o=s.Presenter,r(u,o),u.prototype.setup=function(){this.execReadCounter()},u.prototype.execReadCounter=function(){a.ajax({url:this.readCounterPath,method:"POST"}).done(function(t,e){}).fail(function(t,e){})},u);function u(t,e){var n=o.call(this,t)||this;return n.readCounterPath=e.readCounterPath,n}n.ReadCounterPresenter=l;var c,d=(c=s.View,r(h,c),h.prototype.initMembers=function(t){this.$readCounterContainer=t},h.prototype.createPresenter=function(){return new l(this,{readCounterPath:this.$readCounterContainer.attr("data-viewer-access-counter-path")})},h);function h(t){return c.call(this,t)||this}n.ReadCounterView=d},{"../../modules/Net":122,"../base":247}],185:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/Display"),l=(o=s.Presenter,r(u,o),u.prototype.setup=function(){this.view.updateComponent()},Object.defineProperty(u.prototype,"isRelatedWorkShown",{get:function(){return!(this.isFollowingWork||this.isReadingContinuously)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isReadingContinuously",{get:function(){var t=u.getWorkKeyByPath(this.currentPath),e=u.getWorkKeyByUrl(this.referrerURL);return t&&t===e},enumerable:!0,configurable:!0}),u.getWorkKeyByUrl=function(t){var e=new RegExp("^[^:]+://[^/]+(/.*)").exec(t),n=e?e[1]:"";return u.getWorkKeyByPath(n)},u.getWorkKeyByPath=function(t){var e=new RegExp("^/works/[0-9]+/episodes/").exec(t);return e?e[0]:""},u);function u(t,e){var n=o.call(this,t)||this;return n.currentPath=e.currentPath,n.referrerURL=e.referrerURL,n.isFollowingWork=e.isFollowingWork,n}n.RelatedWorkPanelPresenter=l;var c,d=(c=s.View,r(h,c),h.prototype.initMembers=function(t,e){this.$panel=t,this.$relatedWork=t,this.referrerURL=e},h.prototype.createPresenter=function(){return new l(this,{currentPath:this.$relatedWork.attr("data-episode-permalink-path"),referrerURL:this.referrerURL,isFollowingWork:!!+this.$relatedWork.attr("data-is-following-work")})},h.prototype.updateComponent=function(){a.toggleDisplayClass(this.$relatedWork,this.presenter.isRelatedWorkShown)},h);function h(t,e){return c.call(this,t,e)||this}n.RelatedWorkPanelView=d},{"../../modules/Display":116,"../base":247}],186:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/Net"),l=t("../../modules/storage-accessor"),u=t("../VerticalComposition"),c=t("jquery"),d=(o=s.Presenter,r(h,o),h.prototype.setup=function(){if(this.storageAccessor){var t=this.storageAccessor.getItem("is_open");"boolean"==typeof t&&!t||this.toggleOpenState()}},h.prototype.toggleOpenState=function(){this.isOpen&&this.view.notifySidebarHide(),this.isOpen=!this.isOpen,this.view.updateIsOpen(),this.isFromTouch&&this.view.updateDisabledLink(),this.isOpen&&this.view.notifySidebarShow(),this.isOpen&&this.loadContent(),this.storageAccessor&&this.storageAccessor.setItem("is_open",this.isOpen)},h.prototype.handleClick=function(t,e){t?this.toggleOpenState():e||this.isOpen&&this.isFromTouch&&this.toggleOpenState()},h.prototype.loadContent=function(){var n=this;this.shouldLoad&&(this.shouldLoad=!1,a.ajax({method:"GET",url:this.sidebarPath}).done(function(t){n.view.showSidebarContent(t),n.isFromTouch||(window.valve=window.valve||[]).push(function(t){t.displaySlot("js-ad-episode-pc-1")})}).fail(function(t,e){n.shouldLoad=!0}))},h);function h(t,e){var n=o.call(this,t)||this;return n.sidebarPath=e.sidebarPath,n.isOpen=!1,n.shouldLoad=!0,n.isFromTouch=e.isFromTouch,n.storageAccessor=e.storageAccessor,n}n.SidebarPresenter=d;var p,f=(p=s.View,r(g,p),g.prototype.initMembers=function(t,e){this.$sidebarContainer=t,this.$sidebarPanel=this.$sidebarContainer.find(".js-viewer-sidebar-panel"),this.$sidebarToggleButton=this.$sidebarContainer.find(".js-viewer-sidebar-toggle-button"),this.displaySettingsStorageSegment=e},g.prototype.createPresenter=function(){var t=this.$sidebarContainer.attr("data-viewer-sidebar-storage-segment"),e=t?l.createLocalStorageAccessor(t):null;return new d(this,{sidebarPath:this.$sidebarContainer.attr("data-viewer-sidebar-path"),storageAccessor:e,isFromTouch:c(document.body).hasClass("isTouch")})},g.prototype.registerEvents=function(){this.$sidebarContainer.on("click",c.proxy(this.onClick,this)),this.$sidebarToggleButton.on("mouseup",c.proxy(this.onButtonMouseUp,this))},g.prototype.onButtonMouseUp=function(t){this.$sidebarToggleButton.blur()},g.prototype.onClick=function(t){var e=this.$sidebarPanel[0].contains(t.target),n=this.$sidebarToggleButton[0].contains(t.target);this.presenter.handleClick(n,e)},g.prototype.updateIsOpen=function(){var t=this.presenter.isOpen;this.$sidebarContainer.toggleClass("contentAside-isShown",t).toggleClass("contentAside-isHidden",!t),this.$sidebarToggleButton.toggleClass("isActive",t)},g.prototype.updateDisabledLink=function(){var t=this.presenter.isOpen;this.$sidebarContainer.children().css("pointer-events",t?"none":""),this.$sidebarPanel.css("pointer-events",t?"auto":""),this.$sidebarToggleButton.css("pointer-events",t?"auto":"")},g.prototype.showSidebarContent=function(t){this.$sidebarPanel.html(t),new u.VerticalCompositionView(this.$sidebarPanel,this.displaySettingsStorageSegment),this.$sidebarPanel.trigger("dcv:episodeviewersidebar:load");var e=navigator.userAgent;0<=e.indexOf("Chrome/")&&e.indexOf("Edge/")<0&&this.$sidebarPanel.find(".js-chrome-visibility-fix").css("transform","translateZ(0)")},g.prototype.notifySidebarShow=function(){this.$sidebarPanel.trigger("dcv:episodeviewersidebar:show")},g.prototype.notifySidebarHide=function(){this.$sidebarPanel.trigger("dcv:episodeviewersidebar:hide")},g);function g(t,e){return p.call(this,t,e)||this}n.SidebarView=f},{"../../modules/Net":122,"../../modules/storage-accessor":131,"../VerticalComposition":230,"../base":247,jquery:96}],187:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeCheerCollection"),l=t("../../modules/Display"),u=t("../../modules/Locale"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){var t=this;this.cheerCollection.on("countupdate",function(){t.view.updateButton()})},Object.defineProperty(d.prototype,"isShown",{get:function(){return!!this.cheerCollection.count},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"cheerCount",{get:function(){return this.cheerCollection.count},enumerable:!0,configurable:!0}),d);function d(t,e){var n=o.call(this,t)||this;return n.cheerCollection=a.default.getInstance(e.episodePermalinkPath),n.cheerCollection.setSummaryCount(e.cheerSummaryCount),n}n.ToggleCheersButtonPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$button=t,this.$cheerCount=t.find(".js-toggle-cheers-button-cheer-count")},f.prototype.createPresenter=function(){return new c(this,{episodePermalinkPath:this.$button.attr("data-episode-permalink-path"),cheerSummaryCount:+this.$button.attr("data-cheer-summary-count")})},f.prototype.updateButton=function(){l.toggleDisplayClass(this.$button,this.presenter.isShown),this.$cheerCount.text(u.formatNumber(this.presenter.cheerCount))},f);function f(t){return h.call(this,t)||this}n.ToggleCheersButtonView=p},{"../../model/EpisodeCheerCollection":104,"../../modules/Display":116,"../../modules/Locale":121,"../base":247}],188:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../model/EpisodeCommentCounter"),l=t("../../modules/Locale"),u=t("../../modules/Display"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){var t=this;this.commentCounter.on("countupdate",function(){t.view.updateButton()})},Object.defineProperty(d.prototype,"commentCount",{get:function(){return this.commentCounter.count},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isCountShown",{get:function(){return!!this.commentCounter.count},enumerable:!0,configurable:!0}),d);function d(t,e){var n=o.call(this,t)||this;return n.commentCounter=a.default.getInstance(e.episodePermalinkPath),n}n.ToggleCommentsButtonPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$button=t,this.$commentCountBox=t.find(".js-toggle-comments-button-comment-count-box"),this.$commentCount=t.find(".js-toggle-comments-button-comment-count")},f.prototype.createPresenter=function(){return new c(this,{episodePermalinkPath:this.$button.attr("data-episode-permalink-path")})},f.prototype.updateButton=function(){this.$commentCount.text(l.formatNumber(this.presenter.commentCount)),u.toggleDisplayClass(this.$commentCountBox,this.presenter.isCountShown)},f);function f(t){return h.call(this,t)||this}n.ToggleCommentsButtonView=p},{"../../model/EpisodeCommentCounter":107,"../../modules/Display":116,"../../modules/Locale":121,"../base":247}],189:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s,a=t("../../model/EpisodeDisplaySettings"),l=t("../base"),u=t("jquery");(s=o=o||{})[s.DELTA_PIXEL=0]="DELTA_PIXEL",s[s.DELTA_LINE=1]="DELTA_LINE",s[s.DELTA_PAGE=2]="DELTA_PAGE",n.DeltaMode=o;var c,d=(c=l.Presenter,r(h,c),Object.defineProperty(h.prototype,"isHorizontal",{get:function(){return"horizontal"===this.displaySettings.getValue("writing_direction")},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"isModalWindowShown",{get:function(){return 0<this.modalWindowCount},enumerable:!0,configurable:!0}),h.prototype.handleWheel=function(t,e,n,i){if(t||e||0===n||this.isHorizontal||this.isModalWindowShown)return!1;var r=n*(i===o.DELTA_PIXEL?1:i===o.DELTA_LINE?this.lineHeight:this.containerWidth-this.lineHeight);return this.isCoordinateRotated?this.view.scrollYBy(r):this.view.scrollXBy(-r),!0},h.prototype.handleModalWindowShow=function(){this.modalWindowCount++},h.prototype.handleModalWindowHide=function(){this.modalWindowCount--},h.prototype.setDimensions=function(t,e){this.lineHeight=t,this.containerWidth=e},h);function h(t,e){var n=c.call(this,t)||this;return n.lineHeight=e.lineHeight,n.containerWidth=e.containerWidth,n.modalWindowCount=0,n.isCoordinateRotated=e.isCoordinateRotated,n.displaySettings=a.default.getInstance(e.displaySettingsStorageSegment),n}n.WheelScrollerPresenter=d;var p,f={INPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,OPTGROUP:!0},g=(p=l.View,r(m,p),m.createIfNeeded=function(t,e){return 0<=navigator.userAgent.indexOf("Edge/")?null:new m(t,e)},m.createForDocumentIfNeeded=function(t){var e=u(document.scrollingElement||document.documentElement);return m.createIfNeeded(e,t)},m.prototype.initMembers=function(t,e){(this.$container=t).attr("data-is-wheel-scroller-container","1"),this.displaySettingsStorageSegment=e,this.eventNS=[".wheelscroller",Date.now(),Math.random().toString().slice(2)].join("-")},m.prototype.createPresenter=function(){var t=this.$container[0];return new d(this,{lineHeight:this.getLineHeight(),containerWidth:t.clientWidth,isCoordinateRotated:0<=navigator.userAgent.indexOf("Trident/")&&t===document.documentElement,displaySettingsStorageSegment:this.displaySettingsStorageSegment})},m.prototype.registerEvents=function(){this.$container.on("wheel"+this.eventNS,u.proxy(this.onWheel,this)),u(window).on("resize"+this.eventNS,u.proxy(this.onResize,this)),u(document).on("dcv:modalwindow:show"+this.eventNS,u.proxy(this.onModalWindowShow,this)),u(document).on("dcv:modalwindow:hide"+this.eventNS,u.proxy(this.onModalWindowHide,this))},m.prototype.onWheel=function(t){var e=t.shiftKey||t.ctrlKey||t.altKey||t.metaKey,n=!!f[t.target.nodeName],i=u(t.target).closest("[data-is-wheel-scroller-container]"),r=n||i[0]!==this.$container[0],o=t.originalEvent;this.presenter.handleWheel(e,r,o.deltaY,o.deltaMode)&&t.preventDefault()},m.prototype.onResize=function(t){var e=this.getLineHeight(),n=this.$container[0].clientWidth;this.presenter.setDimensions(e,n)},m.prototype.onModalWindowShow=function(t){this.presenter.handleModalWindowShow()},m.prototype.onModalWindowHide=function(t){this.presenter.handleModalWindowHide()},m.prototype.getLineHeight=function(){var t=this.$container;return t[0]===document.documentElement&&(t=u(document.body)),parseFloat(t.css("line-height"))},m.prototype.scrollXBy=function(t){this.$container[0].scrollLeft+=t},m.prototype.scrollYBy=function(t){this.$container[0].scrollTop+=t},m.prototype.destroy=function(){this.$container.off("wheel"+this.eventNS),u(window).off("resize"+this.eventNS),u(document).off("dcv:modalwindow:show"+this.eventNS),u(document).off("dcv:modalwindow:hide"+this.eventNS)},m);function m(t,e){return p.call(this,t,e)||this}n.WheelScrollerView=g},{"../../model/EpisodeDisplaySettings":109,"../base":247,jquery:96}],190:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/EventType"),l=t("../modules/Display"),u=t("jquery"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){this.view.updateButtonAndPanel(),this.view.notifyPanelShow()},d.prototype.togglePanel=function(t){this.view.notifyPanelHide(),this.panelId=t===this.panelId?null:t,this.view.updateButtonAndPanel(),this.view.notifyPanelShow()},d);function d(t,e){var n=o.call(this,t)||this;return n.panelId=e.panelId,n}n.ExclusivePanelButtonsPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$buttons=t;var o=[],s={"":u()},a={"":u()};this.$buttons.each(function(t,e){var n=u(e),i=n.attr("aria-controls"),r=u("#"+i);o.push(r[0]),s[i]=n,a[i]=r}),this.$panels=u(o),this.buttonMap=s,this.panelMap=a},f.prototype.createPresenter=function(){var t=this.$panels.filter(".isShown").prop("id")||null;return new c(this,{panelId:t})},f.prototype.registerEvents=function(){this.$buttons.on("click",u.proxy(this.onButtonClick,this))},f.prototype.onButtonClick=function(t){var e=u(t.currentTarget).attr("aria-controls");this.presenter.togglePanel(e)},Object.defineProperty(f.prototype,"$currentButton",{get:function(){return this.buttonMap[this.presenter.panelId||""]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"$currentPanel",{get:function(){return this.panelMap[this.presenter.panelId||""]},enumerable:!0,configurable:!0}),f.prototype.updateButtonAndPanel=function(){this.$buttons.removeClass("isPanelShown"),this.$buttons.addClass("isPanelHidden"),l.toggleDisplayClass(this.$panels,!1),this.$currentButton.addClass("isPanelShown"),this.$currentButton.removeClass("isPanelHidden"),l.toggleDisplayClass(this.$currentPanel,!0)},f.prototype.notifyPanelShow=function(){this.$currentPanel.trigger(a.PANEL_SHOW_EVENT)},f.prototype.notifyPanelHide=function(){this.$currentPanel.trigger(a.PANEL_HIDE_EVENT)},f);function f(t){return h.call(this,t)||this}n.ExclusivePanelButtonsView=p},{"../modules/Display":116,"../modules/EventType":118,"./base":247,jquery:96}],191:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../model/Notification/TimelineSummary"),l=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.setup=function(){var t=this;this.timelineSummary.on("unreadcountupdate",function(){t.view.updateFavicon()}),"normal"!==this.iconType&&this.view.updateFavicon()},Object.defineProperty(c.prototype,"iconType",{get:function(){return this.timelineSummary.hasUnreadNotices?"unread":"normal"},enumerable:!0,configurable:!0}),c);function c(t,e){var n=o.call(this,t)||this;return n.timelineSummary=a.default.getInstance(),n}n.FaviconSwitcherPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t){this.$links=t,this.$links.each(function(t,e){var n=l(e);n.attr("data-normal-icon-url",n.attr("href"))})},p.prototype.createPresenter=function(){return new u(this,{})},p.prototype.updateFavicon=function(){var i="data-"+this.presenter.iconType+"-icon-url";this.$links.each(function(t,e){var n=l(e);n.attr("href",n.attr(i))})},p);function p(t){return d.call(this,t)||this}n.FaviconSwitcherView=h},{"../model/Notification/TimelineSummary":111,"./base":247,jquery:96}],192:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var s,o=t("./base"),a=t("jquery"),l=t("../modules/Net"),u=t("lodash"),c=t("../modules/Locale"),d=(s=o.Presenter,r(h,s),h.prototype.setup=function(){this.loadFeed()},h.prototype.loadFeed=function(){var n=this;l.ajax(this.url).done(function(t){var e=a(t).find("entry").toArray();n.feedListItems=e.map(function(t){return n.buildFeedListItem(t)}),n.view.updateFeedList()})},h.prototype.buildFeedListItem=function(t){var e=this,n=a(t),i=new Date(n.find("published").text()),r=n.find("category").toArray().map(function(t){return a(t).attr("label")}).filter(function(t){return e.isMajorCategoryMap[t]})[0];return{title:n.find("title").text(),date:i,url:n.find("link").attr("href"),imageURL:n.find('link[rel="enclosure"][type^="image/"]').attr("href"),majorCategory:r}},h);function h(t,e){var n=s.call(this,t)||this;n.url=e.feedURL,n.isMajorCategoryMap={};for(var i=0,r=e.majorCategories;i<r.length;i++){var o=r[i];n.isMajorCategoryMap[o]=!0}return n.feedListItems=[],n}n.FeedListPresenter=d;var p,f=(p=o.View,r(g,p),g.prototype.initMembers=function(t){var e=t.find(".js-feed-list-template");this.$container=t,this.$list=t.find(".js-feed-list"),this.template=u.template(e.html())},g.prototype.createPresenter=function(){var t=this.$container.attr("data-major-categories"),e=t?JSON.parse(t):[];return new d(this,{feedURL:this.$container.attr("data-feed-url"),majorCategories:e})},g.prototype.updateFeedList=function(){var e=this,t=this.presenter.feedListItems.map(function(t){return e.template(a.extend(t,{formatISODate:c.formatISODate,formatDate:c.formatDate}))}).join("");this.$list.html(t),this.$container.find(".js-feed-list-loading").remove()},g);function g(t){return p.call(this,t)||this}n.FeedListView=f},{"../modules/Locale":121,"../modules/Net":122,"./base":247,jquery:96,lodash:102}],193:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Net"),l=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.defaultErrorMessage=function(t){return t?"フォローを解除できませんでした":"フォローできませんでした"},c.prototype.handleButtonClick=function(t){t.isBlocking?this.unblock(t):this.updateFollowing(t)},c.prototype.updateFollowing=function(r){var o=this;this.setError(null);var t=r.isFollowing?r.unfollowPath:r.followPath;a.ajax({method:"POST",url:t}).done(function(t,e,n){r.isFollowing=!!+t.is_following}).fail(function(t,e,n){var i=t&&t.error&&t.error.message||o.defaultErrorMessage(r.isFollowing);o.setError(new Error(i))}).always(function(t,e,n){o.view.updateState(r),o.view.notifyFollowingState(r),o.isLoading=!1,o.view.updateIsLoading()}),this.isLoading=!0,this.view.updateIsLoading()},c.prototype.unblock=function(i){var r=this;this.setError(null),a.ajax({method:"POST",url:"/settings/blocklist/unblock_user",data:{target_account_name:i.targetId}}).done(function(t,e,n){i.isBlocking=!1}).fail(function(t,e,n){var i=t&&t.error&&t.error.message||"ブロックを解除できませんでした";r.setError(new Error(i))}).always(function(t,e,n){r.view.updateState(i),r.view.notifyBlockingState(i),r.isLoading=!1,r.view.updateIsLoading()}),this.isLoading=!0,this.view.updateIsLoading()},c);function c(t){return o.call(this,t)||this}n.FollowButtonsPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t){this.$container=t},p.prototype.createPresenter=function(){return new u(this)},p.prototype.registerEvents=function(){this.$container.on("click",".js-follow-button",l.proxy(this.onClickButton,this)),this.$container.on("mouseover",".js-follow-button",l.proxy(this.onMouseOverButton,this)),this.$container.on("mouseout",".js-follow-button",l.proxy(this.onMouseOutButton,this))},p.prototype.onClickButton=function(t){var e=l(t.currentTarget);this.presenter.handleButtonClick({targetId:e.attr("data-target-id"),isFollowing:e.hasClass("isFollowing"),followPath:e.attr("data-follow-path"),unfollowPath:e.attr("data-unfollow-path"),isBlocking:e.hasClass("isBlocking")})},p.prototype.onMouseOverButton=function(t){t.currentTarget.contains(t.relatedTarget)||l(t.currentTarget).addClass("toUpdateFollowState")},p.prototype.onMouseOutButton=function(t){t.currentTarget.contains(t.relatedTarget)||l(t.currentTarget).removeClass("toUpdateFollowState")},p.prototype.updateState=function(t){var e=l('.js-follow-button[data-target-id="'+t.targetId+'"]');e.toggleClass("isBlocking",t.isBlocking),e.toggleClass("isFollowing",t.isFollowing),e.removeClass("toUpdateFollowState")},p.prototype.notifyFollowingState=function(t){l('.js-follow-button[data-target-id="'+t.targetId+'"]').trigger(t.isFollowing?"dcv:followbuttons:follow":"dcv:followbuttons:unfollow")},p.prototype.notifyBlockingState=function(t){l('.js-follow-button[data-target-id="'+t.targetId+'"]').trigger(t.isBlocking?"dcv:followbuttons:block":"dcv:followbuttons:unblock")},p.prototype.updateIsLoading=function(){this.$container.find(".js-follow-button").prop("disabled",this.presenter.isLoading)},p.prototype.updateError=function(){var t=this.presenter.lastError;t&&alert(t.message)},p);function p(t){return d.call(this,t)||this}n.FollowButtonsView=h},{"../modules/Net":122,"./base":247,jquery:96}],194:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Locale"),r=t("jquery"),o=(s.prototype.onFollow=function(t){this.updateCount(+this.$followerCounter.attr("data-follower-count")+1)},s.prototype.onUnfollow=function(t){this.updateCount(this.$followerCounter.attr("data-follower-count")-1)},s.prototype.updateCount=function(t){var e=t<0?0:t;this.$followerCounter.attr("data-follower-count",e),this.$followerCounter.text(i.formatNumber(e))},s);function s(t,e){this.$followerCounter=t,e.on("dcv:followbuttons:follow",r.proxy(this.onFollow,this)),e.on("dcv:followbuttons:unfollow",r.proxy(this.onUnfollow,this))}n.FollowerCounterView=o},{"../modules/Locale":121,jquery:96}],195:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("jquery"),l=(o=s.Presenter,r(u,o),u.prototype.protect=function(){this.isProtected||(this.isProtected=!0,this.view.startProtection())},u.prototype.dismiss=function(){this.isProtected&&(this.isProtected=!1,this.view.endProtection())},u);function u(t,e){var n=o.call(this,t)||this;return n.isProtected=!1,n}n.FormInputProtectorPresenter=l;var c,d=(c=s.View,r(h,c),h.prototype.initMembers=function(t){this.$form=t,this.eventNS=[".forminputprotector",Date.now(),Math.random().toString().slice(2)].join("-")},h.prototype.createPresenter=function(){return new l(this,{})},h.prototype.registerEvents=function(){this.$form.on("input change",a.proxy(this.onInput,this)),this.$form.on("dcv:forminputprotector:command:dismiss",a.proxy(this.onDismissCommand,this))},h.prototype.onInput=function(t){this.presenter.protect()},h.prototype.onDismissCommand=function(t){t.isDefaultPrevented()||(t.preventDefault(),this.presenter.dismiss())},h.prototype.startProtection=function(){a(window).on("beforeunload"+this.eventNS,a.proxy(this.onBeforeUnload,this))},h.prototype.endProtection=function(){a(window).off("beforeunload"+this.eventNS)},h.prototype.onBeforeUnload=function(t){return"ページを離れると、現在編集中の内容は保存されません。"},h);function h(t){return c.call(this,t)||this}n.FormInputProtectorView=d},{"./base":247,jquery:96}],196:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=(o.prototype.updateFocusedClass=function(){this.isFromTouch||this.$fieldContainers.removeClass("isFocused"),this.$fieldContainers.each(function(t,e){e.contains(document.activeElement)&&i(e).addClass("isFocused")})},o);function o(t){this.$fieldContainers=t,this.isFromTouch=i(document.body).hasClass("isTouch"),this.$fieldContainers.on("focusin","input",i.proxy(this.updateFocusedClass,this)),this.updateFocusedClass()}n.FormNoteOpenerView=r},{jquery:96}],197:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("jquery"),l=t("../modules/Net"),u=(o=s.Presenter,r(c,o),c.prototype.setup=function(){},c.prototype.upload=function(t){return l.ajax({method:"POST",url:"/my/images/generate_image_upload_url"}).done(function(t){}).fail(this.uploadImageFail)},c.prototype.uploadImageFail=function(){console.log("アップロードに失敗しました")},c.prototype.handleButtonClick=function(t){t?this.upload(t):console.log("image not found")},c);function c(t,e){return o.call(this,t)||this}n.ImageUploadButtonPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t){this.$container=t,this.$button=t.find(".js-image-upload-button"),this.$selectImage=t.find(".js-image-upload-file")},p.prototype.createPresenter=function(){return new u(this,null)},p.prototype.updateState=function(){},p.prototype.onChangeFile=function(t){var e=this.$selectImage.prop("files")[0];e&&this.presenter.handleButtonClick(e)},p.prototype.onClickButton=function(t){this.$selectImage.trigger("click")},p.prototype.registerEvents=function(){this.$button.on("click",a.proxy(this.onClickButton,this)),this.$selectImage.on("change",a.proxy(this.onChangeFile,this))},p);function p(t){return d.call(this,t)||this}n.ImageUploadButtonView=h},{"../modules/Net":122,"./base":247,jquery:96}],198:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Net"),l=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.load=function(){var e=this;this.isLoading||(this.isLoading=!0,this.view.updateIsLoading(),a.ajax({url:this.contentURL}).done(function(t){e.view.renderPanelContent(t)}).always(function(){e.isLoading=!1,e.view.updateIsLoading()}))},c);function c(t,e){var n=o.call(this,t)||this;return n.contentURL=e.contentURL,n.isLoading=!1,n}n.LoadPanelButtonPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t){this.$button=t,this.$panel=l("#"+t.attr("aria-controls"))},p.prototype.createPresenter=function(){return new u(this,{contentURL:this.$button.attr("data-content-url")})},p.prototype.registerEvents=function(){this.$button.on("click",l.proxy(this.onButtonClick,this))},p.prototype.onButtonClick=function(t){this.presenter.load()},p.prototype.updateIsLoading=function(){var t=this.presenter.isLoading;this.$button.prop("disabled",t),this.$button.toggleClass("isLoading",t),this.$panel.toggleClass("isLoading",t)},p.prototype.renderPanelContent=function(t){this.$panel.html(t)},p);function p(t){return d.call(this,t)||this}n.LoadPanelButtonView=h},{"../modules/Net":122,"./base":247,jquery:96}],199:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Net"),l=t("../modules/FormFields"),u=t("../modules/Display"),c=t("../modules/Util/UpdateLocation"),d=t("jquery"),h=(o=s.Presenter,r(p,o),p.prototype.handleSubmit=function(t){var r=this;this.setError(null),a.ajax({url:this.actionURL,data:t,method:"POST"}).done(function(t,e,n){r.locationURL=t.location,r.view.updateLocation()}).fail(function(t,e,n){r.isLoading=!1,r.view.updateIsLoading();var i=t&&t.error?t.error.message:"ログインに失敗しました";r.setError(new Error(i))}),this.isLoading=!0,this.view.updateIsLoading()},p);function p(t,e){var n=o.call(this,t)||this;return n.actionURL=e.actionURL,n.isLoading=!1,n.locationURL="",n}n.LoginFormPresenter=h;var f,g=(f=s.View,r(m,f),m.prototype.initMembers=function(t){this.$form=t,this.$errorMessageBox=t.find(".js-error-message-box")},m.prototype.createPresenter=function(){return new h(this,{actionURL:this.$form.attr("action")})},m.prototype.registerEvents=function(){this.$form.on("submit",d.proxy(this.onSubmit,this))},m.prototype.onSubmit=function(t){t.preventDefault(),this.presenter.handleSubmit(this.$form.serializeArray())},m.prototype.updateIsLoading=function(){l.toggleFields(this.$form,!this.presenter.isLoading)},m.prototype.updateLocation=function(){this.presenter.locationURL&&c.updateLocation(this.presenter.locationURL)},m.prototype.updateError=function(){var t=this.presenter.lastError;this.$errorMessageBox.text(t?t.message:""),u.toggleDisplayClass(this.$errorMessageBox,!!t)},m);function m(t){return f.call(this,t)||this}n.LoginFormView=g},{"../modules/Display":116,"../modules/FormFields":119,"../modules/Net":122,"../modules/Util/UpdateLocation":128,"./base":247,jquery:96}],200:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Display"),l=t("../modules/GoogleTagManager"),u=t("jquery"),c=(o=s.Presenter,r(d,o),d.prototype.handleOpenCommand=function(){this.isShown||(this.isShown=!0,this.view.updateIsShown(),this.view.notifyModalWindowShow())},d.prototype.handleContainerClick=function(t,e){this.isShown&&(t&&!e||(this.view.notifyModalWindowHide(),this.isShown=!1,this.view.updateIsShown()))},d);function d(t,e){var n=o.call(this,t)||this;return n.isShown=e.isShown,n}n.ModalWindowPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t,e){this.$modalContainer=t,this.$modalWindow=t.find(".js-modal-window"),this.googleTagManager=e},f.prototype.createPresenter=function(){var t=this.$modalContainer.hasClass("isShown");return new c(this,{isShown:t})},f.prototype.registerEvents=function(){this.$modalContainer.on("dcv:modalwindow:command:open",u.proxy(this.onOpenCommand,this)),this.$modalContainer.on("click",u.proxy(this.onModalContainerClick,this))},f.prototype.onOpenCommand=function(t){this.presenter.handleOpenCommand()},f.prototype.onModalContainerClick=function(t){var e=this.$modalWindow[0].contains(t.target),n=!!u(t.target).closest(".js-modal-window-close-button").length;this.presenter.handleContainerClick(e,n)},f.prototype.updateIsShown=function(){var t=this.presenter.isShown;a.toggleDisplayClass(this.$modalContainer,t)},f.prototype.notifyModalWindowShow=function(){this.$modalWindow.trigger("dcv:modalwindow:show")},f.prototype.notifyModalWindowHide=function(){var t=this.$modalContainer.attr("data-modal-window-hide-event-name");t&&this.googleTagManager.sendEvent(t),this.$modalWindow.trigger("dcv:modalwindow:hide")},f);function f(t,e){return void 0===e&&(e=l.GoogleTagManager.default),h.call(this,t,e)||this}n.ModalWindowView=p},{"../modules/Display":116,"../modules/GoogleTagManager":120,"./base":247,jquery:96}],201:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Display"),l=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.setup=function(){var t=this;setTimeout(function(){t.show()},500)},c.prototype.show=function(){var t=this;this.isShown=!0,this.view.updateDisplay(),setTimeout(function(){t.hide()},7e3)},c.prototype.hide=function(){this.isShown=!1,this.view.updateDisplay()},c);function c(t){var e=o.call(this,t)||this;return e.isShown=!1,e}n.ModelessMessageBoxPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t){this.$messageBox=t,this.$closeButton=t.find(".js-modeless-message-box-close")},p.prototype.createPresenter=function(){return new u(this)},p.prototype.registerEvents=function(){this.$closeButton.on("click",l.proxy(this.onClickCloseButton,this))},p.prototype.onClickCloseButton=function(t){this.presenter.hide()},p.prototype.updateDisplay=function(){var t=this.presenter.isShown;a.toggleDisplayClass(this.$messageBox,t),t||this.$closeButton.blur()},p);function p(t){return d.call(this,t)||this}n.ModelessMessageBoxView=h},{"../modules/Display":116,"./base":247,jquery:96}],202:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("jquery"),l=t("../modules/Display"),u=t("../modules/EventType"),c=(o=s.Presenter,r(d,o),d.prototype.handleMultiplePanelShowEvent=function(){this.view.showPanel()},d.prototype.handleMultiplePanelHideEvent=function(){this.view.hidePanel(),this.currentIndex=0},d.prototype.handleNextButton=function(){this.view.hidePanel(),this.currentIndex=Math.min(this.currentIndex+1,this.maxIndex),this.view.showPanel()},d.prototype.handlePrevButton=function(){this.view.hidePanel(),this.currentIndex=Math.max(this.currentIndex-1,0),this.view.showPanel()},d);function d(t,e){var n=o.call(this,t)||this;return n.maxIndex=e.panelCount-1,n.currentIndex=0,n}n.MultiplePanelPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$multiplePanel=t,this.$panels=t.find(".js-multiple-panel-item"),this.$nextButton=this.$panels.find(".js-multiple-panel-next-button"),this.$prevButton=this.$panels.find(".js-multiple-panel-prev-button")},f.prototype.createPresenter=function(){return new c(this,{panelCount:this.$panels.length})},f.prototype.registerEvents=function(){this.$multiplePanel.on(u.PANEL_SHOW_EVENT,a.proxy(this.onMultiplePanelShow,this)),this.$multiplePanel.on(u.PANEL_HIDE_EVENT,a.proxy(this.onMultiplePanelHide,this)),this.$multiplePanel.on("dcv:modalwindow:show",a.proxy(this.onMultiplePanelShow,this)),this.$multiplePanel.on("dcv:modalwindow:hide",a.proxy(this.onMultiplePanelHide,this)),this.$nextButton.on("click",a.proxy(this.onClickNextButton,this)),this.$prevButton.on("click",a.proxy(this.onClickPrevButton,this))},f.prototype.onMultiplePanelShow=function(t){t.target===t.currentTarget&&this.presenter.handleMultiplePanelShowEvent()},f.prototype.onMultiplePanelHide=function(t){t.target===t.currentTarget&&this.presenter.handleMultiplePanelHideEvent()},f.prototype.onClickNextButton=function(){this.presenter.handleNextButton()},f.prototype.onClickPrevButton=function(){this.presenter.handlePrevButton()},f.prototype.showPanel=function(){var t=this.$panels.eq(this.presenter.currentIndex);l.toggleDisplayClass(t,!0),t.trigger(u.PANEL_SHOW_EVENT)},f.prototype.hidePanel=function(){var t=this.$panels.eq(this.presenter.currentIndex);t.trigger(u.PANEL_HIDE_EVENT),l.toggleDisplayClass(t,!1)},f);function f(t){return h.call(this,t)||this}n.MultiplePanelView=p},{"../modules/Display":116,"../modules/EventType":118,"./base":247,jquery:96}],203:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../../modules/Display"),r=t("jquery"),o=(s.prototype.onContainerClick=function(t){r(t.target).closest(this.panelSelector).length||(this.isPanelShown=!this.isPanelShown,i.toggleDisplayClass(this.$panels,this.isPanelShown))},s);function s(t){this.$container=t;var e=this.$container.attr("data-panel-class");this.panelSelector="."+e,this.$panels=t.find(this.panelSelector),this.isPanelShown=!1,this.$container.on("click",r.proxy(this.onContainerClick,this))}n.RewardBarPopupView=o},{"../../modules/Display":116,jquery:96}],204:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./../base"),a=t("./../../modules/Locale"),l=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.setup=function(){0!=this.maxWithdrawableReward-this.minWithdrawalbeReward&&this.view.updateForm()},c.prototype.inputRewardNumber=function(t){this.rewardAmount=t,this.view.updateForm()},Object.defineProperty(c.prototype,"isValidRewardAmount",{get:function(){return this.minWithdrawalbeReward<=this.rewardAmount&&this.rewardAmount<=this.maxWithdrawableReward},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"fee",{get:function(){for(var t=0,e=0,n=this.feeRangeDefinitions;e<n.length;e++){var i=n[e];i.min<=this.rewardAmount&&this.rewardAmount<=i.max&&(t=i.fee)}return t},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"remittance",{get:function(){if(!this.isValidRewardAmount)return 0;var t=this.fee;return this.rewardAmount-t},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"sliderPercentage",{get:function(){if(!this.isValidRewardAmount)return 0;var t=this.maxWithdrawableReward-this.minWithdrawalbeReward;return 0==t?100:this.floatToInt((this.rewardAmount-this.minWithdrawalbeReward)/t*100)},enumerable:!0,configurable:!0}),c.prototype.floatToInt=function(t){return Math.round(t)},c);function c(t,e){var n=o.call(this,t)||this;return n.minWithdrawalbeReward=e.minWithdrawableReward,n.maxWithdrawableReward=e.maxWithdrawableReward,n.feeRangeDefinitions=e.feeRangeDefinitions,n.rewardAmount=e.maxWithdrawableReward,n}n.RewardWithdrawSliderPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t){this.$rewardSliderContainer=t,this.$rewardNumberInput=t.find(".js-reward-number-input"),this.$rewardSliderInput=t.find(".js-reward-slider-input"),this.$rewardSliderBar=t.find(".js-reward-slider-bar"),this.$displayRemittance=t.find(".js-display-remittance"),this.$displayFee=t.find(".js-display-fee"),this.$submitButton=t.find(".js-reward-slider-submit")},p.prototype.createPresenter=function(){var t=JSON.parse(this.$rewardSliderContainer.attr("data-fee-range-definitions")),e=+this.$rewardSliderContainer.attr("data-min-withdrawable-reward"),n=+this.$rewardSliderContainer.attr("data-max-withdrawable-reward");return new u(this,{feeRangeDefinitions:t,minWithdrawableReward:e,maxWithdrawableReward:n})},p.prototype.registerEvents=function(){this.$rewardNumberInput.on("input",l.proxy(this.onRewardAmountInput,this)),this.$rewardSliderInput.on("input",l.proxy(this.onRewardAmountInput,this)),this.$rewardSliderInput.on("change",l.proxy(this.onRewardAmountInput,this))},p.prototype.onRewardAmountInput=function(t){var e=+l(t.target).val();this.presenter.inputRewardNumber(e)},p.prototype.updateForm=function(){var t=this.presenter.rewardAmount;+this.$rewardNumberInput.val()!==t&&this.$rewardNumberInput.val(t),+this.$rewardSliderInput.val()!==t&&this.$rewardSliderInput.val(t),this.$rewardSliderBar.css("width",this.toPercentageStr(this.presenter.sliderPercentage)),this.$displayRemittance.text(a.formatNumber(this.presenter.remittance)),this.$displayFee.text(a.formatNumber(this.presenter.fee)),this.$submitButton.prop("disabled",!this.presenter.isValidRewardAmount)},p.prototype.toPercentageStr=function(t){return t.toString(10)+"%"},p);function p(t){return d.call(this,t)||this}n.RewardWithdrawSliderView=h},{"./../../modules/Locale":121,"./../base":247,jquery:96}],205:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../../modules/GoogleTagManager"),a=t("../base"),l=t("../../model/Notification/TimelineSummary"),u=t("../../modules/Net"),c=t("../../view_presenter/PopupPanelButton"),d=t("../../modules/EventType"),h=t("../../modules/Display"),p=t("jquery"),f=(o=a.Presenter,r(g,o),g.prototype.setup=function(){var t=this;this.timelineSummary.on("unreadcountupdate",function(){t.view.updateButton()}),this.view.updateButton()},Object.defineProperty(g.prototype,"unreadCount",{get:function(){return this.timelineSummary.unreadCount},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"hasUnreadNotices",{get:function(){return this.timelineSummary.hasUnreadNotices},enumerable:!0,configurable:!0}),g.prototype.loadOnce=function(){var e=this;this.hasBeenLoaded||(this.hasBeenLoaded=!0,u.ajax("/notifications/notices_panel").done(function(t){e.view.renderPanelContent(t),e.timelineSummary.markAsRead()}).fail(function(){e.hasBeenLoaded=!1}))},g);function g(t,e){var n=o.call(this,t)||this;return n.timelineSummary=l.default.getInstance(),n.timelineSummary.fetchOnce(),n.hasBeenLoaded=!1,n}n.NoticesPanelButtonPresenter=f;var m,y=(m=a.View,r(v,m),v.prototype.initMembers=function(t,e){this.$button=t,this.$normalIcon=t.find(".js-notification-notices-button-normal-icon"),this.$unreadIcon=t.find(".js-notification-notices-button-unread-icon");var n=p("#"+t.attr("aria-controls"));this.$panel=n,this.$mainContent=n.find(".js-notification-notices-panel-main-content"),this.googleTagManager=e},v.prototype.createPresenter=function(){return new f(this,{})},v.prototype.registerEvents=function(){this.$panel.on(d.PANEL_SHOW_EVENT,p.proxy(this.onPanelShow,this))},v.prototype.onPanelShow=function(t){t.target===t.currentTarget&&(this.googleTagManager.sendEvent("ShowNoticesPanel",{unreadCount:this.presenter.unreadCount}),this.presenter.loadOnce())},v.prototype.initSubViews=function(){this.popupPanelButtonView=new c.PopupPanelButtonView(this.$button)},v.prototype.updateButton=function(){var t=this.presenter.hasUnreadNotices;h.toggleDisplayClass(this.$normalIcon,!t),h.toggleDisplayClass(this.$unreadIcon,t)},v.prototype.renderPanelContent=function(t){this.$mainContent.html(t)},v);function v(t,e){return void 0===e&&(e=s.GoogleTagManager.default),m.call(this,t,e)||this}n.NoticesPanelButtonView=y},{"../../model/Notification/TimelineSummary":111,"../../modules/Display":116,"../../modules/EventType":118,"../../modules/GoogleTagManager":120,"../../modules/Net":122,"../../view_presenter/PopupPanelButton":213,"../base":247,jquery:96}],206:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=(o.prototype.addFocusedClass=function(t){t.closest(".js-onetime-focus-reaction-container").addClass("isFocused")},o);function o(t){var e=this;document.activeElement===t[0]?this.addFocusedClass(t):t.one("focus",function(t){e.addFocusedClass(i(t.target))})}n.OnetimeFocusReactionView=r},{jquery:96}],207:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=(o.prototype.onSubmit=function(t){i(t.currentTarget).find('button[type="submit"]').prop("disabled",!0)},o);function o(){i(document).on("submit",".js-onetime-form",i.proxy(this.onSubmit,this))}n.OnetimeFormView=r},{jquery:96}],208:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=(o.prototype.onOpenButtonClick=function(t){this.$modalContainer.trigger("dcv:modalwindow:command:open")},o);function o(t){this.$openButton=t,this.$modalContainer=i("#"+t.attr("aria-controls")),this.$openButton.on("click",i.proxy(this.onOpenButtonClick,this))}n.OpenModalWindowButtonView=r},{jquery:96}],209:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("jquery"),i=(o.prototype.initMembers=function(t,e,n){this.$overallCheckbox=t,this.$elementContainer=e,this.checkboxElementsSelector=n},o.prototype.registerEvents=function(){this.$overallCheckbox.on("change",r.proxy(this.onOverallCheckboxChange,this)),this.$elementContainer.on("change",this.checkboxElementsSelector,r.proxy(this.onCheckboxElementsChange,this)),this.observer=new MutationObserver(r.proxy(this.onCheckboxElementsUpdate,this)),this.observer.observe(this.$elementContainer.get(0),{childList:!0,subtree:!0})},o.prototype.onOverallCheckboxChange=function(){this.$elementContainer.find(this.checkboxElementsSelector).prop("checked",this.$overallCheckbox.prop("checked")),this.updateOverallCheckboxState(),this.updateTargetState(),this.notifyChanged()},o.prototype.onCheckboxElementsChange=function(){this.updateOverallCheckboxState(),this.updateTargetState(),this.notifyChanged()},o.prototype.hasCheckboxNode=function(t){return 0<r(t).find(this.checkboxElementsSelector).length||0<r(t).filter(this.checkboxElementsSelector).length},o.prototype.hasCheckboxRecord=function(t){return this.hasCheckboxNode(t.addedNodes)||this.hasCheckboxNode(t.removedNodes)},o.prototype.hasCheckbox=function(t){var e=this;return t.some(function(t){return e.hasCheckboxRecord(t)})},o.prototype.onCheckboxElementsUpdate=function(t,e){this.hasCheckbox(t)&&(this.updateOverallCheckboxState(),this.updateTargetState(),this.notifyChanged())},o.prototype.updateOverallCheckboxState=function(){var t=this.$checkboxes,e=this.$checkedCheckboxes,n=!1,i=!1;e.length===t.length?i=!0:0<e.length&&(n=!0),this.$overallCheckbox.prop("indeterminate",n),0<t.length&&this.$overallCheckbox.prop("checked",i)},o.prototype.updateTargetState=function(){this.$checkboxes.each(function(t,e){var n=r(e),i=n.attr("data-target");i&&r("#"+i).toggleClass("isSelected",!!n.prop("checked"))})},o.prototype.clearAllChecked=function(){this.someChecked&&(this.$checkboxes.prop("checked",!1),this.updateOverallCheckboxState(),this.updateTargetState(),this.notifyChanged())},o.prototype.notifyChanged=function(){this.$overallCheckbox.trigger(o.CHANGED_EVENT_TYPE,this.state)},Object.defineProperty(o.prototype,"allChecked",{get:function(){return!!this.$overallCheckbox.prop("checked")},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"indeterminate",{get:function(){return!!this.$overallCheckbox.prop("indeterminate")},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"someChecked",{get:function(){return this.allChecked||this.indeterminate},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"$checkboxes",{get:function(){return this.$elementContainer.find(this.checkboxElementsSelector)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"$checkedCheckboxes",{get:function(){return this.$checkboxes.filter(":checked")},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"state",{get:function(){return{$overallCheckbox:this.$overallCheckbox,allChecked:this.allChecked,someChecked:this.someChecked,indeterminate:this.indeterminate,$checkboxes:this.$checkboxes,$checkedCheckboxes:this.$checkedCheckboxes}},enumerable:!0,configurable:!0}),o.CHANGED_EVENT_TYPE="dcv:overall_checkbox:changed",o);function o(t,e,n,i){void 0===i&&(i=!1),this.initMembers(t,e,n),this.registerEvents(),this.updateOverallCheckboxState()}n.OverallCheckboxView=i},{jquery:96}],210:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Util/UpdateLocation"),r=t("jquery"),o=(s.prototype.onChange=function(t){i.updateLocation(r(t.target).val())},s);function s(t){this.$pageSelector=t,this.$pageSelector.on("change",r.proxy(this.onChange,this))}n.PageSelectorView=o},{"../modules/Util/UpdateLocation":128,jquery:96}],211:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/storage-accessor"),l=t("../modules/Display"),u=t("../modules/EventType"),c=t("jquery"),d=(o=s.Presenter,r(h,o),h.prototype.setup=function(){this.view.updatePanel(),this.isShown&&this.view.notifyPanelShow()},h.prototype.hide=function(){if(this.isShown){var t=Date.now()+24*this.hidingDays*60*60*1e3;this.storageAccessor.setItem("hide_until_time",t),this.view.notifyPanelHide(),this.isShown=!1,this.view.updatePanel()}},h);function h(t,e){var n=o.call(this,t)||this;n.storageAccessor=e.storageAccessor,n.hidingDays=e.hidingDays;var i=+n.storageAccessor.getItem("hide_until_time")||0;return i&&i<Date.now()&&n.storageAccessor.removeItem("hide_until_time"),n.isShown=i<Date.now(),n}n.PersistentHideablePanelPresenter=d;var p,f=(p=s.View,r(g,p),g.prototype.initMembers=function(t){this.$panel=t,this.$hideButton=t.find(".js-persistent-hideable-panel-hide-button")},g.prototype.createPresenter=function(){var t=this.$panel.attr("data-storage-segment"),e=a.createLocalStorageAccessor(t);return new d(this,{storageAccessor:e,hidingDays:+this.$panel.attr("data-hiding-days")})},g.prototype.registerEvents=function(){this.$hideButton.on("click",c.proxy(this.onHideButtonClick,this))},g.prototype.onHideButtonClick=function(t){this.presenter.hide()},g.prototype.updatePanel=function(){l.toggleDisplayClass(this.$panel,this.presenter.isShown)},g.prototype.notifyPanelShow=function(){this.$panel.trigger(u.PANEL_SHOW_EVENT)},g.prototype.notifyPanelHide=function(){this.$panel.trigger(u.PANEL_HIDE_EVENT)},g);function g(t){return p.call(this,t)||this}n.PersistentHideablePanelView=f},{"../modules/Display":116,"../modules/EventType":118,"../modules/storage-accessor":131,"./base":247,jquery:96}],212:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/storage-accessor"),l=t("../modules/Display"),u=t("../modules/EventType"),c=t("jquery"),d=(o=s.Presenter,r(h,o),h.prototype.setup=function(){this.update()},h.prototype.toggle=function(){this.isShown=!this.isShown,this.update(),this.saveState()},h.prototype.update=function(){this.isShown||this.view.notifyPanelHide(),this.view.updatePanel(),this.isShown&&this.view.notifyPanelShow()},h.prototype.saveState=function(){this.storageAccessor.setItem("state",{isShown:this.isShown})},h.prototype.loadState=function(){var t=this.storageAccessor.getItem("state");t&&(this.isShown=!!t.isShown)},h);function h(t,e){var n=o.call(this,t)||this;return n.storageAccessor=e.storageAccessor,n.isShown=e.isShownDefault,n.loadState(),n}n.PersistentTogglePanelButtonPresenter=d;var p,f=(p=s.View,r(g,p),g.prototype.initMembers=function(t){var e=t.attr("data-panel-state-target"),n=t.attr("data-loading-target");this.$panelStateElement=e?c("#"+e).add(t):t,this.$loadingElement=n?c("#"+n):c(),this.$button=t,this.$panel=c("#"+t.attr("aria-controls")),this.labelToOpen=t.data("label-to-open")||"このパネルを開く",this.labelToClose=t.data("label-to-close")||"このパネルを閉じる",console.assert(1===this.$panel.length,"aria-controls target is not found. #"+t.attr("aria-controls")),console.assert(!e||2===this.$panelStateElement.length,"data-panel-state-target is not found. #"+e),console.assert(!n||1===this.$loadingElement.length,"data-loading-target is not found. #"+n)},g.prototype.createPresenter=function(){var t=this.$button.attr("data-storage-segment"),e=a.createLocalStorageAccessor(t);return new d(this,{storageAccessor:e,isShownDefault:!!this.$panelStateElement.hasClass("isPanelShown")})},g.prototype.registerEvents=function(){this.$button.on("click",c.proxy(this.onToggleButtonClick,this))},g.prototype.onToggleButtonClick=function(t){this.presenter.toggle()},g.prototype.updatePanel=function(){this.$panelStateElement.toggleClass("isPanelShown",this.presenter.isShown),this.$panelStateElement.toggleClass("isPanelHidden",!this.presenter.isShown),this.$button.attr("aria-label",this.presenter.isShown?this.labelToClose:this.labelToOpen),l.toggleDisplayClass(this.$panel,this.presenter.isShown),this.$loadingElement.remove()},g.prototype.notifyPanelShow=function(){this.$panel.trigger(u.PANEL_SHOW_EVENT)},g.prototype.notifyPanelHide=function(){this.$panel.trigger(u.PANEL_HIDE_EVENT)},g);function g(t){return p.call(this,t)||this}n.PersistentTogglePanelButtonView=f},{"../modules/Display":116,"../modules/EventType":118,"../modules/storage-accessor":131,"./base":247,jquery:96}],213:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/EventType"),l=t("../modules/Display"),u=t("jquery"),c=(o=s.Presenter,r(d,o),d.prototype.toggle=function(){this.isShown=!this.isShown,this.view.updateIsShown()},d.prototype.handleButtonClick=function(){this.isShown||(this.isHandlingButtonClick=!0,this.toggle())},d.prototype.handleClickWhileShown=function(t,e){t&&!e||(this.isHandlingButtonClick?this.isHandlingButtonClick=!1:this.toggle())},d);function d(t,e){var n=o.call(this,t)||this;return n.isShown=!1,n.isHandlingButtonClick=!1,n}n.PopupPanelButtonPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$button=t,this.$panel=u("#"+t.attr("aria-controls")),this.eventNS=[".popuppanelbuttons",Date.now(),Math.random().toString().slice(2)].join("-")},f.prototype.createPresenter=function(){return new c(this,{})},f.prototype.registerEvents=function(){this.$button.on("click",u.proxy(this.onButtonClick,this))},f.prototype.onButtonClick=function(t){this.presenter.handleButtonClick()},f.prototype.onClickWhileShown=function(t){var e=this.$panel[0].contains(t.target),n=!!u(t.target).closest(".js-popup-panel-hide-button").length;this.presenter.handleClickWhileShown(e,n)},f.prototype.updateIsShown=function(){var t=this.presenter.isShown;t||(u(document).off("click"+this.eventNS),this.$panel.trigger(a.PANEL_HIDE_EVENT)),this.$button.toggleClass("isPanelShown",t),this.$button.toggleClass("isPanelHidden",!t),l.toggleDisplayClass(this.$panel,t),t&&(this.$panel.trigger(a.PANEL_SHOW_EVENT),u(document).on("click"+this.eventNS,u.proxy(this.onClickWhileShown,this)))},f);function f(t){return h.call(this,t)||this}n.PopupPanelButtonView=p},{"../modules/Display":116,"../modules/EventType":118,"./base":247,jquery:96}],214:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var s,o=t("./base"),a=t("../modules/Net"),l=t("lodash"),u=t("jquery"),c=(s=o.Presenter,r(d,s),d.prototype.setup=function(){this.loadFeed()},d.prototype.loadFeed=function(){var s=this;a.ajax(this.feedURL).done(function(t){for(var e=[],n=0,i=u(t).find("entry").toArray();n<i.length;n++){var r=i[n];if(e.length>=s.maxCount)break;var o=s.buildFeedListItem(r);o&&e.push(o)}s.feedListItems=e,s.view.updateFeedList()})},d.prototype.buildFeedListItem=function(t){var e=this,n=u(t),i=n.find("category").toArray().map(function(t){return u(t).attr("label")}).filter(function(t){return e.isLabelNameMap[t]})[0];if(!i)return null;var r=n.find('content[type="html"]').text(),o=u(u.parseHTML(r));return{title:n.find("title").text(),author:o.find(".work-author").first().text(),catchphrase:o.find(".work-catchphrase").first().text(),labelName:i,url:n.find("link").attr("href"),imageURL:n.find('link[rel="enclosure"][type^="image/"]').attr("href")}},d);function d(t,e){var n=s.call(this,t)||this;n.feedURL=e.feedURL,n.maxCount=e.maxCount,n.isLabelNameMap={};for(var i=0,r=e.labelNames;i<r.length;i++){var o=r[i];n.isLabelNameMap[o]=!0}return n.feedListItems=[],n}n.PublicationFeedListPresenter=c;var h,p=(h=o.View,r(f,h),f.prototype.initMembers=function(t){this.$container=t,this.$list=t.find(".js-feed-list");var e=t.find(".js-feed-list-template");this.template=l.template(e.html())},f.prototype.createPresenter=function(){var t=this.$container.attr("data-label-names"),e=JSON.parse(t);return new c(this,{feedURL:this.$container.attr("data-feed-url"),maxCount:+this.$container.attr("data-max-count"),labelNames:e})},f.prototype.updateFeedList=function(){var e=this,t=this.presenter.feedListItems.map(function(t){return e.template(t)}).join("");this.$list.html(t),this.$container.find(".js-feed-list-loading").remove()},f);function f(t){return h.call(this,t)||this}n.PublicationFeedListView=p},{"../modules/Net":122,"./base":247,jquery:96,lodash:102}],215:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=t("../modules/Display"),o=(s.prototype.onClick=function(t){this.$readMoreButton.blur(),this.$container.addClass("isExpanded"),r.toggleDisplayClass(this.$readMoreButton,!1)},s);function s(t){this.$container=t,this.$readMoreButton=this.$container.find(".js-read-more-button"),this.$readMoreButton.on("click",i.proxy(this.onClick,this))}n.ReadMoreButtonView=o},{"../modules/Display":116,jquery:96}],216:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("chart.js"),o=t("patternomaly"),i=(s.prototype.getNeededBackgroundColors=function(t){return this.CHART_BACKGROUND_COLORS.slice(0,t)},s);function s(t){var i=this;this.CHART_BACKGROUND_COLORS=["rgba(66, 170, 227, 1)","rgba(85, 85, 85, 1)","rgba(204, 204, 204, 1)",o.draw("diagonal","rgba(229, 229, 229, 1)","rgba(170, 170, 170, 1)",7)],[t.querySelector(".js-reading-genre-chart"),t.querySelector(".js-reading-author-chart")].forEach(function(t){var e=JSON.parse(t.dataset.chartData),n=i.getNeededBackgroundColors(e.labels.length);new r.Chart(t,{type:"doughnut",data:{labels:e.labels,datasets:[{data:e.data,backgroundColor:n,hoverBackgroundColor:["rgba(9, 144, 204, 1)","rgba(51, 51, 51, 1)","rgba(170, 170, 170, 1)"],hoverBorderColor:"rgba(255, 255, 255, 1)"}]},options:{maintainAspectRatio:!1,responsive:!0,animation:{animateRotate:!1},layout:{padding:{left:0,right:25,top:0,bottom:0}},legend:{display:!1,onClick:function(){}},tooltips:{cornerRadius:0,bodyFontFamily:"dcsymbols, 'Helvetica Neue', Helvetica, Arial, 'ヒラギノ角ゴ Pr6N', 'Hiragino Kaku Gothic Pr6N', 'ヒラギノ角ゴ ProN', 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ StdN', 'Hiragino Kaku Gothic StdN', 'Segoe UI', Verdana, 'メイリオ', 'Meiryo', sans-serif",bodyFontSize:10,backgroundColor:"rgba( 0, 0, 0)",borderWidth:0,callbacks:{label:function(t,e){return" "+e.datasets[0].data[t.index].toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")}}},hover:{animationDuration:0},responsiveAnimationDuration:0}})})}n.ReadingRecordChartView=i},{"chart.js":94,patternomaly:99}],217:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("jquery"),l=t("../model/MyFollowingWorks"),u=t("../model/WorkFollowingLabelTypes"),c=(o=s.Presenter,r(d,o),d.prototype.handleSubmitButton=function(t){var n=this;this.isLoading=!0,this.view.updateViewStatus(),this.myFollowingWorks.removeLabels(t,[this.labelId]).done(function(){n.workFollowingLabelTypes.subtractWorkCount(n.labelId,t.length)}).fail(function(t){var e=t&&t.error&&t.error.message||"ラベルをはずせませんでした。";n.setError(new Error(e))}).always(function(){n.isLoading=!1,n.view.updateViewStatus()})},Object.defineProperty(d.prototype,"shouldEnableView",{get:function(){return!this.isLoading},enumerable:!0,configurable:!0}),d);function d(t,e){var n=o.call(this,t)||this;return n.labelId=e.workFollowingLabelTypeId,n.myFollowingWorks=l.MyFollowingWorks.getInstance(),n.workFollowingLabelTypes=u.WorkFollowingLabelTypes.getInstance(),n}n.RemoveWorkFollowingLabelTypeButtonPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t,e){this.$removeButton=t,this.$workList=e},f.prototype.createPresenter=function(){return new c(this,{workFollowingLabelTypeId:this.$removeButton.attr("data-work-following-label-type-id")})},f.prototype.registerEvents=function(){this.$removeButton.on("click",a.proxy(this.onClickSubmitButton,this))},f.prototype.onClickSubmitButton=function(){var t=this.$workCheckboxes.filter("input:checked").get().map(function(t){return t.getAttribute("data-antenna-work-id")});this.presenter.handleSubmitButton(t)},f.prototype.updateViewStatus=function(){this.$removeButton.prop("disabled",!this.presenter.shouldEnableView)},f.prototype.updateError=function(){var t=this.presenter.lastError;t&&window.alert(t.message)},Object.defineProperty(f.prototype,"$workCheckboxes",{get:function(){return this.$workList.find(".js-antenna-work-list-item-checkbox")},enumerable:!0,configurable:!0}),f);function f(t,e){return h.call(this,t,e)||this}n.RemoveWorkFollowingLabelTypeButtonView=p},{"../model/MyFollowingWorks":110,"../model/WorkFollowingLabelTypes":113,"./base":247,jquery:96}],218:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Util/String"),l=t("../modules/Locale"),u=t("jquery"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){this.view.updatePoint(),this.view.updateTitleArea(),this.view.updateSubmitButton()},Object.defineProperty(d.prototype,"maxReviewPoint",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"pointLabel",{get:function(){return this.point?this.pointLabels[this.point-1]:""},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isTitleExceeded",{get:function(){return this.titleLength>this.maxTitleLength},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"remainingTitleLength",{get:function(){return this.maxTitleLength-this.titleLength},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isBlankTitle",{get:function(){return""===this.title.replace(/\s/g,"")},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"canSubmit",{get:function(){return 0!==this.point&&0<this.titleLength&&!this.isBlankTitle&&!this.isTitleExceeded},enumerable:!0,configurable:!0}),d.prototype.handleClickGiveButton=function(){this.addPoint(),this.view.updatePoint(),this.view.updateSubmitButton()},d.prototype.addPoint=function(){this.point=this.point===this.maxReviewPoint?1:this.point+1},d.prototype.handleTitleInput=function(t){this.titleLength=a.stringLength(t),this.title=t,this.view.updateTitleArea(),this.view.updateSubmitButton()},d);function d(t,e){var n=o.call(this,t)||this;return n.point=e.point,n.pointLabels=e.pointLabels,n.titleLength=a.stringLength(e.title),n.maxTitleLength=e.maxTitleLength,n.title=e.title,n}n.ReviewFormPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$reviewForm=t,this.$giveButton=this.$reviewForm.find(".js-give-button"),this.$pointIcons=this.$reviewForm.find(".js-icon"),this.onClass=this.$reviewForm.attr("data-on-class"),this.offClass=this.$reviewForm.attr("data-off-class"),this.activeClass=this.$reviewForm.attr("data-active-class"),this.$pointLabel=this.$reviewForm.find(".js-point-label"),this.$pointInput=this.$reviewForm.find("input[name='point']").eq(0),this.$titleField=this.$reviewForm.find("input[name='title']"),this.$titleCounter=this.$reviewForm.find(".js-title-counter"),this.$submitButton=this.$reviewForm.find(".js-submit-button")},f.prototype.registerEvents=function(){this.$giveButton.on("click",u.proxy(this.onClickGiveButton,this)),this.$titleField.on("input",u.proxy(this.onTitleInput,this))},f.prototype.createPresenter=function(){var t=+this.$reviewForm.attr("data-point"),e=this.$pointIcons.get().map(function(t){return u(t).attr("data-point-label")}),n=this.$titleField.val(),i=+this.$titleField.attr("data-max-length");return new c(this,{point:t,pointLabels:e,title:n,maxTitleLength:i})},f.prototype.onClickGiveButton=function(t){this.presenter.handleClickGiveButton()},f.prototype.onTitleInput=function(t){this.presenter.handleTitleInput(this.$titleField.val())},f.prototype.updatePoint=function(){var o=this;this.$pointIcons.each(function(t,e){var n=u(e),i=t<o.presenter.point;n.toggleClass(o.onClass,i),n.toggleClass(o.offClass,!i);var r=t===o.presenter.point-1;n.toggleClass(o.activeClass,r)}),this.$pointLabel.text(this.presenter.pointLabel),this.$pointInput.val(""+this.presenter.point)},f.prototype.updateTitleArea=function(){var t=this.presenter.isTitleExceeded;this.$titleField.toggleClass("isInvalid",t),this.$titleCounter.toggleClass("isInvalid",t),this.$titleCounter.text(l.formatNumber(this.presenter.remainingTitleLength))},f.prototype.updateSubmitButton=function(){this.$submitButton.prop("disabled",!this.presenter.canSubmit)},f);function f(t){return h.call(this,t)||this}n.ReviewFormView=p},{"../modules/Locale":121,"../modules/Util/String":127,"./base":247,jquery:96}],219:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Net"),l=t("../modules/Locale"),u=t("../modules/Display"),c=t("jquery"),d=t("lodash"),h=(o=s.Presenter,r(p,o),p.prototype.setup=function(){this.view.updatePoint()},Object.defineProperty(p.prototype,"maxReviewPoint",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"totalReviewPoint",{get:function(){return this.myPoint+this.othersPoint},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"reviewCount",{get:function(){return 0===this.myPoint?this.othersReviewCount:this.othersReviewCount+1},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"pointLabel",{get:function(){return this.myPoint?this.pointLabels[this.myPoint-1]:""},enumerable:!0,configurable:!0}),p.prototype.handleClickGiveButton=function(){0===this.myPoint&&(this.view.showMyReview(l.formatDateTime(new Date)),this.view.animateEditingLink()),this.addPoint(),this.view.updatePoint(),this.debouncedSubmit()},p.prototype.addPoint=function(){this.myPoint=this.myPoint===this.maxReviewPoint?1:this.myPoint+1},p.prototype.submit=function(){var i=this;this.setError(null),a.ajax({url:this.actionURL,data:this.buildPostDate(),method:"POST"}).done(function(t,e,n){i.lastPoint=i.myPoint}).fail(function(t,e,n){i.setError(new Error("レビュー投稿できませんでした。")),i.myPoint=i.lastPoint,i.view.updatePoint()})},p.prototype.buildPostDate=function(){return{point:this.myPoint,csrf_token:this.csrfToken}},p);function p(t,e){var n=o.call(this,t)||this;return n.myPoint=e.myPoint,n.othersPoint=e.totalReviewPoint-n.myPoint,n.othersReviewCount=0===n.myPoint?e.reviewCount:e.reviewCount-1,n.lastPoint=n.myPoint,n.pointLabels=e.pointLabels,n.actionURL=e.actionURL,n.csrfToken=e.csrfToken,n.debouncedSubmit=d.debounce(n.submit,1e3,{leading:!0}),n}n.ReviewPointChangerPresenter=h;var f,g=(f=s.View,r(m,f),m.prototype.initMembers=function(t,e){this.$reviewPointContainer=t,this.$giveButton=this.$reviewPointContainer.find(".js-give-button"),this.$pointIcons=this.$reviewPointContainer.find(".js-icon"),this.$pointLabel=this.$reviewPointContainer.find(".js-point-label"),this.$myReview=this.$reviewPointContainer.find(".js-my-review"),this.$reviewEditingLink=this.$reviewPointContainer.find(".js-review-editing-link"),this.onClass=this.$reviewPointContainer.attr("data-on-class"),this.offClass=this.$reviewPointContainer.attr("data-off-class"),this.activeClass=this.$reviewPointContainer.attr("data-active-class"),this.$totalReviewPointElements=e.$totalReviewPointElements,this.$reviewCountElements=e.$reviewCountElements},m.prototype.registerEvents=function(){this.$giveButton.on("click",c.proxy(this.onClickGiveButton,this))},m.prototype.createPresenter=function(){var t=+this.$reviewPointContainer.attr("data-my-point"),e=this.$reviewPointContainer.attr("data-action-url"),n=this.$reviewPointContainer.attr("data-csrf-token"),i=+this.$reviewPointContainer.attr("data-total-review-point"),r=+this.$reviewPointContainer.attr("data-review-count"),o=this.$pointIcons.get().map(function(t){return c(t).attr("data-point-label")});return new h(this,{myPoint:t,actionURL:e,csrfToken:n,totalReviewPoint:i,reviewCount:r,pointLabels:o})},m.prototype.onClickGiveButton=function(t){this.presenter.handleClickGiveButton()},m.prototype.updatePoint=function(){var o=this;this.$pointIcons.each(function(t,e){var n=c(e),i=t<o.presenter.myPoint;n.toggleClass(o.onClass,i),n.toggleClass(o.offClass,!i);var r=t===o.presenter.myPoint-1;n.toggleClass(o.activeClass,r)}),this.$pointLabel.text(this.presenter.pointLabel),this.$totalReviewPointElements.text(l.formatNumber(this.presenter.totalReviewPoint)),this.$reviewCountElements.text(l.formatNumber(this.presenter.reviewCount))},m.prototype.showMyReview=function(t){u.toggleDisplayClass(this.$myReview,!0),this.$reviewPointContainer.addClass("isReviewed"),this.$myReview.find(".js-datetime-label").text(t)},m.prototype.animateEditingLink=function(){this.$reviewEditingLink.addClass(this.activeClass)},m);function m(t,e){return f.call(this,t,e)||this}n.ReviewPointChangerView=g},{"../modules/Display":116,"../modules/Locale":121,"../modules/Net":122,"./base":247,jquery:96,lodash:102}],220:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/TemplateElement"),l=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.setup=function(){this.pathSegment!==this.defaultPathSegment&&this.handleContestChange(this.pathSegment)},Object.defineProperty(c.prototype,"isCategoryListShown",{get:function(){return!!this.categoriesMap[this.pathSegment]},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"categoryItems",{get:function(){var t=this.categoriesMap[this.pathSegment];if(!t)return[];for(var e=[{fieldId:this.allItemFieldId,fieldValue:this.allItemFieldValue,isChecked:!0,label:this.allItemLabel}],n=0,i=t;n<i.length;n++){var r=i[n];e.push({fieldId:this.fieldIdPrefix+r.number,fieldValue:""+r.number,isChecked:!1,label:r.name})}return e},enumerable:!0,configurable:!0}),c.prototype.handleContestChange=function(t){this.pathSegment=t,this.view.updateCategoryList()},c);function c(t,e){var n=o.call(this,t)||this;return n.pathSegment=e.pathSegment,n.defaultPathSegment=e.defaultPathSegment,n.categoriesMap=e.categoriesMap,n.fieldIdPrefix=e.allItemFieldId.replace(/-all$/,"-"),n.allItemFieldId=e.allItemFieldId,n.allItemFieldValue=e.allItemFieldValue,n.allItemLabel=e.allItemLabel,n}n.SearchContestFilterPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t){this.$container=t,this.$contestField=t.find('select[name="contest_path_segment"]');var e=t.find(".js-search-category-list-template"),n=a.cloneTemplateChildren(e),i=n.children().detach();e.children().detach();var r=t.find(".js-search-category-list");this.$categoryListTemplate=e,this.$categoryList=r.length?r:n,this.$categoryItemBase=i},p.prototype.createPresenter=function(){var o="",s={};this.$contestField.children().each(function(t,e){var n=l(e),i=n.val();n.prop("defaultSelected")&&(o=i);var r=n.attr("data-categories");r&&(s[i]=JSON.parse(r))});var t=this.$categoryItemBase.find('input[name="contest_category_number"]'),e=this.$categoryItemBase.find(".js-search-category-item-label");return new u(this,{pathSegment:this.$contestField.val(),defaultPathSegment:o,categoriesMap:s,allItemFieldId:t.attr("id"),allItemFieldValue:t.attr("value"),allItemLabel:e.text()})},p.prototype.registerEvents=function(){this.$contestField.on("change",l.proxy(this.onContestChange,this))},p.prototype.onContestChange=function(t){var e=l(t.target).val();this.presenter.handleContestChange(e)},p.prototype.updateCategoryList=function(){var t=this.$categoryList;t.empty();for(var e=0,n=this.presenter.categoryItems;e<n.length;e++){var i=n[e],r=this.$categoryItemBase.clone(),o=r.find('input[name="contest_category_number"]');o.attr("id",i.fieldId),o.attr("value",i.fieldValue),o.prop("defaultChecked",i.isChecked),o.prop("checked",i.isChecked);var s=r.find(".js-search-category-item-label");s.attr("for",i.fieldId),s.text(i.label),t.append(r)}this.presenter.isCategoryListShown?this.$categoryListTemplate.after(t):t.detach()},p);function p(t){return d.call(this,t)||this}n.SearchContestFilterView=h},{"../modules/TemplateElement":125,"./base":247,jquery:96}],221:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=t("./ContentLoadView"),o=t("./SearchingConditionHistoryList"),s=(a.prototype.focusIn=function(){this.loader?this.openHistoriesPanel():this.loadHistoriesPanel()},a.prototype.loadHistoriesPanel=function(){var t=this,e=this.$container.find(".js-global-header-searching-condition-history-panel");e.length?(this.loader=new r.ContentLoadView(e[0]),this.loader.on(r.ContentLoadView.LOADED_EVENT_TYPE,function(){t.historiesPanel=new o.SearchingConditionHistoryListView(e),t.historiesPanel.on(o.SearchingConditionHistoryListView.DELETED_EVENT_TYPE,i.proxy(t.onPanelChange,t)),t.openHistoriesPanel(),t.onPanelChange()})):this.onPanelChange()},a.prototype.openHistoriesPanel=function(){this.historiesPanel&&!this.historiesPanel.isHistoryEmpty&&this.historiesPanel.show()},a.prototype.closeHistoriesPanel=function(){this.historiesPanel&&this.historiesPanel.hide()},a.prototype.onPanelChange=function(){this.historiesPanel&&!this.historiesPanel.isHistoryEmpty||(this.$container.find("input").attr("autocomplete","on"),this.closeHistoriesPanel())},a.prototype.onFocusChange=function(t){this.historiesPanel&&(this.$container[0].contains(t.target)||this.closeHistoriesPanel())},a);function a(t){this.$container=t,this.loader=null,this.historiesPanel=null,this.$container.on("focusin",i.proxy(this.focusIn,this)),i("body").on("click",i.proxy(this.onFocusChange,this)),i("body").on("focusin",i.proxy(this.onFocusChange,this))}n.SearchFormView=s},{"./ContentLoadView":148,"./SearchingConditionHistoryList":222,jquery:96}],222:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Net"),r=t("jquery"),o=t("../modules/Emittable"),s=(a.prototype.deleteSearchingCondition=function(t){var e=this;i.ajax({method:"POST",url:"/my/searching_conditions/delete",data:[{name:"searching_condition_id",value:t}]}).done(function(){e.removeHistoryElement(t)}).fail(function(){e.updateError()})},a.prototype.onClickDeleteButton=function(t){var e=r(t.currentTarget).attr("data-searching-condition-id");this.deleteSearchingCondition(e)},a.prototype.updateError=function(){window.alert("検索履歴の削除に失敗しました。")},a.prototype.removeHistoryElement=function(t){this.$container.find('.js-delete-searching-condition-history-button[data-searching-condition-id="'+t+'"]').closest(".js-searching-condition-history").remove(),this.emit(a.DELETED_EVENT_TYPE,t)},a.prototype.show=function(){this.$container.toggleClass("isPanelShown",!0),this.$container.toggleClass("isPanelHidden",!1)},a.prototype.hide=function(){this.$container.toggleClass("isPanelShown",!1),this.$container.toggleClass("isPanelHidden",!0)},Object.defineProperty(a.prototype,"historyCount",{get:function(){return this.$container.find(".js-delete-searching-condition-history-button").length},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isHistoryEmpty",{get:function(){return this.historyCount<=0},enumerable:!0,configurable:!0}),a.DELETED_EVENT_TYPE="deleted",a);function a(t){this.on=o.default.on,this.off=o.default.off,this.emit=o.default.emit,this.$container=t,this.$container.on("click",".js-delete-searching-condition-history-button",r.proxy(this.onClickDeleteButton,this))}n.SearchingConditionHistoryListView=s},{"../modules/Emittable":117,"../modules/Net":122,jquery:96}],223:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("jquery"),i=(o.prototype.onClick=function(t){var e=r(t.currentTarget),n=e.attr("href"),i=e.attr("data-window-features")||"";window.open(n,"share",i),t.preventDefault()},o);function o(t){this.$shareButtons=t,this.$shareButtons.on("click",r.proxy(this.onClick,this))}n.ShareButtonWindowView=i},{jquery:96}],224:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/EventType"),l=t("../modules/Display"),u=t("jquery"),c=(o=s.Presenter,r(d,o),d.prototype.setup=function(){this.view.updateButtonAndPanel(),this.view.notifyPanelShow()},d.prototype.selectPanel=function(t){t!==this.panelId&&(this.view.notifyPanelHide(),this.panelId=t,this.view.updateButtonAndPanel(),this.view.notifyPanelShow())},d);function d(t,e){var n=o.call(this,t)||this;return n.panelId=e.panelId,n}n.TabButtonsPresenter=c;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t){this.$buttons=t,this.$currentButton=t.filter(".isActive").first();var e=this.$currentButton.attr("aria-controls");this.$currentPanel=u("#"+e)},f.prototype.createPresenter=function(){var t=location.hash.match(/^#([\w-]+)$/),e=t&&this.$buttons.filter('[aria-controls="'+t[1]+'"]').length?t[1]:this.$currentPanel.prop("id");return new c(this,{panelId:e})},f.prototype.registerEvents=function(){this.$buttons.on("click",u.proxy(this.onButtonClick,this)),this.$buttons.on("mouseup",u.proxy(this.onButtonMouseUp,this))},f.prototype.onButtonClick=function(t){var e=u(t.currentTarget);this.presenter.selectPanel(e.attr("aria-controls"))},f.prototype.onButtonMouseUp=function(t){t.currentTarget.blur()},f.prototype.updateButtonAndPanel=function(){var t=this.presenter.panelId;if(this.$currentPanel.prop("id")!==t){var e=this.$buttons.filter('[aria-controls="'+t+'"]');this.$currentButton.parent().addBack().removeClass("isActive"),e.parent().addBack().addClass("isActive");var n=u("#"+t);l.toggleDisplayClass(this.$currentPanel,!1),l.toggleDisplayClass(n,!0),this.$currentButton=e,this.$currentPanel=n}},f.prototype.notifyPanelShow=function(){this.$currentPanel.trigger(a.PANEL_SHOW_EVENT)},f.prototype.notifyPanelHide=function(){this.$currentPanel.trigger(a.PANEL_HIDE_EVENT)},f);function f(t){return h.call(this,t)||this}n.TabButtonsView=p},{"../modules/Display":116,"../modules/EventType":118,"./base":247,jquery:96}],225:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function i(t){this.contentLoadView=new o.ContentLoadView(t),this.contentLoadView.on(o.ContentLoadView.LOADED_EVENT_TYPE,function(){r("#js-search-result-tags-summary").appendTo(r("#js-search-result-tags-link").empty()),r("#js-search-result-users-summary").appendTo(r("#js-search-result-users-link").empty())})}var r=t("jquery"),o=t("./ContentLoadView");n.TagsAndUsersLazySearchView=i},{"./ContentLoadView":148,jquery:96}],226:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/EventType"),r=t("../modules/Display"),o=t("jquery"),s=(a.prototype.initMembers=function(t){this.$button=t,this.$panel=o("#"+t.attr("aria-controls"))},a.prototype.registerEvents=function(){this.$button.on("click",o.proxy(this.onButtonClick,this))},a.prototype.onButtonClick=function(t){var e=this.$button.hasClass("isPanelShown");this.updateIsShown(!e)},a.prototype.updateIsShown=function(t){t||this.$panel.trigger(i.PANEL_HIDE_EVENT),this.$button.toggleClass("isPanelShown",t),this.$button.toggleClass("isPanelHidden",!t),r.toggleDisplayClass(this.$panel,t),t&&this.$panel.trigger(i.PANEL_SHOW_EVENT)},a);function a(t){this.initMembers(t),this.registerEvents()}n.TogglePanelButtonView=s},{"../modules/Display":116,"../modules/EventType":118,jquery:96}],227:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=(o.prototype.onRadioButtonSelect=function(){var t=this.targetRadioButton.checked;this.updateIsShown(t)},o.prototype.updateIsShown=function(t){i(this.targetPanel).toggleClass("isPanelShown",t),i(this.targetPanel).toggleClass("isPanelHidden",!t)},o);function o(t){var e=this;this.container=t,this.targetRadioButton=t.querySelector(".js-custom-range-input-radiobutton"),this.targetPanel=t.querySelector(".js-custom-range-input-panel"),t.querySelectorAll("li input[type=radio]").forEach(function(t){t.addEventListener("change",e.onRadioButtonSelect.bind(e))}),this.onRadioButtonSelect()}n.ToggleSearchCustomRangeInputPanelView=r},{jquery:96}],228:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Display"),r=t("../modules/UserAgent"),o=(s.prototype.isShown=function(t,e){return"android"===t&&r.isAndroid(e)||"ios"===t&&r.isIOS(e)},s);function s(t){i.toggleDisplayClass(t,this.isShown(t.attr("data-os"),window.navigator.userAgent))}n.TouchAppLinkButtonView=o},{"../modules/Display":116,"../modules/UserAgent":126}],229:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=t("./PopupPanelButton"),o=t("../modules/EventType"),s=(a.prototype.onPanelShow=function(t){t.target===t.currentTarget&&this.$popupButton.parent().addClass("isActive")},a.prototype.onPanelHide=function(t){t.target===t.currentTarget&&this.$popupButton.parent().removeClass("isActive")},a);function a(t){this.$popupButton=t,this.popupPanelButtonView=new r.PopupPanelButtonView(this.$popupButton);var e=this.popupPanelButtonView.$panel;e.on(o.PANEL_SHOW_EVENT,i.proxy(this.onPanelShow,this)),e.on(o.PANEL_HIDE_EVENT,i.proxy(this.onPanelHide,this))}n.TouchGlobalNavOthersPopupButtonView=s},{"../modules/EventType":118,"./PopupPanelButton":213,jquery:96}],230:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../model/EpisodeDisplaySettings"),g=t("../modules/WritingDirectionHelper"),l=(o=s.Presenter,r(u,o),u.prototype.setup=function(){var n=this;"vertical"===this.displaySettings.getValue("writing_direction")?this.composeOnce():(this.callCompositionOnce=function(t,e){"writing_direction"===t&&"vertical"===e&&n.composeOnce()},this.displaySettings.on("settingupdate",this.callCompositionOnce))},u.prototype.composeOnce=function(){this.hasComposed||(this.hasComposed=!0,this.view.compose())},u.prototype.composePartsListAndEffectivity=function(t){for(var e=g.composePartsList(t),n=[],i=0;i<e.length;i++){var r=e[i];n[i]=1<r.length||1===r.length&&r[0].type!==g.CompositionPartType.AS_IS}return{partsList:e,isEffectiveList:n}},u.prototype.destroy=function(){this.callCompositionOnce&&this.displaySettings.off("settingupdate",this.callCompositionOnce)},u);function u(t,e){var n=o.call(this,t)||this;return n.displaySettings=a.default.getInstance(e.displaySettingsStorageSegment),n.hasComposed=!1,n.callCompositionOnce=null,n}n.VerticalCompositionPresenter=l;var c,d=(c=s.View,r(h,c),h.prototype.initMembers=function(t,e,n){var i;this.$container=t,this.displaySettingsStorageSegment=e,this.itemSelector=n,this.documentFragmentBase=document.createDocumentFragment(),this.spanElementBase=document.createElement("span"),this.partTypeToClassName=((i={})[g.CompositionPartType.TATECHUYOKO_1]="tatechuyoko1",i[g.CompositionPartType.TATECHUYOKO_2]="tatechuyoko2",i[g.CompositionPartType.TATECHUYOKO_3]="tatechuyoko3",i[g.CompositionPartType.LEADER_MARKS]="leaderMarks",i)},h.prototype.createPresenter=function(){return new l(this,{displaySettingsStorageSegment:this.displaySettingsStorageSegment})},h.prototype.compose=function(){for(var t=0,e=this.$container.find(this.itemSelector).get();t<e.length;t++){var n=e[t];this.composeElementContents(n)}},h.prototype.composeElementContents=function(t){if(!t.getAttribute("data-vertical-composition-done")){t.setAttribute("data-vertical-composition-done","true");var i=[],r=[],o=function(t){for(var e=t.firstChild;e;e=e.nextSibling)switch(e.nodeType){case 3:i.push(e),r.push(e.nodeValue);break;case 1:var n="RUBY"===e.nodeName?e.firstChild:e;o(n)}};o(t);for(var e=this.presenter.composePartsListAndEffectivity(r),n=e.partsList,s=e.isEffectiveList,a=0;a<i.length;a++){var l=i[a],u=n[a];if(s[a]){for(var c=this.documentFragmentBase.cloneNode(!1),d=0,h=u;d<h.length;d++){var p=h[d];if(p.type===g.CompositionPartType.AS_IS)c.appendChild(document.createTextNode(p.text));else{var f=this.spanElementBase.cloneNode(!1);f.className=this.partTypeToClassName[p.type],f.textContent=p.text,c.appendChild(f)}}l.parentNode.replaceChild(c,l)}}}},h.prototype.destroy=function(){this.presenter.destroy()},h);function h(t,e,n){return void 0===n&&(n=".js-vertical-composition-item"),c.call(this,t,e,n)||this}n.VerticalCompositionView=d},{"../model/EpisodeDisplaySettings":109,"../modules/WritingDirectionHelper":129,"./base":247}],231:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=(o.prototype.onClick=function(t){t.preventDefault();var e=this.$target.offset().top;i("html,body").animate({scrollTop:e},this.duration)},o);function o(t){this.$button=t,this.$target=i("#"+t.attr("data-target")).first();var e=t.attr("data-duration");this.duration=e?+e:400,this.$button.on("click",i.proxy(this.onClick,this))}n.VerticalScrollButtonView=r},{jquery:96}],232:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i};Object.defineProperty(n,"__esModule",{value:!0});var s,a=t("./base"),l=t("jquery"),u=t("../modules/Display"),c=t("./ModalWindow"),d=(s=a.Presenter,r(h,s),h.prototype.canAddWork=function(){return this.works.length<this.maxWorkCount},h.prototype.addWork=function(e){this.canAddWork()&&0===this.works.filter(function(t){return t.workId===e}).length&&(this.works.push({workId:e}),this.view.updateWorks())},h.prototype.moveUpWork=function(t){var e=this.works.map(function(t){return t.workId}).indexOf(t);0<e&&(this.works=o(1<e?this.works.slice(0,e-1):[],[this.works[e],this.works[e-1]],this.works.slice(e+1)),this.view.updateWorks())},h.prototype.moveDownWork=function(t){var e=this.works.map(function(t){return t.workId}).indexOf(t);0<=e&&e<this.works.length-1&&(this.works=o(this.works.slice(0,e),[this.works[e+1],this.works[e]],e<this.works.length-2?this.works.slice(e+2):[]),this.view.updateWorks())},h.prototype.removeWork=function(e){var t=this.works.length;this.works=this.works.filter(function(t){return t.workId!==e}),t!==this.works.length&&this.view.updateWorks()},h);function h(t,e){var n=s.call(this,t)||this;return n.works=e.workIds.map(function(t){return{workId:t}}),n.maxWorkCount=e.maxWorkCount,n}n.WorkCollectionEditorPresenter=d;var p,f=(p=a.View,r(g,p),g.prototype.initMembers=function(t,e,n){this.$workCollectionContainer=t,this.$workListContainer=e,this.$workTemplateContainer=n,this.$selectorItemFilter=this.$workListContainer.find(".js-collection-work-selector-filter")},g.prototype.createPresenter=function(){var t=this.$workCollectionContainer.find('input[name="work_collection_work_id"]').toArray().map(function(t){return t.getAttribute("value")}),e=+this.$workCollectionContainer.attr("data-max-work-count");return new d(this,{workIds:t,maxWorkCount:e})},g.prototype.registerEvents=function(){this.$workCollectionContainer.find(".js-open-collection-work-selector").on("click",l.proxy(this.onClickOpenSelector,this)),this.$selectorItemFilter.on("input",l.proxy(this.onInputSelectorFilter,this)),this.$workListContainer.find(".js-collection-work-selector-item").on("click",l.proxy(this.onSelectWorkToAdd,this)),this.$workCollectionContainer.on("click",".js-move-up-collection-work",l.proxy(this.onClickMoveUp,this)),this.$workCollectionContainer.on("click",".js-move-down-collection-work",l.proxy(this.onClickMoveDown,this)),this.$workCollectionContainer.on("click",".js-remove-collection-work",l.proxy(this.onClickRemove,this)),this.$workCollectionContainer.find(".js-collection-title-input").on("change",l.proxy(this.onChangeTitle,this))},g.prototype.initSubViews=function(){var t=new c.ModalWindowView(this.$workListContainer);this.isFromTouch||l("body").click(l.proxy(t.onModalContainerClick,t))},g.prototype.onClickOpenSelector=function(t){if(t.stopPropagation(),this.$selectorItemFilter.val(""),this.$selectorItemFilter.trigger("input"),this.$workListContainer.trigger("dcv:modalwindow:command:open"),this.$workListContainer.find(".js-scroll-container").scrollTop(0),!this.isFromTouch){var e=l(t.target).closest("button"),n=e.position(),i=n.top-this.$workListContainer.outerHeight(),r=n.top+e.outerHeight(),o=l(window).scrollTop()>i,s=l(window).height()+l(window).scrollTop()<r+this.$workListContainer.outerHeight();!o&&s?this.$workListContainer.css("top",i+"px"):this.$workListContainer.css("top",r+"px"),this.$workListContainer.css("left",n.left+"px"),this.$workListContainer.find(".js-collection-work-selector-filter").focus()}},g.prototype.onInputSelectorFilter=function(t){var n=l(t.target).val();this.$workListContainer.find("button.js-collection-work-selector-item").each(function(t,e){u.toggleDisplayClass(l(e).closest("li"),0<=e.textContent.indexOf(n))})},g.prototype.onSelectWorkToAdd=function(t){var e=l(t.target).closest("button").attr("data-work-id");this.presenter.addWork(e),t.preventDefault()},g.prototype.onClickMoveUp=function(t){var e=l(t.target).closest("button").attr("data-work-id");this.presenter.moveUpWork(e),t.preventDefault()},g.prototype.onClickMoveDown=function(t){var e=l(t.target).closest("button").attr("data-work-id");this.presenter.moveDownWork(e),t.preventDefault()},g.prototype.onClickRemove=function(t){var e=l(t.target).closest("button").attr("data-work-id");this.presenter.removeWork(e),t.preventDefault()},g.prototype.onChangeTitle=function(t){this.$workCollectionContainer.find(".js-collection-title").text(l(t.target).val())},g.prototype.updateWorks=function(){for(var e=this,t=this.presenter.works.map(function(t){return e.$workTemplateContainer.find('input[value="'+t.workId+'"]').closest("tr").clone()}).filter(function(t){return 0<t.length}),n=0;n<t.length;n++){var i=t[n];i.find(".js-collection-work-number").text("#"+(n+1)),0===n?i.find(".js-move-up-collection-work").prop("disabled",!0):i.find(".js-move-up-collection-work").prop("disabled",!1),n===t.length-1?i.find(".js-move-down-collection-work").prop("disabled",!0):i.find(".js-move-down-collection-work").prop("disabled",!1)}var r=this.$workCollectionContainer.find(".js-work-collection-work-container");r.empty(),t.forEach(function(t){return r.append(t)}),this.$workCollectionContainer.find(".js-collection-work-count").text(this.presenter.works.length);var o=new Set;this.presenter.works.map(function(t){o.add(t.workId)}),this.$workListContainer.find("button.js-collection-work-selector-item").each(function(t,e){e.disabled=o.has(e.dataset.workId)}),this.$workCollectionContainer.find(".js-open-collection-work-selector").prop("disabled",!this.presenter.canAddWork()||0===this.$workTemplateContainer.find("input").length);var s=0!==this.presenter.works.length;u.toggleDisplayClass(r,s),u.toggleDisplayClass(this.$workCollectionContainer.find(".js-work-collection-work-placeholder"),!s)},g);function g(t,e,n){var i=p.call(this,t,e,n)||this;return i.isFromTouch=l(document.body).hasClass("isTouch"),i.updateWorks(),i}n.WorkCollectionEditorView=f},{"../modules/Display":116,"./ModalWindow":200,"./base":247,jquery:96}],233:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i};Object.defineProperty(n,"__esModule",{value:!0});var s,a=t("./base"),l=t("jquery"),u=t("../modules/Display"),c=t("./ModalWindow"),d=(s=a.Presenter,r(h,s),h.prototype.canAddItem=function(){return this.workCollections.length<this.maxSelectCount},h.prototype.addItem=function(e){this.canAddItem()&&0===this.workCollections.filter(function(t){return t.workCollectionId===e}).length&&(this.workCollections.push({workCollectionId:e}),this.view.update())},h.prototype.moveUpItem=function(t){var e=this.workCollections.map(function(t){return t.workCollectionId}).indexOf(t);0<e&&(this.workCollections=o(1<e?this.workCollections.slice(0,e-1):[],[this.workCollections[e],this.workCollections[e-1]],this.workCollections.slice(e+1)),this.view.update())},h.prototype.moveDownItem=function(t){var e=this.workCollections.map(function(t){return t.workCollectionId}).indexOf(t);0<=e&&e<this.workCollections.length-1&&(this.workCollections=o(this.workCollections.slice(0,e),[this.workCollections[e+1],this.workCollections[e]],e<this.workCollections.length-2?this.workCollections.slice(e+2):[]),this.view.update())},h.prototype.removeItem=function(e){var t=this.workCollections.length;this.workCollections=this.workCollections.filter(function(t){return t.workCollectionId!==e}),t!==this.workCollections.length&&this.view.update()},h);function h(t,e){var n=s.call(this,t)||this;return n.workCollections=e.workCollectionIds.map(function(t){return{workCollectionId:t}}),n.maxSelectCount=e.maxSelectCount,n}n.WorkCollectionPinEditorPresenter=d;var p,f=(p=a.View,r(g,p),g.prototype.initMembers=function(t,e,n){this.$workCollectionsContainer=t,this.$workCollectionListContainer=e,this.$workCollectionTemplateContainer=n,this.$selectorItemFilter=e.find(".js-collection-selector-filter")},g.prototype.createPresenter=function(){var t=this.$workCollectionsContainer.find('input[name="pin_work_collection_id"]').toArray().map(function(t){return t.getAttribute("value")}),e=+this.$workCollectionsContainer.attr("data-max-select-count");return new d(this,{workCollectionIds:t,maxSelectCount:e})},g.prototype.registerEvents=function(){this.$workCollectionsContainer.find(".js-open-collection-selector").on("click",l.proxy(this.onClickOpenSelector,this)),this.$selectorItemFilter.on("input",l.proxy(this.onInputSelectorFilter,this)),this.$workCollectionListContainer.find(".js-collection-selector-item").on("click",l.proxy(this.onSelectItemToAdd,this)),this.$workCollectionsContainer.on("click",".js-move-up-collection",l.proxy(this.onClickMoveUp,this)),this.$workCollectionsContainer.on("click",".js-move-down-collection",l.proxy(this.onClickMoveDown,this)),this.$workCollectionsContainer.on("click",".js-remove-collection",l.proxy(this.onClickRemove,this))},g.prototype.initSubViews=function(){var t=new c.ModalWindowView(this.$workCollectionListContainer);this.isFromTouch||l("body").click(l.proxy(t.onModalContainerClick,t))},g.prototype.onClickOpenSelector=function(t){if(t.stopPropagation(),this.$selectorItemFilter.val(""),this.$selectorItemFilter.trigger("input"),this.$workCollectionListContainer.trigger("dcv:modalwindow:command:open"),this.$workCollectionListContainer.find(".js-scroll-container").scrollTop(0),!this.isFromTouch){var e=l(t.target).closest("button"),n=e.position(),i=n.top-this.$workCollectionListContainer.outerHeight(),r=n.top+e.outerHeight();l(window).scrollTop()>i?this.$workCollectionListContainer.css("top",r+"px"):this.$workCollectionListContainer.css("top",i+"px"),this.$workCollectionListContainer.css("left",n.left+"px"),this.$workCollectionListContainer.find(".js-collection-selector-filter").focus()}},g.prototype.onInputSelectorFilter=function(t){var n=l(t.target).val();this.$workCollectionListContainer.find("button.js-collection-selector-item").each(function(t,e){u.toggleDisplayClass(l(e).closest("li"),0<=e.textContent.indexOf(n))})},g.prototype.onSelectItemToAdd=function(t){var e=l(t.target).closest("button").attr("data-work-collection-id");this.presenter.addItem(e),t.preventDefault()},g.prototype.onClickMoveUp=function(t){var e=l(t.target).closest("button").attr("data-work-collection-id");this.presenter.moveUpItem(e),t.preventDefault()},g.prototype.onClickMoveDown=function(t){var e=l(t.target).closest("button").attr("data-work-collection-id");this.presenter.moveDownItem(e),t.preventDefault()},g.prototype.onClickRemove=function(t){var e=l(t.target).closest("button").attr("data-work-collection-id");this.presenter.removeItem(e),t.preventDefault()},g.prototype.update=function(){for(var e=this,t=this.presenter.workCollections.map(function(t){return e.$workCollectionTemplateContainer.find('input[value="'+t.workCollectionId+'"]').closest("tr").clone()}).filter(function(t){return 0<t.length}),n=0;n<t.length;n++){var i=t[n];i.find(".js-collection-number").text("#"+(n+1)),0===n?i.find(".js-move-up-collection").prop("disabled",!0):i.find(".js-move-up-collection").prop("disabled",!1),n===t.length-1?i.find(".js-move-down-collection").prop("disabled",!0):i.find(".js-move-down-collection").prop("disabled",!1)}var r=this.$workCollectionsContainer.find(".js-work-collection-container");r.empty(),t.forEach(function(t){return r.append(t)}),this.$workCollectionsContainer.find(".js-collection-count").text(this.presenter.workCollections.length);var o=new Set;this.presenter.workCollections.map(function(t){o.add(t.workCollectionId)}),this.$workCollectionListContainer.find("button.js-collection-selector-item").each(function(t,e){e.disabled=o.has(e.dataset.workCollectionId)}),this.$workCollectionsContainer.find(".js-open-collection-selector").prop("disabled",!this.presenter.canAddItem()||0===this.$workCollectionTemplateContainer.find("input").length);var s=0!==this.presenter.workCollections.length;u.toggleDisplayClass(r.closest("table"),s),u.toggleDisplayClass(this.$workCollectionsContainer.find(".js-pin-collections-placeholder"),!s)},g);function g(t,e,n){var i=p.call(this,t,e,n)||this;return i.isFromTouch=l(document.body).hasClass("isTouch"),i.update(),i}n.WorkCollectionPinEditorView=f},{"../modules/Display":116,"./ModalWindow":200,"./base":247,jquery:96}],234:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/Net"),l=t("../modules/FormFields"),u=t("../modules/Display"),c=t("../modules/Util/String"),d=t("../modules/Util/UpdateLocation"),h=t("jquery"),p=(o=s.Presenter,r(f,o),f.prototype.setup=function(){for(var t=0,e=this.initialFields;t<e.length;t++){var n=e[t];this.handleInput(n.name,n.value)}this.view.updateWorkCollection(),this.view.updateTagLabelsValidity(),this.view.updateSubmitButtons()},Object.defineProperty(f.prototype,"isValidGenre",{get:function(){return this.isFanFiction||!!this.originalWorkGenreName},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"canSubmit",{get:function(){return this.isValidTitle&&this.isValidGenre&&this.isValidFanFictionSource&&this.isValidCatchphrase&&this.isValidContest},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isValidFanFictionSource",{get:function(){return!this.isFanFiction||this.isFanFiction&&this.hasFanFictionSource},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"tagLabelsValidStatuses",{get:function(){var e=this;return this.tagLabels.map(function(t){return c.stringLength(t)<=e.maxTagLabelLength})},enumerable:!0,configurable:!0}),f.prototype.setTagLabels=function(t){this.tagLabels=t,this.view.updateTagLabelsValidity(),this.view.updateSubmitButtons()},Object.defineProperty(f.prototype,"isValidContest",{get:function(){var t=this.applyingContestId;return"0"===t||!this.contestHasCategoriesMap[t]||!!this.contestIsCategorySelectedMap[t]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"contestIsCategoriesPaneShown",{get:function(){for(var t=this.contestHasCategoriesMap,e={},n=0,i=Object.keys(t);n<i.length;n++){var r=i[n],o=t[r];e[r]=o&&r===this.applyingContestId}return e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"contestIsApplicable",{get:function(){for(var t=this.isFanFiction?"fan_fiction":this.originalWorkGenreName,e=this.contestGenreNamesMap,n={},i=0,r=Object.keys(e);i<r.length;i++){var o=r[i],s=e[o];n[o]=!s.length||!t||0<=s.indexOf(t)}return n},enumerable:!0,configurable:!0}),f.prototype.handleInput=function(t,e){switch(t){case"title":var n=c.stringLength(e);this.isValidTitle=0<n&&n<=this.maxTitleLength,this.view.updateTitleValidity(),this.view.updateSubmitButtons();break;case"genre_name":"fan_fiction"!==e&&(this.originalWorkGenreName=e),this.view.updateGenreValidity(),this.view.updateContestApplicability(),this.view.updateSubmitButtons();break;case"is_fan_fiction":this.isFanFiction=!!+e,this.view.updateGenreValidity(),this.view.updateFanFictionSourceValidity(),this.view.updateFanFictionStatus(),this.view.updateContestApplicability(),this.view.updateAdAvailability(),this.view.updateSubmitButtons();break;case"fan_fiction_source_id":this.hasFanFictionSource=!!+e,this.view.updateFanFictionSourceValidity(),this.view.updateSubmitButtons();break;case"catchphrase":var i=c.stringLength(e);this.isValidCatchphrase=i<=this.maxCatchphraseLength,this.view.updateCatchphraseValidity(),this.currentCatchphraseCountdownNumber=this.maxCatchphraseLength-i,this.view.updateCatchphraseCounterText(),this.view.updateSubmitButtons();break;case"apply_contest_id":this.applyingContestId=e,this.view.updateContestCategoriesPanes(),this.view.updateSubmitButtons();break;case"work_collection_id":this.view.updateWorkCollection();break;default:var r=t.match(/^apply_contest_([0-9]+)_category_number$/);if(r){var o=r[1];this.contestIsCategorySelectedMap[o]=!!e,this.view.updateContestCategoriesPanes(),this.view.updateSubmitButtons()}}},f.prototype.handleSubmit=function(t){var r=this;this.setError(null),a.ajax({method:"POST",url:this.actionURL,data:t}).done(function(t,e,n){r.locationURL=t.location,r.view.updateLocation()}).fail(function(t,e,n){r.isLoading=!1,r.view.updateIsLoading();var i=t&&t.error&&t.error.message||"作品を保存できませんでした";r.setError(new Error(i))}),this.isLoading=!0,this.view.updateIsLoading()},f.prototype.handlePageHide=function(){this.isLoading=!1,this.view.updateIsLoading()},f);function f(t,e){var n=o.call(this,t)||this;return n.actionURL=e.actionURL,n.maxTitleLength=e.maxTitleLength,n.initialFields=e.fields,n.isValidTitle=!1,n.originalWorkGenreName="",n.isFanFiction=!1,n.hasFanFictionSource=!1,n.tagLabels=e.tagLabels,n.maxTagLabelLength=e.maxTagLabelLength,n.isValidCatchphrase=!1,n.currentCatchphraseCountdownNumber=0,n.maxCatchphraseLength=e.maxCatchphraseLength,n.applyingContestId="0",n.contestHasCategoriesMap=e.contestHasCategoriesMap,n.contestIsCategorySelectedMap={},n.contestGenreNamesMap=e.contestGenreNamesMap,n.isLoading=!1,n.locationURL="",n}n.WorkEditorPresenter=p;var g,m=(g=s.View,r(y,g),y.prototype.initMembers=function(t){this.$form=t,this.$titleField=t.find('input[name="title"]'),this.$originalGenreNameFields=t.find('input[type="radio"][name="genre_name"]'),this.$fanFictionSourceField=t.find('select[name="fan_fiction_source_id"]'),this.$catchphraseField=t.find('input[name="catchphrase"]'),this.$catchphraseCounter=t.find(".js-catchphrase-counter"),this.$tagLabelFields=t.find('input[name="tag_label"]'),this.$contestFields=t.find('input[name="apply_contest_id"]');var s={};this.$contestFields.each(function(t,e){var n=h(e),i=n.val(),r=n.attr("data-categories-pane-id"),o=r?h("#"+r):h();s[i]=o}),this.contestCategoriesPaneMap=s,this.$redirectToNewEpisodeField=t.find('input[name="redirect_to_new_episode"]'),this.$canShowAdFields=t.find('input[name="can_show_ad"]'),this.$submitButtons=t.find('button[type="submit"]'),this.$errorMessageBox=t.find(".js-error-message-box"),this.$showIfAdAvailableElems=t.find(".js-show-if-ad-available"),this.$hideIfAdAvailableElems=t.find(".js-hide-if-ad-available")},y.prototype.createPresenter=function(){var a=this,l={},u={};return this.$contestFields.each(function(t,e){var n=h(e),i=n.val(),r=a.contestCategoriesPaneMap[i];l[i]=!!r.length;var o=n.attr("data-genre-names"),s=o?o.split(/\s+/):[];u[i]=s}),new p(this,{actionURL:this.$form.attr("action"),maxTitleLength:+this.$titleField.attr("data-max-length"),fields:this.$form.serializeArray(),maxCatchphraseLength:+this.$catchphraseField.attr("data-max-length"),tagLabels:this.getTagLabelFieldValues(),maxTagLabelLength:+this.$tagLabelFields.first().attr("data-max-length"),contestHasCategoriesMap:l,contestGenreNamesMap:u})},y.prototype.registerEvents=function(){this.$form.on("input change",h.proxy(this.onInput,this)),this.$tagLabelFields.on("input change",h.proxy(this.onTagLabelInput,this)),this.$submitButtons.on("click",h.proxy(this.onSubmitButtonClick,this)),this.$form.on("submit",h.proxy(this.onSubmit,this)),h(window).on("pagehide",h.proxy(this.onPageHide,this))},y.prototype.getTagLabelFieldValues=function(){return this.$tagLabelFields.get().map(function(t){return t.value})},y.prototype.onInput=function(t){var e=t.target;this.presenter.handleInput(e.name,e.value)},y.prototype.onTagLabelInput=function(t){this.presenter.setTagLabels(this.getTagLabelFieldValues())},y.prototype.onSubmitButtonClick=function(t){var e=h(t.currentTarget).attr("data-redirect-to-new-episode");this.$redirectToNewEpisodeField.val(e),this.$redirectToNewEpisodeField.trigger("input")},y.prototype.onSubmit=function(t){t.preventDefault(),this.presenter.handleSubmit(this.$form.serializeArray())},y.prototype.onPageHide=function(t){this.presenter.handlePageHide()},y.prototype.updateTitleValidity=function(){this.updateFieldValidity(this.$titleField,this.presenter.isValidTitle)},y.prototype.updateGenreValidity=function(){this.updateFieldValidity(this.$originalGenreNameFields,this.presenter.isValidGenre)},y.prototype.updateFanFictionSourceValidity=function(){this.updateFieldValidity(this.$fanFictionSourceField,this.presenter.isValidFanFictionSource)},y.prototype.updateCatchphraseValidity=function(){this.$catchphraseField.toggleClass("isInvalid",!this.presenter.isValidCatchphrase),this.$catchphraseCounter.toggleClass("isInvalid",!this.presenter.isValidCatchphrase)},y.prototype.updateCatchphraseCounterText=function(){this.$catchphraseCounter.text(this.presenter.currentCatchphraseCountdownNumber)},y.prototype.updateTagLabelsValidity=function(){for(var t=this.presenter.tagLabelsValidStatuses,e=0;e<t.length;e++)this.updateFieldValidity(this.$tagLabelFields.eq(e),t[e])},y.prototype.updateFieldValidity=function(t,e){var n=t[0];if(n&&n.setCustomValidity){var i=e?"":t.attr("data-validation-message");n.setCustomValidity(i)}},y.prototype.updateFanFictionStatus=function(){var t=this.presenter.isFanFiction;this.$form.find(".js-genre-selector").toggleClass("isHidden",t),this.$form.find(".js-fan-fiction-source-selector").toggleClass("isHidden",!t),this.$form.find(".js-fan-fiction-genre-input").prop("disabled",!t)},y.prototype.updateContestCategoriesPanes=function(){for(var t=this.presenter.contestIsCategoriesPaneShown,e=0,n=Object.keys(t);e<n.length;e++){var i=n[e],r=this.contestCategoriesPaneMap[i],o=t[i];u.toggleDisplayClass(r,o)}},y.prototype.updateContestApplicability=function(){var o=this.presenter.contestIsApplicable;this.$contestFields.each(function(t,e){var n=h(e),i=n.val(),r=o[i];n.prop("disabled",!r),n.parent().toggleClass("isDisabled",!r)})},y.prototype.updateAdAvailability=function(){var t=!this.presenter.isFanFiction;this.$canShowAdFields.prop("disabled",!t),u.toggleDisplayClass(this.$showIfAdAvailableElems,t),u.toggleDisplayClass(this.$hideIfAdAvailableElems,!t)},y.prototype.updateWorkCollection=function(){this.$form.find(".js-work-collection-selector-selected-count").text(this.$form.find('[name="work_collection_id"]:checked').length)},y.prototype.updateSubmitButtons=function(){this.$submitButtons.prop("disabled",!this.presenter.canSubmit)},y.prototype.updateIsLoading=function(){l.toggleFields(this.$form,!this.presenter.isLoading)},y.prototype.updateLocation=function(){this.$form.trigger("dcv:workeditorform:save"),this.presenter.locationURL&&d.updateLocation(this.presenter.locationURL)},y.prototype.updateError=function(){var t=this.presenter.lastError;this.$errorMessageBox.text(t?t.message:""),u.toggleDisplayClass(this.$errorMessageBox,!!t)},y);function y(t){return g.call(this,t)||this}n.WorkEditorView=m},{"../modules/Display":116,"../modules/FormFields":119,"../modules/Net":122,"../modules/Util/String":127,"../modules/Util/UpdateLocation":128,"./base":247,jquery:96}],235:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function i(t){var e=this;this.$workBaseColorSection=t,this.$accent=this.$workBaseColorSection.find(".js-work-base-color-accent"),this.$catchphrase=this.$workBaseColorSection.find(".js-work-base-color-sample-catchphrase"),this.$inputs=this.$workBaseColorSection.find("input"),this.$inputs.on("change",function(t){e.$catchphrase.css("color",r(t.target).val()),e.$accent.css("background-color",r(t.target).val())})}var r=t("jquery");n.BaseColorSamplerView=i},{jquery:96}],236:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=t("../../modules/Display"),o=(s.prototype.onOpenButtonClick=function(t){r.toggleDisplayClass(this.$workEditorOption.find(".js-work-editor-option-summary"),!1),r.toggleDisplayClass(this.$workEditorOption.find(".js-work-editor-option-editing"),!0),this.$openButton.blur()},s);function s(t){this.$workEditorOption=t,this.$openButton=t.find(".js-work-editor-option-open-button"),this.$openButton.on("click",i.proxy(this.onOpenButtonClick,this))}n.OpenOptionView=o},{"../../modules/Display":116,jquery:96}],237:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o=t("../OverallCheckbox"),s=t("../ModalWindow"),a=t("../base"),l=t("jquery"),u=function(t,e,n){this.tocItemId=t,this.title=e,this.isEpisode=0===t.indexOf("episode"),this.isChapter=!this.isEpisode,this.isPublished=n};n.TocItem=u;var c,d=(c=a.Presenter,r(h,c),h.prototype.handleSubmitButtonClick=function(){this.view.submitForm()},h.prototype.handleDialogClose=function(){this.selectedAction="",this.view.updateActionState()},h.prototype.handleItemSelectionChange=function(t){this.selectedAction="",this.selectedTocItems=t,this.view.updateActionState()},h.prototype.handleActionChange=function(t){this.selectedAction=t,this.view.updateActionState(),0!==this.selectedTocItems.length&&""!==this.selectedAction&&("change_title"===this.selectedAction?this.view.showChangeTitleDialog(this.selectedTocItems[0]):this.view.showConfirmDialog())},Object.defineProperty(h.prototype,"enabledActionMap",{get:function(){return{"":!0,change_title:1===this.selectedTocItems.length,delete:1<=this.selectedTocItems.length,publish:this.selectedTocItems.some(function(t){return t.isEpisode&&!t.isPublished}),unpublish:this.selectedTocItems.some(function(t){return t.isEpisode&&t.isPublished})}},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"isActionEnabled",{get:function(){return""!==this.selectedAction},enumerable:!0,configurable:!0}),h);function h(t,e){var n=c.call(this,t)||this;return n.selectedAction=e.selectedAction,n.selectedTocItems=e.selectedTocItems,n}n.TableOfContentsDefaultBulkActionPresenter=d;var p,f=(p=a.View,r(g,p),g.prototype.createPresenter=function(){return new d(this,{selectedAction:this.$action.val(),selectedTocItems:this.selectedTocItems()})},g.prototype.initMembers=function(t,e){this.$container=t,this.tocItemCheckboxes=e,this.$action=t.find('[name="bulk_action_name"]'),this.$form=t.find("form.js-toc-editor-form"),this.$changeTitleContainer=t.find(".js-change-title-dialog"),this.$confirmContainerMap={delete:t.find(".js-bulk-delete-dialog"),publish:t.find(".js-bulk-publish-dialog"),unpublish:t.find(".js-bulk-unpublish-dialog")}},g.prototype.registerEvents=function(){var e=this;this.tocItemCheckboxes.$overallCheckbox.on(o.OverallCheckboxView.CHANGED_EVENT_TYPE,l.proxy(this.onItemSelectionChange,this)),this.$action.on("change",l.proxy(this.onActionChange,this)),this.$confirmContainerMap.delete.find(".js-submit-button").on("click",l.proxy(this.onSubmitButtonClick,this)),this.$confirmContainerMap.publish.find(".js-submit-button").on("click",l.proxy(this.onSubmitButtonClick,this)),this.$confirmContainerMap.unpublish.find(".js-submit-button").on("click",l.proxy(this.onSubmitButtonClick,this)),[this.$changeTitleContainer,this.$confirmContainerMap.delete,this.$confirmContainerMap.publish,this.$confirmContainerMap.unpublish].forEach(function(t){t.on("dcv:modalwindow:hide",l.proxy(e.onDialogClose,e))})},g.prototype.initSubViews=function(){this.changeTitleDialog=new s.ModalWindowView(this.$changeTitleContainer),this.confirmDialogMap={delete:new s.ModalWindowView(this.$confirmContainerMap.delete),publish:new s.ModalWindowView(this.$confirmContainerMap.publish),unpublish:new s.ModalWindowView(this.$confirmContainerMap.unpublish)}},g.prototype.onSubmitButtonClick=function(t){this.presenter.handleSubmitButtonClick()},g.prototype.onDialogClose=function(){this.presenter.handleDialogClose()},g.prototype.onActionChange=function(t){this.presenter.handleActionChange(this.$action.val())},g.prototype.onItemSelectionChange=function(t,e){this.presenter.handleItemSelectionChange(this.selectedTocItems())},g.prototype.updateActionState=function(){var n=this.presenter.enabledActionMap;this.$action.find("option").each(function(t,e){l(e).prop("disabled",!n[l(e).val()])}),this.$action.val(this.presenter.selectedAction)},g.prototype.showChangeTitleDialog=function(t){this.$changeTitleContainer.find('input[name="toc_item_id"]').val(t.tocItemId),this.$changeTitleContainer.find('input[name="title"]').val(t.title),this.$changeTitleContainer.trigger("dcv:modalwindow:command:open")},g.prototype.showConfirmDialog=function(){this.$confirmContainerMap[this.presenter.selectedAction].trigger("dcv:modalwindow:command:open")},g.prototype.submitForm=function(){this.$form.submit()},g.prototype.selectedTocItems=function(){return this.tocItemCheckboxes.$checkedCheckboxes.toArray().map(function(t){var e=l(t);return new u(e.val(),e.attr("data-title"),!!+e.attr("data-is-published"))})},g);function g(t,e){return p.call(this,t,e)||this}n.TableOfContentsDefaultBulkActionView=f},{"../ModalWindow":200,"../OverallCheckbox":209,"../base":247,jquery:96}],238:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../../model/TableOfContents"),a=t("../OverallCheckbox"),l=t("../FormInputProtector"),u=t("../XHRForm"),c=t("../base"),d=t("jquery"),h=(o=c.Presenter,r(p,o),p.prototype.setup=function(){var t=this;this.toc.on(s.TableOfContents.Events.UPDATE_LIST,function(){t.view.updateActionOptions()}),this.view.updateActionOptions()},p.prototype.handleItemSelectionChange=function(t){this.selectedTocItemIds=t,this.view.updateActionOptions()},p.prototype.moveItemsIntoTarget=function(t,e){this.toc.moveItemsIntoTarget(t,e)},Object.defineProperty(p.prototype,"actionItems",{get:function(){var t=this.toc.items,e=this.selectedTocItemIds.reduce(function(t,e){return t[e]=!0,t},{}),n=t.filter(function(t){return!e[t.id]}).slice(-1)[0];return[{value:"",text:"操作を選択",disabled:!1},{value:":head",text:"小説の先頭に移動",disabled:!1},{value:n?n.id:":head",text:"小説の末尾に移動",disabled:!1}].concat(t.filter(function(t){return t.isChapter}).map(function(t){return{value:t.id,text:(1===t.level?"§ ":"└§ ")+t.title+" の末尾に移動",disabled:!!e[t.id]}}))},enumerable:!0,configurable:!0}),p);function p(t,e){var n=o.call(this,t)||this;return n.toc=s.TableOfContents.getInstance(e.workId),n.selectedTocItemIds=e.selectedTocItemIds,n}n.TableOfContentsEditBulkActionPresenter=h;var f,g=(f=c.View,r(m,f),m.prototype.createPresenter=function(){return new h(this,{workId:this.$container.attr("data-work-id"),selectedTocItemIds:this.selectItemIds})},m.prototype.initMembers=function(t,e){this.$container=t,this.$action=t.find('[name="bulk_action_name"]'),this.$form=t.find(".js-toc-editor-form"),this.$applyButton=t.find("button.js-toc-apply-button"),this.tocItemCheckboxes=e},m.prototype.registerEvents=function(){var t=this;this.tocItemCheckboxes.$overallCheckbox.on(a.OverallCheckboxView.CHANGED_EVENT_TYPE,d.proxy(this.onTocItemStateChange,this)),this.$applyButton.on("click",d.proxy(this.onApplyButtonClick,this)),this.$form.on("submit",function(){t.$form.trigger("dcv:forminputprotector:command:dismiss")})},m.prototype.initSubViews=function(){new u.XHRFormView(this.$form),new l.FormInputProtectorView(this.$form)},m.prototype.onTocItemStateChange=function(){var t=this.selectItemIds;this.presenter.handleItemSelectionChange(t)},Object.defineProperty(m.prototype,"selectItemIds",{get:function(){return this.tocItemCheckboxes.$checkedCheckboxes.toArray().map(function(t){return d(t).val()})},enumerable:!0,configurable:!0}),m.prototype.updateActionOptions=function(){var t=this.presenter.actionItems,e=this.$action.val();this.$action.find("option").remove(),this.$action.append(t.map(function(t){return d("<option>",t)})),this.$action.val(e)},m.prototype.onApplyButtonClick=function(){var t=this.tocItemCheckboxes.$checkedCheckboxes.toArray().map(function(t){return d(t).val()}),e=this.$action.val();0<t.length&&e&&this.presenter.moveItemsIntoTarget(t,":head"===e?null:e)},m);function m(t,e){return f.call(this,t,e)||this}n.TableOfContentsEditBulkActionView=g},{"../../model/TableOfContents":112,"../FormInputProtector":195,"../OverallCheckbox":209,"../XHRForm":246,"../base":247,jquery:96}],239:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../../modules/Locale"),l=t("../../model/TableOfContents"),d=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.setup=function(){var e=this;this.toc.on(l.TableOfContents.Events.UPDATE_LIST,function(){e.onUpdateList()}),this.toc.on(l.TableOfContents.Events.INSERTE_CHAPTER,function(t){e.onInsertChapter(t)}),this.onUpdateList()},c.prototype.onUpdateList=function(){this.view.updateList()},c.prototype.onInsertChapter=function(t){this.view.focusOnChapterTitle(t)},c.prototype.insertChapter=function(t){this.toc.insertChapter(t)},c.prototype.deleteChapter=function(t){this.toc.deleteChapter(t)},c.prototype.changeChapterTitleAndLevel=function(t,e,n){this.toc.changeChapterTitleAndLevel(t,e,n)},c.prototype.changeEpisodeTitle=function(t,e){this.toc.changeEpisodeTitle(t,e)},c.prototype.moveItemForward=function(t){this.toc.moveItemForward(t)},c.prototype.moveItemBackward=function(t){this.toc.moveItemBackward(t)},Object.defineProperty(c.prototype,"items",{get:function(){return this.toc.items},enumerable:!0,configurable:!0}),c);function c(t,e){var n=o.call(this,t)||this;return n.toc=l.TableOfContents.getInstance(e.workId),n.toc.setItems(e.items),n}n.TableOfContentsEditorPresenter=u;var h,p=(h=s.View,r(f,h),f.prototype.initMembers=function(t,e,n){this.$list=t,this.$chapterTemplate=t.children().last().remove(),this.$insertionPointField=e,this.$insertChapterButton=n},f.prototype.createPresenter=function(){var s=[];return this.$list.find(".js-toc-editor-list-item").each(function(t,e){var n=d(e),i=n.attr("data-item-id"),r=0===i.lastIndexOf("chapter:",0),o=r?n.find('input[name="chapter_title"]').val():n.find('input[name="episode_title"]').val();s.push({id:i,title:o,level:+n.attr("data-level"),isPublished:!!+n.attr("data-is-published"),characterCount:+n.attr("data-character-count"),isChapter:r,isEpisode:!r,episodeNumber:+n.attr("data-episode-number")})}),new u(this,{workId:this.$list.attr("data-work-id"),items:s})},f.prototype.registerEvents=function(){this.$list.on("click",".js-toc-editor-move-backward-button",d.proxy(this.onMoveBackwardButtonClick,this)),this.$list.on("click",".js-toc-editor-move-forward-button",d.proxy(this.onMoveForwardButtonClick,this)),this.$list.on("click",".js-toc-editor-delete-button",d.proxy(this.onDeleteButtonClick,this)),this.$list.on("change",d.proxy(this.onListFieldChange,this)),this.$list.on("keypress",d.proxy(this.onListFieldKeyPress,this)),this.$insertChapterButton.on("click",d.proxy(this.onInsertChapterButtonClick,this))},f.prototype.onMoveBackwardButtonClick=function(t){var e=d(t.currentTarget).closest(".js-toc-editor-list-item").attr("data-item-id");this.presenter.moveItemBackward(e)},f.prototype.onMoveForwardButtonClick=function(t){var e=d(t.currentTarget).closest(".js-toc-editor-list-item").attr("data-item-id");this.presenter.moveItemForward(e)},f.prototype.onDeleteButtonClick=function(t){var e=d(t.currentTarget).closest(".js-toc-editor-list-item").attr("data-item-id");this.presenter.deleteChapter(e)},f.prototype.onListFieldChange=function(t){var e=d(t.target),n=e.prop("name");if("chapter_title"===n||"chapter_level"===n){var i=(s=e.closest(".js-toc-editor-list-item")).attr("data-item-id"),r=s.find('input[name="chapter_title"]').val(),o=+s.find('select[name="chapter_level"]').val();this.presenter.changeChapterTitleAndLevel(i,r,o)}else{if("episode_title"!==n)return;var s;i=(s=e.closest(".js-toc-editor-list-item")).attr("data-item-id"),r=s.find('input[name="episode_title"]').val(),this.presenter.changeEpisodeTitle(i,r)}},f.prototype.onListFieldKeyPress=function(t){var e=d(t.target),n=e.prop("name");"chapter_title"!==n&&"episode_title"!==n||13!==t.which||(t.preventDefault(),e.blur())},f.prototype.onInsertChapterButtonClick=function(t){var e=this.$insertionPointField[0].selectedIndex;this.presenter.insertChapter(e)},f.prototype.updateList=function(){this.updateListItemOrder(),this.updateListItemContents(),this.updateInsertionPointField()},f.prototype.updateListItemOrder=function(){for(var t=this.$list.find(".js-toc-editor-list-item"),e=t.get().map(function(t){return{id:d(t).attr("data-item-id"),element:t}}),n=null,i=0,r=this.presenter.items;i<r.length;i++){var o=r[i];if(e.length&&e[0].id===o.id)n=e.shift().element;else{for(var s=null,a=0;a<e.length;a++)if(e[a].id===o.id){s=e.splice(a,1)[0];break}var l=s?s.element:this.createChapterElement(o),u=n?n.nextSibling:this.$list[0].firstChild;this.$list[0].insertBefore(l,u),n=l}}var c=e.map(function(t){return t.element});d(c).remove(),n&&(t.first().find(".js-toc-editor-move-backward-button").prop("disabled",!1),d(this.$list[0].firstElementChild).find(".js-toc-editor-move-backward-button").prop("disabled",!0),t.last().find(".js-toc-editor-move-forward-button").prop("disabled",!1),d(n).find(".js-toc-editor-move-forward-button").prop("disabled",!0))},f.prototype.createChapterElement=function(t){var e=this.$chapterTemplate.clone();return e.attr("id",t.id.replace(":","-")),e.attr("data-item-id",t.id),e.find('input[name="toc_item_id"]').val(t.id),e.find('input[name="target_toc_item_id"]').attr("data-target",t.id.replace(":","-")),e.find('input[name="target_toc_item_id"]').val(t.id),e[0]},f.prototype.updateListItemContents=function(){for(var t=this.$list.find(".js-toc-editor-list-item"),e=this.presenter.items,n=0;n<e.length;n++){var i=t.eq(n),r=e[n];r.isChapter?this.renderChapterItem(i,r):this.renderEpisodeItem(i,r)}},f.prototype.renderChapterItem=function(t,e){var n=e.level,i=+t.attr("data-level");n!==i&&(t.removeClass("episodeList-episodeLevel"+i),t.addClass("episodeList-episodeLevel"+n),t.attr("data-level",n));var r=e.isPublished;if(r!==!!+t.attr("data-is-published")){var o=t.find(".js-toc-editor-item-status");o.text(r?"公開":"非公開"),o.toggleClass("widget-episodeStatusLabel-published",r),o.toggleClass("widget-episodeStatusLabel-draft",!r),t.attr("data-is-published",r?1:0)}var s="「"+e.title+"」("+a.formatNumber(e.characterCount)+"文字)";s!==t.prop("title")&&t.prop("title",s)},f.prototype.renderEpisodeItem=function(t,e){var n=e.level,i=+t.attr("data-level");n!==i&&(t.removeClass("episodeList-episodeLevel"+i),t.addClass("episodeList-episodeLevel"+n),t.attr("data-level",n));var r=e.episodeNumber;r!==+t.attr("data-episode-number")&&(t.find(".js-toc-editor-episode-number").text(r),t.attr("data-episode-number",r))},f.prototype.updateInsertionPointField=function(){var t=this.presenter.items.map(function(t){return"「"+t.title+"」の前に"});t.push("小説の末尾に");var e=this.$insertionPointField[0],n=e.options,i=n.length;i>t.length&&(i=n.length=t.length);for(var r=0;r<i;r++)(o=n[r]).text!==t[r]&&(o.text=t[r]);for(r=i;r<t.length;r++){var o;(o=document.createElement("option")).text=t[r],e.appendChild(o)}e.selectedIndex=t.length-1},f.prototype.focusOnChapterTitle=function(t){this.$list.find('.js-toc-editor-list-item[data-item-id="'+t+'"]').find('input[name="chapter_title"]').focus()},f);function f(t,e,n){return h.call(this,t,e,n)||this}n.TableOfContentsEditorView=p},{"../../model/TableOfContents":112,"../../modules/Locale":121,"../base":247,jquery:96}],240:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../OverallCheckbox"),r=t("../../modules/Display"),o=t("../../modules/Locale"),s=t("jquery"),a=(l.prototype.onSelectionChange=function(t,e){r.toggleDisplayClass(this.$container.find(".js-show-if-select-toc"),e.someChecked),r.toggleDisplayClass(this.$container.find(".js-hide-if-select-toc"),!e.someChecked),r.toggleDisplayClass(this.$container.find(".js-show-if-all-select-toc"),e.allChecked),r.toggleDisplayClass(this.$container.find(".js-hide-if-all-select-toc"),!e.allChecked),this.$container.find(".js-mark-select-toc-state").toggleClass("someChecked",e.someChecked).toggleClass("allChecked",e.allChecked);var n=e.allChecked?"全項目":o.formatNumber(e.$checkedCheckboxes.length)+"項目";this.$container.find(".js-toc-selected-count").text(n)},l);function l(t){this.$container=t,this.overallCheckbox=new i.OverallCheckboxView(t.find('input[name="toc_all_select"]'),t,'input[name="target_toc_item_id"]'),this.overallCheckbox.$overallCheckbox.on(i.OverallCheckboxView.CHANGED_EVENT_TYPE,s.proxy(this.onSelectionChange,this))}n.TableOfContentsSelectorView=a},{"../../modules/Display":116,"../../modules/Locale":121,"../OverallCheckbox":209,jquery:96}],241:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("../base"),a=t("../ModalWindow"),l=t("jquery"),u=(o=s.Presenter,r(c,o),c.prototype.setup=function(){this.updateDisabledStatus(),this.view.updateUserEventItems()},Object.defineProperty(c.prototype,"selectedUserEventItems",{get:function(){return this.userEventItems.filter(function(t){return t.isSelected})},enumerable:!0,configurable:!0}),c.prototype.handleSelect=function(e,n){this.userEventItems.forEach(function(t){t.id===e&&(t.isSelected=n)}),this.updateDisabledStatus(),this.view.updateUserEventItems()},c.prototype.updateDisabledStatus=function(){this.selectedUserEventItems.length>=this.maxOpenUserEventEntryCount?this.userEventItems.forEach(function(t){t.isSelected||(t.isDisabled=!0)}):this.userEventItems.forEach(function(t){t.isDisabled=!1})},c);function c(t,e){var n=o.call(this,t)||this;return n.userEventItems=e.userEventItems,n.maxOpenUserEventEntryCount=e.maxOpenUserEventEntryCount,n}n.UserEventSelectorPresenter=u;var d,h=(d=s.View,r(p,d),p.prototype.initMembers=function(t){this.$container=t,this.$selectedCount=t.find(".js-user-event-selector-selected-count"),this.$userEventInputs=t.find('input[name="user_event_id"]')},p.prototype.createPresenter=function(){var t=this.$userEventInputs.get().map(function(t){var e=l(t);return{id:e.val(),isSelected:e.prop("checked"),isDisabled:!1}});return new u(this,{userEventItems:t,maxOpenUserEventEntryCount:+this.$container.attr("data-max-open-user-event-entry-count")})},p.prototype.registerEvents=function(){this.$userEventInputs.on("change",l.proxy(this.onChange,this)),this.$container.find(".js-user-event-selector-modal-ok-button").on("click",l.proxy(this.onOKButtonClick,this))},p.prototype.initSubViews=function(){this.$container.find(".js-user-event-selector-modal-container").each(function(t,e){new a.ModalWindowView(l(e))})},p.prototype.onChange=function(t,e){var n=l(t.currentTarget),i=n.val();n.prop("checked")&&!e?(n.prop("checked",!1),l("#"+n.attr("aria-controls")).trigger("dcv:modalwindow:command:open")):this.presenter.handleSelect(i,n.prop("checked"))},p.prototype.onOKButtonClick=function(t){var e=l(t.currentTarget),n=l("#"+e.attr("data-checkbox-id"));n.prop("checked",!0),n.trigger("change",[!0])},p.prototype.updateUserEventItems=function(){var i=this;this.$selectedCount.text(this.presenter.selectedUserEventItems.length),this.$userEventInputs.each(function(t,e){var n=l(e);n.prop("disabled",i.presenter.userEventItems[t].isDisabled),n.parent().toggleClass("isDisabled",i.presenter.userEventItems[t].isDisabled)})},p);function p(t){return d.call(this,t)||this}n.UserEventSelectorView=h},{"../ModalWindow":200,"../base":247,jquery:96}],242:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("jquery"),r=(o.prototype.initMembers=function(t,e){this.$input=t,this.$submitButton=e},o.prototype.registerEvents=function(){this.$input.on("input",i.proxy(this.onInput,this)),this.$input.on("keypress",i.proxy(this.onKeyPress,this)),this.$submitButton.on("click",i.proxy(this.onSubmitButtonClick,this))},o.prototype.onInput=function(){this.updateSubmitButtonStatus()},o.prototype.onKeyPress=function(t){13!==t.which||this.isEmpty||this.$input.trigger(o.SUBMIT_EVENT_TYPE,this.$input.val())},o.prototype.onSubmitButtonClick=function(){this.$input.trigger(o.SUBMIT_EVENT_TYPE,this.$input.val())},o.prototype.focusInput=function(){this.$input.focus();var t=this.$input.val().length;this.$input.get(0).setSelectionRange(t,t)},o.prototype.inputValue=function(t){this.$input.val(t).trigger("input")},o.prototype.updateFieldStatues=function(t){this.$input.prop("disabled",!t),this.$submitButton.prop("disabled",!t)},o.prototype.updateSubmitButtonStatus=function(){this.$submitButton.prop("disabled",this.isEmpty)},Object.defineProperty(o.prototype,"isEmpty",{get:function(){return 0===this.$input.val().length},enumerable:!0,configurable:!0}),o.SUBMIT_EVENT_TYPE="dcv:work_following_label_type_input_pane:submit",o);function o(t,e){this.initMembers(t,e),this.registerEvents(),this.updateSubmitButtonStatus()}n.WorkFollowingLabelTypeInputPaneView=r},{jquery:96}],243:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("jquery"),l=t("../modules/Display"),u=t("../model/WorkFollowingLabelTypes"),c=t("../modules/TemplateElement"),d=(o=s.Presenter,r(h,o),h.prototype.setup=function(){var e=this;this.workFollowingLabelTypes.on(u.LABEL_CREATED_EVENT_TYPE,function(t){e.view.createLabelType(t)}),this.workFollowingLabelTypes.on(u.LABEL_UPDATED_EVENT_TYPE,function(t){e.view.updateLabelType(t)})},h.prototype.handleInput=function(t){this.inputValue=t,this.view.updateLabelTypeStatuses()},h.prototype.shouldShowLabelType=function(t){return 0===this.inputValue.length||0<=t.indexOf(this.inputValue)},h);function h(t,e){var n=o.call(this,t)||this;return n.workFollowingLabelTypes=u.WorkFollowingLabelTypes.getInstance(),n.inputValue="",n}n.WorkFollowingLabelTypeSelectorPresenter=d;var p,f=(p=s.View,r(g,p),g.prototype.initMembers=function(t,e){this.$searchLabelTypeInput=t,this.$labelTypeContainer=e;var n=c.cloneTemplateChildren(this.$labelTypeContainer.find(".js-work-following-label-type-selector-label-type-container-template"));this.labelTypeContainerItemTemplate={element:n[0],inputElement:n.find('input[type="checkbox"]')[0],labelElement:n.find(".js-work-following-label-type-selector-label-type-container-item-label")[0]}},g.prototype.createPresenter=function(){return new d(this,{})},g.prototype.registerEvents=function(){this.$searchLabelTypeInput.on("input",a.proxy(this.onInput,this)),this.$labelTypeContainer.on("change",this.checkboxSelector,a.proxy(this.onChange,this))},g.prototype.onInput=function(t){this.presenter.handleInput(this.$searchLabelTypeInput.val())},g.prototype.onChange=function(t){this.$labelTypeContainer.trigger(g.CHANGE_EVENT_TYPE)},g.prototype.updateLabelTypeStatuses=function(){var r=this;this.$labelTypeContainer.find(".js-work-following-label-type-selector-label-type-container-item").each(function(t,e){var n=a(e),i=r.presenter.shouldShowLabelType(n.attr("data-work-following-label-type-name"));l.toggleDisplayClass(n,i)})},g.prototype.createLabelType=function(t){var e=this.labelTypeContainerItemTemplate;e.element.setAttribute("data-work-following-label-type-id",t.id),e.element.setAttribute("data-work-following-label-type-name",t.name),e.inputElement.setAttribute("id","followingLabel-applyPopup-"+t.id),e.inputElement.setAttribute("data-work-following-label-type-id",t.id),e.labelElement.setAttribute("for","followingLabel-applyPopup-"+t.id),e.labelElement.setAttribute("data-work-following-label-type-id",t.id),e.labelElement.textContent=t.name,this.$labelTypeContainer.append(e.element.cloneNode(!0))},g.prototype.updateLabelType=function(t){var e=this.$labelTypeContainer.find('.js-work-following-label-type-selector-label-type-container-item[data-work-following-label-type-id="'+t.id+'"]');0!==e.length&&(e.attr("data-work-following-label-type-name",t.name),e.find(".js-work-following-label-type-selector-label-type-container-item-label").text(t.name))},g.prototype.resetInputValues=function(){this.$searchLabelTypeInput.val("").trigger("input"),this.$checkboxes.prop("checked",!1).trigger("change")},g.prototype.updateViewStatuses=function(t){this.$searchLabelTypeInput.prop("disabled",!t),this.$checkboxes.prop("disabled",!t)},Object.defineProperty(g.prototype,"selectedLabelTypeIds",{get:function(){return this.$checkboxes.filter(":checked").get().map(function(t){return t.getAttribute("data-work-following-label-type-id")})},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"$checkboxes",{get:function(){return this.$labelTypeContainer.find(this.checkboxSelector)},enumerable:!0,configurable:!0}),g.CHANGE_EVENT_TYPE="dcv:work_following_label_type_selector_checkbox:changed",g);function g(t,e){var n=p.call(this,t,e)||this;return n.checkboxSelector='.js-work-following-label-type-selector-label-type-container-item input[type="checkbox"]',n}n.WorkFollowingLabelTypeSelectorView=f},{"../model/WorkFollowingLabelTypes":113,"../modules/Display":116,"../modules/TemplateElement":125,"./base":247,jquery:96}],244:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s,a=t("./base"),l=t("../model/WorkReviewLiker"),u=t("../model/WorkReviewLikeCounter"),c=t("../modules/Display"),d=t("../modules/Locale"),h=t("jquery");(s=o=o||{})[s.NONE=0]="NONE",s[s.CREATED=1]="CREATED",s[s.DELETED=2]="DELETED";var p,f=(p=a.Presenter,r(g,p),g.prototype.setup=function(){var t=this;this.liker.on("statusupdate",function(){t.view.updateButton()}),this.likeCounter.on("countupdate",function(){t.view.updateCounter()}),this.view.updateButton()},Object.defineProperty(g.prototype,"isLiking",{get:function(){return this.liker.isLiking},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"isLikeCountShown",{get:function(){return 0<this.likeCount},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"likeCount",{get:function(){return this.likeCounter.count},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"isCreatedMessageShown",{get:function(){return this.shownMessageType===o.CREATED},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"isDeletedMessageShown",{get:function(){return this.shownMessageType===o.DELETED},enumerable:!0,configurable:!0}),g.prototype.toggle=function(){var n=this;this.setError(null);var i=this.liker.isLiking;this.liker.toggleLike().fail(function(t){n.hideMessage();var e=t.message||(i?"「いいね！」を取り消しできませんでした。":"「いいね！」できませんでした。");n.setError(new Error(e))}),this.showMessage(i?o.DELETED:o.CREATED)},g.prototype.showMessage=function(t){var e=this;this.messageTimerId&&window.clearTimeout(this.messageTimerId),this.messageTimerId=window.setTimeout(function(){e.messageTimerId=0,e.hideMessage()},3e3),this.shownMessageType=t,this.view.updateMessage()},g.prototype.hideMessage=function(){this.shownMessageType!==o.NONE&&(this.shownMessageType=o.NONE,this.view.updateMessage())},g);function g(t,e){var n=p.call(this,t)||this;return n.liker=l.default.getInstance(e.workReviewPermalinkPath),n.liker.setInitialIsLiking(e.isLiking),n.likeCounter=u.default.getInstance(e.workReviewPermalinkPath),n.likeCounter.setInitialCount(e.likeCount),n.shownMessageType=o.NONE,n.messageTimerId=0,n}n.WorkReviewLikeButtonPresenter=f;var m,y=(m=a.View,r(v,m),v.prototype.initMembers=function(t,e){this.$button=t,this.$counter=t.find(".js-like-button-counter"),this.$createdMessage=t.find(".js-like-button-created-message"),this.$deletedMessage=t.find(".js-like-button-deleted-message"),this.$extraStatusClassTarget=e||h([])},v.prototype.createPresenter=function(){return new f(this,{workReviewPermalinkPath:this.$button.attr("data-work-review-permalink-path"),isLiking:this.$button.hasClass("isLiked"),likeCount:+this.$button.attr("data-like-count")})},v.prototype.registerEvents=function(){this.$button.on("click",h.proxy(this.onButtonClick,this))},v.prototype.onButtonClick=function(t){this.presenter.toggle()},v.prototype.updateButton=function(){var t=this.presenter.isLiking;this.$button.toggleClass("isLiked",t),this.$extraStatusClassTarget.toggleClass("isLiked",t);var e=this.$button.attr(t?"data-deletion-label":"data-creation-label");this.$button.attr("aria-label",e)},v.prototype.updateCounter=function(){this.$counter.text(d.formatNumber(this.presenter.likeCount)),c.toggleDisplayClass(this.$counter,this.presenter.isLikeCountShown)},v.prototype.updateMessage=function(){c.toggleDisplayClass(this.$createdMessage,this.presenter.isCreatedMessageShown),c.toggleDisplayClass(this.$deletedMessage,this.presenter.isDeletedMessageShown)},v.prototype.updateError=function(){var t=this.presenter.lastError;t&&window.alert(t.message)},v);function v(t,e){return void 0===e&&(e=null),m.call(this,t,e)||this}n.WorkReviewLikeButtonView=y},{"../model/WorkReviewLikeCounter":114,"../model/WorkReviewLiker":115,"../modules/Display":116,"../modules/Locale":121,"./base":247,jquery:96}],245:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("../modules/Display"),r=t("jquery"),o=t("lodash"),s=(a.prototype.initMembers=function(t){this.$header=t,this.$title=t.find(".js-viewer-writing-side-header-title")},a.prototype.registerEvents=function(){var t=o.throttle(this.doOnWindowScroll,42);r(window).on("scroll",r.proxy(t,this))},a.prototype.doOnWindowScroll=function(t){i.toggleDisplayClass(this.$title,40<window.pageYOffset)},a);function a(t){this.initMembers(t),this.registerEvents()}n.WritingSideHeaderView=s},{"../modules/Display":116,jquery:96,lodash:102}],246:[function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var o,s=t("./base"),a=t("../modules/FormFields"),l=t("../modules/Display"),u=t("../modules/Net"),c=t("../modules/Util/UpdateLocation"),d=t("jquery"),h=(o=s.Presenter,r(p,o),p.prototype.handleSubmit=function(t){var r=this;this.setError(null),u.ajax({url:this.actionURL,data:t,method:"POST"}).done(function(t,e,n){r.locationURL=t.location,r.view.updateLocation()}).fail(function(t,e,n){r.isLoading=!1,r.view.updateIsLoading();var i=t&&t.error?t.error.message:r.defaultErrorMessage;r.setError(new Error(i))}),this.isLoading=!0,this.view.updateIsLoading()},p);function p(t,e){var n=o.call(this,t)||this;return n.actionURL=e.actionURL,n.defaultErrorMessage=e.defaultErrorMessage,n.isLoading=!1,n.locationURL="",n}n.XHRFormPresenter=h;var f,g=(f=s.View,r(m,f),m.prototype.initMembers=function(t){this.$form=t,this.$errorMessageBox=t.find(".js-error-message-box")},m.prototype.createPresenter=function(){return new h(this,{actionURL:this.$form.attr("action"),defaultErrorMessage:"送信できませんでした"})},m.prototype.registerEvents=function(){this.$form.on("submit",d.proxy(this.onSubmit,this))},m.prototype.onSubmit=function(t){t.preventDefault(),this.presenter.handleSubmit(this.$form.serializeArray())},m.prototype.updateIsLoading=function(){a.toggleFields(this.$form,!this.presenter.isLoading)},m.prototype.updateLocation=function(){this.presenter.locationURL&&c.updateLocation(this.presenter.locationURL)},m.prototype.updateError=function(){var t=this.presenter.lastError;this.$errorMessageBox.text(t?t.message:""),l.toggleDisplayClass(this.$errorMessageBox,!!t)},m);function m(t){return f.call(this,t)||this}n.XHRFormView=g},{"../modules/Display":116,"../modules/FormFields":119,"../modules/Net":122,"../modules/Util/UpdateLocation":128,"./base":247,jquery:96}],247:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=(r.prototype.setup=function(){},r.prototype.setError=function(t){this.lastError=t,this.view.updateError()},r);function r(t){this.view=t,this.lastError=null}n.Presenter=i;var o=(s.prototype.initMembers=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},s.prototype.registerEvents=function(){},s.prototype.initSubViews=function(){},s.prototype.updateError=function(){},s);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.initMembers.apply(this,t),this.presenter=this.createPresenter(),this.registerEvents(),this.initSubViews(),this.presenter.setup()}n.View=o},{}]},{},[103]);