@koredev/kore-web-sdk 10.0.0-rc.15840b7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/components/base-sdk/kore-bot-sdk-client.d.ts +2 -0
  2. package/dist/components/chatwindow/chatWindow.d.ts +249 -0
  3. package/dist/components/chatwindow/config/kore-config.d.ts +2 -0
  4. package/dist/components/widgets/config/kore-widgets-config.d.ts +8 -0
  5. package/dist/components/widgets/kore-widgets.d.ts +113 -0
  6. package/dist/esm/exports.d.ts +34 -0
  7. package/dist/esm/exports.js +1 -0
  8. package/dist/esm/kore-web-sdk-chat.min.js +1 -0
  9. package/dist/esm/kore-web-sdk-widgets.js +1 -0
  10. package/dist/esm/plugins/agent-desktop.js +1 -0
  11. package/dist/esm/plugins/azure-stt-plugin.js +1 -0
  12. package/dist/esm/plugins/azure-tts-plugin.js +1 -0
  13. package/dist/esm/plugins/browser-tts-plugin.js +1 -0
  14. package/dist/esm/plugins/file-upload-umd.js +1 -0
  15. package/dist/esm/plugins/file-upload.js +1 -0
  16. package/dist/esm/plugins/google-stt-plugin.js +1 -0
  17. package/dist/esm/plugins/google-tts-plugin.js +1 -0
  18. package/dist/esm/plugins/kore-desktop-notification.js +1 -0
  19. package/dist/esm/plugins/kore-graph-templates-plugin.js +1 -0
  20. package/dist/esm/plugins/kore-picker-plugin.js +1 -0
  21. package/dist/esm/plugins/koreawspolly-st-plugin.js +1 -0
  22. package/dist/esm/plugins/search-suggestions.js +1 -0
  23. package/dist/esm/plugins/webapi-stt-plugin.js +1 -0
  24. package/dist/hot/hot-update.js +47 -0
  25. package/dist/hot/hot-update.js.map +1 -0
  26. package/dist/index_chat.d.ts +3 -0
  27. package/dist/index_plugins/AzureSTT.d.ts +2 -0
  28. package/dist/index_plugins/AzureTTS.d.ts +2 -0
  29. package/dist/index_plugins/BrowserTTS.d.ts +2 -0
  30. package/dist/index_plugins/KoreAWSST.d.ts +2 -0
  31. package/dist/index_plugins/KoreDesktopNotification.d.ts +2 -0
  32. package/dist/index_plugins/SearchSuggestions.d.ts +2 -0
  33. package/dist/index_plugins/WebKitSTT.d.ts +2 -0
  34. package/dist/index_plugins/agentDesktop.d.ts +2 -0
  35. package/dist/index_plugins/fileUpload_umd.d.ts +2 -0
  36. package/dist/index_plugins/googleSTT.d.ts +2 -0
  37. package/dist/index_plugins/googleTTS.d.ts +2 -0
  38. package/dist/index_plugins/graphTemplates.d.ts +2 -0
  39. package/dist/index_plugins/korepicker.d.ts +2 -0
  40. package/dist/index_widgets.d.ts +3 -0
  41. package/dist/kore-web-sdk.esm.browser.js +1 -0
  42. package/dist/kore-web-sdk.esm.browser.js.map +1 -0
  43. package/dist/libs/emoji.d.ts +2 -0
  44. package/dist/libs/jquery-clockpicker/jquery-clockpicker.d.ts +9 -0
  45. package/dist/libs/jquery-daterangepicker/jquery.daterangepicker.d.ts +2 -0
  46. package/dist/libs/kore-graph-adapter/KoreGraphAdapter.d.ts +27 -0
  47. package/dist/libs/korejquery.d.ts +2 -0
  48. package/dist/libs/purejscarousel/purejscarousel.d.ts +34 -0
  49. package/dist/plugins/agentDesktop/ac_webrtc.d.ts +232 -0
  50. package/dist/plugins/agentDesktop/agentdesktop.d.ts +20 -0
  51. package/dist/plugins/desktopNotifications/desktopnotifications.d.ts +10 -0
  52. package/dist/plugins/fileUploader/fileUploader.d.ts +144 -0
  53. package/dist/plugins/graphTemplatesPlugin.d.ts +20 -0
  54. package/dist/plugins/i18n.d.ts +28 -0
  55. package/dist/plugins/korePickers.d.ts +172 -0
  56. package/dist/plugins/searchSuggestions/searchSuggestions.d.ts +75 -0
  57. package/dist/plugins/speechToText/AzureSTT/AzureSTT.d.ts +19 -0
  58. package/dist/plugins/speechToText/BaseSTT.d.ts +8 -0
  59. package/dist/plugins/speechToText/GoogleSTT/GoogleSTT.d.ts +48 -0
  60. package/dist/plugins/speechToText/GoogleSTT/recorder.d.ts +21 -0
  61. package/dist/plugins/speechToText/WebKitSTT/WebKitSTT.d.ts +31 -0
  62. package/dist/plugins/textToSpeech/AzureTTS/AzureTTS.d.ts +22 -0
  63. package/dist/plugins/textToSpeech/BaseTTS.d.ts +8 -0
  64. package/dist/plugins/textToSpeech/BrowserTTS/BrowserTTS.d.ts +15 -0
  65. package/dist/plugins/textToSpeech/GoogleTTS/GoogleTTS.d.ts +32 -0
  66. package/dist/plugins/textToSpeech/KoreAWSPolly/kore-aws-polly.d.ts +22 -0
  67. package/dist/templatemanager/templateManager.d.ts +11 -0
  68. package/dist/templatemanager/templates/advancedListTemplate/advancedListTemplate.d.ts +7 -0
  69. package/dist/templatemanager/templates/advancedMultiSelect/advancedMultiSelect.d.ts +7 -0
  70. package/dist/templatemanager/templates/barChartTemplate/barChartTemplate.d.ts +9 -0
  71. package/dist/templatemanager/templates/button/buttonTemplate.d.ts +7 -0
  72. package/dist/templatemanager/templates/cardTemplate/cardTemplate.d.ts +7 -0
  73. package/dist/templatemanager/templates/carouselTemplate/carouselTemplate.d.ts +7 -0
  74. package/dist/templatemanager/templates/checkBoxesTemplate/checkBoxesTemplate.d.ts +7 -0
  75. package/dist/templatemanager/templates/clockPicker/clockPicker.d.ts +12 -0
  76. package/dist/templatemanager/templates/datePicker/datePicker.d.ts +12 -0
  77. package/dist/templatemanager/templates/dateRangePicker/dateRangePicker.d.ts +12 -0
  78. package/dist/templatemanager/templates/dropdownTemplate/dropdownTemplate.d.ts +7 -0
  79. package/dist/templatemanager/templates/formTemplate/formTemplate.d.ts +7 -0
  80. package/dist/templatemanager/templates/iframeTemplate/iframeTemplate.d.ts +7 -0
  81. package/dist/templatemanager/templates/likeDislikeTemplate/likeDislikeTemplate.d.ts +7 -0
  82. package/dist/templatemanager/templates/lineChartTemplate/lineChartTemplate.d.ts +9 -0
  83. package/dist/templatemanager/templates/listTemplate/listTemplate.d.ts +7 -0
  84. package/dist/templatemanager/templates/listViewTemplate/listViewTemplate.d.ts +9 -0
  85. package/dist/templatemanager/templates/listWidgetTemplate/listWidgetTemplate.d.ts +9 -0
  86. package/dist/templatemanager/templates/messageTemplate/messageTemplate.d.ts +6 -0
  87. package/dist/templatemanager/templates/miniTableTemplate/miniTableTemplate.d.ts +7 -0
  88. package/dist/templatemanager/templates/pieChartTemplate/pieChartTemplate.d.ts +9 -0
  89. package/dist/templatemanager/templates/quickReplyTemplate/quickReplyTemplate.d.ts +11 -0
  90. package/dist/templatemanager/templates/radioOptionPicker/radioOptionPicker.d.ts +10 -0
  91. package/dist/templatemanager/templates/ratingTemplate/ratingTemplate.d.ts +8 -0
  92. package/dist/templatemanager/templates/systemTemplate/systemTemplate.d.ts +7 -0
  93. package/dist/templatemanager/templates/tableListTemplate/tableListTemplate.d.ts +8 -0
  94. package/dist/templatemanager/templates/tableTemplate/tableTemplate.d.ts +7 -0
  95. package/dist/templatemanager/templates/taskPickerTemplate/taskPickerTemplate.d.ts +10 -0
  96. package/dist/templatemanager/templates/templateAttachment/templateAttachment.d.ts +7 -0
  97. package/dist/umd/kore-web-sdk-umd-chat.min.js +1 -0
  98. package/dist/umd/kore-web-sdk-umd-widgets.js +1 -0
  99. package/dist/umd/plugins/agent-desktop-umd.js +1 -0
  100. package/dist/umd/plugins/azure-stt-umd-plugin-umd.js +1 -0
  101. package/dist/umd/plugins/azure-tts-umd-plugin-umd.js +1 -0
  102. package/dist/umd/plugins/browser-tts-umd-plugin-umd.js +1 -0
  103. package/dist/umd/plugins/file-upload-umd.js +1 -0
  104. package/dist/umd/plugins/google-stt-umd-plugin-umd.js +1 -0
  105. package/dist/umd/plugins/google-tts-umd-plugin-umd.js +1 -0
  106. package/dist/umd/plugins/kore-desktop-notification-umd.js +1 -0
  107. package/dist/umd/plugins/kore-graph-templates-plugin-umd.js +1 -0
  108. package/dist/umd/plugins/kore-picker-plugin-umd.js +1 -0
  109. package/dist/umd/plugins/koreawspolly-st-umd-plugin-umd.js +1 -0
  110. package/dist/umd/plugins/search-suggestions-umd.js +1 -0
  111. package/dist/umd/plugins/webapi-stt-plugin-umd.js +1 -0
  112. package/dist/utils/EventEmiter.d.ts +11 -0
  113. package/dist/utils/helpers.d.ts +20 -0
  114. package/dist/utils/kore-polyfills.d.ts +2 -0
  115. package/package.json +1 -0
@@ -0,0 +1 @@
1
+ var e={87274:(e,t,n)=>{function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(i=r.key,o=void 0,o=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===u(o)?o:String(o)),r)}var i,o}function d(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{T:()=>h}),e=n.hmd(e);var h=function(){function t(){l(this,t),this.JsSipInit.call(window),this._isInitialized=!1,this.serverConfig={},this.account={user:null,userAuth:null,displayName:null,password:null,registerExpires:600,useSessionTimer:!1},this.constraints={audio:!0,video:!0},this.chromiumBased=[{n:"Edge",s:"edg/"},{n:"Opera",s:"opr/"},{n:"Samsung",s:"samsungbrowser/"},{n:"Yandex",s:"yabrowser/"}],this.modes={video_call_audio_answer_firefox_fix:!0,video_call_audio_answer_safari_fix:!0,ice_timeout_fix:2e3,chrome_rtp_timeout_fix:13,sbc_ha_pairs_mode:void 0,ringing_header_mode:void 0,sbc_switch_register5xx_mode:!0,cache_register_auth_mode:!0,check_remote_sdp_mode:!0},this.credentials=[],this.listeners={},this.registerExtraHeaders=null,this.jssipUA=null,this.browser="",this.browserVersion=0,this.browserName="",this.os="other",this.reconnectMin=2,this.reconnectMax=30,this.u17=void 0,this.activeCalls=0,this.wsSocket=null,this.wsOnMessage=null,this.wsPingMs=0,this.wsOrigPingMs=0,this.wsThrottlingPingMs=0,this.wsVisibility=!1,this.wsCall=!1,this.wsLog=0,this.wsPongTimeout=!0,this.wsIsThrottling=!1,this.wsPingJob=null,this.wsPingTime=null,this.wsNextPingTime=null,this.wsPongReceived=!1,this.wsPongSupported=null,this.wsPongTimeoutTime=null,this.wsPongDelays=null,this.wsPongDelaysIx=0,this.wsPongReport=0,this.wsPongReportCounter=0,this.wsPongDist=!1,this.dtmfUseWebRTC=!0,this.dtmfDuration=250,this.dtmfInterToneGap=250,this.enableAddVideo=!1,this.oauthToken=null,this.oauthTokenUseInInvite=!0,this.networkPriority=void 0,t.ac_log=console.log,t.js_log=null,void 0===t.instance&&(t.instance=this),this._detectBrowser(),this._detectOS(),this.webrtcapi=p,this.replacedCall=null,this.codecFilter=null,this.AUDIO=Symbol("audio"),this.VIDEO=Symbol("video"),this.RECVONLY_VIDEO=Symbol("recvonly_video"),t.instance}return d(t,[{key:"JsSipInit",value:function(){!function(t){"object"==("undefined"==typeof exports?"undefined":u(exports))?e.exports=t():"function"==typeof define&&n.amdO?define([],t):("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:this).JsSIP=t()}((function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,(function(e){return i(t[a][1][e]||e)}),l,l.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o=e("./Utils"),a=e("./Constants"),s=e("./Grammar"),u=e("./URI"),l=e("./Socket"),c=e("./Exceptions");n.settings={authorization_user:null,password:null,realm:null,ha1:null,authorization_jwt:null,display_name:null,uri:null,contact_uri:null,instance_id:null,use_preloaded_route:!1,session_timers:!0,session_timers_refresh_method:a.UPDATE,session_timers_force_refresher:!1,no_answer_timeout:60,register:!0,register_expires:600,registrar_server:null,sockets:null,connection_recovery_max_interval:a.CONNECTION_RECOVERY_MAX_INTERVAL,connection_recovery_min_interval:a.CONNECTION_RECOVERY_MIN_INTERVAL,via_host:"".concat(o.createRandomToken(12),".invalid")};var d={mandatory:{sockets:function(e){var t=[];if(l.isSocket(e))t.push({socket:e});else{if(!Array.isArray(e)||!e.length)return;var n,i=r(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;Object.prototype.hasOwnProperty.call(o,"socket")&&l.isSocket(o.socket)?t.push(o):l.isSocket(o)&&t.push({socket:o})}}catch(e){i.e(e)}finally{i.f()}}return t},uri:function(e){/^sip:/i.test(e)||(e="".concat(a.SIP,":").concat(e));var t=u.parse(e);return t&&t.user?t:void 0}},optional:{authorization_user:function(e){return-1===s.parse('"'.concat(e,'"'),"quoted_string")?void 0:e},authorization_jwt:function(e){if("string"==typeof e)return e},user_agent:function(e){if("string"==typeof e)return e},connection_recovery_max_interval:function(e){if(o.isDecimal(e)){var t=Number(e);if(t>0)return t}},connection_recovery_min_interval:function(e){if(o.isDecimal(e)){var t=Number(e);if(t>0)return t}},contact_uri:function(e){if("string"==typeof e){var t=s.parse(e,"SIP_URI");if(-1!==t)return t}},display_name:function(e){return e},instance_id:function(e){return/^uuid:/i.test(e)&&(e=e.substr(5)),-1===s.parse(e,"uuid")?void 0:e},no_answer_timeout:function(e){if(o.isDecimal(e)){var t=Number(e);if(t>0)return t}},session_timers:function(e){if("boolean"==typeof e)return e},session_timers_refresh_method:function(e){if("string"==typeof e&&((e=e.toUpperCase())===a.INVITE||e===a.UPDATE))return e},session_timers_force_refresher:function(e){if("boolean"==typeof e)return e},password:function(e){return String(e)},realm:function(e){return String(e)},ha1:function(e){return String(e)},register:function(e){if("boolean"==typeof e)return e},register_expires:function(e){if(o.isDecimal(e)){var t=Number(e);if(t>0)return t}},registrar_server:function(e){/^sip:/i.test(e)||(e="".concat(a.SIP,":").concat(e));var t=u.parse(e);return t?t.user?void 0:t:void 0},use_preloaded_route:function(e){if("boolean"==typeof e)return e}}};n.load=function(e,t){for(var n in d.mandatory){if(!t.hasOwnProperty(n))throw new c.ConfigurationError(n);var r=t[n],i=d.mandatory[n](r);if(void 0===i)throw new c.ConfigurationError(n,r);e[n]=i}for(var a in d.optional)if(t.hasOwnProperty(a)){var s=t[a];if(o.isEmpty(s))continue;var u=d.optional[a](s);if(void 0===u)throw new c.ConfigurationError(a,s);e[a]=u}}},{"./Constants":2,"./Exceptions":6,"./Grammar":7,"./Socket":23,"./URI":29,"./Utils":30}],2:[function(e,t,n){var r=e("../package.json");t.exports={USER_AGENT:"".concat(r.title," ").concat(r.version),SIP:"sip",SIPS:"sips",causes:{CONNECTION_ERROR:"Connection Error",REQUEST_TIMEOUT:"Request Timeout",SIP_FAILURE_CODE:"SIP Failure Code",INTERNAL_ERROR:"Internal Error",BUSY:"Busy",REJECTED:"Rejected",REDIRECTED:"Redirected",UNAVAILABLE:"Unavailable",NOT_FOUND:"Not Found",ADDRESS_INCOMPLETE:"Address Incomplete",INCOMPATIBLE_SDP:"Incompatible SDP",MISSING_SDP:"Missing SDP",AUTHENTICATION_ERROR:"Authentication Error",BYE:"Terminated",WEBRTC_ERROR:"WebRTC Error",CANCELED:"Canceled",NO_ANSWER:"No Answer",EXPIRES:"Expires",NO_ACK:"No ACK",DIALOG_ERROR:"Dialog Error",USER_DENIED_MEDIA_ACCESS:"User Denied Media Access",BAD_MEDIA_DESCRIPTION:"Bad Media Description",RTP_TIMEOUT:"RTP Timeout"},SIP_ERROR_CAUSES:{REDIRECTED:[300,301,302,305,380],BUSY:[486,600],REJECTED:[403,603],NOT_FOUND:[404,604],UNAVAILABLE:[480,410,408,430],ADDRESS_INCOMPLETE:[484,424],INCOMPATIBLE_SDP:[488,606],AUTHENTICATION_ERROR:[401,407]},ACK:"ACK",BYE:"BYE",CANCEL:"CANCEL",INFO:"INFO",INVITE:"INVITE",MESSAGE:"MESSAGE",NOTIFY:"NOTIFY",OPTIONS:"OPTIONS",REGISTER:"REGISTER",REFER:"REFER",UPDATE:"UPDATE",SUBSCRIBE:"SUBSCRIBE",DTMF_TRANSPORT:{INFO:"INFO",RFC2833:"RFC2833"},REASON_PHRASE:{100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",424:"Bad Location Information",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"JsSIP Internal Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"},ALLOWED_METHODS:"INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY,SUBSCRIBE",ACCEPTED_BODY_TYPES:"application/sdp, application/dtmf-relay",MAX_FORWARDS:69,SESSION_EXPIRES:90,MIN_SESSION_EXPIRES:60,CONNECTION_RECOVERY_MAX_INTERVAL:30,CONNECTION_RECOVERY_MIN_INTERVAL:2}},{"../package.json":42}],3:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("./Logger"),o=e("./SIPMessage"),a=e("./Constants"),s=e("./Transactions"),u=e("./Dialog/RequestSender"),l=e("./Utils"),c=new i("Dialog"),d={STATUS_EARLY:1,STATUS_CONFIRMED:2};t.exports=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d.STATUS_CONFIRMED;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._owner=t,this._ua=t._ua,this._uac_pending_reply=!1,this._uas_pending_reply=!1,!n.hasHeader("contact"))return{error:"unable to create a Dialog without Contact header field"};n instanceof o.IncomingResponse&&(i=n.status_code<200?d.STATUS_EARLY:d.STATUS_CONFIRMED);var a=n.parseHeader("contact");"UAS"===r?(this._id={call_id:n.call_id,local_tag:n.to_tag,remote_tag:n.from_tag,toString:function(){return this.call_id+this.local_tag+this.remote_tag}},this._state=i,this._remote_seqnum=n.cseq,this._local_uri=n.parseHeader("to").uri,this._remote_uri=n.parseHeader("from").uri,this._remote_target=a.uri,this._route_set=n.getHeaders("record-route"),this._ack_seqnum=this._remote_seqnum):"UAC"===r&&(this._id={call_id:n.call_id,local_tag:n.from_tag,remote_tag:n.to_tag,toString:function(){return this.call_id+this.local_tag+this.remote_tag}},this._state=i,this._local_seqnum=n.cseq,this._local_uri=n.parseHeader("from").uri,this._remote_uri=n.parseHeader("to").uri,this._remote_target=a.uri,this._route_set=n.getHeaders("record-route").reverse(),this._ack_seqnum=null),this._ua.newDialog(this),c.debug("new ".concat(r," dialog created with status ").concat(this._state===d.STATUS_EARLY?"EARLY":"CONFIRMED"))}var t,n,i;return t=e,i=[{key:"C",get:function(){return d}}],(n=[{key:"id",get:function(){return this._id}},{key:"local_seqnum",get:function(){return this._local_seqnum},set:function(e){this._local_seqnum=e}},{key:"owner",get:function(){return this._owner}},{key:"uac_pending_reply",get:function(){return this._uac_pending_reply},set:function(e){this._uac_pending_reply=e}},{key:"uas_pending_reply",get:function(){return this._uas_pending_reply}},{key:"update",value:function(e,t){this._state=d.STATUS_CONFIRMED,c.debug("dialog ".concat(this._id.toString()," changed to CONFIRMED state")),"UAC"===t&&(this._route_set=e.getHeaders("record-route").reverse())}},{key:"terminate",value:function(){c.debug("dialog ".concat(this._id.toString()," deleted")),this._ua.destroyDialog(this)}},{key:"sendRequest",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=l.cloneArray(n.extraHeaders),i=l.cloneObject(n.eventHandlers),o=n.body||null,a=this._createRequest(e,r,o);return i.onAuthenticated=function(){t._local_seqnum+=1},new u(this,a,i).send(),a}},{key:"receiveRequest",value:function(e){this._checkInDialogRequest(e)&&(e.method===a.ACK&&null!==this._ack_seqnum?this._ack_seqnum=null:e.method===a.INVITE&&(this._ack_seqnum=e.cseq),this._owner.receiveRequest(e))}},{key:"_createRequest",value:function(e,t,n){t=l.cloneArray(t),this._local_seqnum||(this._local_seqnum=Math.floor(1e4*Math.random()));var r=e===a.CANCEL||e===a.ACK?this._local_seqnum:this._local_seqnum+=1;return new o.OutgoingRequest(e,this._remote_target,this._ua,{cseq:r,call_id:this._id.call_id,from_uri:this._local_uri,from_tag:this._id.local_tag,to_uri:this._remote_uri,to_tag:this._id.remote_tag,route_set:this._route_set},t,n)}},{key:"_checkInDialogRequest",value:function(e){var t=this;if(this._remote_seqnum)if(e.cseq<this._remote_seqnum){if(e.method!==a.ACK)return e.reply(500),!1;if(null===this._ack_seqnum||e.cseq!==this._ack_seqnum)return!1}else e.cseq>this._remote_seqnum&&(this._remote_seqnum=e.cseq);else this._remote_seqnum=e.cseq;if(e.method===a.INVITE||e.method===a.UPDATE&&e.body){if(!0===this._uac_pending_reply)e.reply(491);else{if(!0===this._uas_pending_reply){var n=1+(10*Math.random()|0);return e.reply(500,null,["Retry-After:".concat(n)]),!1}this._uas_pending_reply=!0,e.server_transaction.on("stateChanged",(function n(){e.server_transaction.state!==s.C.STATUS_ACCEPTED&&e.server_transaction.state!==s.C.STATUS_COMPLETED&&e.server_transaction.state!==s.C.STATUS_TERMINATED||(e.server_transaction.removeListener("stateChanged",n),t._uas_pending_reply=!1)}))}e.hasHeader("contact")&&e.server_transaction.on("stateChanged",(function(){e.server_transaction.state===s.C.STATUS_ACCEPTED&&(t._remote_target=e.parseHeader("contact").uri)}))}else e.method===a.NOTIFY&&e.hasHeader("contact")&&e.server_transaction.on("stateChanged",(function(){e.server_transaction.state===s.C.STATUS_COMPLETED&&(t._remote_target=e.parseHeader("contact").uri)}));return!0}}])&&r(t.prototype,n),i&&r(t,i),e}()},{"./Constants":2,"./Dialog/RequestSender":4,"./Logger":9,"./SIPMessage":22,"./Transactions":26,"./Utils":30}],4:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("../Constants"),o=e("../Transactions"),a=e("../RTCSession"),s=e("../RequestSender"),u={onRequestTimeout:function(){},onTransportError:function(){},onSuccessResponse:function(){},onErrorResponse:function(){},onAuthenticated:function(){},onDialogError:function(){}};t.exports=function(){function e(t,n,r){for(var i in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._dialog=t,this._ua=t._ua,this._request=n,this._eventHandlers=r,this._reattempt=!1,this._reattemptTimer=null,u)Object.prototype.hasOwnProperty.call(u,i)&&(this._eventHandlers[i]||(this._eventHandlers[i]=u[i]))}var t,n;return t=e,(n=[{key:"request",get:function(){return this._request}},{key:"send",value:function(){var e=this,t=new s(this._ua,this._request,{onRequestTimeout:function(){e._eventHandlers.onRequestTimeout()},onTransportError:function(){e._eventHandlers.onTransportError()},onAuthenticated:function(t){e._eventHandlers.onAuthenticated(t)},onReceiveResponse:function(t){e._receiveResponse(t)}});t.send(),(this._request.method===i.INVITE||this._request.method===i.UPDATE&&this._request.body)&&t.clientTransaction.state!==o.C.STATUS_TERMINATED&&(this._dialog.uac_pending_reply=!0,t.clientTransaction.on("stateChanged",(function n(){t.clientTransaction.state!==o.C.STATUS_ACCEPTED&&t.clientTransaction.state!==o.C.STATUS_COMPLETED&&t.clientTransaction.state!==o.C.STATUS_TERMINATED||(t.clientTransaction.removeListener("stateChanged",n),e._dialog.uac_pending_reply=!1)})))}},{key:"_receiveResponse",value:function(e){var t=this;408===e.status_code||481===e.status_code?this._eventHandlers.onDialogError(e):e.method===i.INVITE&&491===e.status_code?this._reattempt?e.status_code>=200&&e.status_code<300?this._eventHandlers.onSuccessResponse(e):e.status_code>=300&&this._eventHandlers.onErrorResponse(e):(this._request.cseq=this._dialog.local_seqnum+=1,this._reattemptTimer=setTimeout((function(){t._dialog.owner.status!==a.C.STATUS_TERMINATED&&(t._reattempt=!0,t._request_sender.send())}),1e3)):e.status_code>=200&&e.status_code<300?this._eventHandlers.onSuccessResponse(e):e.status_code>=300&&this._eventHandlers.onErrorResponse(e)}}])&&r(t.prototype,n),e}()},{"../Constants":2,"../RTCSession":15,"../RequestSender":21,"../Transactions":26}],5:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("./Logger"),o=e("./Utils"),a=new i("DigestAuthentication");t.exports=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._credentials=t,this._cnonce=null,this._nc=0,this._ncHex="00000000",this._algorithm=null,this._realm=null,this._nonce=null,this._opaque=null,this._stale=null,this._qop=null,this._method=null,this._uri=null,this._ha1=null,this._response=null}var t,n;return t=e,(n=[{key:"get",value:function(e){switch(e){case"realm":return this._realm;case"ha1":return this._ha1;default:return void a.warn('get() | cannot get "%s" parameter',e)}}},{key:"authenticate",value:function(e,t){var n=e.method,r=e.ruri,i=e.body,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this._algorithm=t.algorithm,this._realm=t.realm,this._nonce=t.nonce,this._opaque=t.opaque,this._stale=t.stale,this._algorithm){if("MD5"!==this._algorithm)return a.warn('authenticate() | challenge with Digest algorithm different than "MD5", authentication aborted'),!1}else this._algorithm="MD5";if(!this._nonce)return a.warn("authenticate() | challenge without Digest nonce, authentication aborted"),!1;if(!this._realm)return a.warn("authenticate() | challenge without Digest realm, authentication aborted"),!1;if(!this._credentials.password){if(!this._credentials.ha1)return a.warn("authenticate() | no plain SIP password nor ha1 provided, authentication aborted"),!1;if(this._credentials.realm!==this._realm)return a.warn('authenticate() | no plain SIP password, and stored `realm` does not match the given `realm`, cannot authenticate [stored:"%s", given:"%s"]',this._credentials.realm,this._realm),!1}if(t.qop)if(t.qop.indexOf("auth-int")>-1)this._qop="auth-int";else{if(!(t.qop.indexOf("auth")>-1))return a.warn('authenticate() | challenge without Digest qop different than "auth" or "auth-int", authentication aborted'),!1;this._qop="auth"}else this._qop=null;this._method=n,this._uri=r,this._cnonce=s||o.createRandomToken(12),this._nc+=1;var u,l,c=Number(this._nc).toString(16);return this._ncHex="00000000".substr(0,8-c.length)+c,4294967296===this._nc&&(this._nc=1,this._ncHex="00000001"),this._credentials.password?this._ha1=o.calculateMD5("".concat(this._credentials.username,":").concat(this._realm,":").concat(this._credentials.password)):this._ha1=this._credentials.ha1,"auth"===this._qop?(u="".concat(this._method,":").concat(this._uri),l=o.calculateMD5(u),a.debug('authenticate() | using qop=auth [a2:"%s"]',u),this._response=o.calculateMD5("".concat(this._ha1,":").concat(this._nonce,":").concat(this._ncHex,":").concat(this._cnonce,":auth:").concat(l))):"auth-int"===this._qop?(u="".concat(this._method,":").concat(this._uri,":").concat(o.calculateMD5(i||"")),l=o.calculateMD5(u),a.debug('authenticate() | using qop=auth-int [a2:"%s"]',u),this._response=o.calculateMD5("".concat(this._ha1,":").concat(this._nonce,":").concat(this._ncHex,":").concat(this._cnonce,":auth-int:").concat(l))):null===this._qop&&(u="".concat(this._method,":").concat(this._uri),l=o.calculateMD5(u),a.debug('authenticate() | using qop=null [a2:"%s"]',u),this._response=o.calculateMD5("".concat(this._ha1,":").concat(this._nonce,":").concat(l))),a.debug("authenticate() | response generated"),!0}},{key:"toString",value:function(){var e=[];if(!this._response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm=".concat(this._algorithm)),e.push('username="'.concat(this._credentials.username,'"')),e.push('realm="'.concat(this._realm,'"')),e.push('nonce="'.concat(this._nonce,'"')),e.push('uri="'.concat(this._uri,'"')),e.push('response="'.concat(this._response,'"')),this._opaque&&e.push('opaque="'.concat(this._opaque,'"')),this._qop&&(e.push("qop=".concat(this._qop)),e.push('cnonce="'.concat(this._cnonce,'"')),e.push("nc=".concat(this._ncHex))),"Digest ".concat(e.join(", "))}}])&&r(t.prototype,n),e}()},{"./Logger":9,"./Utils":30}],6:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}function a(e){var t=c();return function(){var n,i=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),d(r,e)})(e)}function l(e,t,n){return(l=c()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&d(i,n.prototype),i}).apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){o(n,s(Error));var t=a(n);function n(e,r){var o;return i(this,n),(o=t.call(this)).code=1,o.name="CONFIGURATION_ERROR",o.parameter=e,o.value=r,o.message=o.value?"Invalid value ".concat(JSON.stringify(o.value),' for parameter "').concat(o.parameter,'"'):"Missing parameter: ".concat(o.parameter),o}return n}(),m=function(e){o(n,s(Error));var t=a(n);function n(e){var r;return i(this,n),(r=t.call(this)).code=2,r.name="INVALID_STATE_ERROR",r.status=e,r.message="Invalid status: ".concat(e),r}return n}(),p=function(e){o(n,s(Error));var t=a(n);function n(e){var r;return i(this,n),(r=t.call(this)).code=3,r.name="NOT_SUPPORTED_ERROR",r.message=e,r}return n}(),_=function(e){o(n,s(Error));var t=a(n);function n(e){var r;return i(this,n),(r=t.call(this)).code=4,r.name="NOT_READY_ERROR",r.message=e,r}return n}();t.exports={ConfigurationError:f,InvalidStateError:m,NotSupportedError:p,NotReadyError:_}},{}],7:[function(e,t,n){t.exports=function(){function t(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var n={parse:function(n,r){var i={CRLF:c,DIGIT:d,ALPHA:h,HEXDIG:f,WSP:m,OCTET:p,DQUOTE:_,SP:g,HTAB:y,alphanum:v,reserved:M,unreserved:T,mark:b,escaped:w,LWS:D,SWS:L,HCOLON:S,TEXT_UTF8_TRIM:k,TEXT_UTF8char:A,UTF8_NONASCII:E,UTF8_CONT:I,LHEX:function(){var e;return null===(e=d())&&(/^[a-f]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[a-f]"))),e},token:N,token_nodot:x,separators:function(){var e;return 40===n.charCodeAt(o)?(e="(",o++):(e=null,0===a&&l('"("')),null===e&&(41===n.charCodeAt(o)?(e=")",o++):(e=null,0===a&&l('")"')),null===e&&(60===n.charCodeAt(o)?(e="<",o++):(e=null,0===a&&l('"<"')),null===e&&(62===n.charCodeAt(o)?(e=">",o++):(e=null,0===a&&l('">"')),null===e&&(64===n.charCodeAt(o)?(e="@",o++):(e=null,0===a&&l('"@"')),null===e&&(44===n.charCodeAt(o)?(e=",",o++):(e=null,0===a&&l('","')),null===e&&(59===n.charCodeAt(o)?(e=";",o++):(e=null,0===a&&l('";"')),null===e&&(58===n.charCodeAt(o)?(e=":",o++):(e=null,0===a&&l('":"')),null===e&&(92===n.charCodeAt(o)?(e="\\",o++):(e=null,0===a&&l('"\\\\"')),null===e&&null===(e=_())&&(47===n.charCodeAt(o)?(e="/",o++):(e=null,0===a&&l('"/"')),null===e&&(91===n.charCodeAt(o)?(e="[",o++):(e=null,0===a&&l('"["')),null===e&&(93===n.charCodeAt(o)?(e="]",o++):(e=null,0===a&&l('"]"')),null===e&&(63===n.charCodeAt(o)?(e="?",o++):(e=null,0===a&&l('"?"')),null===e&&(61===n.charCodeAt(o)?(e="=",o++):(e=null,0===a&&l('"="')),null===e&&(123===n.charCodeAt(o)?(e="{",o++):(e=null,0===a&&l('"{"')),null===e&&(125===n.charCodeAt(o)?(e="}",o++):(e=null,0===a&&l('"}"')),null===e&&null===(e=g())&&(e=y())))))))))))))))),e},word:C,STAR:j,SLASH:Y,EQUAL:O,LPAREN:R,RPAREN:z,RAQUOT:P,LAQUOT:H,COMMA:U,SEMI:F,COLON:W,LDQUOT:Q,RDQUOT:B,comment:function e(){var t,n,r,i;if(i=o,null!==(t=R())){for(n=[],null===(r=q())&&null===(r=Z())&&(r=e());null!==r;)n.push(r),null===(r=q())&&null===(r=Z())&&(r=e());null!==n&&null!==(r=z())?t=[t,n,r]:(t=null,o=i)}else t=null,o=i;return t},ctext:q,quoted_string:V,quoted_string_clean:G,qdtext:J,quoted_pair:Z,SIP_URI_noparams:K,SIP_URI:X,uri_scheme:$,uri_scheme_sips:ee,uri_scheme_sip:te,userinfo:ne,user:re,user_unreserved:ie,password:oe,hostport:ae,host:se,hostname:ue,domainlabel:le,toplabel:ce,IPv6reference:de,IPv6address:he,h16:fe,ls32:me,IPv4address:pe,dec_octet:_e,port:ge,uri_parameters:ye,uri_parameter:ve,transport_param:Me,user_param:Te,method_param:be,ttl_param:we,maddr_param:De,lr_param:Le,other_param:Se,pname:ke,pvalue:Ae,paramchar:Ee,param_unreserved:Ie,headers:Ne,header:xe,hname:Ce,hvalue:je,hnv_unreserved:Ye,Request_Response:function(){var e;return null===(e=dt())&&(e=Oe()),e},Request_Line:Oe,Request_URI:Re,absoluteURI:ze,hier_part:Pe,net_path:He,abs_path:Ue,opaque_part:Fe,uric:We,uric_no_slash:Qe,path_segments:Be,segment:qe,param:Ve,pchar:Ge,scheme:Je,authority:Ze,srvr:Ke,reg_name:Xe,query:$e,SIP_Version:et,INVITEm:tt,ACKm:nt,OPTIONSm:rt,BYEm:it,CANCELm:ot,REGISTERm:at,SUBSCRIBEm:st,NOTIFYm:ut,REFERm:lt,Method:ct,Status_Line:dt,Status_Code:ht,extension_code:ft,Reason_Phrase:mt,Allow_Events:function(){var e,t,n,r,i,a;if(i=o,null!==(e=zt())){for(t=[],a=o,null!==(n=U())&&null!==(r=zt())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=U())&&null!==(r=zt())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},Call_ID:function(){var e,t,r,i,s,u,c;return i=o,s=o,null!==(e=C())?(u=o,64===n.charCodeAt(o)?(t="@",o++):(t=null,0===a&&l('"@"')),null!==t&&null!==(r=C())?t=[t,r]:(t=null,o=u),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=s)):(e=null,o=s),null!==e&&(c=i,e=void(Un=n.substring(o,c))),null===e&&(o=i),e},Contact:function(){var e,t,n,r,i,a,s;if(i=o,null===(e=j()))if(a=o,null!==(e=pt())){for(t=[],s=o,null!==(n=U())&&null!==(r=pt())?n=[n,r]:(n=null,o=s);null!==n;)t.push(n),s=o,null!==(n=U())&&null!==(r=pt())?n=[n,r]:(n=null,o=s);null!==t?e=[e,t]:(e=null,o=a)}else e=null,o=a;return null!==e&&(e=function(e){var t,n;for(n=Un.multi_header.length,t=0;t<n;t++)if(null===Un.multi_header[t].parsed){Un=null;break}Un=null!==Un?Un.multi_header:-1}()),null===e&&(o=i),e},contact_param:pt,name_addr:_t,display_name:gt,contact_params:yt,c_p_q:vt,c_p_expires:Mt,delta_seconds:Tt,qvalue:bt,generic_param:wt,gen_value:Dt,Content_Disposition:function(){var e,t,n,r,i,a;if(i=o,null!==(e=Lt())){for(t=[],a=o,null!==(n=F())&&null!==(r=St())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=F())&&null!==(r=St())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},disp_type:Lt,disp_param:St,handling_param:kt,Content_Encoding:function(){var e,t,n,r,i,a;if(i=o,null!==(e=N())){for(t=[],a=o,null!==(n=U())&&null!==(r=N())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=U())&&null!==(r=N())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},Content_Length:function(){var e,t,n;if(n=o,null!==(t=d()))for(e=[];null!==t;)e.push(t),t=d();else e=null;return null!==e&&(e=void(Un=parseInt(e.join("")))),null===e&&(o=n),e},Content_Type:function(){var e,t,r;return t=o,null!==(e=At())&&(r=t,e=void(Un=n.substring(o,r))),null===e&&(o=t),e},media_type:At,m_type:Et,discrete_type:It,composite_type:Nt,extension_token:xt,x_token:Ct,m_subtype:jt,m_parameter:Yt,m_value:Ot,CSeq:function(){var e,t,n,r;return r=o,null!==(e=Rt())&&null!==(t=D())&&null!==(n=ct())?e=[e,t,n]:(e=null,o=r),e},CSeq_value:Rt,Expires:function(){var e,t;return t=o,null!==(e=Tt())&&(e=void(Un=e)),null===e&&(o=t),e},Event:function(){var e,t,n,r,i,a,s,u;if(i=o,a=o,null!==(e=zt())){for(t=[],s=o,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,o=s);null!==n;)t.push(n),s=o,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,o=s);null!==t?e=[e,t]:(e=null,o=a)}else e=null,o=a;return null!==e&&(u=e[0],e=void(Un.event=u.join("").toLowerCase())),null===e&&(o=i),e},event_type:zt,From:function(){var e,t,n,r,i,a,s;if(i=o,a=o,null===(e=K())&&(e=_t()),null!==e){for(t=[],s=o,null!==(n=F())&&null!==(r=Pt())?n=[n,r]:(n=null,o=s);null!==n;)t.push(n),s=o,null!==(n=F())&&null!==(r=Pt())?n=[n,r]:(n=null,o=s);null!==t?e=[e,t]:(e=null,o=a)}else e=null,o=a;return null!==e&&(e=function(e){var t=Un.tag;try{Un=new Hn(Un.uri,Un.display_name,Un.params),t&&Un.setParam("tag",t)}catch(e){Un=-1}}()),null===e&&(o=i),e},from_param:Pt,tag_param:Ht,Max_Forwards:function(){var e,t,n;if(n=o,null!==(t=d()))for(e=[];null!==t;)e.push(t),t=d();else e=null;return null!==e&&(e=void(Un=parseInt(e.join("")))),null===e&&(o=n),e},Min_Expires:function(){var e,t;return t=o,null!==(e=Tt())&&(e=void(Un=e)),null===e&&(o=t),e},Name_Addr_Header:function(){var e,t,n,r,i,a,s,u,l,c;for(u=o,l=o,e=[],t=gt();null!==t;)e.push(t),t=gt();if(null!==e)if(null!==(t=H()))if(null!==(n=X()))if(null!==(r=P())){for(i=[],c=o,null!==(a=F())&&null!==(s=wt())?a=[a,s]:(a=null,o=c);null!==a;)i.push(a),c=o,null!==(a=F())&&null!==(s=wt())?a=[a,s]:(a=null,o=c);null!==i?e=[e,t,n,r,i]:(e=null,o=l)}else e=null,o=l;else e=null,o=l;else e=null,o=l;else e=null,o=l;return null!==e&&(e=function(e){try{Un=new Hn(Un.uri,Un.display_name,Un.params)}catch(e){Un=-1}}()),null===e&&(o=u),e},Proxy_Authenticate:function(){return Ut()},challenge:Ut,other_challenge:Ft,auth_param:Wt,digest_cln:Qt,realm:Bt,realm_value:qt,domain:Vt,URI:Gt,nonce:Jt,nonce_value:Zt,opaque:Kt,stale:Xt,algorithm:$t,qop_options:en,qop_value:tn,Proxy_Require:function(){var e,t,n,r,i,a;if(i=o,null!==(e=N())){for(t=[],a=o,null!==(n=U())&&null!==(r=N())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=U())&&null!==(r=N())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},Record_Route:function(){var e,t,n,r,i,a,s;if(i=o,a=o,null!==(e=nn())){for(t=[],s=o,null!==(n=U())&&null!==(r=nn())?n=[n,r]:(n=null,o=s);null!==n;)t.push(n),s=o,null!==(n=U())&&null!==(r=nn())?n=[n,r]:(n=null,o=s);null!==t?e=[e,t]:(e=null,o=a)}else e=null,o=a;return null!==e&&(e=function(e){var t,n;for(n=Un.multi_header.length,t=0;t<n;t++)if(null===Un.multi_header[t].parsed){Un=null;break}Un=null!==Un?Un.multi_header:-1}()),null===e&&(o=i),e},rec_route:nn,Reason:function(){var e,t,r,i,s,u,c;if(s=o,u=o,"sip"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"SIP"')),null===e&&(e=N()),null!==e){for(t=[],c=o,null!==(r=F())&&null!==(i=rn())?r=[r,i]:(r=null,o=c);null!==r;)t.push(r),c=o,null!==(r=F())&&null!==(i=rn())?r=[r,i]:(r=null,o=c);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return null!==e&&(e=function(e,t){if(Un.protocol=t.toLowerCase(),Un.params||(Un.params={}),Un.params.text&&'"'===Un.params.text[0]){var n=Un.params.text;Un.text=n.substring(1,n.length-1),delete Un.params.text}}(0,e[0])),null===e&&(o=s),e},reason_param:rn,reason_cause:on,Require:function(){var e,t,n,r,i,a;if(i=o,null!==(e=N())){for(t=[],a=o,null!==(n=U())&&null!==(r=N())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=U())&&null!==(r=N())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},Route:function(){var e,t,n,r,i,a;if(i=o,null!==(e=an())){for(t=[],a=o,null!==(n=U())&&null!==(r=an())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=U())&&null!==(r=an())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},route_param:an,Subscription_State:function(){var e,t,n,r,i,a;if(i=o,null!==(e=sn())){for(t=[],a=o,null!==(n=F())&&null!==(r=un())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=F())&&null!==(r=un())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},substate_value:sn,subexp_params:un,event_reason_value:ln,Subject:function(){var e;return null!==(e=k())?e:""},Supported:function(){var e,t,n,r,i,a;if(i=o,null!==(e=N())){for(t=[],a=o,null!==(n=U())&&null!==(r=N())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=U())&&null!==(r=N())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return null!==e?e:""},To:function(){var e,t,n,r,i,a,s;if(i=o,a=o,null===(e=K())&&(e=_t()),null!==e){for(t=[],s=o,null!==(n=F())&&null!==(r=cn())?n=[n,r]:(n=null,o=s);null!==n;)t.push(n),s=o,null!==(n=F())&&null!==(r=cn())?n=[n,r]:(n=null,o=s);null!==t?e=[e,t]:(e=null,o=a)}else e=null,o=a;return null!==e&&(e=function(e){var t=Un.tag;try{Un=new Hn(Un.uri,Un.display_name,Un.params),t&&Un.setParam("tag",t)}catch(e){Un=-1}}()),null===e&&(o=i),e},to_param:cn,Via:function(){var e,t,n,r,i,a;if(i=o,null!==(e=dn())){for(t=[],a=o,null!==(n=U())&&null!==(r=dn())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=U())&&null!==(r=dn())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},via_param:dn,via_params:hn,via_ttl:fn,via_maddr:mn,via_received:pn,via_branch:_n,response_port:gn,rport:yn,sent_protocol:vn,protocol_name:Mn,transport:Tn,sent_by:bn,via_host:wn,via_port:Dn,ttl:Ln,WWW_Authenticate:function(){return Ut()},Session_Expires:function(){var e,t,n,r,i,a;if(i=o,null!==(e=Sn())){for(t=[],a=o,null!==(n=F())&&null!==(r=kn())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=F())&&null!==(r=kn())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},s_e_expires:Sn,s_e_params:kn,s_e_refresher:An,extension_header:function(){var e,t,n,r;return r=o,null!==(e=N())&&null!==(t=S())&&null!==(n=En())?e=[e,t,n]:(e=null,o=r),e},header_value:En,message_body:function(){var e,t;for(e=[],t=p();null!==t;)e.push(t),t=p();return e},uuid_URI:function(){var e,t,r;return r=o,"uuid:"===n.substr(o,5)?(e="uuid:",o+=5):(e=null,0===a&&l('"uuid:"')),null!==e&&null!==(t=In())?e=[e,t]:(e=null,o=r),e},uuid:In,hex4:Nn,hex8:xn,hex12:Cn,Refer_To:function(){var e,t,n,r,i,a,s;if(i=o,a=o,null===(e=K())&&(e=_t()),null!==e){for(t=[],s=o,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,o=s);null!==n;)t.push(n),s=o,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,o=s);null!==t?e=[e,t]:(e=null,o=a)}else e=null,o=a;return null!==e&&(e=function(e){try{Un=new Hn(Un.uri,Un.display_name,Un.params)}catch(e){Un=-1}}()),null===e&&(o=i),e},Replaces:function(){var e,t,n,r,i,a;if(i=o,null!==(e=jn())){for(t=[],a=o,null!==(n=F())&&null!==(r=Yn())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=F())&&null!==(r=Yn())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e},call_id:jn,replaces_param:Yn,to_tag:On,from_tag:Rn,early_flag:zn};if(void 0!==r){if(void 0===i[r])throw new Error("Invalid rule name: "+t(r)+".")}else r="CRLF";var o=0,a=0,s=0,u=[];function l(e){o<s||(o>s&&(s=o,u=[]),u.push(e))}function c(){var e;return"\r\n"===n.substr(o,2)?(e="\r\n",o+=2):(e=null,0===a&&l('"\\r\\n"')),e}function d(){var e;return/^[0-9]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[0-9]")),e}function h(){var e;return/^[a-zA-Z]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[a-zA-Z]")),e}function f(){var e;return/^[0-9a-fA-F]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[0-9a-fA-F]")),e}function m(){var e;return null===(e=g())&&(e=y()),e}function p(){var e;return/^[\0-\xFF]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[\\0-\\xFF]")),e}function _(){var e;return/^["]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l('["]')),e}function g(){var e;return 32===n.charCodeAt(o)?(e=" ",o++):(e=null,0===a&&l('" "')),e}function y(){var e;return 9===n.charCodeAt(o)?(e="\t",o++):(e=null,0===a&&l('"\\t"')),e}function v(){var e;return/^[a-zA-Z0-9]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[a-zA-Z0-9]")),e}function M(){var e;return 59===n.charCodeAt(o)?(e=";",o++):(e=null,0===a&&l('";"')),null===e&&(47===n.charCodeAt(o)?(e="/",o++):(e=null,0===a&&l('"/"')),null===e&&(63===n.charCodeAt(o)?(e="?",o++):(e=null,0===a&&l('"?"')),null===e&&(58===n.charCodeAt(o)?(e=":",o++):(e=null,0===a&&l('":"')),null===e&&(64===n.charCodeAt(o)?(e="@",o++):(e=null,0===a&&l('"@"')),null===e&&(38===n.charCodeAt(o)?(e="&",o++):(e=null,0===a&&l('"&"')),null===e&&(61===n.charCodeAt(o)?(e="=",o++):(e=null,0===a&&l('"="')),null===e&&(43===n.charCodeAt(o)?(e="+",o++):(e=null,0===a&&l('"+"')),null===e&&(36===n.charCodeAt(o)?(e="$",o++):(e=null,0===a&&l('"$"')),null===e&&(44===n.charCodeAt(o)?(e=",",o++):(e=null,0===a&&l('","'))))))))))),e}function T(){var e;return null===(e=v())&&(e=b()),e}function b(){var e;return 45===n.charCodeAt(o)?(e="-",o++):(e=null,0===a&&l('"-"')),null===e&&(95===n.charCodeAt(o)?(e="_",o++):(e=null,0===a&&l('"_"')),null===e&&(46===n.charCodeAt(o)?(e=".",o++):(e=null,0===a&&l('"."')),null===e&&(33===n.charCodeAt(o)?(e="!",o++):(e=null,0===a&&l('"!"')),null===e&&(126===n.charCodeAt(o)?(e="~",o++):(e=null,0===a&&l('"~"')),null===e&&(42===n.charCodeAt(o)?(e="*",o++):(e=null,0===a&&l('"*"')),null===e&&(39===n.charCodeAt(o)?(e="'",o++):(e=null,0===a&&l('"\'"')),null===e&&(40===n.charCodeAt(o)?(e="(",o++):(e=null,0===a&&l('"("')),null===e&&(41===n.charCodeAt(o)?(e=")",o++):(e=null,0===a&&l('")"')))))))))),e}function w(){var e,t,r,i,s;return i=o,s=o,37===n.charCodeAt(o)?(e="%",o++):(e=null,0===a&&l('"%"')),null!==e&&null!==(t=f())&&null!==(r=f())?e=[e,t,r]:(e=null,o=s),null!==e&&(e=e.join("")),null===e&&(o=i),e}function D(){var e,t,n,r,i,a;for(r=o,i=o,a=o,e=[],t=m();null!==t;)e.push(t),t=m();if(null!==e&&null!==(t=c())?e=[e,t]:(e=null,o=a),null!==(e=null!==e?e:"")){if(null!==(n=m()))for(t=[];null!==n;)t.push(n),n=m();else t=null;null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return null!==e&&(e=" "),null===e&&(o=r),e}function L(){var e;return null!==(e=D())?e:""}function S(){var e,t,r,i,s;for(i=o,s=o,e=[],null===(t=g())&&(t=y());null!==t;)e.push(t),null===(t=g())&&(t=y());return null!==e?(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=L())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e=":"),null===e&&(o=i),e}function k(){var e,t,r,i,a,s,u,l;if(a=o,s=o,null!==(t=A()))for(e=[];null!==t;)e.push(t),t=A();else e=null;if(null!==e){for(t=[],u=o,r=[],i=D();null!==i;)r.push(i),i=D();for(null!==r&&null!==(i=A())?r=[r,i]:(r=null,o=u);null!==r;){for(t.push(r),u=o,r=[],i=D();null!==i;)r.push(i),i=D();null!==r&&null!==(i=A())?r=[r,i]:(r=null,o=u)}null!==t?e=[e,t]:(e=null,o=s)}else e=null,o=s;return null!==e&&(l=a,e=n.substring(o,l)),null===e&&(o=a),e}function A(){var e;return/^[!-~]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[!-~]")),null===e&&(e=E()),e}function E(){var e;return/^[\x80-\uFFFF]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[\\x80-\\uFFFF]")),e}function I(){var e;return/^[\x80-\xBF]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[\\x80-\\xBF]")),e}function N(){var e,t,r,i;if(r=o,null===(t=v())&&(45===n.charCodeAt(o)?(t="-",o++):(t=null,0===a&&l('"-"')),null===t&&(46===n.charCodeAt(o)?(t=".",o++):(t=null,0===a&&l('"."')),null===t&&(33===n.charCodeAt(o)?(t="!",o++):(t=null,0===a&&l('"!"')),null===t&&(37===n.charCodeAt(o)?(t="%",o++):(t=null,0===a&&l('"%"')),null===t&&(42===n.charCodeAt(o)?(t="*",o++):(t=null,0===a&&l('"*"')),null===t&&(95===n.charCodeAt(o)?(t="_",o++):(t=null,0===a&&l('"_"')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"')),null===t&&(96===n.charCodeAt(o)?(t="`",o++):(t=null,0===a&&l('"`"')),null===t&&(39===n.charCodeAt(o)?(t="'",o++):(t=null,0===a&&l('"\'"')),null===t&&(126===n.charCodeAt(o)?(t="~",o++):(t=null,0===a&&l('"~"')))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=v())&&(45===n.charCodeAt(o)?(t="-",o++):(t=null,0===a&&l('"-"')),null===t&&(46===n.charCodeAt(o)?(t=".",o++):(t=null,0===a&&l('"."')),null===t&&(33===n.charCodeAt(o)?(t="!",o++):(t=null,0===a&&l('"!"')),null===t&&(37===n.charCodeAt(o)?(t="%",o++):(t=null,0===a&&l('"%"')),null===t&&(42===n.charCodeAt(o)?(t="*",o++):(t=null,0===a&&l('"*"')),null===t&&(95===n.charCodeAt(o)?(t="_",o++):(t=null,0===a&&l('"_"')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"')),null===t&&(96===n.charCodeAt(o)?(t="`",o++):(t=null,0===a&&l('"`"')),null===t&&(39===n.charCodeAt(o)?(t="'",o++):(t=null,0===a&&l('"\'"')),null===t&&(126===n.charCodeAt(o)?(t="~",o++):(t=null,0===a&&l('"~"'))))))))))));else e=null;return null!==e&&(i=r,e=n.substring(o,i)),null===e&&(o=r),e}function x(){var e,t,r,i;if(r=o,null===(t=v())&&(45===n.charCodeAt(o)?(t="-",o++):(t=null,0===a&&l('"-"')),null===t&&(33===n.charCodeAt(o)?(t="!",o++):(t=null,0===a&&l('"!"')),null===t&&(37===n.charCodeAt(o)?(t="%",o++):(t=null,0===a&&l('"%"')),null===t&&(42===n.charCodeAt(o)?(t="*",o++):(t=null,0===a&&l('"*"')),null===t&&(95===n.charCodeAt(o)?(t="_",o++):(t=null,0===a&&l('"_"')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"')),null===t&&(96===n.charCodeAt(o)?(t="`",o++):(t=null,0===a&&l('"`"')),null===t&&(39===n.charCodeAt(o)?(t="'",o++):(t=null,0===a&&l('"\'"')),null===t&&(126===n.charCodeAt(o)?(t="~",o++):(t=null,0===a&&l('"~"'))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=v())&&(45===n.charCodeAt(o)?(t="-",o++):(t=null,0===a&&l('"-"')),null===t&&(33===n.charCodeAt(o)?(t="!",o++):(t=null,0===a&&l('"!"')),null===t&&(37===n.charCodeAt(o)?(t="%",o++):(t=null,0===a&&l('"%"')),null===t&&(42===n.charCodeAt(o)?(t="*",o++):(t=null,0===a&&l('"*"')),null===t&&(95===n.charCodeAt(o)?(t="_",o++):(t=null,0===a&&l('"_"')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"')),null===t&&(96===n.charCodeAt(o)?(t="`",o++):(t=null,0===a&&l('"`"')),null===t&&(39===n.charCodeAt(o)?(t="'",o++):(t=null,0===a&&l('"\'"')),null===t&&(126===n.charCodeAt(o)?(t="~",o++):(t=null,0===a&&l('"~"')))))))))));else e=null;return null!==e&&(i=r,e=n.substring(o,i)),null===e&&(o=r),e}function C(){var e,t,r,i;if(r=o,null===(t=v())&&(45===n.charCodeAt(o)?(t="-",o++):(t=null,0===a&&l('"-"')),null===t&&(46===n.charCodeAt(o)?(t=".",o++):(t=null,0===a&&l('"."')),null===t&&(33===n.charCodeAt(o)?(t="!",o++):(t=null,0===a&&l('"!"')),null===t&&(37===n.charCodeAt(o)?(t="%",o++):(t=null,0===a&&l('"%"')),null===t&&(42===n.charCodeAt(o)?(t="*",o++):(t=null,0===a&&l('"*"')),null===t&&(95===n.charCodeAt(o)?(t="_",o++):(t=null,0===a&&l('"_"')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"')),null===t&&(96===n.charCodeAt(o)?(t="`",o++):(t=null,0===a&&l('"`"')),null===t&&(39===n.charCodeAt(o)?(t="'",o++):(t=null,0===a&&l('"\'"')),null===t&&(126===n.charCodeAt(o)?(t="~",o++):(t=null,0===a&&l('"~"')),null===t&&(40===n.charCodeAt(o)?(t="(",o++):(t=null,0===a&&l('"("')),null===t&&(41===n.charCodeAt(o)?(t=")",o++):(t=null,0===a&&l('")"')),null===t&&(60===n.charCodeAt(o)?(t="<",o++):(t=null,0===a&&l('"<"')),null===t&&(62===n.charCodeAt(o)?(t=">",o++):(t=null,0===a&&l('">"')),null===t&&(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null===t&&(92===n.charCodeAt(o)?(t="\\",o++):(t=null,0===a&&l('"\\\\"')),null===t&&null===(t=_())&&(47===n.charCodeAt(o)?(t="/",o++):(t=null,0===a&&l('"/"')),null===t&&(91===n.charCodeAt(o)?(t="[",o++):(t=null,0===a&&l('"["')),null===t&&(93===n.charCodeAt(o)?(t="]",o++):(t=null,0===a&&l('"]"')),null===t&&(63===n.charCodeAt(o)?(t="?",o++):(t=null,0===a&&l('"?"')),null===t&&(123===n.charCodeAt(o)?(t="{",o++):(t=null,0===a&&l('"{"')),null===t&&(125===n.charCodeAt(o)?(t="}",o++):(t=null,0===a&&l('"}"')))))))))))))))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=v())&&(45===n.charCodeAt(o)?(t="-",o++):(t=null,0===a&&l('"-"')),null===t&&(46===n.charCodeAt(o)?(t=".",o++):(t=null,0===a&&l('"."')),null===t&&(33===n.charCodeAt(o)?(t="!",o++):(t=null,0===a&&l('"!"')),null===t&&(37===n.charCodeAt(o)?(t="%",o++):(t=null,0===a&&l('"%"')),null===t&&(42===n.charCodeAt(o)?(t="*",o++):(t=null,0===a&&l('"*"')),null===t&&(95===n.charCodeAt(o)?(t="_",o++):(t=null,0===a&&l('"_"')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"')),null===t&&(96===n.charCodeAt(o)?(t="`",o++):(t=null,0===a&&l('"`"')),null===t&&(39===n.charCodeAt(o)?(t="'",o++):(t=null,0===a&&l('"\'"')),null===t&&(126===n.charCodeAt(o)?(t="~",o++):(t=null,0===a&&l('"~"')),null===t&&(40===n.charCodeAt(o)?(t="(",o++):(t=null,0===a&&l('"("')),null===t&&(41===n.charCodeAt(o)?(t=")",o++):(t=null,0===a&&l('")"')),null===t&&(60===n.charCodeAt(o)?(t="<",o++):(t=null,0===a&&l('"<"')),null===t&&(62===n.charCodeAt(o)?(t=">",o++):(t=null,0===a&&l('">"')),null===t&&(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null===t&&(92===n.charCodeAt(o)?(t="\\",o++):(t=null,0===a&&l('"\\\\"')),null===t&&null===(t=_())&&(47===n.charCodeAt(o)?(t="/",o++):(t=null,0===a&&l('"/"')),null===t&&(91===n.charCodeAt(o)?(t="[",o++):(t=null,0===a&&l('"["')),null===t&&(93===n.charCodeAt(o)?(t="]",o++):(t=null,0===a&&l('"]"')),null===t&&(63===n.charCodeAt(o)?(t="?",o++):(t=null,0===a&&l('"?"')),null===t&&(123===n.charCodeAt(o)?(t="{",o++):(t=null,0===a&&l('"{"')),null===t&&(125===n.charCodeAt(o)?(t="}",o++):(t=null,0===a&&l('"}"'))))))))))))))))))))))));else e=null;return null!==e&&(i=r,e=n.substring(o,i)),null===e&&(o=r),e}function j(){var e,t,r,i,s;return i=o,s=o,null!==(e=L())?(42===n.charCodeAt(o)?(t="*",o++):(t=null,0===a&&l('"*"')),null!==t&&null!==(r=L())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e="*"),null===e&&(o=i),e}function Y(){var e,t,r,i,s;return i=o,s=o,null!==(e=L())?(47===n.charCodeAt(o)?(t="/",o++):(t=null,0===a&&l('"/"')),null!==t&&null!==(r=L())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e="/"),null===e&&(o=i),e}function O(){var e,t,r,i,s;return i=o,s=o,null!==(e=L())?(61===n.charCodeAt(o)?(t="=",o++):(t=null,0===a&&l('"="')),null!==t&&null!==(r=L())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e="="),null===e&&(o=i),e}function R(){var e,t,r,i,s;return i=o,s=o,null!==(e=L())?(40===n.charCodeAt(o)?(t="(",o++):(t=null,0===a&&l('"("')),null!==t&&null!==(r=L())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e="("),null===e&&(o=i),e}function z(){var e,t,r,i,s;return i=o,s=o,null!==(e=L())?(41===n.charCodeAt(o)?(t=")",o++):(t=null,0===a&&l('")"')),null!==t&&null!==(r=L())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e=")"),null===e&&(o=i),e}function P(){var e,t,r,i;return r=o,i=o,62===n.charCodeAt(o)?(e=">",o++):(e=null,0===a&&l('">"')),null!==e&&null!==(t=L())?e=[e,t]:(e=null,o=i),null!==e&&(e=">"),null===e&&(o=r),e}function H(){var e,t,r,i;return r=o,i=o,null!==(e=L())?(60===n.charCodeAt(o)?(t="<",o++):(t=null,0===a&&l('"<"')),null!==t?e=[e,t]:(e=null,o=i)):(e=null,o=i),null!==e&&(e="<"),null===e&&(o=r),e}function U(){var e,t,r,i,s;return i=o,s=o,null!==(e=L())?(44===n.charCodeAt(o)?(t=",",o++):(t=null,0===a&&l('","')),null!==t&&null!==(r=L())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e=","),null===e&&(o=i),e}function F(){var e,t,r,i,s;return i=o,s=o,null!==(e=L())?(59===n.charCodeAt(o)?(t=";",o++):(t=null,0===a&&l('";"')),null!==t&&null!==(r=L())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e=";"),null===e&&(o=i),e}function W(){var e,t,r,i,s;return i=o,s=o,null!==(e=L())?(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=L())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e=":"),null===e&&(o=i),e}function Q(){var e,t,n,r;return n=o,r=o,null!==(e=L())&&null!==(t=_())?e=[e,t]:(e=null,o=r),null!==e&&(e='"'),null===e&&(o=n),e}function B(){var e,t,n,r;return n=o,r=o,null!==(e=_())&&null!==(t=L())?e=[e,t]:(e=null,o=r),null!==e&&(e='"'),null===e&&(o=n),e}function q(){var e;return/^[!-']/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[!-']")),null===e&&(/^[*-[]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[*-[]")),null===e&&(/^[\]-~]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[\\]-~]")),null===e&&null===(e=E())&&(e=D()))),e}function V(){var e,t,r,i,a,s,u;if(a=o,s=o,null!==(e=L()))if(null!==(t=_())){for(r=[],null===(i=J())&&(i=Z());null!==i;)r.push(i),null===(i=J())&&(i=Z());null!==r&&null!==(i=_())?e=[e,t,r,i]:(e=null,o=s)}else e=null,o=s;else e=null,o=s;return null!==e&&(u=a,e=n.substring(o,u)),null===e&&(o=a),e}function G(){var e,t,r,i,a,s,u,l;if(a=o,s=o,null!==(e=L()))if(null!==(t=_())){for(r=[],null===(i=J())&&(i=Z());null!==i;)r.push(i),null===(i=J())&&(i=Z());null!==r&&null!==(i=_())?e=[e,t,r,i]:(e=null,o=s)}else e=null,o=s;else e=null,o=s;return null!==e&&(u=a,e=(l=n.substring(o,u).trim()).substring(1,l.length-1).replace(/\\([\x00-\x09\x0b-\x0c\x0e-\x7f])/g,"$1")),null===e&&(o=a),e}function J(){var e;return null===(e=D())&&(33===n.charCodeAt(o)?(e="!",o++):(e=null,0===a&&l('"!"')),null===e&&(/^[#-[]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[#-[]")),null===e&&(/^[\]-~]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[\\]-~]")),null===e&&(e=E())))),e}function Z(){var e,t,r;return r=o,92===n.charCodeAt(o)?(e="\\",o++):(e=null,0===a&&l('"\\\\"')),null!==e?(/^[\0-\t]/.test(n.charAt(o))?(t=n.charAt(o),o++):(t=null,0===a&&l("[\\0-\\t]")),null===t&&(/^[\x0B-\f]/.test(n.charAt(o))?(t=n.charAt(o),o++):(t=null,0===a&&l("[\\x0B-\\f]")),null===t&&(/^[\x0E-]/.test(n.charAt(o))?(t=n.charAt(o),o++):(t=null,0===a&&l("[\\x0E-]")))),null!==t?e=[e,t]:(e=null,o=r)):(e=null,o=r),e}function K(){var e,t,r,i,s,u;return s=o,u=o,null!==(e=$())?(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=null!==(r=ne())?r:"")&&null!==(i=ae())?e=[e,t,r,i]:(e=null,o=u)):(e=null,o=u),null!==e&&(e=function(e){try{Un.uri=new Pn(Un.scheme,Un.user,Un.host,Un.port),delete Un.scheme,delete Un.user,delete Un.host,delete Un.host_type,delete Un.port}catch(e){Un=-1}}()),null===e&&(o=s),e}function X(){var e,t,i,s,u,c,d,h;return d=o,h=o,null!==(e=$())?(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(i=null!==(i=ne())?i:"")&&null!==(s=ae())&&null!==(u=ye())&&null!==(c=null!==(c=Ne())?c:"")?e=[e,t,i,s,u,c]:(e=null,o=h)):(e=null,o=h),null!==e&&(e=function(e){try{Un.uri=new Pn(Un.scheme,Un.user,Un.host,Un.port,Un.uri_params,Un.uri_headers),delete Un.scheme,delete Un.user,delete Un.host,delete Un.host_type,delete Un.port,delete Un.uri_params,"SIP_URI"===r&&(Un=Un.uri)}catch(e){Un=-1}}()),null===e&&(o=d),e}function $(){var e;return null===(e=ee())&&(e=te()),e}function ee(){var e,t,r;return t=o,"sips"===n.substr(o,4).toLowerCase()?(e=n.substr(o,4),o+=4):(e=null,0===a&&l('"sips"')),null!==e&&(r=e,e=void(Un.scheme=r.toLowerCase())),null===e&&(o=t),e}function te(){var e,t,r;return t=o,"sip"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"sip"')),null!==e&&(r=e,e=void(Un.scheme=r.toLowerCase())),null===e&&(o=t),e}function ne(){var e,t,r,i,s,u,c;return i=o,s=o,null!==(e=re())?(u=o,58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=oe())?t=[t,r]:(t=null,o=u),null!==(t=null!==t?t:"")?(64===n.charCodeAt(o)?(r="@",o++):(r=null,0===a&&l('"@"')),null!==r?e=[e,t,r]:(e=null,o=s)):(e=null,o=s)):(e=null,o=s),null!==e&&(c=i,e=void(Un.user=decodeURIComponent(n.substring(o-1,c)))),null===e&&(o=i),e}function re(){var e,t;if(null===(t=T())&&null===(t=w())&&(t=ie()),null!==t)for(e=[];null!==t;)e.push(t),null===(t=T())&&null===(t=w())&&(t=ie());else e=null;return e}function ie(){var e;return 38===n.charCodeAt(o)?(e="&",o++):(e=null,0===a&&l('"&"')),null===e&&(61===n.charCodeAt(o)?(e="=",o++):(e=null,0===a&&l('"="')),null===e&&(43===n.charCodeAt(o)?(e="+",o++):(e=null,0===a&&l('"+"')),null===e&&(36===n.charCodeAt(o)?(e="$",o++):(e=null,0===a&&l('"$"')),null===e&&(44===n.charCodeAt(o)?(e=",",o++):(e=null,0===a&&l('","')),null===e&&(59===n.charCodeAt(o)?(e=";",o++):(e=null,0===a&&l('";"')),null===e&&(63===n.charCodeAt(o)?(e="?",o++):(e=null,0===a&&l('"?"')),null===e&&(47===n.charCodeAt(o)?(e="/",o++):(e=null,0===a&&l('"/"'))))))))),e}function oe(){var e,t,r,i;for(r=o,e=[],null===(t=T())&&null===(t=w())&&(38===n.charCodeAt(o)?(t="&",o++):(t=null,0===a&&l('"&"')),null===t&&(61===n.charCodeAt(o)?(t="=",o++):(t=null,0===a&&l('"="')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"')),null===t&&(36===n.charCodeAt(o)?(t="$",o++):(t=null,0===a&&l('"$"')),null===t&&(44===n.charCodeAt(o)?(t=",",o++):(t=null,0===a&&l('","')))))));null!==t;)e.push(t),null===(t=T())&&null===(t=w())&&(38===n.charCodeAt(o)?(t="&",o++):(t=null,0===a&&l('"&"')),null===t&&(61===n.charCodeAt(o)?(t="=",o++):(t=null,0===a&&l('"="')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"')),null===t&&(36===n.charCodeAt(o)?(t="$",o++):(t=null,0===a&&l('"$"')),null===t&&(44===n.charCodeAt(o)?(t=",",o++):(t=null,0===a&&l('","')))))));return null!==e&&(i=r,e=void(Un.password=n.substring(o,i))),null===e&&(o=r),e}function ae(){var e,t,r,i,s;return i=o,null!==(e=se())?(s=o,58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=ge())?t=[t,r]:(t=null,o=s),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=i)):(e=null,o=i),e}function se(){var e,t,r;return t=o,null===(e=ue())&&null===(e=pe())&&(e=de()),null!==e&&(r=t,Un.host=n.substring(o,r).toLowerCase(),e=Un.host),null===e&&(o=t),e}function ue(){var e,t,r,i,s,u,c;for(i=o,s=o,e=[],u=o,null!==(t=le())?(46===n.charCodeAt(o)?(r=".",o++):(r=null,0===a&&l('"."')),null!==r?t=[t,r]:(t=null,o=u)):(t=null,o=u);null!==t;)e.push(t),u=o,null!==(t=le())?(46===n.charCodeAt(o)?(r=".",o++):(r=null,0===a&&l('"."')),null!==r?t=[t,r]:(t=null,o=u)):(t=null,o=u);return null!==e&&null!==(t=ce())?(46===n.charCodeAt(o)?(r=".",o++):(r=null,0===a&&l('"."')),null!==(r=null!==r?r:"")?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(c=i,Un.host_type="domain",e=n.substring(o,c)),null===e&&(o=i),e}function le(){var e,t,r,i;if(i=o,null!==(e=v())){for(t=[],null===(r=v())&&(45===n.charCodeAt(o)?(r="-",o++):(r=null,0===a&&l('"-"')),null===r&&(95===n.charCodeAt(o)?(r="_",o++):(r=null,0===a&&l('"_"'))));null!==r;)t.push(r),null===(r=v())&&(45===n.charCodeAt(o)?(r="-",o++):(r=null,0===a&&l('"-"')),null===r&&(95===n.charCodeAt(o)?(r="_",o++):(r=null,0===a&&l('"_"'))));null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e}function ce(){var e,t,r,i;if(i=o,null!==(e=h())){for(t=[],null===(r=v())&&(45===n.charCodeAt(o)?(r="-",o++):(r=null,0===a&&l('"-"')),null===r&&(95===n.charCodeAt(o)?(r="_",o++):(r=null,0===a&&l('"_"'))));null!==r;)t.push(r),null===(r=v())&&(45===n.charCodeAt(o)?(r="-",o++):(r=null,0===a&&l('"-"')),null===r&&(95===n.charCodeAt(o)?(r="_",o++):(r=null,0===a&&l('"_"'))));null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e}function de(){var e,t,r,i,s,u;return i=o,s=o,91===n.charCodeAt(o)?(e="[",o++):(e=null,0===a&&l('"["')),null!==e&&null!==(t=he())?(93===n.charCodeAt(o)?(r="]",o++):(r=null,0===a&&l('"]"')),null!==r?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(u=i,Un.host_type="IPv6",e=n.substring(o,u)),null===e&&(o=i),e}function he(){var e,t,r,i,s,u,c,d,h,f,m,p,_,g,y,v,M;return g=o,y=o,null!==(e=fe())?(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=fe())?(58===n.charCodeAt(o)?(i=":",o++):(i=null,0===a&&l('":"')),null!==i&&null!==(s=fe())?(58===n.charCodeAt(o)?(u=":",o++):(u=null,0===a&&l('":"')),null!==u&&null!==(c=fe())?(58===n.charCodeAt(o)?(d=":",o++):(d=null,0===a&&l('":"')),null!==d&&null!==(h=fe())?(58===n.charCodeAt(o)?(f=":",o++):(f=null,0===a&&l('":"')),null!==f&&null!==(m=fe())?(58===n.charCodeAt(o)?(p=":",o++):(p=null,0===a&&l('":"')),null!==p&&null!==(_=me())?e=[e,t,r,i,s,u,c,d,h,f,m,p,_]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,"::"===n.substr(o,2)?(e="::",o+=2):(e=null,0===a&&l('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=fe())?(58===n.charCodeAt(o)?(s=":",o++):(s=null,0===a&&l('":"')),null!==s&&null!==(u=fe())?(58===n.charCodeAt(o)?(c=":",o++):(c=null,0===a&&l('":"')),null!==c&&null!==(d=fe())?(58===n.charCodeAt(o)?(h=":",o++):(h=null,0===a&&l('":"')),null!==h&&null!==(f=fe())?(58===n.charCodeAt(o)?(m=":",o++):(m=null,0===a&&l('":"')),null!==m&&null!==(p=me())?e=[e,t,r,i,s,u,c,d,h,f,m,p]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,"::"===n.substr(o,2)?(e="::",o+=2):(e=null,0===a&&l('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=fe())?(58===n.charCodeAt(o)?(s=":",o++):(s=null,0===a&&l('":"')),null!==s&&null!==(u=fe())?(58===n.charCodeAt(o)?(c=":",o++):(c=null,0===a&&l('":"')),null!==c&&null!==(d=fe())?(58===n.charCodeAt(o)?(h=":",o++):(h=null,0===a&&l('":"')),null!==h&&null!==(f=me())?e=[e,t,r,i,s,u,c,d,h,f]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,"::"===n.substr(o,2)?(e="::",o+=2):(e=null,0===a&&l('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=fe())?(58===n.charCodeAt(o)?(s=":",o++):(s=null,0===a&&l('":"')),null!==s&&null!==(u=fe())?(58===n.charCodeAt(o)?(c=":",o++):(c=null,0===a&&l('":"')),null!==c&&null!==(d=me())?e=[e,t,r,i,s,u,c,d]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,"::"===n.substr(o,2)?(e="::",o+=2):(e=null,0===a&&l('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=fe())?(58===n.charCodeAt(o)?(s=":",o++):(s=null,0===a&&l('":"')),null!==s&&null!==(u=me())?e=[e,t,r,i,s,u]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,"::"===n.substr(o,2)?(e="::",o+=2):(e=null,0===a&&l('"::"')),null!==e&&null!==(t=fe())?(58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=me())?e=[e,t,r,i]:(e=null,o=y)):(e=null,o=y),null===e&&(y=o,"::"===n.substr(o,2)?(e="::",o+=2):(e=null,0===a&&l('"::"')),null!==e&&null!==(t=me())?e=[e,t]:(e=null,o=y),null===e&&(y=o,"::"===n.substr(o,2)?(e="::",o+=2):(e=null,0===a&&l('"::"')),null!==e&&null!==(t=fe())?e=[e,t]:(e=null,o=y),null===e&&(y=o,null!==(e=fe())?("::"===n.substr(o,2)?(t="::",o+=2):(t=null,0===a&&l('"::"')),null!==t&&null!==(r=fe())?(58===n.charCodeAt(o)?(i=":",o++):(i=null,0===a&&l('":"')),null!==i&&null!==(s=fe())?(58===n.charCodeAt(o)?(u=":",o++):(u=null,0===a&&l('":"')),null!==u&&null!==(c=fe())?(58===n.charCodeAt(o)?(d=":",o++):(d=null,0===a&&l('":"')),null!==d&&null!==(h=fe())?(58===n.charCodeAt(o)?(f=":",o++):(f=null,0===a&&l('":"')),null!==f&&null!==(m=me())?e=[e,t,r,i,s,u,c,d,h,f,m]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,null!==(e=fe())?(v=o,58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,o=v),null!==(t=null!==t?t:"")?("::"===n.substr(o,2)?(r="::",o+=2):(r=null,0===a&&l('"::"')),null!==r&&null!==(i=fe())?(58===n.charCodeAt(o)?(s=":",o++):(s=null,0===a&&l('":"')),null!==s&&null!==(u=fe())?(58===n.charCodeAt(o)?(c=":",o++):(c=null,0===a&&l('":"')),null!==c&&null!==(d=fe())?(58===n.charCodeAt(o)?(h=":",o++):(h=null,0===a&&l('":"')),null!==h&&null!==(f=me())?e=[e,t,r,i,s,u,c,d,h,f]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,null!==(e=fe())?(v=o,58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,o=v),null!==(t=null!==t?t:"")?(v=o,58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,o=v),null!==(r=null!==r?r:"")?("::"===n.substr(o,2)?(i="::",o+=2):(i=null,0===a&&l('"::"')),null!==i&&null!==(s=fe())?(58===n.charCodeAt(o)?(u=":",o++):(u=null,0===a&&l('":"')),null!==u&&null!==(c=fe())?(58===n.charCodeAt(o)?(d=":",o++):(d=null,0===a&&l('":"')),null!==d&&null!==(h=me())?e=[e,t,r,i,s,u,c,d,h]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,null!==(e=fe())?(v=o,58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,o=v),null!==(t=null!==t?t:"")?(v=o,58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,o=v),null!==(r=null!==r?r:"")?(v=o,58===n.charCodeAt(o)?(i=":",o++):(i=null,0===a&&l('":"')),null!==i&&null!==(s=fe())?i=[i,s]:(i=null,o=v),null!==(i=null!==i?i:"")?("::"===n.substr(o,2)?(s="::",o+=2):(s=null,0===a&&l('"::"')),null!==s&&null!==(u=fe())?(58===n.charCodeAt(o)?(c=":",o++):(c=null,0===a&&l('":"')),null!==c&&null!==(d=me())?e=[e,t,r,i,s,u,c,d]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,null!==(e=fe())?(v=o,58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,o=v),null!==(t=null!==t?t:"")?(v=o,58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,o=v),null!==(r=null!==r?r:"")?(v=o,58===n.charCodeAt(o)?(i=":",o++):(i=null,0===a&&l('":"')),null!==i&&null!==(s=fe())?i=[i,s]:(i=null,o=v),null!==(i=null!==i?i:"")?(v=o,58===n.charCodeAt(o)?(s=":",o++):(s=null,0===a&&l('":"')),null!==s&&null!==(u=fe())?s=[s,u]:(s=null,o=v),null!==(s=null!==s?s:"")?("::"===n.substr(o,2)?(u="::",o+=2):(u=null,0===a&&l('"::"')),null!==u&&null!==(c=me())?e=[e,t,r,i,s,u,c]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,null!==(e=fe())?(v=o,58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,o=v),null!==(t=null!==t?t:"")?(v=o,58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,o=v),null!==(r=null!==r?r:"")?(v=o,58===n.charCodeAt(o)?(i=":",o++):(i=null,0===a&&l('":"')),null!==i&&null!==(s=fe())?i=[i,s]:(i=null,o=v),null!==(i=null!==i?i:"")?(v=o,58===n.charCodeAt(o)?(s=":",o++):(s=null,0===a&&l('":"')),null!==s&&null!==(u=fe())?s=[s,u]:(s=null,o=v),null!==(s=null!==s?s:"")?(v=o,58===n.charCodeAt(o)?(u=":",o++):(u=null,0===a&&l('":"')),null!==u&&null!==(c=fe())?u=[u,c]:(u=null,o=v),null!==(u=null!==u?u:"")?("::"===n.substr(o,2)?(c="::",o+=2):(c=null,0===a&&l('"::"')),null!==c&&null!==(d=fe())?e=[e,t,r,i,s,u,c,d]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y),null===e&&(y=o,null!==(e=fe())?(v=o,58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=fe())?t=[t,r]:(t=null,o=v),null!==(t=null!==t?t:"")?(v=o,58===n.charCodeAt(o)?(r=":",o++):(r=null,0===a&&l('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,o=v),null!==(r=null!==r?r:"")?(v=o,58===n.charCodeAt(o)?(i=":",o++):(i=null,0===a&&l('":"')),null!==i&&null!==(s=fe())?i=[i,s]:(i=null,o=v),null!==(i=null!==i?i:"")?(v=o,58===n.charCodeAt(o)?(s=":",o++):(s=null,0===a&&l('":"')),null!==s&&null!==(u=fe())?s=[s,u]:(s=null,o=v),null!==(s=null!==s?s:"")?(v=o,58===n.charCodeAt(o)?(u=":",o++):(u=null,0===a&&l('":"')),null!==u&&null!==(c=fe())?u=[u,c]:(u=null,o=v),null!==(u=null!==u?u:"")?(v=o,58===n.charCodeAt(o)?(c=":",o++):(c=null,0===a&&l('":"')),null!==c&&null!==(d=fe())?c=[c,d]:(c=null,o=v),null!==(c=null!==c?c:"")?("::"===n.substr(o,2)?(d="::",o+=2):(d=null,0===a&&l('"::"')),null!==d?e=[e,t,r,i,s,u,c,d]:(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y)):(e=null,o=y))))))))))))))),null!==e&&(M=g,Un.host_type="IPv6",e=n.substring(o,M)),null===e&&(o=g),e}function fe(){var e,t,n,r,i;return i=o,null!==(e=f())&&null!==(t=null!==(t=f())?t:"")&&null!==(n=null!==(n=f())?n:"")&&null!==(r=null!==(r=f())?r:"")?e=[e,t,n,r]:(e=null,o=i),e}function me(){var e,t,r,i;return i=o,null!==(e=fe())?(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t&&null!==(r=fe())?e=[e,t,r]:(e=null,o=i)):(e=null,o=i),null===e&&(e=pe()),e}function pe(){var e,t,r,i,s,u,c,d,h,f;return d=o,h=o,null!==(e=_e())?(46===n.charCodeAt(o)?(t=".",o++):(t=null,0===a&&l('"."')),null!==t&&null!==(r=_e())?(46===n.charCodeAt(o)?(i=".",o++):(i=null,0===a&&l('"."')),null!==i&&null!==(s=_e())?(46===n.charCodeAt(o)?(u=".",o++):(u=null,0===a&&l('"."')),null!==u&&null!==(c=_e())?e=[e,t,r,i,s,u,c]:(e=null,o=h)):(e=null,o=h)):(e=null,o=h)):(e=null,o=h),null!==e&&(f=d,Un.host_type="IPv4",e=n.substring(o,f)),null===e&&(o=d),e}function _e(){var e,t,r,i;return i=o,"25"===n.substr(o,2)?(e="25",o+=2):(e=null,0===a&&l('"25"')),null!==e?(/^[0-5]/.test(n.charAt(o))?(t=n.charAt(o),o++):(t=null,0===a&&l("[0-5]")),null!==t?e=[e,t]:(e=null,o=i)):(e=null,o=i),null===e&&(i=o,50===n.charCodeAt(o)?(e="2",o++):(e=null,0===a&&l('"2"')),null!==e?(/^[0-4]/.test(n.charAt(o))?(t=n.charAt(o),o++):(t=null,0===a&&l("[0-4]")),null!==t&&null!==(r=d())?e=[e,t,r]:(e=null,o=i)):(e=null,o=i),null===e&&(i=o,49===n.charCodeAt(o)?(e="1",o++):(e=null,0===a&&l('"1"')),null!==e&&null!==(t=d())&&null!==(r=d())?e=[e,t,r]:(e=null,o=i),null===e&&(i=o,/^[1-9]/.test(n.charAt(o))?(e=n.charAt(o),o++):(e=null,0===a&&l("[1-9]")),null!==e&&null!==(t=d())?e=[e,t]:(e=null,o=i),null===e&&(e=d())))),e}function ge(){var e,t,n,r,i,a,s,u;return a=o,s=o,null!==(e=null!==(e=d())?e:"")&&null!==(t=null!==(t=d())?t:"")&&null!==(n=null!==(n=d())?n:"")&&null!==(r=null!==(r=d())?r:"")&&null!==(i=null!==(i=d())?i:"")?e=[e,t,n,r,i]:(e=null,o=s),null!==e&&(u=e,u=parseInt(u.join("")),Un.port=u,e=u),null===e&&(o=a),e}function ye(){var e,t,r,i;for(e=[],i=o,59===n.charCodeAt(o)?(t=";",o++):(t=null,0===a&&l('";"')),null!==t&&null!==(r=ve())?t=[t,r]:(t=null,o=i);null!==t;)e.push(t),i=o,59===n.charCodeAt(o)?(t=";",o++):(t=null,0===a&&l('";"')),null!==t&&null!==(r=ve())?t=[t,r]:(t=null,o=i);return e}function ve(){var e;return null===(e=Me())&&null===(e=Te())&&null===(e=be())&&null===(e=we())&&null===(e=De())&&null===(e=Le())&&(e=Se()),e}function Me(){var e,t,r,i,s;return r=o,i=o,"transport="===n.substr(o,10).toLowerCase()?(e=n.substr(o,10),o+=10):(e=null,0===a&&l('"transport="')),null!==e?("udp"===n.substr(o,3).toLowerCase()?(t=n.substr(o,3),o+=3):(t=null,0===a&&l('"udp"')),null===t&&("tcp"===n.substr(o,3).toLowerCase()?(t=n.substr(o,3),o+=3):(t=null,0===a&&l('"tcp"')),null===t&&("sctp"===n.substr(o,4).toLowerCase()?(t=n.substr(o,4),o+=4):(t=null,0===a&&l('"sctp"')),null===t&&("tls"===n.substr(o,3).toLowerCase()?(t=n.substr(o,3),o+=3):(t=null,0===a&&l('"tls"')),null===t&&(t=N())))),null!==t?e=[e,t]:(e=null,o=i)):(e=null,o=i),null!==e&&(s=e[1],Un.uri_params||(Un.uri_params={}),e=void(Un.uri_params.transport=s.toLowerCase())),null===e&&(o=r),e}function Te(){var e,t,r,i,s;return r=o,i=o,"user="===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"user="')),null!==e?("phone"===n.substr(o,5).toLowerCase()?(t=n.substr(o,5),o+=5):(t=null,0===a&&l('"phone"')),null===t&&("ip"===n.substr(o,2).toLowerCase()?(t=n.substr(o,2),o+=2):(t=null,0===a&&l('"ip"')),null===t&&(t=N())),null!==t?e=[e,t]:(e=null,o=i)):(e=null,o=i),null!==e&&(s=e[1],Un.uri_params||(Un.uri_params={}),e=void(Un.uri_params.user=s.toLowerCase())),null===e&&(o=r),e}function be(){var e,t,r,i,s;return r=o,i=o,"method="===n.substr(o,7).toLowerCase()?(e=n.substr(o,7),o+=7):(e=null,0===a&&l('"method="')),null!==e&&null!==(t=ct())?e=[e,t]:(e=null,o=i),null!==e&&(s=e[1],Un.uri_params||(Un.uri_params={}),e=void(Un.uri_params.method=s)),null===e&&(o=r),e}function we(){var e,t,r,i,s;return r=o,i=o,"ttl="===n.substr(o,4).toLowerCase()?(e=n.substr(o,4),o+=4):(e=null,0===a&&l('"ttl="')),null!==e&&null!==(t=Ln())?e=[e,t]:(e=null,o=i),null!==e&&(s=e[1],Un.params||(Un.params={}),e=void(Un.params.ttl=s)),null===e&&(o=r),e}function De(){var e,t,r,i,s;return r=o,i=o,"maddr="===n.substr(o,6).toLowerCase()?(e=n.substr(o,6),o+=6):(e=null,0===a&&l('"maddr="')),null!==e&&null!==(t=se())?e=[e,t]:(e=null,o=i),null!==e&&(s=e[1],Un.uri_params||(Un.uri_params={}),e=void(Un.uri_params.maddr=s)),null===e&&(o=r),e}function Le(){var e,t,r,i,s,u;return i=o,s=o,"lr"===n.substr(o,2).toLowerCase()?(e=n.substr(o,2),o+=2):(e=null,0===a&&l('"lr"')),null!==e?(u=o,61===n.charCodeAt(o)?(t="=",o++):(t=null,0===a&&l('"="')),null!==t&&null!==(r=N())?t=[t,r]:(t=null,o=u),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=s)):(e=null,o=s),null!==e&&(Un.uri_params||(Un.uri_params={}),e=void(Un.uri_params.lr=void 0)),null===e&&(o=i),e}function Se(){var e,t,r,i,s,u,c,d;return i=o,s=o,null!==(e=ke())?(u=o,61===n.charCodeAt(o)?(t="=",o++):(t=null,0===a&&l('"="')),null!==t&&null!==(r=Ae())?t=[t,r]:(t=null,o=u),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=s)):(e=null,o=s),null!==e&&(c=e[0],d=e[1],Un.uri_params||(Un.uri_params={}),d=void 0===d?void 0:d[1],e=void(Un.uri_params[c.toLowerCase()]=d)),null===e&&(o=i),e}function ke(){var e,t,n;if(n=o,null!==(t=Ee()))for(e=[];null!==t;)e.push(t),t=Ee();else e=null;return null!==e&&(e=e.join("")),null===e&&(o=n),e}function Ae(){var e,t,n;if(n=o,null!==(t=Ee()))for(e=[];null!==t;)e.push(t),t=Ee();else e=null;return null!==e&&(e=e.join("")),null===e&&(o=n),e}function Ee(){var e;return null===(e=Ie())&&null===(e=T())&&(e=w()),e}function Ie(){var e;return 91===n.charCodeAt(o)?(e="[",o++):(e=null,0===a&&l('"["')),null===e&&(93===n.charCodeAt(o)?(e="]",o++):(e=null,0===a&&l('"]"')),null===e&&(47===n.charCodeAt(o)?(e="/",o++):(e=null,0===a&&l('"/"')),null===e&&(58===n.charCodeAt(o)?(e=":",o++):(e=null,0===a&&l('":"')),null===e&&(38===n.charCodeAt(o)?(e="&",o++):(e=null,0===a&&l('"&"')),null===e&&(43===n.charCodeAt(o)?(e="+",o++):(e=null,0===a&&l('"+"')),null===e&&(36===n.charCodeAt(o)?(e="$",o++):(e=null,0===a&&l('"$"')))))))),e}function Ne(){var e,t,r,i,s,u,c;if(u=o,63===n.charCodeAt(o)?(e="?",o++):(e=null,0===a&&l('"?"')),null!==e)if(null!==(t=xe())){for(r=[],c=o,38===n.charCodeAt(o)?(i="&",o++):(i=null,0===a&&l('"&"')),null!==i&&null!==(s=xe())?i=[i,s]:(i=null,o=c);null!==i;)r.push(i),c=o,38===n.charCodeAt(o)?(i="&",o++):(i=null,0===a&&l('"&"')),null!==i&&null!==(s=xe())?i=[i,s]:(i=null,o=c);null!==r?e=[e,t,r]:(e=null,o=u)}else e=null,o=u;else e=null,o=u;return e}function xe(){var e,t,r,i,s,u,c;return i=o,s=o,null!==(e=Ce())?(61===n.charCodeAt(o)?(t="=",o++):(t=null,0===a&&l('"="')),null!==t&&null!==(r=je())?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(u=e[0],c=e[2],u=u.join("").toLowerCase(),c=c.join(""),Un.uri_headers||(Un.uri_headers={}),e=void(Un.uri_headers[u]?Un.uri_headers[u].push(c):Un.uri_headers[u]=[c])),null===e&&(o=i),e}function Ce(){var e,t;if(null===(t=Ye())&&null===(t=T())&&(t=w()),null!==t)for(e=[];null!==t;)e.push(t),null===(t=Ye())&&null===(t=T())&&(t=w());else e=null;return e}function je(){var e,t;for(e=[],null===(t=Ye())&&null===(t=T())&&(t=w());null!==t;)e.push(t),null===(t=Ye())&&null===(t=T())&&(t=w());return e}function Ye(){var e;return 91===n.charCodeAt(o)?(e="[",o++):(e=null,0===a&&l('"["')),null===e&&(93===n.charCodeAt(o)?(e="]",o++):(e=null,0===a&&l('"]"')),null===e&&(47===n.charCodeAt(o)?(e="/",o++):(e=null,0===a&&l('"/"')),null===e&&(63===n.charCodeAt(o)?(e="?",o++):(e=null,0===a&&l('"?"')),null===e&&(58===n.charCodeAt(o)?(e=":",o++):(e=null,0===a&&l('":"')),null===e&&(43===n.charCodeAt(o)?(e="+",o++):(e=null,0===a&&l('"+"')),null===e&&(36===n.charCodeAt(o)?(e="$",o++):(e=null,0===a&&l('"$"')))))))),e}function Oe(){var e,t,n,r,i,a;return a=o,null!==(e=ct())&&null!==(t=g())&&null!==(n=Re())&&null!==(r=g())&&null!==(i=et())?e=[e,t,n,r,i]:(e=null,o=a),e}function Re(){var e;return null===(e=X())&&(e=ze()),e}function ze(){var e,t,r,i;return i=o,null!==(e=Je())?(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null!==t?(null===(r=Pe())&&(r=Fe()),null!==r?e=[e,t,r]:(e=null,o=i)):(e=null,o=i)):(e=null,o=i),e}function Pe(){var e,t,r,i,s;return i=o,null===(e=He())&&(e=Ue()),null!==e?(s=o,63===n.charCodeAt(o)?(t="?",o++):(t=null,0===a&&l('"?"')),null!==t&&null!==(r=$e())?t=[t,r]:(t=null,o=s),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=i)):(e=null,o=i),e}function He(){var e,t,r,i;return i=o,"//"===n.substr(o,2)?(e="//",o+=2):(e=null,0===a&&l('"//"')),null!==e&&null!==(t=Ze())&&null!==(r=null!==(r=Ue())?r:"")?e=[e,t,r]:(e=null,o=i),e}function Ue(){var e,t,r;return r=o,47===n.charCodeAt(o)?(e="/",o++):(e=null,0===a&&l('"/"')),null!==e&&null!==(t=Be())?e=[e,t]:(e=null,o=r),e}function Fe(){var e,t,n,r;if(r=o,null!==(e=Qe())){for(t=[],n=We();null!==n;)t.push(n),n=We();null!==t?e=[e,t]:(e=null,o=r)}else e=null,o=r;return e}function We(){var e;return null===(e=M())&&null===(e=T())&&(e=w()),e}function Qe(){var e;return null===(e=T())&&null===(e=w())&&(59===n.charCodeAt(o)?(e=";",o++):(e=null,0===a&&l('";"')),null===e&&(63===n.charCodeAt(o)?(e="?",o++):(e=null,0===a&&l('"?"')),null===e&&(58===n.charCodeAt(o)?(e=":",o++):(e=null,0===a&&l('":"')),null===e&&(64===n.charCodeAt(o)?(e="@",o++):(e=null,0===a&&l('"@"')),null===e&&(38===n.charCodeAt(o)?(e="&",o++):(e=null,0===a&&l('"&"')),null===e&&(61===n.charCodeAt(o)?(e="=",o++):(e=null,0===a&&l('"="')),null===e&&(43===n.charCodeAt(o)?(e="+",o++):(e=null,0===a&&l('"+"')),null===e&&(36===n.charCodeAt(o)?(e="$",o++):(e=null,0===a&&l('"$"')),null===e&&(44===n.charCodeAt(o)?(e=",",o++):(e=null,0===a&&l('","'))))))))))),e}function Be(){var e,t,r,i,s,u;if(s=o,null!==(e=qe())){for(t=[],u=o,47===n.charCodeAt(o)?(r="/",o++):(r=null,0===a&&l('"/"')),null!==r&&null!==(i=qe())?r=[r,i]:(r=null,o=u);null!==r;)t.push(r),u=o,47===n.charCodeAt(o)?(r="/",o++):(r=null,0===a&&l('"/"')),null!==r&&null!==(i=qe())?r=[r,i]:(r=null,o=u);null!==t?e=[e,t]:(e=null,o=s)}else e=null,o=s;return e}function qe(){var e,t,r,i,s,u;for(s=o,e=[],t=Ge();null!==t;)e.push(t),t=Ge();if(null!==e){for(t=[],u=o,59===n.charCodeAt(o)?(r=";",o++):(r=null,0===a&&l('";"')),null!==r&&null!==(i=Ve())?r=[r,i]:(r=null,o=u);null!==r;)t.push(r),u=o,59===n.charCodeAt(o)?(r=";",o++):(r=null,0===a&&l('";"')),null!==r&&null!==(i=Ve())?r=[r,i]:(r=null,o=u);null!==t?e=[e,t]:(e=null,o=s)}else e=null,o=s;return e}function Ve(){var e,t;for(e=[],t=Ge();null!==t;)e.push(t),t=Ge();return e}function Ge(){var e;return null===(e=T())&&null===(e=w())&&(58===n.charCodeAt(o)?(e=":",o++):(e=null,0===a&&l('":"')),null===e&&(64===n.charCodeAt(o)?(e="@",o++):(e=null,0===a&&l('"@"')),null===e&&(38===n.charCodeAt(o)?(e="&",o++):(e=null,0===a&&l('"&"')),null===e&&(61===n.charCodeAt(o)?(e="=",o++):(e=null,0===a&&l('"="')),null===e&&(43===n.charCodeAt(o)?(e="+",o++):(e=null,0===a&&l('"+"')),null===e&&(36===n.charCodeAt(o)?(e="$",o++):(e=null,0===a&&l('"$"')),null===e&&(44===n.charCodeAt(o)?(e=",",o++):(e=null,0===a&&l('","'))))))))),e}function Je(){var e,t,r,i,s,u;if(i=o,s=o,null!==(e=h())){for(t=[],null===(r=h())&&null===(r=d())&&(43===n.charCodeAt(o)?(r="+",o++):(r=null,0===a&&l('"+"')),null===r&&(45===n.charCodeAt(o)?(r="-",o++):(r=null,0===a&&l('"-"')),null===r&&(46===n.charCodeAt(o)?(r=".",o++):(r=null,0===a&&l('"."')))));null!==r;)t.push(r),null===(r=h())&&null===(r=d())&&(43===n.charCodeAt(o)?(r="+",o++):(r=null,0===a&&l('"+"')),null===r&&(45===n.charCodeAt(o)?(r="-",o++):(r=null,0===a&&l('"-"')),null===r&&(46===n.charCodeAt(o)?(r=".",o++):(r=null,0===a&&l('"."')))));null!==t?e=[e,t]:(e=null,o=s)}else e=null,o=s;return null!==e&&(u=i,e=void(Un.scheme=n.substring(o,u))),null===e&&(o=i),e}function Ze(){var e;return null===(e=Ke())&&(e=Xe()),e}function Ke(){var e,t,r,i;return r=o,i=o,null!==(e=ne())?(64===n.charCodeAt(o)?(t="@",o++):(t=null,0===a&&l('"@"')),null!==t?e=[e,t]:(e=null,o=i)):(e=null,o=i),null!==(e=null!==e?e:"")&&null!==(t=ae())?e=[e,t]:(e=null,o=r),null!==e?e:""}function Xe(){var e,t;if(null===(t=T())&&null===(t=w())&&(36===n.charCodeAt(o)?(t="$",o++):(t=null,0===a&&l('"$"')),null===t&&(44===n.charCodeAt(o)?(t=",",o++):(t=null,0===a&&l('","')),null===t&&(59===n.charCodeAt(o)?(t=";",o++):(t=null,0===a&&l('";"')),null===t&&(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null===t&&(64===n.charCodeAt(o)?(t="@",o++):(t=null,0===a&&l('"@"')),null===t&&(38===n.charCodeAt(o)?(t="&",o++):(t=null,0===a&&l('"&"')),null===t&&(61===n.charCodeAt(o)?(t="=",o++):(t=null,0===a&&l('"="')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"')))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=T())&&null===(t=w())&&(36===n.charCodeAt(o)?(t="$",o++):(t=null,0===a&&l('"$"')),null===t&&(44===n.charCodeAt(o)?(t=",",o++):(t=null,0===a&&l('","')),null===t&&(59===n.charCodeAt(o)?(t=";",o++):(t=null,0===a&&l('";"')),null===t&&(58===n.charCodeAt(o)?(t=":",o++):(t=null,0===a&&l('":"')),null===t&&(64===n.charCodeAt(o)?(t="@",o++):(t=null,0===a&&l('"@"')),null===t&&(38===n.charCodeAt(o)?(t="&",o++):(t=null,0===a&&l('"&"')),null===t&&(61===n.charCodeAt(o)?(t="=",o++):(t=null,0===a&&l('"="')),null===t&&(43===n.charCodeAt(o)?(t="+",o++):(t=null,0===a&&l('"+"'))))))))));else e=null;return e}function $e(){var e,t;for(e=[],t=We();null!==t;)e.push(t),t=We();return e}function et(){var e,t,r,i,s,u,c,h,f;if(c=o,h=o,"sip"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"SIP"')),null!==e)if(47===n.charCodeAt(o)?(t="/",o++):(t=null,0===a&&l('"/"')),null!==t){if(null!==(i=d()))for(r=[];null!==i;)r.push(i),i=d();else r=null;if(null!==r)if(46===n.charCodeAt(o)?(i=".",o++):(i=null,0===a&&l('"."')),null!==i){if(null!==(u=d()))for(s=[];null!==u;)s.push(u),u=d();else s=null;null!==s?e=[e,t,r,i,s]:(e=null,o=h)}else e=null,o=h;else e=null,o=h}else e=null,o=h;else e=null,o=h;return null!==e&&(f=c,e=void(Un.sip_version=n.substring(o,f))),null===e&&(o=c),e}function tt(){var e;return"INVITE"===n.substr(o,6)?(e="INVITE",o+=6):(e=null,0===a&&l('"INVITE"')),e}function nt(){var e;return"ACK"===n.substr(o,3)?(e="ACK",o+=3):(e=null,0===a&&l('"ACK"')),e}function rt(){var e;return"OPTIONS"===n.substr(o,7)?(e="OPTIONS",o+=7):(e=null,0===a&&l('"OPTIONS"')),e}function it(){var e;return"BYE"===n.substr(o,3)?(e="BYE",o+=3):(e=null,0===a&&l('"BYE"')),e}function ot(){var e;return"CANCEL"===n.substr(o,6)?(e="CANCEL",o+=6):(e=null,0===a&&l('"CANCEL"')),e}function at(){var e;return"REGISTER"===n.substr(o,8)?(e="REGISTER",o+=8):(e=null,0===a&&l('"REGISTER"')),e}function st(){var e;return"SUBSCRIBE"===n.substr(o,9)?(e="SUBSCRIBE",o+=9):(e=null,0===a&&l('"SUBSCRIBE"')),e}function ut(){var e;return"NOTIFY"===n.substr(o,6)?(e="NOTIFY",o+=6):(e=null,0===a&&l('"NOTIFY"')),e}function lt(){var e;return"REFER"===n.substr(o,5)?(e="REFER",o+=5):(e=null,0===a&&l('"REFER"')),e}function ct(){var e,t,r;return t=o,null===(e=tt())&&null===(e=nt())&&null===(e=rt())&&null===(e=it())&&null===(e=ot())&&null===(e=at())&&null===(e=st())&&null===(e=ut())&&null===(e=lt())&&(e=N()),null!==e&&(r=t,Un.method=n.substring(o,r),e=Un.method),null===e&&(o=t),e}function dt(){var e,t,n,r,i,a;return a=o,null!==(e=et())&&null!==(t=g())&&null!==(n=ht())&&null!==(r=g())&&null!==(i=mt())?e=[e,t,n,r,i]:(e=null,o=a),e}function ht(){var e,t,n;return t=o,null!==(e=ft())&&(n=e,e=void(Un.status_code=parseInt(n.join("")))),null===e&&(o=t),e}function ft(){var e,t,n,r;return r=o,null!==(e=d())&&null!==(t=d())&&null!==(n=d())?e=[e,t,n]:(e=null,o=r),e}function mt(){var e,t,r,i;for(r=o,e=[],null===(t=M())&&null===(t=T())&&null===(t=w())&&null===(t=E())&&null===(t=I())&&null===(t=g())&&(t=y());null!==t;)e.push(t),null===(t=M())&&null===(t=T())&&null===(t=w())&&null===(t=E())&&null===(t=I())&&null===(t=g())&&(t=y());return null!==e&&(i=r,e=void(Un.reason_phrase=n.substring(o,i))),null===e&&(o=r),e}function pt(){var e,t,n,r,i,a,s;if(i=o,a=o,null===(e=K())&&(e=_t()),null!==e){for(t=[],s=o,null!==(n=F())&&null!==(r=yt())?n=[n,r]:(n=null,o=s);null!==n;)t.push(n),s=o,null!==(n=F())&&null!==(r=yt())?n=[n,r]:(n=null,o=s);null!==t?e=[e,t]:(e=null,o=a)}else e=null,o=a;return null!==e&&(e=function(e){var t;Un.multi_header||(Un.multi_header=[]);try{t=new Hn(Un.uri,Un.display_name,Un.params),delete Un.uri,delete Un.display_name,delete Un.params}catch(e){t=null}Un.multi_header.push({possition:o,offset:e,parsed:t})}(i)),null===e&&(o=i),e}function _t(){var e,t,n,r,i;return i=o,null!==(e=null!==(e=gt())?e:"")&&null!==(t=H())&&null!==(n=X())&&null!==(r=P())?e=[e,t,n,r]:(e=null,o=i),e}function gt(){var e,t,n,r,i,a,s,u;if(i=o,a=o,null!==(e=N())){for(t=[],s=o,null!==(n=D())&&null!==(r=N())?n=[n,r]:(n=null,o=s);null!==n;)t.push(n),s=o,null!==(n=D())&&null!==(r=N())?n=[n,r]:(n=null,o=s);null!==t?e=[e,t]:(e=null,o=a)}else e=null,o=a;return null===e&&(e=G()),null!==e&&(u=e,e=void(Un.display_name="string"==typeof u?u:u[1].reduce((function(e,t){return e+t[0]+t[1]}),u[0]))),null===e&&(o=i),e}function yt(){var e;return null===(e=vt())&&null===(e=Mt())&&(e=wt()),e}function vt(){var e,t,r,i,s,u;return i=o,s=o,"q"===n.substr(o,1).toLowerCase()?(e=n.substr(o,1),o++):(e=null,0===a&&l('"q"')),null!==e&&null!==(t=O())&&null!==(r=bt())?e=[e,t,r]:(e=null,o=s),null!==e&&(u=e[2],Un.params||(Un.params={}),e=void(Un.params.q=u)),null===e&&(o=i),e}function Mt(){var e,t,r,i,s,u;return i=o,s=o,"expires"===n.substr(o,7).toLowerCase()?(e=n.substr(o,7),o+=7):(e=null,0===a&&l('"expires"')),null!==e&&null!==(t=O())&&null!==(r=Tt())?e=[e,t,r]:(e=null,o=s),null!==e&&(u=e[2],Un.params||(Un.params={}),e=void(Un.params.expires=u)),null===e&&(o=i),e}function Tt(){var e,t,n;if(n=o,null!==(t=d()))for(e=[];null!==t;)e.push(t),t=d();else e=null;return null!==e&&(e=parseInt(e.join(""))),null===e&&(o=n),e}function bt(){var e,t,r,i,s,u,c,h,f;return u=o,c=o,48===n.charCodeAt(o)?(e="0",o++):(e=null,0===a&&l('"0"')),null!==e?(h=o,46===n.charCodeAt(o)?(t=".",o++):(t=null,0===a&&l('"."')),null!==t&&null!==(r=null!==(r=d())?r:"")&&null!==(i=null!==(i=d())?i:"")&&null!==(s=null!==(s=d())?s:"")?t=[t,r,i,s]:(t=null,o=h),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=c)):(e=null,o=c),null!==e&&(f=u,e=parseFloat(n.substring(o,f))),null===e&&(o=u),e}function wt(){var e,t,n,r,i,a,s,u;return r=o,i=o,null!==(e=N())?(a=o,null!==(t=O())&&null!==(n=Dt())?t=[t,n]:(t=null,o=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=i)):(e=null,o=i),null!==e&&(s=e[0],u=e[1],Un.params||(Un.params={}),u=void 0===u?void 0:u[1],e=void(Un.params[s.toLowerCase()]=u)),null===e&&(o=r),e}function Dt(){var e;return null===(e=N())&&null===(e=se())&&(e=V()),e}function Lt(){var e;return"render"===n.substr(o,6).toLowerCase()?(e=n.substr(o,6),o+=6):(e=null,0===a&&l('"render"')),null===e&&("session"===n.substr(o,7).toLowerCase()?(e=n.substr(o,7),o+=7):(e=null,0===a&&l('"session"')),null===e&&("icon"===n.substr(o,4).toLowerCase()?(e=n.substr(o,4),o+=4):(e=null,0===a&&l('"icon"')),null===e&&("alert"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"alert"')),null===e&&(e=N())))),e}function St(){var e;return null===(e=kt())&&(e=wt()),e}function kt(){var e,t,r,i;return i=o,"handling"===n.substr(o,8).toLowerCase()?(e=n.substr(o,8),o+=8):(e=null,0===a&&l('"handling"')),null!==e&&null!==(t=O())?("optional"===n.substr(o,8).toLowerCase()?(r=n.substr(o,8),o+=8):(r=null,0===a&&l('"optional"')),null===r&&("required"===n.substr(o,8).toLowerCase()?(r=n.substr(o,8),o+=8):(r=null,0===a&&l('"required"')),null===r&&(r=N())),null!==r?e=[e,t,r]:(e=null,o=i)):(e=null,o=i),e}function At(){var e,t,n,r,i,a,s,u;if(s=o,null!==(e=Et()))if(null!==(t=Y()))if(null!==(n=jt())){for(r=[],u=o,null!==(i=F())&&null!==(a=Yt())?i=[i,a]:(i=null,o=u);null!==i;)r.push(i),u=o,null!==(i=F())&&null!==(a=Yt())?i=[i,a]:(i=null,o=u);null!==r?e=[e,t,n,r]:(e=null,o=s)}else e=null,o=s;else e=null,o=s;else e=null,o=s;return e}function Et(){var e;return null===(e=It())&&(e=Nt()),e}function It(){var e;return"text"===n.substr(o,4).toLowerCase()?(e=n.substr(o,4),o+=4):(e=null,0===a&&l('"text"')),null===e&&("image"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"image"')),null===e&&("audio"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"audio"')),null===e&&("video"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"video"')),null===e&&("application"===n.substr(o,11).toLowerCase()?(e=n.substr(o,11),o+=11):(e=null,0===a&&l('"application"')),null===e&&(e=xt()))))),e}function Nt(){var e;return"message"===n.substr(o,7).toLowerCase()?(e=n.substr(o,7),o+=7):(e=null,0===a&&l('"message"')),null===e&&("multipart"===n.substr(o,9).toLowerCase()?(e=n.substr(o,9),o+=9):(e=null,0===a&&l('"multipart"')),null===e&&(e=xt())),e}function xt(){var e;return null===(e=N())&&(e=Ct()),e}function Ct(){var e,t,r;return r=o,"x-"===n.substr(o,2).toLowerCase()?(e=n.substr(o,2),o+=2):(e=null,0===a&&l('"x-"')),null!==e&&null!==(t=N())?e=[e,t]:(e=null,o=r),e}function jt(){var e;return null===(e=xt())&&(e=N()),e}function Yt(){var e,t,n,r;return r=o,null!==(e=N())&&null!==(t=O())&&null!==(n=Ot())?e=[e,t,n]:(e=null,o=r),e}function Ot(){var e;return null===(e=N())&&(e=V()),e}function Rt(){var e,t,n,r;if(n=o,null!==(t=d()))for(e=[];null!==t;)e.push(t),t=d();else e=null;return null!==e&&(r=e,e=void(Un.value=parseInt(r.join("")))),null===e&&(o=n),e}function zt(){var e,t,r,i,s,u;if(s=o,null!==(e=x())){for(t=[],u=o,46===n.charCodeAt(o)?(r=".",o++):(r=null,0===a&&l('"."')),null!==r&&null!==(i=x())?r=[r,i]:(r=null,o=u);null!==r;)t.push(r),u=o,46===n.charCodeAt(o)?(r=".",o++):(r=null,0===a&&l('"."')),null!==r&&null!==(i=x())?r=[r,i]:(r=null,o=u);null!==t?e=[e,t]:(e=null,o=s)}else e=null,o=s;return e}function Pt(){var e;return null===(e=Ht())&&(e=wt()),e}function Ht(){var e,t,r,i,s,u;return i=o,s=o,"tag"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"tag"')),null!==e&&null!==(t=O())&&null!==(r=N())?e=[e,t,r]:(e=null,o=s),null!==e&&(u=e[2],e=void(Un.tag=u)),null===e&&(o=i),e}function Ut(){var e,t,r,i,s,u,c,d;if(c=o,"digest"===n.substr(o,6).toLowerCase()?(e=n.substr(o,6),o+=6):(e=null,0===a&&l('"Digest"')),null!==e)if(null!==(t=D()))if(null!==(r=Qt())){for(i=[],d=o,null!==(s=U())&&null!==(u=Qt())?s=[s,u]:(s=null,o=d);null!==s;)i.push(s),d=o,null!==(s=U())&&null!==(u=Qt())?s=[s,u]:(s=null,o=d);null!==i?e=[e,t,r,i]:(e=null,o=c)}else e=null,o=c;else e=null,o=c;else e=null,o=c;return null===e&&(e=Ft()),e}function Ft(){var e,t,n,r,i,a,s,u;if(s=o,null!==(e=N()))if(null!==(t=D()))if(null!==(n=Wt())){for(r=[],u=o,null!==(i=U())&&null!==(a=Wt())?i=[i,a]:(i=null,o=u);null!==i;)r.push(i),u=o,null!==(i=U())&&null!==(a=Wt())?i=[i,a]:(i=null,o=u);null!==r?e=[e,t,n,r]:(e=null,o=s)}else e=null,o=s;else e=null,o=s;else e=null,o=s;return e}function Wt(){var e,t,n,r;return r=o,null!==(e=N())&&null!==(t=O())?(null===(n=N())&&(n=V()),null!==n?e=[e,t,n]:(e=null,o=r)):(e=null,o=r),e}function Qt(){var e;return null===(e=Bt())&&null===(e=Vt())&&null===(e=Jt())&&null===(e=Kt())&&null===(e=Xt())&&null===(e=$t())&&null===(e=en())&&(e=Wt()),e}function Bt(){var e,t,r,i;return i=o,"realm"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"realm"')),null!==e&&null!==(t=O())&&null!==(r=qt())?e=[e,t,r]:(e=null,o=i),e}function qt(){var e,t,n;return t=o,null!==(e=G())&&(n=e,e=void(Un.realm=n)),null===e&&(o=t),e}function Vt(){var e,t,r,i,s,u,c,d,h;if(d=o,"domain"===n.substr(o,6).toLowerCase()?(e=n.substr(o,6),o+=6):(e=null,0===a&&l('"domain"')),null!==e)if(null!==(t=O()))if(null!==(r=Q()))if(null!==(i=Gt())){if(s=[],h=o,null!==(c=g()))for(u=[];null!==c;)u.push(c),c=g();else u=null;for(null!==u&&null!==(c=Gt())?u=[u,c]:(u=null,o=h);null!==u;){if(s.push(u),h=o,null!==(c=g()))for(u=[];null!==c;)u.push(c),c=g();else u=null;null!==u&&null!==(c=Gt())?u=[u,c]:(u=null,o=h)}null!==s&&null!==(u=B())?e=[e,t,r,i,s,u]:(e=null,o=d)}else e=null,o=d;else e=null,o=d;else e=null,o=d;else e=null,o=d;return e}function Gt(){var e;return null===(e=ze())&&(e=Ue()),e}function Jt(){var e,t,r,i;return i=o,"nonce"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"nonce"')),null!==e&&null!==(t=O())&&null!==(r=Zt())?e=[e,t,r]:(e=null,o=i),e}function Zt(){var e,t,n;return t=o,null!==(e=G())&&(n=e,e=void(Un.nonce=n)),null===e&&(o=t),e}function Kt(){var e,t,r,i,s,u;return i=o,s=o,"opaque"===n.substr(o,6).toLowerCase()?(e=n.substr(o,6),o+=6):(e=null,0===a&&l('"opaque"')),null!==e&&null!==(t=O())&&null!==(r=G())?e=[e,t,r]:(e=null,o=s),null!==e&&(u=e[2],e=void(Un.opaque=u)),null===e&&(o=i),e}function Xt(){var e,t,r,i,s;return i=o,"stale"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"stale"')),null!==e&&null!==(t=O())?(s=o,"true"===n.substr(o,4).toLowerCase()?(r=n.substr(o,4),o+=4):(r=null,0===a&&l('"true"')),null!==r&&(r=void(Un.stale=!0)),null===r&&(o=s),null===r&&(s=o,"false"===n.substr(o,5).toLowerCase()?(r=n.substr(o,5),o+=5):(r=null,0===a&&l('"false"')),null!==r&&(r=void(Un.stale=!1)),null===r&&(o=s)),null!==r?e=[e,t,r]:(e=null,o=i)):(e=null,o=i),e}function $t(){var e,t,r,i,s,u;return i=o,s=o,"algorithm"===n.substr(o,9).toLowerCase()?(e=n.substr(o,9),o+=9):(e=null,0===a&&l('"algorithm"')),null!==e&&null!==(t=O())?("md5"===n.substr(o,3).toLowerCase()?(r=n.substr(o,3),o+=3):(r=null,0===a&&l('"MD5"')),null===r&&("md5-sess"===n.substr(o,8).toLowerCase()?(r=n.substr(o,8),o+=8):(r=null,0===a&&l('"MD5-sess"')),null===r&&(r=N())),null!==r?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(u=e[2],e=void(Un.algorithm=u.toUpperCase())),null===e&&(o=i),e}function en(){var e,t,r,i,s,u,c,d,h,f;if(d=o,"qop"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"qop"')),null!==e)if(null!==(t=O()))if(null!==(r=Q())){if(h=o,null!==(i=tn())){for(s=[],f=o,44===n.charCodeAt(o)?(u=",",o++):(u=null,0===a&&l('","')),null!==u&&null!==(c=tn())?u=[u,c]:(u=null,o=f);null!==u;)s.push(u),f=o,44===n.charCodeAt(o)?(u=",",o++):(u=null,0===a&&l('","')),null!==u&&null!==(c=tn())?u=[u,c]:(u=null,o=f);null!==s?i=[i,s]:(i=null,o=h)}else i=null,o=h;null!==i&&null!==(s=B())?e=[e,t,r,i,s]:(e=null,o=d)}else e=null,o=d;else e=null,o=d;else e=null,o=d;return e}function tn(){var e,t,r;return t=o,"auth-int"===n.substr(o,8).toLowerCase()?(e=n.substr(o,8),o+=8):(e=null,0===a&&l('"auth-int"')),null===e&&("auth"===n.substr(o,4).toLowerCase()?(e=n.substr(o,4),o+=4):(e=null,0===a&&l('"auth"')),null===e&&(e=N())),null!==e&&(r=e,Un.qop||(Un.qop=[]),e=void Un.qop.push(r.toLowerCase())),null===e&&(o=t),e}function nn(){var e,t,n,r,i,a,s;if(i=o,a=o,null!==(e=_t())){for(t=[],s=o,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,o=s);null!==n;)t.push(n),s=o,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,o=s);null!==t?e=[e,t]:(e=null,o=a)}else e=null,o=a;return null!==e&&(e=function(e){var t;Un.multi_header||(Un.multi_header=[]);try{t=new Hn(Un.uri,Un.display_name,Un.params),delete Un.uri,delete Un.display_name,delete Un.params}catch(e){t=null}Un.multi_header.push({possition:o,offset:e,parsed:t})}(i)),null===e&&(o=i),e}function rn(){var e;return null===(e=on())&&(e=wt()),e}function on(){var e,t,r,i,s,u,c;if(s=o,u=o,"cause"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"cause"')),null!==e)if(null!==(t=O())){if(null!==(i=d()))for(r=[];null!==i;)r.push(i),i=d();else r=null;null!==r?e=[e,t,r]:(e=null,o=u)}else e=null,o=u;else e=null,o=u;return null!==e&&(c=e[2],e=void(Un.cause=parseInt(c.join("")))),null===e&&(o=s),e}function an(){var e,t,n,r,i,a;if(i=o,null!==(e=_t())){for(t=[],a=o,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=F())&&null!==(r=wt())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;return e}function sn(){var e,t,r;return t=o,"active"===n.substr(o,6).toLowerCase()?(e=n.substr(o,6),o+=6):(e=null,0===a&&l('"active"')),null===e&&("pending"===n.substr(o,7).toLowerCase()?(e=n.substr(o,7),o+=7):(e=null,0===a&&l('"pending"')),null===e&&("terminated"===n.substr(o,10).toLowerCase()?(e=n.substr(o,10),o+=10):(e=null,0===a&&l('"terminated"')),null===e&&(e=N()))),null!==e&&(r=t,e=void(Un.state=n.substring(o,r))),null===e&&(o=t),e}function un(){var e,t,r,i,s,u,c,d;return i=o,s=o,"reason"===n.substr(o,6).toLowerCase()?(e=n.substr(o,6),o+=6):(e=null,0===a&&l('"reason"')),null!==e&&null!==(t=O())&&null!==(r=ln())?e=[e,t,r]:(e=null,o=s),null!==e&&(e=void(void 0!==(u=e[2])&&(Un.reason=u))),null===e&&(o=i),null===e&&(i=o,s=o,"expires"===n.substr(o,7).toLowerCase()?(e=n.substr(o,7),o+=7):(e=null,0===a&&l('"expires"')),null!==e&&null!==(t=O())&&null!==(r=Tt())?e=[e,t,r]:(e=null,o=s),null!==e&&(e=void(void 0!==(d=e[2])&&(Un.expires=d))),null===e&&(o=i),null===e&&(i=o,s=o,"retry_after"===n.substr(o,11).toLowerCase()?(e=n.substr(o,11),o+=11):(e=null,0===a&&l('"retry_after"')),null!==e&&null!==(t=O())&&null!==(r=Tt())?e=[e,t,r]:(e=null,o=s),null!==e&&(e=void(void 0!==(c=e[2])&&(Un.retry_after=c))),null===e&&(o=i),null===e&&(e=wt()))),e}function ln(){var e;return"deactivated"===n.substr(o,11).toLowerCase()?(e=n.substr(o,11),o+=11):(e=null,0===a&&l('"deactivated"')),null===e&&("probation"===n.substr(o,9).toLowerCase()?(e=n.substr(o,9),o+=9):(e=null,0===a&&l('"probation"')),null===e&&("rejected"===n.substr(o,8).toLowerCase()?(e=n.substr(o,8),o+=8):(e=null,0===a&&l('"rejected"')),null===e&&("timeout"===n.substr(o,7).toLowerCase()?(e=n.substr(o,7),o+=7):(e=null,0===a&&l('"timeout"')),null===e&&("giveup"===n.substr(o,6).toLowerCase()?(e=n.substr(o,6),o+=6):(e=null,0===a&&l('"giveup"')),null===e&&("noresource"===n.substr(o,10).toLowerCase()?(e=n.substr(o,10),o+=10):(e=null,0===a&&l('"noresource"')),null===e&&("invariant"===n.substr(o,9).toLowerCase()?(e=n.substr(o,9),o+=9):(e=null,0===a&&l('"invariant"')),null===e&&(e=N()))))))),e}function cn(){var e;return null===(e=Ht())&&(e=wt()),e}function dn(){var e,t,n,r,i,a,s,u;if(s=o,null!==(e=vn()))if(null!==(t=D()))if(null!==(n=bn())){for(r=[],u=o,null!==(i=F())&&null!==(a=hn())?i=[i,a]:(i=null,o=u);null!==i;)r.push(i),u=o,null!==(i=F())&&null!==(a=hn())?i=[i,a]:(i=null,o=u);null!==r?e=[e,t,n,r]:(e=null,o=s)}else e=null,o=s;else e=null,o=s;else e=null,o=s;return e}function hn(){var e;return null===(e=fn())&&null===(e=mn())&&null===(e=pn())&&null===(e=_n())&&null===(e=gn())&&(e=wt()),e}function fn(){var e,t,r,i,s,u;return i=o,s=o,"ttl"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"ttl"')),null!==e&&null!==(t=O())&&null!==(r=Ln())?e=[e,t,r]:(e=null,o=s),null!==e&&(u=e[2],e=void(Un.ttl=u)),null===e&&(o=i),e}function mn(){var e,t,r,i,s,u;return i=o,s=o,"maddr"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"maddr"')),null!==e&&null!==(t=O())&&null!==(r=se())?e=[e,t,r]:(e=null,o=s),null!==e&&(u=e[2],e=void(Un.maddr=u)),null===e&&(o=i),e}function pn(){var e,t,r,i,s,u;return i=o,s=o,"received"===n.substr(o,8).toLowerCase()?(e=n.substr(o,8),o+=8):(e=null,0===a&&l('"received"')),null!==e&&null!==(t=O())?(null===(r=pe())&&(r=he()),null!==r?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(u=e[2],e=void(Un.received=u)),null===e&&(o=i),e}function _n(){var e,t,r,i,s,u;return i=o,s=o,"branch"===n.substr(o,6).toLowerCase()?(e=n.substr(o,6),o+=6):(e=null,0===a&&l('"branch"')),null!==e&&null!==(t=O())&&null!==(r=N())?e=[e,t,r]:(e=null,o=s),null!==e&&(u=e[2],e=void(Un.branch=u)),null===e&&(o=i),e}function gn(){var e,t,r,i,s;return i=o,"rport"===n.substr(o,5).toLowerCase()?(e=n.substr(o,5),o+=5):(e=null,0===a&&l('"rport"')),null!==e?(s=o,null!==(t=O())&&null!==(r=yn())?t=[t,r]:(t=null,o=s),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=i)):(e=null,o=i),e}function yn(){var e,t,n,r,i,a,s,u;return a=o,s=o,null!==(e=null!==(e=d())?e:"")&&null!==(t=null!==(t=d())?t:"")&&null!==(n=null!==(n=d())?n:"")&&null!==(r=null!==(r=d())?r:"")&&null!==(i=null!==(i=d())?i:"")?e=[e,t,n,r,i]:(e=null,o=s),null!==e&&(u=e,e=void(Un.rport=parseInt(u.join("")))),null===e&&(o=a),e}function vn(){var e,t,n,r,i,a;return a=o,null!==(e=Mn())&&null!==(t=Y())&&null!==(n=N())&&null!==(r=Y())&&null!==(i=Tn())?e=[e,t,n,r,i]:(e=null,o=a),e}function Mn(){var e,t,r;return t=o,"sip"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"SIP"')),null===e&&(e=N()),null!==e&&(r=e,e=void(Un.protocol=r)),null===e&&(o=t),e}function Tn(){var e,t,r;return t=o,"udp"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"UDP"')),null===e&&("tcp"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"TCP"')),null===e&&("tls"===n.substr(o,3).toLowerCase()?(e=n.substr(o,3),o+=3):(e=null,0===a&&l('"TLS"')),null===e&&("sctp"===n.substr(o,4).toLowerCase()?(e=n.substr(o,4),o+=4):(e=null,0===a&&l('"SCTP"')),null===e&&(e=N())))),null!==e&&(r=e,e=void(Un.transport=r)),null===e&&(o=t),e}function bn(){var e,t,n,r,i;return r=o,null!==(e=wn())?(i=o,null!==(t=W())&&null!==(n=Dn())?t=[t,n]:(t=null,o=i),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=r)):(e=null,o=r),e}function wn(){var e,t,r;return t=o,null===(e=pe())&&null===(e=de())&&(e=ue()),null!==e&&(r=t,e=void(Un.host=n.substring(o,r))),null===e&&(o=t),e}function Dn(){var e,t,n,r,i,a,s,u;return a=o,s=o,null!==(e=null!==(e=d())?e:"")&&null!==(t=null!==(t=d())?t:"")&&null!==(n=null!==(n=d())?n:"")&&null!==(r=null!==(r=d())?r:"")&&null!==(i=null!==(i=d())?i:"")?e=[e,t,n,r,i]:(e=null,o=s),null!==e&&(u=e,e=void(Un.port=parseInt(u.join("")))),null===e&&(o=a),e}function Ln(){var e,t,n,r,i;return r=o,i=o,null!==(e=d())&&null!==(t=null!==(t=d())?t:"")&&null!==(n=null!==(n=d())?n:"")?e=[e,t,n]:(e=null,o=i),null!==e&&(e=parseInt(e.join(""))),null===e&&(o=r),e}function Sn(){var e,t,n;return t=o,null!==(e=Tt())&&(n=e,e=void(Un.expires=n)),null===e&&(o=t),e}function kn(){var e;return null===(e=An())&&(e=wt()),e}function An(){var e,t,r,i,s,u;return i=o,s=o,"refresher"===n.substr(o,9).toLowerCase()?(e=n.substr(o,9),o+=9):(e=null,0===a&&l('"refresher"')),null!==e&&null!==(t=O())?("uac"===n.substr(o,3).toLowerCase()?(r=n.substr(o,3),o+=3):(r=null,0===a&&l('"uac"')),null===r&&("uas"===n.substr(o,3).toLowerCase()?(r=n.substr(o,3),o+=3):(r=null,0===a&&l('"uas"'))),null!==r?e=[e,t,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(u=e[2],e=void(Un.refresher=u.toLowerCase())),null===e&&(o=i),e}function En(){var e,t;for(e=[],null===(t=A())&&null===(t=I())&&(t=D());null!==t;)e.push(t),null===(t=A())&&null===(t=I())&&(t=D());return e}function In(){var e,t,r,i,s,u,c,d,h,f,m,p;return f=o,m=o,null!==(e=xn())?(45===n.charCodeAt(o)?(t="-",o++):(t=null,0===a&&l('"-"')),null!==t&&null!==(r=Nn())?(45===n.charCodeAt(o)?(i="-",o++):(i=null,0===a&&l('"-"')),null!==i&&null!==(s=Nn())?(45===n.charCodeAt(o)?(u="-",o++):(u=null,0===a&&l('"-"')),null!==u&&null!==(c=Nn())?(45===n.charCodeAt(o)?(d="-",o++):(d=null,0===a&&l('"-"')),null!==d&&null!==(h=Cn())?e=[e,t,r,i,s,u,c,d,h]:(e=null,o=m)):(e=null,o=m)):(e=null,o=m)):(e=null,o=m)):(e=null,o=m),null!==e&&(p=f,e[0],e=void(Un=n.substring(o+5,p))),null===e&&(o=f),e}function Nn(){var e,t,n,r,i;return i=o,null!==(e=f())&&null!==(t=f())&&null!==(n=f())&&null!==(r=f())?e=[e,t,n,r]:(e=null,o=i),e}function xn(){var e,t,n;return n=o,null!==(e=Nn())&&null!==(t=Nn())?e=[e,t]:(e=null,o=n),e}function Cn(){var e,t,n,r;return r=o,null!==(e=Nn())&&null!==(t=Nn())&&null!==(n=Nn())?e=[e,t,n]:(e=null,o=r),e}function jn(){var e,t,r,i,s,u,c;return i=o,s=o,null!==(e=C())?(u=o,64===n.charCodeAt(o)?(t="@",o++):(t=null,0===a&&l('"@"')),null!==t&&null!==(r=C())?t=[t,r]:(t=null,o=u),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,o=s)):(e=null,o=s),null!==e&&(c=i,e=void(Un.call_id=n.substring(o,c))),null===e&&(o=i),e}function Yn(){var e;return null===(e=On())&&null===(e=Rn())&&null===(e=zn())&&(e=wt()),e}function On(){var e,t,r,i,s,u;return i=o,s=o,"to-tag"===n.substr(o,6)?(e="to-tag",o+=6):(e=null,0===a&&l('"to-tag"')),null!==e&&null!==(t=O())&&null!==(r=N())?e=[e,t,r]:(e=null,o=s),null!==e&&(u=e[2],e=void(Un.to_tag=u)),null===e&&(o=i),e}function Rn(){var e,t,r,i,s,u;return i=o,s=o,"from-tag"===n.substr(o,8)?(e="from-tag",o+=8):(e=null,0===a&&l('"from-tag"')),null!==e&&null!==(t=O())&&null!==(r=N())?e=[e,t,r]:(e=null,o=s),null!==e&&(u=e[2],e=void(Un.from_tag=u)),null===e&&(o=i),e}function zn(){var e,t;return t=o,"early-only"===n.substr(o,10)?(e="early-only",o+=10):(e=null,0===a&&l('"early-only"')),null!==e&&(e=void(Un.early_only=!0)),null===e&&(o=t),e}var Pn=e("./URI"),Hn=e("./NameAddrHeader"),Un={};if(null===i[r]()||o!==n.length){var Fn=Math.max(o,s),Wn=Fn<n.length?n.charAt(Fn):null,Qn=function(){for(var e=1,t=1,r=!1,i=0;i<Math.max(o,s);i++){var a=n.charAt(i);"\n"===a?(r||e++,t=1,r=!1):"\r"===a||"\u2028"===a||"\u2029"===a?(e++,t=1,r=!0):(t++,r=!1)}return{line:e,column:t}}();return new this.SyntaxError(function(e){e.sort();for(var t=null,n=[],r=0;r<e.length;r++)e[r]!==t&&(n.push(e[r]),t=e[r]);return n}(u),Wn,Fn,Qn.line,Qn.column),-1}return Un},toSource:function(){return this._source},SyntaxError:function(e,n,r,i,o){this.name="SyntaxError",this.expected=e,this.found=n,this.message=function(e,n){var r;switch(e.length){case 0:r="end of input";break;case 1:r=e[0];break;default:r=e.slice(0,e.length-1).join(", ")+" or "+e[e.length-1]}return"Expected "+r+" but "+(n?t(n):"end of input")+" found."}(e,n),this.offset=r,this.line=i,this.column=o}};return n.SyntaxError.prototype=Error.prototype,n}()},{"./NameAddrHeader":11,"./URI":29}],8:[function(e,t,n){var r=e("../package.json"),i=e("./Constants"),o=e("./Exceptions"),a=e("./Utils"),s=e("./UA"),u=e("./URI"),l=e("./NameAddrHeader"),c=e("./Grammar"),d=e("./WebSocketInterface");e("debug")("JsSIP")("version %s",r.version),t.exports={C:i,Exceptions:o,Utils:a,UA:s,URI:u,NameAddrHeader:l,WebSocketInterface:d,Grammar:c,debug:e("debug"),get name(){return r.title},get version(){return r.version}}},{"../package.json":42,"./Constants":2,"./Exceptions":6,"./Grammar":7,"./NameAddrHeader":11,"./UA":28,"./URI":29,"./Utils":30,"./WebSocketInterface":31,debug:34}],9:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("debug"),o="JsSIP";t.exports=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t?(this._debug=i.default("".concat(o,":").concat(t)),this._warn=i.default("".concat(o,":WARN:").concat(t)),this._error=i.default("".concat(o,":ERROR:").concat(t))):(this._debug=i.default(o),this._warn=i.default("".concat(o,":WARN")),this._error=i.default("".concat(o,":ERROR"))),this._debug.log=console.info.bind(console),this._warn.log=console.warn.bind(console),this._error.log=console.error.bind(console)}var t,n;return t=e,(n=[{key:"debug",get:function(){return this._debug}},{key:"warn",get:function(){return this._warn}},{key:"error",get:function(){return this._error}}])&&r(t.prototype,n),e}()},{debug:34}],10:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=e("events").EventEmitter,c=e("./Logger"),d=e("./Constants"),h=e("./SIPMessage"),f=e("./Utils"),m=e("./RequestSender"),p=e("./Exceptions"),_=e("./URI"),g=new c("Message");t.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,l);var t,n,r=a(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this))._ua=e,t._request=null,t._closed=!1,t._direction=null,t._local_identity=null,t._remote_identity=null,t._is_replied=!1,t._data={},t}return t=s,(n=[{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}},{key:"send",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e;if(void 0===e||void 0===t)throw new TypeError("Not enough arguments");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: ".concat(i));var o=f.cloneArray(r.extraHeaders),a=f.cloneObject(r.eventHandlers),s=r.contentType||"text/plain",u={};for(var l in r.fromUserName&&(u.from_uri=new _("sip",r.fromUserName,this._ua.configuration.uri.host),o.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString()))),r.fromDisplayName&&(u.from_display_name=r.fromDisplayName),a)Object.prototype.hasOwnProperty.call(a,l)&&this.on(l,a[l]);o.push("Content-Type: ".concat(s)),this._request=new h.OutgoingRequest(d.MESSAGE,e,this._ua,u,o),t&&(this._request.body=t);var c=new m(this._ua,this._request,{onRequestTimeout:function(){n._onRequestTimeout()},onTransportError:function(){n._onTransportError()},onReceiveResponse:function(e){n._receiveResponse(e)}});this._newMessage("local",this._request),c.send()}},{key:"init_incoming",value:function(e){this._request=e,this._newMessage("remote",e),this._is_replied||(this._is_replied=!0,e.reply(200)),this._close()}},{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=f.cloneArray(e.extraHeaders),n=e.body;if("incoming"!==this._direction)throw new p.NotSupportedError('"accept" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");this._is_replied=!0,this._request.reply(200,null,t,n)}},{key:"reject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.status_code||480,n=e.reason_phrase,r=f.cloneArray(e.extraHeaders),i=e.body;if("incoming"!==this._direction)throw new p.NotSupportedError('"reject" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");if(t<300||t>=700)throw new TypeError("Invalid status_code: ".concat(t));this._is_replied=!0,this._request.reply(t,n,r,i)}},{key:"_receiveResponse",value:function(e){if(!this._closed)switch(!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):this._succeeded("remote",e);break;default:var t=f.sipErrorCause(e.status_code);this._failed("remote",e,t)}}},{key:"_onRequestTimeout",value:function(){this._closed||this._failed("system",null,d.causes.REQUEST_TIMEOUT)}},{key:"_onTransportError",value:function(){this._closed||this._failed("system",null,d.causes.CONNECTION_ERROR)}},{key:"_close",value:function(){this._closed=!0,this._ua.destroyMessage(this)}},{key:"_newMessage",value:function(e,t){"remote"===e?(this._direction="incoming",this._local_identity=t.to,this._remote_identity=t.from):"local"===e&&(this._direction="outgoing",this._local_identity=t.from,this._remote_identity=t.to),this._ua.newMessage(this,{originator:e,message:this,request:t})}},{key:"_failed",value:function(e,t,n){g.debug("MESSAGE failed"),this._close(),g.debug('emit "failed"'),this.emit("failed",{originator:e,response:t||null,cause:n})}},{key:"_succeeded",value:function(e,t){g.debug("MESSAGE succeeded"),this._close(),g.debug('emit "succeeded"'),this.emit("succeeded",{originator:e,response:t})}}])&&i(t.prototype,n),s}()},{"./Constants":2,"./Exceptions":6,"./Logger":9,"./RequestSender":21,"./SIPMessage":22,"./URI":29,"./Utils":30,events:33}],11:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("./URI"),o=e("./Grammar");t.exports=function(){function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(t&&t instanceof i))throw new TypeError('missing or invalid "uri" parameter');for(var o in this._uri=t,this._parameters={},this.display_name=n,r)Object.prototype.hasOwnProperty.call(r,o)&&this.setParam(o,r[o])}var t,n,a;return t=e,a=[{key:"parse",value:function(e){return-1!==(e=o.parse(e,"Name_Addr_Header"))?e:void 0}}],(n=[{key:"uri",get:function(){return this._uri}},{key:"display_name",get:function(){return this._display_name},set:function(e){this._display_name=0===e?"0":e}},{key:"setParam",value:function(e,t){e&&(this._parameters[e.toLowerCase()]=null==t?null:t.toString())}},{key:"getParam",value:function(e){if(e)return this._parameters[e.toLowerCase()]}},{key:"hasParam",value:function(e){if(e)return!!this._parameters.hasOwnProperty(e.toLowerCase())}},{key:"deleteParam",value:function(e){if(e=e.toLowerCase(),this._parameters.hasOwnProperty(e)){var t=this._parameters[e];return delete this._parameters[e],t}}},{key:"clearParams",value:function(){this._parameters={}}},{key:"clone",value:function(){return new e(this._uri.clone(),this._display_name,JSON.parse(JSON.stringify(this._parameters)))}},{key:"_quote",value:function(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}},{key:"toString",value:function(){var e=this._display_name?'"'.concat(this._quote(this._display_name),'" '):"";for(var t in e+="<".concat(this._uri.toString(),">"),this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,t)&&(e+=";".concat(t),null!==this._parameters[t]&&(e+="=".concat(this._parameters[t])));return e}}])&&r(t.prototype,n),a&&r(t,a),e}()},{"./Grammar":7,"./URI":29}],12:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?s(e):t}(this,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=e("events").EventEmitter,d=e("./Logger"),h=e("./Constants"),f=e("./Utils"),m=e("./Dialog"),p=new d("Notifier"),_={NOTIFY_RESPONSE_TIMEOUT:0,NOTIFY_TRANSPORT_ERROR:1,NOTIFY_NON_OK_RESPONSE:2,NOTIFY_FAILED_AUTHENTICATION:3,SEND_FINAL_NOTIFY:4,RECEIVE_UNSUBSCRIBE:5,SUBSCRIPTION_EXPIRED:6,STATE_PENDING:0,STATE_ACTIVE:1,STATE_TERMINATED:2};t.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(l,c);var t,n,r,u=a(l);function l(e,t,n,r){var i,o=r.extraHeaders,a=r.allowEvents,c=r.pending;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),p.debug("new"),i=u.call(this),!t)throw new TypeError("subscribe is undefined");if(!n)throw new TypeError("contentType is undefined");i._ua=e,i._initial_subscribe=t,i._expires_timestamp=null,i._expires_timer=null,i._state=c?_.STATE_PENDING:_.STATE_ACTIVE,i._terminated_reason=null,i._terminated_retry_after=null,i.data={},i._dialog=null;var d=t.getHeader("event");i._content_type=n,i._expires=parseInt(t.getHeader("expires")),i._headers=f.cloneArray(o),i._headers.push("Event: ".concat(d)),i._contact=i._headers.find((function(e){return e.startsWith("Contact")})),i._contact||(i._contact="Contact: <sip:".concat(t.to.uri.user,"@").concat(f.createRandomToken(12),".invalid;transport=ws>"),i._headers.push(i._contact)),a&&i._headers.push("Allow-Events: ".concat(a)),i._target=t.from.uri.user,t.to_tag=f.newTag();var h=new m(s(i),t,"UAS");if(h.error)throw p.warn(h.error),new Error("SUBSCRIBE missed Contact");return i._dialog=h,i._expires>0&&i._setExpiresTimer(),i}return t=l,r=[{key:"C",get:function(){return _}}],(n=[{key:"C",get:function(){return _}},{key:"receiveRequest",value:function(e){if(e.method===h.SUBSCRIBE){var t=e.getHeader("expires");null==t&&(t="900",p.debug("Missed expires header. Set by default ".concat(t))),this._expires=parseInt(t),e.reply(200,null,["Expires: ".concat(this._expires),"".concat(this._contact)]);var n=e.body,r=e.getHeader("content-type"),i=0===this._expires;i||this._setExpiresTimer(),p.debug('emit "subscribe"'),this.emit("subscribe",i,e,n,r),i&&this._dialogTerminated(_.RECEIVE_UNSUBSCRIBE)}else e.reply(405)}},{key:"start",value:function(){p.debug("start()"),this.receiveRequest(this._initial_subscribe)}},{key:"setActiveState",value:function(){p.debug("setActiveState()"),this._state===_.STATE_PENDING&&(this._state=_.STATE_ACTIVE)}},{key:"notify",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(p.debug("notify()"),this._dialog){var n=this._stateNumberToString(this._state);if(this._state!==_.STATE_TERMINATED){var r=Math.floor((this._expires_timestamp-(new Date).getTime())/1e3);r<0&&(r=0),n+=";expires=".concat(r)}else this._terminated_reason&&(n+=";reason=".concat(this._terminated_reason)),null!==this._terminated_retry_after&&(n+=";retry-after=".concat(this._terminated_retry_after));var i=this._headers.slice();i.push("Subscription-State: ".concat(n)),t&&i.push("Content-Type: ".concat(this._content_type)),this._dialog.sendRequest(h.NOTIFY,{body:t,extraHeaders:i,eventHandlers:{onRequestTimeout:function(){e._dialogTerminated(_.NOTIFY_RESPONSE_TIMEOUT)},onTransportError:function(){e._dialogTerminated(_.NOTIFY_TRANSPORT_ERROR)},onErrorResponse:function(t){401===t.status_code||407===t.status_code?e._dialogTerminated(_.NOTIFY_FAILED_AUTHENTICATION):e._dialogTerminated(_.NOTIFY_NON_OK_RESPONSE)},onDialogError:function(){e._dialogTerminated(_.NOTIFY_NON_OK_RESPONSE)}}})}else p.warn("final notify has sent")}},{key:"terminate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;p.debug("terminate()"),this._state=_.STATE_TERMINATED,this._terminated_reason=t,this._terminated_retry_after=n,this.notify(e),this._dialogTerminated(_.SEND_FINAL_NOTIFY)}},{key:"state",get:function(){return this._state}},{key:"id",get:function(){return this._dialog?this._dialog.id:null}},{key:"_dialogTerminated",value:function(e){if(this._dialog){this._state=_.STATE_TERMINATED,clearTimeout(this._expires_timer),this._dialog&&(this._dialog.terminate(),this._dialog=null);var t=e===_.SUBSCRIPTION_EXPIRED;p.debug('emit "terminated" code='.concat(e,", send final notify=").concat(t)),this.emit("terminated",e,t)}}},{key:"_setExpiresTimer",value:function(){var e=this;this._expires_timestamp=(new Date).getTime()+1e3*this._expires,clearTimeout(this._expires_timer),this._expires_timer=setTimeout((function(){e._dialog&&(e._terminated_reason="timeout",e.notify(),e._dialogTerminated(_.SUBSCRIPTION_EXPIRED))}),1e3*this._expires)}},{key:"_stateNumberToString",value:function(e){switch(e){case _.STATE_PENDING:return"pending";case _.STATE_ACTIVE:return"active";case _.STATE_TERMINATED:return"terminated";default:throw new TypeError("wrong state value")}}}])&&i(t.prototype,n),r&&i(t,r),l}()},{"./Constants":2,"./Dialog":3,"./Logger":9,"./Utils":30,events:33}],13:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=e("events").EventEmitter,c=e("./Logger"),d=e("./Constants"),h=e("./SIPMessage"),f=e("./Utils"),m=e("./RequestSender"),p=e("./Exceptions"),_=new c("Options");t.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,l);var t,n,r=a(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this))._ua=e,t._request=null,t._closed=!1,t._direction=null,t._local_identity=null,t._remote_identity=null,t._is_replied=!1,t._data={},t}return t=s,(n=[{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}},{key:"send",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e;if(void 0===e)throw new TypeError("A target is required for OPTIONS");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: ".concat(i));var o=f.cloneArray(r.extraHeaders),a=f.cloneObject(r.eventHandlers),s=r.contentType||"application/sdp";for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&this.on(u,a[u]);o.push("Content-Type: ".concat(s)),this._request=new h.OutgoingRequest(d.OPTIONS,e,this._ua,null,o),t&&(this._request.body=t);var l=new m(this._ua,this._request,{onRequestTimeout:function(){n._onRequestTimeout()},onTransportError:function(){n._onTransportError()},onReceiveResponse:function(e){n._receiveResponse(e)}});this._newOptions("local",this._request),l.send()}},{key:"init_incoming",value:function(e){this._request=e,this._newOptions("remote",e),this._is_replied||(this._is_replied=!0,e.reply(200)),this._close()}},{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=f.cloneArray(e.extraHeaders),n=e.body;if("incoming"!==this._direction)throw new p.NotSupportedError('"accept" not supported for outgoing Options');if(this._is_replied)throw new Error("incoming Options already replied");this._is_replied=!0,this._request.reply(200,null,t,n)}},{key:"reject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.status_code||480,n=e.reason_phrase,r=f.cloneArray(e.extraHeaders),i=e.body;if("incoming"!==this._direction)throw new p.NotSupportedError('"reject" not supported for outgoing Options');if(this._is_replied)throw new Error("incoming Options already replied");if(t<300||t>=700)throw new TypeError("Invalid status_code: ".concat(t));this._is_replied=!0,this._request.reply(t,n,r,i)}},{key:"_receiveResponse",value:function(e){if(!this._closed)switch(!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):this._succeeded("remote",e);break;default:var t=f.sipErrorCause(e.status_code);this._failed("remote",e,t)}}},{key:"_onRequestTimeout",value:function(){this._closed||this._failed("system",null,d.causes.REQUEST_TIMEOUT)}},{key:"_onTransportError",value:function(){this._closed||this._failed("system",null,d.causes.CONNECTION_ERROR)}},{key:"_close",value:function(){this._closed=!0,this._ua.destroyMessage(this)}},{key:"_newOptions",value:function(e,t){"remote"===e?(this._direction="incoming",this._local_identity=t.to,this._remote_identity=t.from):"local"===e&&(this._direction="outgoing",this._local_identity=t.from,this._remote_identity=t.to),this._ua.newOptions(this,{originator:e,message:this,request:t})}},{key:"_failed",value:function(e,t,n){_.debug("OPTIONS failed"),this._close(),_.debug('emit "failed"'),this.emit("failed",{originator:e,response:t||null,cause:n})}},{key:"_succeeded",value:function(e,t){_.debug("OPTIONS succeeded"),this._close(),_.debug('emit "succeeded"'),this.emit("succeeded",{originator:e,response:t})}}])&&i(t.prototype,n),s}()},{"./Constants":2,"./Exceptions":6,"./Logger":9,"./RequestSender":21,"./SIPMessage":22,"./Utils":30,events:33}],14:[function(e,t,n){function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o=e("./Logger"),a=e("./Grammar"),s=e("./SIPMessage"),u=new o("Parser");function l(e,t){var n=t,r=0,i=0;if(e.substring(n,n+2).match(/(^\r\n)/))return-2;for(;0===r;){if(-1===(i=e.indexOf("\r\n",n)))return i;!e.substring(i+2,i+4).match(/(^\r\n)/)&&e.charAt(i+2).match(/(^\s+)/)?n=i+2:r=i}return r}function c(e,t,n,i){var o,u=t.indexOf(":",n),l=t.substring(n,u).trim(),c=t.substring(u+1,i).trim();switch(l.toLowerCase()){case"via":case"v":e.addHeader("via",c),1===e.getHeaders("via").length?(o=e.parseHeader("Via"))&&(e.via=o,e.via_branch=o.branch):o=0;break;case"from":case"f":e.setHeader("from",c),(o=e.parseHeader("from"))&&(e.from=o,e.from_tag=o.getParam("tag"));break;case"to":case"t":e.setHeader("to",c),(o=e.parseHeader("to"))&&(e.to=o,e.to_tag=o.getParam("tag"));break;case"record-route":if(-1===(o=a.parse(c,"Record_Route")))o=void 0;else{var d,h=r(o);try{for(h.s();!(d=h.n()).done;){var f=d.value;e.addHeader("record-route",c.substring(f.possition,f.offset)),e.headers["Record-Route"][e.getHeaders("record-route").length-1].parsed=f.parsed}}catch(e){h.e(e)}finally{h.f()}}break;case"call-id":case"i":e.setHeader("call-id",c),(o=e.parseHeader("call-id"))&&(e.call_id=c);break;case"contact":case"m":if(-1===(o=a.parse(c,"Contact")))o=void 0;else{var m,p=r(o);try{for(p.s();!(m=p.n()).done;){var _=m.value;e.addHeader("contact",c.substring(_.possition,_.offset)),e.headers.Contact[e.getHeaders("contact").length-1].parsed=_.parsed}}catch(e){p.e(e)}finally{p.f()}}break;case"content-length":case"l":e.setHeader("content-length",c),o=e.parseHeader("content-length");break;case"content-type":case"c":e.setHeader("content-type",c),o=e.parseHeader("content-type");break;case"cseq":e.setHeader("cseq",c),(o=e.parseHeader("cseq"))&&(e.cseq=o.value),e instanceof s.IncomingResponse&&(e.method=o.method);break;case"max-forwards":e.setHeader("max-forwards",c),o=e.parseHeader("max-forwards");break;case"www-authenticate":e.setHeader("www-authenticate",c),o=e.parseHeader("www-authenticate");break;case"proxy-authenticate":e.setHeader("proxy-authenticate",c),o=e.parseHeader("proxy-authenticate");break;case"session-expires":case"x":e.setHeader("session-expires",c),(o=e.parseHeader("session-expires"))&&(e.session_expires=o.expires,e.session_expires_refresher=o.refresher);break;case"refer-to":case"r":e.setHeader("refer-to",c),(o=e.parseHeader("refer-to"))&&(e.refer_to=o);break;case"replaces":e.setHeader("replaces",c),(o=e.parseHeader("replaces"))&&(e.replaces=o);break;case"event":case"o":e.setHeader("event",c),(o=e.parseHeader("event"))&&(e.event=o);break;default:e.addHeader(l,c),o=0}return void 0!==o||{error:'error parsing header "'.concat(l,'"')}}n.parseMessage=function(e,t){var n,r,i=e.indexOf("\r\n");if(-1!==i){var o=e.substring(0,i),d=a.parse(o,"Request_Response");if(-1!==d){d.status_code?((n=new s.IncomingResponse).status_code=d.status_code,n.reason_phrase=d.reason_phrase):((n=new s.IncomingRequest(t)).method=d.method,n.ruri=d.uri),n.data=e;for(var h=i+2;;){if(-2===(i=l(e,h))){r=h+2;break}if(-1===i)return void u.warn("parseMessage() | malformed message");if(!0!==(d=c(n,e,h,i)))return void u.warn("parseMessage() |",d.error);h=i+2}if(n.hasHeader("content-length")){var f=n.getHeader("content-length");n.body=e.substr(r,f)}else n.body=e.substring(r);return n}u.warn('parseMessage() | error parsing first line of SIP message: "'.concat(o,'"'))}else u.warn("parseMessage() | no CRLF found, not a SIP message")}},{"./Grammar":7,"./Logger":9,"./SIPMessage":22}],15:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=e("events").EventEmitter,h=e("sdp-transform"),f=e("./Logger"),m=e("./Constants"),p=e("./Exceptions"),_=e("./Transactions"),g=e("./Utils"),y=e("./Timers"),v=e("./SIPMessage"),M=e("./Dialog"),T=e("./RequestSender"),b=e("./RTCSession/DTMF"),w=e("./RTCSession/Info"),D=e("./RTCSession/ReferNotifier"),L=e("./RTCSession/ReferSubscriber"),S=e("./URI"),k=new f("RTCSession"),A={STATUS_NULL:0,STATUS_INVITE_SENT:1,STATUS_1XX_RECEIVED:2,STATUS_INVITE_RECEIVED:3,STATUS_WAITING_FOR_ANSWER:4,STATUS_ANSWERED:5,STATUS_WAITING_FOR_ACK:6,STATUS_CANCELED:7,STATUS_TERMINATED:8,STATUS_CONFIRMED:9},E=["audio","video"];t.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(u,d);var t,n,r,o=l(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),k.debug("new"),(t=o.call(this))._id=null,t._ua=e,t._status=A.STATUS_NULL,t._dialog=null,t._earlyDialogs={},t._contact=null,t._from_tag=null,t._to_tag=null,t._connection=null,t._connectionPromiseQueue=Promise.resolve(),t._request=null,t._is_canceled=!1,t._cancel_reason="",t._is_confirmed=!1,t._late_sdp=!1,t._rtcOfferConstraints=null,t._rtcAnswerConstraints=null,t._localMediaStream=null,t._localMediaStreamLocallyGenerated=!1,t._rtcReady=!0,t._iceReady=!1,t._timers={ackTimer:null,expiresTimer:null,invite2xxTimer:null,userNoAnswerTimer:null},t._direction=null,t._local_identity=null,t._remote_identity=null,t._start_time=null,t._end_time=null,t._tones=null,t._audioMuted=!1,t._videoMuted=!1,t._localHold=!1,t._remoteHold=!1,t._sessionTimers={enabled:t._ua.configuration.session_timers,refreshMethod:t._ua.configuration.session_timers_refresh_method,defaultExpires:m.SESSION_EXPIRES,currentExpires:null,running:!1,refresher:!1,timer:null},t._referSubscribers={},t._data={},t}return t=u,r=[{key:"C",get:function(){return A}}],(n=[{key:"C",get:function(){return A}},{key:"causes",get:function(){return m.causes}},{key:"id",get:function(){return this._id}},{key:"connection",get:function(){return this._connection}},{key:"contact",get:function(){return this._contact}},{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}},{key:"start_time",get:function(){return this._start_time}},{key:"end_time",get:function(){return this._end_time}},{key:"data",get:function(){return this._data},set:function(e){this._data=e}},{key:"status",get:function(){return this._status}},{key:"isInProgress",value:function(){switch(this._status){case A.STATUS_NULL:case A.STATUS_INVITE_SENT:case A.STATUS_1XX_RECEIVED:case A.STATUS_INVITE_RECEIVED:case A.STATUS_WAITING_FOR_ANSWER:return!0;default:return!1}}},{key:"isEstablished",value:function(){switch(this._status){case A.STATUS_ANSWERED:case A.STATUS_WAITING_FOR_ACK:case A.STATUS_CONFIRMED:return!0;default:return!1}}},{key:"isEnded",value:function(){switch(this._status){case A.STATUS_CANCELED:case A.STATUS_TERMINATED:return!0;default:return!1}}},{key:"isMuted",value:function(){return{audio:this._audioMuted,video:this._videoMuted}}},{key:"isOnHold",value:function(){return{local:this._localHold,remote:this._remoteHold}}},{key:"connect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;k.debug("connect()");var r=e,i=g.cloneObject(t.eventHandlers),o=g.cloneArray(t.extraHeaders),a=g.cloneObject(t.mediaConstraints,{audio:!0,video:!0}),s=t.mediaStream||null,u=g.cloneObject(t.pcConfig,{iceServers:[]}),l=t.rtcConstraints||null,c=t.rtcOfferConstraints||null;if(this._rtcOfferConstraints=c,this._rtcAnswerConstraints=t.rtcAnswerConstraints||null,this._data=t.data||this._data,void 0===e)throw new TypeError("Not enough arguments");if(this._status!==A.STATUS_NULL)throw new p.InvalidStateError(this._status);if(!window.RTCPeerConnection)throw new p.NotSupportedError("WebRTC not supported");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: ".concat(r));for(var d in this._sessionTimers.enabled&&g.isDecimal(t.sessionTimersExpires)&&(t.sessionTimersExpires>=m.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=t.sessionTimersExpires:this._sessionTimers.defaultExpires=m.SESSION_EXPIRES),i)Object.prototype.hasOwnProperty.call(i,d)&&this.on(d,i[d]);this._from_tag=g.newTag();var h=t.anonymous||!1,f={from_tag:this._from_tag};this._contact=this._ua.contact.toString({anonymous:h,outbound:!0}),h?(f.from_display_name="Anonymous",f.from_uri=new S("sip","anonymous","anonymous.invalid"),o.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString())),o.push("Privacy: id")):t.fromUserName&&(f.from_uri=new S("sip",t.fromUserName,this._ua.configuration.uri.host),o.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString()))),t.fromDisplayName&&(f.from_display_name=t.fromDisplayName),o.push("Contact: ".concat(this._contact)),o.push("Content-Type: application/sdp"),this._sessionTimers.enabled&&o.push("Session-Expires: ".concat(this._sessionTimers.defaultExpires).concat(this._ua.configuration.session_timers_force_refresher?";refresher=uac":"")),this._request=new v.InitialOutgoingInviteRequest(e,this._ua,f,o),this._id=this._request.call_id+this._from_tag,this._createRTCConnection(u,l),this._direction="outgoing",this._local_identity=this._request.from,this._remote_identity=this._request.to,n&&n(this),this._newRTCSession("local",this._request),this._sendInitialRequest(a,c,s)}},{key:"init_incoming",value:function(e,t){var n,r=this;k.debug("init_incoming()");var i=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0;if(e.body&&"application/sdp"!==i)e.reply(415);else if(this._status=A.STATUS_INVITE_RECEIVED,this._from_tag=e.from_tag,this._id=e.call_id+this._from_tag,this._request=e,this._contact=this._ua.contact.toString(),e.hasHeader("expires")&&(n=1e3*e.getHeader("expires")),e.to_tag=g.newTag(),this._createDialog(e,"UAS",!0)){if(e.body?this._late_sdp=!1:this._late_sdp=!0,this._status=A.STATUS_WAITING_FOR_ANSWER,this._timers.userNoAnswerTimer=setTimeout((function(){e.reply(408),r._failed("local",null,m.causes.NO_ANSWER)}),this._ua.configuration.no_answer_timeout),n&&(this._timers.expiresTimer=setTimeout((function(){r._status===A.STATUS_WAITING_FOR_ANSWER&&(e.reply(487),r._failed("system",null,m.causes.EXPIRES))}),n)),this._direction="incoming",this._local_identity=e.to,this._remote_identity=e.from,t&&t(this),this._newRTCSession("remote",e),this._status!==A.STATUS_TERMINATED){var o=["Contact: ".concat(this._contact)],a=this._ua.modes.ringing_header_mode;void 0!==a&&(Array.isArray(a)?o=o.concat(a):o.push(a)),e.reply(180,null,o),this._progress("local",null)}}else e.reply(500,"Missing Contact header field")}},{key:"answer",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};k.debug("answer()");var n=this._request,r=g.cloneArray(t.extraHeaders),o=g.cloneObject(t.mediaConstraints),a=t.mediaStream||null,s=g.cloneObject(t.pcConfig,{iceServers:[]}),u=t.rtcConstraints||null,l=t.rtcAnswerConstraints||null,c=g.cloneObject(t.rtcOfferConstraints),d=!1,h=!1,f=!1,_=!1;if(this._rtcAnswerConstraints=l,this._rtcOfferConstraints=t.rtcOfferConstraints||null,this._data=t.data||this._data,"incoming"!==this._direction)throw new p.NotSupportedError('"answer" not supported for outgoing RTCSession');if(this._status!==A.STATUS_WAITING_FOR_ANSWER)throw new p.InvalidStateError(this._status);if(this._sessionTimers.enabled&&g.isDecimal(t.sessionTimersExpires)&&(t.sessionTimersExpires>=m.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=t.sessionTimersExpires:this._sessionTimers.defaultExpires=m.SESSION_EXPIRES),this._status=A.STATUS_ANSWERED,this._createDialog(n,"UAS")){clearTimeout(this._timers.userNoAnswerTimer),r.unshift("Contact: ".concat(this._contact));var y=n.parseSDP();Array.isArray(y.media)||(y.media=[y.media]);var v,M=i(y.media);try{for(M.s();!(v=M.n()).done;){var T=v.value;"audio"===T.type&&(d=!0,T.direction&&"sendrecv"!==T.direction||(f=!0)),"video"===T.type&&(h=!0,T.direction&&"sendrecv"!==T.direction||(_=!0))}}catch(e){M.e(e)}finally{M.f()}if(a&&!1===o.audio){var b,w=i(a.getAudioTracks());try{for(w.s();!(b=w.n()).done;){var D=b.value;a.removeTrack(D)}}catch(e){w.e(e)}finally{w.f()}}if(a&&!1===o.video){var L,S=i(a.getVideoTracks());try{for(S.s();!(L=S.n()).done;){var E=L.value;a.removeTrack(E)}}catch(e){S.e(e)}finally{S.f()}}a||void 0!==o.audio||(o.audio=f),a||void 0!==o.video||(o.video=_),a||d||c.offerToReceiveAudio||(o.audio=!1),a||h||c.offerToReceiveVideo||(o.video=!1),this._createRTCConnection(s,u),Promise.resolve().then((function(){return a||(o.audio||o.video?(e._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(o).catch((function(t){if(e._status===A.STATUS_TERMINATED)throw new Error("terminated");throw n.reply(480),e._failed("local",null,m.causes.USER_DENIED_MEDIA_ACCESS),k.warn('emit "getusermediafailed" [error:%o]',t),e.emit("getusermediafailed",t),new Error("getUserMedia() failed")}))):void 0)})).then((function(t){if(e._status===A.STATUS_TERMINATED)throw new Error("terminated");e._localMediaStream=t,t&&t.getTracks().forEach((function(n){e._connection.addTrack(n,t)}))})).then((function(){if(!e._late_sdp){var t={originator:"remote",type:"offer",sdp:n.body};k.debug('emit "sdp"'),e.emit("sdp",t);var r=new RTCSessionDescription({type:"offer",sdp:t.sdp});return e._connectionPromiseQueue=e._connectionPromiseQueue.then((function(){return e._connection.setRemoteDescription(r)})).catch((function(t){throw n.reply(488),e._failed("system",null,m.causes.WEBRTC_ERROR),k.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',t),e.emit("peerconnection:setremotedescriptionfailed",t),new Error("peerconnection.setRemoteDescription() failed")})),e._connectionPromiseQueue}})).then((function(){if(e._status===A.STATUS_TERMINATED)throw new Error("terminated");return e._connecting(n),e._late_sdp?e._createLocalDescription("offer",e._rtcOfferConstraints).catch((function(){throw n.reply(500),new Error("_createLocalDescription() failed")})):e._createLocalDescription("answer",l).catch((function(){throw n.reply(500),new Error("_createLocalDescription() failed")}))})).then((function(t){if(e._status===A.STATUS_TERMINATED)throw new Error("terminated");e._handleSessionTimersInIncomingRequest(n,r),n.reply(200,null,r,t,(function(){e._status=A.STATUS_WAITING_FOR_ACK,e._setInvite2xxTimer(n,t),e._setACKTimer(),e._accepted("local")}),(function(){e._failed("system",null,m.causes.CONNECTION_ERROR)}))})).catch((function(t){e._status!==A.STATUS_TERMINATED&&k.warn(t)}))}else n.reply(500,"Error creating dialog")}},{key:"terminate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};k.debug("terminate()");var n,r=t.cause||m.causes.BYE,i=g.cloneArray(t.extraHeaders),o=t.body,a=t.status_code,s=t.reason_phrase;if(this._status===A.STATUS_TERMINATED)throw new p.InvalidStateError(this._status);switch(this._status){case A.STATUS_NULL:case A.STATUS_INVITE_SENT:case A.STATUS_1XX_RECEIVED:if(k.debug("canceling session"),a&&(a<200||a>=700))throw new TypeError("Invalid status_code: ".concat(a));a&&(s=s||m.REASON_PHRASE[a]||"",n="SIP ;cause=".concat(a,' ;text="').concat(s,'"')),this._status===A.STATUS_NULL||this._status===A.STATUS_INVITE_SENT?(this._is_canceled=!0,this._cancel_reason=n):this._status===A.STATUS_1XX_RECEIVED&&this._request.cancel(n),this._status=A.STATUS_CANCELED,this._failed("local",null,m.causes.CANCELED);break;case A.STATUS_WAITING_FOR_ANSWER:case A.STATUS_ANSWERED:if(k.debug("rejecting session"),(a=a||480)<300||a>=700)throw new TypeError("Invalid status_code: ".concat(a));this._request.reply(a,s,i,o),this._failed("local",null,m.causes.REJECTED);break;case A.STATUS_WAITING_FOR_ACK:case A.STATUS_CONFIRMED:if(k.debug("terminating session"),s=t.reason_phrase||m.REASON_PHRASE[a]||"",a&&(a<200||a>=700))throw new TypeError("Invalid status_code: ".concat(a));if(a&&i.push("Reason: SIP ;cause=".concat(a,'; text="').concat(s,'"')),this._status===A.STATUS_WAITING_FOR_ACK&&"incoming"===this._direction&&this._request.server_transaction.state!==_.C.STATUS_TERMINATED){var u=this._dialog;this.receiveRequest=function(t){t.method===m.ACK&&(e.sendRequest(m.BYE,{extraHeaders:i,body:o}),u.terminate())},this._request.server_transaction.on("stateChanged",(function(){e._request.server_transaction.state===_.C.STATUS_TERMINATED&&(e.sendRequest(m.BYE,{extraHeaders:i,body:o}),u.terminate())})),this._ended("local",null,r),this._dialog=u,this._ua.newDialog(u)}else this.sendRequest(m.BYE,{extraHeaders:i,body:o}),this._ended("local",null,r)}}},{key:"sendDTMF",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k.debug("sendDTMF() | tones: %s",e);var n=0,r=t.duration||null,i=t.interToneGap||null,o=t.transportType||m.DTMF_TRANSPORT.INFO;if(void 0===e)throw new TypeError("Not enough arguments");if(this._status!==A.STATUS_CONFIRMED&&this._status!==A.STATUS_WAITING_FOR_ACK&&this._status!==A.STATUS_1XX_RECEIVED)throw new p.InvalidStateError(this._status);if(o!==m.DTMF_TRANSPORT.INFO&&o!==m.DTMF_TRANSPORT.RFC2833)throw new TypeError("invalid transportType: ".concat(o));if("number"==typeof e&&(e=e.toString()),!e||"string"!=typeof e||!e.match(/^[0-9A-DR#*,]+$/i))throw new TypeError("Invalid tones: ".concat(e));if(r&&!g.isDecimal(r))throw new TypeError("Invalid tone duration: ".concat(r));if(r?r<b.C.MIN_DURATION?(k.debug('"duration" value is lower than the minimum allowed, setting it to '.concat(b.C.MIN_DURATION," milliseconds")),r=b.C.MIN_DURATION):r>b.C.MAX_DURATION?(k.debug('"duration" value is greater than the maximum allowed, setting it to '.concat(b.C.MAX_DURATION," milliseconds")),r=b.C.MAX_DURATION):r=Math.abs(r):r=b.C.DEFAULT_DURATION,t.duration=r,i&&!g.isDecimal(i))throw new TypeError("Invalid interToneGap: ".concat(i));if(i?i<b.C.MIN_INTER_TONE_GAP?(k.debug('"interToneGap" value is lower than the minimum allowed, setting it to '.concat(b.C.MIN_INTER_TONE_GAP," milliseconds")),i=b.C.MIN_INTER_TONE_GAP):i=Math.abs(i):i=b.C.DEFAULT_INTER_TONE_GAP,o!==m.DTMF_TRANSPORT.RFC2833)this._tones?this._tones+=e:(this._tones=e,function e(){var o,a=this;if(this._status===A.STATUS_TERMINATED||!this._tones||n>=this._tones.length)this._tones=null;else{var s=this._tones[n];if(n+=1,","===s)o=2e3;else{var u=new b(this);t.eventHandlers={onFailed:function(){a._tones=null}},u.send(s,t),o=r+i}setTimeout(e.bind(this),o)}}.call(this));else{var a=this._getDTMFRTPSender();a&&(e=a.toneBuffer+e,a.insertDTMF(e,r,i))}}},{key:"sendInfo",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(k.debug("sendInfo()"),this._status!==A.STATUS_CONFIRMED&&this._status!==A.STATUS_WAITING_FOR_ACK&&this._status!==A.STATUS_1XX_RECEIVED)throw new p.InvalidStateError(this._status);new w(this).send(e,t,n)}},{key:"mute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{audio:!0,video:!1};k.debug("mute()");var t=!1,n=!1;!1===this._audioMuted&&e.audio&&(t=!0,this._audioMuted=!0,this._toggleMuteAudio(!0)),!1===this._videoMuted&&e.video&&(n=!0,this._videoMuted=!0,this._toggleMuteVideo(!0)),!0!==t&&!0!==n||this._onmute({audio:t,video:n})}},{key:"unmute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{audio:!0,video:!0};k.debug("unmute()");var t=!1,n=!1;!0===this._audioMuted&&e.audio&&(t=!0,this._audioMuted=!1,!1===this._localHold&&this._toggleMuteAudio(!1)),!0===this._videoMuted&&e.video&&(n=!0,this._videoMuted=!1,!1===this._localHold&&this._toggleMuteVideo(!1)),!0!==t&&!0!==n||this._onunmute({audio:t,video:n})}},{key:"hold",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(k.debug("hold()"),this._status!==A.STATUS_WAITING_FOR_ACK&&this._status!==A.STATUS_CONFIRMED)return!1;if(!0===this._localHold)return!1;if(!this._isReadyToReOffer())return!1;this._localHold=!0,this._onhold("local");var r={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:m.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Hold Failed"})}};return t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:r,extraHeaders:t.extraHeaders}),!0}},{key:"unhold",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(k.debug("unhold()"),this._status!==A.STATUS_WAITING_FOR_ACK&&this._status!==A.STATUS_CONFIRMED)return!1;if(!1===this._localHold)return!1;if(!this._isReadyToReOffer())return!1;this._localHold=!1,this._onunhold("local");var r={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:m.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Unhold Failed"})}};return t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:r,extraHeaders:t.extraHeaders}),!0}},{key:"renegotiate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;k.debug("renegotiate()");var r=t.rtcOfferConstraints||null;if(this._status!==A.STATUS_WAITING_FOR_ACK&&this._status!==A.STATUS_CONFIRMED)return!1;if(!this._isReadyToReOffer())return!1;var i={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:m.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Media Renegotiation Failed"})}};return this._setLocalMediaStatus(),t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:i,rtcOfferConstraints:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:i,rtcOfferConstraints:r,extraHeaders:t.extraHeaders}),!0}},{key:"refer",value:function(e,t){var n=this;k.debug("refer()");var r=e;if(this._status!==A.STATUS_WAITING_FOR_ACK&&this._status!==A.STATUS_CONFIRMED)return!1;if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: ".concat(r));var i=new L(this);i.sendRefer(e,t);var o=i.id;return this._referSubscribers[o]=i,i.on("requestFailed",(function(){delete n._referSubscribers[o]})),i.on("accepted",(function(){delete n._referSubscribers[o]})),i.on("failed",(function(){delete n._referSubscribers[o]})),i}},{key:"sendRequest",value:function(e,t){return k.debug("sendRequest()"),this._dialog.sendRequest(e,t)}},{key:"receiveRequest",value:function(e){var t=this;if(k.debug("receiveRequest()"),e.method===m.CANCEL)this._status!==A.STATUS_WAITING_FOR_ANSWER&&this._status!==A.STATUS_ANSWERED||(this._status=A.STATUS_CANCELED,this._request.reply(487),this._failed("remote",e,m.causes.CANCELED));else switch(e.method){case m.ACK:if(this._status!==A.STATUS_WAITING_FOR_ACK)return;if(this._status=A.STATUS_CONFIRMED,clearTimeout(this._timers.ackTimer),clearTimeout(this._timers.invite2xxTimer),this._late_sdp){if(!e.body){this.terminate({cause:m.causes.MISSING_SDP,status_code:400});break}var n={originator:"remote",type:"answer",sdp:e.body};k.debug('emit "sdp"'),this.emit("sdp",n);var r=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then((function(){return t._connection.setRemoteDescription(r)})).then((function(){t._is_confirmed||t._confirmed("remote",e)})).catch((function(e){t.terminate({cause:m.causes.BAD_MEDIA_DESCRIPTION,status_code:488}),k.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)}))}else this._is_confirmed||this._confirmed("remote",e);break;case m.BYE:this._status===A.STATUS_CONFIRMED||this._status===A.STATUS_WAITING_FOR_ACK?(e.reply(200),this._ended("remote",e,m.causes.BYE)):this._status===A.STATUS_INVITE_RECEIVED||this._status===A.STATUS_WAITING_FOR_ANSWER?(e.reply(200),this._request.reply(487,"BYE Received"),this._ended("remote",e,m.causes.BYE)):e.reply(403,"Wrong Status");break;case m.INVITE:this._status===A.STATUS_CONFIRMED?e.hasHeader("replaces")?this._receiveReplaces(e):this._receiveReinvite(e):e.reply(403,"Wrong Status");break;case m.INFO:if(this._status===A.STATUS_1XX_RECEIVED||this._status===A.STATUS_WAITING_FOR_ANSWER||this._status===A.STATUS_ANSWERED||this._status===A.STATUS_WAITING_FOR_ACK||this._status===A.STATUS_CONFIRMED){var i=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0;i&&i.match(/^application\/dtmf-relay/i)?new b(this).init_incoming(e):void 0!==i?new w(this).init_incoming(e):e.reply(415)}else e.reply(403,"Wrong Status");break;case m.UPDATE:this._status===A.STATUS_CONFIRMED?this._receiveUpdate(e):e.reply(403,"Wrong Status");break;case m.REFER:this._status===A.STATUS_CONFIRMED?this._receiveRefer(e):e.reply(403,"Wrong Status");break;case m.NOTIFY:var o={event:e.event,request:e,taken:!1};if(this.emit("sipEvent",o),o.taken){e.reply(200);break}this._status===A.STATUS_CONFIRMED?this._receiveNotify(e):e.reply(403,"Wrong Status");break;default:e.reply(501)}}},{key:"onTransportError",value:function(){k.warn("onTransportError()"),this._status!==A.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:m.causes.CONNECTION_ERROR,cause:m.causes.CONNECTION_ERROR})}},{key:"onRequestTimeout",value:function(){k.warn("onRequestTimeout()"),this._status!==A.STATUS_TERMINATED&&this.terminate({status_code:408,reason_phrase:m.causes.REQUEST_TIMEOUT,cause:m.causes.REQUEST_TIMEOUT})}},{key:"onDialogError",value:function(){k.warn("onDialogError()"),this._status!==A.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:m.causes.DIALOG_ERROR,cause:m.causes.DIALOG_ERROR})}},{key:"newDTMF",value:function(e){k.debug("newDTMF()"),this.emit("newDTMF",e)}},{key:"newInfo",value:function(e){k.debug("newInfo()"),this.emit("newInfo",e)}},{key:"_isReadyToReOffer",value:function(){return this._rtcReady?this._dialog?!0!==this._dialog.uac_pending_reply&&!0!==this._dialog.uas_pending_reply||(k.debug("_isReadyToReOffer() | there is another INVITE/UPDATE transaction in progress"),!1):(k.debug("_isReadyToReOffer() | session not established yet"),!1):(k.debug("_isReadyToReOffer() | internal WebRTC status not ready"),!1)}},{key:"_close",value:function(){if(k.debug("close()"),this._localMediaStream&&this._localMediaStreamLocallyGenerated&&(k.debug("close() | closing local MediaStream"),g.closeMediaStream(this._localMediaStream)),this._status!==A.STATUS_TERMINATED){if(this._status=A.STATUS_TERMINATED,this._connection)try{this._connection.close()}catch(e){k.warn("close() | error closing the RTCPeerConnection: %o",e)}for(var e in this._timers)Object.prototype.hasOwnProperty.call(this._timers,e)&&clearTimeout(this._timers[e]);for(var t in clearTimeout(this._sessionTimers.timer),this._dialog&&(this._dialog.terminate(),delete this._dialog),this._earlyDialogs)Object.prototype.hasOwnProperty.call(this._earlyDialogs,t)&&(this._earlyDialogs[t].terminate(),delete this._earlyDialogs[t]);for(var n in this._referSubscribers)Object.prototype.hasOwnProperty.call(this._referSubscribers,n)&&delete this._referSubscribers[n];this._ua.destroyRTCSession(this)}}},{key:"_setInvite2xxTimer",value:function(e,t){var n=y.T1;this._timers.invite2xxTimer=setTimeout(function r(){this._status===A.STATUS_WAITING_FOR_ACK&&(e.reply(200,null,["Contact: ".concat(this._contact)],t),n<y.T2&&(n*=2)>y.T2&&(n=y.T2),this._timers.invite2xxTimer=setTimeout(r.bind(this),n))}.bind(this),n)}},{key:"_setACKTimer",value:function(){var e=this;this._timers.ackTimer=setTimeout((function(){e._status===A.STATUS_WAITING_FOR_ACK&&(k.debug("no ACK received, terminating the session"),clearTimeout(e._timers.invite2xxTimer),e.sendRequest(m.BYE),e._ended("remote",null,m.causes.NO_ACK))}),y.TIMER_H)}},{key:"_createRTCConnection",value:function(e,t){var n=this;this._connection=new RTCPeerConnection(e,t),this._connection.addEventListener("iceconnectionstatechange",(function(){var e=n._connection.iceConnectionState;if("failed"===e&&n.terminate({cause:m.causes.RTP_TIMEOUT,status_code:408,reason_phrase:m.causes.RTP_TIMEOUT}),void 0!==n._ua.modes.chrome_rtp_timeout_fix&&navigator.webkitGetUserMedia&&"disconnected"===e){var t=n._ua.modes.chrome_rtp_timeout_fix;k.debug("AC: Chrome RTP timeout fix: iceConnectionState==disconnected: check that this will continue for ".concat(t," seconds...")),function e(){"disconnected"===n._connection.iceConnectionState?t-- >0?setTimeout((function(){return e()}),1e3):(k.debug("AC: Chrome RTP timeout fix: Hangup call"),n.terminate({cause:m.causes.RTP_TIMEOUT,status_code:408,reason_phrase:m.causes.RTP_TIMEOUT})):k.debug("AC: Chrome RTP timeout fix: iceConnectionState=".concat(n._connection.iceConnectionState))}()}})),k.debug('emit "peerconnection"'),this.emit("peerconnection",{peerconnection:this._connection})}},{key:"_createLocalDescription",value:function(e,t){var n=this;if(k.debug("createLocalDescription()"),"offer"!==e&&"answer"!==e)throw new Error('createLocalDescription() | invalid type "'.concat(e,'"'));var r=this._connection;return this._rtcReady=!1,Promise.resolve().then((function(){return"offer"===e?r.createOffer(t).catch((function(e){return k.warn('emit "peerconnection:createofferfailed" [error:%o]',e),n.emit("peerconnection:createofferfailed",e),Promise.reject(e)})):r.createAnswer(t).catch((function(e){return k.warn('emit "peerconnection:createanswerfailed" [error:%o]',e),n.emit("peerconnection:createanswerfailed",e),Promise.reject(e)}))})).then((function(e){return r.setLocalDescription(e).catch((function(e){return n._rtcReady=!0,k.warn('emit "peerconnection:setlocaldescriptionfailed" [error:%o]',e),n.emit("peerconnection:setlocaldescriptionfailed",e),Promise.reject(e)}))})).then((function(){var i=t&&t.iceRestart;if("complete"===r.iceGatheringState&&!i||"gathering"===r.iceGatheringState&&n._iceReady){n._rtcReady=!0;var o={originator:"local",type:e,sdp:r.localDescription.sdp};return k.debug('emit "sdp"'),n.emit("sdp",o),Promise.resolve(o.sdp)}return new Promise((function(t){var i,o,a=!1;n._iceReady=!1;var s=function(){r.removeEventListener("icecandidate",i),r.removeEventListener("icegatheringstatechange",o),a=!0,n._rtcReady=!0,n._iceReady=!0;var s={originator:"local",type:e,sdp:r.localDescription.sdp};k.debug('emit "sdp"'),n.emit("sdp",s),t(s.sdp)};r.addEventListener("icecandidate",i=function(e){var t=e.candidate;t?n.emit("icecandidate",{candidate:t,ready:s}):a||s()}),r.addEventListener("icegatheringstatechange",o=function(){"complete"!==r.iceGatheringState||a||s()}),void 0!==n._ua.modes.ice_timeout_fix&&setTimeout((function(){a||(k.debug("AC: ICE gathering timeout fix"),s())}),n._ua.modes.ice_timeout_fix)}))}))}},{key:"_createDialog",value:function(e,t,n){var r="UAS"===t?e.to_tag:e.from_tag,i="UAS"===t?e.from_tag:e.to_tag,o=e.call_id+r+i,a=this._earlyDialogs[o];if(n)return!!a||((a=new M(this,e,t,M.C.STATUS_EARLY)).error?(k.debug(a.error),this._failed("remote",e,m.causes.INTERNAL_ERROR),!1):(this._earlyDialogs[o]=a,!0));if(this._from_tag=e.from_tag,this._to_tag=e.to_tag,a)return a.update(e,t),this._dialog=a,delete this._earlyDialogs[o],!0;var s=new M(this,e,t);return s.error?(k.debug(s.error),this._failed("remote",e,m.causes.INTERNAL_ERROR),!1):(this._dialog=s,!0)}},{key:"_receiveReinvite",value:function(e){var t=this;k.debug("receiveReinvite()");var n=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0,r={request:e,callback:void 0,reject:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i=!0;var n=t.status_code||403,r=t.reason_phrase||"",o=g.cloneArray(t.extraHeaders);if(this._status!==A.STATUS_CONFIRMED)return!1;if(n<300||n>=700)throw new TypeError("Invalid status_code: ".concat(n));e.reply(n,r,o)}.bind(this)},i=!1;if(this.emit("reinvite",r),!i){if(this._late_sdp=!1,!e.body)return this._late_sdp=!0,this._remoteHold&&(this._remoteHold=!1,this._onunhold("remote")),void(this._connectionPromiseQueue=this._connectionPromiseQueue.then((function(){return t._createLocalDescription("offer",t._rtcOfferConstraints)})).then((function(e){o.call(t,e)})).catch((function(){e.reply(500)})));if("application/sdp"!==n)return k.debug("invalid Content-Type"),void e.reply(415);this._processInDialogSdpOffer(e).then((function(e){t._status!==A.STATUS_TERMINATED&&o.call(t,e)})).catch((function(e){k.warn(e)}))}function o(t){var n=this,i=["Contact: ".concat(this._contact)];this._handleSessionTimersInIncomingRequest(e,i),this._late_sdp&&(t=this._mangleOffer(t)),e.reply(200,null,i,t,(function(){n._status=A.STATUS_WAITING_FOR_ACK,n._setInvite2xxTimer(e,t),n._setACKTimer()})),"function"==typeof r.callback&&r.callback()}}},{key:"_receiveUpdate",value:function(e){var t=this;k.debug("receiveUpdate()");var n=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0,r={request:e,callback:void 0,reject:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i=!0;var n=t.status_code||403,r=t.reason_phrase||"",o=g.cloneArray(t.extraHeaders);if(this._status!==A.STATUS_CONFIRMED)return!1;if(n<300||n>=700)throw new TypeError("Invalid status_code: ".concat(n));e.reply(n,r,o)}.bind(this)},i=!1;if(this.emit("update",r),!i)if(e.body){if("application/sdp"!==n)return k.debug("invalid Content-Type"),void e.reply(415);this._processInDialogSdpOffer(e).then((function(e){t._status!==A.STATUS_TERMINATED&&o.call(t,e)})).catch((function(e){k.warn(e)}))}else o.call(this,null);function o(t){var n=["Contact: ".concat(this._contact)];this._handleSessionTimersInIncomingRequest(e,n),e.reply(200,null,n,t),"function"==typeof r.callback&&r.callback()}}},{key:"_processInDialogSdpOffer",value:function(e){var t=this;k.debug("_processInDialogSdpOffer()");var n,r=e.parseSDP(),o=!1,a=i(r.media);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(-1!==E.indexOf(s.type)){var u=s.direction||r.direction||"sendrecv";if("sendonly"!==u&&"inactive"!==u){o=!1;break}o=!0}}}catch(e){a.e(e)}finally{a.f()}var l={originator:"remote",type:"offer",sdp:e.body};k.debug('emit "sdp"'),this.emit("sdp",l);var c=new RTCSessionDescription({type:"offer",sdp:l.sdp});return this._connectionPromiseQueue=this._connectionPromiseQueue.then((function(){if(t._status===A.STATUS_TERMINATED)throw new Error("terminated");return t._connection.setRemoteDescription(c).catch((function(n){throw e.reply(488),k.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',n),t.emit("peerconnection:setremotedescriptionfailed",n),n}))})).then((function(){if(t._status===A.STATUS_TERMINATED)throw new Error("terminated");!0===t._remoteHold&&!1===o?(t._remoteHold=!1,t._onunhold("remote")):!1===t._remoteHold&&!0===o&&(t._remoteHold=!0,t._onhold("remote"))})).then((function(){if(t._status===A.STATUS_TERMINATED)throw new Error("terminated");return t._createLocalDescription("answer",t._rtcAnswerConstraints).catch((function(t){throw e.reply(500),k.warn('emit "peerconnection:createtelocaldescriptionfailed" [error:%o]',t),t}))})).catch((function(e){k.warn("_processInDialogSdpOffer() failed [error: %o]",e)})),this._connectionPromiseQueue}},{key:"_receiveRefer",value:function(e){var t=this;if(k.debug("receiveRefer()"),!e.refer_to)return k.debug("no Refer-To header field present in REFER"),void e.reply(400);if(e.refer_to.uri.scheme!==m.SIP)return k.debug("Refer-To header field points to a non-SIP URI scheme"),void e.reply(416);e.reply(202);var n=new D(this,e.cseq);k.debug('emit "refer"'),this.emit("refer",{request:e,accept:function(r,i){(function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t="function"==typeof t?t:null,this._status!==A.STATUS_WAITING_FOR_ACK&&this._status!==A.STATUS_CONFIRMED)return!1;var i=new u(this._ua);if(i.on("progress",(function(e){var t=e.response;n.notify(t.status_code,t.reason_phrase)})),i.on("accepted",(function(e){var t=e.response;n.notify(t.status_code,t.reason_phrase)})),i.on("_failed",(function(e){var t=e.message,r=e.cause;t?n.notify(t.status_code,t.reason_phrase):n.notify(487,r)})),e.refer_to.uri.hasHeader("replaces")){var o=decodeURIComponent(e.refer_to.uri.getHeader("replaces"));r.extraHeaders=g.cloneArray(r.extraHeaders),r.extraHeaders.push("Replaces: ".concat(o))}i.connect(e.refer_to.uri.toAor(),r,t)}).call(t,r,i)},reject:function(){(function(){n.notify(603)}).call(t)}})}},{key:"_receiveNotify",value:function(e){if("refer"===(k.debug("receiveNotify()"),e.event||e.reply(400),e.event.event)){var t,n;if(e.event.params&&e.event.params.id)t=e.event.params.id,n=this._referSubscribers[t];else{if(1!==Object.keys(this._referSubscribers).length)return void e.reply(400,"Missing event id parameter");n=this._referSubscribers[Object.keys(this._referSubscribers)[0]]}if(!n)return void e.reply(481,"Subscription does not exist");n.receiveNotify(e),e.reply(200)}else e.reply(489)}},{key:"_receiveReplaces",value:function(e){var t=this;k.debug("receiveReplaces()"),this.emit("replaces",{request:e,accept:function(n){(function(t){var n=this;if(this._status!==A.STATUS_WAITING_FOR_ACK&&this._status!==A.STATUS_CONFIRMED)return!1;var r=new u(this._ua);r.on("confirmed",(function(){n.terminate()})),r.init_incoming(e,t)}).call(t,n)},reject:function(){(function(){k.debug("Replaced INVITE rejected by the user"),e.reply(486)}).call(t)}})}},{key:"_sendInitialRequest",value:function(e,t,n){var r=this,i=new T(this._ua,this._request,{onRequestTimeout:function(){r.onRequestTimeout()},onTransportError:function(){r.onTransportError()},onAuthenticated:function(e){r._request=e},onReceiveResponse:function(e){r._receiveInviteResponse(e)}});Promise.resolve().then((function(){return n||(e.audio||e.video?(r._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(e).catch((function(e){if(r._status===A.STATUS_TERMINATED)throw new Error("terminated");throw r._failed("local",null,m.causes.USER_DENIED_MEDIA_ACCESS),k.warn('emit "getusermediafailed" [error:%o]',e),r.emit("getusermediafailed",e),e}))):void 0)})).then((function(e){if(r._status===A.STATUS_TERMINATED)throw new Error("terminated");return r._localMediaStream=e,e&&e.getTracks().forEach((function(t){r._connection.addTrack(t,e)})),r._connecting(r._request),r._createLocalDescription("offer",t).catch((function(e){throw r._failed("local",null,m.causes.WEBRTC_ERROR),e}))})).then((function(e){if(r._is_canceled||r._status===A.STATUS_TERMINATED)throw new Error("terminated");r._request.body=e,r._status=A.STATUS_INVITE_SENT,k.debug('emit "sending" [request:%o]',r._request),r.emit("sending",{request:r._request}),i.send()})).catch((function(e){r._status!==A.STATUS_TERMINATED&&k.warn(e)}))}},{key:"_getDTMFRTPSender",value:function(){var e=this._connection.getSenders().find((function(e){return e.track&&"audio"===e.track.kind}));if(e&&e.dtmf)return e.dtmf;k.warn("sendDTMF() | no local audio track to send DTMF with")}},{key:"_receiveInviteResponse",value:function(e){var t=this;if(k.debug("receiveInviteResponse()"),this._dialog&&e.status_code>=200&&e.status_code<=299){if(this._dialog.id.call_id===e.call_id&&this._dialog.id.local_tag===e.from_tag&&this._dialog.id.remote_tag===e.to_tag)return void this.sendRequest(m.ACK);var n=new M(this,e,"UAC");return void 0!==n.error?void k.debug(n.error):(this.sendRequest(m.ACK),void this.sendRequest(m.BYE))}if(this._is_canceled)e.status_code>=100&&e.status_code<200?this._request.cancel(this._cancel_reason):e.status_code>=200&&e.status_code<299&&this._acceptAndTerminate(e);else if(this._status===A.STATUS_INVITE_SENT||this._status===A.STATUS_1XX_RECEIVED)switch(!0){case/^100$/.test(e.status_code):this._status=A.STATUS_1XX_RECEIVED;break;case/^1[0-9]{2}$/.test(e.status_code):if(!e.to_tag){k.debug("1xx response received without to tag");break}if(e.hasHeader("contact")&&!this._createDialog(e,"UAC",!0))break;if(this._status=A.STATUS_1XX_RECEIVED,!e.body){this._progress("remote",e);break}var r={originator:"remote",type:"answer",sdp:e.body};k.debug('emit "sdp"'),this.emit("sdp",r);var i=new RTCSessionDescription({type:"answer",sdp:r.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then((function(){return t._connection.setRemoteDescription(i)})).then((function(){return t._progress("remote",e)})).catch((function(e){k.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)}));break;case/^2[0-9]{2}$/.test(e.status_code):if(this._status=A.STATUS_CONFIRMED,!e.body){this._acceptAndTerminate(e,400,m.causes.MISSING_SDP),this._failed("remote",e,m.causes.BAD_MEDIA_DESCRIPTION);break}if(!this._createDialog(e,"UAC"))break;var o={originator:"remote",type:"answer",sdp:e.body};k.debug('emit "sdp"'),this.emit("sdp",o);var a=new RTCSessionDescription({type:"answer",sdp:o.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then((function(){if("stable"===t._connection.signalingState)return t._connection.createOffer(t._rtcOfferConstraints).then((function(e){return t._connection.setLocalDescription(e)})).catch((function(n){t._acceptAndTerminate(e,500,n.toString()),t._failed("local",e,m.causes.WEBRTC_ERROR)}))})).then((function(){t._connection.setRemoteDescription(a).then((function(){t._handleSessionTimersInIncomingResponse(e),t._accepted("remote",e),t.sendRequest(m.ACK),t._confirmed("local",null)})).catch((function(n){t._acceptAndTerminate(e,488,"Not Acceptable Here"),t._failed("remote",e,m.causes.BAD_MEDIA_DESCRIPTION),k.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',n),t.emit("peerconnection:setremotedescriptionfailed",n)}))}));break;default:var s=g.sipErrorCause(e.status_code);this._failed("remote",e,s)}}},{key:"_sendReinvite",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};k.debug("sendReinvite()");var n=g.cloneArray(t.extraHeaders),r=g.cloneObject(t.eventHandlers),i=t.rtcOfferConstraints||this._rtcOfferConstraints||null,o=!1;function a(e){r.failed&&r.failed(e)}n.push("Contact: ".concat(this._contact)),n.push("Content-Type: application/sdp"),this._sessionTimers.running&&n.push("Session-Expires: ".concat(this._sessionTimers.currentExpires,";refresher=").concat(this._sessionTimers.refresher?"uac":"uas")),this._connectionPromiseQueue=this._connectionPromiseQueue.then((function(){return e._createLocalDescription("offer",i)})).then((function(t){var i={originator:"local",type:"offer",sdp:t=e._mangleOffer(t)};k.debug('emit "sdp"'),e.emit("sdp",i),e.sendRequest(m.INVITE,{extraHeaders:n,body:t,eventHandlers:{onSuccessResponse:function(t){(function(e){var t=this;if(this._status!==A.STATUS_TERMINATED&&(this.sendRequest(m.ACK),!o))if(this._handleSessionTimersInIncomingResponse(e),e.body)if(e.hasHeader("Content-Type")&&"application/sdp"===e.getHeader("Content-Type").toLowerCase()){var n={originator:"remote",type:"answer",sdp:e.body};k.debug('emit "sdp"'),this.emit("sdp",n);var i=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then((function(){return t._connection.setRemoteDescription(i)})).then((function(){r.succeeded&&r.succeeded(e)})).catch((function(e){a.call(t),k.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)}))}else a.call(this);else a.call(this)}).call(e,t),o=!0},onErrorResponse:function(t){a.call(e,t)},onTransportError:function(){e.onTransportError()},onRequestTimeout:function(){e.onRequestTimeout()},onDialogError:function(){e.onDialogError()}}})})).catch((function(){a()}))}},{key:"_sendUpdate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};k.debug("sendUpdate()");var n=g.cloneArray(t.extraHeaders),r=g.cloneObject(t.eventHandlers),i=t.rtcOfferConstraints||this._rtcOfferConstraints||null,o=t.sdpOffer||!1,a=!1;function s(e){var t=this;if(this._status!==A.STATUS_TERMINATED&&!a)if(this._handleSessionTimersInIncomingResponse(e),o){if(!e.body)return void u.call(this);if(!e.hasHeader("Content-Type")||"application/sdp"!==e.getHeader("Content-Type").toLowerCase())return void u.call(this);var n={originator:"remote",type:"answer",sdp:e.body};k.debug('emit "sdp"'),this.emit("sdp",n);var i=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then((function(){return t._connection.setRemoteDescription(i)})).then((function(){r.succeeded&&r.succeeded(e)})).catch((function(e){u.call(t),k.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)}))}else r.succeeded&&r.succeeded(e)}function u(e){r.failed&&r.failed(e)}n.push("Contact: ".concat(this._contact)),this._sessionTimers.running&&n.push("Session-Expires: ".concat(this._sessionTimers.currentExpires,";refresher=").concat(this._sessionTimers.refresher?"uac":"uas")),o?(n.push("Content-Type: application/sdp"),this._connectionPromiseQueue=this._connectionPromiseQueue.then((function(){return e._createLocalDescription("offer",i)})).then((function(t){var r={originator:"local",type:"offer",sdp:t=e._mangleOffer(t)};k.debug('emit "sdp"'),e.emit("sdp",r),e.sendRequest(m.UPDATE,{extraHeaders:n,body:t,eventHandlers:{onSuccessResponse:function(t){s.call(e,t),a=!0},onErrorResponse:function(t){u.call(e,t)},onTransportError:function(){e.onTransportError()},onRequestTimeout:function(){e.onRequestTimeout()},onDialogError:function(){e.onDialogError()}}})})).catch((function(){u.call(e)}))):this.sendRequest(m.UPDATE,{extraHeaders:n,eventHandlers:{onSuccessResponse:function(t){s.call(e,t)},onErrorResponse:function(t){u.call(e,t)},onTransportError:function(){e.onTransportError()},onRequestTimeout:function(){e.onRequestTimeout()},onDialogError:function(){e.onDialogError()}}})}},{key:"_acceptAndTerminate",value:function(e,t,n){k.debug("acceptAndTerminate()");var r=[];t&&(n=n||m.REASON_PHRASE[t]||"",r.push("Reason: SIP ;cause=".concat(t,'; text="').concat(n,'"'))),(this._dialog||this._createDialog(e,"UAC"))&&(this.sendRequest(m.ACK),this.sendRequest(m.BYE,{extraHeaders:r})),this._status=A.STATUS_TERMINATED}},{key:"_mangleOffer",value:function(e){if(!this._localHold&&!this._remoteHold)return e;if(e=h.parse(e),this._localHold&&!this._remoteHold){k.debug("mangleOffer() | me on hold, mangling offer");var t,n=i(e.media);try{for(n.s();!(t=n.n()).done;){var r=t.value;-1!==E.indexOf(r.type)&&(r.direction?"sendrecv"===r.direction?r.direction="sendonly":"recvonly"===r.direction&&(r.direction="inactive"):r.direction="sendonly")}}catch(e){n.e(e)}finally{n.f()}}else if(this._localHold&&this._remoteHold){k.debug("mangleOffer() | both on hold, mangling offer");var o,a=i(e.media);try{for(a.s();!(o=a.n()).done;){var s=o.value;-1!==E.indexOf(s.type)&&(s.direction="inactive")}}catch(e){a.e(e)}finally{a.f()}}else if(this._remoteHold){k.debug("mangleOffer() | remote on hold, mangling offer");var u,l=i(e.media);try{for(l.s();!(u=l.n()).done;){var c=u.value;-1!==E.indexOf(c.type)&&(c.direction?"sendrecv"===c.direction?c.direction="recvonly":"recvonly"===c.direction&&(c.direction="inactive"):c.direction="recvonly")}}catch(e){l.e(e)}finally{l.f()}}return h.write(e)}},{key:"_setLocalMediaStatus",value:function(){var e=!0,t=!0;(this._localHold||this._remoteHold)&&(e=!1,t=!1),this._audioMuted&&(e=!1),this._videoMuted&&(t=!1),this._toggleMuteAudio(!e),this._toggleMuteVideo(!t)}},{key:"_handleSessionTimersInIncomingRequest",value:function(e,t){var n;this._sessionTimers.enabled&&(e.session_expires&&e.session_expires>=m.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=e.session_expires,n=e.session_expires_refresher||"uas"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,n="uas"),t.push("Session-Expires: ".concat(this._sessionTimers.currentExpires,";refresher=").concat(n)),this._sessionTimers.refresher="uas"===n,this._runSessionTimer())}},{key:"_handleSessionTimersInIncomingResponse",value:function(e){var t;this._sessionTimers.enabled&&(e.session_expires&&e.session_expires>=m.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=e.session_expires,t=e.session_expires_refresher||"uac"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,t="uac"),this._sessionTimers.refresher="uac"===t,this._runSessionTimer())}},{key:"_runSessionTimer",value:function(){var e=this,t=this._sessionTimers.currentExpires;this._sessionTimers.running=!0,clearTimeout(this._sessionTimers.timer),this._sessionTimers.refresher?this._sessionTimers.timer=setTimeout((function(){e._status!==A.STATUS_TERMINATED&&e._isReadyToReOffer()&&(k.debug("runSessionTimer() | sending session refresh request"),e._sessionTimers.refreshMethod===m.UPDATE?e._sendUpdate():e._sendReinvite())}),500*t):this._sessionTimers.timer=setTimeout((function(){e._status!==A.STATUS_TERMINATED&&(k.warn("runSessionTimer() | timer expired, terminating the session"),e.terminate({cause:m.causes.REQUEST_TIMEOUT,status_code:408,reason_phrase:"Session Timer Expired"}))}),1100*t)}},{key:"_toggleMuteAudio",value:function(e){var t,n=i(this._connection.getSenders().filter((function(e){return e.track&&"audio"===e.track.kind})));try{for(n.s();!(t=n.n()).done;)t.value.track.enabled=!e}catch(e){n.e(e)}finally{n.f()}}},{key:"_toggleMuteVideo",value:function(e){var t,n=i(this._connection.getSenders().filter((function(e){return e.track&&"video"===e.track.kind})));try{for(n.s();!(t=n.n()).done;)t.value.track.enabled=!e}catch(e){n.e(e)}finally{n.f()}}},{key:"_newRTCSession",value:function(e,t){k.debug("newRTCSession()"),this._ua.newRTCSession(this,{originator:e,session:this,request:t})}},{key:"_connecting",value:function(e){k.debug("session connecting"),k.debug('emit "connecting"'),this.emit("connecting",{request:e})}},{key:"_progress",value:function(e,t){k.debug("session progress"),k.debug('emit "progress"'),this.emit("progress",{originator:e,response:t||null})}},{key:"_accepted",value:function(e,t){k.debug("session accepted"),this._start_time=new Date,k.debug('emit "accepted"'),this.emit("accepted",{originator:e,response:t||null})}},{key:"_confirmed",value:function(e,t){k.debug("session confirmed"),this._is_confirmed=!0,k.debug('emit "confirmed"'),this.emit("confirmed",{originator:e,ack:t||null})}},{key:"_ended",value:function(e,t,n){k.debug("session ended"),this._end_time=new Date,this._close(),k.debug('emit "ended"'),this.emit("ended",{originator:e,message:t||null,cause:n})}},{key:"_failed",value:function(e,t,n){k.debug("session failed"),k.debug('emit "_failed"'),this.emit("_failed",{originator:e,message:t||null,cause:n}),this._close(),k.debug('emit "failed"'),this.emit("failed",{originator:e,message:t||null,cause:n})}},{key:"_onhold",value:function(e){k.debug("session onhold"),this._setLocalMediaStatus(),k.debug('emit "hold"'),this.emit("hold",{originator:e})}},{key:"_onunhold",value:function(e){k.debug("session onunhold"),this._setLocalMediaStatus(),k.debug('emit "unhold"'),this.emit("unhold",{originator:e})}},{key:"_onmute",value:function(e){var t=e.audio,n=e.video;k.debug("session onmute"),this._setLocalMediaStatus(),k.debug('emit "muted"'),this.emit("muted",{audio:t,video:n})}},{key:"_onunmute",value:function(e){var t=e.audio,n=e.video;k.debug("session onunmute"),this._setLocalMediaStatus(),k.debug('emit "unmuted"'),this.emit("unmuted",{audio:t,video:n})}}])&&a(t.prototype,n),r&&a(t,r),u}()},{"./Constants":2,"./Dialog":3,"./Exceptions":6,"./Logger":9,"./RTCSession/DTMF":16,"./RTCSession/Info":17,"./RTCSession/ReferNotifier":18,"./RTCSession/ReferSubscriber":19,"./RequestSender":21,"./SIPMessage":22,"./Timers":25,"./Transactions":26,"./URI":29,"./Utils":30,events:33,"sdp-transform":39}],16:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=e("events").EventEmitter,c=e("../Logger"),d=e("../Constants"),h=e("../Exceptions"),f=e("../Utils"),m=new c("RTCSession:DTMF"),p={MIN_DURATION:70,MAX_DURATION:6e3,DEFAULT_DURATION:100,MIN_INTER_TONE_GAP:50,DEFAULT_INTER_TONE_GAP:500};t.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,l);var t,n,r=a(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this))._session=e,t._direction=null,t._tone=null,t._duration=null,t._request=null,t}return t=s,(n=[{key:"tone",get:function(){return this._tone}},{key:"duration",get:function(){return this._duration}},{key:"send",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===e)throw new TypeError("Not enough arguments");if(this._direction="outgoing",this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK)throw new h.InvalidStateError(this._session.status);var r=f.cloneArray(n.extraHeaders);if(this.eventHandlers=f.cloneObject(n.eventHandlers),"string"==typeof e)e=e.toUpperCase();else{if("number"!=typeof e)throw new TypeError("Invalid tone: ".concat(e));e=e.toString()}if(!e.match(/^[0-9A-DR#*]$/))throw new TypeError("Invalid tone: ".concat(e));this._tone=e,this._duration=n.duration,r.push("Content-Type: application/dtmf-relay");var i="Signal=".concat(this._tone,"\r\n");i+="Duration=".concat(this._duration),this._session.newDTMF({originator:"local",dtmf:this,request:this._request}),this._session.sendRequest(d.INFO,{extraHeaders:r,eventHandlers:{onSuccessResponse:function(e){t.emit("succeeded",{originator:"remote",response:e})},onErrorResponse:function(e){t.eventHandlers.onFailed&&t.eventHandlers.onFailed(),t.emit("failed",{originator:"remote",response:e})},onRequestTimeout:function(){t._session.onRequestTimeout()},onTransportError:function(){t._session.onTransportError()},onDialogError:function(){t._session.onDialogError()}},body:i})}},{key:"init_incoming",value:function(e){var t=/^(Signal\s*?=\s*?)([0-9A-D#*]{1})(\s)?.*/,n=/^(Duration\s?=\s?)([0-9]{1,4})(\s)?.*/;if(this._direction="incoming",this._request=e,e.reply(200),e.body){var r=e.body.split("\n");r.length>=1&&t.test(r[0])&&(this._tone=r[0].replace(t,"$2")),r.length>=2&&n.test(r[1])&&(this._duration=parseInt(r[1].replace(n,"$2"),10))}this._duration||(this._duration=p.DEFAULT_DURATION),this._tone?this._session.newDTMF({originator:"remote",dtmf:this,request:e}):m.debug("invalid INFO DTMF received, discarded")}}])&&i(t.prototype,n),s}(),t.exports.C=p},{"../Constants":2,"../Exceptions":6,"../Logger":9,"../Utils":30,events:33}],17:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=e("events").EventEmitter,c=e("../Constants"),d=e("../Exceptions"),h=e("../Utils");t.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,l);var t,n,r=a(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this))._session=e,t._direction=null,t._contentType=null,t._body=null,t}return t=s,(n=[{key:"contentType",get:function(){return this._contentType}},{key:"body",get:function(){return this._body}},{key:"send",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this._direction="outgoing",t&&void 0===e)throw new TypeError("Not enough arguments");if(this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK)throw new d.InvalidStateError(this._session.status);this._contentType=e,this._body=t;var i=h.cloneArray(r.extraHeaders);e&&i.push("Content-Type: ".concat(e)),this._session.newInfo({originator:"local",info:this,request:this.request}),this._session.sendRequest(c.INFO,{extraHeaders:i,eventHandlers:{onSuccessResponse:function(e){n.emit("succeeded",{originator:"remote",response:e})},onErrorResponse:function(e){n.emit("failed",{originator:"remote",response:e})},onTransportError:function(){n._session.onTransportError()},onRequestTimeout:function(){n._session.onRequestTimeout()},onDialogError:function(){n._session.onDialogError()}},body:t})}},{key:"init_incoming",value:function(e){this._direction="incoming",this.request=e,e.reply(200),this._contentType=e.hasHeader("Content-Type")?e.getHeader("Content-Type").toLowerCase():void 0,this._body=e.body,this._session.newInfo({originator:"remote",info:this,request:e})}}])&&i(t.prototype,n),s}()},{"../Constants":2,"../Exceptions":6,"../Utils":30,events:33}],18:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("../Logger"),o=e("../Constants"),a=new i("RTCSession:ReferNotifier"),s="refer",u="message/sipfrag;version=2.0",l=300;t.exports=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._session=t,this._id=n,this._expires=r||l,this._active=!0,this.notify(100)}var t,n;return t=e,(n=[{key:"notify",value:function(e,t){if(a.debug("notify()"),!1!==this._active){var n;t=t||o.REASON_PHRASE[e]||"",n=e>=200?"terminated;reason=noresource":"active;expires=".concat(this._expires);try{this._session.sendRequest(o.NOTIFY,{extraHeaders:["Event: ".concat(s,";id=").concat(this._id),"Subscription-State: ".concat(n),"Content-Type: ".concat(u)],body:"SIP/2.0 ".concat(e," ").concat(t),eventHandlers:{onErrorResponse:function(){this._active=!1}}})}catch(e){a.debug("send NOTIFY exception [ignored]")}}}}])&&r(t.prototype,n),e}()},{"../Constants":2,"../Logger":9}],19:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=e("events").EventEmitter,c=e("../Logger"),d=e("../Constants"),h=e("../Grammar"),f=e("../Utils"),m=new c("RTCSession:ReferSubscriber");t.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,l);var t,n,r=a(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this))._id=null,t._session=e,t}return t=s,(n=[{key:"id",get:function(){return this._id}},{key:"sendRefer",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};m.debug("sendRefer()");var r=f.cloneArray(n.extraHeaders),i=f.cloneObject(n.eventHandlers);for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&this.on(o,i[o]);var a=null;n.replaces&&(a=n.replaces._request.call_id,a+=";to-tag=".concat(n.replaces._to_tag),a+=";from-tag=".concat(n.replaces._from_tag),a=encodeURIComponent(a));var s="Refer-To: <".concat(e).concat(a?"?Replaces=".concat(a):"",">");if(r.push(s),!r.some((function(e){return e.toLowerCase().startsWith("referred-by:")}))){var u="Referred-By: <".concat(this._session._ua._configuration.uri._scheme,":").concat(this._session._ua._configuration.uri._user,"@").concat(this._session._ua._configuration.uri._host,">");r.push(u)}r.push("Contact: ".concat(this._session.contact));var l=this._session.sendRequest(d.REFER,{extraHeaders:r,eventHandlers:{onSuccessResponse:function(e){t._requestSucceeded(e)},onErrorResponse:function(e){t._requestFailed(e,d.causes.REJECTED)},onTransportError:function(){t._requestFailed(null,d.causes.CONNECTION_ERROR)},onRequestTimeout:function(){t._requestFailed(null,d.causes.REQUEST_TIMEOUT)},onDialogError:function(){t._requestFailed(null,d.causes.DIALOG_ERROR)}}});this._id=l.cseq}},{key:"receiveNotify",value:function(e){if(m.debug("receiveNotify()"),e.body){var t=h.parse(e.body.trim(),"Status_Line");if(-1!==t)switch(!0){case/^100$/.test(t.status_code):this.emit("trying",{request:e,status_line:t});break;case/^1[0-9]{2}$/.test(t.status_code):this.emit("progress",{request:e,status_line:t});break;case/^2[0-9]{2}$/.test(t.status_code):this.emit("accepted",{request:e,status_line:t});break;default:this.emit("failed",{request:e,status_line:t})}else m.debug('receiveNotify() | error parsing NOTIFY body: "'.concat(e.body,'"'))}}},{key:"_requestSucceeded",value:function(e){m.debug("REFER succeeded"),m.debug('emit "requestSucceeded"'),this.emit("requestSucceeded",{response:e})}},{key:"_requestFailed",value:function(e,t){m.debug("REFER failed"),m.debug('emit "requestFailed"'),this.emit("requestFailed",{response:e||null,cause:t})}}])&&i(t.prototype,n),s}()},{"../Constants":2,"../Grammar":7,"../Logger":9,"../Utils":30,events:33}],20:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("./Logger"),o=e("./Utils"),a=e("./Constants"),s=e("./SIPMessage"),u=e("./RequestSender"),l=new i("Registrator");t.exports=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._reg_id=1,this._ua=t,this._transport=n,this._registrar=t.configuration.registrar_server,this._expires=t.configuration.register_expires,this._call_id=o.createRandomToken(22),this._cseq=0,this._to_uri=t.configuration.uri,this._registrationTimer=null,this._registering=!1,this._registered=!1,this._contact=this._ua.contact.toString(),this._contact+=";+sip.ice",this._extraHeaders=[],this._extraContactParams="",this._sipInstance='"<urn:uuid:'.concat(this._ua.configuration.instance_id,'>"'),this._contact+=";reg-id=".concat(this._reg_id),this._contact+=";+sip.instance=".concat(this._sipInstance),this._auth=null}var t,n;return t=e,(n=[{key:"registered",get:function(){return this._registered}},{key:"setExtraHeaders",value:function(e){Array.isArray(e)||(e=[]),this._extraHeaders=e.slice()}},{key:"setExtraContactParams",value:function(e){for(var t in e instanceof Object||(e={}),this._extraContactParams="",e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this._extraContactParams+=";".concat(t),n&&(this._extraContactParams+="=".concat(n))}}},{key:"register",value:function(){var e=this;if(this._registering)l.debug("Register request in progress...");else{var t=this._extraHeaders.slice();t.push("Contact: ".concat(this._contact,";expires=").concat(this._expires).concat(this._extraContactParams)),t.push("Expires: ".concat(this._expires)),this._auth&&t.push(this._auth);var n=new s.OutgoingRequest(a.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1},t),r=new u(this._ua,n,{onRequestTimeout:function(){e._registrationFailure(null,a.causes.REQUEST_TIMEOUT)},onTransportError:function(){e._registrationFailure(null,a.causes.CONNECTION_ERROR)},onAuthenticated:function(t){var n,r;e._cseq+=1,e._ua.modes.cache_register_auth_mode&&((r=t.getHeader(n="Authorization"))||(r=t.getHeader(n="Proxy-Authorization")))&&(e._auth="".concat(n,": ").concat(r))},onReceiveResponse:function(t){if(t.cseq===e._cseq)switch(null!==e._registrationTimer&&(clearTimeout(e._registrationTimer),e._registrationTimer=null),!0){case/^1[0-9]{2}$/.test(t.status_code):break;case/^2[0-9]{2}$/.test(t.status_code):if(e._registering=!1,!t.hasHeader("Contact")){l.debug("no Contact header in response to REGISTER, response ignored");break}var n=t.headers.Contact.reduce((function(e,t){return e.concat(t.parsed)}),[]),r=n.find((function(t){return e._sipInstance===t.getParam("+sip.instance")&&e._reg_id===parseInt(t.getParam("reg-id"))}));if(r||(r=n.find((function(t){return t.uri.user===e._ua.contact.uri.user}))),!r){l.debug("no Contact header pointing to us, response ignored");break}var i=r.getParam("expires");!i&&t.hasHeader("expires")&&(i=t.getHeader("expires")),i||(i=e._expires),(i=Number(i))<10&&(i=10);var s=i>=140?1e3*i/2+Math.floor(1e3*(i/2-70)*Math.random()):1e3*i-5e3;e._registrationTimer=setTimeout((function(){e._registrationTimer=null,0===e._ua.listeners("registrationExpiring").length?e.register():e._ua.emit("registrationExpiring")}),s),r.hasParam("temp-gruu")&&(e._ua.contact.temp_gruu=r.getParam("temp-gruu").replace(/"/g,"")),r.hasParam("pub-gruu")&&(e._ua.contact.pub_gruu=r.getParam("pub-gruu").replace(/"/g,"")),e._registered||(e._registered=!0,e._ua.registered({response:t}));break;case/^423$/.test(t.status_code):t.hasHeader("min-expires")?(e._expires=Number(t.getHeader("min-expires")),e._expires<10&&(e._expires=10),e.register()):(l.debug("423 response received for REGISTER without Min-Expires"),e._registrationFailure(t,a.causes.SIP_FAILURE_CODE));break;default:var u=o.sipErrorCause(t.status_code);e._registrationFailure(t,u)}}});this._registering=!0,r.send()}}},{key:"unregister",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._registered){this._registered=!1,null!==this._registrationTimer&&(clearTimeout(this._registrationTimer),this._registrationTimer=null);var n=this._extraHeaders.slice();t.all?n.push("Contact: *".concat(this._extraContactParams)):n.push("Contact: ".concat(this._contact,";expires=0").concat(this._extraContactParams)),n.push("Expires: 0"),this._auth&&n.push(this._auth);var r=new s.OutgoingRequest(a.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1},n);new u(this._ua,r,{onRequestTimeout:function(){e._unregistered(null,a.causes.REQUEST_TIMEOUT)},onTransportError:function(){e._unregistered(null,a.causes.CONNECTION_ERROR)},onAuthenticated:function(){e._cseq+=1},onReceiveResponse:function(t){switch(!0){case/^1[0-9]{2}$/.test(t.status_code):break;case/^2[0-9]{2}$/.test(t.status_code):e._unregistered(t);break;default:var n=o.sipErrorCause(t.status_code);e._unregistered(t,n)}}}).send(),this._auth=null}else l.debug("already unregistered")}},{key:"close",value:function(){this._registered&&this.unregister()}},{key:"onTransportClosed",value:function(){this._registering=!1,null!==this._registrationTimer&&(clearTimeout(this._registrationTimer),this._registrationTimer=null),this._registered&&(this._registered=!1,this._ua.unregistered({}))}},{key:"_registrationFailure",value:function(e,t){this._registering=!1,this._ua.registrationFailed({response:e||null,cause:t}),this._registered&&(this._registered=!1,this._ua.unregistered({response:e||null,cause:t}))}},{key:"_unregistered",value:function(e,t){this._registering=!1,this._registered=!1,this._ua.unregistered({response:e||null,cause:t||null})}}])&&r(t.prototype,n),e}()},{"./Constants":2,"./Logger":9,"./RequestSender":21,"./SIPMessage":22,"./Utils":30}],21:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("./Logger"),o=e("./Constants"),a=e("./DigestAuthentication"),s=e("./Transactions"),u=new i("RequestSender"),l={onRequestTimeout:function(){},onTransportError:function(){},onReceiveResponse:function(){},onAuthenticated:function(){}};t.exports=function(){function e(t,n,r){for(var i in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._ua=t,this._eventHandlers=r,this._method=n.method,this._request=n,this._auth=null,this._challenged=!1,this._staled=!1,l)Object.prototype.hasOwnProperty.call(l,i)&&(this._eventHandlers[i]||(this._eventHandlers[i]=l[i]));t.status!==t.C.STATUS_USER_CLOSED||this._method===o.BYE&&this._method===o.ACK||this._eventHandlers.onTransportError()}var t,n;return t=e,(n=[{key:"send",value:function(){var e=this,t={onRequestTimeout:function(){e._eventHandlers.onRequestTimeout()},onTransportError:function(){e._eventHandlers.onTransportError()},onReceiveResponse:function(t){e._receiveResponse(t)}};switch(this._method){case"INVITE":this.clientTransaction=new s.InviteClientTransaction(this._ua,this._ua.transport,this._request,t);break;case"ACK":this.clientTransaction=new s.AckClientTransaction(this._ua,this._ua.transport,this._request,t);break;default:this.clientTransaction=new s.NonInviteClientTransaction(this._ua,this._ua.transport,this._request,t)}this._ua._configuration.authorization_jwt&&this._request.setHeader("Authorization",this._ua._configuration.authorization_jwt),this.clientTransaction.send()}},{key:"_receiveResponse",value:function(e){var t,n,r=e.status_code;if(401!==r&&407!==r||null===this._ua.configuration.password&&null===this._ua.configuration.ha1)this._eventHandlers.onReceiveResponse(e);else{if(401===e.status_code?(t=e.parseHeader("www-authenticate"),n="authorization"):(t=e.parseHeader("proxy-authenticate"),n="proxy-authorization"),!t)return u.debug("".concat(e.status_code," with wrong or missing challenge, cannot authenticate")),void this._eventHandlers.onReceiveResponse(e);if(!this._challenged||!this._staled&&!0===t.stale){if(!this._auth){var i=this._ua.getCredential(t.realm);this._auth=new a(i)}if(!this._auth.authenticate(this._request,t))return void this._eventHandlers.onReceiveResponse(e);this._challenged=!0,this._ua.updateCredential(t.realm,this._auth.get("realm"),this._auth.get("ha1")),t.stale&&(this._staled=!0),this._request=this._request.clone(),this._request.cseq+=1,this._request.setHeader("cseq","".concat(this._request.cseq," ").concat(this._method)),this._request.setHeader(n,this._auth.toString()),this._eventHandlers.onAuthenticated(this._request),this.send()}else this._eventHandlers.onReceiveResponse(e)}}}])&&r(t.prototype,n),e}()},{"./Constants":2,"./DigestAuthentication":5,"./Logger":9,"./Transactions":26}],22:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}var m=e("sdp-transform"),p=e("./Logger"),_=e("./Constants"),g=e("./Utils"),y=e("./NameAddrHeader"),v=e("./Grammar"),M=new p("SIPMessage"),T=function(){function e(t,n,r,i,o,a){if(d(this,e),!t||!n||!r)return null;i=i||{},this.ua=r,this.headers={},this.method=t,this.ruri=n,this.body=a,this.extraHeaders=g.cloneArray(o),i.route_set?this.setHeader("route",i.route_set):r.configuration.use_preloaded_route&&this.setHeader("route","<".concat(r.transport.sip_uri,";lr>")),this.setHeader("via",""),this.setHeader("max-forwards",_.MAX_FORWARDS);var s=i.to_uri||n,u=i.to_tag?{tag:i.to_tag}:null,l=void 0!==i.to_display_name?i.to_display_name:null;this.to=new y(s,l,u),this.setHeader("to",this.to.toString());var c,h=i.from_uri||r.configuration.uri,f={tag:i.from_tag||g.newTag()};c=void 0!==i.from_display_name?i.from_display_name:r.configuration.display_name?r.configuration.display_name:null,this.from=new y(h,c,f),this.setHeader("from",this.from.toString());var m=i.call_id||r.configuration.jssip_id+g.createRandomToken(15);this.call_id=m,this.setHeader("call-id",m);var p=i.cseq||Math.floor(1e4*Math.random());this.cseq=p,this.setHeader("cseq","".concat(p," ").concat(t))}return f(e,[{key:"setHeader",value:function(e,t){for(var n=new RegExp("^\\s*".concat(e,"\\s*:"),"i"),r=0;r<this.extraHeaders.length;r++)n.test(this.extraHeaders[r])&&this.extraHeaders.splice(r,1);this.headers[g.headerize(e)]=Array.isArray(t)?t:[t]}},{key:"getHeader",value:function(e){var t=this.headers[g.headerize(e)];if(t){if(t[0])return t[0]}else{var n,r=new RegExp("^\\s*".concat(e,"\\s*:"),"i"),i=l(this.extraHeaders);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(r.test(o))return o.substring(o.indexOf(":")+1).trim()}}catch(e){i.e(e)}finally{i.f()}}}},{key:"getHeaders",value:function(e){var t=this.headers[g.headerize(e)],n=[];if(t){var r,i=l(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.push(o)}}catch(e){i.e(e)}finally{i.f()}return n}var a,s=new RegExp("^\\s*".concat(e,"\\s*:"),"i"),u=l(this.extraHeaders);try{for(u.s();!(a=u.n()).done;){var c=a.value;s.test(c)&&n.push(c.substring(c.indexOf(":")+1).trim())}}catch(e){u.e(e)}finally{u.f()}return n}},{key:"hasHeader",value:function(e){if(this.headers[g.headerize(e)])return!0;var t,n=new RegExp("^\\s*".concat(e,"\\s*:"),"i"),r=l(this.extraHeaders);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(n.test(i))return!0}}catch(e){r.e(e)}finally{r.f()}return!1}},{key:"parseSDP",value:function(e){return!e&&this.sdp||(this.sdp=m.parse(this.body||"")),this.sdp}},{key:"toString",value:function(){var e="".concat(this.method," ").concat(this.ruri," SIP/2.0\r\n");for(var t in this.headers)if(Object.prototype.hasOwnProperty.call(this.headers,t)){var n,r=l(this.headers[t]);try{for(r.s();!(n=r.n()).done;){var i=n.value;e+="".concat(t,": ").concat(i,"\r\n")}}catch(e){r.e(e)}finally{r.f()}}var o,a=l(this.extraHeaders);try{for(a.s();!(o=a.n()).done;){var s=o.value;e+="".concat(s.trim(),"\r\n")}}catch(e){a.e(e)}finally{a.f()}var u=[];switch(this.method){case _.REGISTER:u.push("path","gruu");break;case _.INVITE:this.ua.configuration.session_timers&&u.push("timer"),(this.ua.contact.pub_gruu||this.ua.contact.temp_gruu)&&u.push("gruu"),u.push("ice","replaces");break;case _.UPDATE:this.ua.configuration.session_timers&&u.push("timer"),u.push("ice")}u.push("outbound");var c=this.ua.configuration.user_agent||_.USER_AGENT;if(e+="Allow: ".concat(_.ALLOWED_METHODS,"\r\n"),e+="Supported: ".concat(u,"\r\n"),e+="User-Agent: ".concat(c,"\r\n"),this.body){var d=g.str_utf8_length(this.body);e+="Content-Length: ".concat(d,"\r\n\r\n"),e+=this.body}else e+="Content-Length: 0\r\n\r\n";return e}},{key:"clone",value:function(){var t=new e(this.method,this.ruri,this.ua);return Object.keys(this.headers).forEach((function(e){t.headers[e]=this.headers[e].slice()}),this),t.body=this.body,t.extraHeaders=g.cloneArray(this.extraHeaders),t.to=this.to,t.from=this.from,t.call_id=this.call_id,t.cseq=this.cseq,t}}]),e}(),b=function(e){i(n,T);var t=a(n);function n(e,r,i,o,a){var s;return d(this,n),(s=t.call(this,_.INVITE,e,r,i,o,a)).transaction=null,s}return f(n,[{key:"cancel",value:function(e){this.transaction.cancel(e)}},{key:"clone",value:function(){var e=new n(this.ruri,this.ua);return Object.keys(this.headers).forEach((function(t){e.headers[t]=this.headers[t].slice()}),this),e.body=this.body,e.extraHeaders=g.cloneArray(this.extraHeaders),e.to=this.to,e.from=this.from,e.call_id=this.call_id,e.cseq=this.cseq,e.transaction=this.transaction,e}}]),n}(),w=function(){function e(){d(this,e),this.data=null,this.headers=null,this.method=null,this.via=null,this.via_branch=null,this.call_id=null,this.cseq=null,this.from=null,this.from_tag=null,this.to=null,this.to_tag=null,this.body=null,this.sdp=null}return f(e,[{key:"addHeader",value:function(e,t){var n={raw:t};e=g.headerize(e),this.headers[e]?this.headers[e].push(n):this.headers[e]=[n]}},{key:"getHeader",value:function(e){var t=this.headers[g.headerize(e)];if(t)return t[0]?t[0].raw:void 0}},{key:"getHeaders",value:function(e){var t=this.headers[g.headerize(e)],n=[];if(!t)return[];var r,i=l(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.push(o.raw)}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"hasHeader",value:function(e){return!!this.headers[g.headerize(e)]}},{key:"parseHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e=g.headerize(e),this.headers[e]){if(!(t>=this.headers[e].length)){var n=this.headers[e][t],r=n.raw;if(n.parsed)return n.parsed;var i=v.parse(r,e.replace(/-/g,"_"));return-1===i?(this.headers[e].splice(t,1),void M.debug('error parsing "'.concat(e,'" header field with value "').concat(r,'"'))):(n.parsed=i,i)}M.debug('not so many "'.concat(e,'" headers present'))}else M.debug('header "'.concat(e,'" not present'))}},{key:"s",value:function(e,t){return this.parseHeader(e,t)}},{key:"setHeader",value:function(e,t){var n={raw:t};this.headers[g.headerize(e)]=[n]}},{key:"parseSDP",value:function(e){return!e&&this.sdp||(this.sdp=m.parse(this.body||"")),this.sdp}},{key:"toString",value:function(){return this.data}}]),e}(),D=function(e){i(n,w);var t=a(n);function n(e){var r;return d(this,n),(r=t.call(this)).ua=e,r.headers={},r.ruri=null,r.transport=null,r.server_transaction=null,r}return f(n,[{key:"reply",value:function(e,t,n,r,i,o){var a=[],s=this.getHeader("To");if(t=t||null,!(e=e||null)||e<100||e>699)throw new TypeError("Invalid status_code: ".concat(e));if(t&&"string"!=typeof t&&!(t instanceof String))throw new TypeError("Invalid reason_phrase: ".concat(t));t=t||_.REASON_PHRASE[e]||"",n=g.cloneArray(n);var u="SIP/2.0 ".concat(e," ").concat(t,"\r\n");if(this.method===_.INVITE&&e>100&&e<=200){var c,d=l(this.getHeaders("record-route"));try{for(d.s();!(c=d.n()).done;){var h=c.value;u+="Record-Route: ".concat(h,"\r\n")}}catch(e){d.e(e)}finally{d.f()}}var f,m=l(this.getHeaders("via"));try{for(m.s();!(f=m.n()).done;){var p=f.value;u+="Via: ".concat(p,"\r\n")}}catch(e){m.e(e)}finally{m.f()}!this.to_tag&&e>100?s+=";tag=".concat(g.newTag()):this.to_tag&&!this.s("to").hasParam("tag")&&(s+=";tag=".concat(this.to_tag)),u+="To: ".concat(s,"\r\n"),u+="From: ".concat(this.getHeader("From"),"\r\n"),u+="Call-ID: ".concat(this.call_id,"\r\n"),u+="CSeq: ".concat(this.cseq," ").concat(this.method,"\r\n");var y,v=l(n);try{for(v.s();!(y=v.n()).done;){var M=y.value;u+="".concat(M.trim(),"\r\n")}}catch(e){v.e(e)}finally{v.f()}switch(this.method){case _.INVITE:this.ua.configuration.session_timers&&a.push("timer"),(this.ua.contact.pub_gruu||this.ua.contact.temp_gruu)&&a.push("gruu"),a.push("ice","replaces");break;case _.UPDATE:this.ua.configuration.session_timers&&a.push("timer"),r&&a.push("ice"),a.push("replaces")}if(a.push("outbound"),this.method===_.OPTIONS?(u+="Allow: ".concat(_.ALLOWED_METHODS,"\r\n"),u+="Accept: ".concat(_.ACCEPTED_BODY_TYPES,"\r\n")):405===e?u+="Allow: ".concat(_.ALLOWED_METHODS,"\r\n"):415===e&&(u+="Accept: ".concat(_.ACCEPTED_BODY_TYPES,"\r\n")),u+="Supported: ".concat(a,"\r\n"),r){var T=g.str_utf8_length(r);u+="Content-Type: application/sdp\r\n",u+="Content-Length: ".concat(T,"\r\n\r\n"),u+=r}else u+="Content-Length: ".concat(0,"\r\n\r\n");this.server_transaction.receiveResponse(e,u,i,o)}},{key:"reply_sl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getHeaders("via");if(!e||e<100||e>699)throw new TypeError("Invalid status_code: ".concat(e));if(t&&"string"!=typeof t&&!(t instanceof String))throw new TypeError("Invalid reason_phrase: ".concat(t));t=t||_.REASON_PHRASE[e]||"";var r,i="SIP/2.0 ".concat(e," ").concat(t,"\r\n"),o=l(n);try{for(o.s();!(r=o.n()).done;){var a=r.value;i+="Via: ".concat(a,"\r\n")}}catch(e){o.e(e)}finally{o.f()}var s=this.getHeader("To");!this.to_tag&&e>100?s+=";tag=".concat(g.newTag()):this.to_tag&&!this.s("to").hasParam("tag")&&(s+=";tag=".concat(this.to_tag)),i+="To: ".concat(s,"\r\n"),i+="From: ".concat(this.getHeader("From"),"\r\n"),i+="Call-ID: ".concat(this.call_id,"\r\n"),i+="CSeq: ".concat(this.cseq," ").concat(this.method,"\r\n"),i+="Content-Length: ".concat(0,"\r\n\r\n"),this.transport.send(i)}}]),n}(),L=function(e){i(n,w);var t=a(n);function n(){var e;return d(this,n),(e=t.call(this)).headers={},e.status_code=null,e.reason_phrase=null,e}return n}();t.exports={OutgoingRequest:T,InitialOutgoingInviteRequest:b,IncomingRequest:D,IncomingResponse:L}},{"./Constants":2,"./Grammar":7,"./Logger":9,"./NameAddrHeader":11,"./Utils":30,"sdp-transform":39}],23:[function(e,t,n){var r=e("./Logger"),i=e("./Utils"),o=e("./Grammar"),a=new r("Socket");n.isSocket=function(e){if(Array.isArray(e))return!1;if(void 0===e)return a.warn("undefined JsSIP.Socket instance"),!1;try{if(!i.isString(e.url))throw a.warn("missing or invalid JsSIP.Socket url property"),new Error("Missing or invalid JsSIP.Socket url property");if(!i.isString(e.via_transport))throw a.warn("missing or invalid JsSIP.Socket via_transport property"),new Error("Missing or invalid JsSIP.Socket via_transport property");if(-1===o.parse(e.sip_uri,"SIP_URI"))throw a.warn("missing or invalid JsSIP.Socket sip_uri property"),new Error("missing or invalid JsSIP.Socket sip_uri property")}catch(e){return!1}try{["connect","disconnect","send"].forEach((function(t){if(!i.isFunction(e[t]))throw a.warn("missing or invalid JsSIP.Socket method: ".concat(t)),new Error("Missing or invalid JsSIP.Socket method: ".concat(t))}))}catch(e){return!1}return!0}},{"./Grammar":7,"./Logger":9,"./Utils":30}],24:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=e("events").EventEmitter,h=e("./Logger"),f=e("./Constants"),m=e("./Utils"),p=e("./Grammar"),_=e("./SIPMessage"),g=e("./RequestSender"),y=e("./Dialog"),v=new h("Subscriber"),M={SUBSCRIBE_RESPONSE_TIMEOUT:0,SUBSCRIBE_TRANSPORT_ERROR:1,SUBSCRIBE_NON_OK_RESPONSE:2,SUBSCRIBE_BAD_OK_RESPONSE:3,SUBSCRIBE_FAILED_AUTHENTICATION:4,UNSUBSCRIBE_TIMEOUT:5,RECEIVE_FINAL_NOTIFY:6,RECEIVE_BAD_NOTIFY:7,STATE_PENDING:0,STATE_ACTIVE:1,STATE_TERMINATED:2,STATE_INIT:3,STATE_NOTIFY_WAIT:4};t.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(u,d);var t,n,r,o=l(u);function u(e,t,n,r,i){var a,s=i.expires,l=i.contentType,c=i.allowEvents,d=i.params,h=i.extraHeaders;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),v.debug("new"),a=o.call(this),!t)throw new TypeError("target is undefined");if(!n)throw new TypeError("eventName is undefined");if(!r)throw new TypeError("accept is undefined");a._ua=e,a._target=t,0===s||s||(s=900),a._expires=s,a._content_type=l,a._params=m.cloneObject(d),a._params.from_uri||(a._params.from_uri=a._ua.configuration.uri),a._params.from_tag=m.newTag(),a._params.to_tag=null,a._params.call_id=m.createRandomToken(20),void 0===a._params.cseq&&(a._params.cseq=Math.floor(1e4*Math.random()+1)),a._state=M.STATE_INIT,a._dialog=null,a._expires_timer=null,a._expires_timestamp=null,a._terminated=!1,a._unsubscribe_timeout_timer=null,a.data={};var f=p.parse(n,"Event");if(-1===f)throw new TypeError("eventName - wrong format");a._event_name=f.event,a._event_id=f.params&&f.params.id;var _=a._event_name;if(a._event_id&&(_+=";id=".concat(a._event_id)),a._headers=m.cloneArray(h),a._headers=a._headers.concat(["Event: ".concat(_),"Expires: ".concat(a._expires),"Accept: ".concat(r)]),!a._headers.find((function(e){return e.startsWith("Contact")}))){var g="Contact: ".concat(a._ua._contact.toString());a._headers.push(g)}return c&&a._headers.push("Allow-Events: ".concat(c)),a._queue=[],a}return t=u,r=[{key:"C",get:function(){return M}}],(n=[{key:"C",get:function(){return M}},{key:"onRequestTimeout",value:function(){this._dialogTerminated(M.SUBSCRIBE_RESPONSE_TIMEOUT)}},{key:"onTransportError",value:function(){this._dialogTerminated(M.SUBSCRIBE_TRANSPORT_ERROR)}},{key:"receiveRequest",value:function(e){if(e.method!==f.NOTIFY)return v.warn("received non-NOTIFY request"),void e.reply(405);var t=e.parseHeader("Event");if(!t)return v.warn("missed Event header"),e.reply(400),void this._dialogTerminated(M.RECEIVE_BAD_NOTIFY);var n=t.event,r=t.params&&t.params.id;if(n!==this._event_name||r!==this._event_id)return v.warn("Event header does not match SUBSCRIBE"),e.reply(489),void this._dialogTerminated(M.RECEIVE_BAD_NOTIFY);var i=e.parseHeader("subscription-state");if(!i)return v.warn("missed Subscription-State header"),e.reply(400),void this._dialogTerminated(M.RECEIVE_BAD_NOTIFY);e.reply(200);var o=this._stateStringToNumber(i.state),a=this._state;if(a!==M.STATE_TERMINATED&&o!==M.STATE_TERMINATED&&(this._state=o,void 0!==i.expires)){var s=i.expires,u=(new Date).getTime()+1e3*s;this._expires_timestamp-u>2e3&&(v.debug("update sending re-SUBSCRIBE time"),this._scheduleSubscribe(s))}a!==M.STATE_PENDING&&o===M.STATE_PENDING?(v.debug('emit "pending"'),this.emit("pending")):a!==M.STATE_ACTIVE&&o===M.STATE_ACTIVE&&(v.debug('emit "active"'),this.emit("active"));var l=e.body,c=o===M.STATE_TERMINATED;if(l){var d=e.getHeader("content-type");v.debug('emit "notify"'),this.emit("notify",c,e,l,d)}if(c){var h=i.reason,m=void 0;i.params&&void 0!==i.params["retry-after"]&&(m=parseInt(i.params["retry-after"])),this._dialogTerminated(M.RECEIVE_FINAL_NOTIFY,h,m)}}},{key:"subscribe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;v.debug("subscribe()"),this._state===M.STATE_INIT?this._sendInitialSubscribe(e,this._headers):this._sendSubsequentSubscribe(e,this._headers)}},{key:"terminate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(v.debug("terminate()"),!this._terminated){this._terminated=!0;var n=this._headers.map((function(e){return e.startsWith("Expires")?"Expires: 0":e}));this._state===M.STATE_INIT?this._sendInitialSubscribe(t,n):this._sendSubsequentSubscribe(t,n),this._unsubscribe_timeout_timer=setTimeout((function(){e._dialogTerminated(M.UNSUBSCRIBE_TIMEOUT)}),3e4)}}},{key:"state",get:function(){return this._state}},{key:"id",get:function(){return this._dialog?this._dialog.id:null}},{key:"_sendInitialSubscribe",value:function(e,t){var n=this;if(e){if(!this._content_type)throw new TypeError("content_type is undefined");(t=t.slice()).push("Content-Type: ".concat(this._content_type))}this._state=M.STATE_NOTIFY_WAIT;var r=new _.OutgoingRequest(f.SUBSCRIBE,this._ua.normalizeTarget(this._target),this._ua,this._params,t,e);new g(this._ua,r,{onRequestTimeout:function(){n.onRequestTimeout()},onTransportError:function(){n.onTransportError()},onReceiveResponse:function(e){n._receiveSubscribeResponse(e)}}).send()}},{key:"_receiveSubscribeResponse",value:function(e){if(e.status_code>=200&&e.status_code<300){if(null===this._dialog){var t=new y(this,e,"UAC");if(t.error)return v.warn(t.error),void this._dialogTerminated(M.SUBSCRIBE_BAD_OK_RESPONSE);this._dialog=t,v.debug('emit "accepted"'),this.emit("accepted");var n,r=i(this._queue);try{for(r.s();!(n=r.n()).done;){var o=n.value;v.debug("dequeue subscribe"),this._sendSubsequentSubscribe(o.body,o.headers)}}catch(e){r.e(e)}finally{r.f()}}var a=e.getHeader("expires");0===a||a||(v.warn("response without Expires header"),a="900");var s=parseInt(a);s>0&&this._scheduleSubscribe(s)}else 401===e.status_code||407===e.status_code?this._dialogTerminated(M.SUBSCRIBE_FAILED_AUTHENTICATION):e.status_code>=300&&this._dialogTerminated(M.SUBSCRIBE_NON_OK_RESPONSE)}},{key:"_sendSubsequentSubscribe",value:function(e,t){var n=this;if(this._state!==M.STATE_TERMINATED){if(!this._dialog)return v.debug("enqueue subscribe"),void this._queue.push({body:e,headers:t.slice()});if(e){if(!this._content_type)throw new TypeError("content_type is undefined");(t=t.slice()).push("Content-Type: ".concat(this._content_type))}this._dialog.sendRequest(f.SUBSCRIBE,{body:e,extraHeaders:t,eventHandlers:{onRequestTimeout:function(){n.onRequestTimeout()},onTransportError:function(){n.onTransportError()},onSuccessResponse:function(e){n._receiveSubscribeResponse(e)},onErrorResponse:function(e){n._receiveSubscribeResponse(e)},onDialogError:function(e){n._receiveSubscribeResponse(e)}}})}}},{key:"_dialogTerminated",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;this._state!==M.STATE_TERMINATED&&(this._state=M.STATE_TERMINATED,clearTimeout(this._expires_timer),clearTimeout(this._unsubscribe_timeout_timer),this._dialog&&(this._dialog.terminate(),this._dialog=null),v.debug('emit "terminated" code='.concat(e)),this.emit("terminated",e,t,n))}},{key:"_scheduleSubscribe",value:function(e){var t=this,n=e>=140?1e3*e/2+Math.floor(1e3*(e/2-70)*Math.random()):1e3*e-5e3;this._expires_timestamp=(new Date).getTime()+1e3*e,v.debug("next SUBSCRIBE will be sent in ".concat(Math.floor(n/1e3)," sec")),clearTimeout(this._expires_timer),this._expires_timer=setTimeout((function(){t._expires_timer=null,t._sendSubsequentSubscribe(null,t._headers)}),n)}},{key:"_stateStringToNumber",value:function(e){switch(e){case"pending":return M.STATE_PENDING;case"active":return M.STATE_ACTIVE;case"terminated":return M.STATE_TERMINATED;case"init":return M.STATE_INIT;case"notify_wait":return M.STATE_NOTIFY_WAIT;default:throw new TypeError("wrong state value")}}}])&&a(t.prototype,n),r&&a(t,r),u}()},{"./Constants":2,"./Dialog":3,"./Grammar":7,"./Logger":9,"./RequestSender":21,"./SIPMessage":22,"./Utils":30,events:33}],25:[function(e,t,n){t.exports={T1:500,T2:4e3,T4:5e3,TIMER_B:32e3,TIMER_D:0,TIMER_F:32e3,TIMER_H:32e3,TIMER_I:0,TIMER_J:0,TIMER_K:0,TIMER_L:32e3,TIMER_M:32e3,PROVISIONAL_RESPONSE_INTERVAL:6e4}},{}],26:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?d(e):t}(this,n)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=e("events").EventEmitter,m=e("./Logger"),p=e("./Constants"),_=e("./SIPMessage"),g=e("./Timers"),y=new m("NonInviteClientTransaction"),v=new m("InviteClientTransaction"),M=new m("AckClientTransaction"),T=new m("NonInviteServerTransaction"),b=new m("InviteServerTransaction"),w={STATUS_TRYING:1,STATUS_PROCEEDING:2,STATUS_CALLING:3,STATUS_ACCEPTED:4,STATUS_COMPLETED:5,STATUS_TERMINATED:6,STATUS_CONFIRMED:7,NON_INVITE_CLIENT:"nict",NON_INVITE_SERVER:"nist",INVITE_CLIENT:"ict",INVITE_SERVER:"ist"},D=function(e){s(n,f);var t=c(n);function n(e,r,o,a){var s;i(this,n),(s=t.call(this)).type=w.NON_INVITE_CLIENT,s.id="z9hG4bK".concat(Math.floor(1e7*Math.random())),s.ua=e,s.transport=r,s.request=o,s.eventHandlers=a;var u="SIP/2.0/".concat(r.via_transport);return u+=" ".concat(e.configuration.via_host,";branch=").concat(s.id),s.request.setHeader("via",u),s.ua.newTransaction(d(s)),s}return a(n,[{key:"C",get:function(){return w}},{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"send",value:function(){var e=this;this.stateChanged(w.STATUS_TRYING),this.F=setTimeout((function(){e.timer_F()}),g.TIMER_F),this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){y.debug("transport error occurred, deleting transaction ".concat(this.id)),clearTimeout(this.F),this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onTransportError()}},{key:"timer_F",value:function(){y.debug("Timer F expired for transaction ".concat(this.id)),this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onRequestTimeout()}},{key:"timer_K",value:function(){this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"receiveResponse",value:function(e){var t=e.status_code;if(t<200)switch(this.state){case w.STATUS_TRYING:case w.STATUS_PROCEEDING:this.stateChanged(w.STATUS_PROCEEDING),this.eventHandlers.onReceiveResponse(e)}else switch(this.state){case w.STATUS_TRYING:case w.STATUS_PROCEEDING:this.stateChanged(w.STATUS_COMPLETED),clearTimeout(this.F),408===t?this.eventHandlers.onRequestTimeout():this.eventHandlers.onReceiveResponse(e),this.timer_K()}}}]),n}(),L=function(e){s(n,f);var t=c(n);function n(e,r,o,a){var s;i(this,n),(s=t.call(this)).type=w.INVITE_CLIENT,s.id="z9hG4bK".concat(Math.floor(1e7*Math.random())),s.ua=e,s.transport=r,s.request=o,s.eventHandlers=a,o.transaction=d(s);var u="SIP/2.0/".concat(r.via_transport);return u+=" ".concat(e.configuration.via_host,";branch=").concat(s.id),s.request.setHeader("via",u),s.ua.newTransaction(d(s)),s}return a(n,[{key:"C",get:function(){return w}},{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"send",value:function(){var e=this;this.stateChanged(w.STATUS_CALLING),this.B=setTimeout((function(){e.timer_B()}),g.TIMER_B),this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){clearTimeout(this.B),clearTimeout(this.M),this.state!==w.STATUS_ACCEPTED&&(v.debug("transport error occurred, deleting transaction ".concat(this.id)),this.eventHandlers.onTransportError()),this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"timer_M",value:function(){v.debug("Timer M expired for transaction ".concat(this.id)),this.state===w.STATUS_ACCEPTED&&(clearTimeout(this.B),this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"timer_B",value:function(){v.debug("Timer B expired for transaction ".concat(this.id)),this.state===w.STATUS_CALLING&&(this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onRequestTimeout())}},{key:"timer_D",value:function(){v.debug("Timer D expired for transaction ".concat(this.id)),clearTimeout(this.B),this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"sendACK",value:function(e){var t=new _.OutgoingRequest(p.ACK,this.request.ruri,this.ua,{route_set:this.request.getHeaders("route"),call_id:this.request.getHeader("call-id"),cseq:this.request.cseq});t.setHeader("from",this.request.getHeader("from")),t.setHeader("via",this.request.getHeader("via")),t.setHeader("to",e.getHeader("to")),this.transport.send(t),this.timer_D()}},{key:"cancel",value:function(e){if(this.state===w.STATUS_PROCEEDING){var t=new _.OutgoingRequest(p.CANCEL,this.request.ruri,this.ua,{route_set:this.request.getHeaders("route"),call_id:this.request.getHeader("call-id"),cseq:this.request.cseq});t.setHeader("from",this.request.getHeader("from")),t.setHeader("via",this.request.getHeader("via")),t.setHeader("to",this.request.getHeader("to")),e&&t.setHeader("reason",e),this.transport.send(t)}}},{key:"receiveResponse",value:function(e){var t=this,n=e.status_code;if(n>=100&&n<=199)switch(this.state){case w.STATUS_CALLING:this.stateChanged(w.STATUS_PROCEEDING),this.eventHandlers.onReceiveResponse(e);break;case w.STATUS_PROCEEDING:this.eventHandlers.onReceiveResponse(e)}else if(n>=200&&n<=299)switch(this.state){case w.STATUS_CALLING:case w.STATUS_PROCEEDING:this.stateChanged(w.STATUS_ACCEPTED),this.M=setTimeout((function(){t.timer_M()}),g.TIMER_M),this.eventHandlers.onReceiveResponse(e);break;case w.STATUS_ACCEPTED:this.eventHandlers.onReceiveResponse(e)}else if(n>=300&&n<=699)switch(this.state){case w.STATUS_CALLING:case w.STATUS_PROCEEDING:this.stateChanged(w.STATUS_COMPLETED),this.sendACK(e),this.eventHandlers.onReceiveResponse(e);break;case w.STATUS_COMPLETED:this.sendACK(e)}}}]),n}(),S=function(e){s(n,f);var t=c(n);function n(e,r,o,a){var s;i(this,n),(s=t.call(this)).id="z9hG4bK".concat(Math.floor(1e7*Math.random())),s.transport=r,s.request=o,s.eventHandlers=a;var u="SIP/2.0/".concat(r.via_transport);return u+=" ".concat(e.configuration.via_host,";branch=").concat(s.id),s.request.setHeader("via",u),s}return a(n,[{key:"C",get:function(){return w}},{key:"send",value:function(){this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){M.debug("transport error occurred for transaction ".concat(this.id)),this.eventHandlers.onTransportError()}}]),n}(),k=function(e){s(n,f);var t=c(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this)).type=w.NON_INVITE_SERVER,a.id=o.via_branch,a.ua=e,a.transport=r,a.request=o,a.last_response="",o.server_transaction=d(a),a.state=w.STATUS_TRYING,e.newTransaction(d(a)),a}return a(n,[{key:"C",get:function(){return w}},{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"timer_J",value:function(){T.debug("Timer J expired for transaction ".concat(this.id)),this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"onTransportError",value:function(){this.transportError||(this.transportError=!0,T.debug("transport error occurred, deleting transaction ".concat(this.id)),this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"receiveResponse",value:function(e,t,n,r){if(100===e)switch(this.state){case w.STATUS_TRYING:this.stateChanged(w.STATUS_PROCEEDING),this.transport.send(t)||this.onTransportError();break;case w.STATUS_PROCEEDING:this.last_response=t,this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}else if(e>=200&&e<=699)switch(this.state){case w.STATUS_TRYING:case w.STATUS_PROCEEDING:this.stateChanged(w.STATUS_COMPLETED),this.last_response=t,this.timer_J(),this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}}}]),n}(),A=function(e){s(n,f);var t=c(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this)).type=w.INVITE_SERVER,a.id=o.via_branch,a.ua=e,a.transport=r,a.request=o,a.last_response="",o.server_transaction=d(a),a.state=w.STATUS_PROCEEDING,e.newTransaction(d(a)),a.resendProvisionalTimer=null,o.reply(100),a}return a(n,[{key:"C",get:function(){return w}},{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"timer_H",value:function(){b.debug("Timer H expired for transaction ".concat(this.id)),this.state===w.STATUS_COMPLETED&&b.debug("ACK not received, dialog will be terminated"),this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"timer_I",value:function(){this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"timer_L",value:function(){b.debug("Timer L expired for transaction ".concat(this.id)),this.state===w.STATUS_ACCEPTED&&(this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"onTransportError",value:function(){this.transportError||(this.transportError=!0,b.debug("transport error occurred, deleting transaction ".concat(this.id)),null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),clearTimeout(this.L),clearTimeout(this.H),this.stateChanged(w.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"resend_provisional",value:function(){this.transport.send(this.last_response)||this.onTransportError()}},{key:"receiveResponse",value:function(e,t,n,r){var i=this;if(e>=100&&e<=199&&this.state===w.STATUS_PROCEEDING)this.transport.send(t)||this.onTransportError(),this.last_response=t;if(e>100&&e<=199&&this.state===w.STATUS_PROCEEDING)null===this.resendProvisionalTimer&&(this.resendProvisionalTimer=setInterval((function(){i.resend_provisional()}),g.PROVISIONAL_RESPONSE_INTERVAL));else if(e>=200&&e<=299)switch(this.state){case w.STATUS_PROCEEDING:this.stateChanged(w.STATUS_ACCEPTED),this.last_response=t,this.L=setTimeout((function(){i.timer_L()}),g.TIMER_L),null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null);case w.STATUS_ACCEPTED:this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}else if(e>=300&&e<=699&&this.state===w.STATUS_PROCEEDING)null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),this.transport.send(t)?(this.stateChanged(w.STATUS_COMPLETED),this.H=setTimeout((function(){i.timer_H()}),g.TIMER_H),n&&n()):(this.onTransportError(),r&&r())}}]),n}();t.exports={C:w,NonInviteClientTransaction:D,InviteClientTransaction:L,AckClientTransaction:S,NonInviteServerTransaction:k,InviteServerTransaction:A,checkTransaction:function(e,t){var n,r=e._transactions;switch(t.method){case p.INVITE:if(n=r.ist[t.via_branch]){if(n.state===w.STATUS_PROCEEDING)n.transport.send(n.last_response);return!0}break;case p.ACK:if(!(n=r.ist[t.via_branch]))return!1;if(n.state===w.STATUS_ACCEPTED)return!1;if(n.state===w.STATUS_COMPLETED)return n.state=w.STATUS_CONFIRMED,n.timer_I(),!0;break;case p.CANCEL:return(n=r.ist[t.via_branch])?(t.reply_sl(200),n.state!==w.STATUS_PROCEEDING):(t.reply_sl(481),!0);default:if(n=r.nist[t.via_branch]){switch(n.state){case w.STATUS_TRYING:break;case w.STATUS_PROCEEDING:case w.STATUS_COMPLETED:n.transport.send(n.last_response)}return!0}}}}},{"./Constants":2,"./Logger":9,"./SIPMessage":22,"./Timers":25,events:33}],27:[function(e,t,n){function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=e("./Logger"),s=e("./Socket"),u=e("./Constants"),l=new a("Transport"),c={STATUS_CONNECTED:0,STATUS_CONNECTING:1,STATUS_DISCONNECTED:2,SOCKET_STATUS_READY:0,SOCKET_STATUS_ERROR:1,recovery_options:{min_interval:u.CONNECTION_RECOVERY_MIN_INTERVAL,max_interval:u.CONNECTION_RECOVERY_MAX_INTERVAL}};t.exports=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.recovery_options;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l.debug("new()"),this._ua=t,this.status=c.STATUS_DISCONNECTED,this.socket=null,this.sockets=[],this.recovery_options=r,this.recover_attempts=0,this.recovery_timer=null,this.close_requested=!1;try{this.textDecoder=new TextDecoder("utf8")}catch(e){l.warn("cannot use TextDecoder: ".concat(e))}if(void 0===n)throw new TypeError("Invalid argument. undefined 'sockets' argument");n instanceof Array||(n=[n]),n.forEach((function(e){if(!s.isSocket(e.socket))throw new TypeError("Invalid argument. invalid 'JsSIP.Socket' instance");if(e.weight&&!Number(e.weight))throw new TypeError("Invalid argument. 'weight' attribute is not a number");this.sockets.push({socket:e.socket,weight:e.weight||0,status:c.SOCKET_STATUS_READY})}),this),this._getSocket()}var t,n;return t=e,(n=[{key:"via_transport",get:function(){return this.socket.via_transport}},{key:"url",get:function(){return this.socket.url}},{key:"sip_uri",get:function(){return this.socket.sip_uri}},{key:"connect",value:function(){l.debug("connect()"),this.isConnected()?l.debug("Transport is already connected"):this.isConnecting()?l.debug("Transport is connecting"):(this.close_requested=!1,this.status=c.STATUS_CONNECTING,this.onconnecting({socket:this.socket,attempts:this.recover_attempts}),this.close_requested||(this.socket.onconnect=this._onConnect.bind(this),this.socket.ondisconnect=this._onDisconnect.bind(this),this.socket.ondata=this._onData.bind(this),this.socket.connect()))}},{key:"disconnect",value:function(){l.debug("close()"),this.close_requested=!0,this.recover_attempts=0,this.status=c.STATUS_DISCONNECTED,null!==this.recovery_timer&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.socket.onconnect=function(){},this.socket.ondisconnect=function(){},this.socket.ondata=function(){},this.socket.disconnect(),this.ondisconnect({socket:this.socket,error:!1})}},{key:"send",value:function(e){if(l.debug("send()"),!this.isConnected())return l.warn("unable to send message, transport is not connected"),!1;var t=e.toString();return l.debug("sending message:\n\n".concat(t,"\n")),this.socket.send(t)}},{key:"isConnected",value:function(){return this.status===c.STATUS_CONNECTED}},{key:"isConnecting",value:function(){return this.status===c.STATUS_CONNECTING}},{key:"_get_number_of_sbc",value:function(){return this.sockets.length}},{key:"_switch_sbc",value:function(){var e=this.ondisconnect;this.ondisconnect=function(){},this.disconnect(),this.ondisconnect=e,this.close_requested=!1,this.sockets.forEach((function(e){this.socket===e.socket&&(e.status=c.SOCKET_STATUS_ERROR)}),this),this._getSocket(),this.connect()}},{key:"_register_redirect",value:function(e){var t,n=null,i=r(this.sockets);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(o.socket.url===e){n=o.socket;break}}}catch(e){i.e(e)}finally{i.f()}if(null===n&&!e.includes(":",6)){e+=":443";var a,s=r(this.sockets);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(u.socket.url===e){n=u.socket;break}}}catch(e){s.e(e)}finally{s.f()}}if(null===n)return!1;var l=this.ondisconnect;return this.ondisconnect=function(){},this.disconnect(),this.ondisconnect=l,this.socket=n,this.connect(),!0}},{key:"_reconnect",value:function(){var e=this;this.recover_attempts+=1;var t=Math.floor(Math.random()*Math.pow(2,this.recover_attempts)+1);t<this.recovery_options.min_interval?t=this.recovery_options.min_interval:t>this.recovery_options.max_interval&&(t=this.recovery_options.max_interval),l.debug("reconnection attempt: ".concat(this.recover_attempts,". next connection attempt in ").concat(t," seconds")),this.recovery_timer=setTimeout((function(){e.close_requested||e.isConnected()||e.isConnecting()||(e._getSocket(),e.connect())}),1e3*t)}},{key:"_getSocket",value:function(){var e=[];if(this.sockets.forEach((function(t){t.status!==c.SOCKET_STATUS_ERROR&&(0===e.length?e.push(t):t.weight>e[0].weight?e=[t]:t.weight===e[0].weight&&e.push(t))})),0===e.length)return this.sockets.forEach((function(e){e.status=c.SOCKET_STATUS_READY})),void this._getSocket();var t=Math.floor(Math.random()*e.length);this.socket=e[t].socket}},{key:"_onConnect",value:function(){this.recover_attempts=0,this._ha_connect_time=void 0,this.status=c.STATUS_CONNECTED,null!==this.recovery_timer&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.onconnect({socket:this})}},{key:"_onDisconnect",value:function(e,t,n){var r=this.status;if(this.status=c.STATUS_DISCONNECTED,this.ondisconnect({socket:this.socket,error:e,code:t,reason:n}),!this.close_requested){if(void 0!==this._ua.modes.sbc_ha_pairs_mode){if(r===c.STATUS_CONNECTED)return l.debug("AC: SBC HA pairs mode: Reconnect to the same SBC ".concat(this._ua.modes.sbc_ha_pairs_mode," seconds left")),this._ha_connect_time=(new Date).getTime()+1e3*this._ua.modes.sbc_ha_pairs_mode,void this._connect2();if(void 0!==this._ha_connect_time){var i=this._ha_connect_time-(new Date).getTime();if(i>0)return l.debug("AC: SBC HA pairs mode: Repeat ".concat(i/1e3," seconds left")),void this._connect2();l.debug("AC: SBC HA pairs mode: Failed"),this._ha_connect_time=void 0}}this.sockets.forEach((function(e){this.socket===e.socket&&(e.status=c.SOCKET_STATUS_ERROR)}),this),this._reconnect()}}},{key:"_connect2",value:function(){var e=this,t=0;if(this._ha_last_connect){var n=(new Date).getTime()-this._ha_last_connect;t=n>500?0:500-n}this.recovery_timer=setTimeout((function(){e.close_requested||e.isConnected()||e.isConnecting()||(e._ha_last_connect=(new Date).getTime(),e.connect())}),t)}},{key:"_onData",value:function(e){if("\r\n"!==e){if("string"!=typeof e){try{e=this.textDecoder?this.textDecoder.decode(e):String.fromCharCode.apply(null,new Uint8Array(e))}catch(e){return void l.debug("received binary message failed to be converted into string, message discarded")}l.debug("received binary message:\n\n".concat(e,"\n"))}else l.debug("received text message:\n\n".concat(e,"\n"));this.ondata({transport:this,message:e})}else l.debug("received message with CRLF Keep Alive response")}}])&&o(t.prototype,n),e}()},{"./Constants":2,"./Logger":9,"./Socket":23}],28:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?s(e):t}(this,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=e("events").EventEmitter,d=e("./Logger"),h=e("./Constants"),f=e("./Registrator"),m=e("./RTCSession"),p=e("./Subscriber"),_=e("./Notifier"),g=e("./Message"),y=e("./Options"),v=e("./Transactions"),M=e("./Transport"),T=e("./Utils"),b=e("./Exceptions"),w=e("./URI"),D=e("./Parser"),L=e("./SIPMessage"),S=e("./sanityCheck"),k=e("./Config"),A=new d("UA"),E={STATUS_INIT:0,STATUS_READY:1,STATUS_USER_CLOSED:2,STATUS_NOT_READY:3,CONFIGURATION_ERROR:1,NETWORK_ERROR:2};t.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(l,c);var t,n,r,u=a(l);function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this)).modes={},t._credentials={},t._cache={credentials:{}},t._configuration=Object.assign({},k.settings),t._dynConfiguration={},t._dialogs={},t._applicants={},t._sessions={},t._transport=null,t._contact=null,t._status=E.STATUS_INIT,t._error=null,t._transactions={nist:{},nict:{},ist:{},ict:{}},t._data={},t._closeTimer=null,void 0===e)throw new TypeError("Not enough arguments");try{t._loadConfig(e)}catch(e){throw t._status=E.STATUS_NOT_READY,t._error=E.CONFIGURATION_ERROR,e}return t._registrator=new f(s(t)),t}return t=l,r=[{key:"C",get:function(){return E}}],(n=[{key:"C",get:function(){return E}},{key:"status",get:function(){return this._status}},{key:"contact",get:function(){return this._contact}},{key:"configuration",get:function(){return this._configuration}},{key:"transport",get:function(){return this._transport}},{key:"start",value:function(){A.debug("start()"),this._status===E.STATUS_INIT?this._transport.connect():this._status===E.STATUS_USER_CLOSED?(A.debug("restarting UA"),null!==this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null,this._transport.disconnect()),this._status=E.STATUS_INIT,this._transport.connect()):this._status===E.STATUS_READY?A.debug("UA is in READY status, not restarted"):A.debug("ERROR: connection is down, Auto-Recovery system is trying to reconnect"),this._dynConfiguration.register=this._configuration.register}},{key:"register",value:function(){A.debug("register()"),this._dynConfiguration.register=!0,this._registrator.register()}},{key:"unregister",value:function(e){A.debug("unregister()"),this._dynConfiguration.register=!1,this._registrator.unregister(e)}},{key:"registrator",value:function(){return this._registrator}},{key:"isRegistered",value:function(){return this._registrator.registered}},{key:"isConnected",value:function(){return this._transport.isConnected()}},{key:"call",value:function(e,t){A.debug("call()");var n=new m(this);return n.connect(e,t),n}},{key:"sendMessage",value:function(e,t,n){A.debug("sendMessage()");var r=new g(this);return r.send(e,t,n),r}},{key:"subscribe",value:function(e,t,n,r){return A.debug("subscribe()"),new p(this,e,t,n,r)}},{key:"notify",value:function(e,t,n){return A.debug("notify()"),new _(this,e,t,n)}},{key:"addCredential",value:function(e){this._credentials[e.realm]=T.cloneObject(e)}},{key:"getCredential",value:function(e){return this._credentials[e]||{username:this._configuration.authorization_user,password:this._configuration.password,realm:this._configuration.realm,ha1:this._configuration.ha1}}},{key:"updateCredential",value:function(e,t,n){var r=this._credentials[e];r?(r.realm=t,r.ha1=n):(this.set("realm",t),this.set("ha1",n))}},{key:"sendOptions",value:function(e,t,n){A.debug("sendOptions()");var r=new y(this);return r.send(e,t,n),r}},{key:"terminateSessions",value:function(e){for(var t in A.debug("terminateSessions()"),this._sessions)this._sessions[t].isEnded()||this._sessions[t].terminate(e)}},{key:"stop",value:function(){var e=this;if(A.debug("stop()"),this._dynConfiguration={},this._status!==E.STATUS_USER_CLOSED){this._registrator.close();var t=Object.keys(this._sessions).length;for(var n in this._sessions)if(Object.prototype.hasOwnProperty.call(this._sessions,n)){A.debug("closing session ".concat(n));try{this._sessions[n].terminate()}catch(e){}}for(var r in this._applicants)if(Object.prototype.hasOwnProperty.call(this._applicants,r))try{this._applicants[r].close()}catch(e){}this._status=E.STATUS_USER_CLOSED,0===Object.keys(this._transactions.nict).length+Object.keys(this._transactions.nist).length+Object.keys(this._transactions.ict).length+Object.keys(this._transactions.ist).length&&0===t?this._transport.disconnect():this._closeTimer=setTimeout((function(){e._closeTimer=null,e._transport.disconnect()}),2e3)}else A.debug("UA already closed")}},{key:"normalizeTarget",value:function(e){return T.normalizeTarget(e,this._configuration.hostport_params)}},{key:"get",value:function(e){switch(e){case"authorization_user":return this._configuration.authorization_user;case"realm":return this._configuration.realm;case"ha1":return this._configuration.ha1;case"authorization_jwt":return this._configuration.authorization_jwt;default:return void A.warn('get() | cannot get "%s" parameter in runtime',e)}}},{key:"set",value:function(e,t){switch(e){case"authorization_user":this._configuration.authorization_user=String(t);break;case"password":this._configuration.password=String(t);break;case"realm":this._configuration.realm=String(t);break;case"ha1":this._configuration.ha1=String(t),this._configuration.password=null;break;case"authorization_jwt":this._configuration.authorization_jwt=String(t);break;case"display_name":this._configuration.display_name=t;break;default:return A.warn('set() | cannot set "%s" parameter in runtime',e),!1}return!0}},{key:"registerRedirect",value:function(e){return!!this._transport._register_redirect(e)||(A.debug('registerRedirect: ignored, "'.concat(e,'" is not found in configuration')),!1)}},{key:"switchSBC",value:function(e){return this._transport._get_number_of_sbc()<2?(A.debug("switchSBC: ignored, no other SBC"),!1):(e&&this._registrator._unregistered(null,h.causes.CONNECTION_ERROR),this._transport._switch_sbc(),!0)}},{key:"getNumberOfSBC",value:function(){return this._transport._get_number_of_sbc()}},{key:"newTransaction",value:function(e){this._transactions[e.type][e.id]=e,this.emit("newTransaction",{transaction:e})}},{key:"destroyTransaction",value:function(e){delete this._transactions[e.type][e.id],this.emit("transactionDestroyed",{transaction:e})}},{key:"newDialog",value:function(e){this._dialogs[e.id]=e}},{key:"destroyDialog",value:function(e){delete this._dialogs[e.id]}},{key:"newMessage",value:function(e,t){this._applicants[e]=e,this.emit("newMessage",t)}},{key:"newOptions",value:function(e,t){this._applicants[e]=e,this.emit("newOptions",t)}},{key:"destroyMessage",value:function(e){delete this._applicants[e]}},{key:"newRTCSession",value:function(e,t){this._sessions[e.id]=e,this.emit("newRTCSession",t)}},{key:"destroyRTCSession",value:function(e){delete this._sessions[e.id]}},{key:"registered",value:function(e){this.emit("registered",e)}},{key:"unregistered",value:function(e){this.emit("unregistered",e)}},{key:"registrationFailed",value:function(e){this.emit("registrationFailed",e)}},{key:"receiveRequest",value:function(e){var t=e.method;if(e.ruri.user!==this._configuration.uri.user&&e.ruri.user!==this._contact.uri.user)return A.debug("Request-URI does not point to us"),void(e.method!==h.ACK&&e.reply_sl(404));if(e.ruri.scheme!==h.SIPS){if(!v.checkTransaction(this,e)){if(t===h.INVITE?new v.InviteServerTransaction(this,this._transport,e):t!==h.ACK&&t!==h.CANCEL&&new v.NonInviteServerTransaction(this,this._transport,e),t===h.OPTIONS){if(0===this.listeners("newOptions").length)return void e.reply(200);new y(this).init_incoming(e)}else if(t===h.MESSAGE){if(0===this.listeners("newMessage").length)return void e.reply(405);new g(this).init_incoming(e)}else if(t===h.SUBSCRIBE){if(0===this.listeners("newSubscribe").length)return void e.reply(405)}else if(t===h.INVITE&&!e.to_tag&&0===this.listeners("newRTCSession").length)return void e.reply(405);var n,r;if(e.to_tag)(n=this._findDialog(e.call_id,e.from_tag,e.to_tag))?n.receiveRequest(e):t===h.NOTIFY?(r=this._findSession(e))?r.receiveRequest(e):(A.debug("received NOTIFY request for a non existent subscription"),e.reply(481,"Subscription does not exist")):t!==h.ACK&&e.reply(481);else switch(t){case h.INVITE:if(window.RTCPeerConnection)if(e.hasHeader("replaces")){var i=e.replaces;(n=this._findDialog(i.call_id,i.from_tag,i.to_tag))?(r=n.owner).isEnded()?e.reply(603):r.receiveRequest(e):e.reply(481)}else(r=new m(this)).init_incoming(e);else A.warn("INVITE received but WebRTC is not supported"),e.reply(488);break;case h.BYE:e.reply(481);break;case h.CANCEL:(r=this._findSession(e))?r.receiveRequest(e):A.debug("received CANCEL request for a non existent session");break;case h.ACK:break;case h.NOTIFY:this.emit("sipEvent",{event:e.event,request:e}),e.reply(200);break;case h.SUBSCRIBE:this.emit("newSubscribe",{event:e.event,request:e});break;default:e.reply(405)}}}else e.reply_sl(416)}},{key:"_findSession",value:function(e){var t=e.call_id,n=e.from_tag,r=e.to_tag,i=t+n,o=this._sessions[i],a=t+r,s=this._sessions[a];return o||s||null}},{key:"_findDialog",value:function(e,t,n){var r=e+t+n,i=this._dialogs[r];return i||(r=e+n+t,(i=this._dialogs[r])||null)}},{key:"_loadConfig",value:function(e){try{k.load(this._configuration,e)}catch(e){throw e}0===this._configuration.display_name&&(this._configuration.display_name="0"),this._configuration.instance_id||(this._configuration.instance_id=T.newUUID()),this._configuration.jssip_id=T.createRandomToken(5);var t=this._configuration.uri.clone();t.user=null,this._configuration.hostport_params=t.toString().replace(/^sip:/i,"");try{this._transport=new M(this,this._configuration.sockets,{max_interval:this._configuration.connection_recovery_max_interval,min_interval:this._configuration.connection_recovery_min_interval}),this._transport.onconnecting=function(e){this.emit("connecting",e)}.bind(this),this._transport.onconnect=function(e){this._status!==E.STATUS_USER_CLOSED&&(this._status=E.STATUS_READY,this._error=null,this.emit("connected",e),this._dynConfiguration.register&&this._registrator.register())}.bind(this),this._transport.ondisconnect=function(e){for(var t=0,n=["nict","ict","nist","ist"];t<n.length;t++){var r=n[t];for(var i in this._transactions[r])Object.prototype.hasOwnProperty.call(this._transactions[r],i)&&this._transactions[r][i].onTransportError()}this.emit("disconnected",e),this._registrator.onTransportClosed(),this._status!==E.STATUS_USER_CLOSED&&(this._status=E.STATUS_NOT_READY,this._error=E.NETWORK_ERROR)}.bind(this),this._transport.ondata=function(e){var t=e.transport,n=e.message;if((n=D.parseMessage(n,this))&&!(this._status===E.STATUS_USER_CLOSED&&n instanceof L.IncomingRequest)&&S(n,this,t))if(n instanceof L.IncomingRequest)n.transport=t,this.receiveRequest(n);else if(n instanceof L.IncomingResponse){var r;switch(n.method){case h.INVITE:(r=this._transactions.ict[n.via_branch])&&r.receiveResponse(n);break;case h.ACK:break;default:(r=this._transactions.nict[n.via_branch])&&r.receiveResponse(n)}}}.bind(this)}catch(e){throw A.warn(e),new b.ConfigurationError("sockets",this._configuration.sockets)}if(delete this._configuration.sockets,this._configuration.authorization_user||(this._configuration.authorization_user=this._configuration.uri.user),!this._configuration.registrar_server){var n=this._configuration.uri.clone();n.user=null,n.clearParams(),n.clearHeaders(),this._configuration.registrar_server=n}this._configuration.no_answer_timeout*=1e3,this._configuration.contact_uri?this._configuration.via_host=this._configuration.contact_uri.host:this._configuration.contact_uri=new w("sip",T.createRandomToken(8),this._configuration.via_host,null,{transport:"ws"}),this._contact={pub_gruu:null,temp_gruu:null,uri:this._configuration.contact_uri,toString:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.anonymous||null,n=e.outbound||null,r="<";return r+=t?this.temp_gruu||"sip:anonymous@anonymous.invalid;transport=ws":this.pub_gruu||this.uri.toString(),!n||(t?this.temp_gruu:this.pub_gruu)||(r+=";ob"),r+">"}};var r=["authorization_user","password","realm","ha1","authorization_jwt","display_name","register"];for(var i in this._configuration)Object.prototype.hasOwnProperty.call(this._configuration,i)&&(-1!==r.indexOf(i)?Object.defineProperty(this._configuration,i,{writable:!0,configurable:!1}):Object.defineProperty(this._configuration,i,{writable:!1,configurable:!1}));for(var o in A.debug("configuration parameters after validation:"),this._configuration)if(Object.prototype.hasOwnProperty.call(k.settings,o))switch(o){case"uri":case"registrar_server":A.debug("- ".concat(o,": ").concat(this._configuration[o]));break;case"password":case"ha1":case"authorization_jwt":A.debug("- ".concat(o,": NOT SHOWN"));break;default:A.debug("- ".concat(o,": ").concat(JSON.stringify(this._configuration[o])))}}}])&&i(t.prototype,n),r&&i(t,r),l}()},{"./Config":1,"./Constants":2,"./Exceptions":6,"./Logger":9,"./Message":10,"./Notifier":12,"./Options":13,"./Parser":14,"./RTCSession":15,"./Registrator":20,"./SIPMessage":22,"./Subscriber":24,"./Transactions":26,"./Transport":27,"./URI":29,"./Utils":30,"./sanityCheck":32,events:33}],29:[function(e,t,n){function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=e("./Constants"),s=e("./Utils"),u=e("./Grammar");t.exports=function(){function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw new TypeError('missing or invalid "host" parameter');for(var u in this._parameters={},this._headers={},this._scheme=t||a.SIP,this._user=n,this._host=r,this._port=i,o)Object.prototype.hasOwnProperty.call(o,u)&&this.setParam(u,o[u]);for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&this.setHeader(l,s[l])}var t,n,i;return t=e,i=[{key:"parse",value:function(e){return-1!==(e=u.parse(e,"SIP_URI"))?e:void 0}}],(n=[{key:"scheme",get:function(){return this._scheme},set:function(e){this._scheme=e.toLowerCase()}},{key:"user",get:function(){return this._user},set:function(e){this._user=e}},{key:"host",get:function(){return this._host},set:function(e){this._host=e.toLowerCase()}},{key:"port",get:function(){return this._port},set:function(e){this._port=0===e?e:parseInt(e,10)||null}},{key:"setParam",value:function(e,t){e&&(this._parameters[e.toLowerCase()]=null==t?null:t.toString())}},{key:"getParam",value:function(e){if(e)return this._parameters[e.toLowerCase()]}},{key:"hasParam",value:function(e){if(e)return!!this._parameters.hasOwnProperty(e.toLowerCase())}},{key:"deleteParam",value:function(e){if(e=e.toLowerCase(),this._parameters.hasOwnProperty(e)){var t=this._parameters[e];return delete this._parameters[e],t}}},{key:"clearParams",value:function(){this._parameters={}}},{key:"setHeader",value:function(e,t){this._headers[s.headerize(e)]=Array.isArray(t)?t:[t]}},{key:"getHeader",value:function(e){if(e)return this._headers[s.headerize(e)]}},{key:"hasHeader",value:function(e){if(e)return!!this._headers.hasOwnProperty(s.headerize(e))}},{key:"deleteHeader",value:function(e){if(e=s.headerize(e),this._headers.hasOwnProperty(e)){var t=this._headers[e];return delete this._headers[e],t}}},{key:"clearHeaders",value:function(){this._headers={}}},{key:"clone",value:function(){return new e(this._scheme,this._user,this._host,this._port,JSON.parse(JSON.stringify(this._parameters)),JSON.parse(JSON.stringify(this._headers)))}},{key:"toString",value:function(){var e=[],t="".concat(this._scheme,":");for(var n in this._user&&(t+="".concat(s.escapeUser(this._user),"@")),t+=this._host,(this._port||0===this._port)&&(t+=":".concat(this._port)),this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,n)&&(t+=";".concat(n),null!==this._parameters[n]&&(t+="=".concat(this._parameters[n])));for(var i in this._headers)if(Object.prototype.hasOwnProperty.call(this._headers,i)){var o,a=r(this._headers[i]);try{for(a.s();!(o=a.n()).done;){var u=o.value;e.push("".concat(i,"=").concat(u))}}catch(e){a.e(e)}finally{a.f()}}return e.length>0&&(t+="?".concat(e.join("&"))),t}},{key:"toAor",value:function(e){var t="".concat(this._scheme,":");return this._user&&(t+="".concat(s.escapeUser(this._user),"@")),t+=this._host,e&&(this._port||0===this._port)&&(t+=":".concat(this._port)),t}}])&&o(t.prototype,n),i&&o(t,i),e}()},{"./Constants":2,"./Grammar":7,"./Utils":30}],30:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==u(Symbol.iterator)?function(e){return u(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":u(e)})(e)}function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=e("./Constants"),s=e("./URI"),l=e("./Grammar");n.str_utf8_length=function(e){return unescape(encodeURIComponent(e)).length};var c=n.isFunction=function(e){return void 0!==e&&"[object Function]"===Object.prototype.toString.call(e)};n.isString=function(e){return void 0!==e&&"[object String]"===Object.prototype.toString.call(e)},n.isDecimal=function(e){return!isNaN(e)&&parseFloat(e)===parseInt(e,10)},n.isEmpty=function(e){return null===e||""===e||void 0===e||Array.isArray(e)&&0===e.length||"number"==typeof e&&isNaN(e)},n.hasMethods=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];if(c(e[a]))return!1}return!0};var d=n.createRandomToken=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32,r="";for(t=0;t<e;t++)r+=(Math.random()*n|0).toString(n);return r};n.newTag=function(){return d(10)},n.newUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},n.hostType=function(e){if(e)return-1!==(e=l.parse(e,"host"))?e.host_type:void 0};var h=n.escapeUser=function(e){return encodeURIComponent(decodeURIComponent(e)).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")};n.normalizeTarget=function(e,t){if(e){if(e instanceof s)return e;if("string"==typeof e){var n,r,i,o=e.split("@");switch(o.length){case 1:if(!t)return;n=e,r=t;break;case 2:n=o[0],r=o[1];break;default:n=o.slice(0,o.length-1).join("@"),r=o[o.length-1]}return n=n.replace(/^(sips?|tel):/i,""),/^[-.()]*\+?[0-9\-.()]+$/.test(n)&&(n=n.replace(/[-.()]/g,"")),e="".concat(a.SIP,":").concat(h(n),"@").concat(r),(i=s.parse(e))?i:void 0}}},n.headerize=function(e){var t,n={"Call-Id":"Call-ID",Cseq:"CSeq","Www-Authenticate":"WWW-Authenticate"},r=e.toLowerCase().replace(/_/g,"-").split("-"),i="",o=r.length;for(t=0;t<o;t++)0!==t&&(i+="-"),i+=r[t].charAt(0).toUpperCase()+r[t].substring(1);return n[i]&&(i=n[i]),i},n.sipErrorCause=function(e){for(var t in a.SIP_ERROR_CAUSES)if(-1!==a.SIP_ERROR_CAUSES[t].indexOf(e))return a.causes[t];return a.causes.SIP_FAILURE_CODE},n.getRandomTestNetIP=function(){return"192.0.2.".concat((1,254,Math.floor(254*Math.random()+1)))},n.calculateMD5=function(e){function t(e,t){return e<<t|e>>>32-t}function n(e,t){var n=2147483648&e,r=2147483648&t,i=1073741824&e,o=1073741824&t,a=(1073741823&e)+(1073741823&t);return i&o?2147483648^a^n^r:i|o?1073741824&a?3221225472^a^n^r:1073741824^a^n^r:a^n^r}function r(e,r,i,o,a,s,u){return e=n(e,n(n(function(e,t,n){return e&t|~e&n}(r,i,o),a),u)),n(t(e,s),r)}function i(e,r,i,o,a,s,u){return e=n(e,n(n(function(e,t,n){return e&n|t&~n}(r,i,o),a),u)),n(t(e,s),r)}function o(e,r,i,o,a,s,u){return e=n(e,n(n(function(e,t,n){return e^t^n}(r,i,o),a),u)),n(t(e,s),r)}function a(e,r,i,o,a,s,u){return e=n(e,n(n(function(e,t,n){return t^(e|~n)}(r,i,o),a),u)),n(t(e,s),r)}function s(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0".concat((e>>>8*t&255).toString(16))).substr(r.length-2,2);return n}var u,l,c,d,h,f,m,p,_,g;for(u=function(e){for(var t,n=e.length,r=n+8,i=16*((r-r%64)/64+1),o=new Array(i-1),a=0,s=0;s<n;)a=s%4*8,o[t=(s-s%4)/4]=o[t]|e.charCodeAt(s)<<a,s++;return a=s%4*8,o[t=(s-s%4)/4]=o[t]|128<<a,o[i-2]=n<<3,o[i-1]=n>>>29,o}(e=function(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}(e)),m=1732584193,p=4023233417,_=2562383102,g=271733878,l=0;l<u.length;l+=16)c=m,d=p,h=_,f=g,m=r(m,p,_,g,u[l+0],7,3614090360),g=r(g,m,p,_,u[l+1],12,3905402710),_=r(_,g,m,p,u[l+2],17,606105819),p=r(p,_,g,m,u[l+3],22,3250441966),m=r(m,p,_,g,u[l+4],7,4118548399),g=r(g,m,p,_,u[l+5],12,1200080426),_=r(_,g,m,p,u[l+6],17,2821735955),p=r(p,_,g,m,u[l+7],22,4249261313),m=r(m,p,_,g,u[l+8],7,1770035416),g=r(g,m,p,_,u[l+9],12,2336552879),_=r(_,g,m,p,u[l+10],17,4294925233),p=r(p,_,g,m,u[l+11],22,2304563134),m=r(m,p,_,g,u[l+12],7,1804603682),g=r(g,m,p,_,u[l+13],12,4254626195),_=r(_,g,m,p,u[l+14],17,2792965006),m=i(m,p=r(p,_,g,m,u[l+15],22,1236535329),_,g,u[l+1],5,4129170786),g=i(g,m,p,_,u[l+6],9,3225465664),_=i(_,g,m,p,u[l+11],14,643717713),p=i(p,_,g,m,u[l+0],20,3921069994),m=i(m,p,_,g,u[l+5],5,3593408605),g=i(g,m,p,_,u[l+10],9,38016083),_=i(_,g,m,p,u[l+15],14,3634488961),p=i(p,_,g,m,u[l+4],20,3889429448),m=i(m,p,_,g,u[l+9],5,568446438),g=i(g,m,p,_,u[l+14],9,3275163606),_=i(_,g,m,p,u[l+3],14,4107603335),p=i(p,_,g,m,u[l+8],20,1163531501),m=i(m,p,_,g,u[l+13],5,2850285829),g=i(g,m,p,_,u[l+2],9,4243563512),_=i(_,g,m,p,u[l+7],14,1735328473),m=o(m,p=i(p,_,g,m,u[l+12],20,2368359562),_,g,u[l+5],4,4294588738),g=o(g,m,p,_,u[l+8],11,2272392833),_=o(_,g,m,p,u[l+11],16,1839030562),p=o(p,_,g,m,u[l+14],23,4259657740),m=o(m,p,_,g,u[l+1],4,2763975236),g=o(g,m,p,_,u[l+4],11,1272893353),_=o(_,g,m,p,u[l+7],16,4139469664),p=o(p,_,g,m,u[l+10],23,3200236656),m=o(m,p,_,g,u[l+13],4,681279174),g=o(g,m,p,_,u[l+0],11,3936430074),_=o(_,g,m,p,u[l+3],16,3572445317),p=o(p,_,g,m,u[l+6],23,76029189),m=o(m,p,_,g,u[l+9],4,3654602809),g=o(g,m,p,_,u[l+12],11,3873151461),_=o(_,g,m,p,u[l+15],16,530742520),m=a(m,p=o(p,_,g,m,u[l+2],23,3299628645),_,g,u[l+0],6,4096336452),g=a(g,m,p,_,u[l+7],10,1126891415),_=a(_,g,m,p,u[l+14],15,2878612391),p=a(p,_,g,m,u[l+5],21,4237533241),m=a(m,p,_,g,u[l+12],6,1700485571),g=a(g,m,p,_,u[l+3],10,2399980690),_=a(_,g,m,p,u[l+10],15,4293915773),p=a(p,_,g,m,u[l+1],21,2240044497),m=a(m,p,_,g,u[l+8],6,1873313359),g=a(g,m,p,_,u[l+15],10,4264355552),_=a(_,g,m,p,u[l+6],15,2734768916),p=a(p,_,g,m,u[l+13],21,1309151649),m=a(m,p,_,g,u[l+4],6,4149444226),g=a(g,m,p,_,u[l+11],10,3174756917),_=a(_,g,m,p,u[l+2],15,718787259),p=a(p,_,g,m,u[l+9],21,3951481745),m=n(m,c),p=n(p,d),_=n(_,h),g=n(g,f);return(s(m)+s(p)+s(_)+s(g)).toLowerCase()},n.closeMediaStream=function(e){if(e)try{if(e.getTracks){var t,n=i(e.getTracks());try{for(n.s();!(t=n.n()).done;)t.value.stop()}catch(e){n.e(e)}finally{n.f()}}else{var o,a=i(e.getAudioTracks());try{for(a.s();!(o=a.n()).done;)o.value.stop()}catch(e){a.e(e)}finally{a.f()}var s,u=i(e.getVideoTracks());try{for(u.s();!(s=u.n()).done;)s.value.stop()}catch(e){u.e(e)}finally{u.f()}}}catch(t){"function"!=typeof e.stop&&"object"!==r(e.stop)||e.stop()}},n.cloneArray=function(e){return e&&e.slice()||[]},n.cloneObject=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e&&Object.assign({},e)||t}},{"./Constants":2,"./Grammar":7,"./URI":29}],31:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("./Logger"),o=e("./Grammar"),a=new i("WebSocketInterface");t.exports=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a.debug('new() [url:"%s"]',t),this._url=t,this._sip_uri=null,this._via_transport=null,this._ws=null;var n=o.parse(t,"absoluteURI");if(-1===n)throw a.warn("invalid WebSocket URI: ".concat(t)),new TypeError("Invalid argument: ".concat(t));if("wss"!==n.scheme&&"ws"!==n.scheme)throw a.warn("invalid WebSocket URI scheme: ".concat(n.scheme)),new TypeError("Invalid argument: ".concat(t));this._sip_uri="sip:".concat(n.host).concat(n.port?":".concat(n.port):"",";transport=ws"),this._via_transport=n.scheme.toUpperCase()}var t,n;return t=e,(n=[{key:"via_transport",get:function(){return this._via_transport},set:function(e){this._via_transport=e.toUpperCase()}},{key:"sip_uri",get:function(){return this._sip_uri}},{key:"url",get:function(){return this._url}},{key:"connect",value:function(){if(a.debug("connect()"),this.isConnected())a.debug("WebSocket ".concat(this._url," is already connected"));else if(this.isConnecting())a.debug("WebSocket ".concat(this._url," is connecting"));else{this._ws&&this.disconnect(),a.debug("connecting to WebSocket ".concat(this._url));try{this._ws=new WebSocket(this._url,"sip"),this._ws.binaryType="arraybuffer",this._ws.onopen=this._onOpen.bind(this),this._ws.onclose=this._onClose.bind(this),this._ws.onmessage=this._onMessage.bind(this),this._ws.onerror=this._onError.bind(this)}catch(e){this._onError(e)}}}},{key:"disconnect",value:function(){a.debug("disconnect()"),this._ws&&(this._ws.onopen=function(){},this._ws.onclose=function(){},this._ws.onmessage=function(){},this._ws.onerror=function(){},this._ws.close(),this._ws=null)}},{key:"send",value:function(e){return a.debug("send()"),this.isConnected()?(this._ws.send(e),!0):(a.warn("unable to send message, WebSocket is not open"),!1)}},{key:"isConnected",value:function(){return this._ws&&this._ws.readyState===this._ws.OPEN}},{key:"isConnecting",value:function(){return this._ws&&this._ws.readyState===this._ws.CONNECTING}},{key:"_onOpen",value:function(){a.debug("WebSocket ".concat(this._url," connected")),this.onconnect()}},{key:"_onClose",value:function(e){var t=e.wasClean,n=e.code,r=e.reason;a.debug("WebSocket ".concat(this._url," closed")),!1===t&&a.debug("WebSocket abrupt disconnection"),this.ondisconnect(!t,n,r)}},{key:"_onMessage",value:function(e){var t=e.data;a.debug("received WebSocket message"),this.ondata(t)}},{key:"_onError",value:function(e){a.warn("WebSocket ".concat(this._url," error: "),e)}}])&&r(t.prototype,n),e}()},{"./Grammar":7,"./Logger":9}],32:[function(e,t,n){function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o,a,s,u=e("./Logger"),l=e("./Constants"),c=e("./SIPMessage"),d=e("./Utils"),h=new u("sanityCheck"),f=[function(){for(var e=0,t=["from","to","call_id","cseq","via"];e<t.length;e++){var n=t[e];if(!o.hasHeader(n))return h.debug("missing mandatory header field : ".concat(n,", dropping the response")),!1}}],m=[function(){if("sip"!==o.s("to").uri.scheme)return _(416),!1},function(){if(!o.to_tag&&o.call_id.substr(0,5)===a.configuration.jssip_id)return _(482),!1},function(){if(d.str_utf8_length(o.body)<o.getHeader("content-length"))return _(400),!1},function(){var e,t=o.from_tag,n=o.call_id,r=o.cseq;if(!o.to_tag)if(o.method===l.INVITE){if(a._transactions.ist[o.via_branch])return!1;for(var i in a._transactions.ist)if(Object.prototype.hasOwnProperty.call(a._transactions.ist,i)&&(e=a._transactions.ist[i]).request.from_tag===t&&e.request.call_id===n&&e.request.cseq===r)return _(482),!1}else{if(a._transactions.nist[o.via_branch])return!1;for(var s in a._transactions.nist)if(Object.prototype.hasOwnProperty.call(a._transactions.nist,s)&&(e=a._transactions.nist[s]).request.from_tag===t&&e.request.call_id===n&&e.request.cseq===r)return _(482),!1}}],p=[function(){if(o.getHeaders("via").length>1)return h.debug("more than one Via header field present in the response, dropping the response"),!1},function(){if(d.str_utf8_length(o.body)<o.getHeader("content-length"))return h.debug("message body length is lower than the value in Content-Length header field, dropping the response"),!1}];function _(e){var t,n,i=o.getHeaders("via"),a="SIP/2.0 ".concat(e," ").concat(l.REASON_PHRASE[e],"\r\n"),u=r(i);try{for(u.s();!(n=u.n()).done;){var c=n.value;a+="Via: ".concat(c,"\r\n")}}catch(e){u.e(e)}finally{u.f()}t=o.getHeader("To"),o.to_tag||(t+=";tag=".concat(d.newTag())),a+="To: ".concat(t,"\r\n"),a+="From: ".concat(o.getHeader("From"),"\r\n"),a+="Call-ID: ".concat(o.call_id,"\r\n"),a+="CSeq: ".concat(o.cseq," ").concat(o.method,"\r\n"),a+="\r\n",s.send(a)}t.exports=function(e,t,n){o=e,a=t,s=n;var i,u=r(f);try{for(u.s();!(i=u.n()).done;)if(!1===(0,i.value)())return!1}catch(e){u.e(e)}finally{u.f()}if(o instanceof c.IncomingRequest){var l,d=r(m);try{for(d.s();!(l=d.n()).done;)if(!1===(0,l.value)())return!1}catch(e){d.e(e)}finally{d.f()}}else if(o instanceof c.IncomingResponse){var h,_=r(p);try{for(_.s();!(h=_.n()).done;)if(!1===(0,h.value)())return!1}catch(e){_.e(e)}finally{_.f()}}return!0}},{"./Constants":2,"./Logger":9,"./SIPMessage":22,"./Utils":30}],33:[function(e,t,n){var r=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return n},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var s,l=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),s=0===c.x}catch(e){s=!1}function d(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function h(e,t,n,i){var o,a,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]):(a=e._events=r(null),e._eventsCount=0),s){if("function"==typeof s?s=a[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),!s.warned&&(o=d(e))&&o>0&&s.length>o){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,"object"==("undefined"==typeof console?"undefined":u(console))&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else s=a[t]=n,++e._eventsCount;return e}function f(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=o.call(f,r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(!r)return[];var i=r[t];return i?"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):g(i,i.length):[]}function _(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}s?Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');l=e}}):a.defaultMaxListeners=l,a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return d(this)},a.prototype.emit=function(e){var t,n,r,i,o,a,s="error"===e;if(a=this._events)s=s&&null==a.error;else if(!s)return!1;if(s){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(n=a[e]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=g(e,r),o=0;o<r;++o)i[o].call(n)}(n,l,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=g(e,i),a=0;a<i;++a)o[a].call(n,r)}(n,l,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=g(e,o),s=0;s<o;++s)a[s].call(n,r,i)}(n,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,s=g(e,a),u=0;u<a;++u)s[u].call(n,r,i,o)}(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=g(e,i),a=0;a<i;++a)o[a].apply(n,r)}(n,l,this,i)}return!0},a.prototype.addListener=function(e,t){return h(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return h(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,m(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,m(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,i,o,a,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=r(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,o),1===n.length&&(i[e]=n[0]),i.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.removeAllListeners=function(e){var t,n,o;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=r(null),this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=r(null):delete n[e]),this;if(0===arguments.length){var a,s=i(n);for(o=0;o<s.length;++o)"removeListener"!==(a=s[o])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=r(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)for(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):_.call(e,t)},a.prototype.listenerCount=_,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],34:[function(e,t,n){(function(r){(function(){n.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),e.splice(i,0,n)}},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug")}catch(e){}},n.load=function(){var e;try{e=n.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e},n.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},n.storage=function(){try{return localStorage}catch(e){}}(),n.destroy=function(){var e=!1;return function(){e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}}(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||function(){},t.exports=e("./common")(n),t.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this)}).call(this,e("_process"))},{"./common":35,_process:37}],35:[function(e,t,n){t.exports=function(t){function n(e){var t,i=null;function o(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(o.enabled){var a=o,s=Number(new Date),u=s-(t||s);a.diff=u,a.prev=t,a.curr=s,t=s,r[0]=n.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var l=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(function(e,t){if("%%"===e)return"%";l++;var i=n.formatters[t];if("function"==typeof i){var o=r[l];e=i.call(a,o),r.splice(l,1),l--}return e})),n.formatArgs.call(a,r),(a.log||n.log).apply(a,r)}}return o.namespace=e,o.useColors=n.useColors(),o.color=n.selectColor(e),o.extend=r,o.destroy=n.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:function(){return null===i?n.enabled(e):i},set:function(e){i=e}}),"function"==typeof n.init&&n.init(o),o}function r(e,t){var r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){var e=[].concat(o(n.names.map(i)),o(n.skips.map(i).map((function(e){return"-"+e})))).join(",");return n.enable(""),e},n.enable=function(e){var t;n.save(e),n.names=[],n.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(t=0;t<i;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){if("*"===e[e.length-1])return!0;var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e("ms"),n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((function(e){n[e]=t[e]})),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){for(var t=0,r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}},{ms:36}],36:[function(e,t,n){var r=1e3,i=60*r,o=60*i,a=24*o;function s(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}t.exports=function(e,t){t=t||{};var n=u(e);if("string"===n&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return n*a;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*i;case"seconds":case"second":case"secs":case"sec":case"s":return n*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);return t>=a?s(e,t,a,"day"):t>=o?s(e,t,o,"hour"):t>=i?s(e,t,i,"minute"):t>=r?s(e,t,r,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+"d":t>=o?Math.round(e/o)+"h":t>=i?Math.round(e/i)+"m":t>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],37:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,c=[],d=!1,h=-1;function f(){d&&l&&(d=!1,l.length?c=l.concat(c):h=-1,c.length&&m())}function m(){if(!d){var e=u(f);d=!0;for(var t=c.length;t;){for(l=c,c=[];++h<t;)l&&l[h].run();h=-1,t=c.length}l=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function _(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||d||u(m)},p.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=_,o.addListener=_,o.once=_,o.off=_,o.removeListener=_,o.removeAllListeners=_,o.emit=_,o.prependListener=_,o.prependOnceListener=_,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],38:[function(e,t,n){var r=t.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),(t+=null!=e["network-id"]?" network-id %d":"%v")+(null!=e["network-cost"]?" network-cost %d":"%v")}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",(t+=null!=e.rateNumerator?" rate=%s":"")+(null!=e.rateDenominator?"/%s":"")}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(r).forEach((function(e){r[e].forEach((function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}))},{}],39:[function(e,t,n){var r=e("./parser"),i=e("./writer");n.write=i,n.parse=r.parse,n.parseParams=r.parseParams,n.parseFmtpConfig=r.parseFmtpConfig,n.parsePayloads=r.parsePayloads,n.parseRemoteCandidates=r.parseRemoteCandidates,n.parseImageAttributes=r.parseImageAttributes,n.parseSimulcastStreamList=r.parseSimulcastStreamList},{"./parser":40,"./writer":41}],40:[function(e,t,n){var r=function(e){return String(Number(e))===e?Number(e):e},i=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},o=e("./grammar"),a=RegExp.prototype.test.bind(/^([a-z])=(.*)/);n.parse=function(e){var t={},n=[],r=t;return e.split(/(\r\n|\r|\n)/).filter(a).forEach((function(e){var t=e[0],a=e.slice(2);"m"===t&&(n.push({rtp:[],fmtp:[]}),r=n[n.length-1]);for(var s=0;s<(o[t]||[]).length;s+=1){var u=o[t][s];if(u.reg.test(a))return i(u,r,a)}})),t.media=n,t};var s=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length?e[n[0]]=r(n[1]):1===n.length&&t.length>1&&(e[n[0]]=void 0),e};n.parseParams=function(e){return e.split(/;\s?/).reduce(s,{})},n.parseFmtpConfig=n.parseParams,n.parsePayloads=function(e){return e.toString().split(" ").map(Number)},n.parseRemoteCandidates=function(e){for(var t=[],n=e.split(" ").map(r),i=0;i<n.length;i+=3)t.push({component:n[i],ip:n[i+1],port:n[i+2]});return t},n.parseImageAttributes=function(e){return e.split(" ").map((function(e){return e.substring(1,e.length-1).split(",").reduce(s,{})}))},n.parseSimulcastStreamList=function(e){return e.split(";").map((function(e){return e.split(",").map((function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}}))}))}},{"./grammar":38}],41:[function(e,t,n){var r=e("./grammar"),i=/%[sdv%]/g,o=function(e,t,n){var r=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var o=0;o<t.names.length;o+=1){var a=t.names[o];t.name?r.push(n[t.name][a]):r.push(n[t.names[o]])}else r.push(n[t.name]);return function(e){var t=1,n=arguments,r=n.length;return e.replace(i,(function(e){if(t>=r)return e;var i=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))}.apply(null,r)},a=["v","o","s","i","u","e","p","c","b","t","r","z","a"],s=["i","c","b","a"];t.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach((function(e){null==e.payloads&&(e.payloads="")}));var n=t.outerOrder||a,i=t.innerOrder||s,u=[];return n.forEach((function(t){r[t].forEach((function(n){n.name in e&&null!=e[n.name]?u.push(o(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){u.push(o(t,n,e))}))}))})),e.media.forEach((function(e){u.push(o("m",r.m[0],e)),i.forEach((function(t){r[t].forEach((function(n){n.name in e&&null!=e[n.name]?u.push(o(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){u.push(o(t,n,e))}))}))}))})),u.join("\r\n")+"\r\n"}},{"./grammar":38}],42:[function(e,t,n){t.exports={name:"jssip",title:"JsSIP",description:"the Javascript SIP library",version:"3.9.0",homepage:"https://jssip.net",contributors:["José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)","Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)"],types:"lib/JsSIP.d.ts",main:"lib-es5/JsSIP.js",keywords:["sip","websocket","webrtc","node","browser","library"],license:"MIT",repository:{type:"git",url:"https://github.com/versatica/JsSIP.git"},bugs:{url:"https://github.com/versatica/JsSIP/issues"},dependencies:{"@types/debug":"^4.1.5","@types/node":"^14.14.34",debug:"^4.3.1",events:"^3.3.0","sdp-transform":"^2.14.1"},devDependencies:{"@babel/core":"^7.13.10","@babel/preset-env":"^7.13.10","ansi-colors":"^3.2.4",browserify:"^16.5.1",eslint:"^5.16.0","fancy-log":"^1.3.3",gulp:"^4.0.2","gulp-babel":"^8.0.0","gulp-eslint":"^5.0.0","gulp-expect-file":"^1.0.2","gulp-header":"^2.0.9","gulp-nodeunit-runner":"^0.2.2","gulp-plumber":"^1.2.1","gulp-rename":"^1.4.0","gulp-uglify-es":"^1.0.4",pegjs:"^0.7.0","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0"},scripts:{lint:"gulp lint",test:"gulp test",prepublishOnly:"gulp babel"}}},{}]},{},[8])(8)}))}},{key:"version",value:function(){return"1.18.0"}},{key:"getBrowserName",value:function(){return this.browserName}},{key:"getBrowser",value:function(){return this.browser}},{key:"getBrowserVersion",value:function(){return this.browserVersion}},{key:"getOS",value:function(){return this.os}},{key:"getWR",value:function(){return this.webrtcapi}},{key:"checkAvailableDevices",value:function(){return this.getWR().checkAvailableDevices()}},{key:"getServerAddress",value:function(){if(null===this.wsSocket)return null;var e=this.wsSocket.url;return e.endsWith("/")&&(e=e.slice(0,-1)),e}},{key:"setOAuthToken",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.oauthToken=e,this.oauthTokenUseInInvite=t,this.setRegisterExtraHeaders(this.registerExtraHeaders)}},{key:"setUserAgent",value:function(e){this.u17=e}},{key:"setConstraints",value:function(e,n,r){var i=this.browser,o=this.browser+"|"+this.os;if(null===e||e===i||e===o){if(t.ac_log("AC: setConstraints ".concat(e," ").concat(n," ").concat(JSON.stringify(r))),"audio"!==n&&"video"!==n)throw new TypeError("Wrong type: ".concat(n));this.constraints[n]=r}else t.ac_log("AC: setConstraints ".concat(e," - ignored, no current browser"))}},{key:"setConstraint",value:function(e,n,r){if(null!=r?t.ac_log("AC: setConstraint ".concat(e," ").concat(n,"=").concat(JSON.stringify(r))):t.ac_log("AC: setConstraint remove ".concat(e," ").concat(n)),"audio"!==e&&"video"!==e)throw new TypeError("Wrong type: ".concat(e));null!=r?(!0===this.constraints[e]&&(this.constraints[e]={}),this.constraints[e][n]=r):!0!==this.constraints[e]&&!1!==this.constraints[e]&&(delete this.constraints[e][n],0===Object.keys(this.constraints[e]).length&&(this.constraints[e]=!0))}},{key:"setBrowsersConstraints",value:function(e){var t=this.browser,n=this.browser+"|"+this.os;for(var r in e)if(r===t||r===n){var i=e[r];void 0!==i.audio&&this.setConstraints(r,"audio",i.audio),void 0!==i.video&&this.setConstraints(r,"video",i.video)}}},{key:"setCodecFilter",value:function(e){e&&(t.ac_log("AC: setCodecFilter ".concat(JSON.stringify(e))),this.codecFilter=this._cf_unpack(e))}},{key:"setServerConfig",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.serverConfig={addresses:e,domain:n,iceServers:this._convertIceList(r)},t.ac_log("AC: setServerConfig() ".concat(JSON.stringify(this.serverConfig)))}},{key:"setReconnectIntervals",value:function(e,n){t.ac_log("AC: setReconnectIntervals min=".concat(e," max=").concat(n)),this.reconnectMin=e,this.reconnectMax=n}},{key:"setAccount",value:function(e,t,n,r){null!=t&&0!==t.length||(t=void 0),null!=r&&0!==r.length||(r=e);var i=this.account;i.user=e,i.displayName=t,i.password=n,i.authUser=r}},{key:"setRegisterExpires",value:function(e){t.ac_log("AC: setRegisterExpires=".concat(e)),this.account.registerExpires=e}},{key:"setUseSessionTimer",value:function(e){t.ac_log("AC: setUseSessionTimer=".concat(e)),this.account.useSessionTimer=e}},{key:"setDtmfOptions",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t.ac_log("AC: setDtmfOptions useWebRTC=".concat(e," duration=").concat(n," interToneGap=").concat(r)),this.dtmfUseWebRTC=e,null!==n&&(this.dtmfDuration=n),null!==r&&(this.dtmfInterToneGap=r)}},{key:"setEnableAddVideo",value:function(e){t.ac_log("AC: setEnableAddVideo=".concat(e)),this.enableAddVideo=e}},{key:"getEnableAddVideo",value:function(){return this.enableAddVideo}},{key:"getAccount",value:function(){return this.account}},{key:"setListeners",value:function(e){t.ac_log("AC: setListeners()");for(var n=0,r=["loginStateChanged","outgoingCallProgress","callTerminated","callConfirmed","callShowStreams","incomingCall","callHoldStateChanged"];n<r.length;n++){var i=r[n];if(!(i in e))throw new Error("".concat(i," listener is missed"))}this.listeners=e}},{key:"setAcLogger",value:function(e){t.ac_log=e}},{key:"setJsSipLogger",value:function(e){t.js_log=e}},{key:"isInitialized",value:function(){return this._isInitialized}},{key:"setModes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.ac_log("AC: setModes() ".concat(JSON.stringify(e))),Object.assign(this.modes,e),this._normalizeModes()}},{key:"_normalizeModes",value:function(){function e(e,t){return"number"==typeof e&&e<=t?void 0:e}var t=this.modes;t.sbc_ha_pairs_mode=e(t.sbc_ha_pairs_mode,0),t.chrome_rtp_timeout_fix=e(t.chrome_rtp_timeout_fix,0)}},{key:"init",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(t.ac_log("AC: init() autoLogin=".concat(e)),!this._isInitialized){this._isInitialized=!0,JsSIP.debug.enable("JsSIP:*"),JsSIP.debug.formatArgs=function(){t.js_log&&(this.log=t.js_log)};var n,r=[],o=i(this.serverConfig.addresses);try{for(o.s();!(n=o.n()).done;){var a=n.value;a instanceof Array?r.push({socket:new JsSIP.WebSocketInterface(a[0]),weight:a[1]}):r.push(new JsSIP.WebSocketInterface(a))}}catch(e){o.e(e)}finally{o.f()}var s={sockets:r,uri:"sip:"+this.account.user+"@"+this.serverConfig.domain,contact_uri:"sip:"+this.account.user+"@"+this._randomToken(12)+".invalid;transport=ws",authorization_user:this.account.authUser,password:this.account.password,register:e,session_timers:this.account.useSessionTimer,register_expires:this.account.registerExpires,user_agent:this.u17,connection_recovery_min_interval:this.reconnectMin,connection_recovery_max_interval:this.reconnectMax};this.account.displayName&&this.account.displayName.length>0&&(s.display_name=this.account.displayName),this.jssipUA=new JsSIP.UA(s),this.setRegisterExtraHeaders(this.registerExtraHeaders),this._setUACallbacks(),t.ac_log("AC: applied SDK modes: ".concat(JSON.stringify(this.modes,(function(e,t){return void 0===t?"<undefined>":t})))),this.jssipUA.modes=this.modes;var u,l=i(this.credentials);try{for(l.s();!(u=l.n()).done;){var c=u.value;this.jssipUA.addCredential(c)}}catch(e){l.e(e)}finally{l.f()}this.credentials=[],this.jssipUA.start()}}},{key:"deinit",value:function(){this._isInitialized=!1,this.jssipUA&&this.jssipUA.stop()}},{key:"setRegisterExtraHeaders",value:function(e){if(this.registerExtraHeaders=e,this.jssipUA){var t=null!==e?e:[];null!==this.oauthToken&&(t=t.slice()).push("Authorization: Bearer ".concat(this.oauthToken)),this.jssipUA.registrator().setExtraHeaders(t)}}},{key:"getRegisterExtraHeaders",value:function(){return this.registerExtraHeaders}},{key:"login",value:function(){t.ac_log("AC: login()"),this.jssipUA.register()}},{key:"logout",value:function(){t.ac_log("AC: logout()"),this.jssipUA.isRegistered()&&this.jssipUA.unregister()}},{key:"switchSBC",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t.ac_log("AC: switchSBC()"),this.jssipUA.switchSBC(e)}},{key:"getNumberOfSBC",value:function(){return this.jssipUA.getNumberOfSBC()}},{key:"setWebSocketKeepAlive",value:function(e){var n,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t.ac_log("AC: setWebSocketKeepAlive pingInterval=".concat(e," pongTimeout=").concat(r)+" timerThrottlingBestEffort=".concat(JSON.stringify(i)," pongReport=").concat(o," pongDist=").concat(a)),"number"!=typeof e||"boolean"!=typeof r)throw new TypeError("setWebSocketKeepAlive: wrong type of first or second argument");this.wsPingMs=this.wsOrigPingMs=1e3*e,this.wsPongTimeout=r,this.wsPongReport=o,this.wsPongDist=a,this.wsPongReportCounter=0,this.wsIsThrottling=!1;var s=(n=!0===i?{log:0,chrome:{interval:1,visibility:!0,call:!0,log:1}}:!1===i?{log:0}:i)[this.browser];this.wsThrottlingPingMs=s&&void 0!==s.interval?1e3*s.interval:0,this.wsVisibility=!(!s||void 0===s.visibility)&&s.visibility,this.wsCall=!(!s||void 0===s.call)&&s.call,this.wsLog=s&&void 0!==s.log?s.log:n.log,this.wsPongDelays=new Array(this.wsPongReport>0?this.wsPongReport:50),this.wsPongDelaysIx=0,0!==this.wsOrigPingMs&&0!==this.wsThrottlingPingMs&&this.wsVisibility&&document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this))}},{key:"_pingLog",value:function(){return" (ping=".concat(this.wsPingMs/1e3," sec)")}},{key:"_visibilityLog",value:function(e){var n="AC: keep-alive: Page is "+(document.hidden?"hidden":"visible");document.hidden&&(this.wsCall&&(n+=", "+(0===this.activeCalls?"no active call":"active call")),n+=" and "+(this.wsIsThrottling?"was":"was not")+" trottling"),e&&(n+=this._pingLog()),t.ac_log(n)}},{key:"_activeCallsLog",value:function(e){var n="AC: keep-alive: ".concat(0===this.activeCalls?"Call ended":"Call started");0===this.activeCalls&&(this.wsVisibility&&(n+=", page is "+(document.hidden?"hidden":"visible")),n+=" and "+(this.wsIsThrottling?"was":"was not")+" trottling"),e&&(n+=this._pingLog()),t.ac_log(n)}},{key:"_onActiveCallsChange",value:function(e){if(this.activeCalls+=e,this.wsCall&&0!==this.wsPingMs&&0!==this.wsThrottlingPingMs)if(this.activeCalls<0&&t.ac_log("Warning: keep-alive: activeCalls < 0"),0===this.activeCalls){if((!this.wsVisibility||document.hidden)&&this.wsIsThrottling&&this.wsPingMs<this.wsThrottlingPingMs)return this.wsPingMs=this.wsThrottlingPingMs,void this._activeCallsLog(!0);this.wsLog>=2&&this._activeCallsLog(!1)}else if(1===this.activeCalls&&e>0){if(this.wsPingMs>this.wsOrigPingMs)return this.wsPingMs=this.wsOrigPingMs,void this._activeCallsLog(!0);this.wsLog>=2&&this._activeCallsLog(!1)}}},{key:"_onVisibilityChange",value:function(){if(this.wsVisibility&&0!==this.wsPingMs&&0!==this.wsThrottlingPingMs)if(document.hidden){if(this.wsCall&&0===this.activeCalls&&this.wsIsThrottling&&this.wsPingMs<this.wsThrottlingPingMs)return this.wsPingMs=this.wsThrottlingPingMs,void this._visibilityLog(!0);this.wsLog>=2&&this._visibilityLog(!1)}else{if(this.wsPingMs>this.wsOrigPingMs)return this.wsPingMs=this.wsOrigPingMs,void this._visibilityLog(!0);this.wsLog>=2&&this._visibilityLog(!1)}}},{key:"_onMessageHook",value:function(e){"\r\n"===e.data?this._onPong():this.wsOnMessage(e)}},{key:"_onPong",value:function(){var e;this.wsPongReceived=!0,null===this.wsPongSupported&&(t.ac_log("AC: keep-alive: Server supports CRLF pong"),this.wsPongSupported=!0),null!==this.wsPongTimeoutTime?(e=Date.now()-this.wsPongTimeoutTime,this.wsPongTimeoutTime=null,t.ac_log("AC: keep-alive: Received pong that exceeded the timeout, delay=".concat(e))):e=Date.now()-this.wsPingTime;var n=this.wsPingMs-e;n<0&&(t.ac_log("AC: nextPing calculated to ".concat(n,"ms, so resetting to 0ms.")),n=0),null!==this.wsPingJob&&clearTimeout(this.wsPingJob),this.wsPingJob=setTimeout(this._sendPing.bind(this),n),this.wsPongDelays[this.wsPongDelaysIx]=e,this.wsPongDelaysIx=this.wsPongDelaysIx+1,this.wsPongDelaysIx===this.wsPongDelays.length&&(this.wsPongDelaysIx=0),this.wsPongReport>0&&this.wsPongReportCounter++}},{key:"_onPongTimeout",value:function(e){if(t.ac_log("AC: keep-alive: Pong timeout (not received within ".concat(e/1e3," seconds)")),t.ac_log("AC: keep-alive: Previous pongs statistics: ".concat(this._createPongReport(!0))),this.wsPongTimeout){t.ac_log("AC: keep-alive: Close websocket connection"),this._stopWsKeepAlive();try{this.wsSocket.close()}catch(e){t.ac_log("AC: Close websocket error",e)}}else t.ac_log("AC: keep-alive: Warning: websocket is not closed, because pongTimeout=false")}},{key:"_sendPing",value:function(){try{var e=Date.now();if(null!==this.wsPingTime){var n=e-this.wsNextPingTime;this.wsLog>=3&&t.ac_log("AC: keep-alive: timer deviation (ms): ".concat(n));var r=this.wsPingMs;if(Math.abs(n)>=1e4&&((this.wsLog>0||!this.wsIsThrottling)&&(t.ac_log("AC: keep-alive detected timer throttling: ".concat(Math.round(n/1e3)," seconds ").concat(n>0?"later":"earlier")),0===this.wsLog&&t.ac_log("AC: keep-alive: The next timer throttling will not be shown in the logs, because log==0")),this.wsIsThrottling=!0,this.wsPingMs<this.wsThrottlingPingMs&&(this.wsPingMs=this.wsThrottlingPingMs,t.ac_log("AC: keep-alive: ping interval increased ".concat(this._pingLog())))),null!==this.wsPongSupported||this.wsPongReceived||(t.ac_log("AC: keep-alive: Server does not support CRLF pong."),this.wsPongSupported=!1),this.wsPongSupported&&!this.wsPongReceived&&null===this.wsPongTimeoutTime){if(this._onPongTimeout(r),this.wsPongTimeout)return;this.wsPongTimeoutTime=this.wsPingTime}}this.wsPingTime=e,this.wsNextPingTime=this.wsPingTime+this.wsPingMs,this.wsPongReceived=!1,this.wsSocket.readyState===WebSocket.OPEN?this.wsSocket.send("\r\n\r\n"):t.ac_log("AC: keep-alive: Warning: Cannot send Ping, websocket state=".concat(this.wsSocket.readyState)),this.wsPingJob=setTimeout(this._sendPing.bind(this),this.wsPingMs),this.wsPongReport>0&&this.wsPongReportCounter>=this.wsPongReport&&(this.wsPongReportCounter=0,t.ac_log("AC: keep-alive: Pong statistics: ".concat(this._createPongReport(this.wsPongDist))))}catch(e){t.ac_log("AC: keep-alive: send ping error",e)}}},{key:"_startWsKeepAlive",value:function(e){this.wsSocket=e,0!==this.wsPingMs&&(this.wsOnMessage=e.onmessage,e.onmessage=this._onMessageHook.bind(this),this._stopWsKeepAlive(),this.wsPingTime=null,this.wsPingJob=setTimeout(this._sendPing.bind(this),this.wsPingMs))}},{key:"_stopWsKeepAlive",value:function(){null!==this.wsPingJob&&(clearTimeout(this.wsPingJob),this.wsPingJob=null)}},{key:"_createPongReport",value:function(e){var t,n="",r=!1,i=1e6,o=0;e&&(t=new Array(this.wsPingMs/1e3*4).fill(0));for(var a=0,s=0;s<this.wsPongDelays.length;s++){var u=this.wsPongDelays[s];if(void 0!==u&&(a++,u<i&&(i=u),u>o&&(o=u),e)){var l=Math.floor(u/250);l>=t.length&&(l=t.length-1,r=!0),t[l]++}}if(e){n="\r\npongs distribution (1/4 second step): ";for(var c=0;c<t.length;c++)n+=t[c].toString(),c!==t.length-1&&(n+=(c+1)%4==0?",":" ");r&&(n+=" (+)")}return"pongs=".concat(a," delay=").concat(i,"..").concat(o," ms").concat(n)}},{key:"_setUACallbacks",value:function(){var e=this;this.jssipUA.on("connected",(function(n){t.ac_log('AC>>: loginStateChanged: isLogin=false "connected"'),e._startWsKeepAlive(n.socket.socket._ws),e.listeners.loginStateChanged(!1,"connected",null)})),this.jssipUA.on("disconnected",(function(){e._stopWsKeepAlive(),t.ac_log('AC>>: loginStateChanged: isLogin=false "disconnected"'),e.listeners.loginStateChanged(!1,"disconnected",null)})),this.jssipUA.on("registered",(function(n){t.ac_log('AC>>: loginStateChanged: isLogin=true "login"'),e.listeners.loginStateChanged(!0,"login",n.response)})),this.jssipUA.on("unregistered",(function(n){t.ac_log('AC>>: loginStateChanged: isLogin=false "logout"'),e.listeners.loginStateChanged(!1,"logout",n.response)})),this.jssipUA.on("registrationFailed",(function(n){var r=n.response?n.response.status_code:0;if(r>=300&&r<400){var i=n.response.parseHeader("contact");if(i){var o=i.uri,a="wss://"+o.host;if(o.port&&443!==o.port&&(a+=":"+o.port.toString()),t.ac_log('AC: registerRedirect("'.concat(a,'")')),e.jssipUA.registerRedirect(a))return}else t.ac_log('AC: 3xx response without "Contact" is ignored')}else if(r>=500&&r<600&&t.instance.modes.sbc_switch_register5xx_mode&&t.instance.switchSBC(!1))return;t.ac_log('AC>>: loginStateChanged: isLogin=false "login failed"'),e.listeners.loginStateChanged(!1,"login failed",n.response?n.response:null)})),this.listeners.incomingMessage&&this.jssipUA.on("newMessage",(function(n){"remote"===n.originator&&(t.ac_log("AC>>: incomingMessage",n),e.listeners.incomingMessage(null,t.instance._get_from(n.request),t.instance._get_content_type(n.request),n.request.body,n.request))})),this.listeners.incomingNotify&&this.jssipUA.on("sipEvent",(function(n){t.ac_log("AC>>: incoming out of dialog NOTIFY",n),e.listeners.incomingNotify(null,n.event?n.event.event:null,t.instance._get_from(n.request),t.instance._get_content_type(n.request),n.request.body,n.request)||n.request.reply(481)})),this.listeners.incomingSubscribe&&this.jssipUA.on("newSubscribe",(function(n){var r=n.request,i=r.parseHeader("event"),o=r.getHeaders("accept");t.ac_log("AC>>: incomingSubscribe",r,i.event,o);var a=e.listeners.incomingSubscribe(r,i.event,o);a>0&&r.reply(a)})),this.jssipUA.on("newRTCSession",(function(e){t.ac_log("AC: event ".concat("remote"===e.originator?"incoming":"outgoing",' "newRTCSession"'),e);var n,i=new f(e.session);if(i.js_session.on("sipEvent",(function(e){if(t.instance.listeners.incomingNotify){var n=this.data.ac_session;t.ac_log("AC>>: incoming NOTIFY",n,e),e.taken=t.instance.listeners.incomingNotify(n,e.event?e.event.event:null,t.instance._get_from(e.request),t.instance._get_content_type(e.request),e.request.body,e.request)}})),i.js_session.on("newInfo",(function(e){if(t.instance.listeners.incomingInfo&&"local"!==e.originator){var n=this.data.ac_session;t.ac_log("AC>>: incoming INFO",n,e),t.instance.listeners.incomingInfo(n,t.instance._get_from(e.request),t.instance._get_content_type(e.request),e.request.body,e.request)}})),i.js_session.on("replaces",(function(e){t.instance.replacedCall=this.data.ac_session,t.ac_log("AC>>: incoming INVITE with Replaces. This call will be replaced:",this.data.ac_session),e.accept()})),i.js_session.on("sdp",(function(e){t.instance._sdp_checking(this,e)})),i.js_session.on("connecting",(function(e){t.ac_log("AC>>: connecting");var n=t.instance.codecFilter;n&&(t.instance._cf_filter("audio",this.data.ac_session,n.audio),t.instance._cf_filter("video",this.data.ac_session,n.video))})),i.js_session.on("reinvite",(function(e){if(t.instance.listeners.callIncomingReinvite){var n=this.data.ac_session;t.ac_log("AC>>: callIncomingReinvite start"),t.instance.listeners.callIncomingReinvite(n,!0,e.request),e.callback=function(){t.ac_log("AC>>: callIncomingIncomingReinvite end"),t.instance.listeners.callIncomingReinvite(n,!1,null)}}})),i.js_session.on("hold",(function(e){var n=this.data.ac_session,r="remote"===e.originator;t.ac_log("AC>>: callHoldStateChanged isHold=true isRemote=".concat(r," session:"),n),t.instance.listeners.callHoldStateChanged(n,!0,r)})),i.js_session.on("unhold",(function(e){var n=this.data.ac_session,r="remote"===e.originator;t.ac_log("AC>>: callHoldStateChanged isHold=false isRemote=".concat(r," session:"),n),t.instance.listeners.callHoldStateChanged(n,!1,r)})),i.js_session.on("progress",(function(e){if("remote"===e.originator){var n=this.data.ac_session;t.ac_log("AC>>: outgoingCallProgress",n),t.instance.listeners.outgoingCallProgress(n,e.response)}})),i.js_session.on("failed",(function(e){var n=this.data.ac_session,r=null;if("Redirected"===e.cause&&e.message&&e.message.headers){var i=e.message.parseHeader("Contact");i&&(r=i.uri.toString())}t.ac_log("AC>>: callTerminated (failed)",n,e.cause,r),t.instance.listeners.callTerminated(n,e.message,e.cause,r)})),i.js_session.on("accepted",(function(e){var t=this.data.ac_session;t.data._accepted=!0,"remote"===e.originator&&(t.data._ok_response=e.response)})),"remote"===e.originator&&null!==t.instance.replacedCall&&i.js_session.removeAllListeners("confirmed"),i.js_session.on("confirmed",(function(){var e,n=this.data.ac_session,r=null;"_ok_response"in n.data?(r=n.data._ok_response,delete n.data._ok_response,e="ACK sent"):e="ACK received",i.data._video_call_audio_answer_firefox&&(i.data._video_call_audio_answer_firefox=!1,t.ac_log("AC: [video call/audio answer] Firefox workaround. Send re-INVITE"),i.sendReInvite({showStreams:!0})),t.ac_log("AC>>: callConfirmed",n,e),t.instance._onActiveCallsChange.call(t.instance,1),t.instance.listeners.callConfirmed(n,r,e)})),i.js_session.on("ended",(function(e){var n=this.data.ac_session;n.data._screenSharing&&n._onEndedScreenSharing.call(n,"call terminated"),t.ac_log("AC>>: callTerminated (ended)",n,e.cause),t.instance._onActiveCallsChange.call(t.instance,-1),t.instance.listeners.callTerminated(n,e.message,e.cause)})),i.js_session.on("refer",(function(e){if(t.instance.listeners.transfereeCreatedCall){var n=this.data.ac_session;if(!t.instance.listeners.transfereeRefer||t.instance.listeners.transfereeRefer(n,e.request)){var r;t.ac_log("AC>>: incoming REFER accepted"),r=n.isScreenSharing()?n.doesScreenSharingReplaceCamera():n.hasSendVideo();var i=t.instance._callOptions(r,!0);e.accept((function(e){e.data._created_by_refer=n}),i)}else t.ac_log("AC>>: incoming REFER rejected"),e.reject()}else t.ac_log("AC>>: incoming REFER rejected, because transfereeCreatedCall is not set"),e.reject()})),i._setEnabledReceiveVideo(t.instance.enableAddVideo),i.js_session.connection?(t.instance._set_connection_listener(i),t.ac_log('AC: connection exists, set "track" listener')):(t.ac_log("AC: peer connection does not exist, wait creation"),i.js_session.on("peerconnection",(function(){t.instance._set_connection_listener(i),t.ac_log('AC: [event connection] connection created, set "track" listener')}))),n="remote"===e.originator?e.request.from:e.request.to,i.data._user=n.uri.user,i.data._host=n.uri.host,i.data._display_name=n.display_name,i.data._create_time=new Date,"remote"===e.originator){var o,a,s,u=null;if(null!==t.instance.replacedCall&&(u=t.instance.replacedCall,t.instance.replacedCall=null),e.request.body){s=!0;var l=r(new m(e.request.body).getMediaDirection("video",!0),2);o=l[0],a=l[1]}else s=!1,i.data._incoming_invite_without_sdp=!0,o=a=!0,t.ac_log("AC: warning incoming INVITE without SDP");i._setVideoState(o,a),t.ac_log("AC>>: incomingCall ".concat(i.hasVideo()?"video":"audio",' from "').concat(i.data._display_name,'" ').concat(i.data._user),i,u),t.instance.listeners.incomingCall(i,e.request,u,s)}else i.js_session.data._created_by_refer?(t.ac_log("AC>>: outgoing call created by REFER"),i.data._created_by_refer=i.js_session.data._created_by_refer,t.instance.listeners.transfereeCreatedCall(i)):t.ac_log("AC>>: outgoing call created by phone.call()")}))}},{key:"_get_from",value:function(e){return{user:e.from.uri.user,host:e.from.uri.host,displayName:e.from.display_name?e.from.display_name:null}}},{key:"_get_content_type",value:function(e){var t=e.headers["Content-Type"];return t&&t.length>0?t[0].parsed:null}},{key:"_set_connection_listener",value:function(e){t.instance.getWR().connection.addEventListener(e.js_session.connection,"track",(function(n){if(t.ac_log('AC>>: "track" event kind= '.concat(n.track.kind),n),n.streams.length>0){var r=n.streams[0];t.ac_log("AC: set call remote stream id=".concat(r.id),e),e.data._remoteMediaStream=r}else t.ac_log('AC: Warning "track" event without stream');if("video"!==n.track.kind){var i=e.getRTCLocalStream(),o=e.getRTCRemoteStream();t.ac_log("AC>>: callShowStreams",e,i,o),t.instance.listeners.callShowStreams(e,i,o)}else{if(!e.hasEnabledReceiveVideo()){e.data._video_call_audio_answer_safari&&(n.track.onmute=function(){t.ac_log('AC: [video call/audio answer] Safari fix. Fired video track "mute" event. Call callShowStream'),n.track.onmute=null;var r=e.getRTCLocalStream(),i=e.getRTCRemoteStream();t.ac_log("AC>>: callShowStreams",e,r,i),t.instance.listeners.callShowStreams(e,r,i)},t.ac_log('AC: [video call/audio answer] Safari fix. Set video track "mute" event listener'),e.data._video_call_audio_answer_safari=!1),t.ac_log('AC>>: event "track" video and !hasEnabledReceiveVideo therefore change transceiver direction.',e);var a=t.instance.getWR().connection.getTransceiver(e.js_session.connection,"video");if(null!==a){var s=e.hasEnabledSendVideo()?"sendonly":"inactive";t.instance.getWR().transceiver.setDirection(a,s)}}t.instance.codecFilter&&t.instance._cf_filter("video",e,t.instance.codecFilter.video)}}))}},{key:"_check_remote_sdp",value:function(e,n){try{n.codec_map||(n.codec_map={});var r=e.getMedia("audio");t.instance._check_remote_m(r,n.codec_map);var i=e.getMedia("video");i&&t.instance._check_remote_m(i,n.codec_map)}catch(e){t.ac_log("AC:SDP exception",e)}}},{key:"_check_remote_m",value:function(e,n){var o={};function a(e,t){var n=t.indexOf(" ",e);return-1===n?["?","?"]:[t.substring(e,n),t.substring(n+1).toLowerCase()]}var s,u=i(e);try{for(u.s();!(s=u.n()).done;){var l=s.value;if(l.startsWith("a=rtpmap:")){var c=r(a(9,l),2),d=c[0],h=c[1];o[d]||(o[d]={}),o[d].rtpmap=h}else if(l.startsWith("a=fmtp:")){var f=r(a(7,l),2),m=f[0],p=f[1];o[m]||(o[m]={}),o[m].fmtp=p}}}catch(e){u.e(e)}finally{u.f()}for(var _=0,g=Object.keys(o);_<g.length;_++){var y=g[_];if(n[y])o[y].rtpmap===n[y].rtpmap?o[y].fmtp!==n[y].fmtp&&t.ac_log("AC:SDP [The same payload type and codec name, different fmtp] pt=".concat(y," rtpmap=").concat(o[y].rtpmap," fmtp=").concat(o[y].fmtp,", previously was fmtp=").concat(n[y].fmtp)):(parseInt(y)>=64||o[y].rtpmap&&n[y].rtpmap)&&t.ac_log("AC:SDP [The same payload type, different codec names] pt=".concat(y," rtpmap=").concat(o[y].rtpmap,", previously was rtpmap=").concat(n[y].rtpmap));else{for(var v=void 0,M=o[y],T=0,b=Object.entries(n);T<b.length;T++){var w=r(b[T],2),D=w[0],L=w[1];if(M.rtpmap===L.rtpmap&&M.fmtp===L.fmtp){v=D;break}}if(v){var S=n[v];M.fmtp||S.fmtp?t.ac_log("AC:SDP [The same codec name used with different payload types] pt=".concat(y," rtpmap=").concat(M.rtpmap," fmtp=").concat(M.fmtp,", previously was pt=").concat(v," rtpmap=").concat(S.rtpmap," fmtp=").concat(S.fmtp)):t.ac_log("AC:SDP [The same codec name used with different payload types] pt=".concat(y," rtpmap=").concat(M.rtpmap,", previously was pt=").concat(v," rtpmap=").concat(S.rtpmap))}else n[y]=M}}}},{key:"_sdp_checking",value:function(e,n){var i,o,a,s=n.originator+" "+n.type,u=e.data.ac_session;try{var l;o=(l=r((i=new m(n.sdp)).getMediaDirection("video","remote"===n.originator),2))[0],a=l[1]}catch(n){return void t.ac_log("AC: cannot parse SDP",n)}var c=u.data._initial;switch("answer"===n.type&&(u.data._initial=!1),t.ac_log('AC: Event "sdp" '.concat(c?"initial":""," ").concat(s," Session state:").concat(t.getSessionStatusName(e._status))),s){case"remote offer":t.instance.modes.check_remote_sdp_mode&&t.instance._check_remote_sdp(i,e.data);break;case"remote answer":if(t.instance.modes.check_remote_sdp_mode&&t.instance._check_remote_sdp(i,e.data),u.isLocalHold()||u.isRemoteHold())break;u._setVideoState(o,a);break;case"local offer":t.instance.networkPriority&&t.instance._set_senders_dscp(e);break;case"local answer":if(u.isLocalHold()||u.isRemoteHold())break;t.instance.networkPriority&&t.instance._set_senders_dscp(e),u._setVideoState(o,a)}}},{key:"_set_senders_dscp",value:function(e){if("chrome"===t.instance.browser){t.ac_log("AC: _set_senders_dscp()");var n=t.instance.networkPriority;t.instance._set_dscp(e,"audio",n),t.instance._set_dscp(e,"video",n)}}},{key:"_set_dscp",value:function(e,n,r){var i=e.connection,o=t.instance.getWR().connection.getTransceiver(i,n);return o||"video"!==n?Promise.resolve().then((function(){var e=o.sender.getParameters();if(!e)throw new Error("sender getParameters() returns undefined");var i=e.encodings;if(!i)throw new Error("parameters encodings is undefined");if(0===i.length)throw new Error("parameters encodings is empty array");var a=i[0].networkPriority;if(!a)throw new Error("parameters encodings networkPriority is undefined");return a===r||(i[0].networkPriority=r,o.sender.setParameters(e).then((function(){return t.ac_log("AC: DSCP: ".concat(n,' "').concat(r,'"')),!0})))})).catch((function(e){return t.ac_log("AC: DSCP: ".concat(n," error: ").concat(e)),!1})):Promise.resolve(!1)}},{key:"_cf_unpack",value:function(e){function t(e,t){var n,r=t.indexOf("/"),i=t.indexOf("#");n=-1!==r?r:-1!==i?i:void 0;var o={mimeType:(e+"/"+t.substring(0,n)).toLowerCase()};return-1!==r&&(n=-1!==i?i:void 0,o.clockRate=parseInt(t.substring(r+1,n))),-1!==i&&(o.sdpFmtpLine=t.substring(i+1)),o}if(!e)return null;var n={},r=function(r){for(var i in n[r]={},e[r])n[r][i]=e[r][i].map((function(e){return t(r,e)}))};for(var i in e)r(i);return n}},{key:"_cf_pack",value:function(e){return e.map((function(e){return function(e){var t=e.mimeType.substring(6).toLowerCase();return e.clockRate&&(t+="/"+e.clockRate),e.sdpFmtpLine&&(t+="#"+e.sdpFmtpLine),t}(e)}))}},{key:"_cf_str",value:function(e){return JSON.stringify(t.instance._cf_pack(e))}},{key:"_cf_match",value:function(e,t){var n,r=e.mimeType.toLowerCase(),o=i(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.mimeType===r){if(a.clockRate&&a.clockRate!==e.clockRate)continue;if(a.sdpFmtpLine&&a.sdpFmtpLine!==e.sdpFmtpLine)continue;return!0}}}catch(e){o.e(e)}finally{o.f()}return!1}},{key:"_cf_find",value:function(e,t){var n,r=[],o=i(t);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.mimeType.toLowerCase();if(e.mimeType===s){if(e.clockRate&&e.clockRate!==a.clockRate)continue;if(e.sdpFmtpLine&&e.sdpFmtpLine!==a.sdpFmtpLine)continue;r.push(a)}}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"_cf_filter",value:function(e,n,r){if(r&&!n.data["_used_".concat(e,"_codec_filter")])try{var o=n.getRTCPeerConnection(),a=t.instance.getWR().connection.getTransceiver(o,e);if(!a)return void("audio"===e&&t.ac_log("AC: codec-filter: cannot get audio transceiver"));if(n.data["_used_".concat(e,"_codec_filter")]=!0,!RTCRtpSender.getCapabilities||!RTCRtpReceiver.getCapabilities||!a.setCodecPreferences)return void t.ac_log("AC: codec-filter is not supported.");var s,u=RTCRtpSender.getCapabilities(e).codecs,l=RTCRtpReceiver.getCapabilities(e).codecs,c=[],d=i(l);try{var h=function(){var e=s.value;-1===u.findIndex((function(t){return e.mimeType===t.mimeType&&e.clockRate===t.clockRate&&e.sdpFmtpLine===t.sdpFmtpLine}))&&c.push(e)};for(d.s();!(s=d.n()).done;)h()}catch(e){d.e(e)}finally{d.f()}var f=u.concat(c);if(t.ac_log("AC: ".concat(e," codec-filter original: ").concat(t.instance._cf_str(f),"\n(receiver: ").concat(c.length,")")),r.remove&&r.remove.length>0){var m=f.length;(f=f.filter((function(e){return!t.instance._cf_match(e,r.remove)}))).length<m&&t.ac_log("AC: ".concat(e," codec-filter remaining: ").concat(t.instance._cf_str(f)))}if(r.priority&&r.priority.length>0){var p,_=[],g=i(r.priority);try{var y=function(){var e=p.value,n=t.instance._cf_find(e,f);0!==n.length&&(_=_.concat(n),f=f.filter((function(e){return!n.includes(e)})))};for(g.s();!(p=g.n()).done;)y()}catch(e){g.e(e)}finally{g.f()}f=_.concat(f),t.ac_log("AC: ".concat(e," codec-filter changed priority: ").concat(t.instance._cf_str(f)))}return void a.setCodecPreferences(f)}catch(e){return void t.ac_log("AC: codec filter exception",e)}}},{key:"_convertIceList",value:function(e){var t,n=[],r=i(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;"string"==typeof o&&(o={urls:"stun:"+o}),n.push(o)}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"_randomToken",value:function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t}},{key:"_detectBrowser",value:function(){try{var e=navigator.userAgent;if(this.browser="other",this.browserName=e,this.browserVersion=0,navigator.mozGetUserMedia)this.browser="firefox",this.browserName=e.match(/Firefox\/([.\d]+)$/)[0],this.browserVersion=parseInt(e.match(/Firefox\/(\d+)\./)[1],10);else if(navigator.webkitGetUserMedia){this.browser="chrome",this.browserName=e.match(/Chrom(e|ium)\/([\d]+)/)[0],this.browserVersion=parseInt(e.match(/Chrom(e|ium)\/(\d+)\./)[2],10);for(var n=e.toLowerCase(),r=0;r<this.chromiumBased.length;r++){var i=this.chromiumBased[r].s,o=n.indexOf(i);if(-1!==o){var a=n.substring(o+i.length).match(/([.\d]+)/)[1];this.browserName+=" ("+this.chromiumBased[r].n+"/"+a+")";break}}}else window.safari?(this.browser="safari",this.browserName="Safari/"+e.match(/Version\/([.\d]+)/)[1],this.browserVersion=parseInt(e.match(/Version\/(\d+)\./)[1],10)):-1!==e.indexOf("Edge/")&&(this.browser="other",this.browserName=e.match(/Edge\/([.\d]+)/)[0],this.browserVersion=parseInt(e.match(/Edge\/(\d+).(\d+)$/)[2],10));/iPad|iPhone|iPod/.test(e)&&(this.browserName=e,e.includes("CriOS")?(this.browser="chrome",this.browserVersion=parseInt(e.match(/CriOS\/(\d+)\./)[1],10)):e.includes("FxiOS")?(this.browser="firefox",this.browserVersion=parseInt(e.match(/FxiOS\/(\d+)\./)[1],10)):(this.browser="safari",this.browserVersion=parseInt(e.match(/Version\/(\d+)\./)[1],10)))}catch(e){t.ac_log("AC: Browser detection error",e),this.browser="other",this.browserName=navigator.userAgent,this.browserVersion=0}}},{key:"_detectOS",value:function(){this._detectOS1(),"other"===this.os&&this._detectOS2()}},{key:"_detectOS1",value:function(){try{var e=!!navigator.userAgentData&&navigator.userAgentData.platform;if(!e)return;"windows"!==(e=e.toLowerCase())&&"linux"!==e&&"android"!==e&&"macos"!==e||(this.os=e)}catch(e){t.ac_log("AC: detectOS1 error",e),this.os="other"}}},{key:"_detectOS2",value:function(){try{var e=navigator.platform;if(!e)return;(e=e.toLowerCase()).startsWith("win")?this.os="windows":e.startsWith("android")?this.os="android":e.startsWith("linux")?navigator.userAgent.includes("Android")?this.os="android":this.os="linux":e.startsWith("mac")?this.os="macos":/ipad|iphone|ipod/.test(e)&&(this.os="ios")}catch(e){t.ac_log("AC: detectOS2 error",e),this.os="other"}}},{key:"_mediaConstraints",value:function(e){var n=t.instance,r={audio:n.constraints.audio};return e&&(r.video=n.constraints.video),r}},{key:"_callOptions",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o={},a=t.instance;return"chrome"===a.browser&&a.networkPriority&&(o={rtcConstraints:{optional:[{googDscp:!0}]}}),null!==i&&Object.assign(o,i),o.mediaConstraints=a._mediaConstraints(e),void 0===o.pcConfig&&(o.pcConfig={}),o.pcConfig.iceServers=a.serverConfig.iceServers,null!==r&&(r=r.slice()),null!==a.oauthToken&&a.oauthTokenUseInInvite&&n&&(null===r&&(r=[]),r.push("Authorization: Bearer "+a.oauthToken),r.push("X-PHONE-NUMBER: "+localStorage.getItem("X-PHONE-NUMBER")),r.push("X-botName: "+localStorage.getItem("X-botName")),r.push("X-Call-ID: "+localStorage.getItem("X-Call-ID")),r.push("X-CALLFLOW-ID: "+localStorage.getItem("X-CALLFLOW-ID")),r.push("X-CALLFLOW-STATE: "+localStorage.getItem("X-CALLFLOW-STATE"))),null!==r&&(o.extraHeaders=r),o}},{key:"call",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!1===e?e=t.instance.AUDIO:!0===e&&(e=t.instance.VIDEO),"symbol"!=u(e)||![t.instance.AUDIO,t.instance.VIDEO].includes(e))throw new TypeError("Illegal videoOption=".concat(e.toString()));n=n.replace(/\s+/g,""),t.ac_log("AC: call ".concat(e.description," to ").concat(n));var o=this._callOptions(e===t.instance.VIDEO,!0,r,i),a=this.jssipUA.call(n,o);o.mediaStream&&(a._localMediaStreamLocallyGenerated=!0);var s=a.data.ac_session;return s._setEnabledSendVideo(e===t.instance.VIDEO),e===t.instance.VIDEO&&s._setEnabledReceiveVideo(!0),s}},{key:"sendMessage",value:function(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text/plain";return t.ac_log("AC: sendMessage to: ".concat(e,' "').concat(n,'"')),new Promise((function(t,o){var a={contentType:i,eventHandlers:{succeeded:function(e){return t(e)},failed:function(e){return o(e)}}};r.jssipUA.sendMessage(e,n,a)}))}},{key:"isScreenSharingSupported",value:function(){return t.instance.getWR().hasDisplayMedia()}},{key:"openScreenSharing",value:function(){return this.isScreenSharingSupported()?(t.ac_log("AC: openScreenSharing()"),t.instance.getWR().getDisplayMedia().then((function(e){return e})).catch((function(e){throw t.ac_log("AC: openScreenSharing() error",e),e}))):(t.ac_log("AC: openScreenSharing: screen sharing is not supported in the browser"),Promise.reject("Screen sharing is not supported"))}},{key:"closeScreenSharing",value:function(e){if(t.ac_log("AC: closeScreenSharing()"),e){var n=e.getVideoTracks();if(0==n.length)return;var r=n[0];"live"===r.readyState&&(r.stop(),r.dispatchEvent(new Event("ended")))}}},{key:"setNetworkPriority",value:function(e){if(t.ac_log("AC: setNetworkPriority ".concat(e)),void 0!==e&&"high"!==e&&"medium"!==e&&"low"!==e&&"very-low"!==e)throw new TypeError("setNetworkPriority: illegal value: ".concat(e));this.networkPriority=e}},{key:"subscribe",value:function(){var e;return(e=this.jssipUA).subscribe.apply(e,arguments)}},{key:"notify",value:function(){var e;return(e=this.jssipUA).notify.apply(e,arguments)}},{key:"addCredential",value:function(e){if(!e.realm||!e.password||!e.username)throw new TypeError("wrong credential structure");this.credentials.push(e)}}],[{key:"getSessionStatusName",value:function(e){switch(e){case 0:return"NULL (0)";case 1:return"INVITE_SENT (1)";case 2:return"1XX_RECEIVED (2)";case 3:return"INVITE_RECEIVED (3)";case 4:return"WAITING_FOR_ANSWER (4)";case 5:return"ANSWERED (5)";case 6:return"WAITING_FOR_ACK (6)";case 7:return"CANCELED (7)";case 8:return"TERMINATED (8)";case 9:return"CONFIRMED (9)";default:return"Unknown ("+e+")"}}}]),t}(),f=function(){function e(t){l(this,e),this.js_session=t,this.data={_user:null,_display_name:null,_create_time:null,_initial:!0,_remoteMediaStream:null,_wasUsedSendVideo:!1,_screenSharing:null,_video:{send:!1,receive:!1,enabledSend:!1,enabledReceive:!1}},t.data.ac_session=this}return d(e,[{key:"getRTCPeerConnection",value:function(){return this.js_session.connection}},{key:"getRTCLocalStream",value:function(){return this.js_session._localMediaStream}},{key:"getRTCRemoteStream",value:function(){return this.data._remoteMediaStream}},{key:"isEstablished",value:function(){return this.js_session.isEstablished()}},{key:"isTerminated",value:function(){return this.js_session.isEnded()}},{key:"isOutgoing",value:function(){return"outgoing"===this.js_session.direction}},{key:"isAudioMuted",value:function(){return this.js_session.isMuted().audio}},{key:"isVideoMuted",value:function(){return this.js_session.isMuted().video}},{key:"wasAccepted",value:function(){return!0===this.data._accepted}},{key:"getReplacesHeader",value:function(){if(!this.js_session.isEstablished()||!this.js_session._dialog)return h.ac_log("getReplacesHeader(): call is not established"),null;var e=this.js_session._dialog.id;return"".concat(e.call_id,";to-tag=").concat(e.remote_tag,";from-tag=").concat(e.local_tag)}},{key:"muteAudio",value:function(e){h.ac_log("AC: muteAudio() arg=".concat(e," ")),e?this.js_session.mute({audio:!0,video:!1}):this.js_session.unmute({audio:!0,video:!1})}},{key:"muteVideo",value:function(e){h.ac_log("AC: muteVideo() arg=".concat(e," ")),e?this.js_session.mute({audio:!1,video:!0}):this.js_session.unmute({audio:!1,video:!0})}},{key:"sendDTMF",value:function(e){var t=h.instance.dtmfUseWebRTC;t&&"safari"===h.instance.browser&&void 0===h.instance.getWR().connection.getDTMFSender(this.js_session.connection)&&(t=!1),h.ac_log("AC: sendDTMF() tone=".concat(e," ").concat(t?"[RFC2833]":"[INFO]"));var n={duration:h.instance.dtmfDuration,interToneGap:h.instance.dtmfInterToneGap,transportType:t?"RFC2833":"INFO"};this.js_session.sendDTMF(e,n)}},{key:"sendInfo",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;h.ac_log("AC: sendInfo()",e,t,n);var r=null!==n?{extraHeaders:n}:void 0;this.js_session.sendInfo(t,e,r)}},{key:"duration",value:function(){var e=this.js_session.start_time;if(!e)return 0;var t=this.js_session.end_time;return t||(t=new Date),Math.floor((t.getTime()-e.getTime())/1e3)}},{key:"hasSendVideo",value:function(){return this.data._video.send}},{key:"hasReceiveVideo",value:function(){return this.data._video.receive}},{key:"hasVideo",value:function(){return this.hasSendVideo()&&this.hasReceiveVideo()}},{key:"getVideoState",value:function(){return this.hasSendVideo()&&this.hasReceiveVideo()?"sendrecv":this.hasSendVideo()?"sendonly":this.hasReceiveVideo()?"recvonly":"inactive"}},{key:"_setVideoState",value:function(e,t){h.ac_log("AC: _setVideoState(send=".concat(e,", receive=").concat(t,")")),this.data._video.send=e,this.data._video.receive=t}},{key:"hasEnabledSendVideo",value:function(){return this.data._video.enabledSend}},{key:"hasEnabledReceiveVideo",value:function(){return this.data._video.enabledReceive}},{key:"getEnabledVideoState",value:function(){return this.hasEnabledSendVideo()&&this.hasEnabledReceiveVideo()?"sendrecv":this.hasEnabledSendVideo()?"sendonly":this.hasEnabledReceiveVideo()?"recvonly":"inactive"}},{key:"_setEnabledSendVideo",value:function(e){h.ac_log("AC: _setEnabledSendVideo(".concat(e,")")),this.data._video.enabledSend=e}},{key:"_setEnabledReceiveVideo",value:function(e){h.ac_log("AC: _setEnabledReceiveVideo(".concat(e,")")),this.data._video.enabledReceive=e}},{key:"answer",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this.data._answer_called)h.ac_log("AC: answer() is already called. [Ignored]");else{if(this.data._answer_called=!0,!1===e?e=h.instance.AUDIO:!0===e&&(e=h.instance.VIDEO),"symbol"!=u(e)||![h.instance.AUDIO,h.instance.RECVONLY_VIDEO,h.instance.VIDEO].includes(e))throw new TypeError("Illegal videoOption=".concat(e.toString()));if(h.ac_log("AC: ".concat(e.description," answer")),this.hasVideo()||e!==h.instance.RECVONLY_VIDEO&&e!==h.instance.VIDEO||(h.ac_log('AC: incoming INVITE without video, so answer can be only "audio"'),e=h.instance.AUDIO),this.hasVideo()&&e===h.instance.AUDIO){var i=h.instance,o=i.browser,a=i.modes,s=i.browserVersion;"firefox"===o&&a.video_call_audio_answer_firefox_fix?this.data._video_call_audio_answer_firefox=!0:"safari"===o&&(!0===a.video_call_audio_answer_safari_fix&&s<14||"force"===a.video_call_audio_answer_safari_fix)&&(this.data._video_call_audio_answer_safari=!0)}switch(e){case h.instance.AUDIO:this._setEnabledSendVideo(!1),this.data._incoming_invite_without_sdp?this._setEnabledReceiveVideo(h.instance.enableAddVideo):this._setEnabledReceiveVideo(!this.hasVideo()&&h.instance.enableAddVideo),this._setVideoState(!1,!1);break;case h.instance.VIDEO:this._setEnabledSendVideo(!0),this._setEnabledReceiveVideo(!0),this._setVideoState(!0,!0);break;case h.instance.RECVONLY_VIDEO:this._setEnabledSendVideo(!1),this._setEnabledReceiveVideo(!0),this._setVideoState(!1,!0)}var l=h.instance._callOptions(e===h.instance.VIDEO,!1,n,r);Promise.resolve().then((function(){return l.mediaStream?l.mediaStream:h.instance.getWR().getUserMedia(l.mediaConstraints)})).then((function(e){l.mediaStream=e,t.js_session._localMediaStreamLocallyGenerated=!0,h.ac_log("AC: answer options:",l),t.js_session.answer(l)})).catch((function(e){h.ac_log("AC: getUserMedia failure",e),t.reject(488)}))}}},{key:"reject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:486,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;h.ac_log("AC: reject()");try{var n={status_code:e};t&&(n.extraHeaders=t),this.js_session.terminate(n)}catch(e){h.ac_log("AC: call reject error:",e)}}},{key:"terminate",value:function(){h.ac_log("AC: terminate()");try{this.js_session.terminate()}catch(e){h.ac_log("AC: call terminate error:",e)}}},{key:"redirect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:302,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;h.ac_log("AC: redirect() callTo=".concat(e));try{var r,i={status_code:t,extraHeaders:["Contact: "+h.instance.jssipUA.normalizeTarget(e)]};n&&(r=i.extraHeaders).push.apply(r,o(n)),this.js_session.terminate(i)}catch(e){h.ac_log("AC: call redirect error:",e)}}},{key:"isLocalHold",value:function(){return this.js_session.isOnHold().local}},{key:"isRemoteHold",value:function(){return this.js_session.isOnHold().remote}},{key:"isReadyToReOffer",value:function(){return this.js_session._isReadyToReOffer()}},{key:"hold",value:function(e){var t=this;return h.ac_log("AC: hold(".concat(e,")")),new Promise((function(n,r){(e?t.js_session.hold:t.js_session.unhold).call(t.js_session,{},(function(){h.ac_log("AC: hold()/unhold() is completed"),n()}))||(h.ac_log("AC: hold()/unhold() failed"),r())}))}},{key:"enableReceiveVideo",value:function(e){this._setEnabledReceiveVideo(e);var t=this.getRTCPeerConnection(),n=h.instance.getWR().connection.getTransceiver(t,"video");if(null!==n){var r=this.getEnabledVideoState();h.instance.getWR().transceiver.setDirection(n,r)}return h.ac_log("AC: enableReceiveVideo(".concat(e,") ").concat(null!==n?"":"No video transceiver")),null!==n}},{key:"startSendingVideo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t&&!1!==t.enabledReceiveVideo;return this.hasEnabledSendVideo()?(h.ac_log("AC: startSendingVideo(). Already started"),Promise.reject("video already started")):(h.ac_log("AC: startSendingVideo()"),h.instance.getWR().getUserMedia({video:h.instance.constraints.video}).catch((function(e){throw h.ac_log("AC: startSendingVideo() getUserMedia failure",e),e})).then((function(t){var r=t.getVideoTracks()[0];e.getRTCLocalStream().addTrack(r),e._setEnabledSendVideo(!0),e._setEnabledReceiveVideo(n);var i=e.data._wasUsedSendVideo;return h.instance.getWR().connection.addVideo(e.getRTCPeerConnection(),e.getRTCLocalStream(),r,e.hasEnabledReceiveVideo(),i).then((function(){!i&&h.instance.codecFilter&&h.instance._cf_filter("video",e,h.instance.codecFilter.video)})).catch((function(e){throw h.ac_log("AC: startSendingVideo(). Adding video error",e),e}))})).then((function(){return e._renegotiate(t)})))}},{key:"stopSendingVideo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.hasEnabledSendVideo()?(h.ac_log("AC: stopSendingVideo()"),h.instance.getWR().connection.removeVideo(this.getRTCPeerConnection(),this.getRTCLocalStream()).catch((function(e){throw h.ac_log("AC: stopSendingVideo(). Remove video error",e),e})).then((function(){return e._setEnabledSendVideo(!1),e.data._wasUsedSendVideo=!0,e._renegotiate(t)}))):(h.ac_log("AC: stopSendingVideo(). Already stopped"),Promise.reject("video already stopped"))}},{key:"_doRenegotiate",value:function(e){var t=this;return this.js_session.isEnded()?Promise.reject("call is ended"):new Promise((function(n){if(!t.js_session.renegotiate(e,(function(){return n(!0)})))return n(!1)}))}},{key:"_renegotiate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500;return h.ac_log("AC: _renegotiate() attemptsLeft=".concat(n)),this._doRenegotiate(e).then((function(i){if(i)return h.ac_log("AC: Renegotiation success"),!0;if(n<=1)throw new Error("Too many attempts");return new Promise((function(e){return setTimeout(e,r)})).then((function(){return t._renegotiate(e,n-1,r)}))})).catch((function(e){throw h.ac_log("AC: Renegotiation failed",e),e}))}},{key:"sendReInvite",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h.ac_log("AC: sendReInvite()"),this._renegotiate(t).then((function(){if(t.showStreams){var n=e.getRTCLocalStream(),r=e.getRTCRemoteStream();h.ac_log("AC>>: [after send re-INVITE] callShowStreams",e,n,r),h.instance.listeners.callShowStreams(e,n,r)}}))}},{key:"startScreenSharing",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{localScreenSharing:!0,enabledReceiveVideo:!0,separateVideo:!1};if(h.ac_log("AC: startScreenSharing"),!e)return Promise.reject("missed stream argument");if(this.data._screenSharing)return Promise.reject("the call is already using screen-sharing");var r=n&&!1!==n.enabledReceiveVideo,i=e.getVideoTracks()[0],o=void 0;n.localScreenSharing&&(o=this._onEndedScreenSharingTrack.bind(this),i.addEventListener("ended",o)),this.data._screenSharing={stream:e,onended:o,hadSendVideo:this.hasSendVideo()};var a=this.data._wasUsedSendVideo;return this._setEnabledSendVideo(!0),this._setEnabledReceiveVideo(r),h.instance.getWR().connection.addVideo(this.getRTCPeerConnection(),this.getRTCLocalStream(),i,this.hasEnabledReceiveVideo(),a).then((function(){!a&&h.instance.codecFilter&&h.instance._cf_filter("video",t,h.instance.codecFilter.video)})).catch((function(e){throw h.ac_log("AC: startScreenSharing() error",e),t.data._screenSharing=null,e})).then((function(){return t._renegotiate({extraHeaders:["X-Screen-Sharing: on"]})}))}},{key:"stopScreenSharing",value:function(){return h.ac_log("AC: stopScreenSharing"),this.data._screenSharing?this._onEndedScreenSharing("called stopScreenSharing()"):Promise.reject("the call does not use screen-sharing")}},{key:"isScreenSharing",value:function(){return!!this.data._screenSharing}},{key:"doesScreenSharingReplaceCamera",value:function(){var e=this.data._screenSharing;return e&&e.hadSendVideo}},{key:"_onEndedScreenSharingTrack",value:function(){return this._onEndedScreenSharing("track ended")}},{key:"_onEndedScreenSharing",value:function(e){var t=this,n=this.data._screenSharing;this.data._screenSharing=null;var r=n.stream,i=n.onended;return r&&i&&r.getVideoTracks()[0].removeEventListener("ended",i),Promise.resolve().then((function(){if(!t.isTerminated()){var e=t.getRTCPeerConnection(),r=t.getRTCLocalStream(),i={extraHeaders:["X-Screen-Sharing: off"]};return n.hadSendVideo?(h.ac_log("AC: screen sharing stopped - restore previously sending video track"),h.instance.getWR().connection.replaceSenderTrack(e,"video",r),t._renegotiate(i)):(h.ac_log("AC: screen sharing stopped - stop send video"),t.stopSendingVideo(i))}})).then((function(){h.instance.listeners.callScreenSharingEnded&&(h.ac_log('AC>>: callScreenSharingEnded "'.concat(e,'"'),t,r),h.instance.listeners.callScreenSharingEnded(t,r))}))}},{key:"setRemoteHoldState",value:function(){this.js_session._remoteHold=!0}},{key:"sendRefer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!h.instance.listeners.transferorNotification)throw new Error("transferorNotification listener is missed");var n=this,r={eventHandlers:{requestSucceeded:function(){h.ac_log("AC>>: transferorNotification progress [REFER accepted]"),h.instance.listeners.transferorNotification(n,0)},requestFailed:function(){h.ac_log("AC>>: transferorNotification failed [REFER failed]"),h.instance.listeners.transferorNotification(n,-1)},trying:function(){h.ac_log("AC>>: transferorNotification progress [NOTIFY 1xx]"),h.instance.listeners.transferorNotification(n,0)},progress:function(){h.ac_log("AC>>: transferorNotification progress [NOTIFY 1xx]"),h.instance.listeners.transferorNotification(n,0)},accepted:function(){h.ac_log("AC>>: transferorNotification success [NOTIFY 2xx]"),h.instance.listeners.transferorNotification(n,1)},failed:function(){h.ac_log("AC>>: transferorNotification failed [NOTIFY >= 300]"),h.instance.listeners.transferorNotification(n,-1)}}};null!==t&&(r.replaces=t.js_session),this.js_session.refer(e,r)}}]),e}(),m=function(){function e(t){l(this,e),this.start=[],this.media=[];var n,r=t.split("\n").map((function(e){return e.trim()})).filter((function(e){return e.length>0})),o=this.start,a=i(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;s.startsWith("m=")&&(o=[],this.media.push(o)),o.push(s)}}catch(e){a.e(e)}finally{a.f()}}return d(e,[{key:"getMedia",value:function(e){var t,n=i(this.media);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.length>0&&r[0].startsWith("m="+e))return r}}catch(e){n.e(e)}finally{n.f()}return null}},{key:"checkSendRecv",value:function(e){switch(e){case"a=sendrecv":return"sendrecv";case"a=sendonly":return"sendonly";case"a=recvonly":return"recvonly";case"a=inactive":return"inactive";default:return null}}},{key:"getMediaDirectionValue",value:function(e){var t,n=this.getMedia(e);if(null===n)return null;var r,o="sendrecv",a=i(this.start);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(null!==(t=this.checkSendRecv(s))){o=t;break}}}catch(e){a.e(e)}finally{a.f()}var u,l=i(n);try{for(l.s();!(u=l.n()).done;){var c=u.value;if(null!==(t=this.checkSendRecv(c))){o=t;break}}}catch(e){l.e(e)}finally{l.f()}return o}},{key:"getMediaDirection",value:function(e,t){var n=this.getMediaDirectionValue(e);switch(n){case"sendrecv":return[!0,!0,n];case"sendonly":return t?[!1,!0,n]:[!0,!1,n];case"recvonly":return t?[!0,!1,n]:[!1,!0,n];case null:case"inactive":return[!1,!1,n]}}},{key:"toString",value:function(){var e,t=this.start,n=i(this.media);try{for(n.s();!(e=n.n()).done;){var r=e.value;t=t.concat(r)}}catch(e){n.e(e)}finally{n.f()}return t.join("\r\n")+"\r\n"}}]),e}(),p={getUserMedia:function(e){return h.ac_log("[webrtc] getUserMedia constraints=".concat(JSON.stringify(e))),navigator.mediaDevices.getUserMedia(e)},hasDisplayMedia:function(){return navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia},getDisplayMedia:function(){return h.ac_log("[webrtc] getDisplayMedia"),navigator.mediaDevices.getDisplayMedia({video:!0})},mediaDevices:{enumerateDevices:function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?navigator.mediaDevices.enumerateDevices():Promise.reject("WebRTC is not supported")},addDeviceChangeListener:function(e){navigator.mediaDevices&&navigator.mediaDevices.addEventListener("devicechange",e)},removeDeviceChangeListener:function(e){navigator.mediaDevices&&navigator.mediaDevices.removeEventListener("devicechange",e)}},checkAvailableDevices:function(){if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)return Promise.reject("WebRTC is not supported");var e=!1,t=!1,n=!1;return navigator.mediaDevices.enumerateDevices().then((function(r){return r.forEach((function(r){switch(r.kind){case"videoinput":e=!0;break;case"audioinput":t=!0;break;case"audiooutput":n=!0}})),void 0===navigator.webkitGetUserMedia&&(n=!0),n?t?Promise.resolve(e):Promise.reject("Missing a microphone! Please connect one and reload"):Promise.reject("Missing a speaker! Please connect one and reload")}))},transceiver:{setDirection:function(e,t){var n="";null!==e.sender.track?n=e.sender.track.kind:null!==e.receiver.track&&(n=e.receiver.track.kind),h.ac_log("[webrtc] set ".concat(n," transceiver direction=").concat(t)),e.direction=t}},stream:{getInfo:function(e){function t(e){return e.length>0?e[0].enabled.toString():"-"}return null===e?Promise.resolve("stream is null"):Promise.resolve("audio: ".concat(t(e.getAudioTracks())," video: ").concat(t(e.getVideoTracks())))}},connection:{getTransceiversInfo:function(e){function t(e){return null===e?"none":"d=".concat(e.direction," c=").concat(e.currentDirection)}var n=e.getTransceivers(),r=h.instance.getWR().connection.getTransceiver(e,"audio"),i=h.instance.getWR().connection.getTransceiver(e,"video");return Promise.resolve("(".concat(n.length,") audio ").concat(t(r)," video ").concat(t(i)))},getTransceiver:function(e,t){var n,r=i(e.getTransceivers());try{for(r.s();!(n=r.n()).done;){var o=n.value;if(null!==o.sender&&null!==o.sender.track&&o.sender.track.kind===t)return o;if(null!==o.receiver&&null!==o.receiver.track&&o.receiver.track.kind===t)return o}}catch(e){r.e(e)}finally{r.f()}return null},addEventListener:function(e,t,n){return h.ac_log("[webrtc] Connection addEventListener ".concat(t)),"track"!==t?Promise.reject("Wrong event name: ".concat(t)):(e.addEventListener(t,n),Promise.resolve())},getDTMFSender:function(e){var t=e.getSenders().find((function(e){return e.track&&"audio"===e.track.kind}));if(t&&t.dtmf)return t.dtmf},addVideo:function(e,t,n,r,i){h.ac_log("[webrtc] Connection addVideo");var o=h.instance.getWR().connection.getTransceiver(e,"video");if(null!==o){var a=r?"sendrecv":"sendonly";h.instance.getWR().transceiver.setDirection(o,a)}return null===o||null===o.sender.track&&!i?(h.ac_log("[webrtc] addVideo (connection addTrack)"),e.addTrack(n,t),Promise.resolve(!0)):(h.ac_log("[webrtc] addVideo (video transceiver sender replaceTrack)"),o.sender.replaceTrack(n).then((function(){return!1})))},removeVideo:function(e,t){h.ac_log("[webrtc] Connection removeVideo");var n=h.instance.getWR().connection.getTransceiver(e,"video");if(null===n)return Promise.reject("no video transceiver found");if(e.removeTrack(n.sender),t){var r,o=i(t.getVideoTracks());try{for(o.s();!(r=o.n()).done;){var a=r.value;t.removeTrack(a),a.stop()}}catch(e){o.e(e)}finally{o.f()}}return Promise.resolve()},replaceSenderTrack:function(e,t,n){h.ac_log("[webrtc] ReplaceSenderTrack ".concat(t));var r,o=null,a=i(e.getSenders());try{for(a.s();!(r=a.n()).done;){var s=r.value;if(null!==s.track&&s.track.kind===t){o=s;break}}}catch(e){a.e(e)}finally{a.f()}if(null===o)return Promise.reject("No ".concat(t," sender"));var u="audio"===t?n.getAudioTracks():n.getVideoTracks();return 0===u.length?Promise.reject("No ".concat(t," track")):o.replaceTrack(u[0])},getStats:function(e,t){var n="";return e.getStats(null).then((function(e){return e.forEach((function(e){if(t.includes(e.type)){n+=" {";for(var r=!0,i=0,o=Object.keys(e);i<o.length;i++){var a=o[i];r?r=!1:n+=",",n+=a+"="+e[a]}n+="} \r\n"}})),n}))}}}},58776:(e,t,n)=>{n.d(t,{Z:()=>H});var r={};n.r(r),n.d(r,{default:()=>u});var o=n(87274),a=n(19755),s=n.n(a);!function(e){var t,n=e.fn.domManip,r="_tmplitem",i=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,o={},a={},s={key:0,data:{}},u=0,l=0,c=[],d={};function h(t,n,r,i){var s={data:i||0===i||!1===i?i:n?n.data:{},_wrap:n?n._wrap:null,tmpl:null,parent:n||null,nodes:[],calls:v,nest:M,wrap:T,html:b,update:w};return t&&e.extend(s,t,{nodes:[],parent:n}),r&&(s.tmpl=r,s._ctnt=s._ctnt||s.tmpl(e,s),s.key=++u,(c.length?a:o)[u]=s),s}function f(t,n,i){var o,a=i?e.map(i,(function(e){return"string"==typeof e?t.key?e.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+r+'="'+t.key+'" $2'):e:f(e,t,e._ctnt)})):t;return n?a:((a=a.join("")).replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,(function(t,n,r,i){y(o=e(r).get()),n&&(o=m(n).concat(o)),i&&(o=o.concat(m(i)))})),o||m(a))}function m(t){var n=document.createElement("div");return n.innerHTML=t,e.makeArray(n.childNodes)}function p(t){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+e.trim(t).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,(function(t,n,r,i,o,a,s){var u,l,c,d=e.tmpl.tag[r];if(!d)throw"Unknown template tag: "+r;return u=d._default||[],a&&!/\w$/.test(o)&&(o+=a,a=""),o?(o=g(o),s=s?","+g(s)+")":a?")":"",l=a?o.indexOf(".")>-1?o+g(a):"("+o+").call($item"+s:o,c=a?l:"(typeof("+o+")==='function'?("+o+").call($item):("+o+"))"):c=l=u.$1||"null",i=g(i),"');"+d[n?"close":"open"].split("$notnull_1").join(o?"typeof("+o+")!=='undefined' && ("+o+")!=null":"true").split("$1a").join(c).split("$1").join(l).split("$2").join(i||u.$2||"")+"__.push('"}))+"');}return __;")}function _(t,n){t._wrap=f(t,!0,e.isArray(n)?n:[i.test(n)?n:e(n).html()]).join("")}function g(e){return e?e.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function y(t){var n,i,s,c,d,f="_"+l,m={};for(s=0,c=t.length;s<c;s++)if(1===(n=t[s]).nodeType){for(d=(i=n.getElementsByTagName("*")).length-1;d>=0;d--)p(i[d]);p(n)}function p(t){var n,i,s,c,d=t;if(c=t.getAttribute(r)){for(;d.parentNode&&1===(d=d.parentNode).nodeType&&!(n=d.getAttribute(r)););n!==c&&(d=d.parentNode?11===d.nodeType?0:d.getAttribute(r)||0:0,(s=o[c])||((s=h(s=a[c],o[d]||a[d])).key=++u,o[u]=s),l&&p(c)),t.removeAttribute(r)}else l&&(s=e.data(t,"tmplItem"))&&(p(s.key),o[s.key]=s,d=(d=e.data(t.parentNode,"tmplItem"))?d.key:0);if(s){for(i=s;i&&i.key!=d;)i.nodes.push(t),i=i.parent;delete s._ctnt,delete s._wrap,e.data(t,"tmplItem",s)}function p(e){s=m[e+=f]=m[e]||h(s,o[s.parent.key+f]||s.parent)}}}function v(e,t,n,r){if(!e)return c.pop();c.push({_:e,tmpl:t,item:this,data:n,options:r})}function M(t,n,r){return e.tmpl(e.template(t),n,r,this)}function T(t,n){var r=t.options||{};return r.wrapped=n,e.tmpl(e.template(t.tmpl),t.data,r,t.item)}function b(t,n){var r=this._wrap;return e.map(e(e.isArray(r)?r.join(""):r).filter(t||"*"),(function(e){return n?e.innerText||e.textContent:e.outerHTML||(t=e,(r=document.createElement("div")).appendChild(t.cloneNode(!0)),r.innerHTML);var t,r}))}function w(){var t=this.nodes;e.tmpl(null,null,null,this).insertBefore(t[0]),e(t).remove()}e.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith",koreReplaceAll:"replaceWith"},(function(n,r){e.fn[n]=function(i){var a,s,u,c,d=[],h=e(i),f=1===this.length&&this[0].parentNode;if(t=o||{},f&&11===f.nodeType&&1===f.childNodes.length&&1===h.length)h[r](this[0]),d=this;else{for(s=0,u=h.length;s<u;s++)l=s,a=(s>0?this.clone(!0):this).get(),e(h[s])[r](a),d=d.concat(a);l=0,d=this.pushStack(d,n,h.selector)}return c=t,t=null,e.tmpl.complete(c),d}})),e.fn.extend({tmpl:function(t,n,r){return e.tmpl(this[0],t,n,r)},tmplItem:function(){return e.tmplItem(this[0])},template:function(t){return e.template(t,this[0])},domManip:function(r,i,a,s){if(r[0]&&e.isArray(r[0])){for(var u,c=e.makeArray(arguments),d=r[0],h=d.length,f=0;f<h&&!(u=e.data(d[f++],"tmplItem")););u&&l&&(c[2]=function(t){e.tmpl.afterManip(this,t,a)}),n.apply(this,c)}else n.apply(this,arguments);return l=0,t||e.tmpl.complete(o),this}}),e.extend({tmpl:function(t,n,r,i){var u,l=!i;if(l)i=s,t=t&&t.id&&d&&d[t.id]?d[t.id]:e.template[t]||e.template(null,t),a={};else if(!t)return t=i.tmpl,o[i.key]=i,i.nodes=[],i.wrapped&&_(i,i.wrapped),e(f(i,null,i.tmpl(e,i)));return t?("function"==typeof n&&(n=n.call(i||{})),r&&r.wrapped&&_(r,r.wrapped),u=e.isArray(n)?e.map(n,(function(e){return e?h(r,i,t,e):null})):[h(r,i,t,n)],l?e(f(i,null,u)):u):[]},tmplItem:function(t){var n;for(t instanceof e&&(t=t[0]);t&&1===t.nodeType&&!(n=e.data(t,"tmplItem"))&&(t=t.parentNode););return n||s},template:function(t,n){if(n){if("string"==typeof n?n=p(n):n instanceof e&&(n=n[0]||{}),n.nodeType)if(n&&n.id&&d&&d[n.id])n=d[n.id];else{var r=n.id;n=e.data(n,"tmpl")||e.data(n,"tmpl",p(n.innerHTML)),d[r]=n}return"string"==typeof t?e.template[t]=n:n}return t?"string"!=typeof t?e.template(null,t):e.template[t]||e.template(null,i.test(t)?t:e(t)):null},encode:function(e){return(""+e).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}}),e.extend(e.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},if:{open:"if(($notnull_1) && $1a){",close:"}"},else:{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(e){o={}},afterManip:function(t,n,r){var i=11===n.nodeType?e.makeArray(n.childNodes):1===n.nodeType?[n]:[];r.call(t,n),y(i),l++}}),e.extend({installPreCompiledTemplates:function(t){e.extend(d,t)}})}(s());const u=s();function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}var c=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,(function(e){var n=t[a][1][e];return i(n||e)}),l,l.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({"/KoreBot.js":[function(e,t,n){var r,o=e("./index.js"),a=e("events"),s=e("inherits"),u=e(15),l=(r=e("lodash").bind?e("lodash"):_).bind,c=r.isFunction,d=o.CLIENT_EVENTS.RTM,h=o.RTM_EVENTS,f=o.CLIENT_EVENTS.WEB,m=e("./jstz.js"),p=r.noop;"undefined"!=typeof window&&(window.kore=window.kore||{},window.kore.botsdk=window.kore.botsdk||{},window.kore.botsdk.logger=window.kore.botsdk.logger||e("debug"),window.messageHistoryLimit=10);var g=e("debug")("botsdk:KoreBot");function y(){a.call(this),this.WebClient=null,this.RtmClient=null,this.options={},this.accessToken=null,this.initialized=!1,this.clients=o,this.latestId=null,this.oldestId=null,this.EventEmitter=a,this.lodash=r,this.bind=l,this.isFunction=c,this.RTM_EVENTS=h,this.RTM_CLIENT_EVENTS=d,this.jstz=m,this.noop=p,this.debug=g,this.userLocation=v,this.historyOffset=0,this.previousHistoryLoading=!1,this.paginatedScrollDataAvailable=!0}var v={city:"",country:"",latitude:0,longitude:0,street:""},M=!1;s(y,a),y.prototype.emit=function(){arguments&&"history"===arguments[0]&&this.historySyncInProgress?(this.historySyncInProgress=!1,arguments[2]="historysync",this.cbBotChatHistory(arguments)):!window._chatHistoryLoaded&&arguments&&"history"===arguments[0]?(M=!0,this.cbBotChatHistory(arguments)):M&&arguments&&"history"===arguments[0]&&setTimeout((function(){$(".chatInputBox").focus(),$(".disableFooter").removeClass("disableFooter")})),this.EventEmitter.prototype.emit.apply(this,arguments)},y.prototype.fetchUserLocation=function(){if(""===v.country){console.log("Fetching user location");var e=this.options;navigator.geolocation.getCurrentPosition((function(t){if(e.googleMapsAPIKey){var n=t.coords.latitude,r=t.coords.longitude;v.latitude=n,v.longitude=r;var o=new XMLHttpRequest,a="https://maps.googleapis.com/maps/api/geocode/json?latlng="+n+","+r+"&sensor=true&key="+e.googleMapsAPIKey;o.open("GET",a,!0),o.onreadystatechange=function(){if(4==o.readyState&&200==o.status){var e=JSON.parse(o.responseText);"undefined"!=typeof Storage&&(0==e.results.length?e=JSON.parse(localStorage.getItem("locationData")):localStorage.setItem("locationData",JSON.stringify(e)));var t=[];for(e.results&&e.results.length&&e.results[0].address_components&&(t=e.results[0].address_components),i=0;i<t.length;i++){var n=t[i].types;"locality,political"==n?v.city=t[i].long_name:"country,political"==n?v.country=t[i].long_name:"political,sublocality,sublocality_level_2"==n&&(v.street=t[i].long_name)}}},o.send()}else console.warn("please provide google maps API key")}))}},y.prototype.sendMessage=function(e,t){g("sending message to bot"),this.initialized?(e.resourceid=e.resourceid||"/bot.message",e.botInfo=this.options.botInfo||{},e.client=this.options.client||"sdk",e.meta={timezone:m.jstz.determine().name(),locale:window.navigator.userLanguage||window.navigator.language},0!==v.latitude&&0!==v.longitude&&(e.meta.location=v),this.RtmClient.sendMessage(e,t)):t&&t(new Error("Bot is Initializing...Please try again"))},y.prototype.sendMessageViaWebhook=function(e,t,n){var r=this.WebClient,i=this;e.opts={authorization:"bearer "+this.options.webhookConfig.token},r.makeAPICall(this.options.webhookConfig.webhookURL,e,(function(e,r){e?n(r):(r.pollId&&i.startPollForWebhookResponse(r.pollId,t),t(i.convertWebhookResposeToMessages(r)))}))},y.prototype.getBotMetaData=function(e,t){var n=this.WebClient,r=this,i={};i.opts={authorization:"bearer "+this.options.webhookConfig.token,type:"GET"},n.makeAPICall("botmeta/"+r.options.botInfo.taskBotId,i,(function(n,i){n?t(i):(r.options.botInfo.icon=i.icon,e(i))}))},y.prototype.convertWebhookResposeToMessages=function(e){var t,n=e.text,r=[],i=this.options.botInfo.icon;function o(e){try{e=JSON.parse(e)}catch(t){return e}return e}if("v2"===e._v&&(n=e.data),n instanceof Array)console.log("it is array"),n.forEach((function(e,n){var a=(new Date).getTime()+n;t={type:"bot_response",messageId:e.messageId||a,icon:i,createdOn:e.createdOn,message:[{type:"text",cInfo:{body:e.val||e,attachments:""},component:o(e.val||e)}]},r.push(t)}));else{console.log("its Object");var a=(new Date).getTime();t={type:"bot_response",messageId:entry.messageId||a,createdOn:entry.createdOn,icon:i,message:[{type:"text",cInfo:{body:o(n),attachments:""},component:o(n)}]},r.push(t)}return r},y.prototype.startPollForWebhookResponse=function(e,t){var n=this,r=n.options.koreAPIUrl,i=(r=r.substring(0,r.length-5))+"/chatbot/v2/webhook/"+n.options.webhookConfig.streamId+"/poll/"+e,o=this.WebClient,a={};a.opts={authorization:"bearer "+this.options.webhookConfig.token,type:"GET"},o.makeAPICall(i,a,(function(e,r){e||(r.pollId&&setTimeout((function(){n.startPollForWebhookResponse(r.pollId,t)}),1e3),r.data&&t(n.convertWebhookResposeToMessages(r)))}))},y.prototype.onMessage=function(e){g("on message from bot/self"),"bot"===e.from&&"bot_response"===e.type&&(this.latestId=e.messageId||this.latestId,this.oldestId=this.oldestId||e.messageId),this.emit(h.MESSAGE,e)},y.prototype.close=function(){g("request to close ws connection"),this.RtmClient&&this.RtmClient._close()},y.prototype.destroy=function(){this.RtmClient&&this.RtmClient._close(),M=!1,this.removeAllListeners()},y.prototype.onForwardHistory=function(e,t){g("on forward history");var n,r={};if(r.moreAvailable=t.moreAvailable,this.paginatedScrollDataAvailable=t.moreAvailable,r.messages=[],r.forward=!0,r.afterMessageId=this.latestId,t.messages&&t.messages.length>0)for(n=0;n<t.messages.length;n++){var i={};i.messageId=t.messages[n]._id,this.oldestId=this.oldestId||t.messages[n]._id,this.latestId=t.messages[n]._id||this.latestId,"incoming"===t.messages[n].type?(i.from="self",i.type="user_message"):(i.from="bot",i.type="bot_response");var o=0;if(t.messages[n].components&&t.messages[n].components.length>0)for(i.message=[],o=0;o<t.messages[n].components.length;o++){var a={};a.type=t.messages[n].components[o].cT,"text"===a.type&&(a.cInfo={},a.cInfo.body=t.messages[n].components[o].data&&t.messages[n].components[o].data.text),i.message[o]=a}i.createdOn=t.messages[n].createdOn,r.messages[n]=i}this.emit("history",r)},y.prototype.onBackWardHistory=function(e,t){g("on backword history");var n,r={};if(r.moreAvailable=t.moreAvailable,this.paginatedScrollDataAvailable=t.moreAvailable,r.messages=[],r.backward=!0,r.beforeMessageId=this.oldestId,t.messages&&t.messages.length>0)for(n=0;n<t.messages.length;n++){var i={};i.messageId=t.messages[n]._id,this.oldestId=t.messages[n]._id||this.oldestId,this.latestId=this.latestId||t.messages[n]._id,"incoming"===t.messages[n].type?(i.from="self",i.type="user_message"):(i.from="bot",i.type="bot_response",i.icon=t.icon);var o=0;if(t.messages[n].components&&t.messages[n].components.length>0)for(i.message=[],o=0;o<t.messages[n].components.length;o++){var a={};a.type=t.messages[n].components[o].cT,"text"===a.type&&(a.cInfo={},a.cInfo.body=t.messages[n].components[o].data&&t.messages[n].components[o].data.text),i.message[o]=a}i.createdOn=t.messages[n].createdOn,r.messages[n]=i}this.emit("history",r)},y.prototype.getHistory=function(e,t){g("get history"),e=e||{},"undefined"!=typeof window&&(e.limit=e.limit||window.messageHistoryLimit||10);var n={};n.forward=e.forward,n.limit=e.limit||10,n.offset=this.historyOffset,this.historyOffset=this.historyOffset+(e.limit?e.limit:10),n.forward?this.latestId&&(n.msgId=this.latestId):this.previousHistoryLoading||this.oldestId&&(n.msgId=this.oldestId),n.botInfo=this.options.botInfo,n.authorization="bearer "+this.WebClient.user.accessToken,t&&t.webhookConfig&&t.webhookConfig.enable&&(n.authorization="bearer "+this.options.webhookConfig.token),e.forHistorySync&&(this.historySyncInProgress=!0,delete n.msgId),n.forward?this.WebClient.history.history(n,l(this.onForwardHistory,this),t):this.WebClient.history.history(n,l(this.onBackWardHistory,this),t)},y.prototype.sync=function(e){},y.prototype.onOpenWSConnection=function(e){g("opened WS Connection"),this.initialized=!0,this.options.loadHistory&&!M&&this.getHistory({}),this.emit(d.RTM_CONNECTION_OPENED,{})},y.prototype.onLogIn=function(e,t){if(g("sign-in/anonymous user onLogin"),e)this.cbErrorToClient&&(t&&t.errors&&t.errors[0]&&t.errors[0].msg?this.cbErrorToClient(t.errors[0].msg):this.cbErrorToClient(e.message)),console.error(e&&e.stack);else{this.accessToken=t.authorization.accessToken,this.options.accessToken=this.accessToken,this.WebClient.user.accessToken=this.accessToken,this.userInfo=t,this.cbBotDetails(t,this.options.botInfo),this.RtmClient=new o.KoreRtmClient({},this.options),this.emit("rtm_client_initialized"),this.emit(f.JWT_GRANT_SUCCESS,{jwtgrantsuccess:t}),this.RtmClient.start({botInfo:this.options.botInfo}),this.RtmClient.on(h.MESSAGE,l(this.onMessage,this)),this.RtmClient.on(d.RTM_CONNECTION_OPENED,l(this.onOpenWSConnection,this));var n=this;Object.keys(d).forEach((function(e){n.RtmClient.on(d[e],(function(t){n.emit("rtm:"+d[e],t)}))}))}},y.prototype.logIn=function(e,t){e?(g("error in assertionFn %s",e),console.error("error in assertionFn",e&&e.stack)):(g("signed-in user login"),this.options=t,this.claims=t.assertion,this.WebClient=new o.KoreWebClient({},this.options),this.WebClient.claims=this.claims,this.cbErrorToClient=t.handleError||p,this.cbBotDetails=t.botDetails||p,this.cbBotChatHistory=t.chatHistory||p,this.options.webhookConfig&&this.options.webhookConfig.enable?(this.options.webhookConfig.token=this.options.assertion,this.emit(f.WEB_HOOK_READY),this.options.loadHistory&&!M?this.getHistory({},t):this.emit(f.WEB_HOOK_RECONNECTED)):this.WebClient.login.login({assertion:t.assertion,botInfo:this.options.botInfo},l(this.onLogIn,this)))},y.prototype.init=function(e,t){(t=t||10)>100&&(t=100),"undefined"!=typeof window&&(window.messageHistoryLimit=t||10),e=e||{},this.options=e,this.oldestId=null,this.RtmClient=null,e.test?(g("test is true"),c(e.koreAnonymousFn)?e.koreAnonymousFn.call(this,e):(g("koreAnonymousFn is not a function"),console.error("koreAnonymousFn is not a function"))):(g("test is false"),c(e.assertionFn)?e.assertionFn(e,l(this.logIn,this)):(g("assertion is not a function"),console.error("assertion is not a function"))),e.loadHistory?this.paginatedScrollDataAvailable=!0:this.paginatedScrollDataAvailable=!1,this.reWriteWebhookConfig(e)},y.prototype.reWriteWebhookConfig=function(e){if(e&&e.webhookConfig&&e.webhookConfig.enable){var t=e.botInfo.taskBotId,n="ivr",r=e.webhookConfig.webhookURL,i="hookInstance/";r.indexOf(i)>-1&&(n=r.substring(r.indexOf(i)+i.length,r.length)),e.webhookConfig.streamId=t,e.webhookConfig.channelType=n}},t.exports.instance=function(){M=!1;var e=new y;return e.KoreBot=y,e.KoreRTMClient=o.KoreRtmClient,Object.keys(u).forEach((function(t){e[t]=u[t]})),e}},{"./index.js":1,"./jstz.js":2,debug:21,events:30,inherits:23,lodash:24}],1:[function(e,t,n){var r=e("./lib/clients/events");t.exports={KoreWebClient:e("./lib/clients/web/client"),KoreRtmClient:e("./lib/clients/rtm/client"),CLIENT_EVENTS:{WEB:r.CLIENT_EVENTS.WEB,RTM:r.CLIENT_EVENTS.RTM},RTM_EVENTS:r.RTM_EVENTS,RTM_MESSAGE_SUBTYPES:r.RTM_MESSAGE_SUBTYPES}},{"./lib/clients/events":5,"./lib/clients/rtm/client":9,"./lib/clients/web/client":18}],2:[function(e,t,n){var r,i,o,a,s,u;r=this,i=function(e){var t=-e.getTimezoneOffset();return null!==t?t:0},o=function(e,t,n){var r=new Date;return void 0!==e&&r.setFullYear(e),r.setDate(n),r.setMonth(t),r},a=function(e){return i(o(e,0,2))},s=function(e){return i(o(e,5,2))},(u={determine:function(){var e,t,n,r=(e=a(),t=s(),(n=a()-s())<0?e+",1":n>0?t+",1,s":e+",0");return new u.TimeZone(u.olson.timezones[r])},date_is_dst:function(e){return(e.getMonth()>7?s(e.getFullYear()):a(e.getFullYear()))-i(e)!=0},dst_start_for:function(e){var t=new Date(2010,6,15,1,0,0,0);return{"America/Denver":new Date(2011,2,13,3,0,0,0),"America/Mazatlan":new Date(2011,3,3,3,0,0,0),"America/Chicago":new Date(2011,2,13,3,0,0,0),"America/Mexico_City":new Date(2011,3,3,3,0,0,0),"America/Asuncion":new Date(2012,9,7,3,0,0,0),"America/Santiago":new Date(2012,9,3,3,0,0,0),"America/Campo_Grande":new Date(2012,9,21,5,0,0,0),"America/Montevideo":new Date(2011,9,2,3,0,0,0),"America/Sao_Paulo":new Date(2011,9,16,5,0,0,0),"America/Los_Angeles":new Date(2011,2,13,8,0,0,0),"America/Santa_Isabel":new Date(2011,3,5,8,0,0,0),"America/Havana":new Date(2012,2,10,2,0,0,0),"America/New_York":new Date(2012,2,10,7,0,0,0),"Asia/Beirut":new Date(2011,2,27,1,0,0,0),"Europe/Helsinki":new Date(2011,2,27,4,0,0,0),"Europe/Istanbul":new Date(2011,2,28,5,0,0,0),"Asia/Damascus":new Date(2011,3,1,2,0,0,0),"Asia/Jerusalem":new Date(2011,3,1,6,0,0,0),"Asia/Gaza":new Date(2009,2,28,0,30,0,0),"Africa/Cairo":new Date(2009,3,25,0,30,0,0),"Pacific/Auckland":new Date(2011,8,26,7,0,0,0),"Pacific/Fiji":new Date(2010,11,29,23,0,0,0),"America/Halifax":new Date(2011,2,13,6,0,0,0),"America/Goose_Bay":new Date(2011,2,13,2,1,0,0),"America/Miquelon":new Date(2011,2,13,5,0,0,0),"America/Godthab":new Date(2011,2,27,1,0,0,0),"Europe/Moscow":t,"Asia/Yekaterinburg":t,"Asia/Omsk":t,"Asia/Krasnoyarsk":t,"Asia/Irkutsk":t,"Asia/Yakutsk":t,"Asia/Vladivostok":t,"Asia/Kamchatka":t,"Europe/Minsk":t,"Australia/Perth":new Date(2008,10,1,1,0,0,0)}[e]}}).TimeZone=function(e){var t={"America/Denver":["America/Denver","America/Mazatlan"],"America/Chicago":["America/Chicago","America/Mexico_City"],"America/Santiago":["America/Santiago","America/Asuncion","America/Campo_Grande"],"America/Montevideo":["America/Montevideo","America/Sao_Paulo"],"Asia/Beirut":["Asia/Beirut","Europe/Helsinki","Europe/Istanbul","Asia/Damascus","Asia/Jerusalem","Asia/Gaza"],"Pacific/Auckland":["Pacific/Auckland","Pacific/Fiji"],"America/Los_Angeles":["America/Los_Angeles","America/Santa_Isabel"],"America/New_York":["America/Havana","America/New_York"],"America/Halifax":["America/Goose_Bay","America/Halifax"],"America/Godthab":["America/Miquelon","America/Godthab"],"Asia/Dubai":["Europe/Moscow"],"Asia/Dhaka":["Asia/Yekaterinburg"],"Asia/Jakarta":["Asia/Omsk"],"Asia/Shanghai":["Asia/Krasnoyarsk","Australia/Perth"],"Asia/Tokyo":["Asia/Irkutsk"],"Australia/Brisbane":["Asia/Yakutsk"],"Pacific/Noumea":["Asia/Vladivostok"],"Pacific/Tarawa":["Asia/Kamchatka"],"Africa/Johannesburg":["Asia/Gaza","Africa/Cairo"],"Asia/Baghdad":["Europe/Minsk"]},n=e;return void 0!==t[n]&&function(){for(var e=t[n],r=e.length,i=0,o=e[0];i<r;i+=1)if(o=e[i],u.date_is_dst(u.dst_start_for(o)))return void(n=o)}(),{name:function(){return n}}},u.olson={},u.olson.timezones={"-720,0":"Etc/GMT+12","-660,0":"Pacific/Pago_Pago","-600,1":"America/Adak","-600,0":"Pacific/Honolulu","-570,0":"Pacific/Marquesas","-540,0":"Pacific/Gambier","-540,1":"America/Anchorage","-480,1":"America/Los_Angeles","-480,0":"Pacific/Pitcairn","-420,0":"America/Phoenix","-420,1":"America/Denver","-360,0":"America/Guatemala","-360,1":"America/Chicago","-360,1,s":"Pacific/Easter","-300,0":"America/Bogota","-300,1":"America/New_York","-270,0":"America/Caracas","-240,1":"America/Halifax","-240,0":"America/Santo_Domingo","-240,1,s":"America/Santiago","-210,1":"America/St_Johns","-180,1":"America/Godthab","-180,0":"America/Argentina/Buenos_Aires","-180,1,s":"America/Montevideo","-120,0":"Etc/GMT+2","-120,1":"Etc/GMT+2","-60,1":"Atlantic/Azores","-60,0":"Atlantic/Cape_Verde","0,0":"Etc/UTC","0,1":"Europe/London","60,1":"Europe/Berlin","60,0":"Africa/Lagos","60,1,s":"Africa/Windhoek","120,1":"Asia/Beirut","120,0":"Africa/Johannesburg","180,0":"Asia/Baghdad","180,1":"Europe/Moscow","210,1":"Asia/Tehran","240,0":"Asia/Dubai","240,1":"Asia/Baku","270,0":"Asia/Kabul","300,1":"Asia/Yekaterinburg","300,0":"Asia/Karachi","330,0":"Asia/Kolkata","345,0":"Asia/Kathmandu","360,0":"Asia/Dhaka","360,1":"Asia/Omsk","390,0":"Asia/Rangoon","420,1":"Asia/Krasnoyarsk","420,0":"Asia/Jakarta","480,0":"Asia/Shanghai","480,1":"Asia/Irkutsk","525,0":"Australia/Eucla","525,1,s":"Australia/Eucla","540,1":"Asia/Yakutsk","540,0":"Asia/Tokyo","570,0":"Australia/Darwin","570,1,s":"Australia/Adelaide","600,0":"Australia/Brisbane","600,1":"Asia/Vladivostok","600,1,s":"Australia/Sydney","630,1,s":"Australia/Lord_Howe","660,1":"Asia/Kamchatka","660,0":"Pacific/Noumea","690,0":"Pacific/Norfolk","720,1,s":"Pacific/Auckland","720,0":"Pacific/Tarawa","765,1,s":"Pacific/Chatham","780,0":"Pacific/Tongatapu","780,1,s":"Pacific/Apia","840,0":"Pacific/Kiritimati"},void 0!==n?n.jstz=u:r.jstz=u},{}],3:[function(e,t,n){var r=e("events"),i=e("async"),o=(e("lodash").bind?e("lodash"):_).bind,a=e("inherits"),s=e("retry"),u=e("url-join"),l=e("./events/client").WEB,c=e("./helpers"),d=e("./transports/request").requestTransport;function h(e,t){r.call(this),this._token=e,this.koreAPIUrl=t.koreAPIUrl||"https://app.kore.com/api/",this.reWriteSocketURL=t.reWriteSocketURL,this.transport=t.transport||d,this.userAgent,this._requestQueue=i.priorityQueue(o(this._callTransport,this),t.maxRequestConcurrency),this._createFacets()}a(h,r),h.prototype.emit=function(){h.super_.prototype.emit.apply(this,arguments)},h.prototype._createFacets=function(){},h.prototype._callTransport=function(e,t){var n=e.args,r=e.cb,i=this,o=s.operation(this.retryConfig),a=function e(a,s,u,c){var d,h;if(a){if(o.retry(a))return;r(o.mainError(),null)}200!==u?429===u?(i._requestQueue.pause(),d=parseInt(s["Retry-After"],10),setTimeout((function(){i.transport(n,e),i._requestQueue.resume()}),1e3*d),i.emit(l.RATE_LIMITED,d)):(h=new Error("Unable to process request, received bad "+u+" error"),r(h,c)):r(null,c),t()};o.attempt((function(){i.transport(n,a)}))},h.prototype.makeAPICall=function(e,t,n){var r=c.getAPICallArgs(this._token,t,n),i={url:/^((http|https):\/\/)/.test(e)?e:u(this.koreAPIUrl,e),data:r.data,headers:{"User-Agent":this.userAgent,"content-type":"application/json"}};t&&t.opts&&t.opts.authorization&&(i.headers.Authorization=t.opts.authorization,delete i.data.authorization),this._requestQueue.push({args:i,cb:r.cb})},t.exports=h},{"./events/client":4,"./helpers":8,"./transports/request":10,async:19,events:30,inherits:23,lodash:24,retry:26,"url-join":29}],4:[function(e,t,n){t.exports.WEB={RATE_LIMITED:"rate_limited",WEB_HOOK_READY:"webhook_ready",WEB_HOOK_RECONNECTED:"webhook_reconnected",JWT_GRANT_SUCCESS:"jwtgrantsuccess"},t.exports.RTM={CONNECTING:"connecting",AUTHENTICATED:"authenticated",WS_OPENING:"ws_opening",WS_OPENED:"ws_opened",RTM_CONNECTION_OPENED:"open",DISCONNECT:"disconnect",UNABLE_TO_RTM_START:"unable_to_rtm_start",WS_CLOSE:"ws_close",WS_ERROR:"ws_error",ATTEMPTING_RECONNECT:"attempting_reconnect",RAW_MESSAGE:"raw_message"}},{}],5:[function(e,t,n){t.exports={CLIENT_EVENTS:{WEB:e("./client").WEB,RTM:e("./client").RTM},RTM_EVENTS:e("./rtm").EVENTS,RTM_MESSAGE_SUBTYPES:e("./rtm").MESSAGE_SUBTYPES}},{"./client":4,"./rtm":6}],6:[function(e,t,n){t.exports.EVENTS={HELLO:"hello",MESSAGE:"message"},t.exports.MESSAGE_SUBTYPES={BOT_MESSAGE:"bot_message",ME_MESSAGE:"me_message"}},{}],7:[function(e,t,n){var r=e("./rtm").EVENTS;t.exports.makeMessageEventWithSubtype=function(e,t){return[r.MESSAGE,e].join(t||"::")}},{"./rtm":6}],8:[function(e,t,n){var r,i=(r=e("lodash").bind?e("lodash"):_).assign,o=r.isFunction,a=r.isUndefined,s=r.isString,u=r.forEach,l=function(e,t){var n=i({},e&&e.opts||{});return u(e||{},(function(e,t){a(e)||null===e||"opts"===t||("attachments"===t?s(e)?n[t]=e:n[t]=JSON.stringify(e):n[t]=e)})),t&&(n.token=t),n};t.exports.getData=l,t.exports.getAPICallArgs=function(e,t,n){var r,i;return 1===arguments.length?(i=noop,r=l({},e)):2===arguments.length?o(arguments[1])?(i=arguments[1],r=l({},e)):(i=noop,r=l(t,e)):3===arguments.length&&(i=n||noop,r=l(t,e)),{cb:i,data:r}}},{lodash:24}],9:[function(e,t,n){var r,i=(r=e("lodash").bind?e("lodash"):_).bind,o=r.cloneDeep,a=r.contains,s=e("inherits"),u=r.isUndefined,l=e("debug")("botsdk:KoreRTMClient"),c=e("../events/rtm").EVENTS,d=["pong",c.HELLO],h=["not_authed","invalid_auth","account_inactive","token_expired"],f=e("../events/client").RTM,m=e("../client"),p=e("../web/apis").RtmApi,g=e("../events/utils").makeMessageEventWithSubtype,y=e("../transports/ws");f=e(4);function v(e,t){var n=t||{};n.maxRequestConcurrency=1,m.call(this,e,n),this._socketFn=n.socketFn||y,this.ws=void 0,this.MAX_RECONNECTION_ATTEMPTS=n.maxReconnectionAttempts||10,this.RECONNECTION_BACKOFF=n.reconnectionBackoff||3e3,this.MAX_PONG_INTERVAL=n.maxPongInterval||1e4,this.WS_PING_INTERVAL=n.wsPingInterval||5e3,this.autoReconnect=!1!==n.autoReconnect,this.connected=!1,this.authenticated=!1,this.activeUserId=void 0,this._pendingMessages={},this._connAttempts=0,this._connecting=!1,this._reconnecting=n.maintainContext||!1,n.forceReconnecting&&(this._reconnecting=!0,n.forceReconnecting=!1),n.hasOwnProperty("_reconnecting")&&n._reconnecting&&(this._reconnecting=n._reconnecting,n._reconnecting=!1),this.user={},this.user.accessToken=n.accessToken,this.botInfo=n.botInfo||{},this.CLIENT_EVENTS=f.RTM,this.debug=l}s(v,m),v.prototype._createFacets=function(){v.super_.prototype._createFacets.call(this),this._rtm=new p(this)},v.prototype.start=function(e){this._connecting||(this.emit(f.CONNECTING),this._connecting=!0,(e=e||{botInfo:this.botInfo}).authorization="bearer "+this.user.accessToken,this._rtm.start(e,i(this._onStart,this)))},v.prototype.nextMessageId=function(){return this._messageId=this._messageId||1,this._messageId++},v.prototype._onStart=function(e,t){var n=!!this._reconnecting;this._connecting=!1,this._reconnecting=!1,t&&t.errors&&("TOKEN_EXPIRED"===t.errors[0].code||401===t.errors[0].code||"token expired"===t.errors[0].msg)&&($(".reload-btn").trigger("click",{isReconnect:!0}),t.error="token_expired"),e||!t.url?(l("error or no url in response %s",e||"no url"),this.emit(f.UNABLE_TO_RTM_START,e||t.error),t&&a(h,t.error)?("unrecoverable failure connecting to the RTM API",this.disconnect("unrecoverable failure connecting to the RTM API",t.error)):(this.authenticated=!1,this.autoReconnect&&this.reconnect())):(n&&(t.url=t.url+"&isReconnect=true"),this.authenticated=!0,this.emit(f.AUTHENTICATED,t),this.connect(t.url))},v.prototype._close=function(){this.autoReconnect=!1,this._safeDisconnect()},v.prototype._safeDisconnect=function(){this.ws&&this.ws.close(),this.authenticated=!1,this.connected=!1},v.prototype.reWriteURL=function(e){if(this.reWriteSocketURL){var t=document.createElement("a");t.href=e,this.reWriteSocketURL.protocol&&(t.protocol=this.reWriteSocketURL.protocol),this.reWriteSocketURL.hostname&&(t.hostname=this.reWriteSocketURL.hostname),this.reWriteSocketURL.port&&(t.port=this.reWriteSocketURL.port),e=t.href}return e},v.prototype.connect=function(e){l("connecting"),this.emit(f.WS_OPENING,{}),e=this.reWriteURL(e),this.ws=this._socketFn(e),this.ws.onopen=i(this.handleWsOpen,this),this.ws.onmessage=i(this.handleWsMessage,this),this.ws.onerror=i(this.handleWsError,this),this.ws.onclose=i(this.handleWsClose,this),this.ws.onping=i(this.handleWsPing,this)},v.prototype.disconnect=function(e,t){l("disconnecting"),this.emit(f.DISCONNECT,e,t),this.autoReconnect=!1,this._safeDisconnect()},v.prototype.reconnect=function(){if(l("reconnecting"),console.log("in reconnect"),!this._reconnecting){if(this._reconnecting=!0,this.emit(f.ATTEMPTING_RECONNECT),this._safeDisconnect(),this._connAttempts++,this._connAttempts>this.MAX_RECONNECTION_ATTEMPTS)throw new Error("unable to connect to kore.ai RTM API, failed after max reconnection attempts");setTimeout(i(this.start,this),this._connAttempts*this.RECONNECTION_BACKOFF)}},v.prototype.handleWsOpen=function(){l("connected"),this.connected=!0,this.emit("open",{data:{}}),this._connAttempts=0},v.prototype.handleWsMessage=function(e){var t;this.emit("message",e);try{t=JSON.parse(e)}catch(e){return}a(d,t.type)?this._handleWsMessageInternal(t.type,t):this._handleWsMessageViaEventHandler(t.type,t)},v.prototype._handleWsMessageInternal=function(e,t){e===c.HELLO&&this._handleHello()},v.prototype._handleWsMessageViaEventHandler=function(e,t){var n;if(e===c.MESSAGE&&(n=t.reply_to)){if(!this._pendingMessages[n])return;delete this._pendingMessages[n]}this.emit(e,t),e!==c.MESSAGE||u(t.subtype)||this.emit(g(t.subtype),t)},v.prototype.handleWsError=function(e){l("web socket error::%s",e),this.emit(f.WS_ERROR,e)},v.prototype.handleWsClose=function(e,t){this.connected=!1,this.emit(f.WS_CLOSE,e,t),this.autoReconnect?this._connecting||this.reconnect():(l("websocket closed with auto-reconnect false on the RTM client"),this.disconnect("websocket closed with auto-reconnect false on the RTM client"))},v.prototype.handleWsPing=function(){this.ws.pong&&this.ws.pong()},v.prototype._handleHello=function(){this.connected=!0,this.emit(f.RTM_CONNECTION_OPENED)},v.prototype.sendMessage=function(e,t){this.send(e,t)},v.prototype.send=function(e,t){var n,r,i=o(e);this.connected&&!this._reconnecting?(i.id=i.clientMessageId||this.nextMessageId(),n=JSON.stringify(i),this._pendingMessages[i.id]=i,this.ws.send(n,void 0,(function(e){u(e),u(t)||t(e)}))):(l(r="ws not connected or reconnecting, unable to send message"),u(t)||t(new Error(r)))},t.exports=v},{"../client":3,"../events/client":4,"../events/rtm":6,"../events/utils":7,"../transports/ws":11,"../web/apis":15,debug:21,inherits:23,lodash:24}],10:[function(e,t,n){var r,i=(r=e("lodash").bind?e("lodash"):_).has,o=r.partial,a=e("browser-request"),s=function(e,t,n,r){t?e(t,n&&n.headers||{},n&&n.statusCode||null,r):e(t,n.headers,n.statusCode,r)};t.exports.requestTransport=function(e,t){var n=function(e){var t={url:e.url,headers:e.headers};return i(e.data,"file")?t.formData=e.data:t.json=e.data,t}(e);e.data&&e.data.type&&"GET"===e.data.type?a.get(n,o(s,t)):a.post(n,o(s,t))}},{"browser-request":20,lodash:24}],11:[function(e,t,n){t.exports=function(e,t){return new WebSocket(e)}},{}],12:[function(e,t,n){t.exports=function(){}},{}],13:[function(e,t,n){var r=e("./BaseApi");function i(e){this.name="anonymouslogin",this.client=e,this.BaseApi=r}e("inherits")(i,r),i.prototype.login=function(e,t){var n={opts:e=e||{}};return this.client.makeAPICall("/oAuth/token/jwtgrant/anonymous",n,t)},t.exports=i},{"./BaseApi":12,inherits:23}],14:[function(e,t,n){var r=e("./BaseApi");function i(e){this.name="history",this.client=e,this.BaseApi=r}e("inherits")(i,r),i.prototype.history=function(e,t,n){var r={opts:e=e||{},type:"GET"},i="/botmessages/rtm";n&&n.webhookConfig&&n.webhookConfig.enable&&(i="/chathistory/"+n.webhookConfig.streamId+"/"+n.webhookConfig.channelType);var o=!1,a="?";return e.botInfo&&e.botInfo.taskBotId&&(!1===o?(i+=a+"botId="+e.botInfo.taskBotId,a="&",o=!0):i+=a+"botId="+e.botInfo.taskBotId,delete e.botInfo),e.offset&&(!1===o?(i+=a+"offset="+e.offset,a="&",o=!0):i+=a+"offset="+e.offset,delete e.offset),e.limit&&(!1===o?(i+=a+"limit="+e.limit,a="&",o=!0):i+=a+"limit="+e.limit,delete e.limit),e.forward&&(!1===o?(i+=a+"forward="+e.forward,a="&",o=!0):i+=a+"forward="+e.forward,delete e.forward),e.msgId&&(!1===o?(i+=a+"msgId="+e.msgId,a="&",o=!0):i+=a+"msgId="+e.msgId,delete e.msgId),this.client.makeAPICall(i,r,t)},t.exports=i},{"./BaseApi":12,inherits:23}],15:[function(e,t,n){t.exports={RtmApi:e("./rtm.js"),LogInApi:e("./login.js"),AnonymousLogin:e("./anonymouslogin.js"),HistoryApi:e("./history.js")}},{"./anonymouslogin.js":13,"./history.js":14,"./login.js":16,"./rtm.js":17}],16:[function(e,t,n){var r=e("./BaseApi");function i(e){this.name="login",this.client=e,this.BaseApi=r}e("inherits")(i,r),i.prototype.login=function(e,t){var n={opts:e=e||{}};return this.client.makeAPICall("/oAuth/token/jwtgrant",n,t)},t.exports=i},{"./BaseApi":12,inherits:23}],17:[function(e,t,n){var r=e("./BaseApi");function i(e){this.name="rtm",this.client=e,this.BaseApi=r}e("inherits")(i,r),i.prototype.start=function(e,t){var n={opts:e};return this.client.makeAPICall("/rtm/start",n,t)},t.exports=i},{"./BaseApi":12,inherits:23}],18:[function(e,t,n){var r,i=(r=e("lodash").bind?e("lodash"):_).bind,o=r.forEach,a=e("inherits"),s=e("../client"),u=e("./apis/index");function l(e,t){var n=t||{};s.call(this,e,n),this.claims=t.claims,this.retryConfig=n.retryConfig||{retries:5,factor:3.9},this.user={}}a(l,s),l.prototype._createFacets=function(){var e;l.super_.prototype._createFacets.call(this),i(this.makeAPICall,this),o(u,(function(t){this[(e=new t(this)).name]=e}),this)},t.exports=l},{"../client":3,"./apis/index":15,inherits:23,lodash:24}],19:[function(e,t,r){(function(e,r){!function(){var i,o={};function a(){}function s(e){return e}function u(e){return!!e}function c(e){return!e}var d="object"===("undefined"==typeof self?"undefined":l(self))&&self.self===self&&self||"object"===l(r)&&r.global===r&&r||this;function h(e){return function(){if(null===e)throw new Error("Callback was already called.");e.apply(this,arguments),e=null}}function f(e){return function(){null!==e&&(e.apply(this,arguments),e=null)}}null!=d&&(i=d.async),o.noConflict=function(){return d.async=i,o};var m=Object.prototype.toString,p=Array.isArray||function(e){return"[object Array]"===m.call(e)};function _(e){return p(e)||"number"==typeof e.length&&e.length>=0&&e.length%1==0}function g(e,t){for(var n=-1,r=e.length;++n<r;)t(e[n],n,e)}function y(e,t){for(var n=-1,r=e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function v(e){return y(Array(e),(function(e,t){return t}))}function M(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var T=Object.keys||function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t};function b(e){var t,n,r=-1;return _(e)?(t=e.length,function(){return++r<t?r:null}):(n=T(e),t=n.length,function(){return++r<t?n[r]:null})}function w(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r)}}}function D(e){return function(t,n,r){return e(t,r)}}var L="function"==typeof setImmediate&&setImmediate,S=L?function(e){L(e)}:function(e){setTimeout(e,0)};function k(e){return function(t,n,r){r=f(r||a);var i=b(t=t||[]);if(e<=0)return r(null);var o=!1,s=0,u=!1;!function a(){if(o&&s<=0)return r(null);for(;s<e&&!u;){var l=i();if(null===l)return o=!0,void(s<=0&&r(null));s+=1,n(t[l],l,h((function(e){s-=1,e?(r(e),u=!0):a()})))}}()}}function A(e){return function(t,n,r){return e(o.eachOf,t,n,r)}}function E(e){return function(t,n,r,i){return e(k(n),t,r,i)}}function I(e){return function(t,n,r){return e(o.eachOfSeries,t,n,r)}}function N(e,t,n,r){r=f(r||a);var i=_(t=t||[])?[]:{};e(t,(function(e,t,r){n(e,(function(e,n){i[t]=n,r(e)}))}),(function(e){r(e,i)}))}function x(e,t,n,r){var i=[];e(t,(function(e,t,r){n(e,(function(n){n&&i.push({index:t,value:e}),r()}))}),(function(){r(y(i.sort((function(e,t){return e.index-t.index})),(function(e){return e.value})))}))}function C(e,t,n,r){x(e,t,(function(e,t){n(e,(function(e){t(!e)}))}),r)}function j(e,t,n){return function(r,i,o,a){function s(){a&&a(n(!1,void 0))}function u(e,r,i){if(!a)return i();o(e,(function(r){a&&t(r)&&(a(n(!0,e)),a=o=!1),i()}))}arguments.length>3?e(r,i,u,s):(a=o,o=i,e(r,u,s))}}function Y(e,t){return t}function O(e,t,n){n=n||a;var r=_(t)?[]:{};e(t,(function(e,t,n){e(w((function(e,i){i.length<=1&&(i=i[0]),r[t]=i,n(e)})))}),(function(e){n(e,r)}))}function R(e,t,n,r){var i=[];e(t,(function(e,t,r){n(e,(function(e,t){i=i.concat(t||[]),r(e)}))}),(function(e){r(e,i)}))}function z(e,t,n){if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");function r(e,t,n,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(e.started=!0,p(t)||(t=[t]),0===t.length&&e.idle())return o.setImmediate((function(){e.drain()}));g(t,(function(t){var i={data:t,callback:r||a};n?e.tasks.unshift(i):e.tasks.push(i),e.tasks.length===e.concurrency&&e.saturated()})),o.setImmediate(e.process)}function i(e,t){return function(){s-=1;var n=!1,r=arguments;g(t,(function(e){g(u,(function(t,r){t!==e||n||(u.splice(r,1),n=!0)})),e.callback.apply(e,r)})),e.tasks.length+s===0&&e.drain(),e.process()}}var s=0,u=[],l={tasks:[],concurrency:t,payload:n,saturated:a,empty:a,drain:a,started:!1,paused:!1,push:function(e,t){r(l,e,!1,t)},kill:function(){l.drain=a,l.tasks=[]},unshift:function(e,t){r(l,e,!0,t)},process:function(){for(;!l.paused&&s<l.concurrency&&l.tasks.length;){var t=l.payload?l.tasks.splice(0,l.payload):l.tasks.splice(0,l.tasks.length),n=y(t,(function(e){return e.data}));0===l.tasks.length&&l.empty(),s+=1,u.push(t[0]);var r=h(i(l,t));e(n,r)}},length:function(){return l.tasks.length},running:function(){return s},workersList:function(){return u},idle:function(){return l.tasks.length+s===0},pause:function(){l.paused=!0},resume:function(){if(!1!==l.paused){l.paused=!1;for(var e=Math.min(l.concurrency,l.tasks.length),t=1;t<=e;t++)o.setImmediate(l.process)}}};return l}function P(e){return w((function(t,n){t.apply(null,n.concat([w((function(t,n){"object"===("undefined"==typeof console?"undefined":l(console))&&(t?console.error&&console.error(t):console[e]&&g(n,(function(t){console[e](t)})))}))]))}))}function H(e){return function(t,n,r){e(v(t),n,r)}}function U(e){return w((function(t,n){var r=w((function(n){var r=this,i=n.pop();return e(t,(function(e,t,i){e.apply(r,n.concat([i]))}),i)}));return n.length?r.apply(this,n):r}))}function F(e){return w((function(t){var n=t.pop();t.push((function(){var e=arguments;r?o.setImmediate((function(){n.apply(null,e)})):n.apply(null,e)}));var r=!0;e.apply(this,t),r=!1}))}"object"===l(e)&&"function"==typeof e.nextTick?o.nextTick=e.nextTick:o.nextTick=S,o.setImmediate=L?S:o.nextTick,o.forEach=o.each=function(e,t,n){return o.eachOf(e,D(t),n)},o.forEachSeries=o.eachSeries=function(e,t,n){return o.eachOfSeries(e,D(t),n)},o.forEachLimit=o.eachLimit=function(e,t,n,r){return k(t)(e,D(n),r)},o.forEachOf=o.eachOf=function(e,t,n){n=f(n||a);for(var r,i=b(e=e||[]),o=0;null!=(r=i());)o+=1,t(e[r],r,h(s));function s(e){o--,e?n(e):null===r&&o<=0&&n(null)}0===o&&n(null)},o.forEachOfSeries=o.eachOfSeries=function(e,t,n){n=f(n||a);var r=b(e=e||[]),i=r();!function a(){var s=!0;if(null===i)return n(null);t(e[i],i,h((function(e){if(e)n(e);else{if(null===(i=r()))return n(null);s?o.setImmediate(a):a()}}))),s=!1}()},o.forEachOfLimit=o.eachOfLimit=function(e,t,n,r){k(t)(e,n,r)},o.map=A(N),o.mapSeries=I(N),o.mapLimit=E(N),o.inject=o.foldl=o.reduce=function(e,t,n,r){o.eachOfSeries(e,(function(e,r,i){n(t,e,(function(e,n){t=n,i(e)}))}),(function(e){r(e,t)}))},o.foldr=o.reduceRight=function(e,t,n,r){var i=y(e,s).reverse();o.reduce(i,t,n,r)},o.transform=function(e,t,n,r){3===arguments.length&&(r=n,n=t,t=p(e)?[]:{}),o.eachOf(e,(function(e,r,i){n(t,e,r,i)}),(function(e){r(e,t)}))},o.select=o.filter=A(x),o.selectLimit=o.filterLimit=E(x),o.selectSeries=o.filterSeries=I(x),o.reject=A(C),o.rejectLimit=E(C),o.rejectSeries=I(C),o.any=o.some=j(o.eachOf,u,s),o.someLimit=j(o.eachOfLimit,u,s),o.all=o.every=j(o.eachOf,c,c),o.everyLimit=j(o.eachOfLimit,c,c),o.detect=j(o.eachOf,s,Y),o.detectSeries=j(o.eachOfSeries,s,Y),o.detectLimit=j(o.eachOfLimit,s,Y),o.sortBy=function(e,t,n){function r(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}o.map(e,(function(e,n){t(e,(function(t,r){t?n(t):n(null,{value:e,criteria:r})}))}),(function(e,t){if(e)return n(e);n(null,y(t.sort(r),(function(e){return e.value})))}))},o.auto=function(e,t,n){"function"==typeof arguments[1]&&(n=t,t=null),n=f(n||a);var r=T(e),i=r.length;if(!i)return n(null);t||(t=i);var s={},u=0,l=!1,c=[];function d(e){c.unshift(e)}function h(){i--,g(c.slice(0),(function(e){e()}))}d((function(){i||n(null,s)})),g(r,(function(r){if(!l){for(var i,a=p(e[r])?e[r]:[e[r]],f=w((function(e,t){if(u--,t.length<=1&&(t=t[0]),e){var i={};c=function(e,t){i[t]=e},g(T(a=s),(function(e){c(a[e],e)})),i[r]=t,l=!0,n(e,i)}else s[r]=t,o.setImmediate(h);var a,c})),m=a.slice(0,a.length-1),_=m.length;_--;){if(!(i=e[m[_]]))throw new Error("Has nonexistent dependency in "+m.join(", "));if(p(i)&&M(i,r)>=0)throw new Error("Has cyclic dependencies")}y()?(u++,a[a.length-1](f,s)):d((function e(){y()&&(u++,(t=M(c,e))>=0&&c.splice(t,1),a[a.length-1](f,s));var t}))}function y(){return u<t&&(e=function(e,t){return e&&s.hasOwnProperty(t)},n=!0,g(m,(function(t,r,i){n=e(n,t,r,i)})),n)&&!s.hasOwnProperty(r);var e,n}}))},o.retry=function(e,t,n){var r=[],i={times:5,interval:0};var a=arguments.length;if(a<1||a>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");function s(e,t){function n(e,n){return function(r){e((function(e,t){r(!e||n,{err:e,result:t})}),t)}}function a(e){return function(t){setTimeout((function(){t(null)}),e)}}for(;i.times;){var s=!(i.times-=1);r.push(n(i.task,s)),!s&&i.interval>0&&r.push(a(i.interval))}o.series(r,(function(t,n){n=n[n.length-1],(e||i.callback)(n.err,n.result)}))}return a<=2&&"function"==typeof e&&(n=t,t=e),"function"!=typeof e&&function(e,t){if("number"==typeof t)e.times=parseInt(t,10)||5;else{if("object"!==l(t))throw new Error("Unsupported argument type for 'times': "+l(t));e.times=parseInt(t.times,10)||5,e.interval=parseInt(t.interval,10)||0}}(i,e),i.callback=n,i.task=t,i.callback?s():s},o.waterfall=function(e,t){if(t=f(t||a),!p(e)){var n=new Error("First argument to waterfall must be an array of functions");return t(n)}if(!e.length)return t();!function e(n){return w((function(r,i){if(r)t.apply(null,[r].concat(i));else{var o=n.next();o?i.push(e(o)):i.push(t),F(n).apply(null,i)}}))}(o.iterator(e))()},o.parallel=function(e,t){O(o.eachOf,e,t)},o.parallelLimit=function(e,t,n){O(k(t),e,n)},o.series=function(e,t){O(o.eachOfSeries,e,t)},o.iterator=function(e){return function t(n){function r(){return e.length&&e[n].apply(null,arguments),r.next()}return r.next=function(){return n<e.length-1?t(n+1):null},r}(0)},o.apply=w((function(e,t){return w((function(n){return e.apply(null,t.concat(n))}))})),o.concat=A(R),o.concatSeries=I(R),o.whilst=function(e,t,n){if(n=n||a,e()){var r=w((function(i,o){i?n(i):e.apply(this,o)?t(r):n.apply(null,[null].concat(o))}));t(r)}else n(null)},o.doWhilst=function(e,t,n){var r=0;return o.whilst((function(){return++r<=1||t.apply(this,arguments)}),e,n)},o.until=function(e,t,n){return o.whilst((function(){return!e.apply(this,arguments)}),t,n)},o.doUntil=function(e,t,n){return o.doWhilst(e,(function(){return!t.apply(this,arguments)}),n)},o.during=function(e,t,n){n=n||a;var r=w((function(t,r){t?n(t):(r.push(i),e.apply(this,r))})),i=function(e,i){e?n(e):i?t(r):n(null)};e(i)},o.doDuring=function(e,t,n){var r=0;o.during((function(e){r++<1?e(null,!0):t.apply(this,arguments)}),e,n)},o.queue=function(e,t){return z((function(t,n){e(t[0],n)}),t,1)},o.priorityQueue=function(e,t){function n(e,t){return e.priority-t.priority}var r=o.queue(e,t);return r.push=function(e,t,i){!function(e,t,r,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");if(e.started=!0,p(t)||(t=[t]),0===t.length)return o.setImmediate((function(){e.drain()}));g(t,(function(t){var s={data:t,priority:r,callback:"function"==typeof i?i:a};e.tasks.splice(function(e,t,n){for(var r=-1,i=e.length-1;r<i;){var o=r+(i-r+1>>>1);n(t,e[o])>=0?r=o:i=o-1}return r}(e.tasks,s,n)+1,0,s),e.tasks.length===e.concurrency&&e.saturated(),o.setImmediate(e.process)}))}(r,e,t,i)},delete r.unshift,r},o.cargo=function(e,t){return z(e,1,t)},o.log=P("log"),o.dir=P("dir"),o.memoize=function(e,t){var n={},r={},i=Object.prototype.hasOwnProperty;t=t||s;var a=w((function(a){var s=a.pop(),u=t.apply(null,a);i.call(n,u)?o.setImmediate((function(){s.apply(null,n[u])})):i.call(r,u)?r[u].push(s):(r[u]=[s],e.apply(null,a.concat([w((function(e){n[u]=e;var t=r[u];delete r[u];for(var i=0,o=t.length;i<o;i++)t[i].apply(null,e)}))])))}));return a.memo=n,a.unmemoized=e,a},o.unmemoize=function(e){return function(){return(e.unmemoized||e).apply(null,arguments)}},o.times=H(o.map),o.timesSeries=H(o.mapSeries),o.timesLimit=function(e,t,n,r){return o.mapLimit(v(e),t,n,r)},o.seq=function(){var e=arguments;return w((function(t){var n=this,r=t[t.length-1];"function"==typeof r?t.pop():r=a,o.reduce(e,t,(function(e,t,r){t.apply(n,e.concat([w((function(e,t){r(e,t)}))]))}),(function(e,t){r.apply(n,[e].concat(t))}))}))},o.compose=function(){return o.seq.apply(null,Array.prototype.reverse.call(arguments))},o.applyEach=U(o.eachOf),o.applyEachSeries=U(o.eachOfSeries),o.forever=function(e,t){var n=h(t||a),r=F(e);!function e(t){if(t)return n(t);r(e)}()},o.ensureAsync=F,o.constant=w((function(e){var t=[null].concat(e);return function(e){return e.apply(this,t)}})),o.wrapSync=o.asyncify=function(e){return w((function(t){var n,r,i,o=t.pop();try{n=e.apply(this,t)}catch(e){return o(e)}("function"===(i=l(r=n))||"object"===i&&r)&&"function"==typeof n.then?n.then((function(e){o(null,e)})).catch((function(e){o(e.message?e:new Error(e))})):o(null,n)}))},"object"===l(t)&&t.exports?t.exports=o:"function"==typeof define&&n.amdO?define([],(function(){return o})):d.async=o}()}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:31}],20:[function(e,t,r){var i,o;i=this,o=function(){var e=XMLHttpRequest;if(!e)throw new Error("missing XMLHttpRequest");function t(o,a){if("function"!=typeof a)throw new Error("Bad callback given: "+a);if(!o)throw new Error("No options given");var s=o.onResponse;if((o="string"==typeof o?{uri:o}:JSON.parse(JSON.stringify(o))).onResponse=s,o.verbose&&(t.log=function(){var e,t,n={},o=["trace","debug","info","warn","error"];for(t=0;t<o.length;t++)n[e=o[t]]=r,"undefined"!=typeof console&&console&&console[e]&&(n[e]=i(console,e));return n}()),o.url&&(o.uri=o.url,delete o.url),!o.uri&&""!==o.uri)throw new Error("options.uri is a required argument");if("string"!=typeof o.uri)throw new Error("options.uri must be a string");for(var u=["proxy","_redirectsFollowed","maxRedirects","followRedirect"],l=0;l<u.length;l++)if(o[u[l]])throw new Error("options."+u[l]+" is not supported");if(o.callback=a,o.method=o.method||"GET",o.headers=o.headers||{},o.body=o.body||null,o.timeout=o.timeout||t.DEFAULT_TIMEOUT,o.headers.host)throw new Error("Options.headers.host is not supported");o.json&&(o.headers.accept=o.headers.accept||"application/json","GET"!==o.method&&(o.headers["content-type"]="application/json"),"boolean"!=typeof o.json?o.body=JSON.stringify(o.json):"string"!=typeof o.body&&(o.body=JSON.stringify(o.body)));var c=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")};if(o.qs){var d="string"==typeof o.qs?o.qs:c(o.qs);-1!==o.uri.indexOf("?")?o.uri=o.uri+"&"+d:o.uri=o.uri+"?"+d}if(o.form){if("string"==typeof o.form)throw"form name unsupported";if("POST"===o.method){var h=(o.encoding||"application/x-www-form-urlencoded").toLowerCase();switch(o.headers["content-type"]=h,h){case"application/x-www-form-urlencoded":o.body=c(o.form).replace(/%20/g,"+");break;case"multipart/form-data":var f=function(e){var t={};t.boundry="-------------------------------"+Math.floor(1e9*Math.random());var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push("--"+t.boundry+'\nContent-Disposition: form-data; name="'+r+'"\n\n'+e[r]+"\n");return n.push("--"+t.boundry+"--"),t.body=n.join(""),t.length=t.body.length,t.type="multipart/form-data; boundary="+t.boundry,t}(o.form);o.body=f.body,o.headers["content-type"]=f.type;break;default:throw new Error("unsupported encoding:"+h)}}}return o.onResponse=o.onResponse||r,!0===o.onResponse&&(o.onResponse=a,o.callback=r),!o.headers.authorization&&o.auth&&(o.headers.authorization="Basic "+function(e){var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,u=0,l="",c=[];if(!e)return e;do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[u++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<e.length);switch(l=c.join(""),e.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"="}return l}(o.auth.username+":"+o.auth.password)),function(r){var i=new e,o=!1,a=function(e){var t,n=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/;try{t=location.href}catch(e){(t=document.createElement("a")).href="",t=t.href}var r=n.exec(t.toLowerCase())||[],i=n.exec(e.toLowerCase());return!(!i||i[1]==r[1]&&i[2]==r[2]&&(i[3]||("http:"===i[1]?80:443))==(r[3]||("http:"===r[1]?80:443)))}(r.uri),s="withCredentials"in i;if(n+=1,i.seq_id=n,i.id=n+": "+r.method+" "+r.uri,i._id=i.id,a&&!s){var u=new Error("Browser does not support cross-origin request: "+r.uri);return u.cors="unsupported",r.callback(u,i)}function l(){o=!0;var e=new Error("ETIMEDOUT");return e.code="ETIMEDOUT",e.duration=r.timeout,t.log.error("Timeout",{id:i._id,milliseconds:r.timeout}),r.callback(e,i)}i.timeoutTimer=setTimeout(l,r.timeout);var c={response:!1,loading:!1,end:!1};for(var d in i.onreadystatechange=h,i.open(r.method,r.uri,!0),r.headers)i.setRequestHeader(d,r.headers[d]);return a&&(i.withCredentials=!!r.withCredentials),i.send(r.body),i;function h(n){if(o)return t.log.debug("Ignoring timed out state change",{state:i.readyState,id:i.id});t.log.debug("State change",{state:i.readyState,id:i.id,timed_out:o}),i.readyState===e.OPENED?t.log.debug("Request started",{id:i.id}):i.readyState===e.HEADERS_RECEIVED?f():i.readyState===e.LOADING?(f(),m()):i.readyState===e.DONE&&(f(),m(),p())}function f(){if(!c.response){if(c.response=!0,t.log.debug("Got response",{id:i.id,status:i.status}),clearTimeout(i.timeoutTimer),i.statusCode=i.status,a&&0==i.statusCode){var e=new Error("CORS request rejected: "+r.uri);return e.cors="rejected",c.loading=!0,c.end=!0,r.callback(e,i)}r.onResponse(null,i)}}function m(){c.loading||(c.loading=!0,t.log.debug("Response body loading",{id:i.id}))}function p(){if(!c.end){if(c.end=!0,t.log.debug("Request done",{id:i.id}),i.body=i.responseText,r.json)try{i.body=JSON.parse(i.responseText)}catch(e){return r.callback(e,i)}r.callback(null,i,i.body)}}}(o)}t.log={trace:r,debug:r,info:r,warn:r,error:r};var n=0;function r(){}function i(e,t){return function(n,r){return"object"===l(r)&&(n+=" "+JSON.stringify(r)),e[t].call(e,n)}}return t.withCredentials=!1,t.DEFAULT_TIMEOUT=12e4,t.defaults=function(e,n){var r=function(t){return function(n,r){for(var i in n="string"==typeof n?{uri:n}:JSON.parse(JSON.stringify(n)),e)void 0===n[i]&&(n[i]=e[i]);return t(n,r)}},i=r(t);return i.get=r(t.get),i.post=r(t.post),i.put=r(t.put),i.head=r(t.head),i},["get","put","post","head"].forEach((function(e){var n=e.toUpperCase();t[e.toLowerCase()]=function(e){"string"==typeof e?e={method:n,uri:e}:(e=JSON.parse(JSON.stringify(e))).method=n;var r=[e].concat(Array.prototype.slice.apply(arguments,[1]));return t.apply(this,r)}})),t.couch=function(e,n){return"string"==typeof e&&(e={uri:e}),e.json=!0,e.body&&(e.json=e.body),delete e.body,n=n||r,t(e,(function(e,t,r){if(e)return n(e,t,r);if((t.statusCode<200||t.statusCode>299)&&r.error){for(var i in e=new Error("CouchDB error: "+(r.error.reason||r.error.error)),r)e[i]=r[i];return n(e,t,r)}return n(e,t,r)}))},t},"function"==typeof define&&n.amdO||"object"===l(r)?t.exports=o():i.returnExports=o()},{}],21:[function(e,t,n){function r(){var e;try{e=n.storage.debug}catch(e){}return e}(n=t.exports=e("./debug")).log=function(){return"object"===("undefined"==typeof console?"undefined":l(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},n.formatArgs=function(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r),e},n.save=function(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}},n.load=r,n.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(r())},{"./debug":22}],22:[function(e,t,n){n=t.exports=function(e){function t(){}function o(){var e=o,t=+new Date,a=t-(r||t);e.diff=a,e.prev=r,e.curr=t,r=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=n.colors[i++%n.colors.length]);var s=Array.prototype.slice.call(arguments);s[0]=n.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var u=0;s[0]=s[0].replace(/%([a-z%])/g,(function(t,r){if("%%"===t)return t;u++;var i=n.formatters[r];if("function"==typeof i){var o=s[u];t=i.call(e,o),s.splice(u,1),u--}return t})),"function"==typeof n.formatArgs&&(s=n.formatArgs.apply(e,s)),(o.log||n.log||console.log.bind(console)).apply(e,s)}t.enabled=!1,o.enabled=!0;var a=n.enabled(e)?o:t;return a.namespace=e,a},n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,i=0;i<r;i++)t[i]&&("-"===(e=t[i].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={};var r,i=0},{ms:25}],23:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],24:[function(e,t,r){(function(e){(function(){var i,o,a,s=32,u=128,c=256,d=200,h="Expected a function",f="__lodash_placeholder__",m="[object Arguments]",p="[object Array]",_="[object Boolean]",g="[object Date]",y="[object Error]",v="[object Function]",M="[object Map]",T="[object Number]",b="[object Object]",w="[object RegExp]",D="[object Set]",L="[object String]",S="[object WeakMap]",k="[object ArrayBuffer]",A="[object Float32Array]",E="[object Float64Array]",I="[object Int8Array]",N="[object Int16Array]",x="[object Int32Array]",C="[object Uint8Array]",j="[object Uint8ClampedArray]",Y="[object Uint16Array]",O="[object Uint32Array]",R=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,P=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39|#96);/g,U=/[&<>"'`]/g,F=RegExp(H.source),W=RegExp(U.source),Q=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,G=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Z=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,K=RegExp(Z.source),X=/[\u0300-\u036f\ufe20-\ufe23]/g,$=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^0[xX]/,re=/^\[object .+?Constructor\]$/,ie=/^\d+$/,oe=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,ae=/($^)/,se=/['\n\r\u2028\u2029\\]/g,ue=(o="[A-Z\\xc0-\\xd6\\xd8-\\xde]",a="[a-z\\xdf-\\xf6\\xf8-\\xff]+",RegExp(o+"+(?="+o+a+")|"+o+"?"+a+"|"+o+"+|[0-9]+","g")),le=["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"],ce=-1,de={};de[A]=de[E]=de[I]=de[N]=de[x]=de[C]=de[j]=de[Y]=de[O]=!0,de[m]=de[p]=de[k]=de[_]=de[g]=de[y]=de[v]=de[M]=de[T]=de[b]=de[w]=de[D]=de[L]=de[S]=!1;var he={};he[m]=he[p]=he[k]=he[_]=he[g]=he[A]=he[E]=he[I]=he[N]=he[x]=he[T]=he[b]=he[w]=he[L]=he[C]=he[j]=he[Y]=he[O]=!0,he[y]=he[v]=he[M]=he[D]=he[S]=!1;var fe={À:"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"},me={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},pe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},_e={function:!0,object:!0},ge={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"},ye={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ve=_e[l(r)]&&r&&!r.nodeType&&r,Me=_e[l(t)]&&t&&!t.nodeType&&t,Te=ve&&Me&&"object"==l(e)&&e&&e.Object&&e,be=_e["undefined"==typeof self?"undefined":l(self)]&&self&&self.Object&&self,we=_e["undefined"==typeof window?"undefined":l(window)]&&window&&window.Object&&window,De=Me&&Me.exports===ve&&ve,Le=Te||we!==(this&&this.window)&&we||be||this;function Se(e,t){if(e!==t){var n=null===e,r=e===i,o=e==e,a=null===t,s=t===i,u=t==t;if(e>t&&!a||!o||n&&!s&&u||r&&u)return 1;if(e<t&&!n||!u||a&&!r&&o||s&&o)return-1}return 0}function ke(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i<r;)if(t(e[i],i,e))return i;return-1}function Ae(e,t,n){if(t!=t)return ze(e,n);for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Ee(e){return"function"==typeof e||!1}function Ie(e){return null==e?"":e+""}function Ne(e,t){for(var n=-1,r=e.length;++n<r&&t.indexOf(e.charAt(n))>-1;);return n}function xe(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function Ce(e,t){return Se(e.criteria,t.criteria)||e.index-t.index}function je(e){return fe[e]}function Ye(e){return me[e]}function Oe(e,t,n){return t?e=ge[e]:n&&(e=ye[e]),"\\"+e}function Re(e){return"\\"+ye[e]}function ze(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i<r;){var o=e[i];if(o!=o)return i}return-1}function Pe(e){return!!e&&"object"==l(e)}function He(e){return e<=160&&e>=9&&e<=13||32==e||160==e||5760==e||6158==e||e>=8192&&(e<=8202||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function Ue(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;)e[n]===t&&(e[n]=f,o[++i]=n);return o}function Fe(e){for(var t=-1,n=e.length;++t<n&&He(e.charCodeAt(t)););return t}function We(e){for(var t=e.length;t--&&He(e.charCodeAt(t)););return t}function Qe(e){return pe[e]}var Be=function e(t){var n=(t=t?Be.defaults(Le.Object(),t,Be.pick(Le,le)):Le).Array,r=t.Date,o=t.Error,a=t.Function,M=t.Math,D=t.Number,S=t.Object,fe=t.RegExp,me=t.String,pe=t.TypeError,_e=n.prototype,ge=S.prototype,ye=me.prototype,ve=a.prototype.toString,Me=ge.hasOwnProperty,Te=0,be=ge.toString,we=Le._,De=fe("^"+ve.call(Me).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=t.ArrayBuffer,qe=t.clearTimeout,Ve=t.parseFloat,Ge=M.pow,Je=ge.propertyIsEnumerable,Ze=lr(t,"Set"),Ke=t.setTimeout,Xe=_e.splice,$e=t.Uint8Array,et=lr(t,"WeakMap"),tt=M.ceil,nt=lr(S,"create"),rt=M.floor,it=lr(n,"isArray"),ot=t.isFinite,at=lr(S,"keys"),st=M.max,ut=M.min,lt=lr(r,"now"),ct=t.parseInt,dt=M.random,ht=D.NEGATIVE_INFINITY,ft=D.POSITIVE_INFINITY,mt=4294967295,pt=4294967294,_t=2147483647,gt=9007199254740991,yt=et&&new et,vt={};function Mt(e){if(Pe(e)&&!Ri(e)&&!(e instanceof wt)){if(e instanceof bt)return e;if(Me.call(e,"__chain__")&&Me.call(e,"__wrapped__"))return kr(e)}return new bt(e)}function Tt(){}function bt(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}function wt(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ft,this.__views__=[]}function Dt(){this.__data__={}}function Lt(e){var t=e?e.length:0;for(this.data={hash:nt(null),set:new Ze};t--;)this.push(e[t])}function St(e,t){var n=e.data;return("string"==typeof t||Ui(t)?n.set.has(t):n.hash[t])?0:-1}function kt(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function At(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function It(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[++i]=a)}return o}function Nt(e,t){for(var r=-1,i=e.length,o=n(i);++r<i;)o[r]=t(e[r],r,e);return o}function xt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ct(e,t,n,r){var i=-1,o=e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function jt(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Yt(e,t,n,r){return e!==i&&Me.call(r,n)?e:t}function Ot(e,t,n){for(var r=-1,o=uo(t),a=o.length;++r<a;){var s=o[r],u=e[s],l=n(u,t[s],s,e,t);((l==l?l!==u:u==u)||u===i&&!(s in e))&&(e[s]=l)}return e}function Rt(e,t){return null==t?e:Pt(t,uo(t),e)}function zt(e,t){for(var r=-1,o=null==e,a=!o&&dr(e),s=a?e.length:0,u=t.length,l=n(u);++r<u;){var c=t[r];l[r]=a?hr(c,s)?e[c]:i:o?i:e[c]}return l}function Pt(e,t,n){n||(n={});for(var r=-1,i=t.length;++r<i;){var o=t[r];n[o]=e[o]}return n}function Ht(e,t,n){var r=l(e);return"function"==r?t===i?e:Dn(e,t,n):null==e?Eo:"object"==r?un(e):t===i?Yo(e):ln(e,t)}function Ut(e,t,n,r,o,a,s){var u;if(n&&(u=o?n(e,r,o):n(e)),u!==i)return u;if(!Ui(e))return e;var l=Ri(e);if(l){if(u=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Me.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return kt(e,u)}else{var c=be.call(e),d=c==v;if(c!=b&&c!=m&&(!d||o))return he[c]?function(e,t,n){var r=e.constructor;switch(t){case k:return Ln(e);case _:case g:return new r(+e);case A:case E:case I:case N:case x:case C:case j:case Y:case O:var i=e.buffer;return new r(n?Ln(i):i,e.byteOffset,e.length);case T:case L:return new r(e);case w:var o=new r(e.source,te.exec(e));o.lastIndex=e.lastIndex}return o}(e,c,t):o?e:{};if(u=function(e){var t=e.constructor;"function"==typeof t&&t instanceof t||(t=S);return new t}(d?{}:e),!t)return Rt(u,e)}a||(a=[]),s||(s=[]);for(var h=a.length;h--;)if(a[h]==e)return s[h];return a.push(e),s.push(u),(l?At:en)(e,(function(r,i){u[i]=Ut(r,t,n,i,e,a,s)})),u}Mt.support={},Mt.templateSettings={escape:Q,evaluate:B,interpolate:q,variable:"",imports:{_:Mt}};var Ft=function(){function e(){}return function(t){if(Ui(t)){e.prototype=t;var n=new e;e.prototype=i}return n||{}}}();function Wt(e,t,n){if("function"!=typeof e)throw new pe(h);return Ke((function(){e.apply(i,n)}),t)}function Qt(e,t){var n=e?e.length:0,r=[];if(!n)return r;var i=-1,o=ar(),a=o==Ae,s=a&&t.length>=d?xn(t):null,u=t.length;s&&(o=St,a=!1,t=s);e:for(;++i<n;){var l=e[i];if(a&&l==l){for(var c=u;c--;)if(t[c]===l)continue e;r.push(l)}else o(t,l,0)<0&&r.push(l)}return r}var Bt=In(en),qt=In(tn,!0);function Vt(e,t){var n=!0;return Bt(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function Gt(e,t){var n=[];return Bt(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Jt(e,t,n,r){var i;return n(e,(function(e,n,o){if(t(e,n,o))return i=r?n:e,!1})),i}function Zt(e,t,n,r){r||(r=[]);for(var i=-1,o=e.length;++i<o;){var a=e[i];Pe(a)&&dr(a)&&(n||Ri(a)||Oi(a))?t?Zt(a,t,n,r):xt(r,a):n||(r[r.length]=a)}return r}var Kt=Nn(),Xt=Nn(!0);function $t(e,t){return Kt(e,t,lo)}function en(e,t){return Kt(e,t,uo)}function tn(e,t){return Xt(e,t,uo)}function nn(e,t){for(var n=-1,r=t.length,i=-1,o=[];++n<r;){var a=t[n];Hi(e[a])&&(o[++i]=a)}return o}function rn(e,t,n){if(null!=e){n!==i&&n in Lr(e)&&(t=[n]);for(var r=0,o=t.length;null!=e&&r<o;)e=e[t[r++]];return r&&r==o?e:i}}function on(e,t,n,r,i,o){return e===t||(null==e||null==t||!Ui(e)&&!Pe(t)?e!=e&&t!=t:function(e,t,n,r,i,o,a){var s=Ri(e),u=Ri(t),l=p,c=p;s||((l=be.call(e))==m?l=b:l!=b&&(s=Vi(e)));u||((c=be.call(t))==m?c=b:c!=b&&(u=Vi(t)));var d=l==b,h=c==b,f=l==c;if(f&&!s&&!d)return function(e,t,n){switch(n){case _:case g:return+e==+t;case y:return e.name==t.name&&e.message==t.message;case T:return e!=+e?t!=+t:e==+t;case w:case L:return e==t+""}return!1}(e,t,l);if(!i){var v=d&&Me.call(e,"__wrapped__"),M=h&&Me.call(t,"__wrapped__");if(v||M)return n(v?e.value():e,M?t.value():t,r,i,o,a)}if(!f)return!1;o||(o=[]),a||(a=[]);var D=o.length;for(;D--;)if(o[D]==e)return a[D]==t;o.push(e),a.push(t);var S=(s?tr:nr)(e,t,n,r,i,o,a);return o.pop(),a.pop(),S}(e,t,on,n,r,i,o))}function an(e,t,n){var r=t.length,o=r,a=!n;if(null==e)return!o;for(e=Lr(e);r--;){var s=t[r];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<o;){var u=(s=t[r])[0],l=e[u],c=s[1];if(a&&s[2]){if(l===i&&!(u in e))return!1}else{var d=n?n(l,c,u):i;if(!(d===i?on(c,l,n,!0):d))return!1}}return!0}function sn(e,t){var r=-1,i=dr(e)?n(e.length):[];return Bt(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function un(e){var t=ur(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&(e[n]===r&&(r!==i||n in Lr(e)))}}return function(e){return an(e,t)}}function ln(e,t){var n=Ri(e),r=mr(e)&&gr(t),o=e+"";return e=Sr(e),function(a){if(null==a)return!1;var s=o;if(a=Lr(a),(n||!r)&&!(s in a)){if(null==(a=1==e.length?a:rn(a,mn(e,0,-1))))return!1;s=Or(e),a=Lr(a)}return a[s]===t?t!==i||s in a:on(t,a[s],i,!0)}}function cn(e){return function(t){return null==t?i:t[e]}}function dn(e,t){for(var n=e?t.length:0;n--;){var r=t[n];if(r!=i&&hr(r)){var i=r;Xe.call(e,r,1)}}return e}function hn(e,t){return e+rt(dt()*(t-e+1))}var fn=yt?function(e,t){return yt.set(e,t),e}:Eo;function mn(e,t,r){var o=-1,a=e.length;(t=null==t?0:+t||0)<0&&(t=-t>a?0:a+t),(r=r===i||r>a?a:+r||0)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var s=n(a);++o<a;)s[o]=e[o+t];return s}function pn(e,t){var n;return Bt(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function _n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function gn(e,t,n){var r=rr(),i=-1;return t=Nt(t,(function(e){return r(e)})),_n(sn(e,(function(e){return{criteria:Nt(t,(function(t){return t(e)})),index:++i,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var u=Se(i[r],o[r]);if(u){if(r>=s)return u;var l=n[r];return u*("asc"===l||!0===l?1:-1)}}return e.index-t.index}(e,t,n)}))}function yn(e,t){var n=-1,r=ar(),i=e.length,o=r==Ae,a=o&&i>=d,s=a?xn():null,u=[];s?(r=St,o=!1):(a=!1,s=t?[]:u);e:for(;++n<i;){var l=e[n],c=t?t(l,n,e):l;if(o&&l==l){for(var h=s.length;h--;)if(s[h]===c)continue e;t&&s.push(c),u.push(l)}else r(s,c,0)<0&&((t||a)&&s.push(c),u.push(l))}return u}function vn(e,t){for(var r=-1,i=t.length,o=n(i);++r<i;)o[r]=e[t[r]];return o}function Mn(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?mn(e,r?0:o,r?o+1:i):mn(e,r?o+1:0,r?i:o)}function Tn(e,t){var n=e;n instanceof wt&&(n=n.value());for(var r=-1,i=t.length;++r<i;){var o=t[r];n=o.func.apply(o.thisArg,xt([n],o.args))}return n}function bn(e,t,n){var r=0,i=e?e.length:r;if("number"==typeof t&&t==t&&i<=_t){for(;r<i;){var o=r+i>>>1,a=e[o];(n?a<=t:a<t)&&null!==a?r=o+1:i=o}return i}return wn(e,t,Eo,n)}function wn(e,t,n,r){t=n(t);for(var o=0,a=e?e.length:0,s=t!=t,u=null===t,l=t===i;o<a;){var c=rt((o+a)/2),d=n(e[c]),h=d!==i,f=d==d;if(s)var m=f||r;else m=u?f&&h&&(r||null!=d):l?f&&(r||h):null!=d&&(r?d<=t:d<t);m?o=c+1:a=c}return ut(a,pt)}function Dn(e,t,n){if("function"!=typeof e)return Eo;if(t===i)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}function Ln(e){var t=new He(e.byteLength);return new $e(t).set(new $e(e)),t}function Sn(e,t,r){for(var i=r.length,o=-1,a=st(e.length-i,0),s=-1,u=t.length,l=n(u+a);++s<u;)l[s]=t[s];for(;++o<i;)l[r[o]]=e[o];for(;a--;)l[s++]=e[o++];return l}function kn(e,t,r){for(var i=-1,o=r.length,a=-1,s=st(e.length-o,0),u=-1,l=t.length,c=n(s+l);++a<s;)c[a]=e[a];for(var d=a;++u<l;)c[d+u]=t[u];for(;++i<o;)c[d+r[i]]=e[a++];return c}function An(e,t){return function(n,r,i){var o=t?t():{};if(r=rr(r,i,3),Ri(n))for(var a=-1,s=n.length;++a<s;){var u=n[a];e(o,u,r(u,a,n),n)}else Bt(n,(function(t,n,i){e(o,t,r(t,n,i),i)}));return o}}function En(e){return ji((function(t,n){var r=-1,o=null==t?0:n.length,a=o>2?n[o-2]:i,s=o>2?n[2]:i,u=o>1?n[o-1]:i;for("function"==typeof a?(a=Dn(a,u,5),o-=2):o-=(a="function"==typeof u?u:i)?1:0,s&&fr(n[0],n[1],s)&&(a=o<3?i:a,o=1);++r<o;){var l=n[r];l&&e(t,l,a)}return t}))}function In(e,t){return function(n,r){var i=n?sr(n):0;if(!_r(i))return e(n,r);for(var o=t?i:-1,a=Lr(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Nn(e){return function(t,n,r){for(var i=Lr(t),o=r(t),a=o.length,s=e?a:-1;e?s--:++s<a;){var u=o[s];if(!1===n(i[u],u,i))break}return t}}function xn(e){return nt&&Ze?new Lt(e):null}function Cn(e){return function(t){for(var n=-1,r=So(yo(t)),i=r.length,o="";++n<i;)o=e(o,r[n],n);return o}}function jn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Ft(e.prototype),r=e.apply(n,t);return Ui(r)?r:n}}function Yn(e){return function t(n,r,o){o&&fr(n,r,o)&&(r=i);var a=er(n,e,i,i,i,i,i,r);return a.placeholder=t.placeholder,a}}function On(e,t){return ji((function(n){var r=n[0];return null==r?r:(n.push(t),e.apply(i,n))}))}function Rn(e,t){return function(n,r,o){if(o&&fr(n,r,o)&&(r=i),1==(r=rr(r,o,3)).length){var a=function(e,t,n,r){for(var i=-1,o=e.length,a=r,s=a;++i<o;){var u=e[i],l=+t(u);n(l,a)&&(a=l,s=u)}return s}(n=Ri(n)?n:Dr(n),r,e,t);if(!n.length||a!==t)return a}return function(e,t,n,r){var i=r,o=i;return Bt(e,(function(e,a,s){var u=+t(e,a,s);(n(u,i)||u===r&&u===o)&&(i=u,o=e)})),o}(n,r,e,t)}}function zn(e,t){return function(n,r,o){if(r=rr(r,o,3),Ri(n)){var a=ke(n,r,t);return a>-1?n[a]:i}return Jt(n,r,e)}}function Pn(e){return function(t,n,r){return t&&t.length?ke(t,n=rr(n,r,3),e):-1}}function Hn(e){return function(t,n,r){return Jt(t,n=rr(n,r,3),e,!0)}}function Un(e){return function(){for(var t,r=arguments.length,o=e?r:-1,a=0,s=n(r);e?o--:++o<r;){var u=s[a++]=arguments[o];if("function"!=typeof u)throw new pe(h);!t&&bt.prototype.thru&&"wrapper"==or(u)&&(t=new bt([],!0))}for(o=t?-1:r;++o<r;){var l=or(u=s[o]),c="wrapper"==l?ir(u):i;t=c&&pr(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?t[or(c[0])].apply(t,c[3]):1==u.length&&pr(u)?t[l]():t.thru(u)}return function(){var e=arguments,n=e[0];if(t&&1==e.length&&Ri(n)&&n.length>=d)return t.plant(n).value();for(var i=0,o=r?s[i].apply(this,e):n;++i<r;)o=s[i].call(this,o);return o}}}function Fn(e,t){return function(n,r,o){return"function"==typeof r&&o===i&&Ri(n)?e(n,r):t(n,Dn(r,o,3))}}function Wn(e){return function(t,n,r){return"function"==typeof n&&r===i||(n=Dn(n,r,3)),e(t,n,lo)}}function Qn(e){return function(t,n,r){return"function"==typeof n&&r===i||(n=Dn(n,r,3)),e(t,n)}}function Bn(e){return function(t,n,r){var i={};return n=rr(n,r,3),en(t,(function(t,r,o){var a=n(t,r,o);t=e?t:a,i[r=e?a:r]=t})),i}}function qn(e){return function(t,n,r){return t=Ie(t),(e?t:"")+Zn(t,n,r)+(e?"":t)}}function Vn(e){var t=ji((function(n,r){var o=Ue(r,t.placeholder);return er(n,e,i,r,o)}));return t}function Gn(e,t){return function(n,r,o,a){var s=arguments.length<3;return"function"==typeof r&&a===i&&Ri(n)?e(n,r,o,s):function(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}(n,rr(r,a,4),o,s,t)}}function Jn(e,t,r,o,a,l,c,d,h,f){var m=t&u,p=1&t,_=2&t,g=8&t,y=4&t,v=16&t,M=_?i:jn(e);return function u(){for(var T=arguments.length,b=T,w=n(T);b--;)w[b]=arguments[b];if(o&&(w=Sn(w,o,a)),l&&(w=kn(w,l,c)),g||v){var D=u.placeholder,L=Ue(w,D);if((T-=L.length)<f){var S=d?kt(d):i,k=st(f-T,0);t|=g?s:64,t&=~(g?64:s),y||(t&=-4);var A=[e,t,r,g?w:i,g?L:i,g?i:w,g?i:L,S,h,k],E=Jn.apply(i,A);return pr(e)&&br(E,A),E.placeholder=D,E}}var I=p?r:this,N=_?I[e]:e;return d&&(w=function(e,t){var n=e.length,r=ut(t.length,n),o=kt(e);for(;r--;){var a=t[r];e[r]=hr(a,n)?o[a]:i}return e}(w,d)),m&&h<w.length&&(w.length=h),this&&this!==Le&&this instanceof u&&(N=M||jn(e)),N.apply(I,w)}}function Zn(e,t,n){var r=e.length;if(r>=(t=+t)||!ot(t))return"";var i=t-r;return bo(n=null==n?" ":n+"",tt(i/n.length)).slice(0,i)}function Kn(e,t,r,i){var o=1&t,a=jn(e);return function t(){for(var s=-1,u=arguments.length,l=-1,c=i.length,d=n(c+u);++l<c;)d[l]=i[l];for(;u--;)d[l++]=arguments[++s];return(this&&this!==Le&&this instanceof t?a:e).apply(o?r:this,d)}}function Xn(e){var t=M[e];return function(e,n){return(n=n===i?0:+n||0)?(n=Ge(10,n),t(e*n)/n):t(e)}}function $n(e){return function(t,n,r,i){var o=rr(r);return null==r&&o===Ht?bn(t,n,e):wn(t,n,o(r,i,1),e)}}function er(e,t,n,r,o,a,l,d){var m=2&t;if(!m&&"function"!=typeof e)throw new pe(h);var p=r?r.length:0;if(p||(t&=-97,r=o=i),p-=o?o.length:0,64&t){var _=r,g=o;r=o=i}var y=m?i:ir(e),v=[e,t,n,r,o,_,g,a,l,d];if(y&&(!function(e,t){var n=e[1],r=t[1],i=n|r,o=i<u,a=r==u&&8==n||r==u&&n==c&&e[7].length<=t[8]||384==r&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?Sn(l,s,t[4]):kt(s),e[4]=l?Ue(e[3],f):kt(t[4])}(s=t[5])&&(l=e[5],e[5]=l?kn(l,s,t[6]):kt(s),e[6]=l?Ue(e[5],f):kt(t[6]));(s=t[7])&&(e[7]=kt(s));r&u&&(e[8]=null==e[8]?t[8]:ut(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(v,y),t=v[1],d=v[9]),v[9]=null==d?m?0:e.length:st(d-p,0)||0,1==t)var M=function(e,t){var n=jn(e);return function r(){return(this&&this!==Le&&this instanceof r?n:e).apply(t,arguments)}}(v[0],v[2]);else M=t!=s&&33!=t||v[4].length?Jn.apply(i,v):Kn.apply(i,v);return(y?fn:br)(M,v)}function tr(e,t,n,r,o,a,s){var u=-1,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;for(;++u<l;){var d=e[u],h=t[u],f=r?r(o?h:d,o?d:h,u):i;if(f!==i){if(f)continue;return!1}if(o){if(!jt(t,(function(e){return d===e||n(d,e,r,o,a,s)})))return!1}else if(d!==h&&!n(d,h,r,o,a,s))return!1}return!0}function nr(e,t,n,r,o,a,s){var u=uo(e),l=u.length;if(l!=uo(t).length&&!o)return!1;for(var c=l;c--;){var d=u[c];if(!(o?d in t:Me.call(t,d)))return!1}for(var h=o;++c<l;){var f=e[d=u[c]],m=t[d],p=r?r(o?m:f,o?f:m,d):i;if(!(p===i?n(f,m,r,o,a,s):p))return!1;h||(h="constructor"==d)}if(!h){var _=e.constructor,g=t.constructor;if(_!=g&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof g&&g instanceof g))return!1}return!0}function rr(e,t,n){var r=Mt.callback||Ao;return r=r===Ao?Ht:r,n?r(e,t,n):r}var ir=yt?function(e){return yt.get(e)}:jo;function or(e){for(var t=e.name,n=vt[t],r=n?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function ar(e,t,n){var r=Mt.indexOf||jr;return r=r===jr?Ae:r,e?r(e,t,n):r}var sr=cn("length");function ur(e){for(var t=mo(e),n=t.length;n--;)t[n][2]=gr(t[n][1]);return t}function lr(e,t){var n=null==e?i:e[t];return Fi(n)?n:i}function cr(e,t,n){null==e||mr(t,e)||(e=1==(t=Sr(t)).length?e:rn(e,mn(t,0,-1)),t=Or(t));var r=null==e?e:e[t];return null==r?i:r.apply(e,n)}function dr(e){return null!=e&&_r(sr(e))}function hr(e,t){return e="number"==typeof e||ie.test(e)?+e:-1,t=null==t?gt:t,e>-1&&e%1==0&&e<t}function fr(e,t,n){if(!Ui(n))return!1;var r=l(t);if("number"==r?dr(n)&&hr(t,n.length):"string"==r&&t in n){var i=n[t];return e==e?e===i:i!=i}return!1}function mr(e,t){var n=l(e);return!!("string"==n&&G.test(e)||"number"==n)||!Ri(e)&&(!V.test(e)||null!=t&&e in Lr(t))}function pr(e){var t=or(e);if(!(t in wt.prototype))return!1;var n=Mt[t];if(e===n)return!0;var r=ir(n);return!!r&&e===r[0]}function _r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=gt}function gr(e){return e==e&&!Ui(e)}function yr(e,t){e=Lr(e);for(var n=-1,r=t.length,i={};++n<r;){var o=t[n];o in e&&(i[o]=e[o])}return i}function vr(e,t){var n={};return $t(e,(function(e,r,i){t(e,r,i)&&(n[r]=e)})),n}var Mr,Tr,br=(Mr=0,Tr=0,function(e,t){var n=gi(),r=16-(n-Tr);if(Tr=n,r>0){if(++Mr>=150)return e}else Mr=0;return fn(e,t)});function wr(e){for(var t=lo(e),n=t.length,r=n&&e.length,i=!!r&&_r(r)&&(Ri(e)||Oi(e)),o=-1,a=[];++o<n;){var s=t[o];(i&&hr(s,r)||Me.call(e,s))&&a.push(s)}return a}function Dr(e){return null==e?[]:dr(e)?Ui(e)?e:S(e):_o(e)}function Lr(e){return Ui(e)?e:S(e)}function Sr(e){if(Ri(e))return e;var t=[];return Ie(e).replace(J,(function(e,n,r,i){t.push(r?i.replace($,"$1"):n||e)})),t}function kr(e){return e instanceof wt?e.clone():new bt(e.__wrapped__,e.__chain__,kt(e.__actions__))}var Ar=ji((function(e,t){return Pe(e)&&dr(e)?Qt(e,Zt(t,!1,!0)):[]}));function Er(e,t,n){return(e?e.length:0)?((n?fr(e,t,n):null==t)&&(t=1),mn(e,t<0?0:t)):[]}function Ir(e,t,n){var r=e?e.length:0;return r?((n?fr(e,t,n):null==t)&&(t=1),mn(e,0,(t=r-(+t||0))<0?0:t)):[]}var Nr=Pn(),xr=Pn(!0);function Cr(e){return e?e[0]:i}function jr(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=n<0?st(r+n,0):n;else if(n){var i=bn(e,t);return i<r&&(t==t?t===e[i]:e[i]!=e[i])?i:-1}return Ae(e,t,n||0)}var Yr=ji((function(e){for(var t=e.length,r=t,i=n(d),o=ar(),a=o==Ae,s=[];r--;){var u=e[r]=dr(u=e[r])?u:[];i[r]=a&&u.length>=120?xn(r&&u):null}var l=e[0],c=-1,d=l?l.length:0,h=i[0];e:for(;++c<d;)if(u=l[c],(h?St(h,u):o(s,u,0))<0){for(r=t;--r;){var f=i[r];if((f?St(f,u):o(e[r],u,0))<0)continue e}h&&h.push(u),s.push(u)}return s}));function Or(e){var t=e?e.length:0;return t?e[t-1]:i}var Rr=ji((function(e,t){var n=zt(e,t=Zt(t));return dn(e,t.sort(Se)),n}));function zr(e){return Er(e,1)}var Pr=$n(),Hr=$n(!0),Ur=ji((function(e){return yn(Zt(e,!1,!0))}));function Fr(e,t,n,r){if(!(e?e.length:0))return[];null!=t&&"boolean"!=typeof t&&(n=fr(e,t,r=n)?i:t,t=!1);var o=rr();return null==n&&o===Ht||(n=o(n,r,3)),t&&ar()==Ae?function(e,t){for(var n,r=-1,i=e.length,o=-1,a=[];++r<i;){var s=e[r],u=t?t(s,r,e):s;r&&n===u||(n=u,a[++o]=s)}return a}(e,n):yn(e,n)}function Wr(e){if(!e||!e.length)return[];var t=-1,r=0;e=It(e,(function(e){if(dr(e))return r=st(e.length,r),!0}));for(var i=n(r);++t<r;)i[t]=Nt(e,cn(t));return i}function Qr(e,t,n){if(!(e?e.length:0))return[];var r=Wr(e);return null==t?r:(t=Dn(t,n,4),Nt(r,(function(e){return Ct(e,t,i,!0)})))}var Br=ji((function(e,t){return dr(e)?Qt(e,t):[]})),qr=ji(Wr);function Vr(e,t){var n=-1,r=e?e.length:0,i={};for(!r||t||Ri(e[0])||(t=[]);++n<r;){var o=e[n];t?i[o]=t[n]:o&&(i[o[0]]=o[1])}return i}var Gr=ji((function(e){var t=e.length,n=t>2?e[t-2]:i,r=t>1?e[t-1]:i;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):i,r=i),e.length=t,Qr(e,n,r)}));function Jr(e){var t=Mt(e);return t.__chain__=!0,t}function Zr(e,t,n){return t.call(n,e)}var Kr=ji((function(e){return e=Zt(e),this.thru((function(t){return function(e,t){for(var r=-1,i=e.length,o=-1,a=t.length,s=n(i+a);++r<i;)s[r]=e[r];for(;++o<a;)s[r++]=t[o];return s}(Ri(t)?t:[Lr(t)],e)}))})),Xr=ji((function(e,t){return zt(e,Zt(t))})),$r=An((function(e,t,n){Me.call(e,n)?++e[n]:e[n]=1}));function ei(e,t,n){var r=Ri(e)?Et:Vt;return n&&fr(e,t,n)&&(t=i),"function"==typeof t&&n===i||(t=rr(t,n,3)),r(e,t)}function ti(e,t,n){return(Ri(e)?It:Gt)(e,t=rr(t,n,3))}var ni=zn(Bt),ri=zn(qt,!0),ii=Fn(At,Bt),oi=Fn((function(e,t){for(var n=e.length;n--&&!1!==t(e[n],n,e););return e}),qt),ai=An((function(e,t,n){Me.call(e,n)?e[n].push(t):e[n]=[t]}));function si(e,t,n,r){var i=e?sr(e):0;return _r(i)||(i=(e=_o(e)).length),n="number"!=typeof n||r&&fr(t,n,r)?0:n<0?st(i+n,0):n||0,"string"==typeof e||!Ri(e)&&qi(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ar(e,t,n)>-1}var ui=An((function(e,t,n){e[n]=t})),li=ji((function(e,t,r){var o=-1,a="function"==typeof t,s=mr(t),u=dr(e)?n(e.length):[];return Bt(e,(function(e){var n=a?t:s&&null!=e?e[t]:i;u[++o]=n?n.apply(e,r):cr(e,t,r)})),u}));function ci(e,t,n){return(Ri(e)?Nt:sn)(e,t=rr(t,n,3))}var di=An((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),hi=Gn(Ct,Bt),fi=Gn((function(e,t,n,r){var i=e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}),qt);function mi(e,t,n){if(n?fr(e,t,n):null==t)return(r=(e=Dr(e)).length)>0?e[hn(0,r-1)]:i;var r,o=-1,a=Ji(e),s=(r=a.length)-1;for(t=ut(t<0?0:+t||0,r);++o<t;){var u=hn(o,s),l=a[u];a[u]=a[o],a[o]=l}return a.length=t,a}function pi(e,t,n){var r=Ri(e)?jt:pn;return n&&fr(e,t,n)&&(t=i),"function"==typeof t&&n===i||(t=rr(t,n,3)),r(e,t)}var _i=ji((function(e,t){if(null==e)return[];var n=t[2];return n&&fr(t[0],t[1],n)&&(t.length=1),gn(e,Zt(t),[])})),gi=lt||function(){return(new r).getTime()};function yi(e,t){var n;if("function"!=typeof t){if("function"!=typeof e)throw new pe(h);var r=e;e=t,t=r}return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var vi=ji((function(e,t,n){var r=1;if(n.length){var i=Ue(n,vi.placeholder);r|=s}return er(e,r,t,n,i)})),Mi=ji((function(e,t){for(var n=-1,r=(t=t.length?Zt(t):so(e)).length;++n<r;){var i=t[n];e[i]=er(e[i],1,e)}return e})),Ti=ji((function(e,t,n){var r=3;if(n.length){var i=Ue(n,Ti.placeholder);r|=s}return er(t,r,e,n,i)})),bi=Yn(8),wi=Yn(16);function Di(e,t,n){var r,o,a,s,u,l,c,d=0,f=!1,m=!0;if("function"!=typeof e)throw new pe(h);if(t=t<0?0:+t||0,!0===n){var p=!0;m=!1}else Ui(n)&&(p=!!n.leading,f="maxWait"in n&&st(+n.maxWait||0,t),m="trailing"in n?!!n.trailing:m);function _(t,n){n&&qe(n),o=l=c=i,t&&(d=gi(),a=e.apply(u,r),l||o||(r=u=i))}function g(){var e=t-(gi()-s);e<=0||e>t?_(c,o):l=Ke(g,e)}function y(){_(m,l)}function v(){if(r=arguments,s=gi(),u=this,c=m&&(l||!p),!1===f)var n=p&&!l;else{o||p||(d=s);var h=f-(s-d),_=h<=0||h>f;_?(o&&(o=qe(o)),d=s,a=e.apply(u,r)):o||(o=Ke(y,h))}return _&&l?l=qe(l):l||t===f||(l=Ke(g,t)),n&&(_=!0,a=e.apply(u,r)),!_||l||o||(r=u=i),a}return v.cancel=function(){l&&qe(l),o&&qe(o),d=0,o=l=c=i},v}var Li=ji((function(e,t){return Wt(e,1,t)})),Si=ji((function(e,t,n){return Wt(e,t,n)})),ki=Un(),Ai=Un(!0);function Ei(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new pe(h);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new Ei.Cache,n}var Ii=ji((function(e,t){if(t=Zt(t),"function"!=typeof e||!Et(t,Ee))throw new pe(h);var n=t.length;return ji((function(r){for(var i=ut(r.length,n);i--;)r[i]=t[i](r[i]);return e.apply(this,r)}))})),Ni=Vn(s),xi=Vn(64),Ci=ji((function(e,t){return er(e,c,i,i,i,Zt(t))}));function ji(e,t){if("function"!=typeof e)throw new pe(h);return t=st(t===i?e.length-1:+t||0,0),function(){for(var r=arguments,i=-1,o=st(r.length-t,0),a=n(o);++i<o;)a[i]=r[t+i];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,r[0],a);case 2:return e.call(this,r[0],r[1],a)}var s=n(t+1);for(i=-1;++i<t;)s[i]=r[i];return s[t]=a,e.apply(this,s)}}function Yi(e,t){return e>t}function Oi(e){return Pe(e)&&dr(e)&&Me.call(e,"callee")&&!Je.call(e,"callee")}var Ri=it||function(e){return Pe(e)&&_r(e.length)&&be.call(e)==p};function zi(e,t,n,r){var o=(n="function"==typeof n?Dn(n,r,3):i)?n(e,t):i;return o===i?on(e,t,n):!!o}function Pi(e){return Pe(e)&&"string"==typeof e.message&&be.call(e)==y}function Hi(e){return Ui(e)&&be.call(e)==v}function Ui(e){var t=l(e);return!!e&&("object"==t||"function"==t)}function Fi(e){return null!=e&&(Hi(e)?De.test(ve.call(e)):Pe(e)&&re.test(e))}function Wi(e){return"number"==typeof e||Pe(e)&&be.call(e)==T}function Qi(e){var t,n;return!(!Pe(e)||be.call(e)!=b||Oi(e)||!(Me.call(e,"constructor")||"function"!=typeof(t=e.constructor)||t instanceof t))&&($t(e,(function(e,t){n=t})),n===i||Me.call(e,n))}function Bi(e){return Ui(e)&&be.call(e)==w}function qi(e){return"string"==typeof e||Pe(e)&&be.call(e)==L}function Vi(e){return Pe(e)&&_r(e.length)&&!!de[be.call(e)]}function Gi(e,t){return e<t}function Ji(e){var t=e?sr(e):0;return _r(t)?t?kt(e):[]:_o(e)}function Zi(e){return Pt(e,lo(e))}var Ki=En((function e(t,n,r,o,a){if(!Ui(t))return t;var s=dr(n)&&(Ri(n)||Vi(n)),u=s?i:uo(n);return At(u||n,(function(l,c){if(u&&(l=n[c=l]),Pe(l))o||(o=[]),a||(a=[]),function(e,t,n,r,o,a,s){var u=a.length,l=t[n];for(;u--;)if(a[u]==l)return void(e[n]=s[u]);var c=e[n],d=o?o(c,l,n,e,t):i,h=d===i;h&&(d=l,dr(l)&&(Ri(l)||Vi(l))?d=Ri(c)?c:dr(c)?kt(c):[]:Qi(l)||Oi(l)?d=Oi(c)?Zi(c):Qi(c)?c:{}:h=!1);a.push(l),s.push(d),h?e[n]=r(d,l,o,a,s):(d==d?d!==c:c==c)&&(e[n]=d)}(t,n,c,e,r,o,a);else{var d=t[c],h=r?r(d,l,c,t,n):i,f=h===i;f&&(h=l),h===i&&(!s||c in t)||!f&&(h==h?h===d:d!=d)||(t[c]=h)}})),t})),Xi=En((function(e,t,n){return n?Ot(e,t,n):Rt(e,t)})),$i=On(Xi,(function(e,t){return e===i?t:e})),eo=On(Ki,(function e(t,n){return t===i?n:Ki(t,n,e)})),to=Hn(en),no=Hn(tn),ro=Wn(Kt),io=Wn(Xt),oo=Qn(en),ao=Qn(tn);function so(e){return nn(e,lo(e))}var uo=at?function(e){var t=null==e?i:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&dr(e)?wr(e):Ui(e)?at(e):[]}:wr;function lo(e){if(null==e)return[];Ui(e)||(e=S(e));var t=e.length;t=t&&_r(t)&&(Ri(e)||Oi(e))&&t||0;for(var r=e.constructor,i=-1,o="function"==typeof r&&r.prototype===e,a=n(t),s=t>0;++i<t;)a[i]=i+"";for(var u in e)s&&hr(u,t)||"constructor"==u&&(o||!Me.call(e,u))||a.push(u);return a}var co=Bn(!0),ho=Bn(),fo=ji((function(e,t){if(null==e)return{};if("function"!=typeof t[0]){t=Nt(Zt(t),me);return yr(e,Qt(lo(e),t))}var n=Dn(t[0],t[1],3);return vr(e,(function(e,t,r){return!n(e,t,r)}))}));function mo(e){e=Lr(e);for(var t=-1,r=uo(e),i=r.length,o=n(i);++t<i;){var a=r[t];o[t]=[a,e[a]]}return o}var po=ji((function(e,t){return null==e?{}:"function"==typeof t[0]?vr(e,Dn(t[0],t[1],3)):yr(e,Zt(t))}));function _o(e){return vn(e,uo(e))}var go=Cn((function(e,t,n){return t=t.toLowerCase(),e+(n?t.charAt(0).toUpperCase()+t.slice(1):t)}));function yo(e){return(e=Ie(e))&&e.replace(oe,je).replace(X,"")}var vo=Cn((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Mo=qn(),To=qn(!0);function bo(e,t){var n="";if(e=Ie(e),(t=+t)<1||!e||!ot(t))return n;do{t%2&&(n+=e),t=rt(t/2),e+=e}while(t);return n}var wo=Cn((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Do=Cn((function(e,t,n){return e+(n?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}));function Lo(e,t,n){var r=e;return(e=Ie(e))?(n?fr(r,t,n):null==t)?e.slice(Fe(e),We(e)+1):(t+="",e.slice(Ne(e,t),xe(e,t)+1)):e}function So(e,t,n){return n&&fr(e,t,n)&&(t=i),(e=Ie(e)).match(t||ue)||[]}var ko=ji((function(e,t){try{return e.apply(i,t)}catch(e){return Pi(e)?e:new o(e)}}));function Ao(e,t,n){return n&&fr(e,t,n)&&(t=i),Pe(e)?Io(e):Ht(e,t)}function Eo(e){return e}function Io(e){return un(Ut(e,!0))}var No=ji((function(e,t){return function(n){return cr(n,e,t)}})),xo=ji((function(e,t){return function(n){return cr(e,n,t)}}));function Co(e,t,n){if(null==n){var r=Ui(t),o=r?uo(t):i,a=o&&o.length?nn(t,o):i;(a?a.length:r)||(a=!1,n=t,t=e,e=this)}a||(a=nn(t,uo(t)));var s=!0,u=-1,l=Hi(e),c=a.length;!1===n?s=!1:Ui(n)&&"chain"in n&&(s=n.chain);for(;++u<c;){var d=a[u],h=t[d];e[d]=h,l&&(e.prototype[d]=function(t){return function(){var n=this.__chain__;if(s||n){var r=e(this.__wrapped__);return(r.__actions__=kt(this.__actions__)).push({func:t,args:arguments,thisArg:e}),r.__chain__=n,r}return t.apply(e,xt([this.value()],arguments))}}(h))}return e}function jo(){}function Yo(e){return mr(e)?cn(e):function(e){var t=e+"";return e=Sr(e),function(n){return rn(n,e,t)}}(e)}var Oo,Ro=Xn("ceil"),zo=Xn("floor"),Po=Rn(Yi,ht),Ho=Rn(Gi,ft),Uo=Xn("round");return Mt.prototype=Tt.prototype,bt.prototype=Ft(Tt.prototype),bt.prototype.constructor=bt,wt.prototype=Ft(Tt.prototype),wt.prototype.constructor=wt,Dt.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Dt.prototype.get=function(e){return"__proto__"==e?i:this.__data__[e]},Dt.prototype.has=function(e){return"__proto__"!=e&&Me.call(this.__data__,e)},Dt.prototype.set=function(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this},Lt.prototype.push=function(e){var t=this.data;"string"==typeof e||Ui(e)?t.set.add(e):t.hash[e]=!0},Ei.Cache=Dt,Mt.after=function(e,t){if("function"!=typeof t){if("function"!=typeof e)throw new pe(h);var n=e;e=t,t=n}return e=ot(e=+e)?e:0,function(){if(--e<1)return t.apply(this,arguments)}},Mt.ary=function(e,t,n){return n&&fr(e,t,n)&&(t=i),t=e&&null==t?e.length:st(+t||0,0),er(e,u,i,i,i,i,t)},Mt.assign=Xi,Mt.at=Xr,Mt.before=yi,Mt.bind=vi,Mt.bindAll=Mi,Mt.bindKey=Ti,Mt.callback=Ao,Mt.chain=Jr,Mt.chunk=function(e,t,r){t=(r?fr(e,t,r):null==t)?1:st(rt(t)||1,1);for(var i=0,o=e?e.length:0,a=-1,s=n(tt(o/t));i<o;)s[++a]=mn(e,i,i+=t);return s},Mt.compact=function(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++t<n;){var o=e[t];o&&(i[++r]=o)}return i},Mt.constant=function(e){return function(){return e}},Mt.countBy=$r,Mt.create=function(e,t,n){var r=Ft(e);return n&&fr(e,t,n)&&(t=i),t?Rt(r,t):r},Mt.curry=bi,Mt.curryRight=wi,Mt.debounce=Di,Mt.defaults=$i,Mt.defaultsDeep=eo,Mt.defer=Li,Mt.delay=Si,Mt.difference=Ar,Mt.drop=Er,Mt.dropRight=Ir,Mt.dropRightWhile=function(e,t,n){return e&&e.length?Mn(e,rr(t,n,3),!0,!0):[]},Mt.dropWhile=function(e,t,n){return e&&e.length?Mn(e,rr(t,n,3),!0):[]},Mt.fill=function(e,t,n,r){var o=e?e.length:0;return o?(n&&"number"!=typeof n&&fr(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=null==n?0:+n||0)<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:+r||0)<0&&(r+=o),o=n>r?0:r>>>0,n>>>=0;n<o;)e[n++]=t;return e}(e,t,n,r)):[]},Mt.filter=ti,Mt.flatten=function(e,t,n){var r=e?e.length:0;return n&&fr(e,t,n)&&(t=!1),r?Zt(e,t):[]},Mt.flattenDeep=function(e){return(e?e.length:0)?Zt(e,!0):[]},Mt.flow=ki,Mt.flowRight=Ai,Mt.forEach=ii,Mt.forEachRight=oi,Mt.forIn=ro,Mt.forInRight=io,Mt.forOwn=oo,Mt.forOwnRight=ao,Mt.functions=so,Mt.groupBy=ai,Mt.indexBy=ui,Mt.initial=function(e){return Ir(e,1)},Mt.intersection=Yr,Mt.invert=function(e,t,n){n&&fr(e,t,n)&&(t=i);for(var r=-1,o=uo(e),a=o.length,s={};++r<a;){var u=o[r],l=e[u];t?Me.call(s,l)?s[l].push(u):s[l]=[u]:s[l]=u}return s},Mt.invoke=li,Mt.keys=uo,Mt.keysIn=lo,Mt.map=ci,Mt.mapKeys=co,Mt.mapValues=ho,Mt.matches=Io,Mt.matchesProperty=function(e,t){return ln(e,Ut(t,!0))},Mt.memoize=Ei,Mt.merge=Ki,Mt.method=No,Mt.methodOf=xo,Mt.mixin=Co,Mt.modArgs=Ii,Mt.negate=function(e){if("function"!=typeof e)throw new pe(h);return function(){return!e.apply(this,arguments)}},Mt.omit=fo,Mt.once=function(e){return yi(2,e)},Mt.pairs=mo,Mt.partial=Ni,Mt.partialRight=xi,Mt.partition=di,Mt.pick=po,Mt.pluck=function(e,t){return ci(e,Yo(t))},Mt.property=Yo,Mt.propertyOf=function(e){return function(t){return rn(e,Sr(t),t+"")}},Mt.pull=function(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=ar(),i=e.length;++n<i;)for(var o=0,a=e[n];(o=r(t,a,o))>-1;)Xe.call(t,o,1);return t},Mt.pullAt=Rr,Mt.range=function(e,t,r){r&&fr(e,t,r)&&(t=r=i),e=+e||0,null==t?(t=e,e=0):t=+t||0;for(var o=-1,a=st(tt((t-e)/((r=null==r?1:+r||0)||1)),0),s=n(a);++o<a;)s[o]=e,e+=r;return s},Mt.rearg=Ci,Mt.reject=function(e,t,n){var r=Ri(e)?It:Gt;return t=rr(t,n,3),r(e,(function(e,n,r){return!t(e,n,r)}))},Mt.remove=function(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],a=e.length;for(t=rr(t,n,3);++i<a;){var s=e[i];t(s,i,e)&&(r.push(s),o.push(i))}return dn(e,o),r},Mt.rest=zr,Mt.restParam=ji,Mt.set=function(e,t,n){if(null==e)return e;for(var r=t+"",i=-1,o=(t=null!=e[r]||mr(t,e)?[r]:Sr(t)).length,a=o-1,s=e;null!=s&&++i<o;){var u=t[i];Ui(s)&&(i==a?s[u]=n:null==s[u]&&(s[u]=hr(t[i+1])?[]:{})),s=s[u]}return e},Mt.shuffle=function(e){return mi(e,ft)},Mt.slice=function(e,t,n){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&fr(e,t,n)&&(t=0,n=r),mn(e,t,n)):[]},Mt.sortBy=function(e,t,n){if(null==e)return[];n&&fr(e,t,n)&&(t=i);var r=-1;t=rr(t,n,3);var o=sn(e,(function(e,n,i){return{criteria:t(e,n,i),index:++r,value:e}}));return _n(o,Ce)},Mt.sortByAll=_i,Mt.sortByOrder=function(e,t,n,r){return null==e?[]:(r&&fr(t,n,r)&&(n=i),Ri(t)||(t=null==t?[]:[t]),Ri(n)||(n=null==n?[]:[n]),gn(e,t,n))},Mt.spread=function(e){if("function"!=typeof e)throw new pe(h);return function(t){return e.apply(this,t)}},Mt.take=function(e,t,n){return(e?e.length:0)?((n?fr(e,t,n):null==t)&&(t=1),mn(e,0,t<0?0:t)):[]},Mt.takeRight=function(e,t,n){var r=e?e.length:0;return r?((n?fr(e,t,n):null==t)&&(t=1),mn(e,(t=r-(+t||0))<0?0:t)):[]},Mt.takeRightWhile=function(e,t,n){return e&&e.length?Mn(e,rr(t,n,3),!1,!0):[]},Mt.takeWhile=function(e,t,n){return e&&e.length?Mn(e,rr(t,n,3)):[]},Mt.tap=function(e,t,n){return t.call(n,e),e},Mt.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new pe(h);return!1===n?r=!1:Ui(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Di(e,t,{leading:r,maxWait:+t,trailing:i})},Mt.thru=Zr,Mt.times=function(e,t,r){if((e=rt(e))<1||!ot(e))return[];var i=-1,o=n(ut(e,mt));for(t=Dn(t,r,1);++i<e;)i<mt?o[i]=t(i):t(i);return o},Mt.toArray=Ji,Mt.toPlainObject=Zi,Mt.transform=function(e,t,n,r){var o=Ri(e)||Vi(e);if(t=rr(t,r,4),null==n)if(o||Ui(e)){var a=e.constructor;n=o?Ri(e)?new a:[]:Ft(Hi(a)?a.prototype:i)}else n={};return(o?At:en)(e,(function(e,r,i){return t(n,e,r,i)})),n},Mt.union=Ur,Mt.uniq=Fr,Mt.unzip=Wr,Mt.unzipWith=Qr,Mt.values=_o,Mt.valuesIn=function(e){return vn(e,lo(e))},Mt.where=function(e,t){return ti(e,un(t))},Mt.without=Br,Mt.wrap=function(e,t){return er(t=null==t?Eo:t,s,i,[e],[])},Mt.xor=function(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(dr(n))var r=r?xt(Qt(r,n),Qt(n,r)):n}return r?yn(r):[]},Mt.zip=qr,Mt.zipObject=Vr,Mt.zipWith=Gr,Mt.backflow=Ai,Mt.collect=ci,Mt.compose=Ai,Mt.each=ii,Mt.eachRight=oi,Mt.extend=Xi,Mt.iteratee=Ao,Mt.methods=so,Mt.object=Vr,Mt.select=ti,Mt.tail=zr,Mt.unique=Fr,Co(Mt,Mt),Mt.add=function(e,t){return(+e||0)+(+t||0)},Mt.attempt=ko,Mt.camelCase=go,Mt.capitalize=function(e){return(e=Ie(e))&&e.charAt(0).toUpperCase()+e.slice(1)},Mt.ceil=Ro,Mt.clone=function(e,t,n,r){return t&&"boolean"!=typeof t&&fr(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),"function"==typeof n?Ut(e,t,Dn(n,r,1)):Ut(e,t)},Mt.cloneDeep=function(e,t,n){return"function"==typeof t?Ut(e,!0,Dn(t,n,1)):Ut(e,!0)},Mt.deburr=yo,Mt.endsWith=function(e,t,n){t+="";var r=(e=Ie(e)).length;return n=n===i?r:ut(n<0?0:+n||0,r),(n-=t.length)>=0&&e.indexOf(t,n)==n},Mt.escape=function(e){return(e=Ie(e))&&W.test(e)?e.replace(U,Ye):e},Mt.escapeRegExp=function(e){return(e=Ie(e))&&K.test(e)?e.replace(Z,Oe):e||"(?:)"},Mt.every=ei,Mt.find=ni,Mt.findIndex=Nr,Mt.findKey=to,Mt.findLast=ri,Mt.findLastIndex=xr,Mt.findLastKey=no,Mt.findWhere=function(e,t){return ni(e,un(t))},Mt.first=Cr,Mt.floor=zo,Mt.get=function(e,t,n){var r=null==e?i:rn(e,Sr(t),t+"");return r===i?n:r},Mt.gt=Yi,Mt.gte=function(e,t){return e>=t},Mt.has=function(e,t){if(null==e)return!1;var n=Me.call(e,t);if(!n&&!mr(t)){if(null==(e=1==(t=Sr(t)).length?e:rn(e,mn(t,0,-1))))return!1;t=Or(t),n=Me.call(e,t)}return n||_r(e.length)&&hr(t,e.length)&&(Ri(e)||Oi(e))},Mt.identity=Eo,Mt.includes=si,Mt.indexOf=jr,Mt.inRange=function(e,t,n){return t=+t||0,n===i?(n=t,t=0):n=+n||0,e>=ut(t,n)&&e<st(t,n)},Mt.isArguments=Oi,Mt.isArray=Ri,Mt.isBoolean=function(e){return!0===e||!1===e||Pe(e)&&be.call(e)==_},Mt.isDate=function(e){return Pe(e)&&be.call(e)==g},Mt.isElement=function(e){return!!e&&1===e.nodeType&&Pe(e)&&!Qi(e)},Mt.isEmpty=function(e){return null==e||(dr(e)&&(Ri(e)||qi(e)||Oi(e)||Pe(e)&&Hi(e.splice))?!e.length:!uo(e).length)},Mt.isEqual=zi,Mt.isError=Pi,Mt.isFinite=function(e){return"number"==typeof e&&ot(e)},Mt.isFunction=Hi,Mt.isMatch=function(e,t,n,r){return n="function"==typeof n?Dn(n,r,3):i,an(e,ur(t),n)},Mt.isNaN=function(e){return Wi(e)&&e!=+e},Mt.isNative=Fi,Mt.isNull=function(e){return null===e},Mt.isNumber=Wi,Mt.isObject=Ui,Mt.isPlainObject=Qi,Mt.isRegExp=Bi,Mt.isString=qi,Mt.isTypedArray=Vi,Mt.isUndefined=function(e){return e===i},Mt.kebabCase=vo,Mt.last=Or,Mt.lastIndexOf=function(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(n<0?st(r+n,0):ut(n||0,r-1))+1;else if(n){var o=e[i=bn(e,t,!0)-1];return(t==t?t===o:o!=o)?i:-1}if(t!=t)return ze(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1},Mt.lt=Gi,Mt.lte=function(e,t){return e<=t},Mt.max=Po,Mt.min=Ho,Mt.noConflict=function(){return Le._=we,this},Mt.noop=jo,Mt.now=gi,Mt.pad=function(e,t,n){t=+t;var r=(e=Ie(e)).length;if(r>=t||!ot(t))return e;var i=(t-r)/2,o=rt(i);return(n=Zn("",tt(i),n)).slice(0,o)+e+n},Mt.padLeft=Mo,Mt.padRight=To,Mt.parseInt=function(e,t,n){return(n?fr(e,t,n):null==t)?t=0:t&&(t=+t),e=Lo(e),ct(e,t||(ne.test(e)?16:10))},Mt.random=function(e,t,n){n&&fr(e,t,n)&&(t=n=i);var r=null==e,o=null==t;if(null==n&&(o&&"boolean"==typeof e?(n=e,e=1):"boolean"==typeof t&&(n=t,o=!0)),r&&o&&(t=1,o=!1),e=+e||0,o?(t=e,e=0):t=+t||0,n||e%1||t%1){var a=dt();return ut(e+a*(t-e+Ve("1e-"+((a+"").length-1))),t)}return hn(e,t)},Mt.reduce=hi,Mt.reduceRight=fi,Mt.repeat=bo,Mt.result=function(e,t,n){var r=null==e?i:e[t];return r===i&&(null==e||mr(t,e)||(r=null==(e=1==(t=Sr(t)).length?e:rn(e,mn(t,0,-1)))?i:e[Or(t)]),r=r===i?n:r),Hi(r)?r.call(e):r},Mt.round=Uo,Mt.runInContext=e,Mt.size=function(e){var t=e?sr(e):0;return _r(t)?t:uo(e).length},Mt.snakeCase=wo,Mt.some=pi,Mt.sortedIndex=Pr,Mt.sortedLastIndex=Hr,Mt.startCase=Do,Mt.startsWith=function(e,t,n){return e=Ie(e),n=null==n?0:ut(n<0?0:+n||0,e.length),e.lastIndexOf(t,n)==n},Mt.sum=function(e,t,n){return n&&fr(e,t,n)&&(t=i),1==(t=rr(t,n,3)).length?function(e,t){for(var n=e.length,r=0;n--;)r+=+t(e[n])||0;return r}(Ri(e)?e:Dr(e),t):function(e,t){var n=0;return Bt(e,(function(e,r,i){n+=+t(e,r,i)||0})),n}(e,t)},Mt.template=function(e,t,n){var r=Mt.templateSettings;n&&fr(e,t,n)&&(t=n=i),e=Ie(e),t=Ot(Rt({},n||t),r,Yt);var o,s,u=Ot(Rt({},t.imports),r.imports,Yt),l=uo(u),c=vn(u,l),d=0,h=t.interpolate||ae,f="__p += '",m=fe((t.escape||ae).source+"|"+h.source+"|"+(h===q?ee:ae).source+"|"+(t.evaluate||ae).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++ce+"]")+"\n";e.replace(m,(function(t,n,r,i,a,u){return r||(r=i),f+=e.slice(d,u).replace(se,Re),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=u+t.length,t})),f+="';\n";var _=t.variable;_||(f="with (obj) {\n"+f+"\n}\n"),f=(s?f.replace(R,""):f).replace(z,"$1").replace(P,"$1;"),f="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=ko((function(){return a(l,p+"return "+f).apply(i,c)}));if(g.source=f,Pi(g))throw g;return g},Mt.trim=Lo,Mt.trimLeft=function(e,t,n){var r=e;return(e=Ie(e))?(n?fr(r,t,n):null==t)?e.slice(Fe(e)):e.slice(Ne(e,t+"")):e},Mt.trimRight=function(e,t,n){var r=e;return(e=Ie(e))?(n?fr(r,t,n):null==t)?e.slice(0,We(e)+1):e.slice(0,xe(e,t+"")+1):e},Mt.trunc=function(e,t,n){n&&fr(e,t,n)&&(t=i);var r=30,o="...";if(null!=t)if(Ui(t)){var a="separator"in t?t.separator:a;r="length"in t?+t.length||0:r,o="omission"in t?Ie(t.omission):o}else r=+t||0;if(r>=(e=Ie(e)).length)return e;var s=r-o.length;if(s<1)return o;var u=e.slice(0,s);if(null==a)return u+o;if(Bi(a)){if(e.slice(s).search(a)){var l,c,d=e.slice(0,s);for(a.global||(a=fe(a.source,(te.exec(a)||"")+"g")),a.lastIndex=0;l=a.exec(d);)c=l.index;u=u.slice(0,null==c?s:c)}}else if(e.indexOf(a,s)!=s){var h=u.lastIndexOf(a);h>-1&&(u=u.slice(0,h))}return u+o},Mt.unescape=function(e){return(e=Ie(e))&&F.test(e)?e.replace(H,Qe):e},Mt.uniqueId=function(e){var t=++Te;return Ie(e)+t},Mt.words=So,Mt.all=ei,Mt.any=pi,Mt.contains=si,Mt.eq=zi,Mt.detect=ni,Mt.foldl=hi,Mt.foldr=fi,Mt.head=Cr,Mt.include=si,Mt.inject=hi,Co(Mt,(Oo={},en(Mt,(function(e,t){Mt.prototype[t]||(Oo[t]=e)})),Oo),!1),Mt.sample=mi,Mt.prototype.sample=function(e){return this.__chain__||null!=e?this.thru((function(t){return mi(t,e)})):mi(this.value())},Mt.VERSION="3.10.1",At(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mt[e].placeholder=Mt})),At(["drop","take"],(function(e,t){wt.prototype[e]=function(n){var r=this.__filtered__;if(r&&!t)return new wt(this);n=null==n?1:st(rt(n)||0,0);var i=this.clone();return r?i.__takeCount__=ut(i.__takeCount__,n):i.__views__.push({size:n,type:e+(i.__dir__<0?"Right":"")}),i},wt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),At(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=2!=n;wt.prototype[e]=function(e,t){var i=this.clone();return i.__iteratees__.push({iteratee:rr(e,t,1),type:n}),i.__filtered__=i.__filtered__||r,i}})),At(["first","last"],(function(e,t){var n="take"+(t?"Right":"");wt.prototype[e]=function(){return this[n](1).value()[0]}})),At(["initial","rest"],(function(e,t){var n="drop"+(t?"":"Right");wt.prototype[e]=function(){return this.__filtered__?new wt(this):this[n](1)}})),At(["pluck","where"],(function(e,t){var n=t?"filter":"map",r=t?un:Yo;wt.prototype[e]=function(e){return this[n](r(e))}})),wt.prototype.compact=function(){return this.filter(Eo)},wt.prototype.reject=function(e,t){return e=rr(e,t,1),this.filter((function(t){return!e(t)}))},wt.prototype.slice=function(e,t){e=null==e?0:+e||0;var n=this;return n.__filtered__&&(e>0||t<0)?new wt(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=+t||0)<0?n.dropRight(-t):n.take(t-e)),n)},wt.prototype.takeRightWhile=function(e,t){return this.reverse().takeWhile(e,t).reverse()},wt.prototype.toArray=function(){return this.take(ft)},en(wt.prototype,(function(e,t){var n=/^(?:filter|map|reject)|While$/.test(t),r=/^(?:first|last)$/.test(t),o=Mt[r?"take"+("last"==t?"Right":""):t];o&&(Mt.prototype[t]=function(){var t=r?[1]:arguments,a=this.__chain__,s=this.__wrapped__,u=!!this.__actions__.length,l=s instanceof wt,c=t[0],d=l||Ri(s);d&&n&&"function"==typeof c&&1!=c.length&&(l=d=!1);var h=function(e){return r&&a?o(e,1)[0]:o.apply(i,xt([e],t))},f={func:Zr,args:[h],thisArg:i},m=l&&!u;if(r&&!a)return m?((s=s.clone()).__actions__.push(f),e.call(s)):o.call(i,this.value())[0];if(!r&&d){s=m?s:new wt(this);var p=e.apply(s,t);return p.__actions__.push(f),new bt(p,a)}return this.thru(h)})})),At(["join","pop","push","replace","shift","sort","splice","split","unshift"],(function(e){var t=(/^(?:replace|split)$/.test(e)?ye:_e)[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:join|pop|replace|shift)$/.test(e);Mt.prototype[e]=function(){var e=arguments;return r&&!this.__chain__?t.apply(this.value(),e):this[n]((function(n){return t.apply(n,e)}))}})),en(wt.prototype,(function(e,t){var n=Mt[t];if(n){var r=n.name;(vt[r]||(vt[r]=[])).push({name:t,func:n})}})),vt[Jn(i,2).name]=[{name:"wrapper",func:i}],wt.prototype.clone=function(){var e=new wt(this.__wrapped__);return e.__actions__=kt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=kt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=kt(this.__views__),e},wt.prototype.reverse=function(){if(this.__filtered__){var e=new wt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},wt.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ri(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=ut(t,e+a);break;case"takeRight":e=st(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,h=c.length,f=0,m=ut(u,this.__takeCount__);if(!n||i<d||i==u&&m==u)return Tn(r&&n?e.reverse():e,this.__actions__);var p=[];e:for(;u--&&f<m;){for(var _=-1,g=e[l+=t];++_<h;){var y=c[_],v=y.iteratee,M=y.type,T=v(g);if(2==M)g=T;else if(!T){if(1==M)continue e;break e}}p[f++]=g}return p},Mt.prototype.chain=function(){return Jr(this)},Mt.prototype.commit=function(){return new bt(this.value(),this.__chain__)},Mt.prototype.concat=Kr,Mt.prototype.plant=function(e){for(var t,n=this;n instanceof Tt;){var r=kr(n);t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Mt.prototype.reverse=function(){var e=this.__wrapped__,t=function(e){return n&&n.__dir__<0?e:e.reverse()};if(e instanceof wt){var n=e;return this.__actions__.length&&(n=new wt(this)),(n=n.reverse()).__actions__.push({func:Zr,args:[t],thisArg:i}),new bt(n,this.__chain__)}return this.thru(t)},Mt.prototype.toString=function(){return this.value()+""},Mt.prototype.run=Mt.prototype.toJSON=Mt.prototype.valueOf=Mt.prototype.value=function(){return Tn(this.__wrapped__,this.__actions__)},Mt.prototype.collect=Mt.prototype.map,Mt.prototype.head=Mt.prototype.first,Mt.prototype.select=Mt.prototype.filter,Mt.prototype.tail=Mt.prototype.rest,Mt}();"function"==typeof define&&"object"==l(n.amdO)&&n.amdO?Le._=Be:ve&&Me?De?(Me.exports=Be)._=Be:ve._=Be:Le._=Be}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],25:[function(e,t,n){var r=1e3,i=60*r,o=60*i,a=24*o,s=365.25*a;function u(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}t.exports=function(e,t){return t=t||{},"string"==typeof e?function(e){if((e=""+e).length>1e4)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*s;case"days":case"day":case"d":return n*a;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*i;case"seconds":case"second":case"secs":case"sec":case"s":return n*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}(e):t.long?u(n=e,a,"day")||u(n,o,"hour")||u(n,i,"minute")||u(n,r,"second")||n+" ms":function(e){return e>=a?Math.round(e/a)+"d":e>=o?Math.round(e/o)+"h":e>=i?Math.round(e/i)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e);var n}},{}],26:[function(e,t,n){t.exports=e("./lib/retry")},{"./lib/retry":27}],27:[function(e,t,n){var r=e("./retry_operation");n.operation=function(e){var t=!1;e&&!0===e.forever&&(t=!0);var i=n.timeouts(e);return new r(i,t)},n.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],i=0;i<t.retries;i++)r.push(this.createTimeout(i,t));return r.sort((function(e,t){return e-t})),r},n.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*t.minTimeout*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout)},n.wrap=function(e,t,r){if(t instanceof Array&&(r=t,t=null),!r)for(var i in r=[],e)"function"==typeof e[i]&&r.push(i);for(var o=0;o<r.length;o++){var a=r[o],s=e[a];e[a]=function(){var r=n.operation(t),i=Array.prototype.slice.call(arguments),o=i.pop();i.push((function(e){r.retry(e)||(e&&(arguments[0]=r.mainError()),o.apply(this,arguments))})),r.attempt((function(){s.apply(e,i)}))},e[a].options=t}}},{"./retry_operation":28}],28:[function(e,t,n){function r(e,t){this._timeouts=e,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,t&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=r,r.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;this._errors.push(e);var t=this._timeouts.shift();if(void 0===t){if(!this._cachedTimeouts)return!1;this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift()}var n=this;return setTimeout((function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout((function(){n._operationTimeoutCb(n._attempts)}),n._operationTimeout)),n._fn(n._attempts)}),t),!0},r.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){n._operationTimeoutCb()}),n._operationTimeout)),this._fn(this._attempts)},r.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},r.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var i=this._errors[r],o=i.message,a=(e[o]||0)+1;e[o]=a,a>=n&&(t=i,n=a)}return t}},{}],29:[function(e,t,n){t.exports=function(){var e=[].slice.call(arguments,0).join("/");return e.replace(/[\/]+/g,"/").replace(/\/\?/g,"?").replace(/\/\#/g,"#").replace(/\:\//g,"://")}},{}],30:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"===l(e)&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(a(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),r=(l=n.slice()).length,u=0;u<r;u++)l[u].apply(this,s);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],31:[function(e,t,n){var r,i=t.exports={},o=[],a=!1,s=-1;function u(){a=!1,r.length?o=r.concat(o):s=-1,o.length&&l()}function l(){if(!a){var e=setTimeout(u);a=!0;for(var t=o.length;t;){for(r=o,o=[];++s<t;)r&&r[s].run();s=-1,t=o.length}r=null,a=!1,clearTimeout(e)}}function c(e,t){this.fun=e,this.array=t}function d(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];o.push(new c(e,t)),1!==o.length||a||setTimeout(l,0)},c.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}]},{},[]);const d=c;var h=n(93379),f=n.n(h),m=n(7795),p=n.n(m),g=n(90569),y=n.n(g),v=n(3565),M=n.n(v),T=n(19216),b=n.n(T),w=n(44589),D=n.n(w),L=n(37174),S={};S.styleTagTransform=D(),S.setAttributes=M(),S.insert=y().bind(null,"head"),S.domAPI=p(),S.insertStyleElement=b();f()(L.Z,S);L.Z&&L.Z.locals&&L.Z.locals;var k=n(30381),A=n.n(k);e=n.hmd(e);var E,I,N=n(19755);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,R(r.key),r)}}function Y(e,t,n){return t&&j(e.prototype,t),n&&j(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){var t=function(e,t){if("object"!==z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===z(t)?t:String(t)}function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}E=self,I=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==z(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t){e.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(e,t,n){var r=n(24),i=n(25),o=String.fromCharCode(30);e.exports={protocol:4,encodePacket:r,encodePayload:function(e,t){var n=e.length,i=new Array(n),a=0;e.forEach((function(e,s){r(e,!1,(function(e){i[s]=e,++a===n&&t(i.join(o))}))}))},decodePacket:i,decodePayload:function(e,t){for(var n=e.split(o),r=[],a=0;a<n.length;a++){var s=i(n[a],t);if(r.push(s),"error"===s.type)break}return r}}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var r=n(0);e.exports.pick=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})};var i=setTimeout,o=clearTimeout;e.exports.installTimerFunctions=function(e,t){t.useNativeTimers?(e.setTimeoutFn=i.bind(r),e.clearTimeoutFn=o.bind(r)):(e.setTimeoutFn=setTimeout.bind(r),e.clearTimeoutFn=clearTimeout.bind(r))}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=n(1),d=n(2),h=n(3).installTimerFunctions,f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,e);var t,n,r=a(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),t=r.call(this),h(u(t),e),t.opts=e,t.query=e.query,t.readyState="",t.socket=e.socket,t}return t=s,(n=[{key:"onError",value:function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this}},{key:"open",value:function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}},{key:"close",value:function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send",value:function(e){"open"===this.readyState&&this.write(e)}},{key:"onOpen",value:function(){this.readyState="open",this.writable=!0,this.emit("open")}},{key:"onData",value:function(e){var t=c.decodePacket(e,this.socket.binaryType);this.onPacket(t)}},{key:"onPacket",value:function(e){this.emit("packet",e)}},{key:"onClose",value:function(){this.readyState="closed",this.emit("close")}}])&&i(t.prototype,n),s}(d);e.exports=f},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,i=n.length;r<i;r++){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function i(e,t,n){return(i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.PacketType=t.protocol=void 0;var d,h=n(2),f=n(30),m=n(15);t.protocol=5,function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(d=t.PacketType||(t.PacketType={}));var p=function(){function e(){u(this,e)}return c(e,[{key:"encode",value:function(e){return e.type!==d.EVENT&&e.type!==d.ACK||!m.hasBinary(e)?[this.encodeAsString(e)]:(e.type=e.type===d.EVENT?d.BINARY_EVENT:d.BINARY_ACK,this.encodeAsBinary(e))}},{key:"encodeAsString",value:function(e){var t=""+e.type;return e.type!==d.BINARY_EVENT&&e.type!==d.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data)),t}},{key:"encodeAsBinary",value:function(e){var t=f.deconstructPacket(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}}]),e}();t.Encoder=p;var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(n,e);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return a(this,n)}}(n);function n(){return u(this,n),t.call(this)}return c(n,[{key:"add",value:function(e){var t;if("string"==typeof e)(t=this.decodeString(e)).type===d.BINARY_EVENT||t.type===d.BINARY_ACK?(this.reconstructor=new g(t),0===t.attachments&&i(s(n.prototype),"emit",this).call(this,"decoded",t)):i(s(n.prototype),"emit",this).call(this,"decoded",t);else{if(!m.isBinary(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(t=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,i(s(n.prototype),"emit",this).call(this,"decoded",t))}}},{key:"decodeString",value:function(e){var t=0,r={type:Number(e.charAt(0))};if(void 0===d[r.type])throw new Error("unknown packet type "+r.type);if(r.type===d.BINARY_EVENT||r.type===d.BINARY_ACK){for(var i=t+1;"-"!==e.charAt(++t)&&t!=e.length;);var o=e.substring(i,t);if(o!=Number(o)||"-"!==e.charAt(t))throw new Error("Illegal attachments");r.attachments=Number(o)}if("/"===e.charAt(t+1)){for(var a=t+1;++t&&","!==e.charAt(t)&&t!==e.length;);r.nsp=e.substring(a,t)}else r.nsp="/";var s=e.charAt(t+1);if(""!==s&&Number(s)==s){for(var u=t+1;++t;){var l=e.charAt(t);if(null==l||Number(l)!=l){--t;break}if(t===e.length)break}r.id=Number(e.substring(u,t+1))}if(e.charAt(++t)){var c=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(t));if(!n.isPayloadValid(r.type,c))throw new Error("invalid payload");r.data=c}return r}},{key:"destroy",value:function(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}],[{key:"isPayloadValid",value:function(e,t){switch(e){case d.CONNECT:return"object"===r(t);case d.DISCONNECT:return void 0===t;case d.CONNECT_ERROR:return"string"==typeof t||"object"===r(t);case d.EVENT:case d.BINARY_EVENT:return Array.isArray(t)&&t.length>0;case d.ACK:case d.BINARY_ACK:return Array.isArray(t)}}}]),n}(h);t.Decoder=_;var g=function(){function e(t){u(this,e),this.packet=t,this.buffers=[],this.reconPack=t}return c(e,[{key:"takeBinaryData",value:function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=f.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}},{key:"finishedReconstruction",value:function(){this.reconPack=null,this.buffers=[]}}]),e}()},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");-1!=i&&-1!=o&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var a,s,u=n.exec(e||""),l={},c=14;c--;)l[r[c]]=u[c]||"";return-1!=i&&-1!=o&&(l.source=t,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=function(e,t){var n=t.replace(/\/{2,9}/g,"/").split("/");return"/"!=t.substr(0,1)&&0!==t.length||n.splice(0,1),"/"==t.substr(t.length-1,1)&&n.splice(n.length-1,1),n}(0,l.path),l.queryKey=(a=l.query,s={},a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(s[t]=n)})),s),l}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Manager=void 0;var c=n(20),d=n(3),h=n(14),f=n(6),m=n(16),p=n(31),_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(l,e);var t,n,s=a(l);function l(e,t){var n,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(n=s.call(this)).nsps={},n.subs=[],e&&"object"===r(e)&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",n.opts=t,(0,d.installTimerFunctions)(u(n),t),n.reconnection(!1!==t.reconnection),n.reconnectionAttempts(t.reconnectionAttempts||1/0),n.reconnectionDelay(t.reconnectionDelay||1e3),n.reconnectionDelayMax(t.reconnectionDelayMax||5e3),n.randomizationFactor(null!==(i=t.randomizationFactor)&&void 0!==i?i:.5),n.backoff=new p({min:n.reconnectionDelay(),max:n.reconnectionDelayMax(),jitter:n.randomizationFactor()}),n.timeout(null==t.timeout?2e4:t.timeout),n._readyState="closed",n.uri=e;var o=t.parser||f;return n.encoder=new o.Encoder,n.decoder=new o.Decoder,n._autoConnect=!1!==t.autoConnect,n._autoConnect&&n.open(),n}return t=l,(n=[{key:"reconnection",value:function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}},{key:"reconnectionAttempts",value:function(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}},{key:"reconnectionDelay",value:function(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}},{key:"randomizationFactor",value:function(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}},{key:"reconnectionDelayMax",value:function(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}},{key:"timeout",value:function(e){return arguments.length?(this._timeout=e,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(e){var t=this;if(~this._readyState.indexOf("open"))return this;this.engine=c(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var i=(0,m.on)(n,"open",(function(){r.onopen(),e&&e()})),o=(0,m.on)(n,"error",(function(n){r.cleanup(),r._readyState="closed",t.emitReserved("error",n),e?e(n):r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var a=this._timeout;0===a&&i();var s=this.setTimeoutFn((function(){i(),n.close(),n.emit("error",new Error("timeout"))}),a);this.opts.autoUnref&&s.unref(),this.subs.push((function(){clearTimeout(s)}))}return this.subs.push(i),this.subs.push(o),this}},{key:"connect",value:function(e){return this.open(e)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var e=this.engine;this.subs.push((0,m.on)(e,"ping",this.onping.bind(this)),(0,m.on)(e,"data",this.ondata.bind(this)),(0,m.on)(e,"error",this.onerror.bind(this)),(0,m.on)(e,"close",this.onclose.bind(this)),(0,m.on)(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(e){this.decoder.add(e)}},{key:"ondecoded",value:function(e){this.emitReserved("packet",e)}},{key:"onerror",value:function(e){this.emitReserved("error",e)}},{key:"socket",value:function(e,t){var n=this.nsps[e];return n||(n=new h.Socket(this,e,t),this.nsps[e]=n),n}},{key:"_destroy",value:function(e){for(var t=0,n=Object.keys(this.nsps);t<n.length;t++){var r=n[t];if(this.nsps[r].active)return}this._close()}},{key:"_packet",value:function(e){for(var t=this.encoder.encode(e),n=0;n<t.length;n++)this.engine.write(t[n],e.options)}},{key:"cleanup",value:function(){this.subs.forEach((function(e){return e()})),this.subs.length=0,this.decoder.destroy()}},{key:"_close",value:function(){this.skipReconnect=!0,this._reconnecting=!1,"opening"===this._readyState&&this.cleanup(),this.backoff.reset(),this._readyState="closed",this.engine&&this.engine.close()}},{key:"disconnect",value:function(){return this._close()}},{key:"onclose",value:function(e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()}},{key:"reconnect",value:function(){var e=this;if(this._reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){t.skipReconnect||(e.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((function(n){n?(t._reconnecting=!1,t.reconnect(),e.emitReserved("reconnect_error",n)):t.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){clearTimeout(r)}))}}},{key:"onreconnect",value:function(){var e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}])&&i(t.prototype,n),l}(n(17).StrictEventEmitter);t.Manager=_},function(e,t,n){var r=n(10),i=n(23),o=n(27),a=n(28);t.polling=function(e){var t=!1,n=!1,a=!1!==e.jsonp;if("undefined"!=typeof location){var s="https:"===location.protocol,u=location.port;u||(u=s?443:80),t=e.hostname!==location.hostname||u!==e.port,n=e.secure!==s}if(e.xdomain=t,e.xscheme=n,"open"in new r(e)&&!e.forceJSONP)return new i(e);if(!a)throw new Error("JSONP disabled");return new o(e)},t.websocket=a},function(e,t,n){var r=n(22),i=n(0);e.exports=function(e){var t=e.xdomain,n=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(e){}if(!t)try{return new(i[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=n(4),c=n(5),d=n(1),h=n(13),f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,e);var t,n,r=a(s);function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.apply(this,arguments)}return t=s,(n=[{key:"name",get:function(){return"polling"}},{key:"doOpen",value:function(){this.poll()}},{key:"pause",value:function(e){var t=this;this.readyState="pausing";var n=function(){t.readyState="paused",e()};if(this.polling||!this.writable){var r=0;this.polling&&(r++,this.once("pollComplete",(function(){--r||n()}))),this.writable||(r++,this.once("drain",(function(){--r||n()})))}else n()}},{key:"poll",value:function(){this.polling=!0,this.doPoll(),this.emit("poll")}},{key:"onData",value:function(e){var t=this;d.decodePayload(e,this.socket.binaryType).forEach((function(e){if("opening"===t.readyState&&"open"===e.type&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState&&this.poll())}},{key:"doClose",value:function(){var e=this,t=function(){e.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}},{key:"write",value:function(e){var t=this;this.writable=!1,d.encodePayload(e,(function(e){t.doWrite(e,(function(){t.writable=!0,t.emit("drain")}))}))}},{key:"uri",value:function(){var e=this.query||{},t=this.opts.secure?"https":"http",n="";return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=h()),this.supportsBinary||e.sid||(e.b64=1),e=c.encode(e),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),e.length&&(e="?"+e),t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+e}}])&&i(t.prototype,n),s}(l);e.exports=f},function(e,t){var n=Object.create(null);n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";var r=Object.create(null);Object.keys(n).forEach((function(e){r[n[e]]=e})),e.exports={PACKET_TYPES:n,PACKET_TYPES_REVERSE:r,ERROR_PACKET:{type:"error",data:"parser error"}}},function(e,t,n){var r,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),o={},a=0,s=0;function u(e){var t="";do{t=i[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function l(){var e=u(+new Date);return e!==r?(a=0,r=e):e+"."+u(a++)}for(;s<64;s++)o[i[s]]=s;l.encode=u,l.decode=function(e){var t=0;for(s=0;s<e.length;s++)t=64*t+o[e.charAt(s)];return t},e.exports=l},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=void 0;var h=n(6),f=n(16),m=n(17),p=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(o,e);var t,n,r=l(o);function o(e,t,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(i=r.call(this)).connected=!1,i.disconnected=!0,i.receiveBuffer=[],i.sendBuffer=[],i.ids=0,i.acks={},i.flags={},i.io=e,i.nsp=t,n&&n.auth&&(i.auth=n.auth),i.io._autoConnect&&i.open(),i}return t=o,(n=[{key:"subEvents",value:function(){if(!this.subs){var e=this.io;this.subs=[(0,f.on)(e,"open",this.onopen.bind(this)),(0,f.on)(e,"packet",this.onpacket.bind(this)),(0,f.on)(e,"error",this.onerror.bind(this)),(0,f.on)(e,"close",this.onclose.bind(this))]}}},{key:"active",get:function(){return!!this.subs}},{key:"connect",value:function(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.unshift("message"),this.emit.apply(this,t),this}},{key:"emit",value:function(e){if(p.hasOwnProperty(e))throw new Error('"'+e+'" is a reserved event name');for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.unshift(e);var i={type:h.PacketType.EVENT,data:n,options:{}};i.options.compress=!1!==this.flags.compress,"function"==typeof n[n.length-1]&&(this.acks[this.ids]=n.pop(),i.id=this.ids++);var o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?this.packet(i):this.sendBuffer.push(i)),this.flags={},this}},{key:"packet",value:function(e){e.nsp=this.nsp,this.io._packet(e)}},{key:"onopen",value:function(){var e=this;"function"==typeof this.auth?this.auth((function(t){e.packet({type:h.PacketType.CONNECT,data:t})})):this.packet({type:h.PacketType.CONNECT,data:this.auth})}},{key:"onerror",value:function(e){this.connected||this.emitReserved("connect_error",e)}},{key:"onclose",value:function(e){this.connected=!1,this.disconnected=!0,delete this.id,this.emitReserved("disconnect",e)}},{key:"onpacket",value:function(e){if(e.nsp===this.nsp)switch(e.type){case h.PacketType.CONNECT:if(e.data&&e.data.sid){var t=e.data.sid;this.onconnect(t)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.PacketType.EVENT:case h.PacketType.BINARY_EVENT:this.onevent(e);break;case h.PacketType.ACK:case h.PacketType.BINARY_ACK:this.onack(e);break;case h.PacketType.DISCONNECT:this.ondisconnect();break;case h.PacketType.CONNECT_ERROR:var n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n)}}},{key:"onevent",value:function(e){var t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}},{key:"emitEvent",value:function(e){if(this._anyListeners&&this._anyListeners.length){var t,n=i(this._anyListeners.slice());try{for(n.s();!(t=n.n()).done;)t.value.apply(this,e)}catch(e){n.e(e)}finally{n.f()}}s(d(o.prototype),"emit",this).apply(this,e)}},{key:"ack",value:function(e){var t=this,n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t.packet({type:h.PacketType.ACK,id:e,data:i})}}}},{key:"onack",value:function(e){var t=this.acks[e.id];"function"==typeof t&&(t.apply(this,e.data),delete this.acks[e.id])}},{key:"onconnect",value:function(e){this.id=e,this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emitReserved("connect")}},{key:"emitBuffered",value:function(){var e=this;this.receiveBuffer.forEach((function(t){return e.emitEvent(t)})),this.receiveBuffer=[],this.sendBuffer.forEach((function(t){return e.packet(t)})),this.sendBuffer=[]}},{key:"ondisconnect",value:function(){this.destroy(),this.onclose("io server disconnect")}},{key:"destroy",value:function(){this.subs&&(this.subs.forEach((function(e){return e()})),this.subs=void 0),this.io._destroy(this)}},{key:"disconnect",value:function(){return this.connected&&this.packet({type:h.PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{key:"close",value:function(){return this.disconnect()}},{key:"compress",value:function(e){return this.flags.compress=e,this}},{key:"volatile",get:function(){return this.flags.volatile=!0,this}},{key:"onAny",value:function(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}},{key:"prependAny",value:function(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}},{key:"offAny",value:function(e){if(!this._anyListeners)return this;if(e){for(var t=this._anyListeners,n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}},{key:"listenersAny",value:function(){return this._anyListeners||[]}}])&&a(t.prototype,n),o}(m.StrictEventEmitter);t.Socket=_},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.hasBinary=t.isBinary=void 0;var i="function"==typeof ArrayBuffer,o=Object.prototype.toString,a="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);function u(e){return i&&(e instanceof ArrayBuffer||function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}(e))||a&&e instanceof Blob||s&&e instanceof File}t.isBinary=u,t.hasBinary=function e(t,n){if(!t||"object"!==r(t))return!1;if(Array.isArray(t)){for(var i=0,o=t.length;i<o;i++)if(e(t[i]))return!0;return!1}if(u(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0);for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&e(t[a]))return!0;return!1}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.on=void 0,t.on=function(e,t,n){return e.on(t,n),function(){e.off(t,n)}}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.StrictEventEmitter=void 0;var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(u,e);var t,n,r=s(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),r.apply(this,arguments)}return t=u,(n=[{key:"on",value:function(e,t){return o(l(u.prototype),"on",this).call(this,e,t),this}},{key:"once",value:function(e,t){return o(l(u.prototype),"once",this).call(this,e,t),this}},{key:"emit",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=o(l(u.prototype),"emit",this)).call.apply(t,[this,e].concat(r)),this}},{key:"emitReserved",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=o(l(u.prototype),"emit",this)).call.apply(t,[this,e].concat(r)),this}},{key:"listeners",value:function(e){return o(l(u.prototype),"listeners",this).call(this,e)}}])&&i(t.prototype,n),u}(n(2));t.StrictEventEmitter=c},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.io=t.Socket=t.Manager=t.protocol=void 0;var i=n(19),o=n(8);e.exports=t=s;var a=t.managers={};function s(e,t){"object"===r(e)&&(t=e,e=void 0),t=t||{};var n,s=(0,i.url)(e,t.path||"/socket.io"),u=s.source,l=s.id,c=s.path,d=a[l]&&c in a[l].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||d?n=new o.Manager(u,t):(a[l]||(a[l]=new o.Manager(u,t)),n=a[l]),s.query&&!t.query&&(t.query=s.queryKey),n.socket(s.path,t)}t.io=s;var u=n(6);Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),t.connect=s;var l=n(8);Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return l.Manager}});var c=n(14);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return c.Socket}}),t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.url=void 0;var r=n(7);t.url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),i=r(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";var o=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+o+":"+i.port+t,i.href=i.protocol+"://"+o+(n&&n.port===i.port?"":":"+i.port),i}},function(e,t,n){var r=n(21);e.exports=function(e,t){return new r(e,t)},e.exports.Socket=r,e.exports.protocol=r.protocol,e.exports.Transport=n(4),e.exports.transports=n(9),e.exports.parser=n(1)},function(e,t,n){function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e){return(i="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=n(9),h=n(2),f=n(1),m=n(7),p=n(5),_=n(3).installTimerFunctions,g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(c,e);var t,n,u=s(c);function c(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),t=u.call(this),e&&"object"===i(e)&&(n=e,e=null),e?(e=m(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=m(n.host).host),_(l(t),n),t.secure=null!=n.secure?n.secure:"undefined"!=typeof location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=t.secure?"443":"80"),t.hostname=n.hostname||("undefined"!=typeof location?location.hostname:"localhost"),t.port=n.port||("undefined"!=typeof location&&location.port?location.port:t.secure?443:80),t.transports=n.transports||["polling","websocket"],t.readyState="",t.writeBuffer=[],t.prevBufferLen=0,t.opts=r({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,jsonp:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),t.opts.path=t.opts.path.replace(/\/$/,"")+"/","string"==typeof t.opts.query&&(t.opts.query=p.decode(t.opts.query)),t.id=null,t.upgrades=null,t.pingInterval=null,t.pingTimeout=null,t.pingTimeoutTimer=null,"function"==typeof addEventListener&&(t.opts.closeOnBeforeunload&&addEventListener("beforeunload",(function(){t.transport&&(t.transport.removeAllListeners(),t.transport.close())}),!1),"localhost"!==t.hostname&&(t.offlineEventListener=function(){t.onClose("transport close")},addEventListener("offline",t.offlineEventListener,!1))),t.open(),t}return t=c,(n=[{key:"createTransport",value:function(e){var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.opts.query);t.EIO=f.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=r({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new d[e](n)}},{key:"open",value:function(){var e,t=this;if(this.opts.rememberUpgrade&&c.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){t.emit("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}},{key:"setTransport",value:function(e){var t=this;this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(){t.onClose("transport close")}))}},{key:"probe",value:function(e){var t=this,n=this.createTransport(e,{probe:1}),r=!1;c.priorWebsocketSuccess=!1;var i=function(){r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(function(e){if(!r)if("pong"===e.type&&"probe"===e.data){if(t.upgrading=!0,t.emit("upgrading",n),!n)return;c.priorWebsocketSuccess="websocket"===n.name,t.transport.pause((function(){r||"closed"!==t.readyState&&(d(),t.setTransport(n),n.send([{type:"upgrade"}]),t.emit("upgrade",n),n=null,t.upgrading=!1,t.flush())}))}else{var i=new Error("probe error");i.transport=n.name,t.emit("upgradeError",i)}})))};function o(){r||(r=!0,d(),n.close(),n=null)}var a=function(e){var r=new Error("probe error: "+e);r.transport=n.name,o(),t.emit("upgradeError",r)};function s(){a("transport closed")}function u(){a("socket closed")}function l(e){n&&e.name!==n.name&&o()}var d=function(){n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),t.removeListener("close",u),t.removeListener("upgrading",l)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",u),this.once("upgrading",l),n.open()}},{key:"onOpen",value:function(){if(this.readyState="open",c.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},{key:"onPacket",value:function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emit("ping"),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}}},{key:"onHandshake",value:function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}},{key:"resetPingTimeout",value:function(){var e=this;this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((function(){e.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}},{key:"onDrain",value:function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()}},{key:"flush",value:function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))}},{key:"write",value:function(e,t,n){return this.sendPacket("message",e,t,n),this}},{key:"send",value:function(e,t,n){return this.sendPacket("message",e,t,n),this}},{key:"sendPacket",value:function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:e,data:t,options:n};this.emit("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var e=this,t=function(){e.onClose("forced close"),e.transport.close()},n=function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()},r=function(){e.once("upgrade",n),e.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){e.upgrading?r():t()})):this.upgrading?r():t()),this}},{key:"onError",value:function(e){c.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)}},{key:"onClose",value:function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingIntervalTimer),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(e){for(var t=[],n=0,r=e.length;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}])&&o(t.prototype,n),c}(h);g.priorWebsocketSuccess=!1,g.protocol=f.protocol,e.exports=g},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=n(10),p=n(11),_=n(2),g=n(3),y=g.pick,v=g.installTimerFunctions,M=n(0);function T(){}var b=null!=new m({xdomain:!1}).responseType,w=function(e){u(n,e);var t=c(n);function n(e){var r;if(o(this,n),r=t.call(this,e),"undefined"!=typeof location){var i="https:"===location.protocol,a=location.port;a||(a=i?443:80),r.xd="undefined"!=typeof location&&e.hostname!==location.hostname||a!==e.port,r.xs=e.secure!==i}var s=e&&e.forceBase64;return r.supportsBinary=b&&!s,r}return s(n,[{key:"request",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(e,{xd:this.xd,xs:this.xs},this.opts),new D(this.uri(),e)}},{key:"doWrite",value:function(e,t){var n=this,r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(function(e){n.onError("xhr post error",e)}))}},{key:"doPoll",value:function(){var e=this,t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(function(t){e.onError("xhr poll error",t)})),this.pollXhr=t}}]),n}(p),D=function(e){u(n,e);var t=c(n);function n(e,r){var i;return o(this,n),i=t.call(this),v(h(i),r),i.opts=r,i.method=r.method||"GET",i.uri=e,i.async=!1!==r.async,i.data=void 0!==r.data?r.data:null,i.create(),i}return s(n,[{key:"create",value:function(){var e=this,t=y(this.opts,"agent","enablesXDR","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;var r=this.xhr=new m(t);try{r.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var i in r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}catch(e){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{r.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),this.hasXDR()?(r.onload=function(){e.onLoad()},r.onerror=function(){e.onError(r.responseText)}):r.onreadystatechange=function(){4===r.readyState&&(200===r.status||1223===r.status?e.onLoad():e.setTimeoutFn((function(){e.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(t){return void this.setTimeoutFn((function(){e.onError(t)}),0)}"undefined"!=typeof document&&(this.index=n.requestsCount++,n.requests[this.index]=this)}},{key:"onSuccess",value:function(){this.emit("success"),this.cleanup()}},{key:"onData",value:function(e){this.emit("data",e),this.onSuccess()}},{key:"onError",value:function(e){this.emit("error",e),this.cleanup(!0)}},{key:"cleanup",value:function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=T:this.xhr.onreadystatechange=T,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete n.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var e=this.xhr.responseText;null!==e&&this.onData(e)}},{key:"hasXDR",value:function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR}},{key:"abort",value:function(){this.cleanup()}}]),n}(_);function L(){for(var e in D.requests)D.requests.hasOwnProperty(e)&&D.requests[e].abort()}D.requestsCount=0,D.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",L):"function"==typeof addEventListener&&addEventListener("onpagehide"in M?"pagehide":"unload",L,!1)),e.exports=w,e.exports.Request=D},function(e,t,n){var r=n(12).PACKET_TYPES,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),o="function"==typeof ArrayBuffer,a=function(e,t){var n=new FileReader;return n.onload=function(){var e=n.result.split(",")[1];t("b"+e)},n.readAsDataURL(e)};e.exports=function(e,t,n){var s,u=e.type,l=e.data;return i&&l instanceof Blob?t?n(l):a(l,n):o&&(l instanceof ArrayBuffer||(s=l,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer))?t?n(l instanceof ArrayBuffer?l:l.buffer):a(new Blob([l]),n):n(r[u]+(l||""))}},function(e,t,n){var r,i=n(12),o=i.PACKET_TYPES_REVERSE,a=i.ERROR_PACKET;"function"==typeof ArrayBuffer&&(r=n(26));var s=function(e,t){if(r){var n=r.decode(e);return u(n,t)}return{base64:!0,data:e}},u=function(e,t){return"blob"===t&&e instanceof ArrayBuffer?new Blob([e]):e};e.exports=function(e,t){if("string"!=typeof e)return{type:"message",data:u(e,t)};var n=e.charAt(0);return"b"===n?{type:"message",data:s(e.substring(1),t)}:o[n]?e.length>1?{type:o[n],data:e.substring(1)}:{type:o[n]}:a}},function(e,t){!function(e){t.encode=function(t){var n,r=new Uint8Array(t),i=r.length,o="";for(n=0;n<i;n+=3)o+=e[r[n]>>2],o+=e[(3&r[n])<<4|r[n+1]>>4],o+=e[(15&r[n+1])<<2|r[n+2]>>6],o+=e[63&r[n+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(t){var n,r,i,o,a,s=.75*t.length,u=t.length,l=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),d=new Uint8Array(c);for(n=0;n<u;n+=4)r=e.indexOf(t[n]),i=e.indexOf(t[n+1]),o=e.indexOf(t[n+2]),a=e.indexOf(t[n+3]),d[l++]=r<<2|i>>4,d[l++]=(15&i)<<4|o>>2,d[l++]=(3&o)<<6|63&a;return c}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d,h=n(11),f=n(0),m=/\n/g,p=/\\n/g,_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(u,e);var t,n,r=s(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=r.call(this,e)).query=t.query||{},d||(d=f.___eio=f.___eio||[]),t.index=d.length,d.push(t.onData.bind(l(t))),t.query.j=t.index,t}return t=u,(n=[{key:"supportsBinary",get:function(){return!1}},{key:"doClose",value:function(){this.script&&(this.script.onerror=function(){},this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),o(c(u.prototype),"doClose",this).call(this)}},{key:"doPoll",value:function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&this.setTimeoutFn((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)}},{key:"doWrite",value:function(e,t){var n,r=this;if(!this.form){var i=document.createElement("form"),o=document.createElement("textarea"),a=this.iframeId="eio_iframe_"+this.index;i.className="socketio",i.style.position="absolute",i.style.top="-1000px",i.style.left="-1000px",i.target=a,i.method="POST",i.setAttribute("accept-charset","utf-8"),o.name="d",i.appendChild(o),document.body.appendChild(i),this.form=i,this.area=o}function s(){u(),t()}this.form.action=this.uri();var u=function(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(e){r.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+r.iframeId+'">';n=document.createElement(e)}catch(e){(n=document.createElement("iframe")).name=r.iframeId,n.src="javascript:0"}n.id=r.iframeId,r.form.appendChild(n),r.iframe=n};u(),e=e.replace(p,"\\\n"),this.area.value=e.replace(m,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===r.iframe.readyState&&s()}:this.iframe.onload=s}}])&&i(t.prototype,n),u}(h);e.exports=_},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=n(4),c=n(1),d=n(5),h=n(13),f=n(3).pick,m=n(29),p=m.WebSocket,_=m.usingBrowserWebSocket,g=m.defaultBinaryType,y=m.nextTick,v="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,e);var t,n,r=a(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this,e)).supportsBinary=!e.forceBase64,t}return t=s,(n=[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){if(this.check()){var e=this.uri(),t=this.opts.protocols,n=v?{}:f(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=_&&!v?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}this.ws.binaryType=this.socket.binaryType||g,this.addEventListeners()}}},{key:"addEventListeners",value:function(){var e=this;this.ws.onopen=function(){e.opts.autoUnref&&e.ws._socket.unref(),e.onOpen()},this.ws.onclose=this.onClose.bind(this),this.ws.onmessage=function(t){return e.onData(t.data)},this.ws.onerror=function(t){return e.onError("websocket error",t)}}},{key:"write",value:function(e){var t=this;this.writable=!1;for(var n=function(n){var r=e[n],i=n===e.length-1;c.encodePacket(r,t.supportsBinary,(function(e){var n={};_||(r.options&&(n.compress=r.options.compress),t.opts.perMessageDeflate&&("string"==typeof e?Buffer.byteLength(e):e.length)<t.opts.perMessageDeflate.threshold&&(n.compress=!1));try{_?t.ws.send(e):t.ws.send(e,n)}catch(e){}i&&y((function(){t.writable=!0,t.emit("drain")}),t.setTimeoutFn)}))},r=0;r<e.length;r++)n(r)}},{key:"onClose",value:function(){l.prototype.onClose.call(this)}},{key:"doClose",value:function(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}},{key:"uri",value:function(){var e=this.query||{},t=this.opts.secure?"wss":"ws",n="";return this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=h()),this.supportsBinary||(e.b64=1),(e=d.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+e}},{key:"check",value:function(){return!(!p||"__initialize"in p&&this.name===s.prototype.name)}}])&&i(t.prototype,n),s}(l);e.exports=M},function(e,t,n){var r=n(0),i="function"==typeof Promise&&"function"==typeof Promise.resolve?function(e){return Promise.resolve().then(e)}:function(e,t){return t(e,0)};e.exports={WebSocket:r.WebSocket||r.MozWebSocket,usingBrowserWebSocket:!0,defaultBinaryType:"arraybuffer",nextTick:i}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==z(Symbol.iterator)?function(e){return z(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":z(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.reconstructPacket=t.deconstructPacket=void 0;var i=n(15);t.deconstructPacket=function(e){var t=[],n=e.data,o=e;return o.data=function e(t,n){if(!t)return t;if(i.isBinary(t)){var o={_placeholder:!0,num:n.length};return n.push(t),o}if(Array.isArray(t)){for(var a=new Array(t.length),s=0;s<t.length;s++)a[s]=e(t[s],n);return a}if("object"===r(t)&&!(t instanceof Date)){var u={};for(var l in t)t.hasOwnProperty(l)&&(u[l]=e(t[l],n));return u}return t}(n,t),o.attachments=t.length,{packet:o,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]=e(t[i],n);else if("object"===r(t))for(var o in t)t.hasOwnProperty(o)&&(t[o]=e(t[o],n));return t}(e.data,t),e.attachments=void 0,e}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}}])},"object"==("undefined"==typeof exports?"undefined":z(exports))&&"object"==z(e)?e.exports=I():"function"==typeof define&&n.amdO?define([],I):"object"==("undefined"==typeof exports?"undefined":z(exports))?exports.io=I():E.io=I();var P=Y((function e(t,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),O(this,"name","AgentDesktopPlugin"),O(this,"config",{}),O(this,"koreCoBrowse",void 0),O(this,"rrweb",void 0),O(this,"authResponse",void 0),O(this,"AgentDesktop",(function(e,t){var n=this,i=this;this.authResponse=null;var a=this.config.hostInstance.bot;console.log("agentdesktop uuId",e);var s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMCSURBVHgBxZjPaxNBFMffzG43oFCSo1gwMW3BUxPwR/HSBKwUT/XeYIX2asV/IO1/YC+CtFBLejdHaYXGW7ViVy8e2pL14k0SCoLdpDu+t/lhkmbNTDY/vpDsJHmb/fDezLz3hoGi8tOJsFPW50FjUyBYAgQEgeGLJKCIYwtHFjjOB7tczt4yc5bK/zNZw5M7s4sc4IlgCKEmUwixPn6490bGuCPQ8e0HCc75Fg7D4E8Wgq11AvMEOoolgsERI+0weA69lGAvz0rna3EzVwRZoO+xRNgwjLc4jEF/ZNm2nWw3v5gHzD74D1FXUE1AFKZRwzgaAExN5hlCNYaPN/5Kc2aAMKTY6Egg3fhF3UO0rBljWzAEOY6TnPj8PkfjuocQJg1DUnVbqYzpjbwDgw1Vq8JVhgoQemdF9k5jMiprqmRLWcC90jIHyf0mMHkTxjKvILSc6mgbWl5wbWWhKCX9vP/ohvZibHwRXTQnc9PFr0L1YSlyK/z58s0TJrSUgsLGDvzey4GsbCF+6KDxGczS0ips7vyDos8bGU+YwmYGVIRhm9IRJgyK8oLyA+NKiEQFSLoI8YaiYsgXTEVBvV5cdaHLnvIF4wJx8CvmMe5SerXs7MpLjXPGDZnHRFdQkUJGmVYZyGsC+4ISYGnPrkfjTLEQ84Kp7Uud9ilPHgYftZVrkbDsxvg/mF5A4W79mnNdz8reQKlDZmnT6qOQhZYWlPKZzljWXRcn92b3mZBrbwITUTg/PpUxVbLF+WNGD3fjlWXvwDZISvoBirYCxDpd6zvH6d2HeRheTWRFP+1GaFDfGLGMfApDEjWQtXEdiGpaanlhwGpts5tSh1YqrWIMTRicLO1qabXxiyagCPZHjPPHZAgDgMHiPhnJNbfUl5Jr5OCda9hnKNOFwWe1/tA227tQth3vx5yi/+RX7LYwpI4FQ7WB7EVHa9FKrjWEXlI6sKq2S0qJGD2Sw8t2zw6sWpWfnsMjvfI8tpszQF6rlMCNR3r4QogL8ZXr5WzkQO1I7y91mFsdhEgKrAAAAABJRU5ErkJggg==",u="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMfSURBVHgBxZg/TBNRHMe/v1cQCTGpCerg4AHGlEXEwZWDiDLS4GBjohJjIokJRF2IA7Az2NGpEmM6GRwN/isxDsACLt6kNyhBoqYJktIW7vl+154tWuiV67Xfpb+7+11/n7zfu997v0eoUKGYrlFTw6Ak6gJIJ2kFlR3kZyRl0hJkKssUljUvafuFEUmYlfw/uXUMPeu/CYEbytRRgSRhmXYQNa69euLGvyxQ6OlFHQ0UU6YGbzJhYaoc2J5AWkwPNjcfmpBSjqGKIqJHqVRmyhxOJEs+L3UzFNc1SY2zJHEO/sgEsr2l5heVggEa38F7ig4EJYovOE01grHDcRZyMfcA4jlTIxhbPCXyMQv3HCP/WcdQF0mVutcJtgojJDCBuoliBQzkR6eGqSohLc+QA1LVdBT1Vm4VgODPnMi3eoOTLSewODSLULC9nKve+bzvlCDZMAifxDAzfdN48/UDjOTn8i+kRVhYAj3wQQ7M0voKxhemXb3DOwgBizRUWQeByUsXAlJDFeUBRi28CApnc7WfjjS24MLxs+XcPMGwpFRAbhw7j562A4Xb+uEXjKPAsaH2MTVWh/dz+rb53V5jxs+PYCPzGys/DV9gVMqSgdYrHXeUXTZti+sfbah7Xbfs6yV1XQzDoLfnH8KL1ObNCLQOdXTDZWFkKA58Pw+1qkbOgbn+9gEyVhZeJEELnDJNoQ24fYnTtbq5Zqcv3H4ZP1K/bJiN7Ca8Skj5WKXszJpiq2jfzFWXoZoCh3D3/WRVYGxRw4i9HwrF+3mXqKOOUvNn+dPVuW7ns59BnaW6myj/FnaM8UtfUOWq7V5kGpG5NraKCqM1jLpJTjnWXyDe06o+PYoaSy0XUSNS6GZ3LR2p9M6kclhGzURmOp2dLL6zC4jbW6JAmB1RAxgVvvfflvq/xdWIvLQd/YTiExGOkYu1WyVXe3bc2sp0+zGneM6kU9mSMKzyxzFxbk9owntJ4BG3hp2GcE8vuBSDqeI1qipqhR2KTKgwM8VfUlWACmADGsntQZXsHsuCJkDq0AD5Iz0kla0mqaVKCK0c5EjvD7WHTOQEQMMGAAAAAElFTkSuQmCC";t&&(this.authResponse=t,i.autoStartCobrowse());var l=this;this.phone=new o.T,this.activeCall=null,this.callDetails=null,this.callAccepted=!1,this.callMuted=!1,this.showPhonePanel=!1,this.showVideo=!1,this.screenSharingStream=null,this.agentProfileIcon=null,this.maskClassList=null,this.maskPatternList=null,this.phoneConfig={reconnectIntervalMin:2,reconnectIntervalMax:30,registerExpires:600,useSessionTimer:!1,keepAlivePing:10,keepAlivePong:10,keepAliveStats:60,keepAliveDist:!1,restoreCall:!0,restoreServer:!0,restoreCallMaxDelay:20,dtmfUseWebRTC:!0,dtmfDuration:null,dtmfInterToneGap:null,avoidTwoWayHold:!0,enableAddVideo:!0,addLoggerTimestamp:!0,useWebrtcTracer:!1,audioAutoAnswerNoSdp:!0,switchSbcAtInvite5xx:!0,modes:{ice_timeout_fix:2e3,chrome_rtp_timeout_fix:13,sbc_ha_pairs_mode:void 0,ringing_header_mode:"Allow-Events: talk,hold,conference"},constraints:{chrome:{audio:{echoCancellation:!0}},firefox:{audio:{echoCancellation:!0}},safari:{audio:{echoCancellation:!0}},ios_safari:{audio:{echoCancellation:!0}}},version:"18-Nov-2020"},this.callTerminated=function(){r("#callcontainer").empty(),this.removeAudoVideoContainer(),this.disableMinimizeButton(!1)},this.showFooterButtons=function(e,t){var n=null;e&&(n='<div class="footer-btn-a-v-attch">\n <div id="closecall" class="btn_actions enable-audio">\n <img title="End Call" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDIwIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8cGF0aCBkPSJNMTguMjYzOSA3LjU0OTg5QzE4Ljk3NyA3LjU0OTg5IDE5LjU1NTEgNi45NzE3NyAxOS41NTUxIDYuMjU4NjJMMTkuNTU1MSA0LjY2NTQ4QzE5LjU1NTEgMy4wODM3IDE4LjQ5NTkgMS42ODA4NiAxNi45NjQyIDEuMjgwMDVDMTUuMjUzNiAwLjgyOTEzNyAxMy45NDAyIDAuNTQ2NDIgOS42Mjc5IDAuNTQ5OTk5QzUuMzE1NTkgMC41NDY0MjEgNC40MzUyMyAwLjgzOTg3MyAyLjc0OTY3IDEuMjgwMDVDMS4yMTQ0MiAxLjY4NDQ0IDAuMTU4NzEyIDMuMDgzNyAwLjE2MjI5IDQuNjYxOUwwLjE2MDMxNSA2LjI1NjE5QzAuMTU5NDMgNi45NzAyOSAwLjczODMxNyA3LjU0OTUyIDEuNDUyNDIgNy41NDkwNkw0LjQ0NzQzIDcuNTQ3MTRDNS4xNjAyNSA3LjU0NjY5IDUuNzM3ODcgNi45Njg3IDUuNzM3ODcgNi4yNTU4N0w1LjczNzg3IDUuMjc3NDNDNS45MzQ3IDUuMjAyMjggNi4yNDYwNCA1LjEwNTY2IDYuNjMyNTQgNS4wMTk3N0M3LjQzMDU5IDQuODQ0NDEgOC41MjkyNCA0LjY5NzY5IDkuNjI3OSA0LjcwMTI3QzEwLjcyNjUgNC42OTc2OSAxMS45NDY5IDQuODQ0NDEgMTIuODcwMiA1LjAyMzM1QzEzLjMyNDcgNS4xMTI4MSAxMy43MTgzIDUuMjEzMDIgMTMuOTU4MSA1LjI5NTMzQzEzLjk2ODggNS4yOTg5MSAxMy45Njg4IDUuMjk4OSAxMy45Nzk2IDUuMzAyNDhWNi4yNTg2MkMxMy45Nzk2IDYuOTcxNzcgMTQuNTU3NyA3LjU0OTg5IDE1LjI3MDggNy41NDk4OUwxOC4yNjM5IDcuNTQ5ODlaTTE4LjI1OTcgNi4yNTQ0MUwxNS4yNzUxIDYuMjU0NDFMMTUuMjcxNSA0Ljk0MTA0QzE1LjI3MTUgNC42NjkwNiAxNS4xMzU1IDQuNTA0NDQgMTUuMDQ2IDQuNDIyMTNDMTQuOTYzNyA0LjMzOTgyIDE0Ljg5MjEgNC4yOTY4OCAxNC44MjQxIDQuMjU3NTFDMTQuNjgxIDQuMTc4NzggMTQuNTQxNCA0LjEyNTEgMTQuMzczMiA0LjA2NDI2QzE0LjA0MDQgMy45NTMzMiAxMy42MTQ1IDMuODQ5NTQgMTMuMTEzNSAzLjc0OTM0QzEyLjExODcgMy41NTYwOSAxMC44MzM5IDMuNDAyMjEgOS42Mjc4OSAzLjM5ODYzQzguNDIxODggMy40MDIyMSA3LjI0ODA3IDMuNTU5NjcgNi4zNTM0IDMuNzYwMDhDNS45MDYwNyAzLjg1NjcgNS41MzM4OSAzLjk2NDA2IDUuMjQwNDMgNC4wNzg1OEM1LjA5MDEzIDQuMTM1ODQgNC45NjEzIDQuMTkzMDkgNC44Mjg4OSA0LjI4MjU2QzQuNzY0NDcgNC4zMjU1IDQuNjk2NDggNC4zNzkxOSA0LjYyMTMyIDQuNDY4NjVDNC41NDI1OSA0LjU1NDU0IDQuNDQyMzkgNC43MTIgNC40NDIzOSA0Ljk0MTA0TDQuNDQyMzkgNi4yNTA4M0wxLjQ1NDE5IDYuMjU0NDFWNC42NTgzMkMxLjQ1NDE5IDMuNjYzNDUgMi4xMTYyNSAyLjc4NjY3IDMuMDc4OTEgMi41MzI1OUM0Ljc5MzEgMi4wODUyNSA1LjM3Mjg1IDEuODQxOSA5LjYyNzkgMS44MzgzMkMxMy44ODI5IDEuODQxOSAxNC45NDU4IDIuMDg4ODMgMTYuNjM0OSAyLjUzMjU5QzE3LjU5NzYgMi43ODY2NyAxOC4yNTk3IDMuNjYzNDUgMTguMjU5NyA0LjY1ODMyTDE4LjI1OTcgNi4yNTQ0MVoiIGZpbGw9IndoaXRlIi8+DQo8L3N2Zz4NCg==" />\t\t\t\t\t\t\n </div>\t\t\n <div id="muteaudio" class="btn_actions mute-audio">\n <img title="Mute Audio" class="mute-img" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAxNCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik03LjAwMDA2IDAuODMyMDMxQzQuOTM2NDMgMC44MzIwMzEgMy4yNTAwNiAyLjUxODQgMy4yNTAwNiA0LjU4MjAzVjEwLjgzMkMzLjI1MDA2IDEyLjg5NTcgNC45MzY0MyAxNC41ODIgNy4wMDAwNiAxNC41ODJDOS4wNjM3IDE0LjU4MiAxMC43NTAxIDEyLjg5NTcgMTAuNzUwMSAxMC44MzJWNC41ODIwM0MxMC43NTAxIDIuNTE4NCA5LjA2MzcgMC44MzIwMzEgNy4wMDAwNiAwLjgzMjAzMVpNNy4wMDAwNiAyLjA4MjAzQzguMzg4MSAyLjA4MjAzIDkuNTAwMDYgMy4xOTQgOS41MDAwNiA0LjU4MjAzVjEwLjgzMkM5LjUwMDA2IDEyLjIyMDEgOC4zODgxIDEzLjMzMiA3LjAwMDA2IDEzLjMzMkM1LjYxMjAzIDEzLjMzMiA0LjUwMDA2IDEyLjIyMDEgNC41MDAwNiAxMC44MzJWNC41ODIwM0M0LjUwMDA2IDMuMTk0IDUuNjEyMDMgMi4wODIwMyA3LjAwMDA2IDIuMDgyMDNaTTEuMzY1MyA4LjczOTc0QzEuMTk5NjggOC43NDIzMyAxLjA0MTg2IDguODEwNTUgMC45MjY1MDQgOC45Mjk0MkMwLjgxMTE0OCA5LjA0ODI4IDAuNzQ3Njg5IDkuMjA4MDggMC43NTAwNjQgOS4zNzM3VjEwLjgzMkMwLjc1MDA2NCAxNC4wNjU2IDMuMjIyNTggMTYuNzM1NCA2LjM3NTA2IDE3LjA1MDNWMTguOTU3QzYuMzczODkgMTkuMDM5OCA2LjM4OTE5IDE5LjEyMjEgNi40MjAwOCAxOS4xOTg5QzYuNDUwOTYgMTkuMjc1OCA2LjQ5NjgxIDE5LjM0NTcgNi41NTQ5NyAxOS40MDQ3QzYuNjEzMTIgMTkuNDYzNyA2LjY4MjQxIDE5LjUxMDUgNi43NTg4MiAxOS41NDI1QzYuODM1MjMgMTkuNTc0NSA2LjkxNzI0IDE5LjU5MDkgNy4wMDAwNiAxOS41OTA5QzcuMDgyODkgMTkuNTkwOSA3LjE2NDkgMTkuNTc0NSA3LjI0MTMxIDE5LjU0MjVDNy4zMTc3MiAxOS41MTA1IDcuMzg3MDEgMTkuNDYzNyA3LjQ0NTE2IDE5LjQwNDdDNy41MDMzMiAxOS4zNDU3IDcuNTQ5MTcgMTkuMjc1OCA3LjU4MDA1IDE5LjE5ODlDNy42MTA5MyAxOS4xMjIxIDcuNjI2MjQgMTkuMDM5OCA3LjYyNTA2IDE4Ljk1N1YxNy4wNTAzQzEwLjc3NzUgMTYuNzM1NCAxMy4yNTAxIDE0LjA2NTYgMTMuMjUwMSAxMC44MzJWOS4zNzM3QzEzLjI1MTIgOS4yOTA4OCAxMy4yMzU5IDkuMjA4NjUgMTMuMjA1MSA5LjEzMTc5QzEzLjE3NDIgOS4wNTQ5NCAxMy4xMjgzIDguOTg0OTkgMTMuMDcwMiA4LjkyNjAxQzEzLjAxMiA4Ljg2NzAzIDEyLjk0MjcgOC44MjAxOSAxMi44NjYzIDguNzg4MjJDMTIuNzg5OSA4Ljc1NjI2IDEyLjcwNzkgOC43Mzk3OSAxMi42MjUxIDguNzM5NzlDMTIuNTQyMiA4LjczOTc5IDEyLjQ2MDIgOC43NTYyNiAxMi4zODM4IDguNzg4MjJDMTIuMzA3NCA4LjgyMDE5IDEyLjIzODEgOC44NjcwMyAxMi4xOCA4LjkyNjAxQzEyLjEyMTggOC45ODQ5OSAxMi4wNzYgOS4wNTQ5NCAxMi4wNDUxIDkuMTMxNzlDMTIuMDE0MiA5LjIwODY1IDExLjk5ODkgOS4yOTA4OCAxMi4wMDAxIDkuMzczN1YxMC44MzJDMTIuMDAwMSAxMy41NzU5IDkuODA4MjYgMTUuNzg4MiA3LjA3NDEyIDE1LjgyOEM3LjA0NjMyIDE1LjgyNDUgNy4wMTgzMiAxNS44MjI4IDYuOTkwMyAxNS44MjMxQzYuOTY3NDQgMTUuODIzNSA2Ljk0NDYyIDE1LjgyNTEgNi45MjE5NCAxNS44MjhDNC4xODk3IDE1Ljc4NiAyLjAwMDA2IDEzLjU3NDYgMi4wMDAwNiAxMC44MzJWOS4zNzM3QzIuMDAxMjYgOS4yOTAwNCAxLjk4NTY2IDkuMjA3IDEuOTU0MTcgOS4xMjk0OUMxLjkyMjY5IDkuMDUxOTggMS44NzU5NiA4Ljk4MTU4IDEuODE2NzcgOC45MjI0NkMxLjc1NzU3IDguODYzMzQgMS42ODcxMSA4LjgxNjcxIDEuNjA5NTYgOC43ODUzMkMxLjUzMjAxIDguNzUzOTQgMS40NDg5NSA4LjczODQ0IDEuMzY1MyA4LjczOTc0WiIgZmlsbD0id2hpdGUiLz4NCjwvc3ZnPg0K" />\t\t\t\t\t\t\n <img title="Unmute Audio" class="un-mute" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxNyAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik04LjUwMDUyIDAuNzkyOTY5QzEwLjQ2MzkgMC43OTI5NjkgMTIuMDYzIDIuMzkyMTQgMTIuMDYzIDQuMzU1NDdWMTAuMjkzQzEyLjA2MyAxMC4zNzYxIDEyLjA1OTIgMTAuNDU4OSAxMi4wNTUzIDEwLjUzOEwxMC44NzU1IDkuMzU5MDVWNC4zNTU0N0MxMC44NzU1IDQuMjczNTggMTAuODcxMyA0LjE5MjQ4IDEwLjg2MzEgNC4xMTI3MUMxMC43NDE0IDIuOTE2MTUgOS43Mjg4NCAxLjk4MDQ3IDguNTAwNTIgMS45ODA0N0M3LjE5MDMxIDEuOTgwNDcgNi4xMjU1MiAzLjA0NTI2IDYuMTI1NTIgNC4zNTU0N1Y0LjYwOTA1TDUuMDM2OTcgMy41MjA1MUM1LjQxMzAyIDEuOTU2OTcgNi44MjYxNCAwLjc5Mjk2OSA4LjUwMDUyIDAuNzkyOTY5Wk0xLjE4OTIgMS41NzkyMkMxLjM0MzQgMS41ODM3MiAxLjQ4OTggMS42NDgwNCAxLjU5NzQgMS43NTg1OUwxMi41NzE3IDEyLjczMjlDMTIuODA1OCAxMi4zNDMzIDEyLjk4NTEgMTEuOTE3OCAxMy4wOTk4IDExLjQ2NUMxMy4xMjcyIDExLjM1OTggMTMuMTUwOSAxMS4yNTM0IDEzLjE3MDkgMTEuMTQ1N0MxMy4xODg3IDExLjA0NzEgMTMuMjA0MSAxMC45NDc5IDEzLjIxNTcgMTAuODQ3M0MxMy4yMjA4IDEwLjgwMzkgMTMuMjI1NyAxMC43NjA0IDEzLjIyOTYgMTAuNzE2NkMxMy4yNDE5IDEwLjU3NjkgMTMuMjUwNSAxMC40MzYgMTMuMjUwNSAxMC4yOTNWOC45MDc1NUMxMy4yNDk0IDguODI4MDggMTMuMjY0MiA4Ljc0OTE5IDEzLjI5NDEgOC42NzU1NkMxMy4zMjQgOC42MDE5MiAxMy4zNjg0IDguNTM1MDQgMTMuNDI0NiA4LjQ3ODg4QzEzLjQ4MDkgOC40MjI3MiAxMy41NDc4IDguMzc4NDEgMTMuNjIxNSA4LjM0ODZDMTMuNjk1MiA4LjMxODc4IDEzLjc3NDEgOC4zMDQwNiAxMy44NTM1IDguMzA1M0MxNC4wMTA5IDguMzA3NzYgMTQuMTYwOCA4LjM3MjU2IDE0LjI3MDQgOC40ODU0OUMxNC4zOCA4LjU5ODQxIDE0LjQ0MDMgOC43NTAyMSAxNC40MzggOC45MDc1NVYxMC4yOTNDMTQuNDM4IDEwLjQ4NTkgMTQuNDI4NCAxMC42NzYzIDE0LjQxMDIgMTAuODY0M0MxNC4zNTU1IDExLjQzNjcgMTQuMjE5OSAxMS45ODU0IDE0LjAxNDQgMTIuNDk3OUwxNC4wMDk3IDEyLjQ5MzJDMTMuODUzMiAxMi44Nzk2IDEzLjY1NDEgMTMuMjQzNCAxMy40MjI5IDEzLjU4NDFMMTYuMjQzMiAxNi40MDQ0QzE2LjMwMDIgMTYuNDU5MSAxNi4zNDU3IDE2LjUyNDcgMTYuMzc3MSAxNi41OTcyQzE2LjQwODQgMTYuNjY5NyAxNi40MjQ5IDE2Ljc0NzcgMTYuNDI1OCAxNi44MjY3QzE2LjQyNjYgMTYuOTA1NyAxNi40MTE2IDE2Ljk4NDEgMTYuMzgxNyAxNy4wNTcyQzE2LjM1MTkgMTcuMTMwMyAxNi4zMDc3IDE3LjE5NjggMTYuMjUxOSAxNy4yNTI2QzE2LjE5NiAxNy4zMDg1IDE2LjEyOTYgMTcuMzUyNyAxNi4wNTY0IDE3LjM4MjVDMTUuOTgzMyAxNy40MTI0IDE1LjkwNDkgMTcuNDI3MyAxNS44MjU5IDE3LjQyNjVDMTUuNzQ2OSAxNy40MjU3IDE1LjY2ODkgMTcuNDA5MiAxNS41OTY0IDE3LjM3NzhDMTUuNTIzOSAxNy4zNDY1IDE1LjQ1ODMgMTcuMzAxIDE1LjQwMzYgMTcuMjQ0TDEyLjY2OTkgMTQuNTEwM0MxMS43MzAyIDE1LjQ0MTUgMTAuNDgxNCAxNi4wNTc2IDkuMDk0MjcgMTYuMTk2NVYxOC4wMTE3QzkuMDk1MzggMTguMDkwNCA5LjA4MDg0IDE4LjE2ODUgOS4wNTE1IDE4LjI0MTVDOS4wMjIxNiAxOC4zMTQ1IDguOTc4NjEgMTguMzgxIDguOTIzMzYgMTguNDM3QzguODY4MTIgMTguNDkzMSA4LjgwMjI5IDE4LjUzNzUgOC43Mjk3IDE4LjU2NzlDOC42NTcxMSAxOC41OTgzIDguNTc5MiAxOC42MTM5IDguNTAwNTIgMTguNjEzOUM4LjQyMTgzIDE4LjYxMzkgOC4zNDM5MyAxOC41OTgzIDguMjcxMzQgMTguNTY3OUM4LjE5ODc1IDE4LjUzNzUgOC4xMzI5MiAxOC40OTMxIDguMDc3NjcgMTguNDM3QzguMDIyNDMgMTguMzgxIDcuOTc4ODcgMTguMzE0NSA3Ljk0OTUzIDE4LjI0MTVDNy45MjAxOSAxOC4xNjg1IDcuOTA1NjUgMTguMDkwNCA3LjkwNjc3IDE4LjAxMTdWMTYuMjAwM0M0LjkxMDk0IDE1LjkwMTMgMi41NjMwMiAxMy4zNjYxIDIuNTYzMDIgMTAuMjkzVjguOTA3NTVDMi41NjMwMiA4LjU3OTAxIDIuODI4MjMgOC4zMTM4IDMuMTU2NzcgOC4zMTM4QzMuNDg1MzEgOC4zMTM4IDMuNzUwNTIgOC41NzkwMSAzLjc1MDUyIDguOTA3NTVWMTAuMjkzQzMuNzUwNTIgMTIuODg5MSA1Ljg0MTU4IDE1LjAwMSA4LjQyODYyIDE1LjAzOTlDOC40Mzg5IDE1LjAzODYgOC40NDkyMSAxNS4wMzc1IDguNDU5NTQgMTUuMDM2OEM4LjQ2MDU3IDE1LjAzNjUgOC40NjE2IDE1LjAzNjMgOC40NjI2MyAxNS4wMzZDOC40NjYyNCAxNS4wMzYgOC40Njk4NSAxNS4wMzYgOC40NzM0NiAxNS4wMzZDOC40ODU1NSAxNS4wMzUxIDguNDk3NjcgMTUuMDM0NiA4LjUwOTc5IDE1LjAzNDVDOC41MTM5MiAxNS4wMzQ3IDguNTE4MDQgMTUuMDM0OSA4LjUyMjE2IDE1LjAzNTJDOC41MjYyOSAxNS4wMzU1IDguNTMwNDEgMTUuMDM1NyA4LjUzNDUzIDE1LjAzNkM4Ljk5OTc2IDE1LjAzMjYgOS40NDczOSAxNC45NjAyIDkuODcxMjQgMTQuODMzNUM5LjkwNTIgMTQuODIzMiA5LjkzOTY2IDE0LjgxNDMgOS45NzMzIDE0LjgwMzNDMTAuMDgyOSAxNC43Njc4IDEwLjE4OTggMTQuNzI2NSAxMC4yOTU3IDE0LjY4MzVDMTAuMzQ5MiAxNC42NjE1IDEwLjQwMjQgMTQuNjM5MyAxMC40NTQ5IDE0LjYxNTRDMTAuNTQxMyAxNC41NzY2IDEwLjYyNjYgMTQuNTM1NSAxMC43MTAxIDE0LjQ5MTdDMTAuNzg1NCAxNC40NTE5IDEwLjg1OTEgMTQuNDA5NCAxMC45MzIgMTQuMzY1N0MxMC45OTQxIDE0LjMyODggMTEuMDU2NSAxNC4yOTI1IDExLjExNjcgMTQuMjUyOEMxMS4yMzIgMTQuMTc2NCAxMS4zNDM2IDE0LjA5NTMgMTEuNDUxNSAxNC4wMDkzQzExLjQ2NzQgMTMuOTk2OCAxMS40ODQ1IDEzLjk4NTcgMTEuNTAwMiAxMy45NzNDMTEuNjE1OCAxMy44Nzg0IDExLjcyNSAxMy43NzY0IDExLjgzMTEgMTMuNjcxNUwxMC45ODkyIDEyLjgyOTVDMTAuMzQ2IDEzLjQ2MDcgOS40NzAzOSAxMy44NTU1IDguNTAwNTIgMTMuODU1NUM2LjUzNzE4IDEzLjg1NTUgNC45MzgwMiAxMi4yNTYzIDQuOTM4MDIgMTAuMjkzVjYuNzc4NEwwLjc1NzggMi41OTgxOUMwLjY3MjE0MiAyLjUxNDc2IDAuNjEzNjYzIDIuNDA3NDIgMC41OTAwMTggMi4yOTAyMUMwLjU2NjM3NCAyLjE3MyAwLjU3ODY2MyAyLjA1MTM5IDAuNjI1Mjc5IDEuOTQxMjhDMC42NzE4OTYgMS44MzExNyAwLjc1MDY2OCAxLjczNzcgMC44NTEyODUgMS42NzMxQzAuOTUxOTAxIDEuNjA4NSAxLjA2OTY4IDEuNTc1NzggMS4xODkyIDEuNTc5MjJaTTYuMTI1NTIgNy45NjU5VjEwLjI5M0M2LjEyNTUyIDExLjYwMzIgNy4xOTAzMSAxMi42NjggOC41MDA1MiAxMi42NjhDOS4xNDQ1MiAxMi42NjggOS43Mjc4OCAxMi40MTIgMTAuMTU1IDExLjk5NTRMNi4xMjU1MiA3Ljk2NTlaIiBmaWxsPSJ3aGl0ZSIvPg0KPC9zdmc+DQo=" />\t\t\t\t\t\t \n </div>',t&&(n+='\n <div id="videobuttons" class="btn_actions enable-video active-">\n <img class="video-unmute" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxOCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik0xNy43NSAwLjkzNTU3N0MxNy43NSAwLjQ1Njc0IDE3LjI5ODIgMC4xNTU3NjIgMTYuOTMzNiAwLjM5MTc1M0wxMy4zNzUgMi42OTUzMVYxLjg3NUMxMy4zNzUgMC44NDQ3MjYgMTIuNjM1OSAwIDExLjczNDQgMEgxLjg5MDYyQzAuOTg5MTM2IDAgMC4yNSAwLjg0NDcyNiAwLjI1IDEuODc1VjguMTI1QzAuMjUgOS4xNTUyNyAwLjk4OTEzNiAxMCAxLjg5MDYyIDEwSDExLjczNDRDMTIuNjM1OSAxMCAxMy4zNzUgOS4xNTUyNyAxMy4zNzUgOC4xMjVWNy4zMDQ2OUwxNi45MzM2IDkuNjA4MjVDMTcuMjk4MiA5Ljg0NDI0IDE3Ljc1IDkuNTQzMjYgMTcuNzUgOS4wNjQ0MlYwLjkzNTU3N1pNMS44OTA2MiAxLjI1SDExLjczNDRDMTIuMDQyIDEuMjUgMTIuMjgxMiAxLjUyMzQ0IDEyLjI4MTIgMS44NzVWOC4xMjVDMTIuMjgxMiA4LjQ3NjU2IDEyLjA0MiA4Ljc1IDExLjczNDQgOC43NUgxLjg5MDYyQzEuNTgzMDEgOC43NSAxLjM0Mzc1IDguNDc2NTYgMS4zNDM3NSA4LjEyNVYxLjg3NUMxLjM0Mzc1IDEuNTIzNDQgMS41ODMwMSAxLjI1IDEuODkwNjIgMS4yNVpNMTYuNjU2MiAyLjAxMTcyVjcuOTg4MjhMMTMuMzc1IDUuODY0MjZWNC4xMzU3NEwxNi42NTYyIDIuMDExNzJaIiBmaWxsPSJ3aGl0ZSIvPg0KPC9zdmc+DQo=" />\t\t\t\t\t\t\n <img class="video-mute" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxOCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik0zLjYxNzA2IDAuOTY3MjAzQzMuNDA0NDggMC43MjQ0MTUgMy4wNTk5NCAwLjcyNDQ4MyAyLjg0NzQzIDAuOTY3MzU1QzIuNjM1MDkgMS4yMTAwMiAyLjYzNDgzIDEuNjAzMzcgMi44NDY4NCAxLjg0NjQxTDMuODUxNjggMi45OTgzNEgxLjg5MDYyQzAuOTg5MTM2IDIuOTk4MzQgMC4yNSAzLjg0MzA3IDAuMjUgNC44NzMzNFYxMS4xMjMzQzAuMjUgMTIuMTUzNiAwLjk4OTEzNiAxMi45OTgzIDEuODkwNjIgMTIuOTk4M0gxMS43MzQ0QzExLjk4NjUgMTIuOTk4MyAxMi4yMjU3IDEyLjkzIDEyLjQzOTMgMTIuODEyOEwxNC4zNzUgMTUuMDI5MUMxNC41ODk1IDE1LjI3NDcgMTQuOTM3NyAxNS4yNzQ5IDE1LjE1MjUgMTUuMDI5NUMxNS4zNjcxIDE0Ljc4NDIgMTUuMzY3IDE0LjM4NjQgMTUuMTUyMyAxNC4xNDEyTDMuNjE3MDYgMC45NjcyMDNaTTE3Ljc1IDMuOTM0ODNDMTcuNzUgMy40NTU3OSAxNy4yOTc4IDMuMTU0ODQgMTYuOTMzMyAzLjM5MTI0TDEzLjM3NSA1LjY5ODU0VjQuODczMzRDMTMuMzc1IDMuODM4MTkgMTIuNjQwMSAyLjk5ODM0IDExLjczNDQgMi45OTgzNEg2LjkwMjIyTDcuOTk1OTcgNC4yNDgzNEgxMS43MzQ0QzEyLjAzNzcgNC4yNDgzNCAxMi4yODEyIDQuNTI2NjYgMTIuMjgxMiA0Ljg3MzM0VjkuMDkyMDlMMTMuMzc1IDEwLjM0MjFMMTYuOTM2NCAxMi42MTU3QzE3LjMwMSAxMi44NDg0IDE3Ljc1IDEyLjU0NzIgMTcuNzUgMTIuMDdWMy45MzQ4M1pNMS44OTA2MiA0LjI0ODM0SDQuOTQ1NDRMMTEuNTA3OSAxMS43NDgzSDEuODkwNjJDMS41ODMwMSAxMS43NDgzIDEuMzQzNzUgMTEuNDc0OSAxLjM0Mzc1IDExLjEyMzNWNC44NzMzNEMxLjM0Mzc1IDQuNTIxNzggMS41ODMwMSA0LjI0ODM0IDEuODkwNjIgNC4yNDgzNFpNMTYuNjU2MiA1LjAxMDA2VjEwLjk4NjZMMTMuMzc1IDguODk2NzhWNy4xMzQwOUwxNi42NTYyIDUuMDEwMDZaIiBmaWxsPSJ3aGl0ZSIvPg0KPC9zdmc+DQo=" />\n </div>'),n+="</div>");var i=r("#callbuttons");i.empty(),i.append(n);var o=r("#muteaudio");o.off("click").on("click",(function(e){var t=l.activeCall.isAudioMuted();l.activeCall.muteAudio(!t),t?o.removeClass("active-"):o.addClass("active-")})),r("#closecall").off("click").on("click",(function(t){e&&l.activeCall.terminate()}));var a=!0;if(t){var s=r("#videobuttons");s.off("click").on("click",(function(e){l.activeCall?(a=!a,document.getElementById("kore_local_video_tmp").srcObject.getVideoTracks().forEach((function(e){return e.enabled=a})),a?(r("#kore_local_video_tmp").show(),s.addClass("active-"),r("#agentyou").hide()):(s.removeClass("active-"),r("#kore_local_video_tmp").hide(),r("#agentyou").show())):console.log("there is no active call, hence cannot toggle send video")}))}},this.fullScreen=!1,this.callConnected=function(e,t){var n='<div do-not-mutate="true" class="video-audio-chat-container">\n <div class="video-chat-">\n <div class="video-name-title">'.concat(t,"</div>\n <div id ='audiovideocallcontainer'></div>\n </div>\n <div id=\"callbuttons\"></div>\n </div>"),i=e?"video":"audio",o='<div id="video_view" class="video-view- audio-view-">\n <div class="agent-profile-img">\n <img style=\'height: 30px; width:30px; top:0px;left:0px;position: absolute; border-radius: 50%;\'\n src="'.concat(l.agentProfileIcon,'"> \n </div>\n <div class="title">Connected ').concat(i,' Call...</div>\n <div class="audio-info">Disconnecting ').concat(i," call doesn't end conversation</div>\n </div>"),a=document.getElementById("callcontainer");(a&&(a.remove(),a=null),a)||((a=document.createElement("div")).id="callcontainer",document.getElementById("agentcontainer").appendChild(a));setTimeout((function(){var e=r("#callcontainer");e.empty(),e.append(n);var t=r("#audiovideocallcontainer");if(t.empty(),l.callDetails.videoCall){t.append('<div id="video_view" class="video-view-">\n <video id="kore_remote_video_tmp" autoplay="autoplay" playsinline style="display: block;"></video>\n <div class="action-minimize-audio-control">\n <div id="maximizevideo" class="maximize-video">\n <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC44NTQ4IDEwLjQwMTRDMTUuMTkxNCAxMC40MDE0IDE1LjQ2NzcgMTAuNjU5MSAxNS40OTc0IDEwLjk4NzlMMTUuNSAxMS4wNDY2VjEzLjMzMTVDMTUuNSAxNC40OTk5IDE0LjU3NTkgMTUuNDUyNSAxMy40MTg4IDE1LjQ5ODNMMTMuMzMxNSAxNS41SDExLjA0NjZDMTAuNjkwMyAxNS41IDEwLjQwMTQgMTUuMjExMiAxMC40MDE0IDE0Ljg1NDhDMTAuNDAxNCAxNC41MTgzIDEwLjY1OTEgMTQuMjQyIDEwLjk4NzkgMTQuMjEyM0wxMS4wNDY2IDE0LjIwOTdIMTMuMzMxNUMxMy43OTU0IDE0LjIwOTcgMTQuMTc1MyAxMy44NSAxNC4yMDc1IDEzLjM5NDNMMTQuMjA5NyAxMy4zMzE1VjExLjA0NjZDMTQuMjA5NyAxMC42OTAzIDE0LjQ5ODUgMTAuNDAxNCAxNC44NTQ4IDEwLjQwMTRaTTEuMTQ1MTYgMTAuNDAxNEMxLjQ4MTY4IDEwLjQwMTQgMS43NTgwMiAxMC42NTkxIDEuNzg3NjkgMTAuOTg3OUwxLjc5MDMyIDExLjA0NjZWMTMuMzMxNUMxLjc5MDMyIDEzLjc5NTQgMi4xNTAwMyAxNC4xNzUzIDIuNjA1NzUgMTQuMjA3NUwyLjY2ODQ2IDE0LjIwOTdINC45NTM0MUM1LjMwOTcyIDE0LjIwOTcgNS41OTg1NyAxNC40OTg1IDUuNTk4NTcgMTQuODU0OEM1LjU5ODU3IDE1LjE5MTQgNS4zNDA5MiAxNS40Njc3IDUuMDEyMTMgMTUuNDk3NEw0Ljk1MzQxIDE1LjVIMi42Njg0NkMxLjUwMDA2IDE1LjUgMC41NDc0OTQgMTQuNTc1OSAwLjUwMTcyMiAxMy40MTg4TDAuNSAxMy4zMzE1VjExLjA0NjZDMC41IDEwLjY5MDMgMC43ODg4NDkgMTAuNDAxNCAxLjE0NTE2IDEwLjQwMTRaTTQuOTUzNDEgMC41QzUuMzA5NzIgMC41IDUuNTk4NTcgMC43ODg4NDkgNS41OTg1NyAxLjE0NTE2QzUuNTk4NTcgMS40ODE2OCA1LjM0MDkyIDEuNzU4MDIgNS4wMTIxMyAxLjc4NzY5TDQuOTUzNDEgMS43OTAzMkgyLjY2ODQ2QzIuMjA0NTYgMS43OTAzMiAxLjgyNDY4IDIuMTUwMDMgMS43OTI1MyAyLjYwNTc1TDEuNzkwMzIgMi42Njg0NlY0Ljk1MzQxQzEuNzkwMzIgNS4zMDk3MiAxLjUwMTQ3IDUuNTk4NTcgMS4xNDUxNiA1LjU5ODU3QzAuODA4NjQ0IDUuNTk4NTcgMC41MzIzMDMgNS4zNDA5MiAwLjUwMjYzNyA1LjAxMjEzTDAuNSA0Ljk1MzQxVjIuNjY4NDZDMC41IDEuNTAwMDYgMS40MjQwNyAwLjU0NzQ5NCAyLjU4MTI0IDAuNTAxNzIyTDIuNjY4NDYgMC41SDQuOTUzNDFaTTEzLjMzMTUgMC41QzE0LjQ5OTkgMC41IDE1LjQ1MjUgMS40MjQwNyAxNS40OTgzIDIuNTgxMjRMMTUuNSAyLjY2ODQ2VjQuOTUzNDFDMTUuNSA1LjMwOTcyIDE1LjIxMTIgNS41OTg1NyAxNC44NTQ4IDUuNTk4NTdDMTQuNTE4MyA1LjU5ODU3IDE0LjI0MiA1LjM0MDkyIDE0LjIxMjMgNS4wMTIxM0wxNC4yMDk3IDQuOTUzNDFWMi42Njg0NkMxNC4yMDk3IDIuMjA0NTYgMTMuODUgMS44MjQ2OCAxMy4zOTQzIDEuNzkyNTNMMTMuMzMxNSAxLjc5MDMySDExLjA0NjZDMTAuNjkwMyAxLjc5MDMyIDEwLjQwMTQgMS41MDE0NyAxMC40MDE0IDEuMTQ1MTZDMTAuNDAxNCAwLjgwODY0NCAxMC42NTkxIDAuNTMyMzAzIDEwLjk4NzkgMC41MDI2MzdMMTEuMDQ2NiAwLjVIMTMuMzMxNVoiIGZpbGw9IiMyMDIxMjQiLz4KPC9zdmc+Cg==" />\n </div>\n </div>\n <div id="showselfvideocontainer" class="show-self-video-container">\n <div class="show-self-video">\n <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDAuMzk4NDM4QzYuNTcxODggMC4zOTg0MzggMy42OTY4OCAyLjgxMDk0IDIuOTc1IDYuMDIzNDRDMy4wNDg0NCA2LjAxNTYyIDMuMTI1IDUuOTk4NDQgMy4yIDUuOTk4NDRDMy40MDQ2OSA1Ljk5ODQ0IDMuNjAxNTYgNi4wNDA2MyAzLjc4NzUgNi4wOTg0NEM0LjQ2NTYzIDMuMjkzNzUgNi45ODkwNiAxLjE5ODQ0IDEwIDEuMTk4NDRDMTMuMDA5NCAxLjE5ODQ0IDE1LjUzNDQgMy4yOTM3NSAxNi4yMTI1IDYuMDk4NDRDMTYuMzk4NCA2LjA0MDYzIDE2LjU5MzggNS45OTg0NCAxNi44IDUuOTk4NDRDMTYuODc1IDUuOTk4NDQgMTYuOTUxNiA2LjAxNTYyIDE3LjAyNSA2LjAyMzQ0QzE2LjMwMzEgMi44MTA5NCAxMy40MjY2IDAuMzk4NDM4IDEwIDAuMzk4NDM4Wk0zLjIgNi43OTg0NEMyLjUzOTA2IDYuNzk4NDQgMiA3LjMzNzUgMiA3Ljk5ODQ0VjEzLjk5ODRDMiAxNC42NTk0IDIuNTM5MDYgMTUuMTk4NCAzLjIgMTUuMTk4NEMzLjg2MDk0IDE1LjE5ODQgNC40IDE0LjY1OTQgNC40IDEzLjk5ODRWNy45OTg0NEM0LjQgNy4zMzc1IDMuODYwOTQgNi43OTg0NCAzLjIgNi43OTg0NFpNMTYuOCA2Ljc5ODQ0QzE2LjEzOTEgNi43OTg0NCAxNS42IDcuMzM3NSAxNS42IDcuOTk4NDRWMTMuOTk4NEMxNS42IDE0LjY1OTQgMTYuMTM5MSAxNS4xOTg0IDE2LjggMTUuMTk4NEMxNy40NjA5IDE1LjE5ODQgMTggMTQuNjU5NCAxOCAxMy45OTg0VjcuOTk4NDRDMTggNy4zMzc1IDE3LjQ2MDkgNi43OTg0NCAxNi44IDYuNzk4NDRaTTEuMiA4LjA0ODQ0QzAuNDc4MTI1IDguNjI4MTMgMCA5LjcxNTYyIDAgMTAuOTk4NEMwIDEyLjI4MTIgMC40NzgxMjUgMTMuMzY4OCAxLjIgMTMuOTQ4NFY4LjA0ODQ0Wk0xOC44IDguMDQ4NDRWMTMuOTQ4NEMxOS41MjE5IDEzLjM2ODggMjAgMTIuMjgxMiAyMCAxMC45OTg0QzIwIDkuNzE1NjIgMTkuNTIxOSA4LjYyODEzIDE4LjggOC4wNDg0NFpNMTYuMjM3NSAxNS45MTA5QzE1Ljg4NDQgMTYuOTk2OSAxNC45NjcyIDE3LjU5ODQgMTMuNiAxNy41OTg0SDEzLjE2MjVDMTMuMTg5MSAxNy43MjgxIDEzLjIgMTcuODYwOSAxMy4yIDE3Ljk5ODRDMTMuMiAxOC4xMzU5IDEzLjE4OTEgMTguMjY4NyAxMy4xNjI1IDE4LjM5ODRIMTMuNkMxNS4zOTY5IDE4LjM5ODQgMTYuNjQwNiAxNy40OTUzIDE3LjA1IDE1Ljk3MzRDMTYuOTY1NiAxNS45ODQ0IDE2Ljg4NTkgMTUuOTk4NCAxNi44IDE1Ljk5ODRDMTYuNjAzMSAxNS45OTg0IDE2LjQxNzIgMTUuOTY0MSAxNi4yMzc1IDE1LjkxMDlaTTkuMiAxNi43OTg0QzguNTM5MDYgMTYuNzk4NCA4IDE3LjMzNzUgOCAxNy45OTg0QzggMTguNjU5NCA4LjUzOTA2IDE5LjE5ODQgOS4yIDE5LjE5ODRIMTEuMkMxMS44NjA5IDE5LjE5ODQgMTIuNCAxOC42NTk0IDEyLjQgMTcuOTk4NEMxMi40IDE3LjMzNzUgMTEuODYwOSAxNi43OTg0IDExLjIgMTYuNzk4NEg5LjJaIiBmaWxsPSIjMjAyMTI0Ii8+Cjwvc3ZnPgo=" />\n </div>\n </div>\n <div id="selfvideocontainer" class="self-video-container">\n <div class="self-video">\n <div id="agentyou" class="video-user-alphabet">YOU</div>\n <video id="kore_local_video_tmp" autoplay="autoplay" playsinline style="display: block;"></video>\n </div>\n <div id="closeselfvideo" class="close-video">\n <img width: 10px; style=\'height: 10px;top:-5px;left:-9px;position: absolute;\' \n src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACuSURBVHgBnZLBDcMgDEWdsoBLF6AVvXeEbla6Ta7doJmgC/SQY08pGxAHJZGVGIiChLCNH/4yBqBlzPUGG9eUq6JRhQ9qDf7fNVnoYh901Iinl/K++yHqigIuB0cogKP9bNtvzSRYZ842jK+uoHhHObIUAU5Bijsk+81l41HfmTy5mlg5I+8AcjSIdkpqrMa6R24DhW7P0FJerttJqAgX/0mCh5ErQSt4mu09Q94DEcdaRcYvY1cAAAAASUVORK5CYII=" />\n </div>\n </div>\n </div>\n '),r("#agentyou").hide();var i=document.getElementById("kore_local_video");i.srcObject=i.srcObject,i.volume=0;var a=document.getElementById("kore_local_video_tmp");a&&(a.srcObject=i.srcObject,a.volume=0);var s=document.getElementById("kore_remote_video");s.volume=.5;var u=document.getElementById("kore_remote_video_tmp");s&&u&&(u.srcObject=s.srcObject,u.volume=.5),r("#selfvideocontainer").css({top:"65px",right:"15px",left:""}),t.css({position:"absolute",width:"90%",height:"74%",top:"24%","background-color":"black"});var c=r("#showselfvideocontainer").hide();r("#closeselfvideo").off("click").on("click",(function(e){r("#selfvideocontainer").hide(),c.show()})),c.off("click").on("click",(function(e){r("#selfvideocontainer").show(),c.hide()})),r("#maximizevideo").off("click").on("click",(function(e){var t=document.getElementById("audiovideocallcontainer");l.fullScreen?(l.fullScreen=!1,document.exitFullscreen(),r("#selfvideocontainer").css({top:"65px",right:"15px",left:""})):(r("#selfvideocontainer").css({top:"174px",right:"15px",left:""}),l.fullScreen=!0,t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen())}))}else t.append(o);l.disableMinimizeButton(!0),l.showFooterButtons(!0,l.callDetails.videoCall)}),1e3)},this.disableMinimizeButton=function(e){var t=document.getElementsByClassName("minimize-btn");t&&t.length>0&&(t[0].disabled=e)},this.callConnecting=function(e,t){var n=e?"Video":"Audio",i='<div class="video-audio-chat-container">\n <div class="video-chat-">\n <div class="video-name-title">'.concat(t,'</div>\n <div id="video_view" class="video-view- audio-view-">\n <div class="agent-profile-img">\n <img style=\'height: 30px; width:30px; top:0px;left:0px;position: absolute; border-radius: 50%;\'\n src="').concat(l.agentProfileIcon,'"> \n </div>\n <div class="title">Connecting ').concat(n,' Call...</div>\n <div class="audio-info">Disconnecting ').concat(n,' call doesn\'t end conversation</div>\n </div>\t\t\t\t\t\t\t\t\t\t\n </div>\n <div id="callbuttons"></div>\n </div>'),o=r("#callcontainer");o.empty(),o.append(i),l.showFooterButtons(!1,l.callDetails.videoCall)},this.showScreenShareMessage=function(e,t){var n='\n <div class="initial-video-audio-container">\n <div class="ad-img-block">\n <img src="'.concat(l.agentProfileIcon,'" />\n </div>\n <div class="content-desc">\n <div class="name">').concat(t,'</div>\n <div class="type-text">is requesting for a screenshare</div>\n </div>\n <div class="controls-v-a">\n <img id="rejectcall" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMCSURBVHgBxZjPaxNBFMffzG43oFCSo1gwMW3BUxPwR/HSBKwUT/XeYIX2asV/IO1/YC+CtFBLejdHaYXGW7ViVy8e2pL14k0SCoLdpDu+t/lhkmbNTDY/vpDsJHmb/fDezLz3hoGi8tOJsFPW50FjUyBYAgQEgeGLJKCIYwtHFjjOB7tczt4yc5bK/zNZw5M7s4sc4IlgCKEmUwixPn6490bGuCPQ8e0HCc75Fg7D4E8Wgq11AvMEOoolgsERI+0weA69lGAvz0rna3EzVwRZoO+xRNgwjLc4jEF/ZNm2nWw3v5gHzD74D1FXUE1AFKZRwzgaAExN5hlCNYaPN/5Kc2aAMKTY6Egg3fhF3UO0rBljWzAEOY6TnPj8PkfjuocQJg1DUnVbqYzpjbwDgw1Vq8JVhgoQemdF9k5jMiprqmRLWcC90jIHyf0mMHkTxjKvILSc6mgbWl5wbWWhKCX9vP/ohvZibHwRXTQnc9PFr0L1YSlyK/z58s0TJrSUgsLGDvzey4GsbCF+6KDxGczS0ips7vyDos8bGU+YwmYGVIRhm9IRJgyK8oLyA+NKiEQFSLoI8YaiYsgXTEVBvV5cdaHLnvIF4wJx8CvmMe5SerXs7MpLjXPGDZnHRFdQkUJGmVYZyGsC+4ISYGnPrkfjTLEQ84Kp7Uud9ilPHgYftZVrkbDsxvg/mF5A4W79mnNdz8reQKlDZmnT6qOQhZYWlPKZzljWXRcn92b3mZBrbwITUTg/PpUxVbLF+WNGD3fjlWXvwDZISvoBirYCxDpd6zvH6d2HeRheTWRFP+1GaFDfGLGMfApDEjWQtXEdiGpaanlhwGpts5tSh1YqrWIMTRicLO1qabXxiyagCPZHjPPHZAgDgMHiPhnJNbfUl5Jr5OCda9hnKNOFwWe1/tA227tQth3vx5yi/+RX7LYwpI4FQ7WB7EVHa9FKrjWEXlI6sKq2S0qJGD2Sw8t2zw6sWpWfnsMjvfI8tpszQF6rlMCNR3r4QogL8ZXr5WzkQO1I7y91mFsdhEgKrAAAAABJRU5ErkJggg==" />\n <img id="acceptcall" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMfSURBVHgBxZg/TBNRHMe/v1cQCTGpCerg4AHGlEXEwZWDiDLS4GBjohJjIokJRF2IA7Az2NGpEmM6GRwN/isxDsACLt6kNyhBoqYJktIW7vl+154tWuiV67Xfpb+7+11/n7zfu997v0eoUKGYrlFTw6Ak6gJIJ2kFlR3kZyRl0hJkKssUljUvafuFEUmYlfw/uXUMPeu/CYEbytRRgSRhmXYQNa69euLGvyxQ6OlFHQ0UU6YGbzJhYaoc2J5AWkwPNjcfmpBSjqGKIqJHqVRmyhxOJEs+L3UzFNc1SY2zJHEO/sgEsr2l5heVggEa38F7ig4EJYovOE01grHDcRZyMfcA4jlTIxhbPCXyMQv3HCP/WcdQF0mVutcJtgojJDCBuoliBQzkR6eGqSohLc+QA1LVdBT1Vm4VgODPnMi3eoOTLSewODSLULC9nKve+bzvlCDZMAifxDAzfdN48/UDjOTn8i+kRVhYAj3wQQ7M0voKxhemXb3DOwgBizRUWQeByUsXAlJDFeUBRi28CApnc7WfjjS24MLxs+XcPMGwpFRAbhw7j562A4Xb+uEXjKPAsaH2MTVWh/dz+rb53V5jxs+PYCPzGys/DV9gVMqSgdYrHXeUXTZti+sfbah7Xbfs6yV1XQzDoLfnH8KL1ObNCLQOdXTDZWFkKA58Pw+1qkbOgbn+9gEyVhZeJEELnDJNoQ24fYnTtbq5Zqcv3H4ZP1K/bJiN7Ca8Skj5WKXszJpiq2jfzFWXoZoCh3D3/WRVYGxRw4i9HwrF+3mXqKOOUvNn+dPVuW7ns59BnaW6myj/FnaM8UtfUOWq7V5kGpG5NraKCqM1jLpJTjnWXyDe06o+PYoaSy0XUSNS6GZ3LR2p9M6kclhGzURmOp2dLL6zC4jbW6JAmB1RAxgVvvfflvq/xdWIvLQd/YTiExGOkYu1WyVXe3bc2sp0+zGneM6kU9mSMKzyxzFxbk9owntJ4BG3hp2GcE8vuBSDqeI1qipqhR2KTKgwM8VfUlWACmADGsntQZXsHsuCJkDq0AD5Iz0kla0mqaVKCK0c5EjvD7WHTOQEQMMGAAAAAElFTkSuQmCC" />\n </div>\n </div>'),i=r("#toast");i.empty(),i.append(n);var o=r("#rejectcall"),a=r("#acceptcall");o.off("click").on("click",(function(e){l.activeCall&&l.activeCall.isScreenSharing()&&(l.sendControlMessage("screenshare_end"),l.callDetails.videoCall||l.sendVideo(!1),l.activeCall.stopScreenSharing()),i.empty()})),a.off("click").on("click",(function(e){l.activeCall&&l.screenShare(l.callDetails),i.empty()}))},this.showIncomingCallMessage=function(e,t){var n=e?"video":"audio",i=document.getElementById("toast");i&&(i.remove(),i=null),i||((i=document.createElement("div")).id="toast",document.body.appendChild(i));var o='\n <div class="initial-video-audio-container">\n <div class="ad-img-block">\n <img src="'.concat(l.agentProfileIcon,'" />\n </div>\n <div class="content-desc">\n <div class="name">').concat(t,'</div>\n <div class="type-text">is trying to ').concat(n,' call you</div>\n </div>\n <div class="controls-v-a">\n <img id="rejectcall" src="').concat(s,'"/>\n <img id="acceptcall" src= "').concat(u,'"/>\n </div>\n </div>');setTimeout((function(){var e=r("#toast");e.empty(),e.append(o);var t=r("#rejectcall"),n=r("#acceptcall");t.off("click").on("click",(function(t){l.activeCall&&l.activeCall.terminate(),l.callAccepted=!1,e.empty()})),n.off("click").on("click",(function(t){l.addAudioVideoContainer(),l.callConnecting(l.callDetails.videoCall,l.callDetails.firstName),l.callAgent(),e.empty();var n=setTimeout((function(){null!==l.activeCall&&l.activeCall.isEstablished()||l.callTerminated(),clearTimeout(n)}),3e4)}))}),100)},this.showCobrowseRequest=function(t){var n=this;(o=document.getElementById("toast"))&&(o.remove(),o=null),o||((o=document.createElement("div")).id="toast",document.body.appendChild(o));var i=document.getElementById("cobrowse-toolbar");i&&i.remove();var o,a=null==t?void 0:t.firstName,c='\n <div class="initial-video-audio-container">\n <div class="ad-img-block">\n <img src="'.concat(l.agentProfileIcon,'" />\n </div>\n <div class="content-desc">\n <div class="name">').concat(a,'</div>\n <div class="type-text">is requesting a CoBrowse session with you</div>\n </div>\n <div class="controls-v-a">\n <img id="rejectcall" src="').concat(s,'"/>\n <img id="acceptcall" src= "').concat(u,'"/>\n </div>\n </div>');(o=r("#toast")).empty(),o.append(c);var d=r("#rejectcall"),h=r("#acceptcall");d.off("click").on("click",(function(e){o.empty()})),h.off("click").on("click",(function(r){o.empty(),t.userId=e,n.cobrowseInitialize(t),localStorage.setItem("cobrowseRequest",JSON.stringify(t))}))},this.sendCoBrowseEvent=function(e,t){l.socket.emit("cobrowseevent",{room:e,event:t},(function(e){console.log("sent and received ack",e)}))},r=window&&window.KoreSDK&&window.KoreSDK.dependencies&&window.KoreSDK.dependencies.jQuery?window.KoreSDK.dependencies.jQuery:N,console.log("window.KoreSDK",window.KoreSDK,e);var c=d("/KoreBot.js").instance().sendMessage;a.sendMessage=function(e,t){var n=localStorage.getItem("pagesVisited"),r=[];if(n&&"[]"!=n){var i=(r=JSON.parse(n))[0],o=A()(i.timestamp),a=A()(),s=A().duration(a.diff(o)).asMilliseconds();i.timespent=s,i.domain=window.location.hostname}localStorage.setItem("pagesVisited",JSON.stringify(r)),e.agentDesktopMeta={pagesVisited:r},c.call(this,e,t)};var h=!1;a.on("message",(function(e){!function(){if(!h){var e=document.getElementsByClassName("close-btn");e&&e.length>0?(r(".close-btn").off("click").on("click",(function(e){r("#smartassist-menu").show()})),h=!0):console.log("close button not found")}}();var t=JSON.parse(e.data);if("events"===t.type&&t.message&&"call_agent_webrtc"===t.message.type)l.callDetails=t.message,l.agentProfileIcon=l.userIcon,l.callDetails.profileIcon&&"undefined"!==l.callDetails.profileIcon&&(l.agentProfileIcon=l.callDetails.profileIcon),console.log("payload=",t.message),l.callAccepted=!1,l.showPhonePanel=!0,l.callDetails.restoreCall?(l.activeCall&&l.activeCall.terminate(),l.callAgent(),l.callAccepted=!0,l.showVideo=!0):n.showIncomingCallMessage(l.callDetails.videoCall,l.callDetails.firstName);else if("events"===t.type&&t.message&&"terminate_agent_webrtc"===t.message.type){l.removeAudoVideoContainer(),l.showPhonePanel=!1,l.showVideo=!1,l.activeCall&&(l.activeCall.terminate(),l.phone.deinit()),r("#toast").empty()}else if("events"===t.type&&t.message&&"webrtc_screenshare"===t.message.type)n.showScreenShareMessage(l.callDetails.videoCall,l.callDetails.firstName);else if("events"===t.type&&t.message&&"webrtc_screenshare_cancel"===t.message.type)l.callDetails.videoCall||l.sendVideo(!1),l.screenSharingStream&&l.phone.closeScreenSharing(),l.activeCall&&l.activeCall.isScreenSharing()&&l.activeCall.stopScreenSharing();else if("events"===t.type&&t.message&&"cobrowse"===t.message.type)console.log("cobrowse request ",t.message),l.maskClassList=t.message.blockClasses,l.maskPatternList=t.message.patternList,l.maskPatternList&&l.scanElement(document.body,l.maskPatternList),l.cobrowseMaskFields(t.message),l.agentProfileIcon=l.userIcon,t.message.profileIcon&&"undefined"!==t.message.profileIcon&&(l.agentProfileIcon=t.message.profileIcon),n.showCobrowseRequest(t.message);else if("events"===t.type&&t.message&&"close_cobrowse"===t.message.type){r("#toast").empty(),n.stopCoBrowse(!1)}else if("events"===t.type&&t.message&&"clear_pagevisit_history"===t.message.type){localStorage.removeItem("pagesVisited");var i=[],o=n.getPageTitle();i.push({page:o,timestamp:new(A())}),localStorage.setItem("pagesVisited",JSON.stringify(i))}})),this.getPageTitle=function(){var e=document.title,t=document.getElementsByTagName("meta");if(t&&t.length>0)for(var n=0;n<t.length;n++)"title"!==t[n].name&&"og:title"!==t[n].name||(e=t[n].content);return console.log("page title ",e),e},this.addAudioVideoContainer=function(){var e=document.getElementsByClassName("kore-chat-body"),t=document.getElementById("agentcontainer");if(t)t.style.display="block";else if(e&&e.length>0){var n=document.createElement("div");n.id="agentcontainer",n.style.height="25%",e[0].parentNode.insertBefore(n,e[0]),e[0].style.position="relative"}r("#callcontainer").length||r("#agentcontainer").append('<div id="callcontainer" class="callcontainer"></div>'),e[0].style.top="0px",e[0].style.height="54%";var i=document.getElementsByClassName("kore-chat-window");i[0].style.top="0px",i[0].style.maxHeight="99%",i[0].style.height="97%"},this.removeAudoVideoContainer=function(){var e=document.getElementsByClassName("kore-chat-body"),t=document.getElementById("agentcontainer");t&&(t.style.display="none",e[0].style.height="78%")},this.sendVideo=function(e){var t=document.getElementById("kore_local_video_tmp");t||(t=document.getElementById("kore_local_video"));var n=t.srcObject;n&&n.getVideoTracks()&&n.getVideoTracks().forEach((function(t){return t.enabled=e}))},this.screenShare=function(e){var t=this,n=Promise.resolve();return!this.callDetails.videoCall&&this.activeCall.hasEnabledSendVideo()&&this.sendVideo(!1),n.then((function(){if(null===t.screenSharingStream)return t.phone.openScreenSharing().then((function(e){t.screenSharingStream=e,t.screenSharingStream.getVideoTracks()[0].onended=function(){i.sendVideo(i.callDetails.videoCall),i.sendControlMessage("screenshare_end")}}))})).then((function(){return t.sendControlMessage("screenshare_start"),t.sendVideo(!0),t.activeCall.startScreenSharing(t.screenSharingStream)})).catch((function(e){console.log("guiScreenSharing: error: "+e),t.sendControlMessage("screenshare_end")})).finally((function(){}))},this.initSipStack=function(e,t){console.log("this.phoneConfig",this.phoneConfig),this.phone.setServerConfig(t.addresses,t.domain,t.iceServers),this.phone.setReconnectIntervals(this.phoneConfig.reconnectIntervalMin,this.phoneConfig.reconnectIntervalMax),this.phone.setRegisterExpires(this.phoneConfig.registerExpires),this.phone.setUseSessionTimer(this.phoneConfig.useSessionTimer),this.phone.setDtmfOptions(this.phoneConfig.dtmfUseWebRTC,this.phoneConfig.dtmfDuration,this.phoneConfig.dtmfInterToneGap),this.phone.setBrowsersConstraints(this.phoneConfig.constraints),this.phone.setEnableAddVideo(this.phoneConfig.enableAddVideo),this.phone.setAcLogger(console.log),this.phone.setModes(this.phoneConfig.modes),this.phone.setAccount(e.user,e.displayName,e.user,e.user);var n=this;this.phone.setListeners({loginStateChanged:function(e,t){switch(t){case"connected":console.log("phone>>> loginStateChanged: connected"),n._makeCall();break;case"disconnected":console.log("phone>>> loginStateChanged: disconnected");break;case"login failed":console.log("phone>>> loginStateChanged: login failed");break;case"login":console.log("phone>>> loginStateChanged: login");break;case"logout":console.log("phone>>> loginStateChanged: logout")}},callScreenSharingEnded:function(e,t){console.log("phone>>> callScreenSharingEnded",e),l.screenSharingStream=null},outgoingCallProgress:function(e,t){console.log("phone>>> outgoing call progress")},callTerminated:function(e,t,i,o){r("#rejectPhone").show(),console.log("phone>>> call terminated callback, cause=%o",i),e===n.activeCall?(n.activeCall=null,console.warn("Call terminated: "+i),n.phone.deinit(),console.log("call_terminated_panel"),n.callAccepted=!1,n.callMuted=!1,n.showPhonePanel=!1,n.showVideo=!1,n.screenSharingStream=null,l.callTerminated()):console.log("terminated no active call")},callConfirmed:function(e,t,r){l.callConnected(l.callDetails.videoCall,l.callDetails.firstName),console.log("phone>>> callConfirmed ",new Date,e.hasReceiveVideo());e.getRTCRemoteStream();n.callDetails.videoCall||l.sendVideo(!0),console.log("call established")},callShowStreams:function(e,t,n){console.log("phone>>> callShowStreams");var r=document.getElementById("kore_remote_video");console.log("remoteVideo",r),r.srcObject=n,r.volume=.5,console.log("remoteStream",n);var i=document.getElementById("kore_local_video");i.srcObject=t,i.volume=0,i.mute=!1;var o=setInterval((function(){if(document.getElementById("kore_remote_video_tmp")){var e=document.getElementById("kore_remote_video");e.srcObject=n;var t=document.getElementById("kore_remote_video_tmp");t.srcObject=e.srcObject,t.volume=.5,clearInterval(o)}}),100)},incomingCall:function(e,t,n,r){console.log("phone>>> incomingCall",e,t,n,r),e.data.incoming_invite_hasSDP=r,e.reject()},callHoldStateChanged:function(e,t,n){console.log("hold")}}),console.log("Connecting..."),n.phone.init(!0)},this.sendControlMessage=function(e){var t=l.callDetails.sipURI,n=t.substring(t.indexOf(":")+1,t.indexOf("@"));l.phone.sendMessage(n,e)},this.callAgent=function(){console.log("this.callDetails",this.callDetails);var t=this.callDetails.sipURI,n=t.substring(t.indexOf(":")+1,t.indexOf("@"));console.log("sipURI",t,"sipUser",n,this.phone.VIDEO);var r={};r.addresses=this.callDetails.addresses,r.domain=this.callDetails.domain,r.iceServers=[this.callDetails.domain],i.initSipStack({user:e,displayName:e,password:""},r)},this._makeCall=function(){var e=this,t=this.callDetails.sipURI,n=t.substring(t.indexOf(":")+1,t.indexOf("@"));navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then((function(t){t.getTracks().forEach((function(e){e.stop()})),e.activeCall=e.phone.call(e.phone.VIDEO,n)}))},this.toggleButtons=function(){this.callAccepted?(this.callDetails&&!this.callDetails.videoCall?r("#acceptPhone").html('<i id="mic-icon" class="fas fa-phone-slash"></i>'):r("#acceptPhone").html('<i id="mic-icon" class="fas fa-video-slash"></i>'),r("#rejectPhone").hide(),r("#mutePhone").show()):(this.callDetails&&!this.callDetails.videoCall?r("#acceptPhone").html('<i id="mic-icon" class="fas fa-phone-volume"></i>'):r("#acceptPhone").html('<i id="mic-icon" class="fas fa-video"></i>'),r("#mutePhone").show()),this.callMuted?r("#mutePhone").html('<i id="mic-icon" class="fas fa-microphone-slash">'):r("#mutePhone").html('<i id="mic-icon" class="fas fa-microphone">')},this.updateGui=function(){this.toggleButtons(),this.showPhonePanel?r("#phonepanel").show():r("#phonepanel").hide(),this.showVideo?r("#video_view").show():r("#video_view").hide()},r("#acceptPhone").off("click").on("click",(function(e){l.callAccepted=!l.callAccepted,l.showVideo=!l.showVideo,l.callAccepted?l.callAgent():(l.activeCall&&l.activeCall.terminate(),l.showPhonePanel=!1),l.updateGui()})),r("#rejectPhone").off("click").on("click",(function(e){l.activeCall&&l.activeCall.terminate(),l.callAccepted=!1,l.showPhonePanel=!1,l.updateGui()})),r("#mutePhone").off("click").on("click",(function(e){l.callMuted=!l.callMuted;var t=l.activeCall.isAudioMuted();l.activeCall.muteAudio(!t),l.updateGui()})),r("#toast").length||r("#chatContainer").append('<div id="toast"></div>')})),O(this,"noControlImage","data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMDAwMDAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgNTAgNTAiIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiPjxwYXRoIGQ9Ik0gOSAzIEMgNi4yNTM5MDYgMyA0IDUuMjUzOTA2IDQgOCBMIDQgMzQgQyA0IDM2Ljc0NjA5NCA2LjI1MzkwNiAzOSA5IDM5IEwgMTIuOTE3OTY5IDM5IEMgMTIuODk4NDM4IDQwLjEyMTA5NCAxMi45MDYyNSA0MS4yNjE3MTkgMTIuNjU2MjUgNDIuMTkxNDA2IEMgMTIuMzMyMDMxIDQzLjQxNDA2MyAxMS43NjE3MTkgNDQuMzc4OTA2IDEwLjQ4NDM3NSA0NS4xNDA2MjUgQyAxMC4xMDE1NjMgNDUuMzc1IDkuOTE3OTY5IDQ1LjgzMjAzMSAxMC4wMzkwNjMgNDYuMjY1NjI1IEMgMTAuMTU2MjUgNDYuNjk5MjE5IDEwLjU1MDc4MSA0NyAxMSA0NyBDIDE1LjIzODI4MSA0NyAxOS40MTQwNjMgNDQuNzIyNjU2IDIxLjYxMzI4MSAzOSBMIDQxIDM5IEMgNDMuNzQ2MDk0IDM5IDQ2IDM2Ljc0NjA5NCA0NiAzNCBMIDQ2IDggQyA0NiA1LjI1MzkwNiA0My43NDYwOTQgMyA0MSAzIFogTSA5IDUgTCA0MSA1IEMgNDIuNjU2MjUgNSA0NCA2LjM0Mzc1IDQ0IDggTCA0NCAzNCBDIDQ0IDM1LjY1NjI1IDQyLjY1NjI1IDM3IDQxIDM3IEwgMjEgMzcgQyAyMC41NzAzMTMgMzcgMjAuMTg3NSAzNy4yNzM0MzggMjAuMDUwNzgxIDM3LjY4MzU5NCBDIDE4LjYxNzE4OCA0MS45ODA0NjkgMTYuMzQzNzUgNDMuOTUzMTI1IDEzLjY4NzUgNDQuNjY0MDYzIEMgMTQuMDgyMDMxIDQ0LjAzOTA2MyAxNC40MTAxNTYgNDMuMzg2NzE5IDE0LjU5Mzc1IDQyLjcwNzAzMSBDIDE1LjAxNTYyNSA0MS4xMjg5MDYgMTUgMzkuNSAxNSAzOCBDIDE1IDM3LjQ0OTIxOSAxNC41NTA3ODEgMzcgMTQgMzcgTCA5IDM3IEMgNy4zNDM3NSAzNyA2IDM1LjY1NjI1IDYgMzQgTCA2IDggQyA2IDYuMzQzNzUgNy4zNDM3NSA1IDkgNSBaIE0gMTQuNDI5Njg4IDkgTCAxMyAxMC40Mjk2ODggTCAxNS4xNDA2MjUgMTQgTCAxNi41ODU5MzggMTQgTCAyMS4xMDkzNzUgMTguNTI3MzQ0IEwgMjIuNTI3MzQ0IDE3LjEwOTM3NSBMIDE4IDEyLjU4NTkzOCBMIDE4IDExLjE0MDYyNSBaIE0gMzEgOSBDIDI3LjY4NzUgOSAyNSAxMS42ODc1IDI1IDE1IEMgMjUgMTUuNzM0Mzc1IDI1LjE0MDYyNSAxNi40Mzc1IDI1LjM3ODkwNiAxNy4wODU5MzggTCAxMy43MzQzNzUgMjguNzM0Mzc1IEMgMTMuNjE3MTg4IDI4Ljg0NzY1NiAxMy41MTE3MTkgMjguOTc2NTYzIDEzLjQyMTg3NSAyOS4xMTMyODEgQyAxMy4zODI4MTMgMjkuMTc1NzgxIDEzLjM1MTU2MyAyOS4yNDIxODggMTMuMzE2NDA2IDI5LjMwODU5NCBDIDEzLjI3MzQzOCAyOS4zODI4MTMgMTMuMjI2NTYzIDI5LjQ2MDkzOCAxMy4xOTE0MDYgMjkuNTQyOTY5IEMgMTMuMTU2MjUgMjkuNjI1IDEzLjEzNjcxOSAyOS43MTA5MzggMTMuMTA5Mzc1IDI5Ljc5Njg3NSBDIDEzLjA4OTg0NCAyOS44NjcxODggMTMuMDYyNSAyOS45Mzc1IDEzLjA0Njg3NSAzMC4wMTE3MTkgQyAxMi45ODQzNzUgMzAuMzMyMDMxIDEyLjk4NDM3NSAzMC42NjQwNjMgMTMuMDQ2ODc1IDMwLjk4ODI4MSBDIDEzLjA2MjUgMzEuMDYyNSAxMy4wODk4NDQgMzEuMTI4OTA2IDEzLjEwOTM3NSAzMS4yMDMxMjUgQyAxMy4xMzY3MTkgMzEuMjg1MTU2IDEzLjE1NjI1IDMxLjM3NSAxMy4xOTE0MDYgMzEuNDUzMTI1IEMgMTMuMjI2NTYzIDMxLjUzOTA2MyAxMy4yNjk1MzEgMzEuNjEzMjgxIDEzLjMxMjUgMzEuNjg3NSBDIDEzLjM0NzY1NiAzMS43NTM5MDYgMTMuMzc4OTA2IDMxLjgyMDMxMyAxMy40MjE4NzUgMzEuODg2NzE5IEMgMTMuNjA1NDY5IDMyLjE2MDE1NiAxMy44Mzk4NDQgMzIuMzk0NTMxIDE0LjExMzI4MSAzMi41NzgxMjUgQyAxNC4xNzU3ODEgMzIuNjE3MTg4IDE0LjI0MjE4OCAzMi42NDg0MzggMTQuMzA4NTk0IDMyLjY4MzU5NCBDIDE0LjM4NjcxOSAzMi43MjY1NjMgMTQuNDYwOTM4IDMyLjc3MzQzOCAxNC41NDY4NzUgMzIuODA4NTk0IEMgMTQuNjI4OTA2IDMyLjg0Mzc1IDE0LjcxNDg0NCAzMi44NjMyODEgMTQuNzk2ODc1IDMyLjg4NjcxOSBDIDE0Ljg3MTA5NCAzMi45MDYyNSAxNC45Mzc1IDMyLjkzMzU5NCAxNS4wMTE3MTkgMzIuOTQ5MjE5IEMgMTUuMzM1OTM4IDMzLjAxMTcxOSAxNS42Njc5NjkgMzMuMDExNzE5IDE1Ljk4ODI4MSAzMi45NDkyMTkgQyAxNi4wNjI1IDMyLjkzMzU5NCAxNi4xMzI4MTMgMzIuOTA2MjUgMTYuMjAzMTI1IDMyLjg4NjcxOSBDIDE2LjI4OTA2MyAzMi44NjMyODEgMTYuMzc1IDMyLjg0Mzc1IDE2LjQ1NzAzMSAzMi44MDg1OTQgQyAxNi41MzkwNjMgMzIuNzczNDM4IDE2LjYxNzE4OCAzMi43MjY1NjMgMTYuNjkxNDA2IDMyLjY4MzU5NCBDIDE2Ljc1NzgxMyAzMi42NDg0MzggMTYuODI0MjE5IDMyLjYxNzE4OCAxNi44ODY3MTkgMzIuNTc4MTI1IEMgMTcuMDIzNDM4IDMyLjQ4NDM3NSAxNy4xNTIzNDQgMzIuMzgyODEzIDE3LjI2NTYyNSAzMi4yNjU2MjUgTCAyOC45MTQwNjMgMjAuNjIxMDk0IEMgMjkuNTYyNSAyMC44NTkzNzUgMzAuMjY1NjI1IDIxIDMxIDIxIEMgMzQuMzEyNSAyMSAzNyAxOC4zMTI1IDM3IDE1IEMgMzcgMTQuMDc0MjE5IDM2Ljc4NTE1NiAxMy4xOTkyMTkgMzYuNDEwMTU2IDEyLjQxNzk2OSBMIDMxLjkxNDA2MyAxNi45MTQwNjMgTCAyOS4wODU5MzggMTQuMDg1OTM4IEwgMzMuNTgyMDMxIDkuNTg5ODQ0IEMgMzIuODAwNzgxIDkuMjE0ODQ0IDMxLjkyNTc4MSA5IDMxIDkgWiBNIDI5Ljk0OTIxOSAyMi40MTQwNjMgTCAyNi40MTQwNjMgMjUuOTUzMTI1IEwgMzIuNzM0Mzc1IDMyLjI2OTUzMSBDIDMyLjg0NzY1NiAzMi4zODY3MTkgMzIuOTc2NTYzIDMyLjQ4ODI4MSAzMy4xMTMyODEgMzIuNTc4MTI1IEMgMzMuMTc1NzgxIDMyLjYyMTA5NCAzMy4yNDIxODggMzIuNjUyMzQ0IDMzLjMwODU5NCAzMi42ODc1IEMgMzMuMzgyODEzIDMyLjczMDQ2OSAzMy40NjA5MzggMzIuNzc3MzQ0IDMzLjU0Mjk2OSAzMi44MTI1IEMgMzMuNjI1IDMyLjg0Mzc1IDMzLjcxMDkzOCAzMi44NjMyODEgMzMuNzk2ODc1IDMyLjg5MDYyNSBDIDMzLjg2NzE4OCAzMi45MTAxNTYgMzMuOTM3NSAzMi45Mzc1IDM0LjAxMTcxOSAzMi45NTMxMjUgQyAzNC4zMzIwMzEgMzMuMDE1NjI1IDM0LjY2NDA2MyAzMy4wMTU2MjUgMzQuOTg4MjgxIDMyLjk1MzEyNSBDIDM1LjA2MjUgMzIuOTM3NSAzNS4xMjg5MDYgMzIuOTEwMTU2IDM1LjIwMzEyNSAzMi44OTA2MjUgQyAzNS4yODUxNTYgMzIuODYzMjgxIDM1LjM3MTA5NCAzMi44NDM3NSAzNS40NTMxMjUgMzIuODEyNSBDIDM1LjUzOTA2MyAzMi43NzczNDQgMzUuNjEzMjgxIDMyLjczMDQ2OSAzNS42OTE0MDYgMzIuNjg3NSBDIDM1Ljc1NzgxMyAzMi42NTIzNDQgMzUuODI0MjE5IDMyLjYyMTA5NCAzNS44ODY3MTkgMzIuNTc4MTI1IEMgMzYuMTYwMTU2IDMyLjM5ODQzOCAzNi4zOTQ1MzEgMzIuMTYwMTU2IDM2LjU3ODEyNSAzMS44ODY3MTkgQyAzNi42MjEwOTQgMzEuODI0MjE5IDM2LjY0ODQzOCAzMS43NTc4MTMgMzYuNjg3NSAzMS42OTE0MDYgQyAzNi43MjY1NjMgMzEuNjEzMjgxIDM2Ljc3MzQzOCAzMS41MzkwNjMgMzYuODA4NTk0IDMxLjQ1MzEyNSBDIDM2Ljg0Mzc1IDMxLjM3MTA5NCAzNi44NjMyODEgMzEuMjg1MTU2IDM2Ljg5MDYyNSAzMS4yMDMxMjUgQyAzNi45MTAxNTYgMzEuMTI4OTA2IDM2LjkzNzUgMzEuMDYyNSAzNi45NTMxMjUgMzAuOTg4MjgxIEMgMzcuMDE1NjI1IDMwLjY2Nzk2OSAzNy4wMTU2MjUgMzAuMzM1OTM4IDM2Ljk1MzEyNSAzMC4wMTE3MTkgQyAzNi45Mzc1IDI5LjkzNzUgMzYuOTEwMTU2IDI5Ljg3MTA5NCAzNi44OTA2MjUgMjkuNzk2ODc1IEMgMzYuODYzMjgxIDI5LjcxNDg0NCAzNi44NDM3NSAyOS42Mjg5MDYgMzYuODA4NTk0IDI5LjU0Njg3NSBDIDM2Ljc3MzQzOCAyOS40NjA5MzggMzYuNzI2NTYzIDI5LjM4NjcxOSAzNi42ODM1OTQgMjkuMzA4NTk0IEMgMzYuNjQ4NDM4IDI5LjI0MjE4OCAzNi42MTcxODggMjkuMTc1NzgxIDM2LjU3ODEyNSAyOS4xMTMyODEgQyAzNi40ODQzNzUgMjguOTc2NTYzIDM2LjM4MjgxMyAyOC44NDc2NTYgMzYuMjY1NjI1IDI4LjczNDM3NSBaIi8+PC9zdmc+"),O(this,"releaseControlImage","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIHZpZXdCb3g9IjAgMCA1MCA1MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkgM0M2LjI1MzkxIDMgNCA1LjI1MzkxIDQgOFYzNEM0IDM2Ljc0NjEgNi4yNTM5MSAzOSA5IDM5SDEyLjkxOEMxMi44OTg0IDQwLjEyMTEgMTIuOTA2MiA0MS4yNjE3IDEyLjY1NjIgNDIuMTkxNEMxMi4zMzIgNDMuNDE0MSAxMS43NjE3IDQ0LjM3ODkgMTAuNDg0NCA0NS4xNDA2QzEwLjEwMTYgNDUuMzc1IDkuOTE3OTcgNDUuODMyIDEwLjAzOTEgNDYuMjY1NkMxMC4xNTYzIDQ2LjY5OTIgMTAuNTUwOCA0NyAxMSA0N0MxNS4yMzgzIDQ3IDE5LjQxNDEgNDQuNzIyNyAyMS42MTMzIDM5SDQxQzQzLjc0NjEgMzkgNDYgMzYuNzQ2MSA0NiAzNFY4QzQ2IDUuMjUzOTEgNDMuNzQ2MSAzIDQxIDNIOVpNOSA1SDQxQzQyLjY1NjIgNSA0NCA2LjM0Mzc1IDQ0IDhWMzRDNDQgMzUuNjU2MiA0Mi42NTYyIDM3IDQxIDM3SDIxQzIwLjU3MDMgMzcgMjAuMTg3NSAzNy4yNzM0IDIwLjA1MDggMzcuNjgzNkMxOC42MTcyIDQxLjk4MDUgMTYuMzQzOCA0My45NTMxIDEzLjY4NzUgNDQuNjY0MUMxNC4wODIgNDQuMDM5MSAxNC40MTAyIDQzLjM4NjcgMTQuNTkzOCA0Mi43MDdDMTUuMDE1NiA0MS4xMjg5IDE1IDM5LjUgMTUgMzhDMTUgMzcuNDQ5MiAxNC41NTA4IDM3IDE0IDM3SDlDNy4zNDM3NSAzNyA2IDM1LjY1NjIgNiAzNFY4QzYgNi4zNDM3NSA3LjM0Mzc1IDUgOSA1Wk0xNC40Mjk3IDlMMTMgMTAuNDI5N0wxNS4xNDA2IDE0SDE2LjU4NTlMMjEuMTA5NCAxOC41MjczTDIyLjUyNzMgMTcuMTA5NEwxOCAxMi41ODU5VjExLjE0MDZMMTQuNDI5NyA5Wk0zMSA5QzI3LjY4NzUgOSAyNSAxMS42ODc1IDI1IDE1QzI1IDE1LjczNDQgMjUuMTQwNiAxNi40Mzc1IDI1LjM3ODkgMTcuMDg1OUwxMy43MzQ0IDI4LjczNDRDMTMuNjE3MiAyOC44NDc3IDEzLjUxMTcgMjguOTc2NiAxMy40MjE5IDI5LjExMzNDMTMuMzgyOCAyOS4xNzU4IDEzLjM1MTYgMjkuMjQyMiAxMy4zMTY0IDI5LjMwODZDMTMuMjczNCAyOS4zODI4IDEzLjIyNjYgMjkuNDYwOSAxMy4xOTE0IDI5LjU0M0MxMy4xNTYzIDI5LjYyNSAxMy4xMzY3IDI5LjcxMDkgMTMuMTA5NCAyOS43OTY5QzEzLjA4OTggMjkuODY3MiAxMy4wNjI1IDI5LjkzNzUgMTMuMDQ2OSAzMC4wMTE3QzEyLjk4NDQgMzAuMzMyIDEyLjk4NDQgMzAuNjY0MSAxMy4wNDY5IDMwLjk4ODNDMTMuMDYyNSAzMS4wNjI1IDEzLjA4OTggMzEuMTI4OSAxMy4xMDk0IDMxLjIwMzFDMTMuMTM2NyAzMS4yODUyIDEzLjE1NjMgMzEuMzc1IDEzLjE5MTQgMzEuNDUzMUMxMy4yMjY2IDMxLjUzOTEgMTMuMjY5NSAzMS42MTMzIDEzLjMxMjUgMzEuNjg3NUMxMy4zNDc3IDMxLjc1MzkgMTMuMzc4OSAzMS44MjAzIDEzLjQyMTkgMzEuODg2N0MxMy42MDU1IDMyLjE2MDIgMTMuODM5OCAzMi4zOTQ1IDE0LjExMzMgMzIuNTc4MUMxNC4xNzU4IDMyLjYxNzIgMTQuMjQyMiAzMi42NDg0IDE0LjMwODYgMzIuNjgzNkMxNC4zODY3IDMyLjcyNjYgMTQuNDYwOSAzMi43NzM0IDE0LjU0NjkgMzIuODA4NkMxNC42Mjg5IDMyLjg0MzcgMTQuNzE0OCAzMi44NjMzIDE0Ljc5NjkgMzIuODg2N0MxNC44NzExIDMyLjkwNjIgMTQuOTM3NSAzMi45MzM2IDE1LjAxMTcgMzIuOTQ5MkMxNS4zMzU5IDMzLjAxMTcgMTUuNjY4IDMzLjAxMTcgMTUuOTg4MyAzMi45NDkyQzE2LjA2MjUgMzIuOTMzNiAxNi4xMzI4IDMyLjkwNjIgMTYuMjAzMSAzMi44ODY3QzE2LjI4OTEgMzIuODYzMyAxNi4zNzUgMzIuODQzNyAxNi40NTcgMzIuODA4NkMxNi41MzkxIDMyLjc3MzQgMTYuNjE3MiAzMi43MjY2IDE2LjY5MTQgMzIuNjgzNkMxNi43NTc4IDMyLjY0ODQgMTYuODI0MiAzMi42MTcyIDE2Ljg4NjcgMzIuNTc4MUMxNy4wMjM0IDMyLjQ4NDQgMTcuMTUyMyAzMi4zODI4IDE3LjI2NTYgMzIuMjY1NkwyOC45MTQxIDIwLjYyMTFDMjkuNTYyNSAyMC44NTk0IDMwLjI2NTYgMjEgMzEgMjFDMzQuMzEyNSAyMSAzNyAxOC4zMTI1IDM3IDE1QzM3IDE0LjA3NDIgMzYuNzg1MiAxMy4xOTkyIDM2LjQxMDIgMTIuNDE4TDMxLjkxNDEgMTYuOTE0MUwyOS4wODU5IDE0LjA4NTlMMzMuNTgyIDkuNTg5ODRDMzIuODAwOCA5LjIxNDg0IDMxLjkyNTggOSAzMSA5Wk0yOS45NDkyIDIyLjQxNDFMMjYuNDE0MSAyNS45NTMxTDMyLjczNDQgMzIuMjY5NUMzMi44NDc3IDMyLjM4NjcgMzIuOTc2NiAzMi40ODgzIDMzLjExMzMgMzIuNTc4MUMzMy4xNzU4IDMyLjYyMTEgMzMuMjQyMiAzMi42NTIzIDMzLjMwODYgMzIuNjg3NUMzMy4zODI4IDMyLjczMDUgMzMuNDYwOSAzMi43NzczIDMzLjU0MyAzMi44MTI1QzMzLjYyNSAzMi44NDM4IDMzLjcxMDkgMzIuODYzMyAzMy43OTY5IDMyLjg5MDZDMzMuODY3MiAzMi45MTAyIDMzLjkzNzUgMzIuOTM3NSAzNC4wMTE3IDMyLjk1MzFDMzQuMzMyIDMzLjAxNTYgMzQuNjY0MSAzMy4wMTU2IDM0Ljk4ODMgMzIuOTUzMUMzNS4wNjI1IDMyLjkzNzUgMzUuMTI4OSAzMi45MTAyIDM1LjIwMzEgMzIuODkwNkMzNS4yODUyIDMyLjg2MzMgMzUuMzcxMSAzMi44NDM4IDM1LjQ1MzEgMzIuODEyNUMzNS41MzkxIDMyLjc3NzMgMzUuNjEzMyAzMi43MzA1IDM1LjY5MTQgMzIuNjg3NUMzNS43NTc4IDMyLjY1MjMgMzUuODI0MiAzMi42MjExIDM1Ljg4NjcgMzIuNTc4MUMzNi4xNjAyIDMyLjM5ODQgMzYuMzk0NSAzMi4xNjAyIDM2LjU3ODEgMzEuODg2N0MzNi42MjExIDMxLjgyNDIgMzYuNjQ4NCAzMS43NTc4IDM2LjY4NzUgMzEuNjkxNEMzNi43MjY2IDMxLjYxMzMgMzYuNzczNCAzMS41MzkxIDM2LjgwODYgMzEuNDUzMUMzNi44NDM3IDMxLjM3MTEgMzYuODYzMyAzMS4yODUyIDM2Ljg5MDYgMzEuMjAzMUMzNi45MTAyIDMxLjEyODkgMzYuOTM3NSAzMS4wNjI1IDM2Ljk1MzEgMzAuOTg4M0MzNy4wMTU2IDMwLjY2OCAzNy4wMTU2IDMwLjMzNTkgMzYuOTUzMSAzMC4wMTE3QzM2LjkzNzUgMjkuOTM3NSAzNi45MTAyIDI5Ljg3MTEgMzYuODkwNiAyOS43OTY5QzM2Ljg2MzMgMjkuNzE0OCAzNi44NDM3IDI5LjYyODkgMzYuODA4NiAyOS41NDY5QzM2Ljc3MzQgMjkuNDYwOSAzNi43MjY2IDI5LjM4NjcgMzYuNjgzNiAyOS4zMDg2QzM2LjY0ODQgMjkuMjQyMiAzNi42MTcyIDI5LjE3NTggMzYuNTc4MSAyOS4xMTMzQzM2LjQ4NDQgMjguOTc2NiAzNi4zODI4IDI4Ljg0NzcgMzYuMjY1NiAyOC43MzQ0TDI5Ljk0OTIgMjIuNDE0MVoiIGZpbGw9IiMwMDlEQUIiLz4KPC9zdmc+Cg=="),O(this,"pickColorImage","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgNDggNDgiIHdpZHRoPSI0OHB4IiBoZWlnaHQ9IjQ4cHgiPjxwYXRoIGZpbGw9IiNlOTFlNjMiIGQ9Ik0yNCw0djIwTDE0LDYuNjgxTDI0LDR6Ii8+PHBhdGggZmlsbD0iI2ZmNTcyMiIgZD0iTTM0LDYuNjgxTDQxLjMxOSwxNEwyNCwyNEwzNCw2LjY4MXoiLz48cGF0aCBmaWxsPSIjZjQ0MzM2IiBkPSJNMjQsNGwxMCwyLjY4MUwyNCwyNFY0eiIvPjxwYXRoIGZpbGw9IiM4YmMzNGEiIGQ9Ik0yNCw0NFYyNGwxMCwxNy4zMTlMMjQsNDR6Ii8+PHBhdGggZmlsbD0iIzAzYTlmNCIgZD0iTTE0LDQxLjMxOUw2LjY4MSwzNEwyNCwyNEwxNCw0MS4zMTl6Ii8+PHBhdGggZmlsbD0iIzRjYWY1MCIgZD0iTTI0LDQ0bC0xMC0yLjY4MUwyNCwyNFY0NHoiLz48cGF0aCBmaWxsPSIjZmY5ODAwIiBkPSJNNDQsMjRIMjRsMTcuMzE5LTEwTDQ0LDI0eiIvPjxwYXRoIGZpbGw9IiNmZmViM2IiIGQ9Ik00MS4zMTksMzRMMzQsNDEuMzE5TDI0LDI0TDQxLjMxOSwzNHoiLz48cGF0aCBmaWxsPSIjZmZjMTA3IiBkPSJNNDQsMjRsLTIuNjgxLDEwTDI0LDI0SDQ0eiIvPjxwYXRoIGZpbGw9IiMzZjUxYjUiIGQ9Ik00LDI0aDIwTDYuNjgxLDM0TDQsMjR6Ii8+PHBhdGggZmlsbD0iIzljMjdiMCIgZD0iTTYuNjgxLDE0TDE0LDYuNjgxTDI0LDI0TDYuNjgxLDE0eiIvPjxwYXRoIGZpbGw9IiM2NzNhYjciIGQ9Ik00LDI0bDIuNjgxLTEwTDI0LDI0SDR6Ii8+PC9zdmc+"),O(this,"drawEnabledImage","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzUiIHZpZXdCb3g9IjAgMCAzMiAzNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZCkiPgo8cGF0aCBkPSJNMjMuODI4MSAzQzIzLjMxNjQgMyAyMi44MDQ2IDMuMTk1NDQgMjIuNDE0MSAzLjU4NTk0TDIxIDVMMjYgMTBMMjcuNDE0MSA4LjU4NTk0QzI4LjE5NTEgNy44MDQ5NCAyOC4xOTUxIDYuNTM4ODEgMjcuNDE0MSA1Ljc1NzgxTDI1LjI0MjIgMy41ODU5NEMyNC44NTE3IDMuMTk1NDQgMjQuMzM5OSAzIDIzLjgyODEgM1pNMTkgN0w3LjAwMDAxIDE5TDguNTAwMDEgMTkuNUw5LjAwMDAxIDIyTDExLjUgMjIuNUwxMiAyNEwyNCAxMkwxOSA3Wk01LjE1MjM1IDIzLjE1MjNMNC4wMzcxMSAyNi4zMDg2QzQuMDEyMyAyNi4zNjkzIDMuOTk5NyAyNi40MzQ0IDQuMDAwMDEgMjYuNUM0LjAwMDAxIDI2LjYzMjYgNC4wNTI2OCAyNi43NTk4IDQuMTQ2NDUgMjYuODUzNkM0LjI0MDIyIDI2Ljk0NzMgNC4zNjc0IDI3IDQuNTAwMDEgMjdDNC41NjIwOSAyNy4wMDAzIDQuNjIzNjkgMjYuOTg5IDQuNjgxNjUgMjYuOTY2OEw3Ljg0NzY2IDI1Ljg0NzdMNS4xNTIzNSAyMy4xNTIzWiIgZmlsbD0iIzAwOURBQiIvPgo8L2c+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2QiIHg9Ii0zIiB5PSIwIiB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIyIi8+CjxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIvPgo8ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yNSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93Ii8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93IiByZXN1bHQ9InNoYXBlIi8+CjwvZmlsdGVyPgo8L2RlZnM+Cjwvc3ZnPgo="),O(this,"drawDisabledImage","data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSIjMDAwMDAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgMzAgMzAiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiPiAgICA8cGF0aCBkPSJNIDIyLjgyODEyNSAzIEMgMjIuMzE2Mzc1IDMgMjEuODA0NTYyIDMuMTk1NDM3NSAyMS40MTQwNjIgMy41ODU5Mzc1IEwgMjAgNSBMIDI1IDEwIEwgMjYuNDE0MDYyIDguNTg1OTM3NSBDIDI3LjE5NTA2MiA3LjgwNDkzNzUgMjcuMTk1MDYyIDYuNTM4ODEyNSAyNi40MTQwNjIgNS43NTc4MTI1IEwgMjQuMjQyMTg4IDMuNTg1OTM3NSBDIDIzLjg1MTY4OCAzLjE5NTQzNzUgMjMuMzM5ODc1IDMgMjIuODI4MTI1IDMgeiBNIDE4IDcgTCA2IDE5IEwgNy41IDE5LjUgTCA4IDIyIEwgMTAuNSAyMi41IEwgMTEgMjQgTCAyMyAxMiBMIDE4IDcgeiBNIDQuMTUyMzQzOCAyMy4xNTIzNDQgTCAzLjAzNzEwOTQgMjYuMzA4NTk0IEEgMC41IDAuNSAwIDAgMCAzIDI2LjUgQSAwLjUgMC41IDAgMCAwIDMuNSAyNyBBIDAuNSAwLjUgMCAwIDAgMy42ODE2NDA2IDI2Ljk2Njc5NyBMIDYuODQ3NjU2MiAyNS44NDc2NTYgTCA0LjE1MjM0MzggMjMuMTUyMzQ0IHoiLz48L3N2Zz4="),O(this,"eraserImage","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNyAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTExLjY2NjkgMC4zNDM3NUMxMS4wNzg2IDAuMzQzNzUgMTAuNDkwOSAwLjU2NjY3OSAxMC4wNDU4IDEuMDExNzJMMS4wMTMyNiAxMC4wNDU2QzAuMTIzMTgzIDEwLjkzNTcgMC4xMjMxODMgMTIuMzk5IDEuMDEzMjYgMTMuMjg5MUw0LjA0NTgxIDE2LjMyMTZDNC40MzkyNyAxNi43MTUxIDQuOTQ1NDcgMTYuOTI0NSA1LjQ2Mzc4IDE2Ljk3MDFDNS41Mjk1NCAxNi45OTA1IDUuNTk4MDYgMTcuMDAwNiA1LjY2NjkxIDE3SDExLjAwMDJDMTEuMDg4NiAxNy4wMDEyIDExLjE3NjMgMTYuOTg0OSAxMS4yNTgzIDE2Ljk1MkMxMS4zNDAyIDE2LjkxOSAxMS40MTQ5IDE2Ljg3MDEgMTEuNDc3OCAxNi44MDgxQzExLjU0MDcgMTYuNzQ2MSAxMS41OTA2IDE2LjY3MjIgMTEuNjI0NyAxNi41OTA3QzExLjY1ODggMTYuNTA5MiAxMS42NzY0IDE2LjQyMTcgMTEuNjc2NCAxNi4zMzMzQzExLjY3NjQgMTYuMjQ1IDExLjY1ODggMTYuMTU3NSAxMS42MjQ3IDE2LjA3NkMxMS41OTA2IDE1Ljk5NDUgMTEuNTQwNyAxNS45MjA2IDExLjQ3NzggMTUuODU4NkMxMS40MTQ5IDE1Ljc5NjUgMTEuMzQwMiAxNS43NDc2IDExLjI1ODMgMTUuNzE0N0MxMS4xNzYzIDE1LjY4MTcgMTEuMDg4NiAxNS42NjU0IDExLjAwMDIgMTUuNjY2N0g3Ljk0Mjk1TDE2LjMyMTkgNy4yODc3NkMxNy4yMTE5IDYuMzk3NjggMTcuMjExOSA0LjkzNDM1IDE2LjMyMTkgNC4wNDQyN0wxMy4yODkzIDEuMDExNzJDMTIuODQ0MyAwLjU2NjY3OSAxMi4yNTUzIDAuMzQzNzUgMTEuNjY2OSAwLjM0Mzc1Wk02LjEzODI2IDYuODA0NjlMMTAuNTI4OSAxMS4xOTUzTDYuMzQ1MjkgMTUuMzc4OUM1Ljk2NDU0IDE1Ljc1OTcgNS4zNjkyOCAxNS43NTk3IDQuOTg4NTIgMTUuMzc4OUwxLjk1NTk3IDEyLjM0NjRDMS41NzUzOCAxMS45NjU4IDEuNTc1MzggMTEuMzY4OSAxLjk1NTk3IDEwLjk4ODNMNi4xMzgyNiA2LjgwNDY5Wk0xMy42NjY5IDE1LjY2NjdDMTMuNDkwMSAxNS42NjY3IDEzLjMyMDUgMTUuNzM2OSAxMy4xOTU1IDE1Ljg2MTlDMTMuMDcwNSAxNS45ODcgMTMuMDAwMiAxNi4xNTY1IDEzLjAwMDIgMTYuMzMzM0MxMy4wMDAyIDE2LjUxMDEgMTMuMDcwNSAxNi42Nzk3IDEzLjE5NTUgMTYuODA0N0MxMy4zMjA1IDE2LjkyOTggMTMuNDkwMSAxNyAxMy42NjY5IDE3QzEzLjg0MzcgMTcgMTQuMDEzMyAxNi45Mjk4IDE0LjEzODMgMTYuODA0N0MxNC4yNjMzIDE2LjY3OTcgMTQuMzMzNiAxNi41MTAxIDE0LjMzMzYgMTYuMzMzM0MxNC4zMzM2IDE2LjE1NjUgMTQuMjYzMyAxNS45ODcgMTQuMTM4MyAxNS44NjE5QzE0LjAxMzMgMTUuNzM2OSAxMy44NDM3IDE1LjY2NjcgMTMuNjY2OSAxNS42NjY3Wk0xNi4zMzM2IDE1LjY2NjdDMTYuMTU2OCAxNS42NjY3IDE1Ljk4NzIgMTUuNzM2OSAxNS44NjIyIDE1Ljg2MTlDMTUuNzM3MSAxNS45ODcgMTUuNjY2OSAxNi4xNTY1IDE1LjY2NjkgMTYuMzMzM0MxNS42NjY5IDE2LjUxMDEgMTUuNzM3MSAxNi42Nzk3IDE1Ljg2MjIgMTYuODA0N0MxNS45ODcyIDE2LjkyOTggMTYuMTU2OCAxNyAxNi4zMzM2IDE3QzE2LjUxMDQgMTcgMTYuNjggMTYuOTI5OCAxNi44MDUgMTYuODA0N0MxNi45MyAxNi42Nzk3IDE3LjAwMDIgMTYuNTEwMSAxNy4wMDAyIDE2LjMzMzNDMTcuMDAwMiAxNi4xNTY1IDE2LjkzIDE1Ljk4NyAxNi44MDUgMTUuODYxOUMxNi42OCAxNS43MzY5IDE2LjUxMDQgMTUuNjY2NyAxNi4zMzM2IDE1LjY2NjdaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),O(this,"closeImage","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEuNzU1NTMgMC41NzgxMjVMMC41NzcxNDggMS43NTY1MUw1LjgyMTI5IDcuMDAwNjVMMC41NzcxNDggMTIuMjQ0OEwxLjc1NTUzIDEzLjQyMzJMNi45OTk2NyA4LjE3OTAzTDEyLjI0MzggMTMuNDIzMkwxMy40MjIyIDEyLjI0NDhMOC4xNzgwNiA3LjAwMDY1TDEzLjQyMjIgMS43NTY1MUwxMi4yNDM4IDAuNTc4MTI1TDYuOTk5NjcgNS44MjIyN0wxLjc1NTUzIDAuNTc4MTI1WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg=="),O(this,"reconnectImage","data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTNweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTMgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjMgKDY3Mjk3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5yZWxvYWQ8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iQXJ0Ym9hcmQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zNTcuMDAwMDAwLCAtMjQxLjAwMDAwMCkiIGZpbGw9IiM4QTk1OUYiIHN0cm9rZT0iIzhBOTU5RiI+CiAgICAgICAgICAgIDxnIGlkPSJyZWxvYWQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDM1OC4wMDAwMDAsIDI0Mi4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMC44LDUuMjczNTc2NTggQzEwLjgsMi4zNjU3MTQyIDguMzc3NTg1NzEsMCA1LjQwMDAyMzg3LDAgQzIuNDIyNDYyMDMsMCAwLDIuMzY1NzE0MiAwLDUuMjczNTc2NTggQzAsNS40NDYzMTE0MiAwLjE0MzQwNjM1Myw1LjU4NjM1OTc2IDAuMzIwMjgyOTQyLDUuNTg2MzU5NzYgQzAuNDk3MTU5NTMsNS41ODYzNTk3NiAwLjY0MDU2NTg4Myw1LjQ0NjI4ODEgMC42NDA1NjU4ODMsNS4yNzM1NzY1OCBDMC42NDA1NjU4ODMsMi43MTA2NDc2NSAyLjc3NTY0MjI2LDAuNjI1NTg5NjY4IDUuNCwwLjYyNTU4OTY2OCBDOC4wMjQzNTc3NCwwLjYyNTU4OTY2OCAxMC4xNTk0MzQxLDIuNzEwNjcwOTYgMTAuMTU5NDM0MSw1LjI3MzU3NjU4IEMxMC4xNTk0MzQxLDcuODM2NDU4ODkgOC4wMjQzNTc3NCw5LjkyMTU0MDE4IDUuNCw5LjkyMTU0MDE4IEw0Ljg0NDMyNzI0LDkuOTIxNTQwMTggTDUuNjM4ODc1MzEsOS4wNTI5NzAwMyBDNS43NTY3MzczMyw4LjkyNDE1OTEyIDUuNzQ1MzAyMDYsOC43MjY0MDgxNiA1LjYxMzQwMjYsOC42MTEzMDYgQzUuNDgxNTAzMTMsOC40OTYyMDM4NSA1LjI3ODk4NjcyLDguNTA3Mzk0NjYgNS4xNjExNDg1Nyw4LjYzNjIwNTU2IEw0LjAyNTM1Njg4LDkuODc3ODAyNzYgQzMuODM5NDMyMzUsMTAuMDgxMDU1OSAzLjgzOTQzMjM1LDEwLjM4NzU5MDggNC4wMjUzNTY4OCwxMC41OTA4NDQgTDUuMTYxMTQ4NTcsMTEuODMyNDQxMiBDNS4yMjQ0MzY0NCwxMS45MDE2Mzc3IDUuMzEyMDc0OTgsMTEuOTM2ODQyMSA1LjQwMDExOTM3LDExLjkzNjg0MjEgQzUuNDc2MDYwMDQsMTEuOTM2ODQyMSA1LjU1MjMxMTA2LDExLjkxMDU5MDMgNS42MTM0MDI2LDExLjg1NzM0MDcgQzUuNzQ1MzI1OTQsMTEuNzQyMjM4NiA1Ljc1NjczNzMzLDExLjU0NDQ4NzYgNS42Mzg4NzUzMSwxMS40MTU2NzY3IEw0Ljg0NDMyNzI0LDEwLjU0NzEwNjUgTDUuNCwxMC41NDcxMDY1IEM4LjM3NzU4NTcxLDEwLjU0NzEwNjUgMTAuOCw4LjE4MTM5MjM0IDEwLjgsNS4yNzM1NzY1OCBaIiBpZD0iUGF0aCI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="),O(this,"visibilityOffImage","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg=="),O(this,"visibilityOnImage","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg=="),O(this,"socket",null),O(this,"stopFn",null),O(this,"peer",null),O(this,"dataChannel",null),O(this,"requestAccepted",!1),O(this,"releasebtn",void 0),O(this,"reconnectbtn",void 0),O(this,"reconnectbtnimg",void 0),O(this,"releasebtnimg",void 0),O(this,"drawbtn",void 0),O(this,"drawbtnimg",void 0),O(this,"erasebtn",void 0),O(this,"erasebtnimg",void 0),O(this,"colorbtn",void 0),O(this,"colorbtnimg",void 0),O(this,"stopbtn",void 0),O(this,"stopbtnimg",void 0),O(this,"voffbtn",void 0),O(this,"voffbtnimg",void 0),O(this,"vonbtn",void 0),O(this,"vonbtnimg",void 0),O(this,"drawEnabled",!1),O(this,"stopCoBrowse",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];console.log("cobrowse >>> stopping cobrowse"),i.agentDrawPaths=[],i.userDrawPaths=[],i.removeTooltip(),i.drawEnabled=!1,i.requestAccepted=!1,t&&localStorage.removeItem("cobrowseRequest");var n=document.getElementById("kamousepointer");if(n&&(n.style.display="none"),e){i.sendDCMessage(JSON.stringify({type:"terminate_cobrowse"}))}setTimeout((function(){i.closeChannel(),null!==i.socket&&i.socket.disconnect(),i.socket=null}),1e3),i.removeCanvas(),i.removeMousePointer(),i.removeTooltip();var r=document.getElementById("cobrowse-toolbar");if(r&&r.remove(),console.log("cobrowse >>> koreCoBrowseUnMakingFields"),i.maskClassList)for(var o=0;o<i.maskClassList.length>0;o++)""!==i.this.maskClassList[o]&&document.querySelectorAll("."+i.maskClassList[o]).forEach((function(e){e.classList.remove("rr-block")}));i.maskClassList=[],i.maskPatternList=[]})),O(this,"closeChannel",(function(){this.dataChannel&&"open"===this.dataChannel.readyState&&(console.log("cobrowse >>> closing channel"),this.dataChannel.close()),this.dataChannel=null,this.stopFn&&this.stopFn()})),O(this,"koreGenerateUUID",(function(){console.info("generating UUID");var e=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(e+=performance.now()),"u-xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))})),O(this,"createTooltip",(function(e,t){var n;if(!document.getElementById("cobrowse-tooltip")){var r=document.documentElement,i=(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0)+e.x,o=(window.pageYOffset||r.scrollTop)-(r.clientTop||0)+e.y,a={position:"absolute",display:"inline-block",borderBottom:"1px dotted black",zIndex:1e5,left:"".concat(i+20,"px"),top:"".concat(o-20,"px"),padding:"10px, 15px",height:"36px",backgroundColor:"#202124",borderRadius:"4px",width:"auto",whitespace:"nowrap"};i+100>document.body.clientWidth&&(a.left="".concat(i-100,"px"));var s=document.createElement("div");s.setAttribute("do-not-mutate",!0),s.id="cobrowse-tooltip",Object.assign(s.style,a),document.getElementsByTagName("BODY")[0].append(s);var u=(O(n={color:"#fff",textAlign:"center",padding:"10px",borderRadius:"6px",position:"absolute",zIndex:1,height:"14px",lineHeight:"0px"},"textAlign","center"),O(n,"width","max-content"),O(n,"backgroundColor","black"),O(n,"whitespace","nowrap"),O(n,"display","inline-block"),O(n,"fontStyle","normal"),O(n,"fontWeight",600),O(n,"fontSize","10px"),n),l=document.createElement("div");l.id="cobrowse-tooltip-text",Object.assign(l.style,u),s.append(l),l.textContent=t}})),O(this,"removeTooltip",(function(){var e=document.getElementById("cobrowse-tooltip");e&&e.remove(),(e=document.getElementById("cobrowse-tooltip-text"))&&e.remove()})),O(this,"userDrawPaths",[]),O(this,"agentDrawPaths",[]),O(this,"drawAllLines",(function(e){var t=document.getElementById("cb-canvas");if(t){var n=t.getContext("2d");if(e.length>0)for(var r=0;r<e.length;r++)for(var i=e[r].color,o=e[r].subPath,a=0;a<o.length-1;a++){var s=o[a],u=o[a+1];n.beginPath(),n.moveTo(s.x,s.y),n.lineTo(u.x,u.y),n.strokeStyle=i,n.lineWidth=this.lineWidth,n.stroke()}}})),O(this,"drawLines",(function(e){var t=document.getElementById("cb-canvas");if(t){var n=t.getContext("2d");if(e&&e.length>0)for(var r=0;r<e.length;r++)for(var i=e[r].color,o=e[r].subPath,a=0;a<o.length-1;a++){var s=o[a],u=o[a+1];n.beginPath(),n.moveTo(s.x,s.y),n.lineTo(u.x,u.y),n.strokeStyle=i,n.lineWidth=3,n.stroke()}}})),O(this,"createDrawingBoard",(function(){var e=document,t=(window,e.documentElement.scrollHeight),n=e.documentElement.scrollWidth;if(!e.getElementById("cb-canvas")){var r=e.createElement("canvas");r.id="cb-canvas",r.className="rr-ignore",r.setAttribute("do-not-mutate","true"),r.width=n,r.height=t,r.style.backgroundColor="transparent",r.style.top="0px",r.style.left="0px",r.style.position="absolute",r.style.zIndex="10000",e.body.append(r)}})),O(this,"prevDrawX",void 0),O(this,"prevDrawY",void 0),O(this,"subPaths",[]),O(this,"sketchColor","black"),O(this,"drawStarted",!1),O(this,"drawLine",(function(e,t,n,r,i){var o=e.getContext("2d");o.strokeStyle=this.sketchColor,o.beginPath(),o.moveTo(t,n),o.lineTo(r,i),o.lineWidth=this.lineWidth,o.stroke(),this.prevDrawX=r,this.prevDrawY=i})),O(this,"lineWidth",3),O(this,"eraseLastDrawing",(function(){if(document.getElementById("cb-canvas")&&(this.userDrawPaths.length>0&&this.userDrawPaths.splice(this.userDrawPaths.length-1,1),this.clearCanvas(),this.drawAllLines(this.userDrawPaths),this.drawAllLines(this.agentDrawPaths),this.dataChannel&&"open"===this.dataChannel.readyState)){var e={type:"target_draw",drawPaths:this.userDrawPaths};this.sendDCMessage(JSON.stringify(e))}})),O(this,"handleDraw",(function(e){var t=this;if(this.drawEnabled?this.drawbtnimg.src=this.drawDisabledImage:this.drawbtnimg.src=this.drawEnabledImage,this.drawEnabled=!this.drawEnabled,this.removeTooltip(),this.drawEnabled){this.createTooltip(e,"Draw Mode On"),this.createDrawingBoard();var n=document.getElementById("cb-canvas");n.onmousemove=function(e){if(t.drawEnabled&&t.drawStarted){var r=e.offsetX,i=e.offsetY;t.subPaths.push({x:r,y:i}),t.drawLine(n,t.prevDrawX,t.prevDrawY,r,i)}},n.onmousedown=function(e){t.drawEnabled&&(t.prevDrawX=e.offsetX,t.prevDrawY=e.offsetY,t.subPaths.push({x:e.offsetX,y:e.offsetY}),t.drawStarted=!0)},n.onmouseup=function(e){if(t.drawEnabled){if(t.subPaths.length>0){t.userDrawPaths.push({color:t.sketchColor,subPath:t.subPaths});var n={type:"target_draw",drawPaths:t.userDrawPaths};t.sendDCMessage(JSON.stringify(n))}t.drawStarted=!1}t.subPaths=[]}}else if(this.userDrawPaths=[],this.clearCanvas(),this.agentDrawPaths.length<1?this.removeCanvas():this.drawLines(this.agentDrawPaths),this.dataChannel&&"open"===this.dataChannel.readyState){this.sendDCMessage(JSON.stringify({type:"target_stop_draw"}))}this.drawEnabled||this.createTooltip(e,"Draw Mode Off")})),O(this,"createCobrowseToolBar",(function(){var e=this,t=document.getElementById("cobrowse-toolbar");if(!t){(t=document.createElement("DIV")).id="cobrowse-toolbar",t.style.display="table",t.style.alignItems="flex-start",t.style.zIndex=1e5,t.style.cursor="move",t.style.height="172px",t.style.width="40px",t.style.background="#FFFFFF",t.style.boxShadow="0px 2px 5px rgba(0, 0, 0, 0.25)",t.style.borderRadius="2px",t.style.left="calc(100% - 50px)",t.style.top="40%",t.style.fontWeight="normal",t.style.fontSize="14px",t.style.lineHeight="20px",t.style.color="#FFFFFF",t.style.position="fixed",t.style.paddingBottom="5px",t.classList.add("rr-block"),t.style.border="none",t.setAttribute("do-not-mutate","true");var n={cursor:"pointer",width:"30px",height:"30px",borderRadius:"2px",marginTop:"5px",marginLeft:"5px",alignItems:"center",display:"flex"},r={width:"20px",height:"20px",marginLeft:"5px"};this.releasebtn=document.createElement("div"),Object.assign(this.releasebtn.style,n),this.releasebtn.style.backgroundColor="#F5F8FA",this.releasebtn.setAttribute("do-not-mutate","true"),this.releasebtnimg=document.createElement("img"),Object.assign(this.releasebtnimg.style,r),this.releasebtnimg.src=this.noControlImage,this.releasebtn.append(this.releasebtnimg),this.releasebtn.onmouseover=function(t){e.requestAccepted&&e.createTooltip(t,"Release Control"),e.requestAccepted||e.createTooltip(t,"Control-Off")},this.releasebtn.onmouseout=function(t){e.removeTooltip()},this.releasebtn.onclick=function(t){e.requestAccepted?(e.createTooltip(t,"Release Control"),e.releasebtnimg.src=e.noControlImage,e.releaseControl(),e.requestAccepted=!1):(e.createTooltip(t,"Agent Not in Control"),e.releasebtnimg.src=e.noControlImage)},t.append(this.releasebtn),this.reconnectbtn=document.createElement("div"),Object.assign(this.reconnectbtn.style,n),this.reconnectbtn.style.backgroundColor="#F5F8FA",this.reconnectbtn.setAttribute("do-not-mutate","true"),this.reconnectbtnimg=document.createElement("img"),Object.assign(this.reconnectbtnimg.style,r),this.reconnectbtnimg.src=this.reconnectImage,this.reconnectbtn.append(this.reconnectbtnimg),this.reconnectbtn.onmouseover=function(t){e.createTooltip(t,"Reconnect")},this.reconnectbtn.onmouseout=function(t){e.removeTooltip()},this.reconnectbtn.onclick=function(t){e.closeChannel(),setTimeout((function(){e.autoStartCobrowse()}),1e3)},t.append(this.reconnectbtn),this.drawbtn=document.createElement("div"),Object.assign(this.drawbtn.style,n),this.drawbtn.style.backgroundColor="#F5F8FA",this.drawbtn.setAttribute("do-not-mutate","true"),this.drawbtnimg=document.createElement("img"),Object.assign(this.drawbtnimg.style,r),this.drawbtnimg.src=this.drawDisabledImage,this.drawbtn.append(this.drawbtnimg),this.drawbtn.onclick=function(t){e.handleDraw(t)},this.drawbtn.onmouseover=function(t){e.drawEnabled&&e.createTooltip(t,"Draw Mode On"),e.drawEnabled||e.createTooltip(t,"Draw Mode Off")},this.drawbtn.onmouseout=function(t){e.removeTooltip()},t.append(this.drawbtn),this.erasebtn=document.createElement("div"),Object.assign(this.erasebtn.style,n),this.erasebtn.style.backgroundColor="#F5F8FA",this.erasebtn.setAttribute("do-not-mutate","true"),this.erasebtnimg=document.createElement("img"),Object.assign(this.erasebtnimg.style,r),this.erasebtnimg.src=this.eraserImage,this.erasebtn.append(this.erasebtnimg),this.erasebtn.onmouseover=function(t){e.createTooltip(t,"Undo last draw")},this.erasebtn.onmouseout=function(t){e.removeTooltip()},this.erasebtn.onclick=function(t){e.eraseLastDrawing()},t.append(this.erasebtn),this.colorbtn=document.createElement("div"),Object.assign(this.colorbtn.style,n),this.colorbtn.style.backgroundColor="#F5F8FA",this.colorbtn.setAttribute("do-not-mutate","true"),this.colorbtnimg=document.createElement("img"),Object.assign(this.colorbtnimg.style,r),this.colorbtnimg.src=this.pickColorImage,this.colorbtn.append(this.colorbtnimg);var i=document.createElement("INPUT");i.id="colorId",i.type="color",i.value="#00000",i.style.visibility="hidden",i.onchange=function(t){var n=document.getElementById("colorId");e.sketchColor=n.value},this.colorbtn.append(i),this.colorbtn.onmouseover=function(t){e.createTooltip(t,"Pick color")},this.colorbtn.onmouseout=function(t){e.removeTooltip()},this.colorbtn.onclick=function(e){document.getElementById("colorId").click()},t.append(this.colorbtn),this.vonbtn=document.createElement("div"),Object.assign(this.vonbtn.style,n),this.vonbtn.style.backgroundColor="#F5F8FA",this.vonbtn.setAttribute("do-not-mutate","true"),this.vonbtnimg=document.createElement("img"),Object.assign(this.vonbtnimg.style,r),Object.assign(this.vonbtnimg.style,{height:"12.85px",width:"12.85px",marginLeft:"9px"}),this.vonbtnimg.src=this.visibilityOnImage,this.vonbtn.append(this.vonbtnimg),this.vonbtn.onmouseover=function(t){document.activeElement.classList.contains("rr-block")?e.createTooltip(t,"Show Input"):e.createTooltip(t,"Block Input")},this.vonbtn.onmouseout=function(t){e.removeTooltip()},this.vonbtn.onclick=function(t){var n=document.activeElement;document.activeElement.classList.contains("rr-block")?(n.classList.remove("rr-block"),e.vonbtnimg.src=e.visibilityOffImage,e.createTooltip(t,"Show Input")):(n.classList.add("rr-block"),e.vonbtnimg.src=e.visibilityOnImage,e.createTooltip(t,"Block Input")),e.rrweb&&e.stopFn&&e.rrweb.record.takeFullSnapshot(!0)},t.append(this.vonbtn),this.stopbtn=document.createElement("div"),Object.assign(this.stopbtn.style,n),this.stopbtn.style.backgroundColor="rgb(255, 38, 97)",this.stopbtn.setAttribute("do-not-mutate","true"),this.stopbtnimg=document.createElement("img"),Object.assign(this.stopbtnimg.style,r),Object.assign(this.stopbtnimg.style,{height:"12.85px",width:"12.85px",marginLeft:"9px"}),this.stopbtnimg.src=this.closeImage,this.stopbtn.append(this.stopbtnimg),this.stopbtn.onmouseover=function(t){e.createTooltip(t,"Stop CoBrowse")},this.stopbtn.onmouseout=function(t){e.removeTooltip()},t.append(this.stopbtn),document.getElementsByTagName("BODY")[0].append(t),setTimeout((function(){e.dragElement(t),e.stopbtn.onclick=function(t){e.terminateCobrowse()}}),1e3)}})),O(this,"dragElement",(function(e){var t=0,n=0,r=0,i=0;function o(e){(e=e||window.event).preventDefault(),r=e.clientX,i=e.clientY,document.onmouseup=s,document.onmousemove=a}function a(o){(o=o||window.event).preventDefault(),t=r-o.clientX,n=i-o.clientY,r=o.clientX,i=o.clientY,e.style.top=e.offsetTop-n+"px",e.style.left=e.offsetLeft-t+"px"}function s(e){(e=e||window.event).preventDefault(),e.stopPropagation(),document.onmouseup=null,document.onmousemove=null}document.getElementById(e.id)?document.getElementById(e.id).onmousedown=o:e.onmousedown=o})),O(this,"removeCanvas",(function(){var e=document.getElementById("cb-canvas");e&&(this.clearCanvas(),e.remove())})),O(this,"imageMousePointer",null),O(this,"removeMousePointer",(function(){this.imageMousePointer=document.getElementById("kamousepointer"),this.imageMousePointer&&this.imageMousePointer.remove()})),O(this,"clearCanvas",(function(){var e=document.getElementById("cb-canvas");e&&e.getContext("2d").clearRect(0,0,e.width,e.height)})),O(this,"createMousePointer",(function(){if(this.imageMousePointer=document.getElementById("kamousepointer"),this.imageMousePointer)this.imageMousePointer.setAttribute("do-not-mutate","true");else{this.imageMousePointer=document.createElement("div"),this.imageMousePointer.id="kamousepointer",this.imageMousePointer.style.top=-100,this.imageMousePointer.setAttribute("do-not-mutate","true"),this.imageMousePointer.style.left=-100,this.imageMousePointer.style.display="none",this.imageMousePointer.style.zIndex=1e4,this.imageMousePointer.style.position="absolute",this.imageMousePointer.style.width="20px",this.imageMousePointer.style.height="20px",this.imageMousePointer.style.transition="left .05s linear,top .05s linear",this.imageMousePointer.style.backgroundSize="contain",this.imageMousePointer.style.backgroundPosition="50%",this.imageMousePointer.style.backgroundRepeat="no-repeat",this.imageMousePointer.style.backgroundImage='url("data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwMCIgd2lkdGg9IjMwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBkYXRhLW5hbWU9IkxheWVyIDEiIHZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTTQ4LjcxIDQyLjkxTDM0LjA4IDI4LjI5IDQ0LjMzIDE4YTEgMSAwIDAwLS4zMy0xLjYxTDIuMzUgMS4wNmExIDEgMCAwMC0xLjI5IDEuMjlMMTYuMzkgNDRhMSAxIDAgMDAxLjY1LjM2bDEwLjI1LTEwLjI4IDE0LjYyIDE0LjYzYTEgMSAwIDAwMS40MSAwbDQuMzgtNC4zOGExIDEgMCAwMC4wMS0xLjQyem0tNS4wOSAzLjY3TDI5IDMyYTEgMSAwIDAwLTEuNDEgMGwtOS44NSA5Ljg1TDMuNjkgMy42OWwzOC4xMiAxNEwzMiAyNy41OEExIDEgMCAwMDMyIDI5bDE0LjU5IDE0LjYyeiIvPjwvc3ZnPg==")',this.imageMousePointer.style.borderColor="transparent",this.imageMousePointer.className="rr-ignore agent-mouse";var e=document.createElement("div");e.style.content="",e.style.display="inline-block",e.style.width="20px",e.style.height="20px",e.style.background="#4950f6",e.style.borderRadius="100%",e.style.transform="translate(-50%,-50%)",e.style.opacity=".3",e.className="rr-block agent-mouse-circle",this.imageMousePointer.appendChild(e),document.body.appendChild(this.imageMousePointer)}})),O(this,"sendDCMessage",(function(e){this.dataChannel&&"open"===this.dataChannel.readyState&&this.dataChannel.send(e)})),O(this,"releaseControl",(function(){this.sendDCMessage(JSON.stringify({type:"request_control",response:"released"}))})),O(this,"cobrowseInitialize",(function(e){var t=i;t.createCobrowseToolBar();var n="";function r(t){function r(e,t){var n,r=i(a,arguments[2]||{}),s=null;for(var u in o)if(o[u].test(t)){s=u;break}if(!s)throw new SyntaxError("Only HTMLEvents and MouseEvents interfaces are supported");document.createEvent?(n=document.createEvent(s),"HTMLEvents"==s?n.initEvent(t,r.bubbles,r.cancelable):n.initMouseEvent(t,r.bubbles,r.cancelable,document.defaultView,r.button,r.x,r.y,r.x,r.y,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.button,e),e.dispatchEvent(n)):(r.clientX=r.x,r.clientY=r.y,n=i(document.createEventObject(),r),e.fireEvent("on"+t,n));return e}function i(e,t){for(var n in t)e[n]=t[n];return e}console.log("cobrowse >>> joining room ",e.conversationId),function(e){for(var t=document.getElementsByTagName("*"),n=0,r=t.length;n<r;n++){var i=t[n];e.rrweb.createCbId(i)}}(t),t.socket.emit("start_cobrowse",{conversationId:e.conversationId}),t.socket.on("ice-candidate",(function(e){console.log("cobrowse >>> handlingIceCandidate ",e);new RTCIceCandidate(e.candidate);t.peer.addIceCandidate(e.candidate).catch((function(e){return console.log(e)}))})),t.socket.on("offer",(function(e){console.log("cobrowse >>> handlingOffer ",e);var i=new RTCSessionDescription(e.sdp);t.peer.setRemoteDescription(i).then((function(){})).then((function(){return t.peer.createAnswer()})).then((function(e){return t.peer.setLocalDescription(e)})).then((function(){var n={conversationId:e.caller,sdp:t.peer.localDescription};t.socket.emit("answer",n)})).catch((function(e){console.log(e)})),t.peer.ondatachannel=function(e){console.log("cobrowse >>> datachannel from source",e),null!==t.dataChannel&&(t.dataChannel.close(),t.dataChannel=null),null===t.dataChannel&&(t.dataChannel=e.channel,t.dataChannel.onmessage=function(e){!function(e){var i=JSON.parse(e.data);if("start_event_msg"===i.type)n="";else if("message"===i.type)i.data&&"undefined"!==i.data&&null!=z(i.data)&&(n+=i.data);else if("stop_event_msg"===i.type)try{if(n&&"undefined"!==n&&null!=z(n))!function(e){"target_mouse_move"===e.type?function(e){var n=e.x,r=e.y;t.imageMousePointer||t.createMousePointer();t.imageMousePointer.style.top=r+"px",t.imageMousePointer.style.left=n+"px",t.imageMousePointer.style.display="block"}(e):"target_key_up"!==e.type||"INPUT"!==e.tagName||"text"!==e.targetType&&"email"!==e.targetType?"target_key_down"!==e.type&&"target_key_up"!==e.type||"DIV"!==e.tagName?"target_mouse_click"===e.type?function(e){var t=e.cbId,n=document.querySelectorAll('[cb-id="'.concat(t,'"]'));n&&n.length>0&&r(n[0],"click",e)}(e):"target_mouse_over"===e.type?function(e){var t=e.cbId,n=document.querySelectorAll('[cb-id="'.concat(t,'"]'));n&&n.length>0&&r(n[0],"mouseover",e)}(e):"target_scroll"===e.type?function(e){var n=e.cbId;if(t.rrweb.scrollByAgent=!0,"fullDocument"===n)window.scrollTo(e.scrollLeft,e.scrollTop);else{var r=document.querySelectorAll('[cb-id="'.concat(n,'"]'));r&&r.length>0&&(console.log("scrolling",e.scrollLeft,e.scrollTop),r[0].scrollTo(e.scrollLeft,e.scrollTop))}setTimeout((function(){t.rrweb.scrollByAgent=!1}),500)}(e):"target_draw"===e.type?(t.createDrawingBoard(),t.clearCanvas(),t.agentDrawPaths=e.drawPaths,t.drawLines(e.drawPaths),t.drawLines(userDrawPaths)):"target_stop_draw"===e.type?(t.agentDrawPaths=[],t.clearCanvas(),t.drawAllLines(t.userDrawPaths),t.userDrawPaths.length<1&&t.removeCanvas()):"request_control"===e.type?function(e){var n=t,r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMCSURBVHgBxZjPaxNBFMffzG43oFCSo1gwMW3BUxPwR/HSBKwUT/XeYIX2asV/IO1/YC+CtFBLejdHaYXGW7ViVy8e2pL14k0SCoLdpDu+t/lhkmbNTDY/vpDsJHmb/fDezLz3hoGi8tOJsFPW50FjUyBYAgQEgeGLJKCIYwtHFjjOB7tczt4yc5bK/zNZw5M7s4sc4IlgCKEmUwixPn6490bGuCPQ8e0HCc75Fg7D4E8Wgq11AvMEOoolgsERI+0weA69lGAvz0rna3EzVwRZoO+xRNgwjLc4jEF/ZNm2nWw3v5gHzD74D1FXUE1AFKZRwzgaAExN5hlCNYaPN/5Kc2aAMKTY6Egg3fhF3UO0rBljWzAEOY6TnPj8PkfjuocQJg1DUnVbqYzpjbwDgw1Vq8JVhgoQemdF9k5jMiprqmRLWcC90jIHyf0mMHkTxjKvILSc6mgbWl5wbWWhKCX9vP/ohvZibHwRXTQnc9PFr0L1YSlyK/z58s0TJrSUgsLGDvzey4GsbCF+6KDxGczS0ips7vyDos8bGU+YwmYGVIRhm9IRJgyK8oLyA+NKiEQFSLoI8YaiYsgXTEVBvV5cdaHLnvIF4wJx8CvmMe5SerXs7MpLjXPGDZnHRFdQkUJGmVYZyGsC+4ISYGnPrkfjTLEQ84Kp7Uud9ilPHgYftZVrkbDsxvg/mF5A4W79mnNdz8reQKlDZmnT6qOQhZYWlPKZzljWXRcn92b3mZBrbwITUTg/PpUxVbLF+WNGD3fjlWXvwDZISvoBirYCxDpd6zvH6d2HeRheTWRFP+1GaFDfGLGMfApDEjWQtXEdiGpaanlhwGpts5tSh1YqrWIMTRicLO1qabXxiyagCPZHjPPHZAgDgMHiPhnJNbfUl5Jr5OCda9hnKNOFwWe1/tA227tQth3vx5yi/+RX7LYwpI4FQ7WB7EVHa9FKrjWEXlI6sKq2S0qJGD2Sw8t2zw6sWpWfnsMjvfI8tpszQF6rlMCNR3r4QogL8ZXr5WzkQO1I7y91mFsdhEgKrAAAAABJRU5ErkJggg==",i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMfSURBVHgBxZg/TBNRHMe/v1cQCTGpCerg4AHGlEXEwZWDiDLS4GBjohJjIokJRF2IA7Az2NGpEmM6GRwN/isxDsACLt6kNyhBoqYJktIW7vl+154tWuiV67Xfpb+7+11/n7zfu997v0eoUKGYrlFTw6Ak6gJIJ2kFlR3kZyRl0hJkKssUljUvafuFEUmYlfw/uXUMPeu/CYEbytRRgSRhmXYQNa69euLGvyxQ6OlFHQ0UU6YGbzJhYaoc2J5AWkwPNjcfmpBSjqGKIqJHqVRmyhxOJEs+L3UzFNc1SY2zJHEO/sgEsr2l5heVggEa38F7ig4EJYovOE01grHDcRZyMfcA4jlTIxhbPCXyMQv3HCP/WcdQF0mVutcJtgojJDCBuoliBQzkR6eGqSohLc+QA1LVdBT1Vm4VgODPnMi3eoOTLSewODSLULC9nKve+bzvlCDZMAifxDAzfdN48/UDjOTn8i+kRVhYAj3wQQ7M0voKxhemXb3DOwgBizRUWQeByUsXAlJDFeUBRi28CApnc7WfjjS24MLxs+XcPMGwpFRAbhw7j562A4Xb+uEXjKPAsaH2MTVWh/dz+rb53V5jxs+PYCPzGys/DV9gVMqSgdYrHXeUXTZti+sfbah7Xbfs6yV1XQzDoLfnH8KL1ObNCLQOdXTDZWFkKA58Pw+1qkbOgbn+9gEyVhZeJEELnDJNoQ24fYnTtbq5Zqcv3H4ZP1K/bJiN7Ca8Skj5WKXszJpiq2jfzFWXoZoCh3D3/WRVYGxRw4i9HwrF+3mXqKOOUvNn+dPVuW7ns59BnaW6myj/FnaM8UtfUOWq7V5kGpG5NraKCqM1jLpJTjnWXyDe06o+PYoaSy0XUSNS6GZ3LR2p9M6kclhGzURmOp2dLL6zC4jbW6JAmB1RAxgVvvfflvq/xdWIvLQd/YTiExGOkYu1WyVXe3bc2sp0+zGneM6kU9mSMKzyxzFxbk9owntJ4BG3hp2GcE8vuBSDqeI1qipqhR2KTKgwM8VfUlWACmADGsntQZXsHsuCJkDq0AD5Iz0kla0mqaVKCK0c5EjvD7WHTOQEQMMGAAAAAElFTkSuQmCC",o=null==e?void 0:e.firstName,a='\n <div class="initial-video-audio-container" do-not-mutate="true">\n <div class="ad-img-block">\n <img src="'.concat(n.agentProfileIcon,'" />\n </div>\n <div class="content-desc">\n <div class="name">').concat(o,'</div>\n <div class="type-text">').concat(e.confirmMessage,'</div>\n </div>\n <div class="controls-v-a">\n <img id="rejectcall" src="').concat(r,'"/>\n <img id="acceptcall" src= "').concat(i,'"/>\n </div>\n </div>'),s=document.getElementById("toast");s||((s=document.createElement("div")).id="toast",document.body.appendChild(s));s.innerHTML=a;var u=document.getElementById("rejectcall"),l=document.getElementById("acceptcall");u.onclick=function(e){s.innerHTML="",t.requestAccepted=!1,t.releasebtnimg&&(t.releasebtnimg.src=t.noControlImage);var n={type:"request_control",response:"rejected"};t.sendDCMessage(JSON.stringify(n))},l.onclick=function(e){t.requestAccepted=!0,t.releasebtnimg&&(t.releasebtnimg.src=t.releaseControlImage),s.innerHTML="";var n={type:"request_control",response:"accepted"};t.createMousePointer(),t.sendDCMessage(JSON.stringify(n))}}(e.data):"release_control"===e.type&&(t.requestAccepted=!1,t.releasebtnimg&&(t.releasebtnimg.src=t.noControlImage),t.userDrawPaths.length<1&&t.removeCanvas()):function(e){var t=this,n=e.cbId,r=document.querySelectorAll('[cb-id="'.concat(n,'"]'));if(r&&r.length>0){if(!(e.which>=0&&e.which<=46))return r[0].setAttribute("do-not-mutate","true"),r[0].textContent=e.textContent,void setTimeout((function(){r[0].removeAttribute("do-not-mutate")}),200);if([8,9,8,13,46].includes(e.which)){if(13!==e.which)return r[0].setAttribute("do-not-mutate","true"),void(r[0].textContent=e.textContent);r[0].removeAttribute("do-not-mutate"),setTimeout((function(){var n=new KeyboardEvent("keydown",{bubbles:!0,cancelBubble:!1,cancelable:!0,charCode:e.charCode,code:e.code,composed:!0,ctrlKey:e.ctrlKey,currentTarget:null,isTrusted:!0,key:e.key,keyCode:e.keyCode,shiftKey:e.shiftKey,altKey:e.altKey,type:"keydown",which:e.which});r[0].dispatchEvent(n);var i={type:"enterkey_dispatched"};t.sendDCMessage(JSON.stringify(i))}),100)}}}(e):function(e){var t=e.cbId,n=e.value,r=document.querySelectorAll('[cb-id="'.concat(t,'"]'));r&&r.length>0&&(r[0].value=n)}(e)}(JSON.parse(n))}catch(e){console.log("error msg",e,n)}else"fullsnapshot"===i.type?(console.log("taking fullsnapshot"),t.ACKrrweb.record.takeFullSnapshot(!0)):"set_request_control"===i.type&&(t.requestAccepted=i.data,t.releasebtnimg&&(!0===i.data?t.releasebtnimg.src=t.releaseControlImage:t.releasebtnimg.src=t.noControlImage),t.createMousePointer())}(e)},t.dataChannel.onclose=function(){t.peer&&"connected"===t.peer.connectionState&&(console.log("cobrowse >>> stopping peer connection"),t.peer.close(),t.peer=null),t.stopCoBrowse(!1,!1)},t.dataChannel.onopen=function(){console.log("cobrowse >>> start recording"),t.stopFn=t.rrweb.record(O({emit:function(e){!function(e){var n=16384,r={type:"start_event_msg"},i={type:"stop_event_msg"};t.sendDCMessage(JSON.stringify(r));var o=JSON.stringify(e);if(o.length>n){for(var a=Math.floor(o.length/n),s=o.length%n,u=0;u<a;u++){var l=o.substring(u*n,u*n+n);t.sendDCMessage(JSON.stringify({type:"message",data:l}))}if(s>0){l=o.substring(o.length-s,o.length);t.sendDCMessage(JSON.stringify({type:"message",data:l}))}}else t.sendDCMessage(JSON.stringify({type:"message",data:o}));t.sendDCMessage(JSON.stringify(i))}(e)},collectFonts:!0,userTriggeredOnInput:!0,maskTextClass:"rr-mask"},"collectFonts",!0))})}})),t.socket.on("stop_cobrowse",t.stopCoBrowse),t.peer=function(){try{return new RTCPeerConnection({iceServers:[{urls:["stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun.l.google.com:19302?transport=udp"]}]})}catch(e){return new RTCPeerConnection}}(),t.peer.onicecandidate=function(n){if(n.candidate){var r={conversationId:e.conversationId,candidate:n.candidate};console.log("cobrowse >>> emitting ice-candidate",r),t.socket.emit("ice-candidate",r)}};var o={HTMLEvents:/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,MouseEvents:/^(?:click|dblclick|mouse(?:down|up|over|move|out))$/},a={pointerX:0,pointerY:0,button:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,bubbles:!0,cancelable:!0}}i.requestAccepted=!1,i.releasebtnimg&&(i.releasebtnimg.src=i.noControlImage),console.log("cobrowse >>> cobrowseRequest",e),e.userId||(e.userId=t.koreGenerateUUID()),null===i.socket?i.socket=io(e.cobrowseUrl+"/cobrowse",{query:{userId:i.authResponse.userInfo.userId,authToken:i.authResponse.authorization.accessToken,accountId:i.authResponse.userInfo.accountId},path:"/agentassist/api/v1/chat",transports:["websocket","polling","flashsocket"]}):r(t),i.socket.on("connect",(function(){r(t)}))})),O(this,"autoStartCobrowse",(function(){var e=this;if(this.authResponse&&this.authResponse.userInfo){console.log("cobrowse >>> starting cobrowse");var t=localStorage.getItem("cobrowseRequest");console.log(t),this.socket&&this.socket.connected&&(this.socket.disconnect(),this.socket=null),t&&setTimeout((function(){e.cobrowseInitialize(JSON.parse(t))}),500),document.body.addEventListener("focus",e.focusHandler,!0),document.body.onfocusin=e.focusHandler}})),O(this,"terminateCobrowse",(function(){this.stopCoBrowse()})),O(this,"focusHandler",(function(e){this.vonbtnimg&&(document.activeElement.classList.contains("rr-block")?this.vonbtnimg.src=visibilityOnImage:this.vonbtnimg.src=visibilityOffImage)})),O(this,"cobrowseMaskFields",(function(e){console.log("cobrowse >>> koreCoBrowseMakingFields initialize");for(var t=0;t<e.blockClasses.length>0;t++){if(""===e.blockClasses[t])return!1;document.querySelectorAll("."+e.blockClasses[t]).forEach((function(e){e.classList.add("rr-block")}))}})),O(this,"scanElement",(function(e,t){var n=e.childNodes;if(n&&0!==n.length){console.log("children===",n);for(var r=0;r<n.length;r++){var o="",a=n[r];if("TEXTAREA"===a.nodeName||"INPUT"===a.nodeName?o=a.value:a&&a.childNodes&&a.childNodes.length?o=a.childNodes[0].data:a&&a.childNodes&&0===a.childNodes.length&&(o=a.data),o){console.log("value>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",o);for(var s=0;s<t.length;s++){var u,l=i.strToRegEx(t[s]),c=o.match(l);if(console.log(c),c&&c.length>0)"TEXTAREA"===a.nodeName||"INPUT"===a.nodeName?a.classList.add("rr-block"):a&&0===(null===(u=a.childNodes)||void 0===u?void 0:u.length)?a.parentElement.classList.add("rr-mask"):a.classList.add("rr-mask")}}i.scanElement(a,t)}}})),O(this,"strToRegEx",(function(e){var t=e.indexOf("/");-1!=t&&(e=e.substr(t+1));var n=e.lastIndexOf("/");return-1!=n&&(e=e.substr(0,n)),new RegExp(e)})),O(this,"koreCoBrowseInit",(function(e){var t=this;e.agentclient=t.AgentDesktop,e.initialize=t.cobrowseInitialize,Object.defineProperty(e,"__esModule",{value:!0}),console.log("cobrowse >>> koreCoBrowse initialize");var n=document.getElementsByTagName("BODY")[0];return n&&"loaded"===n.readyState?t.autoStartCobrowse():window.addEventListener?window.addEventListener("load",t.autoStartCobrowse,!1):window.attachEvent("onload",t.autoStartCobrowse),e})),O(this,"rrwebInit",(function(e){var t,n=this,r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};function i(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}function s(e){return e.nodeType===e.ELEMENT_NODE}function u(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}function l(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,i=e.value,o=e.maskInputFn,a=i||"";return(t[n.toLowerCase()]||t[r])&&(a=o?o(a):"*".repeat(a.length)),a}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(t||(t={}));var c=1,d=RegExp("[^a-z0-9-_:]"),h=-2;function f(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(m).join(""):null}catch(e){return null}}function m(e){return function(e){return"styleSheet"in e}(e)?f(e.styleSheet)||"":e.cssText}var p=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,g=/^(data:)([^,]*),(.*)/i;function y(e,t){return(e||"").replace(p,(function(e,n,r,i,o,a){var s,u=r||o||a,l=n||i||"";if(!u)return e;if(!_.test(u))return"url("+l+u+l+")";if(g.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");c.pop();for(var h=0,f=d;h<f.length;h++){var m=f[h];"."!==m&&(".."===m?c.pop():c.push(m))}return"url("+l+c.join("/")+l+")"}))}var v=/^[^ \t\n\r\u000c]+/,M=/^[, \t\n\r\u000c]+/;function T(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,_t(n),n.href}function b(){var e=document.createElement("a");return e.href="",_t(e),e.href}function w(e,t,n,r){return"src"===n||("href"===n||"xlink:href"===n)&&r?T(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(M),!(n>=t.length);){var o=r(v);if(","===o.slice(-1))o=T(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=T(e,o);for(var s=!1;;){var u=t.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n&&r?y(r,b()):r:T(e,r)}function D(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!(!n||!e.matches(n))||D(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,D(e.parentNode,t,n)}function L(e,n){var r,i,o=n.doc,a=n.blockClass,s=n.blockSelector,u=n.maskTextClass,c=n.maskTextSelector,h=n.inlineStylesheet,m=n.maskInputOptions,p=void 0===m?{}:m,_=n.maskTextFn,g=n.maskInputFn,v=n.recordCanvas,M=n.keepIframeSrcFn;if(o.__sn){var T=o.__sn.id;r=1===T?void 0:T}switch(e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[],rootId:r};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:r};case e.ELEMENT_NODE:if(e.getAttribute&&"true"===e.getAttribute("do-not-mutate"))return console.log("got do-not-mutate",e),!1;for(var L=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var i=e.classList[r];if(t.test(i))return!0}return!!n&&e.matches(n)}(e,a,s),S=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return d.test(t)?"div":t}(e),k={},A=0,E=Array.from(e.attributes);A<E.length;A++){var I=E[A],N=I.name,x=I.value;k[N]=w(o,S,N,x)}if("link"===S&&h){var C,j=Array.from(o.styleSheets).find((function(t){return t.href===e.href}));(C=f(j))&&(delete k.rel,delete k.href,k._cssText=y(C,j.href))}if("style"===S&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(C=f(e.sheet))&&(k._cssText=y(C,b()));if("input"===S||"textarea"===S||"select"===S){x=e.value;"text"===k.type&&console.log("text"),"radio"!==k.type&&"checkbox"!==k.type&&"submit"!==k.type&&"button"!==k.type&&x?k.value=l({type:k.type,tagName:S,value:x,maskInputOptions:p,maskInputFn:g}):e.checked&&(k.checked=e.checked)}if("option"===S&&(e.selected?k.selected=!0:delete k.selected),"canvas"===S&&v&&(k.rr_dataURL=e.toDataURL()),"audio"!==S&&"video"!==S||(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop),L){var Y=e.getBoundingClientRect(),O=Y.width,R=Y.height;k={class:k.class,rr_width:O+"px",rr_height:R+"px"}}return"iframe"!==S||M(k.src)||delete k.src,{type:t.Element,tagName:S,attributes:k,childNodes:[],isSVG:(i=e,"svg"===i.tagName||i instanceof SVGElement||void 0),needBlock:L,rootId:r};case e.TEXT_NODE:var z=e.parentNode&&e.parentNode.tagName,P=e.textContent,H="STYLE"===z||void 0,U="SCRIPT"===z||void 0;return H&&P&&(P=y(P,b())),U&&(P="SCRIPT_PLACEHOLDER"),!H&&!U&&D(e,u,c)&&P&&(P=_?_(P):P.replace(/[\S]/g,"*")),{type:t.Text,textContent:P||"",isStyle:H,rootId:r};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:"",rootId:r};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||"",rootId:r};default:return!1}}function S(e){return void 0===e?"":e.toLowerCase()}function k(e,n){var r,i=n.doc,o=n.map,a=n.blockClass,l=n.blockSelector,d=n.maskTextClass,f=n.maskTextSelector,m=n.skipChild,p=void 0!==m&&m,_=n.inlineStylesheet,g=void 0===_||_,y=n.maskInputOptions,v=void 0===y?{}:y,M=n.maskTextFn,T=n.maskInputFn,b=n.slimDOMOptions,w=n.recordCanvas,D=void 0!==w&&w,A=n.onSerialize,E=n.onIframeLoad,I=n.iframeLoadTimeout,N=void 0===I?5e3:I,x=n.keepIframeSrcFn,C=void 0===x?function(){return!1}:x,j=n.preserveWhiteSpace,Y=void 0===j||j,O=L(e,{doc:i,blockClass:a,blockSelector:l,maskTextClass:d,maskTextSelector:f,inlineStylesheet:g,maskInputOptions:v,maskTextFn:M,maskInputFn:T,recordCanvas:D,keepIframeSrcFn:C});if(!O)return null;r="__sn"in e?e.__sn.id:!function(e,n){if(n.comment&&e.type===t.Comment)return!0;if(e.type===t.Element){if(n.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(n.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(S(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===S(e.attributes.name)||"icon"===S(e.attributes.rel)||"apple-touch-icon"===S(e.attributes.rel)||"shortcut icon"===S(e.attributes.rel))))return!0;if("meta"===e.tagName){if(n.headMetaDescKeywords&&S(e.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(S(e.attributes.property).match(/^(og|twitter|fb):/)||S(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===S(e.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===S(e.attributes.name)||"googlebot"===S(e.attributes.name)||"bingbot"===S(e.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===S(e.attributes.name)||"generator"===S(e.attributes.name)||"framework"===S(e.attributes.name)||"publisher"===S(e.attributes.name)||"progid"===S(e.attributes.name)||S(e.attributes.property).match(/^article:/)||S(e.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===S(e.attributes.name)||"yandex-verification"===S(e.attributes.name)||"csrf-token"===S(e.attributes.name)||"p:domain_verify"===S(e.attributes.name)||"verify-v1"===S(e.attributes.name)||"verification"===S(e.attributes.name)||"shopify-checkout-api-token"===S(e.attributes.name)))return!0}}return!1}(O,b)&&(Y||O.type!==t.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?c++:h;var R=Object.assign(O,{id:r});if(e.__sn=R,r===h)return null;o[r]=e,A&&A(e);var z=!p;if(R.type===t.Element&&(z=z&&!R.needBlock,delete R.needBlock),(R.type===t.Document||R.type===t.Element)&&z){b.headWhitespace&&O.type===t.Element&&"head"===O.tagName&&(Y=!1);for(var P={doc:i,map:o,blockClass:a,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:p,inlineStylesheet:g,maskInputOptions:v,maskTextFn:M,maskInputFn:T,slimDOMOptions:b,recordCanvas:D,preserveWhiteSpace:Y,onSerialize:A,onIframeLoad:E,iframeLoadTimeout:N,keepIframeSrcFn:C},H=0,U=Array.from(e.childNodes);H<U.length;H++){(Q=k(U[H],P))&&R.childNodes.push(Q)}if(s(e)&&e.shadowRoot){R.isShadowHost=!0;for(var F=0,W=Array.from(e.shadowRoot.childNodes);F<W.length;F++){var Q;(Q=k(W[F],P))&&(Q.isShadow=!0,R.childNodes.push(Q))}}}return e.parentNode&&u(e.parentNode)&&(R.isShadow=!0),R.type===t.Element&&"iframe"===R.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(e){return}if("complete"===i){var a="about:blank";r.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&E){var n=k(t,{doc:t,map:o,blockClass:a,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:g,maskInputOptions:v,maskTextFn:M,maskInputFn:T,slimDOMOptions:b,recordCanvas:D,preserveWhiteSpace:Y,onSerialize:A,onIframeLoad:E,iframeLoadTimeout:N,keepIframeSrcFn:C});n&&E(e,n)}}),N),R}var A=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function E(e,t){void 0===t&&(t={});var n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new a(e),f(),t}}var a=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};a.prototype.content=e;var s=[];function u(i){var o=new Error(t.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;s.push(o)}function l(){return h(/^{\s*/)}function c(){return h(/^}/)}function d(){var t,n=[];for(f(),m(n);e.length&&"}"!==e.charAt(0)&&(t=L()||S());)!1!==t&&(n.push(t),m(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function f(){h(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=p();)!1!==t&&e.push(t),t=p();return e}function p(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function _(){var e=h(/^([^{]+)/);if(e)return I(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=o(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=I(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(A,""),value:r?I(r[0]).replace(A,""):""});return h(/^[;\s]*/),i}}function y(){var e,t=[];if(!l())return u("missing '{'");for(m(t);e=g();)!1!==e&&(t.push(e),m(t)),e=g();return c()?t:u("missing '}'")}function v(){for(var e,t=[],n=o();e=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),h(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:y()})}var M,T=D("import"),b=D("charset"),w=D("namespace");function D(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=o(),r=h(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function L(){if("@"===e[0])return function(){var e=o(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return u("@keyframes missing name");var r,i=t[1];if(!l())return u("@keyframes missing '{'");for(var a=m();r=v();)a.push(r),a=a.concat(m());return c()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=o(),t=h(/^@media *([^{]+)/);if(t){var n=I(t[1]);if(!l())return u("@media missing '{'");var r=m().concat(d());return c()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=o(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:I(t[1]),media:I(t[2])})}()||function(){var e=o(),t=h(/^@supports *([^{]+)/);if(t){var n=I(t[1]);if(!l())return u("@supports missing '{'");var r=m().concat(d());return c()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||T()||b()||w()||function(){var e=o(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=I(t[1]),r=I(t[2]);if(!l())return u("@document missing '{'");var i=m().concat(d());return c()?e({type:"document",document:r,vendor:n,rules:i}):u("@document missing '}'")}}()||function(){var e=o();if(h(/^@page */)){var t=_()||[];if(!l())return u("@page missing '{'");for(var n,r=m();n=g();)r.push(n),r=r.concat(m());return c()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=o();if(h(/^@host\s*/)){if(!l())return u("@host missing '{'");var t=m().concat(d());return c()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=o();if(h(/^@font-face\s*/)){if(!l())return u("@font-face missing '{'");for(var t,n=m();t=g();)n.push(t),n=n.concat(m());return c()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function S(){var e=o(),t=_();return t?(m(),e({type:"rule",selectors:t,declarations:y()})):u("selector missing")}return N((M=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:M,parsingErrors:s}}))}function I(e){return e?e.replace(/^\s+|\s+$/g,""):""}function N(e,t){for(var n=e&&"string"==typeof e.type,r=n?e:t,i=0,o=Object.keys(e);i<o.length;i++){var a=e[o[i]];Array.isArray(a)?a.forEach((function(e){N(e,r)})):a&&"object"===z(a)&&N(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var x={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var C,j,Y,O,R,P=/([^\\]):hover/,H=new RegExp(P,"g");function U(e,t){var n=null==t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var r=E(e,{silent:!0});if(!r.stylesheet)return e;var i=[];if(r.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){P.test(e)&&i.push(e)}))})),0===i.length)return e;var o=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),a=e.replace(o,(function(e){var t=e.replace(H,"$1.\\:hover");return e+", "+t}));return null==t||t.stylesWithHoverClass.set(e,a),a}function F(){return{stylesWithHoverClass:new Map}}function W(e,n){var r=n.doc,i=n.hackCss,o=n.cache;switch(e.type){case t.Document:return r.implementation.createDocument(null,"",null);case t.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var a,s=function(e){var t=x[e.tagName]?x[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);_t(a=e.isSVG?r.createElementNS("http://www.w3.org/2000/svg",s):r.createElement(s));var u=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var n=e.attributes[t];if("option"===s&&"selected"===t&&!1===n)return"continue";if(n="boolean"==typeof n||"number"==typeof n?"":n,t.startsWith("rr_")){if("canvas"===s&&"rr_dataURL"===t){var u=document.createElement("img");u.src=n,u.onload=function(){var e=a.getContext("2d");e&&e.drawImage(u,0,0,u.width,u.height)},_t(u)}if("rr_width"===t&&(a.style.width=n),"rr_height"===t&&(a.style.height=n),"rr_mediaCurrentTime"===t&&(a.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(n){case"played":a.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":a.pause()}}else{var l="textarea"===s&&"value"===t,c="style"===s&&"_cssText"===t;if(c&&i&&(n=U(n,o)),l||c){for(var d=r.createTextNode(n),h=0,f=Array.from(a.childNodes);h<f.length;h++){var m=f[h];m.nodeType===a.TEXT_NODE&&a.removeChild(m)}return a.appendChild(d),"continue"}try{if(e.isSVG&&"xlink:href"===t)a.setAttributeNS("http://www.w3.org/1999/xlink",t,n);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))a.setAttribute("_"+t,n);else{if("meta"===s&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===t)return a.setAttribute("csp-content",n),"continue";"link"===s&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===s&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||a.setAttribute(t,n)}}catch(e){}}};for(var l in e.attributes)u(l);if(e.isShadowHost)if(a.shadowRoot)for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);else a.attachShadow({mode:"open"});return a;case t.Text:return r.createTextNode(e.isStyle&&i?U(e.textContent,o):e.textContent);case t.CDATA:return r.createCDATASection(e.textContent);case t.Comment:return r.createComment(e.textContent);default:return null}}function Q(e,n){var r=n.doc,i=n.map,o=n.skipChild,a=void 0!==o&&o,u=n.hackCss,l=void 0===u||u,c=n.afterAppend,d=n.cache,h=W(e,{doc:r,hackCss:l,cache:d});if(!h)return null;if(e.rootId&&console.assert(i[e.rootId]===r,"Target document should has the same root id."),e.type===t.Document&&(r.close(),r.open(),h=r),h.__sn=e,i[e.id]=h,(e.type===t.Document||e.type===t.Element)&&!a)for(var f=0,m=e.childNodes;f<m.length;f++){var p=m[f],_=Q(p,{doc:r,map:i,skipChild:!1,hackCss:l,afterAppend:c,cache:d});_?(p.isShadow&&s(h)&&h.shadowRoot?h.shadowRoot.appendChild(_):h.appendChild(_),c&&c(_)):console.warn("Failed to rebuild",p)}return h}function B(e,n){var r=n.doc,i=n.onVisit,o=n.hackCss,a={},s=Q(e,{doc:r,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:n.afterAppend,cache:n.cache});return function(e,t){for(var n in e)e[n]&&(r=e[n],t(r));var r}(a,(function(e){i&&i(e),function(e){var n=e.__sn;if(n.type===t.Element){var r=e;for(var i in n.attributes)if(n.attributes.hasOwnProperty(i)&&i.startsWith("rr_")){var o=n.attributes[i];"rr_scrollLeft"===i&&(r.scrollLeft=o),"rr_scrollTop"===i&&(r.scrollTop=o)}}}(e)})),[s,a]}function q(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}function V(){return{map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}}}e.EventType=void 0,(C=e.EventType||(e.EventType={}))[C.DomContentLoaded=0]="DomContentLoaded",C[C.Load=1]="Load",C[C.FullSnapshot=2]="FullSnapshot",C[C.IncrementalSnapshot=3]="IncrementalSnapshot",C[C.Meta=4]="Meta",C[C.Custom=5]="Custom",C[C.Plugin=6]="Plugin",e.IncrementalSource=void 0,(j=e.IncrementalSource||(e.IncrementalSource={}))[j.Mutation=0]="Mutation",j[j.MouseMove=1]="MouseMove",j[j.MouseInteraction=2]="MouseInteraction",j[j.Scroll=3]="Scroll",j[j.ViewportResize=4]="ViewportResize",j[j.Input=5]="Input",j[j.TouchMove=6]="TouchMove",j[j.MediaInteraction=7]="MediaInteraction",j[j.StyleSheetRule=8]="StyleSheetRule",j[j.CanvasMutation=9]="CanvasMutation",j[j.Font=10]="Font",j[j.Log=11]="Log",j[j.Drag=12]="Drag",j[j.StyleDeclaration=13]="StyleDeclaration",e.MouseInteractions=void 0,(Y=e.MouseInteractions||(e.MouseInteractions={}))[Y.MouseUp=0]="MouseUp",Y[Y.MouseDown=1]="MouseDown",Y[Y.Click=2]="Click",Y[Y.ContextMenu=3]="ContextMenu",Y[Y.DblClick=4]="DblClick",Y[Y.Focus=5]="Focus",Y[Y.Blur=6]="Blur",Y[Y.TouchStart=7]="TouchStart",Y[Y.TouchMove_Departed=8]="TouchMove_Departed",Y[Y.TouchEnd=9]="TouchEnd",Y[Y.TouchCancel=10]="TouchCancel",function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(O||(O={})),e.ReplayerEvents=void 0,(R=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",R.Pause="pause",R.Resume="resume",R.Resize="resize",R.Finish="finish",R.FullsnapshotRebuilded="fullsnapshot-rebuilded",R.LoadStylesheetStart="load-stylesheet-start",R.LoadStylesheetEnd="load-stylesheet-end",R.SkipStart="skip-start",R.SkipEnd="skip-end",R.MouseInteraction="mouse-interaction",R.EventCast="event-cast",R.CustomEvent="custom-event",R.Flush="flush",R.StateChange="state-change",R.PlayBack="play-back";var G="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";function J(e,t,n){void 0===n&&(n={});var r=null,i=0;return function(o){var a=Date.now();i||!1!==n.leading||(i=a);var s=t-(a-i),u=this,l=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),i=a,e.apply(u,l)):r||!1===n.trailing||(r=window.setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(u,l)}),s))}}function Z(e,t,n,r,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),o&&o.set&&o.set.call(this,e)}}),function(){return Z(e,t,o||{},!0)}}function K(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(e){return function(){}}}function X(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function $(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ee(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach((function(e){t.test(e)&&(n=!0)})),n||ee(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,ee(e.parentNode,t)}function te(e){return"__sn"in e&&e.__sn.id===h}function ne(e,t){if(u(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||ne(e.parentNode,t))}function re(e){return Boolean(e.changedTouches)}function ie(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}e.mirror={map:{},getId:function(){return console.error(G),-1},getNode:function(){return console.error(G),null},removeNodeFromMap:function(){console.error(G)},has:function(){return console.error(G),!1},reset:function(){console.error(G)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(e.mirror=new Proxy(e.mirror,{get:function(e,t,n){return"map"===t&&console.error(G),Reflect.get(e,t,n)}}));var oe=function(){function t(){this.reset()}return t.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},t.prototype.remove=function(e,t){var n=this,r=this.indexes.get(e.parentId),i=this.indexes.get(e.id),o=function t(r){n.removeIdSet.add(r.id),Object.values(r.children).forEach((function(e){return t(e)}));var i=n.indexes.get(r.id);if(i){var o=i.parent;o&&(delete i.parent,delete o.children[i.id],n.indexes.delete(e.id))}};i?r?(delete i.parent,delete r.children[i.id],this.indexes.delete(e.id),o(i)):(delete this.tree[i.id],this.indexes.delete(i.id),o(i)):(this.removeNodeMutations.push(e),function e(r){n.removeIdSet.add(r);var i=t.getNode(r);null==i||i.childNodes.forEach((function(t){"__sn"in t&&e(t.__sn.id)}))}(e.id))},t.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},t.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},t.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},t.prototype.input=function(e){this.inputMap.set(e.id,e)},t.prototype.flush=function(){var t,n,r,o,a=this,s=this,u=s.tree,l=s.removeNodeMutations,c=s.textMutations,d=s.attributeMutations,h={source:e.IncrementalSource.Mutation,removes:l,texts:c,attributes:d,adds:[]},f=function e(t,n){n&&a.removeIdSet.add(t.id),h.texts=h.texts.concat(n?[]:t.texts).filter((function(e){return!a.removeIdSet.has(e.id)})),h.attributes=h.attributes.concat(n?[]:t.attributes).filter((function(e){return!a.removeIdSet.has(e.id)})),a.removeIdSet.has(t.id)||a.removeIdSet.has(t.mutation.parentId)||n?Object.values(t.children).forEach((function(t){return e(t,!0)})):(h.adds.push(t.mutation),t.children&&Object.values(t.children).forEach((function(t){return e(t,!1)})))};Object.values(u).forEach((function(e){return f(e,!1)}));try{for(var m=i(this.scrollMap.keys()),p=m.next();!p.done;p=m.next()){var _=p.value;this.removeIdSet.has(_)&&this.scrollMap.delete(_)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var g=i(this.inputMap.keys()),y=g.next();!y.done;y=g.next()){_=y.value;this.removeIdSet.has(_)&&this.inputMap.delete(_)}}catch(e){r={error:e}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}var v=new Map(this.scrollMap),M=new Map(this.inputMap);return this.reset(),{mutationData:h,scrollMap:v,inputMap:M}},t.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},t.prototype.idRemoved=function(e){return this.removeIdSet.has(e)},t}();function ae(e){var t,n,r={},o=function(e,t){var n={value:e,parent:t,children:[]};return r[e.node.id]=n,n},a=[];try{for(var s=i(e),u=s.next();!u.done;u=s.next()){var l=u.value,c=l.nextId,d=l.parentId;if(c&&c in r){var h=r[c];if(h.parent){var f=h.parent.children.indexOf(h);h.parent.children.splice(f,0,o(l,h.parent))}else{f=a.indexOf(h);a.splice(f,0,o(l,null))}}else if(d in r){var m=r[d];m.children.push(o(l,m))}else a.push(o(l,null))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}function se(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)se(e.children[n],t)}function ue(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function le(e,t){var n,r,i=null===(r=null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),a=le(i,t),s=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function ce(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}var de=Object.freeze({__proto__:null,on:q,createMirror:V,get _mirror(){return e.mirror},throttle:J,hookSetter:Z,patch:K,getWindowHeight:X,getWindowWidth:$,isBlocked:ee,isIgnored:te,isAncestorRemoved:ne,isTouchEvent:re,polyfill:ie,TreeIndex:oe,queueToResolveTrees:ae,iterateResolveTree:se,isIframeINode:ue,getBaseDimension:le,hasShadowRoot:ce});function he(e){return"__ln"in e}var fe=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&he(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&he(e.nextSibling)&&e.nextSibling.__ln.previous){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),me=function(e,t){return e+"@"+t};function pe(e){return"__sn"in e}var _e=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,n,r,o;if(!e.frozen&&!e.locked){for(var a=[],s=new fe,l=function(t){for(var n=t,r=h;r===h;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return-1===r&&ee(t.nextSibling,e.blockClass)&&(r=null),r},c=function(t){var n,r=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,i=!(e.doc.contains(t)||r instanceof Node&&e.doc.contains(r));if(t.parentNode&&!i){var o=u(t.parentNode)?e.mirror.getId(r):e.mirror.getId(t.parentNode),c=l(t);if(-1===o||-1===c)return s.addNode(t);var d=k(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,onSerialize:function(n){ue(n)&&e.iframeManager.addIframe(n),ce(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n)}});d&&a.push({parentId:o,nextId:c,node:d})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var d=i(e.movedSet),f=d.next();!f.done;f=d.next()){var m=f.value;ye(e.removes,m,e.mirror)&&!e.movedSet.has(m.parentNode)||c(m)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}try{for(var p=i(e.addedSet),_=p.next();!_.done;_=p.next()){m=_.value;ve(e.droppedSet,m)||ye(e.removes,m,e.mirror)?ve(e.movedSet,m)?c(m):e.droppedSet.add(m):c(m)}}catch(e){r={error:e}}finally{try{_&&!_.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}for(var g=null;s.length;){var y=null;if(g){var v=e.mirror.getId(g.value.parentNode),M=l(g.value);-1!==v&&-1!==M&&(y=g)}if(!y)for(var T=s.length-1;T>=0;T--){var b=s.get(T);if(b){v=e.mirror.getId(b.value.parentNode),M=l(b.value);if(-1!==v&&-1!==M){y=b;break}}}if(!y){for(;s.head;)s.removeNode(s.head.value);break}g=y.previous,s.removeNode(y.value),c(y.value)}var w={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:a};(w.texts.length||w.attributes.length||w.removes.length||w.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(w))}},this.processMutation=function(t){if(!te(t.target))switch(t.type){case"characterData":var n=t.target.textContent;ee(t.target,e.blockClass)||n===t.oldValue||e.texts.push({value:D(t.target,e.maskTextClass,e.maskTextSelector)&&n?e.maskTextFn?e.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break;case"attributes":var r=t.target;n=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=l({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:e.maskInputFn})),ee(t.target,e.blockClass)||n===t.oldValue)return;var i=e.attributes.find((function(e){return e.node===t.target}));if(i||(i={node:t.target,attributes:{}},e.attributes.push(i)),"style"===t.attributeName){var o=e.doc.createElement("span");_t(o),t.oldValue&&o.setAttribute("style",t.oldValue),void 0!==i.attributes.style&&null!==i.attributes.style||(i.attributes.style={});for(var a=i.attributes.style,s=0;s<r.style.length;s++){var c=r.style[s],d=r.style.getPropertyValue(c),h=r.style.getPropertyPriority(c);d==o.style.getPropertyValue(c)&&h==o.style.getPropertyPriority(c)||(a[c]=""==h?d:[d,h])}for(s=0;s<o.style.length;s++){c=o.style[s];""!==r.style.getPropertyValue(c)&&r.style.getPropertyValue(c)||(a[c]=!1)}}else i.attributes[t.attributeName]=w(e.doc,t.target.tagName,t.attributeName,n);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),i=u(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);ee(n,e.blockClass)||ee(t.target,e.blockClass)||te(n)||(e.addedSet.has(n)?(ge(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||ne(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[me(r,i)]?ge(e.movedSet,n):e.removes.push({parentId:i,id:r,isShadow:!!u(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,r){for(var i=0;i<n.maskClassList.length>0;i++)if(""!==n.maskClassList[i]){if(t&&t.classList&&t.classList.contains(n.maskClassList[i]))return t.classList.add("rr-block"),void xe(!1);if(r&&r.classList&&r.classList.contains(n.maskClassList[i]))return r.classList.add("rr-block"),void xe(!1)}if(n.maskPatternList&&n.scanElement(t,n.maskPatternList),!(t&&t.getAttribute&&"true"===t.getAttribute("do-not-mutate")||r&&r.getAttribute&&"true"===r.getAttribute("do-not-mutate")||ee(t,e.blockClass)||r&&ee(r,e.blockClass))){if(pe(t)){if(te(t))return;e.movedSet.add(t);var o=null;r&&pe(r)&&(o=r.__sn.id),o&&(e.movedMap[me(t.__sn.id,o)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,r,i,o,a,s,u,l,c,d,h,f,m){this.blockClass=t,this.blockSelector=n,this.maskTextClass=r,this.maskTextSelector=i,this.inlineStylesheet=o,this.maskInputOptions=a,this.maskTextFn=s,this.maskInputFn=u,this.recordCanvas=l,this.slimDOMOptions=c,this.emissionCallback=e,this.doc=d,this.mirror=h,this.iframeManager=f,this.shadowDomManager=m},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1,this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1,this.emit()},e}();function ge(e,t){e.delete(t),t.childNodes.forEach((function(t){return ge(e,t)}))}function ye(e,t,n){var r=t.parentNode;if(!r)return!1;var i=n.getId(r);return!!e.some((function(e){return e.id===i}))||ye(e,r,n)}function ve(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||ve(e,n))}var Me=[],Te="undefined"!=typeof CSSGroupingRule;function be(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function we(e,t,n,r,i,o,a,s,u,l,c,d,h,f,m,p){var _,g,y,v=new _e;Me.push(v),v.init(e,n,r,i,o,a,s,u,l,c,d,t,h,f,m);var M=window.MutationObserver||window.__rrMutationObserver,T=null===(y=null===(g=null===(_=window)||void 0===_?void 0:_.Zone)||void 0===g?void 0:g.__symbol__)||void 0===y?void 0:y.call(g,"MutationObserver");T&&window[T]&&(M=window[T]);var b=new M(v.processMutations.bind(v));return b.observe(p,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),b}function De(t,n,r,i,o){if(!1===o.mouseInteraction)return function(){};var a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,s=[];return Object.keys(e.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(o){var a=o.toLowerCase(),u=function(n){return function(o){var a=be(o);if(!ee(a,i)){var s=re(o)?o.changedTouches[0]:o;if(s){var u=r.getId(a),l=s.clientX,c=s.clientY;t({type:e.MouseInteractions[n],id:u,x:l,y:c})}}}}(o);s.push(q(a,u,n))})),function(){s.forEach((function(e){return e()}))}}function Le(e,t,n,r,i){return q("scroll",J((function(i){var o=be(i);if(o&&!ee(o,r)){var a=n.getId(o);if(o===t){var s=t.scrollingElement||t.documentElement;e({id:a,x:s.scrollLeft,y:s.scrollTop})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}}),i.scroll||100),t)}function Se(e,t){var n=r({},e);return t||delete n.userTriggered,n}var ke=["INPUT","TEXTAREA","SELECT"],Ae=new WeakMap;function Ee(e){return function(e,t){if(Te&&e.parentRule instanceof CSSGroupingRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Ie(t,n){var o,s;void 0===n&&(n={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,s=e.viewportResizeCb,u=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.styleDeclarationCb,h=e.canvasMutationCb,f=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,a(e)),n.apply(void 0,a(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,a(e)),r.apply(void 0,a(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,a(e)),i.apply(void 0,a(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,a(e)),o.apply(void 0,a(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,a(e)),s.apply(void 0,a(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,a(e)),u.apply(void 0,a(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,a(e)),l.apply(void 0,a(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,a(e)),c.apply(void 0,a(e))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,a(e)),d.apply(void 0,a(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,a(e)),h.apply(void 0,a(e))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,a(e)),f.apply(void 0,a(e))}}(t,n);var u,c,d,h=we(t.mutationCb,t.doc,t.blockClass,t.blockSelector,t.maskTextClass,t.maskTextSelector,t.inlineStylesheet,t.maskInputOptions,t.maskTextFn,t.maskInputFn,t.recordCanvas,t.slimDOMOptions,t.mirror,t.iframeManager,t.shadowDomManager,t.doc),f=function(t,n,r,i){if(!1===n.mousemove)return function(){};var o,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],l=J((function(e){var n=Date.now()-o;t(u.map((function(e){return e.timeOffset-=n,e})),e),u=[],o=null}),s),c=J((function(t){var n=be(t),r=re(t)?t.changedTouches[0]:t,a=r.clientX,s=r.clientY;o||(o=Date.now()),u.push({x:a,y:s,id:i.getId(n),timeOffset:Date.now()-o}),l("undefined"!=typeof DragEvent&&t instanceof DragEvent?e.IncrementalSource.Drag:t instanceof MouseEvent?e.IncrementalSource.MouseMove:e.IncrementalSource.TouchMove)}),a,{trailing:!1}),d=[q("mousemove",c,r),q("touchmove",c,r),q("drag",c,r)];return function(){d.forEach((function(e){return e()}))}}(t.mousemoveCb,t.sampling,t.doc,t.mirror),m=De(t.mouseInteractionCb,t.doc,t.mirror,t.blockClass,t.sampling),p=Le(t.scrollCb,t.doc,t.mirror,t.blockClass,t.sampling),_=(u=t.viewportResizeCb,c=-1,d=-1,q("resize",J((function(){var e=X(),t=$();c===e&&d===t||(u({width:Number(t),height:Number(e)}),c=e,d=t)}),200),window)),g=function(e,t,n,i,o,s,u,c,d){function h(e){var n=be(e),r=e.isTrusted;if(n&&n.tagName&&!(ke.indexOf(n.tagName)<0)&&!ee(n,i)){var a=n.type;if(!n.classList.contains(o)){var c=n.value,h=!1;"radio"===a||"checkbox"===a?h=n.checked:(s[n.tagName.toLowerCase()]||s[a])&&(c=l({maskInputOptions:s,tagName:n.tagName,type:a,value:c,maskInputFn:u})),f(n,Se({text:c,isChecked:h,userTriggered:r},d));var m=n.name;"radio"===a&&m&&h&&t.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((function(e){e!==n&&f(e,Se({text:e.value,isChecked:!h,userTriggered:!1},d))}))}}}function f(t,i){var o=Ae.get(t);if(!o||o.text!==i.text||o.isChecked!==i.isChecked){Ae.set(t,i);var a=n.getId(t);e(r(r({},i),{id:a}))}}var m=("last"===c.input?["change"]:["input","change"]).map((function(e){return q(e,h,t)})),p=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),_=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return p&&p.set&&m.push.apply(m,a(_.map((function(e){return Z(e[0],e[1],{set:function(){h({target:this})}})})))),function(){m.forEach((function(e){return e()}))}}(t.inputCb,t.doc,t.mirror,t.blockClass,t.ignoreClass,t.maskInputOptions,t.maskInputFn,t.sampling,t.userTriggeredOnInput),y=function(e,t,n){var r=function(r){return function(i){var o=be(i);o&&!ee(o,t)&&e({type:r,id:n.getId(o),currentTime:o.currentTime})}},i=[q("play",r(O.Play)),q("pause",r(O.Pause)),q("seeked",r(O.Seeked))];return function(){i.forEach((function(e){return e()}))}}(t.mediaInteractionCb,t.blockClass,t.mirror),v=function(e,t){var n=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(r,i){var o=t.getId(this.ownerNode);return-1!==o&&e({id:o,adds:[{rule:r,index:i}]}),n.apply(this,arguments)};var r=CSSStyleSheet.prototype.deleteRule;if(CSSStyleSheet.prototype.deleteRule=function(n){var i=t.getId(this.ownerNode);return-1!==i&&e({id:i,removes:[{index:n}]}),r.apply(this,arguments)},!Te)return function(){CSSStyleSheet.prototype.insertRule=n,CSSStyleSheet.prototype.deleteRule=r};var i=CSSGroupingRule.prototype.insertRule;CSSGroupingRule.prototype.insertRule=function(n,r){var o=t.getId(this.parentStyleSheet.ownerNode);return-1!==o&&e({id:o,adds:[{rule:n,index:a(Ee(this),[r||0])}]}),i.apply(this,arguments)};var o=CSSGroupingRule.prototype.deleteRule;return CSSGroupingRule.prototype.deleteRule=function(n){var r=t.getId(this.parentStyleSheet.ownerNode);return-1!==r&&e({id:r,removes:[{index:a(Ee(this),[n])}]}),o.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=n,CSSStyleSheet.prototype.deleteRule=r,CSSGroupingRule.prototype.insertRule=i,CSSGroupingRule.prototype.deleteRule=o}}(t.styleSheetRuleCb,t.mirror),M=function(e,t){var n=CSSStyleDeclaration.prototype.setProperty;CSSStyleDeclaration.prototype.setProperty=function(r,i,o){var a,s,u=t.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==u&&e({id:u,set:{property:r,value:i,priority:o},index:Ee(this.parentRule)}),n.apply(this,arguments)};var r=CSSStyleDeclaration.prototype.removeProperty;return CSSStyleDeclaration.prototype.removeProperty=function(n){var i,o,a=t.getId(null===(o=null===(i=this.parentRule)||void 0===i?void 0:i.parentStyleSheet)||void 0===o?void 0:o.ownerNode);return-1!==a&&e({id:a,remove:{property:n},index:Ee(this.parentRule)}),r.apply(this,arguments)},function(){CSSStyleDeclaration.prototype.setProperty=n,CSSStyleDeclaration.prototype.removeProperty=r}}(t.styleDeclarationCb,t.mirror),T=t.recordCanvas?function(e,t,n){var r,o,s=Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype),u=[],l=function(r){try{if("function"!=typeof CanvasRenderingContext2D.prototype[r])return"continue";var i=K(CanvasRenderingContext2D.prototype,r,(function(i){return function(){for(var o=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return ee(this.canvas,t)||setTimeout((function(){var t=a(s);if("drawImage"===r&&t[0]&&t[0]instanceof HTMLCanvasElement){var i=t[0],u=i.getContext("2d"),l=null==u?void 0:u.getImageData(0,0,i.width,i.height),c=null==l?void 0:l.data;t[0]=JSON.stringify(c)}e({id:n.getId(o.canvas),property:r,args:t})}),0),i.apply(this,s)}}));u.push(i)}catch(t){var o=Z(CanvasRenderingContext2D.prototype,r,{set:function(t){e({id:n.getId(this.canvas),property:r,args:[t],setter:!0})}});u.push(o)}};try{for(var c=i(s),d=c.next();!d.done;d=c.next())l(d.value)}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return function(){u.forEach((function(e){return e()}))}}(t.canvasMutationCb,t.blockClass,t.mirror):function(){},b=t.collectFonts?function(e){var t=[],n=new WeakMap,r=FontFace;window.FontFace=function(e,t,i){var o=new r(e,t,i);return n.set(o,{family:e,buffer:"string"!=typeof t,descriptors:i,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),o};var i=K(document.fonts,"add",(function(t){return function(r){return setTimeout((function(){var t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}}));return t.push((function(){window.FonFace=r})),t.push(i),function(){t.forEach((function(e){return e()}))}}(t.fontCb):function(){},w=[];try{for(var D=i(t.plugins),L=D.next();!L.done;L=D.next()){var S=L.value;w.push(S.observer(S.callback,S.options))}}catch(e){o={error:e}}finally{try{L&&!L.done&&(s=D.return)&&s.call(D)}finally{if(o)throw o.error}}return function(){h.disconnect(),f(),m(),p(),_(),g(),y(),v(),M(),T(),b(),w.forEach((function(e){return e()}))}}var Ne,xe,Ce=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}(),je=function(){function e(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror}return e.prototype.addShadowRoot=function(e,t){we(this.mutationCb,t,this.bypassOptions.blockClass,this.bypassOptions.blockSelector,this.bypassOptions.maskTextClass,this.bypassOptions.maskTextSelector,this.bypassOptions.inlineStylesheet,this.bypassOptions.maskInputOptions,this.bypassOptions.maskTextFn,this.bypassOptions.maskInputFn,this.bypassOptions.recordCanvas,this.bypassOptions.slimDOMOptions,this.mirror,this.bypassOptions.iframeManager,this,e),Le(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();function Ye(e){return r(r({},e),{timestamp:Date.now()})}var Oe={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function Re(t){void 0===t&&(t={});var n=t.emit,i=t.checkoutEveryNms,a=t.checkoutEveryNth,s=t.blockClass,u=void 0===s?"rr-block":s,l=t.blockSelector,c=void 0===l?null:l,d=t.ignoreClass,h=void 0===d?"rr-ignore":d,f=t.maskTextClass,m=void 0===f?"rr-mask":f,p=t.maskTextSelector,_=void 0===p?null:p,g=t.inlineStylesheet,y=void 0===g||g,v=t.maskAllInputs,M=t.maskInputOptions,T=t.slimDOMOptions,b=t.maskInputFn,w=t.maskTextFn,D=t.hooks,L=t.packFn,S=t.sampling,A=void 0===S?{}:S,E=t.mousemoveWait,I=t.recordCanvas,N=void 0!==I&&I,x=t.userTriggeredOnInput,C=void 0!==x&&x,j=t.collectFonts,Y=void 0!==j&&j,O=t.plugins,R=t.keepIframeSrcFn,z=void 0===R?function(){return!1}:R;if(!n)throw new Error("emit function is required");void 0!==E&&void 0===A.mousemove&&(A.mousemove=E);var P,H=!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==M?M:{password:!0},U=!0===T||"all"===T?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===T,headMetaDescKeywords:"all"===T}:T||{};ie();var F=0;Ne=function(t,r){var o;if(!(null===(o=Me[0])||void 0===o?void 0:o.isFrozen())||t.type===e.EventType.FullSnapshot||t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.Mutation||Me.forEach((function(e){return e.unfreeze()})),n(L?L(t):t,r),t.type===e.EventType.FullSnapshot)P=t,F=0;else if(t.type===e.EventType.IncrementalSnapshot){if(t.data.source===e.IncrementalSource.Mutation&&t.data.isAttachIframe)return;F++;var s=a&&F>=a,u=i&&t.timestamp-P.timestamp>i;(s||u)&&xe(!0)}};var W=function(t){Ne(Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.Mutation},t)}))},Q=function(t){if(!pt){var n=Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.Scroll},t)});return Ne(n)}},B=new Ce({mutationCb:W}),V=new je({mutationCb:W,scrollCb:Q,bypassOptions:{blockClass:u,blockSelector:c,maskTextClass:m,maskTextSelector:_,inlineStylesheet:y,maskInputOptions:H,maskTextFn:w,maskInputFn:b,recordCanvas:N,sampling:A,slimDOMOptions:U,iframeManager:B},mirror:Oe});xe=function(t){var n,r,i,a;void 0===t&&(t=!1),Ne(Ye({type:e.EventType.Meta,data:{href:window.location.href,width:$(),height:X()}}),t),Me.forEach((function(e){return e.lock()}));var s=o(function(e,t){var n=t||{},r=n.blockClass,i=void 0===r?"rr-block":r,o=n.blockSelector,a=void 0===o?null:o,s=n.maskTextClass,u=void 0===s?"rr-mask":s,l=n.maskTextSelector,c=void 0===l?null:l,d=n.inlineStylesheet,h=void 0===d||d,f=n.recordCanvas,m=void 0!==f&&f,p=n.maskAllInputs,_=void 0!==p&&p,g=n.maskTextFn,y=n.maskInputFn,v=n.slimDOM,M=void 0!==v&&v,T=n.preserveWhiteSpace,b=n.onSerialize,w=n.onIframeLoad,D=n.iframeLoadTimeout,L=n.keepIframeSrcFn,S={};return[k(e,{doc:e,map:S,blockClass:i,blockSelector:a,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===_?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===_?{password:!0}:_,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===M||"all"===M?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===M,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===M?{}:M,recordCanvas:m,preserveWhiteSpace:T,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:D,keepIframeSrcFn:void 0===L?function(){return!1}:L}),S]}(document,{blockClass:u,blockSelector:c,maskTextClass:m,maskTextSelector:_,inlineStylesheet:y,maskAllInputs:H,maskTextFn:w,slimDOM:U,recordCanvas:N,onSerialize:function(e){ue(e)&&B.addIframe(e),ce(e)&&V.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){B.attachIframe(e,t)},keepIframeSrcFn:z}),2),l=s[0],d=s[1];if(!l)return console.warn("Failed to snapshot the document");Oe.map=d,Ne(Ye({type:e.EventType.FullSnapshot,data:{node:l,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(r=null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.parentElement)||void 0===r?void 0:r.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),Me.forEach((function(e){return e.unlock()}))};try{var G=[];G.push(q("DOMContentLoaded",(function(){Ne(Ye({type:e.EventType.DomContentLoaded,data:{}}))})));var J=function(t){return Ie({mutationCb:W,mousemoveCb:function(t,n){return Ne(Ye({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:t}}))},mouseInteractionCb:function(t){return Ne(Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:Q,viewportResizeCb:function(t){return Ne(Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return Ne(Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return Ne(Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.MediaInteraction},t)}))},styleSheetRuleCb:function(t){return Ne(Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.StyleSheetRule},t)}))},styleDeclarationCb:function(t){return Ne(Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.StyleDeclaration},t)}))},canvasMutationCb:function(t){return Ne(Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.CanvasMutation},t)}))},fontCb:function(t){return Ne(Ye({type:e.EventType.IncrementalSnapshot,data:r({source:e.IncrementalSource.Font},t)}))},blockClass:u,ignoreClass:h,maskTextClass:m,maskTextSelector:_,maskInputOptions:H,inlineStylesheet:y,sampling:A,recordCanvas:N,userTriggeredOnInput:C,collectFonts:Y,doc:t,maskInputFn:b,maskTextFn:w,blockSelector:c,slimDOMOptions:U,mirror:Oe,iframeManager:B,shadowDomManager:V,plugins:(null==O?void 0:O.map((function(t){return{observer:t.observer,options:t.options,callback:function(n){return Ne(Ye({type:e.EventType.Plugin,data:{plugin:t.name,payload:n}}))}}})))||[]},D)};B.addLoadListener((function(e){G.push(J(e.contentDocument))}));var Z=function(){xe(),G.push(J(document))};return"interactive"===document.readyState||"complete"===document.readyState?Z():G.push(q("load",(function(){Ne(Ye({type:e.EventType.Load,data:{}})),Z()}),window)),function(){G.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}function ze(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}Re.addCustomEvent=function(t,n){if(!Ne)throw new Error("please add custom event after start recording");Ne(Ye({type:e.EventType.Custom,data:{tag:t,payload:n}}))},Re.freezePage=function(){Me.forEach((function(e){return e.freeze()}))},Re.takeFullSnapshot=function(e){if(!xe)throw new Error("please take full snapshot after start recording");xe(e)},Re.mirror=Oe;var Pe=Object.freeze({__proto__:null,default:ze});function He(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?m.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==z(arguments[0])?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==z(arguments[0])?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):m.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;m.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==z(arguments[0])?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=function(e){for(;e!==t.body&&!1===h(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(m.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function u(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!==z(e)||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===z(e)&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function h(e){var t=c(e,"Y")&&d(e,"Y"),n=c(e,"X")&&d(e,"X");return t||n}function f(t){var n,r,o,s,u=(a()-t.startTime)/i;s=u=u>1?1:u,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(f.bind(e,t))}function m(n,r,i){var s,l,c,d,h=a();n===t.body?(s=e,l=e.scrollX||e.pageXOffset,c=e.scrollY||e.pageYOffset,d=o.scroll):(s=n,l=n.scrollLeft,c=n.scrollTop,d=u),f({scrollable:s,method:d,startTime:h,startX:l,startY:c,x:r,y:i})}}var Ue,Fe=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,n=this;this.raf=requestAnimationFrame((function r(){var i=performance.now();for(n.timeOffset+=(i-e)*n.speed,e=i;t.length;){var o=t[0];if(!(n.timeOffset>=o.delay))break;t.shift(),o.doAction()}(t.length>0||n.liveMode)&&(n.raf=requestAnimationFrame(r))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t},e}();function We(t,n){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var r=t.data.positions[0].timeOffset,i=t.timestamp+r;return t.delay=i-n,i-n}return t.delay=t.timestamp-n,t.delay}function Qe(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Ue||(Ue={}));var Be={type:"xstate.init"};function qe(e){return void 0===e?[]:[].concat(e)}function Ve(e){return{type:"xstate.assign",assignment:e}}function Ge(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function Je(e){return function(t){return e===t}}function Ze(e){return"string"==typeof e?{type:e}:e}function Ke(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Je(e)}}function Xe(e,t,n){var r=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](r,n):e.assignment[i]})),r=t,!1}return!0})),r,i]}function $e(e,t){void 0===t&&(t={});var n=Qe(Xe(qe(e.states[e.initial].entry).map((function(e){return Ge(e,t.actions)})),e.context,Be),2),r=n[0],i=n[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Je(e.initial)},transition:function(t,n){var r,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,u=a.context,l=Ze(n),c=e.states[s];if(c.on){var d=qe(c.on[l.type]);try{for(var h=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),f=h.next();!f.done;f=h.next()){var m=f.value;if(void 0===m)return Ke(s,u);var p="string"==typeof m?{target:m}:m,_=p.target,g=p.actions,y=void 0===g?[]:g,v=p.cond,M=void 0===v?function(){return!0}:v,T=void 0===_,b=null!=_?_:s,w=e.states[b];if(M(u,l)){var D=Qe(Xe((T?qe(y):[].concat(c.exit,y,w.entry).filter((function(e){return e}))).map((function(e){return Ge(e,o._options.actions)})),u,l),3),L=D[0],S=D[1],k=D[2],A=null!=_?_:s;return{value:A,context:S,actions:L,changed:_!==s||L.length>0||k,matches:Je(A)}}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}return Ke(s,u)}};return o}var et=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function tt(e){var t=e.initialState,n=Ue.NotStarted,r=new Set,i={_machine:e,send:function(i){n===Ue.Running&&(t=e.transition(t,i),et(t,Ze(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var o="object"==z(r)?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:Je(o.value)}}return n=Ue.Running,et(t,Be),i},stop:function(){return n=Ue.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function nt(t,n){var o=n.getCastFn,a=n.applyEventsSynchronously,s=n.emitter,u=$e({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ve({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:Ve((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),r(r({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(t){var n,r,u,l,c,d=t.timer,h=t.events,f=t.baselineTime,m=t.lastPlayedEvent;d.clear();try{for(var p=i(h),_=p.next();!_.done;_=p.next()){We(_.value,f)}}catch(e){n={error:e}}finally{try{_&&!_.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var g=function(t,n){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===e.EventType.Meta&&i.timestamp<=n)return t.slice(r)}return t}(h,f),y=null==m?void 0:m.timestamp;(null==m?void 0:m.type)===e.EventType.IncrementalSnapshot&&m.data.source===e.IncrementalSource.MouseMove&&(y=m.timestamp+(null===(c=m.data.positions[0])||void 0===c?void 0:c.timeOffset)),f<(y||0)&&s.emit(e.ReplayerEvents.PlayBack);var v=new Array,M=new Array,T=function(t){if(y&&y<f&&(t.timestamp<=y||t===m))return"continue";if(t.timestamp<f)v.push(t);else{var n=o(t,!1);M.push({doAction:function(){n(),s.emit(e.ReplayerEvents.EventCast,t)},delay:t.delay})}};try{for(var b=i(g),w=b.next();!w.done;w=b.next()){T(w.value)}}catch(e){u={error:e}}finally{try{w&&!w.done&&(l=b.return)&&l.call(b)}finally{if(u)throw u.error}}a(v),s.emit(e.ReplayerEvents.Flush),d.addActions(M),d.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:Ve((function(e){return r(r({},e),{lastPlayedEvent:null})})),startLive:Ve({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:Ve((function(t,n){var i=t.baselineTime,a=t.timer,u=t.events;if("ADD_EVENT"===n.type){var l=n.payload.event;We(l,i);var c=u.length-1;if(!u[c]||u[c].timestamp<=l.timestamp)u.push(l);else{for(var d=-1,h=0;h<=c;){var f=Math.floor((h+c)/2);u[f].timestamp<=l.timestamp?h=f+1:c=f-1}-1===d&&(d=h),u.splice(d,0,l)}var m=l.timestamp<i,p=o(l,m);m?p():a.isActive()&&a.addAction({doAction:function(){p(),s.emit(e.ReplayerEvents.EventCast,l)},delay:l.delay})}return r(r({},t),{events:u})}))}});return tt(u)}var rt;function it(e,t){var n=e[t[0]];return 1===t.length?n:it(n.cssRules[t[1]].cssRules,t.slice(2))}function ot(e){var t=a(e),n=t.pop();return{positions:t,index:n}}function at(e,t){e.forEach((function(e){var n,r;if(e.type===rt.Insert)try{if(Array.isArray(e.index)){var i=ot(e.index),a=i.positions,s=i.index;it(t.sheet.cssRules,a).insertRule(e.cssText,s)}else null===(n=t.sheet)||void 0===n||n.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===rt.Remove)try{if(Array.isArray(e.index)){var u=ot(e.index);a=u.positions,s=u.index;it(t.sheet.cssRules,a).deleteRule(s||0)}else null===(r=t.sheet)||void 0===r||r.deleteRule(e.index)}catch(e){}else if(e.type===rt.Snapshot)!function(e,t){var n;try{var r=Array.from((null===(n=t.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText})),i=Object.entries(r).reverse(),a=r.length;i.forEach((function(n){var r,i=o(n,2),s=i[0],u=i[1],l=e.indexOf(u);if(-1===l||l>a)try{null===(r=t.sheet)||void 0===r||r.deleteRule(Number(s))}catch(e){}a=l})),e.forEach((function(e,n){var r,i,o;try{(null===(i=null===(r=t.sheet)||void 0===r?void 0:r.cssRules[n])||void 0===i?void 0:i.cssText)!==e&&(null===(o=t.sheet)||void 0===o||o.insertRule(e,n))}catch(e){}}))}catch(e){}}(e.cssTexts,t);else if(e.type===rt.SetProperty){it(t.sheet.cssRules,e.index).style.setProperty(e.property,e.value,e.priority)}else if(e.type===rt.RemoveProperty){it(t.sheet.cssRules,e.index).style.removeProperty(e.property)}}))}!function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(rt||(rt={}));var st=ze||Pe,ut="[replayer]",lt={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ct(t){return t.type==e.EventType.IncrementalSnapshot&&(t.data.source==e.IncrementalSource.TouchMove||t.data.source==e.IncrementalSource.MouseInteraction&&t.data.type==e.MouseInteractions.TouchStart)}var dt=function(){function n(t,n){var r=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=st(),this.legacy_missingNodeRetryMap={},this.cache=F(),this.imageMap=new Map,this.mirror={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var o={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:lt};this.config=Object.assign({},o,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(e.ReplayerEvents.Resize,this.handleResize),this.setupDom(),this.treeIndex=new oe,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(e.ReplayerEvents.Flush,(function(){var e,t,n,o,a,s,u=r.treeIndex.flush(),l=u.scrollMap,c=u.inputMap;r.fragmentParentMap.forEach((function(e,t){return r.restoreRealParent(t,e)}));try{for(var d=i(r.virtualStyleRulesMap.keys()),h=d.next();!h.done;h=d.next()){var f=h.value;r.restoreNodeSheet(f)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}r.fragmentParentMap.clear(),r.elementStateMap.clear(),r.virtualStyleRulesMap.clear();try{for(var m=i(l.values()),p=m.next();!p.done;p=m.next()){var _=p.value;r.applyScroll(_)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}try{for(var g=i(c.values()),y=g.next();!y.done;y=g.next()){_=y.value;r.applyInput(_)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}})),this.emitter.on(e.ReplayerEvents.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset()}));var a=new Fe([],(null==n?void 0:n.speed)||o.speed);this.service=nt({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(t){r.emitter.emit(e.ReplayerEvents.StateChange,{player:t})})),this.speedService=tt($e({id:"speed",context:{normalSpeed:-1,timer:a},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:Ve({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(t){r.emitter.emit(e.ReplayerEvents.StateChange,{speed:t})}));var s=this.service.state.context.events.find((function(t){return t.type===e.EventType.Meta})),u=this.service.state.context.events.find((function(t){return t.type===e.EventType.FullSnapshot}));if(s){var l=s.data,c=l.width,d=l.height;setTimeout((function(){r.emitter.emit(e.ReplayerEvents.Resize,{width:c,height:d})}),0)}u&&setTimeout((function(){r.firstFullSnapshot||(r.firstFullSnapshot=u,r.rebuildFullSnapshot(u),r.iframe.contentWindow.scrollTo(u.data.initialOffset))}),1),this.service.state.context.events.find(ct)&&this.mouse.classList.add("touch-device")}return Object.defineProperty(n.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),n.prototype.on=function(e,t){return this.emitter.on(e,t),this},n.prototype.off=function(e,t){return this.emitter.off(e,t),this},n.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},n.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},n.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},n.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},n.prototype.getMirror=function(){return this.mirror},n.prototype.play=function(t){var n;void 0===t&&(t=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null===(n=this.iframe.contentDocument)||void 0===n||n.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.Start)},n.prototype.pause=function(t){var n;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null===(n=this.iframe.contentDocument)||void 0===n||n.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.Pause)},n.prototype.resume=function(t){void 0===t&&(t=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(e.ReplayerEvents.Resume)},n.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},n.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;ct(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},n.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},n.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},n.prototype.resetCache=function(){this.cache=F()},n.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(He(this.iframe.contentWindow,this.iframe.contentDocument),ie(this.iframe.contentWindow))},n.prototype.handleResize=function(e){var t,n;this.iframe.style.display="inherit";try{for(var r=i([this.mouseTail,this.iframe]),o=r.next();!o.done;o=r.next()){var a=o.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},n.prototype.applyEventsSynchronously=function(t){var n,r;try{for(var o=i(t),a=o.next();!a.done;a=o.next()){var s=a.value;switch(s.type){case e.EventType.DomContentLoaded:case e.EventType.Load:case e.EventType.Custom:continue;case e.EventType.FullSnapshot:case e.EventType.Meta:case e.EventType.Plugin:break;case e.EventType.IncrementalSnapshot:if(s.data.source===e.IncrementalSource.MediaInteraction)continue}this.getCastFn(s,!0)()}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},n.prototype.getCastFn=function(t,n){var r,o=this;switch(void 0===n&&(n=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Custom:r=function(){o.emitter.emit(e.ReplayerEvents.CustomEvent,t)};break;case e.EventType.Meta:r=function(){return o.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:r=function(){if(o.firstFullSnapshot){if(o.firstFullSnapshot===t)return void(o.firstFullSnapshot=!0)}else o.firstFullSnapshot=!0;o.rebuildFullSnapshot(t,n),o.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:r=function(){var r,a;if(o.applyIncremental(t,n),!n&&(t===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.backToNormal()),o.config.skipInactive&&!o.nextUserInteractionEvent)){try{for(var s=i(o.service.state.context.events),u=s.next();!u.done;u=s.next()){var l=u.value;if(!(l.timestamp<=t.timestamp)&&o.isUserInteraction(l)){l.delay-t.delay>1e4*o.speedService.state.context.timer.speed&&(o.nextUserInteractionEvent=l);break}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}if(o.nextUserInteractionEvent){var c=o.nextUserInteractionEvent.delay-t.delay,d={speed:Math.min(Math.round(c/5e3),o.config.maxSpeed)};o.speedService.send({type:"FAST_FORWARD",payload:d}),o.emitter.emit(e.ReplayerEvents.SkipStart,d)}}}}return function(){var a,s;r&&r();try{for(var u=i(o.config.plugins||[]),l=u.next();!l.done;l=u.next()){l.value.handler(t,n,{replayer:o})}}catch(e){a={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}o.service.send({type:"CAST_EVENT",payload:{event:t}});var c=o.service.state.context.events.length-1;if(t===o.service.state.context.events[c]){var d=function(){c<o.service.state.context.events.length-1||(o.backToNormal(),o.service.send("END"),o.emitter.emit(e.ReplayerEvents.Finish))};t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove&&t.data.positions.length?setTimeout((function(){d()}),Math.max(0,50-t.data.positions[0].timeOffset)):d()}}},n.prototype.rebuildFullSnapshot=function(t,n){var r,o,a=this;if(void 0===n&&(n=!1),!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var s=[];this.mirror.map=B(t.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){a.collectIframeAndAttachDocument(s,e)},cache:this.cache})[1];var u=function(e,t){if(l.attachDocumentToIframe(e,t),l.newDocumentQueue=l.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,i=n.head;l.insertStyleRules(r,i)}},l=this;try{for(var c=i(s),d=c.next();!d.done;d=c.next()){var h=d.value;u(h.mutationInQueue,h.builtNode)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}var f=this.iframe.contentDocument,m=f.documentElement,p=f.head;this.insertStyleRules(m,p),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded,t),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},n.prototype.insertStyleRules=function(e,t){var n=document.createElement("style");e.insertBefore(n,t);var r,i=(r=this.config.blockClass,["."+r+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&i.push("html.rrweb-paused * { animation-play-state: paused !important; }");for(var o=0;o<i.length;o++)n.sheet.insertRule(i[o],o)},n.prototype.attachDocumentToIframe=function(e,t){var n,r,o=this,a=[];if(!t.contentDocument)for(var s=t.parentNode;s;){if(this.fragmentParentMap.has(s)){var u=s,l=this.fragmentParentMap.get(u);this.restoreRealParent(u,l);break}s=s.parentNode}Q(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)},cache:this.cache});var c=function(e,t){if(d.attachDocumentToIframe(e,t),d.newDocumentQueue=d.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,i=n.head;d.insertStyleRules(r,i)}},d=this;try{for(var h=i(a),f=h.next();!f.done;f=h.next()){var m=f.value;c(m.mutationInQueue,m.builtNode)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}},n.prototype.collectIframeAndAttachDocument=function(e,t){if(ue(t)){var n=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));n&&e.push({mutationInQueue:n,builtNode:t})}},n.prototype.waitForStylesheetLoad=function(){var t,n=this,r=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(r){var i,o=new Set,a=this.service.state,s=function(){a=n.service.state};this.emitter.on(e.ReplayerEvents.Start,s),this.emitter.on(e.ReplayerEvents.Pause,s);var u=function(){n.emitter.off(e.ReplayerEvents.Start,s),n.emitter.off(e.ReplayerEvents.Pause,s)};r.querySelectorAll('link[rel="stylesheet"]').forEach((function(t){t.sheet||(o.add(t),t.addEventListener("load",(function(){o.delete(t),0===o.size&&-1!==i&&(a.matches("playing")&&n.play(n.getCurrentTime()),n.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),i&&window.clearTimeout(i),u())})))})),o.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),i=window.setTimeout((function(){a.matches("playing")&&n.play(n.getCurrentTime()),i=-1,u()}),this.config.loadTimeout))}},n.prototype.preloadAllImages=function(){var t,n,r=this;this.service.state;var o=function(){r.service.state};this.emitter.on(e.ReplayerEvents.Start,o),this.emitter.on(e.ReplayerEvents.Pause,o);try{for(var a=i(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var u=s.value;if(u.type===e.EventType.IncrementalSnapshot&&u.data.source===e.IncrementalSource.CanvasMutation&&"drawImage"===u.data.property&&"string"==typeof u.data.args[0]&&!this.imageMap.has(u)){var l=document.createElement("canvas"),c=l.getContext("2d"),d=null==c?void 0:c.createImageData(l.width,l.height);null==d||d.data;JSON.parse(u.data.args[0]),null==c||c.putImageData(d,0,0)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},n.prototype.applyIncremental=function(t,n){var i,o,a=this,s=t.data;switch(s.source){case e.IncrementalSource.Mutation:n&&(s.adds.forEach((function(e){return a.treeIndex.add(e)})),s.texts.forEach((function(e){return a.treeIndex.text(e)})),s.attributes.forEach((function(e){return a.treeIndex.attribute(e)})),s.removes.forEach((function(e){return a.treeIndex.remove(e,a.mirror)})));try{this.applyMutation(s,n)}catch(e){this.warn("Exception in mutation "+(e.message||e),s)}break;case e.IncrementalSource.Drag:case e.IncrementalSource.TouchMove:case e.IncrementalSource.MouseMove:if(n){var u=s.positions[s.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:s}}else s.positions.forEach((function(e){var r={doAction:function(){a.moveAndHover(e.x,e.y,e.id,n,s)},delay:e.timeOffset+t.timestamp-a.service.state.context.baselineTime};a.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:t.delay-(null===(i=s.positions[0])||void 0===i?void 0:i.timeOffset)});break;case e.IncrementalSource.MouseInteraction:if(-1===s.id)break;var l=new Event(e.MouseInteractions[s.type].toLowerCase());if(!(v=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:s.type,target:v});var c=this.config.triggerFocus;switch(s.type){case e.MouseInteractions.Blur:"blur"in v&&v.blur();break;case e.MouseInteractions.Focus:c&&v.focus&&v.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:n?(s.type===e.MouseInteractions.TouchStart?this.touchActive=!0:s.type===e.MouseInteractions.TouchEnd&&(this.touchActive=!1),this.mousePos={x:s.x,y:s.y,id:s.id,debugData:s}):(s.type===e.MouseInteractions.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x,s.y,s.id,n,s),s.type===e.MouseInteractions.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):s.type===e.MouseInteractions.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):s.type===e.MouseInteractions.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case e.MouseInteractions.TouchCancel:n?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:v.dispatchEvent(l)}break;case e.IncrementalSource.Scroll:if(-1===s.id)break;if(n){this.treeIndex.scroll(s);break}this.applyScroll(s);break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:s.width,height:s.height});break;case e.IncrementalSource.Input:if(-1===s.id)break;if(n){this.treeIndex.input(s);break}this.applyInput(s);break;case e.IncrementalSource.MediaInteraction:if(!(v=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);var d=v;try{s.currentTime&&(d.currentTime=s.currentTime),s.type===O.Pause&&d.pause(),s.type===O.Play&&d.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case e.IncrementalSource.StyleSheetRule:if(!(v=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);var h,f=v,m=v.parentNode,p=this.fragmentParentMap.has(m),_=p?null:f.sheet;_||(this.virtualStyleRulesMap.has(v)?h=this.virtualStyleRulesMap.get(v):(h=[],this.virtualStyleRulesMap.set(v,h))),s.adds&&s.adds.forEach((function(e){var t=e.rule,n=e.index;if(_)try{if(Array.isArray(n)){var r=ot(n),i=r.positions,o=r.index;it(_.cssRules,i).insertRule(t,o)}else{o=void 0===n?void 0:Math.min(n,_.cssRules.length);_.insertRule(t,o)}}catch(e){}else null==h||h.push({cssText:t,index:n,type:rt.Insert})})),s.removes&&s.removes.forEach((function(e){var t=e.index;if(p)null==h||h.push({index:t,type:rt.Remove});else try{if(Array.isArray(t)){var n=ot(t),r=n.positions,i=n.index;it(_.cssRules,r).deleteRule(i||0)}else null==_||_.deleteRule(t)}catch(e){}}));break;case e.IncrementalSource.StyleDeclaration:if(!(v=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);f=v,m=v.parentNode;var g=this.fragmentParentMap.has(m)?null:f.sheet,y=[];if(g||(this.virtualStyleRulesMap.has(v)?y=this.virtualStyleRulesMap.get(v):(y=[],this.virtualStyleRulesMap.set(v,y))),s.set)if(g)it(g.rules,s.index).style.setProperty(s.set.property,s.set.value,s.set.priority);else y.push(r({type:rt.SetProperty,index:s.index},s.set));if(s.remove)if(g)it(g.rules,s.index).style.removeProperty(s.remove.property);else y.push(r({type:rt.RemoveProperty,index:s.index},s.remove));break;case e.IncrementalSource.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var v;if(!(v=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);try{var M=v.getContext("2d");if(s.setter)return void(M[s.property]=s.args[0]);var T=M[s.property];if("drawImage"===s.property&&"string"==typeof s.args[0]){var b=this.imageMap.get(t);s.args[0]=b,T.apply(M,s.args)}else T.apply(M,s.args)}catch(e){this.warnCanvasMutationFailed(s,s.id,e)}break;case e.IncrementalSource.Font:try{var w=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null===(o=this.iframe.contentDocument)||void 0===o||o.fonts.add(w)}catch(e){this.config.showWarning&&console.warn(e)}}},n.prototype.applyMutation=function(e,n){var o,a,s=this;e.removes.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.parentId})))return;return s.warnNodeNotFound(e,t.id)}var r=s.mirror.getNode(t.parentId);if(!r)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&ce(r)&&(r=r.shadowRoot),s.mirror.removeNodeFromMap(n),r){var i=null,o="__sn"in r?s.fragmentParentMap.get(r):void 0;o&&o.contains(n)?r=o:s.fragmentParentMap.has(n)&&(i=s.fragmentParentMap.get(n),s.fragmentParentMap.delete(n),n=i);try{r.removeChild(n)}catch(t){if(!(t instanceof DOMException))throw t;s.warn("parent could not remove child in mutation",r,o,n,i,e)}}}));var u=r({},this.legacy_missingNodeRetryMap),l=[],c=function(e){var r,i;if(!s.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var o=s.mirror.getNode(e.parentId);if(!o)return e.node.type===t.Document?s.newDocumentQueue.push(e):l.push(e);var a=null;s.iframe.contentDocument.contains?a=s.iframe.contentDocument.contains(o):s.iframe.contentDocument.body.contains&&(a=s.iframe.contentDocument.body.contains(o));var c=(null===(i=(r=o).getElementsByTagName)||void 0===i?void 0:i.call(r,"iframe").length)>0;if(n&&a&&!ue(o)&&!c){var d=document.createDocumentFragment();for(s.mirror.map[e.parentId]=d,s.fragmentParentMap.set(d,o),s.storeState(o);o.firstChild;)d.appendChild(o.firstChild);o=d}e.node.isShadow&&ce(o)&&(o=o.shadowRoot);var h=null,f=null;if(e.previousId&&(h=s.mirror.getNode(e.previousId)),e.nextId&&(f=s.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=s.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return l.push(e);if(!e.node.rootId||s.mirror.getNode(e.node.rootId)){var m=e.node.rootId?s.mirror.getNode(e.node.rootId):s.iframe.contentDocument;if(ue(o))s.attachDocumentToIframe(e,o);else{var p=Q(e.node,{doc:m,map:s.mirror.map,skipChild:!0,hackCss:!0,cache:s.cache});if(-1!==e.previousId&&-1!==e.nextId){if(h&&h.nextSibling&&h.nextSibling.parentNode)o.insertBefore(p,h.nextSibling);else if(f&&f.parentNode)o.contains(f)?o.insertBefore(p,f):o.insertBefore(p,null);else{if(o===m)for(;m.firstChild;)m.removeChild(m.firstChild);o.appendChild(p)}if(ue(p)){var _=s.newDocumentQueue.find((function(e){return e.parentId===p.__sn.id}));if(_&&(s.attachDocumentToIframe(_,p),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==_}))),p.contentDocument){var g=p.contentDocument,y=g.documentElement,v=g.head;s.insertStyleRules(y,v)}}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(u,o,p,e)}else u[e.node.id]={node:p,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var d=Date.now();l.length;){var h=ae(l);if(l.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",h);break}try{for(var f=(o=void 0,i(h)),m=f.next();!m.done;m=f.next()){var p=m.value;this.mirror.getNode(p.value.parentId)?se(p,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",p)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}}Object.keys(u).length&&Object.assign(this.legacy_missingNodeRetryMap,u),e.texts.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}for(var r in s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var i=t.attributes[r];if(null===i)n.removeAttribute(r);else if("string"==typeof i)try{n.setAttribute(r,i)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===r){var o=i,a=n;for(var u in o)if(!1===o[u])a.style.removeProperty(u);else if(o[u]instanceof Array){var l=o[u];a.style.setProperty(u,l[0],l[1])}else{var c=o[u];a.style.setProperty(u,c)}}}}))},n.prototype.applyScroll=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},n.prototype.applyInput=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},n.prototype.legacy_resolveMissingNode=function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var u=a,l=u.node,c=u.mutation;t.insertBefore(l,n),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,l,c)}if(s){var d=s;l=d.node,c=d.mutation;t.insertBefore(l,n.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,l,c)}},n.prototype.moveAndHover=function(e,t,n,r,i){var o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(i,n);var a=le(o,this.iframe),s=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=s+"px",this.mouse.style.top=u+"px",r||this.drawMouseTail({x:s,y:u}),this.hoverElements(o)},n.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?lt:Object.assign({},lt,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}},n.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},n.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},n.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(e.ReplayerEvents.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},n.prototype.restoreRealParent=function(e,n){this.mirror.map[n.__sn.id]=n,n.__sn.type===t.Element&&"textarea"===n.__sn.tagName&&e.textContent&&(n.value=e.textContent),n.appendChild(e),this.restoreState(n)},n.prototype.storeState=function(e){var t,n;if(e&&e.nodeType===e.ELEMENT_NODE){var r=e;(r.scrollLeft||r.scrollTop)&&this.elementStateMap.set(e,{scroll:[r.scrollLeft,r.scrollTop]}),"STYLE"===r.tagName&&function(e,t){var n;try{var r=Array.from((null===(n=e.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:rt.Snapshot,cssTexts:r}])}catch(e){}}(r,this.virtualStyleRulesMap);var o=r.children;try{for(var a=i(Array.from(o)),s=a.next();!s.done;s=a.next()){var u=s.value;this.storeState(u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}},n.prototype.restoreState=function(e){var t,n;if(e.nodeType===e.ELEMENT_NODE){var r=e;if(this.elementStateMap.has(e)){var o=this.elementStateMap.get(e);o.scroll&&(r.scrollLeft=o.scroll[0],r.scrollTop=o.scroll[1]),this.elementStateMap.delete(e)}var a=r.children;try{for(var s=i(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;this.restoreState(l)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},n.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);"STYLE"===e.nodeName&&(t&&at(t,e))},n.prototype.warnNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.warn("Node with id '"+t+"' was previously removed. ",e):this.warn("Node with id '"+t+"' not found. ",e)},n.prototype.warnCanvasMutationFailed=function(e,t,n){this.warn("Has error on update canvas '"+t+"'",e,n)},n.prototype.debugNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.debug(ut,"Node with id '"+t+"' was previously removed. ",e):this.debug(ut,"Node with id '"+t+"' not found. ",e)},n.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,a([ut],e))},n.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,a([ut],e))},n}(),ht=Re.addCustomEvent,ft=Re.freezePage,mt=0,pt=!1;function _t(e){e&&e.getAttribute&&null===e.getAttribute("cb-id")&&(e.setAttribute("cb-id",mt),mt++)}return e.Replayer=dt,e.addCustomEvent=ht,e.freezePage=ft,e.record=Re,e.utils=de,e.createCbId=_t,e.cbIdCount=mt,e.scrollByAgent=pt,Object.defineProperty(e,"__esModule",{value:!0}),e})),this.config=C(C({},this.config),t),this.AgentDesktop(this.config.userInfo.userId,this.config),this.koreCoBrowse=this.koreCoBrowseInit({}),this.rrweb=this.rrwebInit({})}));const H=P},37174:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(8081),i=n.n(r),o=n(23645),a=n.n(o),s=n(61667),u=n.n(s),l=new URL(n(91164),n.b),c=new URL(n(52909),n.b),d=new URL(n(59947),n.b),h=new URL(n(19173),n.b),f=a()(i()),m=u()(l),p=u()(c),_=u()(d),g=u()(h);f.push([e.id,'.header-sec-sdk-{font-family:"Lato",sans-serif;background:#fff;box-shadow:0px 0px 6px #a8c8dd;display:flex;align-items:center;padding:15px 20px}.header-sec-sdk- .name-agent{font-family:"Lato",sans-serif;font-weight:bold;font-size:16px;color:#26344a;line-height:19px;padding-left:15px}.initial-video-audio-container{font-family:"Lato",sans-serif;display:flex;align-items:center;padding:15px;background:rgba(38,52,74,.7);border:1px solid #26344a;box-sizing:border-box;border-radius:10px;position:fixed;right:28px;z-index:100000;top:25%;width:360px}.initial-video-audio-container .ad-img-block img{width:48px;height:48px;border:1px solid #fff;border-radius:100%}.initial-video-audio-container .content-desc{padding-left:15px;width:164px}.initial-video-audio-container .content-desc .name{letter-spacing:-0.24px;color:#fff;font-weight:bold;font-size:14px;line-height:20px;margin-bottom:4px}.initial-video-audio-container .content-desc .type-text{font-weight:normal;font-size:10px;line-height:14px;color:#fff}.initial-video-audio-container .controls-v-a{display:flex;align-items:center}.initial-video-audio-container .controls-v-a img{margin:0 7px;cursor:pointer}.cobrowse-toolbar{font-family:"Lato",sans-serif;display:flex;align-items:flex-start;z-index:100000;cursor:move;width:40px;height:172px;background:#fff;box-shadow:0px 2px 5px rgba(0,0,0,.25);border-radius:2px}.cobrowse-btn{cursor:pointer;width:30px;height:30px;background:#f5f8fa;border-radius:2px}.cobrowse-btn :hover{background:#e9eff4}.toolbar-image{width:30px;height:30px}#callcontainer{position:relative;height:99%;width:98%;margin-left:1%;padding:0;top:1%}.video-audio-chat-container{font-family:"Lato",sans-serif;background:#fff;border:1px solid #a8c8dd;box-sizing:border-box;box-shadow:0px 0px 0px #a8c8dd;border-radius:0px 0px 0px 0px;position:absolute;width:100%;height:100%;z-index:99999;left:0px;top:0px;padding:10px}.video-audio-chat-container .video-chat-{height:60%}.video-audio-chat-container .video-chat- .video-view-{width:100%;height:100%}.video-audio-chat-container .video-chat- .video-view-.audio-view-{height:calc(100% - 60px);display:flex;align-items:center;justify-content:center;flex-direction:column}.video-audio-chat-container .video-chat- .video-view-.audio-view- .agent-profile-img{height:30px;width:30px;top:30%;position:absolute;border-radius:50%}.video-audio-chat-container .video-chat- .video-view-.audio-view- .title{color:#3c4043;font-weight:normal;font-size:12px;line-height:20px;margin-bottom:8px;position:absolute;top:55%}.video-audio-chat-container .video-chat- .video-view-.audio-view- .audio-info{color:#8a959f;font-weight:normal;font-size:10px;line-height:20px;position:absolute;top:70%}.video-audio-chat-container .video-chat- .video-view- video{width:100%;height:100%}.video-audio-chat-container .video-chat- .video-name-title{background:#fff;border-bottom:0px solid #a8c8dd;box-sizing:border-box;border-radius:0px 0px 0px 0px;padding:0px 0px;height:14px;display:flex;align-items:center;letter-spacing:-0.24px;font-weight:600;font-size:14px;line-height:20px;color:#202124;cursor:default;top:8%;position:absolute;z-index:1}.video-audio-chat-container .self-video-container{position:absolute;width:25%;height:30%;cursor:move;border-radius:5px;background:#a8c8dd;z-index:1}.video-audio-chat-container .self-video-container .self-video{height:70%;left:6%;top:17%;position:absolute}.video-audio-chat-container .self-video-container .self-video video{width:100%;height:100%}.video-audio-chat-container .self-video-container .self-video img{width:100%;height:100%}.video-audio-chat-container .self-video-container .self-video .video-user-alphabet{width:35px;height:35px;display:flex;align-items:center;justify-content:center;background:#ffbeb6;border:2px solid #fff;border-radius:100%;color:#000;font-weight:bold;font-size:10px;line-height:29px;margin:0 auto;position:absolute;top:0;right:0;left:10px;bottom:0}.video-audio-chat-container .self-video-container.minimize-video{width:40px !important;height:43px !important}.video-audio-chat-container .self-video-container .close-video{position:absolute;top:10px;right:5px;cursor:pointer}.video-audio-chat-container .self-video-container .turn-off-video{position:absolute;bottom:5px;width:34px;height:34px;background:#fff;display:flex;align-items:center;justify-content:center;border-radius:100%;margin:0 auto;left:0;right:0;cursor:pointer}.video-audio-chat-container .self-video-container .turn-off-video .t-off{display:none}.video-audio-chat-container .self-video-container .turn-off-video .t-on{display:block}.video-audio-chat-container .self-video-container .turn-off-video.off-on-action .t-off{display:block}.video-audio-chat-container .self-video-container .turn-off-video.off-on-action .t-on{display:none}.video-audio-chat-container .footer-btn-a-v-attch{display:flex;align-items:center;justify-content:center;padding:5px 0;position:relative;background:#fff;border:1px solid #a8c8dd;box-sizing:border-box;border-radius:0px 0px 0px 0px;border-left:0;border-right:0;position:absolute;top:2%;width:94%}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions{background:#de0742;border:1px solid #de0742;width:24px;height:24px;border-radius:100%;display:flex;align-items:center;justify-content:center;margin:0 10px;cursor:pointer}.action-minimize-audio-control{position:absolute;top:10%;right:5%}.maximize-video{width:34px;height:34px;background:#fff;display:flex;align-items:center;justify-content:center;border-radius:100%;cursor:pointer;margin-bottom:15px}.show-self-video{width:34px;height:34px;background:#fff;display:flex;align-items:center;justify-content:center;border-radius:100%;cursor:pointer;margin-bottom:15px}.show-self-video-container{position:absolute;top:30%;right:5%}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.enable-video.active-{background:#bdc1c6;border:1px solid #bdc1c6}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.enable-video.active- .video-unmute{display:block}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.enable-video.active- .video-mute{display:none}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.enable-video .video-unmute{display:none}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.close-audio{background:#de0742;border:1px solid rgba(0,0,0,0)}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.mute-audio.active-{background:#de0742;border:1px solid #de0742}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.mute-audio.active- .un-mute{display:block}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.mute-audio.active- .mute-img{display:none}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.mute-audio .un-mute{display:none}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.screen-share.active-{background:#85b7fe;border:1px solid rgba(0,0,0,0)}.video-audio-chat-container .footer-btn-a-v-attch .btn_actions.enable-audio{background:#de0742;border:1px solid rgba(0,0,0,0)}.video-audio-chat-container .footer-btn-a-v-attch .lablel-video-switch{position:absolute;right:0;top:39px;color:#009dab;text-decoration-line:underline;font-weight:normal;font-size:12px;line-height:15px;padding-right:35px;cursor:pointer}.video-audio-chat-container .footer-btn-a-v-attch .lablel-audio-switch{position:absolute;left:0;top:39px;color:#009dab;text-decoration-line:underline;font-weight:normal;font-size:12px;line-height:15px;padding-left:35px;cursor:pointer}.system-template{position:relative;border-bottom:1px solid var(--sdk-chat-widow-primary-border-color);margin-bottom:30px;font-weight:400;margin-top:20px;text-align:center}.system-template-msg{position:relative;top:8px;background:var(--sdk-chat-widow-default-white);padding:0px 10px;display:initial;width:137px;color:#333;margin-left:0;margin-top:43x;font-weight:bold;font-size:12px}.agent-mouse{position:absolute;z-index:10000;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url('+m+');border-color:rgba(0,0,0,0)}.agent-mouse-circle{content:"";display:inline-block;width:20px;height:20px;background:#4950f6;border-radius:100%;transform:translate(-50%, -50%);opacity:.3}.agent-bot{display:block;background:#009dab;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;padding:6px;width:36px;height:36px;cursor:pointer;position:fixed;right:0}.replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url('+m+');border-color:rgba(0,0,0,0)}.replayer-mouse:after{content:"";display:inline-block;width:20px;height:20px;background:#4950f6;border-radius:100%;transform:translate(-50%, -50%);opacity:.3}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}.kore-chat-window ul.chat-container li.fromCurrentUser .extra-info{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:row-reverse}li.fromCurrentUser .sentIndicator{position:relative;top:1px;margin-right:5px;width:12px;height:12px;background-size:100%;background-repeat:no-repeat;background-position:center;background-image:url('+p+")}li.fromCurrentUser .sentIndicator.delivered{background-image:url("+_+")}li.fromCurrentUser .sentIndicator.read{background-image:url("+g+")}.agent-type-icon{background-image:var(--sdk-chat-widow-agent-icon) !important;position:relative;top:5px}",""]);const y=f},23645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);r&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},61667:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:e=>{e.exports=function(e){return e[1]}},19755:function(e,t){var n,r,i;r="undefined"!=typeof window?window:this,i=function(r,i){var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},l=o.push,c=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,m=f.toString,p=m.call(Object),_={},g=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},v=r.document,M={type:!0,src:!0,nonce:!0,noModule:!0};function T(e,t,n){var r,i,o=(n=n||v).createElement("script");if(o.text=e,t)for(r in M)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var w="3.6.4",D=function(e,t){return new D.fn.init(e,t)};function L(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}D.fn=D.prototype={jquery:w,constructor:D,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=D.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return D.each(this,e)},map:function(e){return this.pushStack(D.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(D.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(D.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:o.sort,splice:o.splice},D.extend=D.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(D.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||D.isPlainObject(n)?n:{},i=!1,a[t]=D.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},D.extend({expando:"jQuery"+(w+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e)||(t=a(e))&&("function"!=typeof(n=f.call(t,"constructor")&&t.constructor)||m.call(n)!==p))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){T(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(L(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(L(Object(e))?D.merge(n,"string"==typeof e?[e]:e):l.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:c.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(L(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return u(a)},guid:1,support:_}),"function"==typeof Symbol&&(D.fn[Symbol.iterator]=o[Symbol.iterator]),D.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var S=function(e){var t,n,r,i,o,a,s,u,l,c,d,h,f,m,p,_,g,y,v,M="sizzle"+1*new Date,T=e.document,b=0,w=0,D=ue(),L=ue(),S=ue(),k=ue(),A=function(e,t){return e===t&&(d=!0),0},E={}.hasOwnProperty,I=[],N=I.pop,x=I.push,C=I.push,j=I.slice,Y=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",z="(?:\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",P="\\["+R+"*("+z+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+z+"))|)"+R+"*\\]",H=":("+z+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",U=new RegExp(R+"+","g"),F=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),W=new RegExp("^"+R+"*,"+R+"*"),Q=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),B=new RegExp(R+"|>"),q=new RegExp(H),V=new RegExp("^"+z+"$"),G={ID:new RegExp("^#("+z+")"),CLASS:new RegExp("^\\.("+z+")"),TAG:new RegExp("^("+z+"|[*])"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,Z=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},ae=Me((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{C.apply(I=j.call(T.childNodes),T.childNodes),I[T.childNodes.length].nodeType}catch(e){C={apply:I.length?function(e,t){x.apply(e,j.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,d,m,g,y=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&(h(t),t=t||f,p)){if(11!==T&&(d=$.exec(e)))if(o=d[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&v(t,l)&&l.id===o)return r.push(l),r}else{if(d[2])return C.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return C.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!k[e+" "]&&(!_||!_.test(e))&&(1!==T||"object"!==t.nodeName.toLowerCase())){if(g=e,y=t,1===T&&(B.test(e)||Q.test(e))){for((y=ee.test(e)&&ge(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=M)),s=(m=a(e)).length;s--;)m[s]=(c?"#"+c:":scope")+" "+ve(m[s]);g=m.join(",")}try{return C.apply(r,y.querySelectorAll(g)),r}catch(t){k(e,!0)}finally{c===M&&t.removeAttribute("id")}}}return u(e.replace(F,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[M]=!0,e}function ce(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function me(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function _e(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!J.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:T;return a!=f&&9===a.nodeType&&a.documentElement?(m=(f=a).documentElement,p=!o(f),T!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return m.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.cssHas=ce((function(){try{return f.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(f.getElementsByClassName),n.getById=ce((function(e){return m.appendChild(e).id=M,!f.getElementsByName||!f.getElementsByName(M).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&p)return t.getElementsByClassName(e)},g=[],_=[],(n.qsa=X.test(f.querySelectorAll))&&(ce((function(e){var t;m.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\["+R+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+M+"-]").length||_.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||_.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||_.push(".#.+[+~]"),e.querySelectorAll("\\\f"),_.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name"+R+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&_.push(":enabled",":disabled"),m.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")}))),(n.matchesSelector=X.test(y=m.matches||m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",H)})),n.cssHas||_.push(":has"),_=_.length&&new RegExp(_.join("|")),g=g.length&&new RegExp(g.join("|")),t=X.test(m.compareDocumentPosition),v=t||X.test(m.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==f||e.ownerDocument==T&&v(T,e)?-1:t==f||t.ownerDocument==T&&v(T,t)?1:c?Y(c,e)-Y(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==f?-1:t==f?1:i?-1:o?1:c?Y(c,e)-Y(c,t):0;if(i===o)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?he(a[r],s[r]):a[r]==T?-1:s[r]==T?1:0},f):f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&p&&!k[t+" "]&&(!g||!g.test(t))&&(!_||!_.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,!0)}return se(t,f,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=f&&h(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=f&&h(e);var i=r.attrHandle[t.toLowerCase()],o=i&&E.call(r.attrHandle,t.toLowerCase())?i(e,t,!p):void 0;return void 0!==o?o:n.attributes||!p?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),d){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},r=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=D[e+" "];return t||(t=new RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&D(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,h,f,m,p=o!==a?"nextSibling":"previousSibling",_=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!u&&!s,v=!1;if(_){if(o){for(;p;){for(h=t;h=h[p];)if(s?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;m=p="only"===e&&!m&&"nextSibling"}return!0}if(m=[a?_.firstChild:_.lastChild],a&&y){for(v=(f=(l=(c=(d=(h=_)[M]||(h[M]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===b&&l[1])&&l[2],h=f&&_.childNodes[f];h=++f&&h&&h[p]||(v=f=0)||m.pop();)if(1===h.nodeType&&++v&&h===t){c[e]=[b,f,v];break}}else if(y&&(v=f=(l=(c=(d=(h=t)[M]||(h[M]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===b&&l[1]),!1===v)for(;(h=++f&&h&&h[p]||(v=f=0)||m.pop())&&((s?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++v||(y&&((c=(d=h[M]||(h[M]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[b,v]),h!==t)););return(v-=i)===r||v%r==0&&v/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[M]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=Y(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(F,"$1"));return r[M]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return V.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===m},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:_e((function(){return[0]})),last:_e((function(e,t){return[t-1]})),eq:_e((function(e,t,n){return[n<0?n+t:n]})),even:_e((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:_e((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:_e((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:_e((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=me(t);function ye(){}function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=w++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,d,h=[b,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(d=t[M]||(t[M]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===b&&l[1]===s)return h[2]=l[2];if(c[o]=h,h[2]=e(t,n,u))return!0}return!1}}function Te(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function we(e,t,n,r,i,o){return r&&!r[M]&&(r=we(r)),i&&!i[M]&&(i=we(i,o)),le((function(o,a,s,u){var l,c,d,h=[],f=[],m=a.length,p=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),_=!e||!o&&t?p:be(p,h,e,s,u),g=n?i||(o?e:m||r)?[]:a:_;if(n&&n(_,g,s,u),r)for(l=be(g,f),r(l,[],s,u),c=l.length;c--;)(d=l[c])&&(g[f[c]]=!(_[f[c]]=d));if(o){if(i||e){if(i){for(l=[],c=g.length;c--;)(d=g[c])&&l.push(_[c]=d);i(null,g=[],l,u)}for(c=g.length;c--;)(d=g[c])&&(l=i?Y(o,d):h[c])>-1&&(o[l]=!(a[l]=d))}}else g=be(g===a?g.splice(m,g.length):g),i?i(null,a,g,u):C.apply(a,g)}))}function De(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=Me((function(e){return e===t}),s,!0),d=Me((function(e){return Y(t,e)>-1}),s,!0),h=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])h=[Me(Te(h),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[M]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return we(u>1&&Te(h),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(F,"$1"),n,u<i&&De(e.slice(u,i)),i<o&&De(e=e.slice(i)),i<o&&ve(e))}h.push(n)}return Te(h)}return ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=se.tokenize=function(e,t){var n,i,o,a,s,u,l,c=L[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(i=W.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=Q.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(F," ")}),s=s.slice(n.length)),r.filter)!(i=G[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):L(e,u).slice(0)},s=se.compile=function(e,t){var n,i=[],o=[],s=S[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=De(t[n]))[M]?i.push(s):o.push(s);s=S(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var d,m,_,g=0,y="0",v=o&&[],M=[],T=l,w=o||i&&r.find.TAG("*",c),D=b+=null==T?1:Math.random()||.1,L=w.length;for(c&&(l=a==f||a||c);y!==L&&null!=(d=w[y]);y++){if(i&&d){for(m=0,a||d.ownerDocument==f||(h(d),s=!p);_=e[m++];)if(_(d,a||f,s)){u.push(d);break}c&&(b=D)}n&&((d=!_&&d)&&g--,o&&v.push(d))}if(g+=y,n&&y!==g){for(m=0;_=t[m++];)_(v,M,a,s);if(o){if(g>0)for(;y--;)v[y]||M[y]||(M[y]=N.call(u));M=be(M)}C.apply(u,M),c&&!o&&M.length>0&&g+t.length>1&&se.uniqueSort(u)}return c&&(b=D,l=T),v};return n?le(o):o}(o,i)),s.selector=e}return s},u=se.select=function(e,t,n,i){var o,u,l,c,d,h="function"==typeof e&&e,f=!i&&a(e=h.selector||e);if(n=n||[],1===f.length){if((u=f[0]=f[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&p&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=G.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((d=r.find[c])&&(i=d(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return C.apply(n,i),n;break}}return(h||s(e,f))(i,t,!p,n,!t||ee.test(e)&&ge(t.parentNode)||t),n},n.sortStable=M.split("").sort(A).join("")===M,n.detectDuplicates=!!d,h(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||de(O,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);D.find=S,D.expr=S.selectors,D.expr[":"]=D.expr.pseudos,D.uniqueSort=D.unique=S.uniqueSort,D.text=S.getText,D.isXMLDoc=S.isXML,D.contains=S.contains,D.escapeSelector=S.escape;var k=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&D(e).is(n))break;r.push(e)}return r},A=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},E=D.expr.match.needsContext;function I(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function x(e,t,n){return g(t)?D.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?D.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?D.grep(e,(function(e){return c.call(t,e)>-1!==n})):D.filter(t,e,n)}D.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?D.find.matchesSelector(r,e)?[r]:[]:D.find.matches(e,D.grep(t,(function(e){return 1===e.nodeType})))},D.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(D(e).filter((function(){for(t=0;t<r;t++)if(D.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)D.find(e,i[t],n);return r>1?D.uniqueSort(n):n},filter:function(e){return this.pushStack(x(this,e||[],!1))},not:function(e){return this.pushStack(x(this,e||[],!0))},is:function(e){return!!x(this,"string"==typeof e&&E.test(e)?D(e):e||[],!1).length}});var C,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(D.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||C,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:j.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof D?t[0]:t,D.merge(this,D.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:v,!0)),N.test(r[1])&&D.isPlainObject(t))for(r in t)g(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=v.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(D):D.makeArray(e,this)}).prototype=D.fn,C=D(v);var Y=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function R(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}D.fn.extend({has:function(e){var t=D(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(D.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&D(e);if(!E.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&D.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?D.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(D(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(D.uniqueSort(D.merge(this.get(),D(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),D.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return R(e,"nextSibling")},prev:function(e){return R(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return A((e.parentNode||{}).firstChild,e)},children:function(e){return A(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(I(e,"template")&&(e=e.content||e),D.merge([],e.childNodes))}},(function(e,t){D.fn[e]=function(n,r){var i=D.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=D.filter(r,i)),this.length>1&&(O[e]||D.uniqueSort(i),Y.test(e)&&i.reverse()),this.pushStack(i)}}));var z=/[^\x20\t\r\n\f]+/g;function P(e){return e}function H(e){throw e}function U(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}D.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return D.each(e.match(z)||[],(function(e,n){t[n]=!0})),t}(e):D.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){D.each(n,(function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==b(r)&&t(r)}))}(arguments),n&&!t&&u()),this},remove:function(){return D.each(arguments,(function(e,t){for(var n;(n=D.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?D.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},D.extend({Deferred:function(e){var t=[["notify","progress",D.Callbacks("memory"),D.Callbacks("memory"),2],["resolve","done",D.Callbacks("once memory"),D.Callbacks("once memory"),0,"resolved"],["reject","fail",D.Callbacks("once memory"),D.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return D.Deferred((function(n){D.each(t,(function(t,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var o=0;function a(e,t,n,i){return function(){var s=this,u=arguments,l=function(){var r,l;if(!(e<o)){if((r=n.apply(s,u))===t.promise())throw new TypeError("Thenable self-resolution");l=r&&("object"==typeof r||"function"==typeof r)&&r.then,g(l)?i?l.call(r,a(o,t,P,i),a(o,t,H,i)):(o++,l.call(r,a(o,t,P,i),a(o,t,H,i),a(o,t,P,t.notifyWith))):(n!==P&&(s=void 0,u=[r]),(i||t.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(r){D.Deferred.exceptionHook&&D.Deferred.exceptionHook(r,c.stackTrace),e+1>=o&&(n!==H&&(s=void 0,u=[r]),t.rejectWith(s,u))}};e?c():(D.Deferred.getStackHook&&(c.stackTrace=D.Deferred.getStackHook()),r.setTimeout(c))}}return D.Deferred((function(r){t[0][3].add(a(0,r,g(i)?i:P,r.notifyWith)),t[1][3].add(a(0,r,g(e)?e:P)),t[2][3].add(a(0,r,g(n)?n:H))})).promise()},promise:function(e){return null!=e?D.extend(e,i):i}},o={};return D.each(t,(function(e,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=D.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(U(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)U(i[n],a(n),o.reject);return o.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;D.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&F.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},D.readyException=function(e){r.setTimeout((function(){throw e}))};var W=D.Deferred();function Q(){v.removeEventListener("DOMContentLoaded",Q),r.removeEventListener("load",Q),D.ready()}D.fn.ready=function(e){return W.then(e).catch((function(e){D.readyException(e)})),this},D.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--D.readyWait:D.isReady)||(D.isReady=!0,!0!==e&&--D.readyWait>0||W.resolveWith(v,[D]))}}),D.ready.then=W.then,"complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll?r.setTimeout(D.ready):(v.addEventListener("DOMContentLoaded",Q),r.addEventListener("load",Q));var B=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===b(n))for(s in i=!0,n)B(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(D(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},q=/^-ms-/,V=/-([a-z])/g;function G(e,t){return t.toUpperCase()}function J(e){return e.replace(q,"ms-").replace(V,G)}var Z=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function K(){this.expando=D.expando+K.uid++}K.uid=1,K.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Z(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[J(t)]=n;else for(r in t)i[J(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][J(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(J):(t=J(t))in r?[t]:t.match(z)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||D.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!D.isEmptyObject(t)}};var X=new K,$=new K,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}$.set(e,t,n)}else n=void 0;return n}D.extend({hasData:function(e){return $.hasData(e)||X.hasData(e)},data:function(e,t,n){return $.access(e,t,n)},removeData:function(e,t){$.remove(e,t)},_data:function(e,t,n){return X.access(e,t,n)},_removeData:function(e,t){X.remove(e,t)}}),D.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=$.get(o),1===o.nodeType&&!X.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=J(r.slice(5)),ne(o,r,i[r]));X.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){$.set(this,e)})):B(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=$.get(o,e))||void 0!==(n=ne(o,e))?n:void 0;this.each((function(){$.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){$.remove(this,e)}))}}),D.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=X.get(e,t),n&&(!r||Array.isArray(n)?r=X.access(e,t,D.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=D.queue(e,t),r=n.length,i=n.shift(),o=D._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){D.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:D.Callbacks("once memory").add((function(){X.remove(e,[t+"queue",n])}))})}}),D.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?D.queue(this[0],e):void 0===t?this:this.each((function(){var n=D.queue(this,e,t);D._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&D.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){D.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=D.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=X.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=v.documentElement,se=function(e){return D.contains(e.ownerDocument,e)},ue={composed:!0};ae.getRootNode&&(se=function(e){return D.contains(e.ownerDocument,e)||e.getRootNode(ue)===e.ownerDocument});var le=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===D.css(e,"display")};function ce(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return D.css(e,t,"")},u=s(),l=n&&n[3]||(D.cssNumber[t]?"":"px"),c=e.nodeType&&(D.cssNumber[t]||"px"!==l&&+u)&&ie.exec(D.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)D.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,D.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var de={};function he(e){var t,n=e.ownerDocument,r=e.nodeName,i=de[r];return i||(t=n.body.appendChild(n.createElement(r)),i=D.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),de[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=X.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&le(r)&&(i[o]=he(r))):"none"!==n&&(i[o]="none",X.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}D.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){le(this)?D(this).show():D(this).hide()}))}});var me,pe,_e=/^(?:checkbox|radio)$/i,ge=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;me=v.createDocumentFragment().appendChild(v.createElement("div")),(pe=v.createElement("input")).setAttribute("type","radio"),pe.setAttribute("checked","checked"),pe.setAttribute("name","t"),me.appendChild(pe),_.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="<textarea>x</textarea>",_.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue,me.innerHTML="<option></option>",_.option=!!me.lastChild;var ve={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 Me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&I(e,t)?D.merge([e],n):n}function Te(e,t){for(var n=0,r=e.length;n<r;n++)X.set(e[n],"globalEval",!t||X.get(t[n],"globalEval"))}ve.tbody=ve.tfoot=ve.colgroup=ve.caption=ve.thead,ve.th=ve.td,_.option||(ve.optgroup=ve.option=[1,"<select multiple='multiple'>","</select>"]);var be=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,a,s,u,l,c,d=t.createDocumentFragment(),h=[],f=0,m=e.length;f<m;f++)if((o=e[f])||0===o)if("object"===b(o))D.merge(h,o.nodeType?[o]:o);else if(be.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(ge.exec(o)||["",""])[1].toLowerCase(),u=ve[s]||ve._default,a.innerHTML=u[1]+D.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;D.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&D.inArray(o,r)>-1)i&&i.push(o);else if(l=se(o),a=Me(d.appendChild(o),"script"),l&&Te(a),n)for(c=0;o=a[c++];)ye.test(o.type||"")&&n.push(o);return d}var De=/^([^.]*)(?:\.(.+)|)/;function Le(){return!0}function Se(){return!1}function ke(e,t){return e===function(){try{return v.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,i=function(e){return D().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=D.guid++)),e.each((function(){D.event.add(this,t,i,r,n)}))}function Ee(e,t,n){n?(X.set(e,t,!1),D.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=X.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(D.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),X.set(this,t,o),r=n(this,t),this[t](),o!==(i=X.get(this,t))||r?X.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(X.set(this,t,{value:D.event.trigger(D.extend(o[0],D.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===X.get(e,t)&&D.event.add(e,t,Le)}D.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,d,h,f,m,p,_=X.get(e);if(Z(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&D.find.matchesSelector(ae,i),n.guid||(n.guid=D.guid++),(u=_.events)||(u=_.events=Object.create(null)),(a=_.handle)||(a=_.handle=function(t){return void 0!==D&&D.event.triggered!==t.type?D.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(z)||[""]).length;l--;)f=p=(s=De.exec(t[l])||[])[1],m=(s[2]||"").split(".").sort(),f&&(d=D.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=D.event.special[f]||{},c=D.extend({type:f,origType:p,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&D.expr.match.needsContext.test(i),namespace:m.join(".")},o),(h=u[f])||((h=u[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,m,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),D.event.global[f]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,d,h,f,m,p,_=X.hasData(e)&&X.get(e);if(_&&(u=_.events)){for(l=(t=(t||"").match(z)||[""]).length;l--;)if(f=p=(s=De.exec(t[l])||[])[1],m=(s[2]||"").split(".").sort(),f){for(d=D.event.special[f]||{},h=u[f=(r?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&p!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,m,_.handle)||D.removeEvent(e,f,_.handle),delete u[f])}else for(f in u)D.event.remove(e,f+t[l],n,r,!0);D.isEmptyObject(u)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=D.event.fix(e),l=(X.get(this,"events")||Object.create(null))[u.type]||[],c=D.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(a=D.event.handlers.call(this,u,l),t=0;(i=a[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((D.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?D(i,this).index(l)>-1:D.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(D.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[D.expando]?e:new D.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return _e.test(t.type)&&t.click&&I(t,"input")&&Ee(t,"click",Le),!1},trigger:function(e){var t=this||e;return _e.test(t.type)&&t.click&&I(t,"input")&&Ee(t,"click"),!0},_default:function(e){var t=e.target;return _e.test(t.type)&&t.click&&I(t,"input")&&X.get(t,"click")||I(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},D.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},D.Event=function(e,t){if(!(this instanceof D.Event))return new D.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Le:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&D.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[D.expando]=!0},D.Event.prototype={constructor:D.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Le,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Le,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Le,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},D.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},D.event.addProp),D.each({focus:"focusin",blur:"focusout"},(function(e,t){D.event.special[e]={setup:function(){return Ee(this,e,ke),!1},trigger:function(){return Ee(this,e),!0},_default:function(t){return X.get(t.target,e)},delegateType:t}})),D.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){D.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||D.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),D.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,D(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Se),this.each((function(){D.event.remove(this,e,n,t)}))}});var Ie=/<script|<style|<link/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,xe=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ce(e,t){return I(e,"table")&&I(11!==t.nodeType?t:t.firstChild,"tr")&&D(e).children("tbody")[0]||e}function je(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ye(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(X.hasData(e)&&(s=X.get(e).events))for(i in X.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)D.event.add(t,i,s[i][n]);$.hasData(e)&&(o=$.access(e),a=D.extend({},o),$.set(t,a))}}function Re(e,t){var n=t.nodeName.toLowerCase();"input"===n&&_e.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function ze(e,t,n,r){t=u(t);var i,o,a,s,l,c,d=0,h=e.length,f=h-1,m=t[0],p=g(m);if(p||h>1&&"string"==typeof m&&!_.checkClone&&Ne.test(m))return e.each((function(i){var o=e.eq(i);p&&(t[0]=m.call(this,i,o.html())),ze(o,t,n,r)}));if(h&&(o=(i=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=D.map(Me(i,"script"),je)).length;d<h;d++)l=i,d!==f&&(l=D.clone(l,!0,!0),s&&D.merge(a,Me(l,"script"))),n.call(e[d],l,d);if(s)for(c=a[a.length-1].ownerDocument,D.map(a,Ye),d=0;d<s;d++)l=a[d],ye.test(l.type||"")&&!X.access(l,"globalEval")&&D.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?D._evalUrl&&!l.noModule&&D._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):T(l.textContent.replace(xe,""),l,c))}return e}function Pe(e,t,n){for(var r,i=t?D.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||D.cleanData(Me(r)),r.parentNode&&(n&&se(r)&&Te(Me(r,"script")),r.parentNode.removeChild(r));return e}D.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=se(e);if(!(_.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||D.isXMLDoc(e)))for(a=Me(s),r=0,i=(o=Me(e)).length;r<i;r++)Re(o[r],a[r]);if(t)if(n)for(o=o||Me(e),a=a||Me(s),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,s);return(a=Me(s,"script")).length>0&&Te(a,!u&&Me(e,"script")),s},cleanData:function(e){for(var t,n,r,i=D.event.special,o=0;void 0!==(n=e[o]);o++)if(Z(n)){if(t=n[X.expando]){if(t.events)for(r in t.events)i[r]?D.event.remove(n,r):D.removeEvent(n,r,t.handle);n[X.expando]=void 0}n[$.expando]&&(n[$.expando]=void 0)}}}),D.fn.extend({detach:function(e){return Pe(this,e,!0)},remove:function(e){return Pe(this,e)},text:function(e){return B(this,(function(e){return void 0===e?D.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ze(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ce(this,e).appendChild(e)}))},prepend:function(){return ze(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ce(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(D.cleanData(Me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return D.clone(this,e,t)}))},html:function(e){return B(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ie.test(e)&&!ve[(ge.exec(e)||["",""])[1].toLowerCase()]){e=D.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(D.cleanData(Me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return ze(this,arguments,(function(t){var n=this.parentNode;D.inArray(this,e)<0&&(D.cleanData(Me(this)),n&&n.replaceChild(t,this))}),e)}}),D.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){D.fn[e]=function(e){for(var n,r=[],i=D(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),D(i[a])[t](n),l.apply(r,n.get());return this.pushStack(r)}}));var He=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Ue=/^--/,Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Qe=new RegExp(oe.join("|"),"i"),Be="[\\x20\\t\\r\\n\\f]",qe=new RegExp("^"+Be+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Be+"+$","g");function Ve(e,t,n){var r,i,o,a,s=Ue.test(t),u=e.style;return(n=n||Fe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(qe,"$1")||void 0),""!==a||se(e)||(a=D.style(e,t)),!_.pixelBoxStyles()&&He.test(a)&&Qe.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ge(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(l).appendChild(c);var e=r.getComputedStyle(c);n="1%"!==e.top,u=12===t(e.marginLeft),c.style.right="60%",a=36===t(e.right),i=36===t(e.width),c.style.position="absolute",o=12===t(c.offsetWidth/3),ae.removeChild(l),c=null}}function t(e){return Math.round(parseFloat(e))}var n,i,o,a,s,u,l=v.createElement("div"),c=v.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",_.clearCloneStyle="content-box"===c.style.backgroundClip,D.extend(_,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,n,i;return null==s&&(e=v.createElement("table"),t=v.createElement("tr"),n=v.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",ae.appendChild(e).appendChild(t).appendChild(n),i=r.getComputedStyle(t),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===t.offsetHeight,ae.removeChild(e)),s}}))}();var Je=["Webkit","Moz","ms"],Ze=v.createElement("div").style,Ke={};function Xe(e){var t=D.cssProps[e]||Ke[e];return t||(e in Ze?e:Ke[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Je.length;n--;)if((e=Je[n]+t)in Ze)return e}(e)||e)}var $e=/^(none|table(?!-c[ea]).+)/,et={position:"absolute",visibility:"hidden",display:"block"},tt={letterSpacing:"0",fontWeight:"400"};function nt(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function rt(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=D.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=D.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=D.css(e,"border"+oe[a]+"Width",!0,i))):(u+=D.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=D.css(e,"border"+oe[a]+"Width",!0,i):s+=D.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function it(e,t,n){var r=Fe(e),i=(!_.boxSizingReliable()||n)&&"border-box"===D.css(e,"boxSizing",!1,r),o=i,a=Ve(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(a)){if(!n)return a;a="auto"}return(!_.boxSizingReliable()&&i||!_.reliableTrDimensions()&&I(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===D.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===D.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+rt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function ot(e,t,n,r,i){return new ot.prototype.init(e,t,n,r,i)}D.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ve(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=J(t),u=Ue.test(t),l=e.style;if(u||(t=Xe(s)),a=D.cssHooks[t]||D.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ce(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(D.cssNumber[s]?"":"px")),_.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=J(t);return Ue.test(t)||(t=Xe(s)),(a=D.cssHooks[t]||D.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ve(e,t,r)),"normal"===i&&t in tt&&(i=tt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),D.each(["height","width"],(function(e,t){D.cssHooks[t]={get:function(e,n,r){if(n)return!$e.test(D.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?it(e,t,r):We(e,et,(function(){return it(e,t,r)}))},set:function(e,n,r){var i,o=Fe(e),a=!_.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===D.css(e,"boxSizing",!1,o),u=r?rt(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-rt(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=D.css(e,t)),nt(0,n,u)}}})),D.cssHooks.marginLeft=Ge(_.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ve(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),D.each({margin:"",padding:"",border:"Width"},(function(e,t){D.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(D.cssHooks[e+t].set=nt)})),D.fn.extend({css:function(e,t){return B(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;a<i;a++)o[t[a]]=D.css(e,t[a],!1,r);return o}return void 0!==n?D.style(e,t,n):D.css(e,t)}),e,t,arguments.length>1)}}),D.Tween=ot,ot.prototype={constructor:ot,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||D.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(D.cssNumber[n]?"":"px")},cur:function(){var e=ot.propHooks[this.prop];return e&&e.get?e.get(this):ot.propHooks._default.get(this)},run:function(e){var t,n=ot.propHooks[this.prop];return this.options.duration?this.pos=t=D.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ot.propHooks._default.set(this),this}},ot.prototype.init.prototype=ot.prototype,ot.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=D.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){D.fx.step[e.prop]?D.fx.step[e.prop](e):1!==e.elem.nodeType||!D.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:D.style(e.elem,e.prop,e.now+e.unit)}}},ot.propHooks.scrollTop=ot.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},D.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},D.fx=ot.prototype.init,D.fx.step={};var at,st,ut=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ct(){st&&(!1===v.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ct):r.setTimeout(ct,D.fx.interval),D.fx.tick())}function dt(){return r.setTimeout((function(){at=void 0})),at=Date.now()}function ht(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ft(e,t,n){for(var r,i=(mt.tweeners[t]||[]).concat(mt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function mt(e,t,n){var r,i,o=0,a=mt.prefilters.length,s=D.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=at||dt(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:D.extend({},t),opts:D.extend(!0,{specialEasing:{},easing:D.easing._default},n),originalProperties:t,originalOptions:n,startTime:at||dt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=D.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=J(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=D.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=mt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(D._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return D.map(c,ft,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),D.fx.timer(D.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}D.Animation=D.extend(mt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ce(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(z);for(var n,r=0,i=e.length;r<i;r++)n=e[r],mt.tweeners[n]=mt.tweeners[n]||[],mt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,d="width"in t||"height"in t,h=this,f={},m=e.style,p=e.nodeType&&le(e),_=X.get(e,"fxshow");for(r in n.queue||(null==(a=D._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,D.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],ut.test(i)){if(delete t[r],o=o||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!_||void 0===_[r])continue;p=!0}f[r]=_&&_[r]||D.style(e,r)}if((u=!D.isEmptyObject(t))||!D.isEmptyObject(f))for(r in d&&1===e.nodeType&&(n.overflow=[m.overflow,m.overflowX,m.overflowY],null==(l=_&&_.display)&&(l=X.get(e,"display")),"none"===(c=D.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=D.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===D.css(e,"float")&&(u||(h.done((function(){m.display=l})),null==l&&(c=m.display,l="none"===c?"":c)),m.display="inline-block")),n.overflow&&(m.overflow="hidden",h.always((function(){m.overflow=n.overflow[0],m.overflowX=n.overflow[1],m.overflowY=n.overflow[2]}))),u=!1,f)u||(_?"hidden"in _&&(p=_.hidden):_=X.access(e,"fxshow",{display:l}),o&&(_.hidden=!p),p&&fe([e],!0),h.done((function(){for(r in p||fe([e]),X.remove(e,"fxshow"),f)D.style(e,r,f[r])}))),u=ft(p?_[r]:0,r,h),r in _||(_[r]=u.start,p&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?mt.prefilters.unshift(e):mt.prefilters.push(e)}}),D.speed=function(e,t,n){var r=e&&"object"==typeof e?D.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return D.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in D.fx.speeds?r.duration=D.fx.speeds[r.duration]:r.duration=D.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&D.dequeue(this,r.queue)},r},D.fn.extend({fadeTo:function(e,t,n,r){return this.filter(le).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=D.isEmptyObject(e),o=D.speed(t,n,r),a=function(){var t=mt(this,D.extend({},e),o);(i||X.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=D.timers,a=X.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&lt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||D.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=X.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=D.timers,a=r?r.length:0;for(n.finish=!0,D.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),D.each(["toggle","show","hide"],(function(e,t){var n=D.fn[t];D.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ht(t,!0),e,r,i)}})),D.each({slideDown:ht("show"),slideUp:ht("hide"),slideToggle:ht("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){D.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),D.timers=[],D.fx.tick=function(){var e,t=0,n=D.timers;for(at=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||D.fx.stop(),at=void 0},D.fx.timer=function(e){D.timers.push(e),D.fx.start()},D.fx.interval=13,D.fx.start=function(){st||(st=!0,ct())},D.fx.stop=function(){st=null},D.fx.speeds={slow:600,fast:200,_default:400},D.fn.delay=function(e,t){return e=D.fx&&D.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var i=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(i)}}))},function(){var e=v.createElement("input"),t=v.createElement("select").appendChild(v.createElement("option"));e.type="checkbox",_.checkOn=""!==e.value,_.optSelected=t.selected,(e=v.createElement("input")).value="t",e.type="radio",_.radioValue="t"===e.value}();var pt,_t=D.expr.attrHandle;D.fn.extend({attr:function(e,t){return B(this,D.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){D.removeAttr(this,e)}))}}),D.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?D.prop(e,t,n):(1===o&&D.isXMLDoc(e)||(i=D.attrHooks[t.toLowerCase()]||(D.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void D.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=D.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!_.radioValue&&"radio"===t&&I(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(z);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?D.removeAttr(e,n):e.setAttribute(n,n),n}},D.each(D.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=_t[t]||D.find.attr;_t[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=_t[a],_t[a]=i,i=null!=n(e,t,r)?a:null,_t[a]=o),i}}));var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function vt(e){return(e.match(z)||[]).join(" ")}function Mt(e){return e.getAttribute&&e.getAttribute("class")||""}function Tt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(z)||[]}D.fn.extend({prop:function(e,t){return B(this,D.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[D.propFix[e]||e]}))}}),D.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&D.isXMLDoc(e)||(t=D.propFix[t]||t,i=D.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=D.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(D.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),D.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){D.propFix[this.toLowerCase()]=this})),D.fn.extend({addClass:function(e){var t,n,r,i,o,a;return g(e)?this.each((function(t){D(this).addClass(e.call(this,t,Mt(this)))})):(t=Tt(e)).length?this.each((function(){if(r=Mt(this),n=1===this.nodeType&&" "+vt(r)+" "){for(o=0;o<t.length;o++)i=t[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=vt(n),r!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,n,r,i,o,a;return g(e)?this.each((function(t){D(this).removeClass(e.call(this,t,Mt(this)))})):arguments.length?(t=Tt(e)).length?this.each((function(){if(r=Mt(this),n=1===this.nodeType&&" "+vt(r)+" "){for(o=0;o<t.length;o++)for(i=t[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=vt(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return g(e)?this.each((function(n){D(this).toggleClass(e.call(this,n,Mt(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Tt(e),this.each((function(){if(s)for(o=D(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==e&&"boolean"!==a||((r=Mt(this))&&X.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":X.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+vt(Mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;D.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=g(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,D(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=D.map(i,(function(e){return null==e?"":e+""}))),(t=D.valHooks[this.type]||D.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=D.valHooks[i.type]||D.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n:void 0}}),D.extend({valHooks:{option:{get:function(e){var t=D.find.attr(e,"value");return null!=t?t:vt(D.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!I(n.parentNode,"optgroup"))){if(t=D(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=D.makeArray(t),a=i.length;a--;)((r=i[a]).selected=D.inArray(D.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),D.each(["radio","checkbox"],(function(){D.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=D.inArray(D(e).val(),t)>-1}},_.checkOn||(D.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),_.focusin="onfocusin"in r;var wt=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};D.extend(D.event,{trigger:function(e,t,n,i){var o,a,s,u,l,c,d,h,m=[n||v],p=f.call(e,"type")?e.type:e,_=f.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=n=n||v,3!==n.nodeType&&8!==n.nodeType&&!wt.test(p+D.event.triggered)&&(p.indexOf(".")>-1&&(_=p.split("."),p=_.shift(),_.sort()),l=p.indexOf(":")<0&&"on"+p,(e=e[D.expando]?e:new D.Event(p,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:D.makeArray(t,[e]),d=D.event.special[p]||{},i||!d.trigger||!1!==d.trigger.apply(n,t))){if(!i&&!d.noBubble&&!y(n)){for(u=d.delegateType||p,wt.test(u+p)||(a=a.parentNode);a;a=a.parentNode)m.push(a),s=a;s===(n.ownerDocument||v)&&m.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=m[o++])&&!e.isPropagationStopped();)h=a,e.type=o>1?u:d.bindType||p,(c=(X.get(a,"events")||Object.create(null))[e.type]&&X.get(a,"handle"))&&c.apply(a,t),(c=l&&a[l])&&c.apply&&Z(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=p,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(m.pop(),t)||!Z(n)||l&&g(n[p])&&!y(n)&&((s=n[l])&&(n[l]=null),D.event.triggered=p,e.isPropagationStopped()&&h.addEventListener(p,Dt),n[p](),e.isPropagationStopped()&&h.removeEventListener(p,Dt),D.event.triggered=void 0,s&&(n[l]=s)),e.result}},simulate:function(e,t,n){var r=D.extend(new D.Event,n,{type:e,isSimulated:!0});D.event.trigger(r,null,t)}}),D.fn.extend({trigger:function(e,t){return this.each((function(){D.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return D.event.trigger(e,t,n,!0)}}),_.focusin||D.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){D.event.simulate(t,e.target,D.event.fix(e))};D.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t);i||r.addEventListener(e,n,!0),X.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t)-1;i?X.access(r,t,i):(r.removeEventListener(e,n,!0),X.remove(r,t))}}}));var Lt=r.location,St={guid:Date.now()},kt=/\?/;D.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||D.error("Invalid XML: "+(n?D.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var At=/\[\]$/,Et=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function xt(e,t,n,r){var i;if(Array.isArray(t))D.each(t,(function(t,i){n||At.test(e)?r(e,i):xt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==b(t))r(e,t);else for(i in t)xt(e+"["+i+"]",t[i],n,r)}D.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!D.isPlainObject(e))D.each(e,(function(){i(this.name,this.value)}));else for(n in e)xt(n,e[n],t,i);return r.join("&")},D.fn.extend({serialize:function(){return D.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=D.prop(this,"elements");return e?D.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!D(this).is(":disabled")&&Nt.test(this.nodeName)&&!It.test(e)&&(this.checked||!_e.test(e))})).map((function(e,t){var n=D(this).val();return null==n?null:Array.isArray(n)?D.map(n,(function(e){return{name:t.name,value:e.replace(Et,"\r\n")}})):{name:t.name,value:n.replace(Et,"\r\n")}})).get()}});var Ct=/%20/g,jt=/#.*$/,Yt=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:GET|HEAD)$/,zt=/^\/\//,Pt={},Ht={},Ut="*/".concat("*"),Ft=v.createElement("a");function Wt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(z)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Qt(e,t,n,r){var i={},o=e===Ht;function a(s){var u;return i[s]=!0,D.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Bt(e,t){var n,r,i=D.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&D.extend(!0,e,r),e}Ft.href=Lt.href,D.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Lt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Lt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ut,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":D.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,D.ajaxSettings),t):Bt(D.ajaxSettings,e)},ajaxPrefilter:Wt(Pt),ajaxTransport:Wt(Ht),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,o,a,s,u,l,c,d,h,f=D.ajaxSetup({},t),m=f.context||f,p=f.context&&(m.nodeType||m.jquery)?D(m):D.event,_=D.Deferred(),g=D.Callbacks("once memory"),y=f.statusCode||{},M={},T={},b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Ot.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,M[e]=t),this},overrideMimeType:function(e){return null==l&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)w.always(e[w.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||b;return n&&n.abort(t),L(0,t),this}};if(_.promise(w),f.url=((e||f.url||Lt.href)+"").replace(zt,Lt.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(z)||[""],null==f.crossDomain){u=v.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Ft.protocol+"//"+Ft.host!=u.protocol+"//"+u.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=D.param(f.data,f.traditional)),Qt(Pt,f,t,w),l)return w;for(d in(c=D.event&&f.global)&&0==D.active++&&D.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Rt.test(f.type),i=f.url.replace(jt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Ct,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(kt.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Yt,"$1"),h=(kt.test(i)?"&":"?")+"_="+St.guid+++h),f.url=i+h),f.ifModified&&(D.lastModified[i]&&w.setRequestHeader("If-Modified-Since",D.lastModified[i]),D.etag[i]&&w.setRequestHeader("If-None-Match",D.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ut+"; q=0.01":""):f.accepts["*"]),f.headers)w.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(m,w,f)||l))return w.abort();if(b="abort",g.add(f.complete),w.done(f.success),w.fail(f.error),n=Qt(Ht,f,t,w)){if(w.readyState=1,c&&p.trigger("ajaxSend",[w,f]),l)return w;f.async&&f.timeout>0&&(s=r.setTimeout((function(){w.abort("timeout")}),f.timeout));try{l=!1,n.send(M,L)}catch(e){if(l)throw e;L(-1,e)}}else L(-1,"No Transport");function L(e,t,a,u){var d,h,v,M,T,b=t;l||(l=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",w.readyState=e>0?4:0,d=e>=200&&e<300||304===e,a&&(M=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,w,a)),!d&&D.inArray("script",f.dataTypes)>-1&&D.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),M=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(f,M,w,d),d?(f.ifModified&&((T=w.getResponseHeader("Last-Modified"))&&(D.lastModified[i]=T),(T=w.getResponseHeader("etag"))&&(D.etag[i]=T)),204===e||"HEAD"===f.type?b="nocontent":304===e?b="notmodified":(b=M.state,h=M.data,d=!(v=M.error))):(v=b,!e&&b||(b="error",e<0&&(e=0))),w.status=e,w.statusText=(t||b)+"",d?_.resolveWith(m,[h,b,w]):_.rejectWith(m,[w,b,v]),w.statusCode(y),y=void 0,c&&p.trigger(d?"ajaxSuccess":"ajaxError",[w,f,d?h:v]),g.fireWith(m,[w,b]),c&&(p.trigger("ajaxComplete",[w,f]),--D.active||D.event.trigger("ajaxStop")))}return w},getJSON:function(e,t,n){return D.get(e,t,n,"json")},getScript:function(e,t){return D.get(e,void 0,t,"script")}}),D.each(["get","post"],(function(e,t){D[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),D.ajax(D.extend({url:e,type:t,dataType:i,data:n,success:r},D.isPlainObject(e)&&e))}})),D.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),D._evalUrl=function(e,t,n){return D.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){D.globalEval(e,t,n)}})},D.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=D(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return g(e)?this.each((function(t){D(this).wrapInner(e.call(this,t))})):this.each((function(){var t=D(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=g(e);return this.each((function(n){D(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){D(this).replaceWith(this.childNodes)})),this}}),D.expr.pseudos.hidden=function(e){return!D.expr.pseudos.visible(e)},D.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},D.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var qt={0:200,1223:204},Vt=D.ajaxSettings.xhr();_.cors=!!Vt&&"withCredentials"in Vt,_.ajax=Vt=!!Vt,D.ajaxTransport((function(e){var t,n;if(_.cors||Vt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(qt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),D.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),D.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return D.globalEval(e),e}}}),D.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),D.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=D("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),v.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Gt,Jt=[],Zt=/(=)\?(?=&|$)|\?\?/;D.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Jt.pop()||D.expando+"_"+St.guid++;return this[e]=!0,e}}),D.ajaxPrefilter("json jsonp",(function(e,t,n){var i,o,a,s=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=g(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Zt,"$1"+i):!1!==e.jsonp&&(e.url+=(kt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||D.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always((function(){void 0===o?D(r).removeProp(i):r[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,Jt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0})),"script"})),_.createHTMLDocument=((Gt=v.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Gt.childNodes.length),D.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(_.createHTMLDocument?((r=(t=v.implementation.createHTMLDocument("")).createElement("base")).href=v.location.href,t.head.appendChild(r)):t=v),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&D(o).remove(),D.merge([],i.childNodes)));var r,i,o},D.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&D.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?D("<div>").append(D.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},D.expr.pseudos.animated=function(e){return D.grep(D.timers,(function(t){return e===t.elem})).length},D.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=D.css(e,"position"),c=D(e),d={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=D.css(e,"top"),u=D.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,D.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):c.css(d)}},D.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){D.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===D.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===D.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=D(e).offset()).top+=D.css(e,"borderTopWidth",!0),i.left+=D.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-D.css(r,"marginTop",!0),left:t.left-i.left-D.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===D.css(e,"position");)e=e.offsetParent;return e||ae}))}}),D.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;D.fn[e]=function(r){return B(this,(function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),D.each(["top","left"],(function(e,t){D.cssHooks[t]=Ge(_.pixelPosition,(function(e,n){if(n)return n=Ve(e,t),He.test(n)?D(e).position()[t]+"px":n}))})),D.each({Height:"height",Width:"width"},(function(e,t){D.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){D.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return B(this,(function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?D.css(t,n,s):D.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),D.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){D.fn[t]=function(e){return this.on(t,e)}})),D.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),D.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){D.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Kt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;D.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=s.call(arguments,2),i=function(){return e.apply(t||this,r.concat(s.call(arguments)))},i.guid=e.guid=e.guid||D.guid++,i},D.holdReady=function(e){e?D.readyWait++:D.ready(!0)},D.isArray=Array.isArray,D.parseJSON=JSON.parse,D.nodeName=I,D.isFunction=g,D.isWindow=y,D.camelCase=J,D.type=b,D.now=Date.now,D.isNumeric=function(e){var t=D.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},D.trim=function(e){return null==e?"":(e+"").replace(Kt,"$1")},void 0===(n=function(){return D}.apply(t,[]))||(e.exports=n);var Xt=r.jQuery,$t=r.$;return D.noConflict=function(e){return r.$===D&&(r.$=$t),e&&r.jQuery===D&&(r.jQuery=Xt),D},void 0===i&&(r.jQuery=r.$=D),D},"object"==typeof e.exports?e.exports=r.document?i(r,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return i(e)}:i(r)},42786:function(e,t,n){n(30381).defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})},14130:function(e,t,n){var r,i,o,a,s;r=n(30381),i=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},o={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(e){return function(t,n,r,a){var s=i(t),u=o[e][i(t)];return 2===s&&(u=u[n?0:1]),u.replace(/%d/i,t)}},s=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],r.defineLocale("ar-dz",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})},96135:function(e,t,n){n(30381).defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})},56440:function(e,t,n){var r,i,o,a,s,u;r=n(30381),i={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},o=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},a={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},s=function(e){return function(t,n,r,i){var s=o(t),u=a[e][o(t)];return 2===s&&(u=u[n?0:1]),u.replace(/%d/i,t)}},u=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],r.defineLocale("ar-ly",{months:u,monthsShort:u,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})},47702:function(e,t,n){n(30381).defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})},16040:function(e,t,n){var r,i,o;r=n(30381),i={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},o={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return o[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})},37100:function(e,t,n){n(30381).defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})},30867:function(e,t,n){var r,i,o,a,s,u,l;r=n(30381),i={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},o={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},a=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},s={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},u=function(e){return function(t,n,r,i){var o=a(t),u=s[e][a(t)];return 2===o&&(u=u[n?0:1]),u.replace(/%d/i,t)}},l=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],r.defineLocale("ar",{months:l,monthsShort:l,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:u("s"),ss:u("s"),m:u("m"),mm:u("m"),h:u("h"),hh:u("h"),d:u("d"),dd:u("d"),M:u("M"),MM:u("M"),y:u("y"),yy:u("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return o[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})},31083:function(e,t,n){var r,i;r=n(30381),i={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},r.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var t=e%10,n=e%100-t,r=e>=100?100:null;return e+(i[t]||i[n]||i[r])},week:{dow:1,doy:7}})},9808:function(e,t,n){!function(e){function t(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){return"m"===r?n?"хвіліна":"хвіліну":"h"===r?n?"гадзіна":"гадзіну":e+" "+t({ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:n?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[r],+e)}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:n,mm:n,h:n,hh:n,d:"дзень",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n(30381))},68338:function(e,t,n){n(30381).defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})},67438:function(e,t,n){n(30381).defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})},76225:function(e,t,n){var r,i,o;r=n(30381),i={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},o={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},r.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}})},8905:function(e,t,n){var r,i,o;r=n(30381),i={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},o={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},r.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})},11560:function(e,t,n){var r,i,o;r=n(30381),i={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},o={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},r.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})},1278:function(e,t,n){!function(e){function t(e,t,n){return e+" "+i({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}function n(e){switch(r(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function r(e){return e>9?r(e%10):e}function i(e,t){return 2===t?o(e):e}function o(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}var a=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],s=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,u=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,l=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,c=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],d=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],h=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:h,fullWeekdaysParse:c,shortWeekdaysParse:d,minWeekdaysParse:h,monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:u,monthsShortStrictRegex:l,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:n},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n(30381))},80622:function(e,t,n){!function(e){function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},2468:function(e,t,n){n(30381).defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})},5822:function(e,t,n){!function(e){var t={format:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),standalone:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_")},n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),r=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],i=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function o(e){return e>1&&e<5&&1!=~~(e/10)}function a(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?i+(o(e)?"sekundy":"sekund"):i+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?i+(o(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(o(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?i+(o(e)?"dny":"dní"):i+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?i+(o(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?i+(o(e)?"roky":"let"):i+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},50877:function(e,t,n){n(30381).defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})},47373:function(e,t,n){n(30381).defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})},24780:function(e,t,n){n(30381).defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},60217:function(e,t,n){!function(e){function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},60894:function(e,t,n){!function(e){function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},59740:function(e,t,n){!function(e){function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},5300:function(e,t,n){var r,i,o;r=n(30381),i=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],o=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],r.defineLocale("dv",{months:i,monthsShort:i,weekdays:o,weekdaysShort:o,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})},50837:function(e,t,n){!function(e){function t(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){return 6===this.day()?"[το προηγούμενο] dddd [{}] LT":"[την προηγούμενη] dddd [{}] LT"},sameElse:"L"},calendar:function(e,n){var r=this._calendarEl[e],i=n&&n.hours();return t(r)&&(r=r.apply(n)),r.replace("{}",i%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n(30381))},78348:function(e,t,n){n(30381).defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})},77925:function(e,t,n){n(30381).defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})},22243:function(e,t,n){n(30381).defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})},46436:function(e,t,n){n(30381).defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})},47207:function(e,t,n){n(30381).defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})},44175:function(e,t,n){n(30381).defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})},76319:function(e,t,n){n(30381).defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})},31662:function(e,t,n){n(30381).defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})},92915:function(e,t,n){n(30381).defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})},55251:function(e,t,n){var r,i,o,a,s;r=n(30381),i="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),o="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),a=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],s=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,r.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?o[e.month()]:i[e.month()]:i},monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})},96112:function(e,t,n){var r,i,o,a,s;r=n(30381),i="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),o="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),a=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],s=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,r.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?o[e.month()]:i[e.month()]:i},monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})},71146:function(e,t,n){var r,i,o,a,s;r=n(30381),i="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),o="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),a=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],s=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,r.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?o[e.month()]:i[e.month()]:i},monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})},55655:function(e,t,n){var r,i,o,a,s;r=n(30381),i="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),o="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),a=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],s=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,r.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?o[e.month()]:i[e.month()]:i},monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})},5603:function(e,t,n){!function(e){function t(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},77763:function(e,t,n){n(30381).defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})},76959:function(e,t,n){var r,i,o;r=n(30381),i={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},o={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},r.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return o[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})},11897:function(e,t,n){!function(e){var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function r(e,t,n,r){var o="";switch(n){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"ss":o=r?"sekunnin":"sekuntia";break;case"m":return r?"minuutin":"minuutti";case"mm":o=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":o=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":o=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":o=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":o=r?"vuoden":"vuotta"}return o=i(e,r)+" "+o}function i(e,r){return e<10?r?n[e]:t[e]:e}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},42549:function(e,t,n){n(30381).defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})},94694:function(e,t,n){n(30381).defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},63049:function(e,t,n){n(30381).defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})},52330:function(e,t,n){n(30381).defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})},94470:function(e,t,n){var r,i,o,a,s;r=n(30381),i=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,o=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,a=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,s=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],r.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:i,monthsShortStrictRegex:o,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})},5044:function(e,t,n){var r,i,o;r=n(30381),i="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),o="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),r.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?o[e.month()]:i[e.month()]:i},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})},29295:function(e,t,n){var r,i,o,a,s,u;r=n(30381),i=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],o=["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],a=["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],s=["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],u=["Do","Lu","Má","Cé","Dé","A","Sa"],r.defineLocale("ga",{months:i,monthsShort:o,monthsParseExact:!0,weekdays:a,weekdaysShort:s,weekdaysMin:u,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})},2101:function(e,t,n){var r,i,o,a,s,u;r=n(30381),i=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],o=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],a=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],s=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],u=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],r.defineLocale("gd",{months:i,monthsShort:o,monthsParseExact:!0,weekdays:a,weekdaysShort:s,weekdaysMin:u,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})},38794:function(e,t,n){n(30381).defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})},27884:function(e,t,n){!function(e){function t(e,t,n,r){var i={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return r?i[n][0]:i[n][1]}e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){return"D"===t?e+"वेर":e},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}})}(n(30381))},23168:function(e,t,n){!function(e){function t(e,t,n,r){var i={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return r?i[n][0]:i[n][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){return"D"===t?e+"er":e},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(n(30381))},95349:function(e,t,n){var r,i,o;r=n(30381),i={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},o={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"},r.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})},24206:function(e,t,n){n(30381).defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})},30094:function(e,t,n){var r,i,o,a,s;r=n(30381),i={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},o={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},a=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],s=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],r.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:a,longMonthsParse:a,shortMonthsParse:s,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})},30316:function(e,t,n){!function(e){function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},22138:function(e,t,n){!function(e){var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return i+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},11423:function(e,t,n){n(30381).defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})},29218:function(e,t,n){n(30381).defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})},90135:function(e,t,n){!function(e){function t(e){return e%100==11||e%10!=1}function n(e,n,r,i){var o=e+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?o+(n||i?"sekúndur":"sekúndum"):o+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?o+(n||i?"mínútur":"mínútum"):n?o+"mínúta":o+"mínútu";case"hh":return t(e)?o+(n||i?"klukkustundir":"klukkustundum"):o+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return t(e)?n?o+"dagar":o+(i?"daga":"dögum"):n?o+"dagur":o+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return t(e)?n?o+"mánuðir":o+(i?"mánuði":"mánuðum"):n?o+"mánuður":o+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return t(e)?o+(n||i?"ár":"árum"):o+(n||i?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},10150:function(e,t,n){n(30381).defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){return 0===this.day()?"[la scorsa] dddd [alle] LT":"[lo scorso] dddd [alle] LT"},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})},90626:function(e,t,n){n(30381).defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){return 0===this.day()?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT":"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})},39183:function(e,t,n){n(30381).defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})},24286:function(e,t,n){n(30381).defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})},12105:function(e,t,n){n(30381).defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})},47772:function(e,t,n){var r,i;r=n(30381),i={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},r.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var t=e%10,n=e>=100?100:null;return e+(i[e]||i[t]||i[n])},week:{dow:1,doy:7}})},18758:function(e,t,n){var r,i,o;r=n(30381),i={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},o={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"},r.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},week:{dow:1,doy:4}})},79282:function(e,t,n){var r,i,o;r=n(30381),i={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},o={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},r.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})},33730:function(e,t,n){n(30381).defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})},1408:function(e,t,n){var r,i,o,a;r=n(30381),i={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},o={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},a=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"],r.defineLocale("ku",{months:a,monthsShort:a,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return o[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})},33291:function(e,t,n){var r,i;r=n(30381),i={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},r.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var t=e%10,n=e>=100?100:null;return e+(i[e]||i[t]||i[n])},week:{dow:1,doy:7}})},36841:function(e,t,n){!function(e){function t(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function n(e){return i(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e}function r(e){return i(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e}function i(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return i(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return i(e)}return i(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:r,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},55466:function(e,t,n){n(30381).defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})},57010:function(e,t,n){!function(e){var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"}function r(e,t,n,r){return t?o(n)[0]:r?o(n)[1]:o(n)[2]}function i(e){return e%10==0||e>10&&e<20}function o(e){return t[e].split("_")}function a(e,t,n,a){var s=e+" ";return 1===e?s+r(e,t,n[0],a):t?s+(i(e)?o(n)[1]:o(n)[0]):a?s+o(n)[1]:s+(i(e)?o(n)[1]:o(n)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:n,ss:a,m:r,mm:a,h:r,hh:a,d:r,dd:a,M:r,MM:a,y:r,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(30381))},37595:function(e,t,n){!function(e){var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function r(e,r,i){return e+" "+n(t[i],e,r)}function i(e,r,i){return n(t[i],e,r)}function o(e,t){return t?"dažas sekundes":"dažām sekundēm"}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:o,ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},39861:function(e,t,n){var r,i;r=n(30381),i={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,n){var r=i.words[n];return 1===n.length?t?r[0]:r[1]:e+" "+i.correctGrammaticalCase(e,r)}},r.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:i.translate,m:i.translate,mm:i.translate,h:i.translate,hh:i.translate,d:"dan",dd:i.translate,M:"mjesec",MM:i.translate,y:"godinu",yy:i.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})},35493:function(e,t,n){n(30381).defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})},95966:function(e,t,n){n(30381).defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})},87341:function(e,t,n){n(30381).defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})},5115:function(e,t,n){!function(e){function t(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n(30381))},10370:function(e,t,n){!function(e){var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function r(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(n(30381))},41237:function(e,t,n){n(30381).defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})},9847:function(e,t,n){n(30381).defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})},72126:function(e,t,n){n(30381).defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})},56165:function(e,t,n){var r,i,o;r=n(30381),i={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},o={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},r.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},week:{dow:1,doy:4}})},64924:function(e,t,n){n(30381).defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},16744:function(e,t,n){var r,i,o;r=n(30381),i={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},o={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})},59814:function(e,t,n){var r,i,o,a,s;r=n(30381),i="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),o="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),a=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],s=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,r.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?o[e.month()]:i[e.month()]:i},monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})},93901:function(e,t,n){var r,i,o,a,s;r=n(30381),i="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),o="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),a=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],s=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,r.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?o[e.month()]:i[e.month()]:i},monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})},83877:function(e,t,n){n(30381).defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},92135:function(e,t,n){n(30381).defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})},15858:function(e,t,n){var r,i,o;r=n(30381),i={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},o={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},r.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})},64495:function(e,t,n){!function(e){var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),r=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function o(e,t,n){var r=e+" ";switch(n){case"ss":return r+(i(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(i(e)?"godziny":"godzin");case"ww":return r+(i(e)?"tygodnie":"tygodni");case"MM":return r+(i(e)?"miesiące":"miesięcy");case"yy":return r+(i(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,r){return e?/D MMMM/.test(r)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:o,m:o,mm:o,h:o,hh:o,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:o,M:"miesiąc",MM:o,y:"rok",yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},57971:function(e,t,n){n(30381).defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})},89520:function(e,t,n){n(30381).defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})},96459:function(e,t,n){!function(e){function t(e,t,n){var r=" ";return(e%100>=20||e>=100&&e%100==0)&&(r=" de "),e+r+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n(30381))},21793:function(e,t,n){!function(e){function t(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){return"m"===r?n?"минута":"минуту":e+" "+t({ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[r],+e)}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:n,m:n,mm:n,h:"час",hh:n,d:"день",dd:n,w:"неделя",ww:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(30381))},40950:function(e,t,n){var r,i,o;r=n(30381),i=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],o=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],r.defineLocale("sd",{months:i,monthsShort:i,weekdays:o,weekdaysShort:o,weekdaysMin:o,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})},10490:function(e,t,n){n(30381).defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},90124:function(e,t,n){n(30381).defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})},64249:function(e,t,n){!function(e){var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function r(e){return e>1&&e<5}function i(e,t,n,i){var o=e+" ";switch(n){case"s":return t||i?"pár sekúnd":"pár sekundami";case"ss":return t||i?o+(r(e)?"sekundy":"sekúnd"):o+"sekundami";case"m":return t?"minúta":i?"minútu":"minútou";case"mm":return t||i?o+(r(e)?"minúty":"minút"):o+"minútami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?o+(r(e)?"hodiny":"hodín"):o+"hodinami";case"d":return t||i?"deň":"dňom";case"dd":return t||i?o+(r(e)?"dni":"dní"):o+"dňami";case"M":return t||i?"mesiac":"mesiacom";case"MM":return t||i?o+(r(e)?"mesiace":"mesiacov"):o+"mesiacmi";case"y":return t||i?"rok":"rokom";case"yy":return t||i?o+(r(e)?"roky":"rokov"):o+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:case 4:case 5:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},14985:function(e,t,n){!function(e){function t(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return i+=1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami";case"d":return t||r?"en dan":"enim dnem";case"dd":return i+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi";case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci";case"y":return t||r?"eno leto":"enim letom";case"yy":return i+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti"}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},51104:function(e,t,n){n(30381).defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},79915:function(e,t,n){var r,i;r=n(30381),i={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?t[0]:t[1]:t[2]},translate:function(e,t,n,r){var o,a=i.words[n];return 1===n.length?"y"===n&&t?"једна година":r||t?a[0]:a[1]:(o=i.correctGrammaticalCase(e,a),"yy"===n&&t&&"годину"===o?e+" година":e+" "+o)}},r.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:i.translate,m:i.translate,mm:i.translate,h:i.translate,hh:i.translate,d:i.translate,dd:i.translate,M:i.translate,MM:i.translate,y:i.translate,yy:i.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})},49131:function(e,t,n){var r,i;r=n(30381),i={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?t[0]:t[1]:t[2]},translate:function(e,t,n,r){var o,a=i.words[n];return 1===n.length?"y"===n&&t?"jedna godina":r||t?a[0]:a[1]:(o=i.correctGrammaticalCase(e,a),"yy"===n&&t&&"godinu"===o?e+" godina":e+" "+o)}},r.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:i.translate,m:i.translate,mm:i.translate,h:i.translate,hh:i.translate,d:i.translate,dd:i.translate,M:i.translate,MM:i.translate,y:i.translate,yy:i.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})},85893:function(e,t,n){n(30381).defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})},98760:function(e,t,n){n(30381).defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})},91172:function(e,t,n){n(30381).defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})},27333:function(e,t,n){var r,i,o;r=n(30381),i={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},o={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},r.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return o[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return i[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})},23110:function(e,t,n){n(30381).defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})},52095:function(e,t,n){n(30381).defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})},27321:function(e,t,n){var r,i;r=n(30381),i={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"},r.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var t=e%10,n=e>=100?100:null;return e+(i[e]||i[t]||i[n])},week:{dow:1,doy:7}})},9041:function(e,t,n){n(30381).defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})},19005:function(e,t,n){var r,i;r=n(30381),i={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"},r.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,t){switch(t){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var n=e%10,r=e%100-n,o=e>=100?100:null;return e+(i[n]||i[r]||i[o])}},week:{dow:1,doy:7}})},75768:function(e,t,n){n(30381).defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})},89444:function(e,t,n){!function(e){var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"}function r(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"}function i(e,t,n,r){var i=o(e);switch(n){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}function o(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),i=e%10,o="";return n>0&&(o+=t[n]+"vatlh"),r>0&&(o+=(""!==o?" ":"")+t[r]+"maH"),i>0&&(o+=(""!==o?" ":"")+t[i]),""===o?"pagh":o}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:n,past:r,s:"puS lup",ss:i,m:"wa’ tup",mm:i,h:"wa’ rep",hh:i,d:"wa’ jaj",dd:i,M:"wa’ jar",MM:i,y:"wa’ DIS",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},72397:function(e,t,n){var r,i;r=n(30381),i={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},r.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"öö":"ÖÖ":n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,t){switch(t){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var n=e%10,r=e%100-n,o=e>=100?100:null;return e+(i[n]||i[r]||i[o])}},week:{dow:1,doy:7}})},28254:function(e,t,n){!function(e){function t(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r||t?i[n][0]:i[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},30699:function(e,t,n){n(30381).defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})},51106:function(e,t,n){n(30381).defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})},9288:function(e,t,n){n(30381).defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"يېرىم كېچە":r<900?"سەھەر":r<1130?"چۈشتىن بۇرۇن":r<1230?"چۈش":r<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})},67691:function(e,t,n){!function(e){function t(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){return"m"===r?n?"хвилина":"хвилину":"h"===r?n?"година":"годину":e+" "+t({ss:n?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:n?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:n?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[r],+e)}function r(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative}function i(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:r,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:n,m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n(30381))},13795:function(e,t,n){var r,i,o;r=n(30381),i=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],o=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],r.defineLocale("ur",{months:i,monthsShort:i,weekdays:o,weekdaysShort:o,weekdaysMin:o,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})},60588:function(e,t,n){n(30381).defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})},6791:function(e,t,n){n(30381).defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})},65666:function(e,t,n){n(30381).defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})},14378:function(e,t,n){n(30381).defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})},75805:function(e,t,n){n(30381).defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})},83839:function(e,t,n){n(30381).defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})},55726:function(e,t,n){n(30381).defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1200?"上午":1200===r?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})},99807:function(e,t,n){n(30381).defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})},74152:function(e,t,n){n(30381).defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})},46700:(e,t,n)=>{var r={"./af":42786,"./af.js":42786,"./ar":30867,"./ar-dz":14130,"./ar-dz.js":14130,"./ar-kw":96135,"./ar-kw.js":96135,"./ar-ly":56440,"./ar-ly.js":56440,"./ar-ma":47702,"./ar-ma.js":47702,"./ar-sa":16040,"./ar-sa.js":16040,"./ar-tn":37100,"./ar-tn.js":37100,"./ar.js":30867,"./az":31083,"./az.js":31083,"./be":9808,"./be.js":9808,"./bg":68338,"./bg.js":68338,"./bm":67438,"./bm.js":67438,"./bn":8905,"./bn-bd":76225,"./bn-bd.js":76225,"./bn.js":8905,"./bo":11560,"./bo.js":11560,"./br":1278,"./br.js":1278,"./bs":80622,"./bs.js":80622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":50877,"./cv.js":50877,"./cy":47373,"./cy.js":47373,"./da":24780,"./da.js":24780,"./de":59740,"./de-at":60217,"./de-at.js":60217,"./de-ch":60894,"./de-ch.js":60894,"./de.js":59740,"./dv":5300,"./dv.js":5300,"./el":50837,"./el.js":50837,"./en-au":78348,"./en-au.js":78348,"./en-ca":77925,"./en-ca.js":77925,"./en-gb":22243,"./en-gb.js":22243,"./en-ie":46436,"./en-ie.js":46436,"./en-il":47207,"./en-il.js":47207,"./en-in":44175,"./en-in.js":44175,"./en-nz":76319,"./en-nz.js":76319,"./en-sg":31662,"./en-sg.js":31662,"./eo":92915,"./eo.js":92915,"./es":55655,"./es-do":55251,"./es-do.js":55251,"./es-mx":96112,"./es-mx.js":96112,"./es-us":71146,"./es-us.js":71146,"./es.js":55655,"./et":5603,"./et.js":5603,"./eu":77763,"./eu.js":77763,"./fa":76959,"./fa.js":76959,"./fi":11897,"./fi.js":11897,"./fil":42549,"./fil.js":42549,"./fo":94694,"./fo.js":94694,"./fr":94470,"./fr-ca":63049,"./fr-ca.js":63049,"./fr-ch":52330,"./fr-ch.js":52330,"./fr.js":94470,"./fy":5044,"./fy.js":5044,"./ga":29295,"./ga.js":29295,"./gd":2101,"./gd.js":2101,"./gl":38794,"./gl.js":38794,"./gom-deva":27884,"./gom-deva.js":27884,"./gom-latn":23168,"./gom-latn.js":23168,"./gu":95349,"./gu.js":95349,"./he":24206,"./he.js":24206,"./hi":30094,"./hi.js":30094,"./hr":30316,"./hr.js":30316,"./hu":22138,"./hu.js":22138,"./hy-am":11423,"./hy-am.js":11423,"./id":29218,"./id.js":29218,"./is":90135,"./is.js":90135,"./it":90626,"./it-ch":10150,"./it-ch.js":10150,"./it.js":90626,"./ja":39183,"./ja.js":39183,"./jv":24286,"./jv.js":24286,"./ka":12105,"./ka.js":12105,"./kk":47772,"./kk.js":47772,"./km":18758,"./km.js":18758,"./kn":79282,"./kn.js":79282,"./ko":33730,"./ko.js":33730,"./ku":1408,"./ku.js":1408,"./ky":33291,"./ky.js":33291,"./lb":36841,"./lb.js":36841,"./lo":55466,"./lo.js":55466,"./lt":57010,"./lt.js":57010,"./lv":37595,"./lv.js":37595,"./me":39861,"./me.js":39861,"./mi":35493,"./mi.js":35493,"./mk":95966,"./mk.js":95966,"./ml":87341,"./ml.js":87341,"./mn":5115,"./mn.js":5115,"./mr":10370,"./mr.js":10370,"./ms":9847,"./ms-my":41237,"./ms-my.js":41237,"./ms.js":9847,"./mt":72126,"./mt.js":72126,"./my":56165,"./my.js":56165,"./nb":64924,"./nb.js":64924,"./ne":16744,"./ne.js":16744,"./nl":93901,"./nl-be":59814,"./nl-be.js":59814,"./nl.js":93901,"./nn":83877,"./nn.js":83877,"./oc-lnc":92135,"./oc-lnc.js":92135,"./pa-in":15858,"./pa-in.js":15858,"./pl":64495,"./pl.js":64495,"./pt":89520,"./pt-br":57971,"./pt-br.js":57971,"./pt.js":89520,"./ro":96459,"./ro.js":96459,"./ru":21793,"./ru.js":21793,"./sd":40950,"./sd.js":40950,"./se":10490,"./se.js":10490,"./si":90124,"./si.js":90124,"./sk":64249,"./sk.js":64249,"./sl":14985,"./sl.js":14985,"./sq":51104,"./sq.js":51104,"./sr":49131,"./sr-cyrl":79915,"./sr-cyrl.js":79915,"./sr.js":49131,"./ss":85893,"./ss.js":85893,"./sv":98760,"./sv.js":98760,"./sw":91172,"./sw.js":91172,"./ta":27333,"./ta.js":27333,"./te":23110,"./te.js":23110,"./tet":52095,"./tet.js":52095,"./tg":27321,"./tg.js":27321,"./th":9041,"./th.js":9041,"./tk":19005,"./tk.js":19005,"./tl-ph":75768,"./tl-ph.js":75768,"./tlh":89444,"./tlh.js":89444,"./tr":72397,"./tr.js":72397,"./tzl":28254,"./tzl.js":28254,"./tzm":51106,"./tzm-latn":30699,"./tzm-latn.js":30699,"./tzm.js":51106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":67691,"./uk.js":67691,"./ur":13795,"./ur.js":13795,"./uz":6791,"./uz-latn":60588,"./uz-latn.js":60588,"./uz.js":6791,"./vi":65666,"./vi.js":65666,"./x-pseudo":14378,"./x-pseudo.js":14378,"./yo":75805,"./yo.js":75805,"./zh-cn":83839,"./zh-cn.js":83839,"./zh-hk":55726,"./zh-hk.js":55726,"./zh-mo":99807,"./zh-mo.js":99807,"./zh-tw":74152,"./zh-tw.js":74152};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=46700},30381:function(e,t,n){(e=n.nmd(e)).exports=function(){var t,r;function i(){return t.apply(null,arguments)}function o(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(u(e,t))return!1;return!0}function c(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function m(e,t){for(var n in t)u(t,n)&&(e[n]=t[n]);return u(t,"toString")&&(e.toString=t.toString),u(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Jn(e,t,n,r,!0).utc()}function _(){return{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}}function g(e){return null==e._pf&&(e._pf=_()),e._pf}function y(e){if(null==e._isValid){var t=g(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function v(e){var t=p(NaN);return null!=e?m(g(t),e):g(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var M=i.momentProperties=[],T=!1;function b(e,t){var n,r,i,o=M.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)c(i=t[r=M[n]])||(e[r]=i);return e}function w(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===T&&(T=!0,i.updateOffset(this),T=!1)}function D(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function L(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function S(e,t){var n=!0;return m((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){var r,o,a,s=[],l=arguments.length;for(o=0;o<l;o++){if(r="","object"==typeof arguments[o]){for(a in r+="\n["+o+"] ",arguments[0])u(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[o];s.push(r)}L(e+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var k,A={};function E(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),A[e]||(L(t),A[e]=!0)}function I(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function N(e){var t,n;for(n in e)u(e,n)&&(I(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function x(e,t){var n,r=m({},e);for(n in t)u(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)u(e,n)&&!u(t,n)&&s(e[n])&&(r[n]=m({},r[n]));return r}function C(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,k=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)u(e,t)&&n.push(t);return n};var j={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Y(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return I(r)?r.call(t,n):r}function O(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var R=/(\[[^\[]*\])|(\\)?([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,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,P={},H={};function U(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(H[e]=i),t&&(H[t[0]]=function(){return O(i.apply(this,arguments),t[1],t[2])}),n&&(H[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function F(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function W(e){var t,n,r=e.match(R);for(t=0,n=r.length;t<n;t++)H[r[t]]?r[t]=H[r[t]]:r[t]=F(r[t]);return function(t){var i,o="";for(i=0;i<n;i++)o+=I(r[i])?r[i].call(t,e):r[i];return o}}function Q(e,t){return e.isValid()?(t=B(t,e.localeData()),P[t]=P[t]||W(t),P[t](e)):e.localeData().invalidDate()}function B(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(z.lastIndex=0;n>=0&&z.test(e);)e=e.replace(z,r),z.lastIndex=0,n-=1;return e}var q={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"};function V(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(R).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var G="Invalid date";function J(){return this._invalidDate}var Z="%d",K=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var $={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"};function ee(e,t,n,r){var i=this._relativeTime[n];return I(i)?i(e,t,n,r):i.replace(/%d/i,e)}function te(e,t){var n=this._relativeTime[e>0?"future":"past"];return I(n)?n(t):n.replace(/%s/i,t)}var ne={};function re(e,t){var n=e.toLowerCase();ne[n]=ne[n+"s"]=ne[t]=e}function ie(e){return"string"==typeof e?ne[e]||ne[e.toLowerCase()]:void 0}function oe(e){var t,n,r={};for(n in e)u(e,n)&&(t=ie(n))&&(r[t]=e[n]);return r}var ae={};function se(e,t){ae[e]=t}function ue(e){var t,n=[];for(t in e)u(e,t)&&n.push({unit:t,priority:ae[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4==0&&e%100!=0||e%400==0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function de(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function he(e,t){return function(n){return null!=n?(me(this,e,n),i.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function me(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=de(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),et(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function pe(e){return I(this[e=ie(e)])?this[e]():this}function _e(e,t){if("object"==typeof e){var n,r=ue(e=oe(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(I(this[e=ie(e)]))return this[e](t);return this}var ge,ye=/\d/,ve=/\d\d/,Me=/\d{3}/,Te=/\d{4}/,be=/[+-]?\d{6}/,we=/\d\d?/,De=/\d\d\d\d?/,Le=/\d\d\d\d\d\d?/,Se=/\d{1,3}/,ke=/\d{1,4}/,Ae=/[+-]?\d{1,6}/,Ee=/\d+/,Ie=/[+-]?\d+/,Ne=/Z|[+-]\d\d:?\d\d/gi,xe=/Z|[+-]\d\d(?::?\d\d)?/gi,Ce=/[+-]?\d+(\.\d{1,3})?/,je=/[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 Ye(e,t,n){ge[e]=I(t)?t:function(e,r){return e&&n?n:t}}function Oe(e,t){return u(ge,e)?ge[e](t._strict,t._locale):new RegExp(Re(e))}function Re(e){return ze(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function ze(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ge={};var Pe={};function He(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),d(t)&&(i=function(e,n){n[t]=de(e)}),r=e.length,n=0;n<r;n++)Pe[e[n]]=i}function Ue(e,t){He(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function Fe(e,t,n){null!=t&&u(Pe,e)&&Pe[e](t,n._a,n,e)}var We,Qe=0,Be=1,qe=2,Ve=3,Ge=4,Je=5,Ze=6,Ke=7,Xe=8;function $e(e,t){return(e%t+t)%t}function et(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=$e(t,12);return e+=(t-n)/12,1===n?le(e)?29:28:31-n%7%2}We=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),re("month","M"),se("month",8),Ye("M",we),Ye("MM",we,ve),Ye("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ye("MMMM",(function(e,t){return t.monthsRegex(e)})),He(["M","MM"],(function(e,t){t[Be]=de(e)-1})),He(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[Be]=i:g(n).invalidMonth=e}));var tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),rt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it=je,ot=je;function at(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||rt).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function st(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[rt.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ut(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=We.call(this._shortMonthsParse,a))?i:null:-1!==(i=We.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=We.call(this._shortMonthsParse,a))||-1!==(i=We.call(this._longMonthsParse,a))?i:null:-1!==(i=We.call(this._longMonthsParse,a))||-1!==(i=We.call(this._shortMonthsParse,a))?i:null}function lt(e,t,n){var r,i,o;if(this._monthsParseExact)return ut.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ct(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=de(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),et(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function dt(e){return null!=e?(ct(this,e),i.updateOffset(this,!0),this):fe(this,"Month")}function ht(){return et(this.year(),this.month())}function ft(e){return this._monthsParseExact?(u(this,"_monthsRegex")||pt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=it),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function mt(e){return this._monthsParseExact?(u(this,"_monthsRegex")||pt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function pt(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=p([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=ze(r[t]),i[t]=ze(i[t]);for(t=0;t<24;t++)o[t]=ze(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function _t(e){return le(e)?366:365}U("Y",0,0,(function(){var e=this.year();return e<=9999?O(e,4):"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),re("year","y"),se("year",1),Ye("Y",Ie),Ye("YY",we,ve),Ye("YYYY",ke,Te),Ye("YYYYY",Ae,be),Ye("YYYYYY",Ae,be),He(["YYYYY","YYYYYY"],Qe),He("YYYY",(function(e,t){t[Qe]=2===e.length?i.parseTwoDigitYear(e):de(e)})),He("YY",(function(e,t){t[Qe]=i.parseTwoDigitYear(e)})),He("Y",(function(e,t){t[Qe]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return de(e)+(de(e)>68?1900:2e3)};var gt=he("FullYear",!0);function yt(){return le(this.year())}function vt(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function Mt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Tt(e,t,n){var r=7+t-n;return-(7+Mt(e,0,r).getUTCDay()-t)%7+r-1}function bt(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+Tt(e,r,i);return s<=0?a=_t(o=e-1)+s:s>_t(e)?(o=e+1,a=s-_t(e)):(o=e,a=s),{year:o,dayOfYear:a}}function wt(e,t,n){var r,i,o=Tt(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Dt(i=e.year()-1,t,n):a>Dt(e.year(),t,n)?(r=a-Dt(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Dt(e,t,n){var r=Tt(e,t,n),i=Tt(e+1,t,n);return(_t(e)-r+i)/7}function Lt(e){return wt(e,this._week.dow,this._week.doy).week}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),re("week","w"),re("isoWeek","W"),se("week",5),se("isoWeek",5),Ye("w",we),Ye("ww",we,ve),Ye("W",we),Ye("WW",we,ve),Ue(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=de(e)}));var St={dow:0,doy:6};function kt(){return this._week.dow}function At(){return this._week.doy}function Et(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function It(e){var t=wt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Nt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function xt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ct(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),re("day","d"),re("weekday","e"),re("isoWeekday","E"),se("day",11),se("weekday",11),se("isoWeekday",11),Ye("d",we),Ye("e",we),Ye("E",we),Ye("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ye("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ye("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ue(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e})),Ue(["d","e","E"],(function(e,t,n,r){t[r]=de(e)}));var jt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Yt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ot="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Rt=je,zt=je,Pt=je;function Ht(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ct(n,this._week.dow):e?n[e.day()]:n}function Ut(e){return!0===e?Ct(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ft(e){return!0===e?Ct(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Wt(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=We.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=We.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._shortWeekdaysParse,a))||-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=We.call(this._shortWeekdaysParse,a))||-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:-1!==(i=We.call(this._minWeekdaysParse,a))||-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._shortWeekdaysParse,a))?i:null}function Qt(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Wt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Bt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Nt(e,this.localeData()),this.add(e-t,"d")):t}function qt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Vt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=xt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Gt(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=Rt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Jt(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Zt(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Pt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],u=[],l=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=ze(this.weekdaysMin(n,"")),i=ze(this.weekdaysShort(n,"")),o=ze(this.weekdays(n,"")),a.push(r),s.push(i),u.push(o),l.push(r),l.push(i),l.push(o);a.sort(e),s.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function $t(){return this.hours()||24}function en(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function tn(e,t){return t._meridiemParse}function nn(e){return"p"===(e+"").toLowerCase().charAt(0)}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Xt),U("k",["kk",2],0,$t),U("hmm",0,0,(function(){return""+Xt.apply(this)+O(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Xt.apply(this)+O(this.minutes(),2)+O(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+O(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+O(this.minutes(),2)+O(this.seconds(),2)})),en("a",!0),en("A",!1),re("hour","h"),se("hour",13),Ye("a",tn),Ye("A",tn),Ye("H",we),Ye("h",we),Ye("k",we),Ye("HH",we,ve),Ye("hh",we,ve),Ye("kk",we,ve),Ye("hmm",De),Ye("hmmss",Le),Ye("Hmm",De),Ye("Hmmss",Le),He(["H","HH"],Ve),He(["k","kk"],(function(e,t,n){var r=de(e);t[Ve]=24===r?0:r})),He(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),He(["h","hh"],(function(e,t,n){t[Ve]=de(e),g(n).bigHour=!0})),He("hmm",(function(e,t,n){var r=e.length-2;t[Ve]=de(e.substr(0,r)),t[Ge]=de(e.substr(r)),g(n).bigHour=!0})),He("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ve]=de(e.substr(0,r)),t[Ge]=de(e.substr(r,2)),t[Je]=de(e.substr(i)),g(n).bigHour=!0})),He("Hmm",(function(e,t,n){var r=e.length-2;t[Ve]=de(e.substr(0,r)),t[Ge]=de(e.substr(r))})),He("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ve]=de(e.substr(0,r)),t[Ge]=de(e.substr(r,2)),t[Je]=de(e.substr(i))}));var rn=/[ap]\.?m?\.?/i,on=he("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var sn,un={calendar:j,longDateFormat:q,invalidDate:G,ordinal:Z,dayOfMonthOrdinalParse:K,relativeTime:$,months:tt,monthsShort:nt,week:St,weekdays:jt,weekdaysMin:Ot,weekdaysShort:Yt,meridiemParse:rn},ln={},cn={};function dn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function hn(e){return e?e.toLowerCase().replace("_","-"):e}function fn(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=hn(e[o]).split("-")).length,n=(n=hn(e[o+1]))?n.split("-"):null;t>0;){if(r=pn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dn(i,n)>=t-1)break;t--}o++}return sn}function mn(e){return null!=e.match("^[^/\\\\]*$")}function pn(t){var r=null;if(void 0===ln[t]&&e&&e.exports&&mn(t))try{r=sn._abbr,n(46700)("./"+t),_n(r)}catch(e){ln[t]=null}return ln[t]}function _n(e,t){var n;return e&&((n=c(t)?vn(e):gn(e,t))?sn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),sn._abbr}function gn(e,t){if(null!==t){var n,r=un;if(t.abbr=e,null!=ln[e])E("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."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=pn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new C(x(r,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),_n(e),ln[e]}return delete ln[e],null}function yn(e,t){if(null!=t){var n,r,i=un;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(x(ln[e]._config,t)):(null!=(r=pn(e))&&(i=r._config),t=x(i,t),null==r&&(t.abbr=e),(n=new C(t)).parentLocale=ln[e],ln[e]=n),_n(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===_n()&&_n(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function vn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return sn;if(!a(e)){if(t=pn(e))return t;e=[e]}return fn(e)}function Mn(){return k(ln)}function Tn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Be]<0||n[Be]>11?Be:n[qe]<1||n[qe]>et(n[Qe],n[Be])?qe:n[Ve]<0||n[Ve]>24||24===n[Ve]&&(0!==n[Ge]||0!==n[Je]||0!==n[Ze])?Ve:n[Ge]<0||n[Ge]>59?Ge:n[Je]<0||n[Je]>59?Je:n[Ze]<0||n[Ze]>999?Ze:-1,g(e)._overflowDayOfYear&&(t<Qe||t>qe)&&(t=qe),g(e)._overflowWeeks&&-1===t&&(t=Ke),g(e)._overflowWeekday&&-1===t&&(t=Xe),g(e).overflow=t),e}var bn=/^\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)?)?$/,wn=/^\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)?)?$/,Dn=/Z|[+-]\d\d(?::?\d\d)?/,Ln=[["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]],Sn=[["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/]],kn=/^\/?Date\((-?\d+)/i,An=/^(?:(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}))$/,En={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function In(e){var t,n,r,i,o,a,s=e._i,u=bn.exec(s)||wn.exec(s),l=Ln.length,c=Sn.length;if(u){for(g(e).iso=!0,t=0,n=l;t<n;t++)if(Ln[t][1].exec(u[1])){i=Ln[t][0],r=!1!==Ln[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=c;t<n;t++)if(Sn[t][1].exec(u[3])){o=(u[2]||" ")+Sn[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(u[4]){if(!Dn.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),Fn(e)}else e._isValid=!1}function Nn(e,t,n,r,i,o){var a=[xn(e),nt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function xn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Cn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function jn(e,t,n){return!e||Yt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Yn(e,t,n){if(e)return En[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function On(e){var t,n=An.exec(Cn(e._i));if(n){if(t=Nn(n[4],n[3],n[2],n[5],n[6],n[7]),!jn(n[1],t,e))return;e._a=t,e._tzm=Yn(n[8],n[9],n[10]),e._d=Mt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Rn(e){var t=kn.exec(e._i);null===t?(In(e),!1===e._isValid&&(delete e._isValid,On(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:i.createFromInputFallback(e)))):e._d=new Date(+t[1])}function zn(e,t,n){return null!=e?e:null!=t?t:n}function Pn(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Hn(e){var t,n,r,i,o,a=[];if(!e._d){for(r=Pn(e),e._w&&null==e._a[qe]&&null==e._a[Be]&&Un(e),null!=e._dayOfYear&&(o=zn(e._a[Qe],r[Qe]),(e._dayOfYear>_t(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Mt(o,0,e._dayOfYear),e._a[Be]=n.getUTCMonth(),e._a[qe]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ve]&&0===e._a[Ge]&&0===e._a[Je]&&0===e._a[Ze]&&(e._nextDay=!0,e._a[Ve]=0),e._d=(e._useUTC?Mt:vt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Un(e){var t,n,r,i,o,a,s,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,n=zn(t.GG,e._a[Qe],wt(Zn(),1,4).year),r=zn(t.W,1),((i=zn(t.E,1))<1||i>7)&&(u=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,l=wt(Zn(),o,a),n=zn(t.gg,e._a[Qe],l.year),r=zn(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(u=!0)):i=o),r<1||r>Dt(n,o,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(s=bt(n,r,i,o,a),e._a[Qe]=s.year,e._dayOfYear=s.dayOfYear)}function Fn(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],g(e).empty=!0;var t,n,r,o,a,s,u,l=""+e._i,c=l.length,d=0;for(u=(r=B(e._f,e._locale).match(R)||[]).length,t=0;t<u;t++)o=r[t],(n=(l.match(Oe(o,e))||[])[0])&&((a=l.substr(0,l.indexOf(n))).length>0&&g(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),d+=n.length),H[o]?(n?g(e).empty=!1:g(e).unusedTokens.push(o),Fe(o,n,e)):e._strict&&!n&&g(e).unusedTokens.push(o);g(e).charsLeftOver=c-d,l.length>0&&g(e).unusedInput.push(l),e._a[Ve]<=12&&!0===g(e).bigHour&&e._a[Ve]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Ve]=Wn(e._locale,e._a[Ve],e._meridiem),null!==(s=g(e).era)&&(e._a[Qe]=e._locale.erasConvertYear(s,e._a[Qe])),Hn(e),Tn(e)}else On(e);else In(e)}function Wn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Qn(e){var t,n,r,i,o,a,s=!1,u=e._f.length;if(0===u)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<u;i++)o=0,a=!1,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Fn(t),y(t)&&(a=!0),o+=g(t).charsLeftOver,o+=10*g(t).unusedTokens.length,g(t).score=o,s?o<r&&(r=o,n=t):(null==r||o<r||a)&&(r=o,n=t,a&&(s=!0));m(e,n||t)}function Bn(e){if(!e._d){var t=oe(e._i),n=void 0===t.day?t.date:t.day;e._a=f([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Hn(e)}}function qn(e){var t=new w(Tn(Vn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Vn(e){var t=e._i,n=e._f;return e._locale=e._locale||vn(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),D(t)?new w(Tn(t)):(h(t)?e._d=t:a(n)?Qn(e):n?Fn(e):Gn(e),y(e)||(e._d=null),e))}function Gn(e){var t=e._i;c(t)?e._d=new Date(i.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Rn(e):a(t)?(e._a=f(t.slice(0),(function(e){return parseInt(e,10)})),Hn(e)):s(t)?Bn(e):d(t)?e._d=new Date(t):i.createFromInputFallback(e)}function Jn(e,t,n,r,i){var o={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=e,o._f=t,o._strict=r,qn(o)}function Zn(e,t,n,r){return Jn(e,t,n,r,!1)}i.createFromInputFallback=S("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(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Kn=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()})),Xn=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()}));function $n(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Zn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function er(){return $n("isBefore",[].slice.call(arguments,0))}function tr(){return $n("isAfter",[].slice.call(arguments,0))}var nr=function(){return Date.now?Date.now():+new Date},rr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ir(e){var t,n,r=!1,i=rr.length;for(t in e)if(u(e,t)&&(-1===We.call(rr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[rr[n]]){if(r)return!1;parseFloat(e[rr[n]])!==de(e[rr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Er(NaN)}function sr(e){var t=oe(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,u=t.minute||0,l=t.second||0,c=t.millisecond||0;this._isValid=ir(t),this._milliseconds=+c+1e3*l+6e4*u+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=vn(),this._bubble()}function ur(e){return e instanceof sr}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cr(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&de(e[r])!==de(t[r]))&&a++;return a+o}function dr(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+O(~~(e/60),2)+t+O(~~e%60,2)}))}dr("Z",":"),dr("ZZ",""),Ye("Z",xe),Ye("ZZ",xe),He(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=fr(xe,e)}));var hr=/([\+\-]|\d\d)/gi;function fr(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(hr)||["-",0,0])[1]+de(n[2]))?0:"+"===n[0]?r:-r}function mr(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(D(e)||h(e)?e.valueOf():Zn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Zn(e).local()}function pr(e){return-Math.round(e._d.getTimezoneOffset())}function _r(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=fr(xe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=pr(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?jr(this,Er(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:pr(this)}function gr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yr(e){return this.utcOffset(0,e)}function vr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(pr(this),"m")),this}function Mr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=fr(Ne,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Tr(e){return!!this.isValid()&&(e=e?Zn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function br(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return b(t,this),(t=Vn(t))._a?(e=t._isUTC?p(t._a):Zn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Dr(){return!!this.isValid()&&!this._isUTC}function Lr(){return!!this.isValid()&&this._isUTC}function Sr(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var kr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ar=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Er(e,t){var n,r,i,o=e,a=null;return ur(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=kr.exec(e))?(n="-"===a[1]?-1:1,o={y:0,d:de(a[qe])*n,h:de(a[Ve])*n,m:de(a[Ge])*n,s:de(a[Je])*n,ms:de(lr(1e3*a[Ze]))*n}):(a=Ar.exec(e))?(n="-"===a[1]?-1:1,o={y:Ir(a[2],n),M:Ir(a[3],n),w:Ir(a[4],n),d:Ir(a[5],n),h:Ir(a[6],n),m:Ir(a[7],n),s:Ir(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=xr(Zn(o.from),Zn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new sr(o),ur(e)&&u(e,"_locale")&&(r._locale=e._locale),ur(e)&&u(e,"_isValid")&&(r._isValid=e._isValid),r}function Ir(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Nr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function xr(e,t){var n;return e.isValid()&&t.isValid()?(t=mr(t,e),e.isBefore(t)?n=Nr(e,t):((n=Nr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Cr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(E(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),jr(this,Er(n,r),e),this}}function jr(e,t,n,r){var o=t._milliseconds,a=lr(t._days),s=lr(t._months);e.isValid()&&(r=null==r||r,s&&ct(e,fe(e,"Month")+s*n),a&&me(e,"Date",fe(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&i.updateOffset(e,a||s))}Er.fn=sr.prototype,Er.invalid=ar;var Yr=Cr(1,"add"),Or=Cr(-1,"subtract");function Rr(e){return"string"==typeof e||e instanceof String}function zr(e){return D(e)||h(e)||Rr(e)||d(e)||Hr(e)||Pr(e)||null==e}function Pr(e){var t,n,r=s(e)&&!l(e),i=!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"],a=o.length;for(t=0;t<a;t+=1)n=o[t],i=i||u(e,n);return r&&i}function Hr(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!d(t)&&Rr(e)})).length),t&&n}function Ur(e){var t,n,r=s(e)&&!l(e),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)n=o[t],i=i||u(e,n);return r&&i}function Fr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Wr(e,t){1===arguments.length&&(arguments[0]?zr(arguments[0])?(e=arguments[0],t=void 0):Ur(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Zn(),r=mr(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=t&&(I(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Zn(n)))}function Qr(){return new w(this)}function Br(e,t){var n=D(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ie(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function qr(e,t){var n=D(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ie(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Vr(e,t,n,r){var i=D(e)?e:Zn(e),o=D(t)?t:Zn(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))}function Gr(e,t){var n,r=D(e)?e:Zn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=ie(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Jr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Zr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Kr(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=mr(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=ie(t)){case"year":o=Xr(this,r)/12;break;case"month":o=Xr(this,r);break;case"quarter":o=Xr(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:ce(o)}function Xr(e,t){if(e.date()<t.date())return-Xr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function $r(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ei(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):I(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Q(n,"Z")):Q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ti(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(e+t+n+r)}function ni(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=Q(this,e);return this.localeData().postformat(t)}function ri(e,t){return this.isValid()&&(D(e)&&e.isValid()||Zn(e).isValid())?Er({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ii(e){return this.from(Zn(),e)}function oi(e,t){return this.isValid()&&(D(e)&&e.isValid()||Zn(e).isValid())?Er({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ai(e){return this.to(Zn(),e)}function si(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vn(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ui=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function li(){return this._locale}var ci=1e3,di=60*ci,hi=60*di,fi=3506328*hi;function mi(e,t){return(e%t+t)%t}function pi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fi:new Date(e,t,n).valueOf()}function _i(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fi:Date.UTC(e,t,n)}function gi(e){var t,n;if(void 0===(e=ie(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?_i:pi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mi(t+(this._isUTC?0:this.utcOffset()*di),hi);break;case"minute":t=this._d.valueOf(),t-=mi(t,di);break;case"second":t=this._d.valueOf(),t-=mi(t,ci)}return this._d.setTime(t),i.updateOffset(this,!0),this}function yi(e){var t,n;if(void 0===(e=ie(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?_i:pi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=hi-mi(t+(this._isUTC?0:this.utcOffset()*di),hi)-1;break;case"minute":t=this._d.valueOf(),t+=di-mi(t,di)-1;break;case"second":t=this._d.valueOf(),t+=ci-mi(t,ci)-1}return this._d.setTime(t),i.updateOffset(this,!0),this}function vi(){return this._d.valueOf()-6e4*(this._offset||0)}function Mi(){return Math.floor(this.valueOf()/1e3)}function Ti(){return new Date(this.valueOf())}function bi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wi(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Di(){return this.isValid()?this.toISOString():null}function Li(){return y(this)}function Si(){return m({},g(this))}function ki(){return g(this).overflow}function Ai(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ei(e,t){var n,r,o,a=this._eras||vn("en")._eras;for(n=0,r=a.length;n<r;++n)switch("string"==typeof a[n].since&&(o=i(a[n].since).startOf("day"),a[n].since=o.valueOf()),typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":o=i(a[n].until).startOf("day").valueOf(),a[n].until=o.valueOf()}return a}function Ii(e,t,n){var r,i,o,a,s,u=this.eras();for(e=e.toUpperCase(),r=0,i=u.length;r<i;++r)if(o=u[r].name.toUpperCase(),a=u[r].abbr.toUpperCase(),s=u[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[r];break;case"NNNN":if(o===e)return u[r];break;case"NNNNN":if(s===e)return u[r]}else if([o,a,s].indexOf(e)>=0)return u[r]}function Ni(e,t){var n=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*n}function xi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Ci(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function ji(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Yi(){var e,t,n,r,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,r=this.clone().startOf("day").valueOf(),o[e].since<=r&&r<=o[e].until||o[e].until<=r&&r<=o[e].since)return(this.year()-i(o[e].since).year())*n+o[e].offset;return this.year()}function Oi(e){return u(this,"_erasNameRegex")||Wi.call(this),e?this._erasNameRegex:this._erasRegex}function Ri(e){return u(this,"_erasAbbrRegex")||Wi.call(this),e?this._erasAbbrRegex:this._erasRegex}function zi(e){return u(this,"_erasNarrowRegex")||Wi.call(this),e?this._erasNarrowRegex:this._erasRegex}function Pi(e,t){return t.erasAbbrRegex(e)}function Hi(e,t){return t.erasNameRegex(e)}function Ui(e,t){return t.erasNarrowRegex(e)}function Fi(e,t){return t._eraYearOrdinalRegex||Ee}function Wi(){var e,t,n=[],r=[],i=[],o=[],a=this.eras();for(e=0,t=a.length;e<t;++e)r.push(ze(a[e].name)),n.push(ze(a[e].abbr)),i.push(ze(a[e].narrow)),o.push(ze(a[e].name)),o.push(ze(a[e].abbr)),o.push(ze(a[e].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function Qi(e,t){U(0,[e,e.length],0,t)}function Bi(e){return Ki.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function qi(e){return Ki.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Vi(){return Dt(this.year(),1,4)}function Gi(){return Dt(this.isoWeekYear(),1,4)}function Ji(){var e=this.localeData()._week;return Dt(this.year(),e.dow,e.doy)}function Zi(){var e=this.localeData()._week;return Dt(this.weekYear(),e.dow,e.doy)}function Ki(e,t,n,r,i){var o;return null==e?wt(this,r,i).year:(t>(o=Dt(e,r,i))&&(t=o),Xi.call(this,e,t,n,r,i))}function Xi(e,t,n,r,i){var o=bt(e,t,n,r,i),a=Mt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function $i(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}U("N",0,0,"eraAbbr"),U("NN",0,0,"eraAbbr"),U("NNN",0,0,"eraAbbr"),U("NNNN",0,0,"eraName"),U("NNNNN",0,0,"eraNarrow"),U("y",["y",1],"yo","eraYear"),U("y",["yy",2],0,"eraYear"),U("y",["yyy",3],0,"eraYear"),U("y",["yyyy",4],0,"eraYear"),Ye("N",Pi),Ye("NN",Pi),Ye("NNN",Pi),Ye("NNNN",Hi),Ye("NNNNN",Ui),He(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e})),Ye("y",Ee),Ye("yy",Ee),Ye("yyy",Ee),Ye("yyyy",Ee),Ye("yo",Fi),He(["y","yy","yyy","yyyy"],Qe),He(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Qe]=n._locale.eraYearOrdinalParse(e,i):t[Qe]=parseInt(e,10)})),U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qi("gggg","weekYear"),Qi("ggggg","weekYear"),Qi("GGGG","isoWeekYear"),Qi("GGGGG","isoWeekYear"),re("weekYear","gg"),re("isoWeekYear","GG"),se("weekYear",1),se("isoWeekYear",1),Ye("G",Ie),Ye("g",Ie),Ye("GG",we,ve),Ye("gg",we,ve),Ye("GGGG",ke,Te),Ye("gggg",ke,Te),Ye("GGGGG",Ae,be),Ye("ggggg",Ae,be),Ue(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=de(e)})),Ue(["gg","GG"],(function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),re("quarter","Q"),se("quarter",7),Ye("Q",ye),He("Q",(function(e,t){t[Be]=3*(de(e)-1)})),U("D",["DD",2],"Do","date"),re("date","D"),se("date",9),Ye("D",we),Ye("DD",we,ve),Ye("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),He(["D","DD"],qe),He("Do",(function(e,t){t[qe]=de(e.match(we)[0])}));var eo=he("Date",!0);function to(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}U("DDD",["DDDD",3],"DDDo","dayOfYear"),re("dayOfYear","DDD"),se("dayOfYear",4),Ye("DDD",Se),Ye("DDDD",Me),He(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=de(e)})),U("m",["mm",2],0,"minute"),re("minute","m"),se("minute",14),Ye("m",we),Ye("mm",we,ve),He(["m","mm"],Ge);var no=he("Minutes",!1);U("s",["ss",2],0,"second"),re("second","s"),se("second",15),Ye("s",we),Ye("ss",we,ve),He(["s","ss"],Je);var ro,io,oo=he("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),re("millisecond","ms"),se("millisecond",16),Ye("S",Se,ye),Ye("SS",Se,ve),Ye("SSS",Se,Me),ro="SSSS";ro.length<=9;ro+="S")Ye(ro,Ee);function ao(e,t){t[Ze]=de(1e3*("0."+e))}for(ro="S";ro.length<=9;ro+="S")He(ro,ao);function so(){return this._isUTC?"UTC":""}function uo(){return this._isUTC?"Coordinated Universal Time":""}io=he("Milliseconds",!1),U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var lo=w.prototype;function co(e){return Zn(1e3*e)}function ho(){return Zn.apply(null,arguments).parseZone()}function fo(e){return e}lo.add=Yr,lo.calendar=Wr,lo.clone=Qr,lo.diff=Kr,lo.endOf=yi,lo.format=ni,lo.from=ri,lo.fromNow=ii,lo.to=oi,lo.toNow=ai,lo.get=pe,lo.invalidAt=ki,lo.isAfter=Br,lo.isBefore=qr,lo.isBetween=Vr,lo.isSame=Gr,lo.isSameOrAfter=Jr,lo.isSameOrBefore=Zr,lo.isValid=Li,lo.lang=ui,lo.locale=si,lo.localeData=li,lo.max=Xn,lo.min=Kn,lo.parsingFlags=Si,lo.set=_e,lo.startOf=gi,lo.subtract=Or,lo.toArray=bi,lo.toObject=wi,lo.toDate=Ti,lo.toISOString=ei,lo.inspect=ti,"undefined"!=typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=Di,lo.toString=$r,lo.unix=Mi,lo.valueOf=vi,lo.creationData=Ai,lo.eraName=xi,lo.eraNarrow=Ci,lo.eraAbbr=ji,lo.eraYear=Yi,lo.year=gt,lo.isLeapYear=yt,lo.weekYear=Bi,lo.isoWeekYear=qi,lo.quarter=lo.quarters=$i,lo.month=dt,lo.daysInMonth=ht,lo.week=lo.weeks=Et,lo.isoWeek=lo.isoWeeks=It,lo.weeksInYear=Ji,lo.weeksInWeekYear=Zi,lo.isoWeeksInYear=Vi,lo.isoWeeksInISOWeekYear=Gi,lo.date=eo,lo.day=lo.days=Bt,lo.weekday=qt,lo.isoWeekday=Vt,lo.dayOfYear=to,lo.hour=lo.hours=on,lo.minute=lo.minutes=no,lo.second=lo.seconds=oo,lo.millisecond=lo.milliseconds=io,lo.utcOffset=_r,lo.utc=yr,lo.local=vr,lo.parseZone=Mr,lo.hasAlignedHourOffset=Tr,lo.isDST=br,lo.isLocal=Dr,lo.isUtcOffset=Lr,lo.isUtc=Sr,lo.isUTC=Sr,lo.zoneAbbr=so,lo.zoneName=uo,lo.dates=S("dates accessor is deprecated. Use date instead.",eo),lo.months=S("months accessor is deprecated. Use month instead",dt),lo.years=S("years accessor is deprecated. Use year instead",gt),lo.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),lo.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wr);var mo=C.prototype;function po(e,t,n,r){var i=vn(),o=p().set(r,t);return i[n](o,e)}function _o(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return po(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=po(e,r,n,"month");return i}function go(e,t,n,r){"boolean"==typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i,o=vn(),a=e?o._week.dow:0,s=[];if(null!=n)return po(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=po(t,(i+a)%7,r,"day");return s}function yo(e,t){return _o(e,t,"months")}function vo(e,t){return _o(e,t,"monthsShort")}function Mo(e,t,n){return go(e,t,n,"weekdays")}function To(e,t,n){return go(e,t,n,"weekdaysShort")}function bo(e,t,n){return go(e,t,n,"weekdaysMin")}mo.calendar=Y,mo.longDateFormat=V,mo.invalidDate=J,mo.ordinal=X,mo.preparse=fo,mo.postformat=fo,mo.relativeTime=ee,mo.pastFuture=te,mo.set=N,mo.eras=Ei,mo.erasParse=Ii,mo.erasConvertYear=Ni,mo.erasAbbrRegex=Ri,mo.erasNameRegex=Oi,mo.erasNarrowRegex=zi,mo.months=at,mo.monthsShort=st,mo.monthsParse=lt,mo.monthsRegex=mt,mo.monthsShortRegex=ft,mo.week=Lt,mo.firstDayOfYear=At,mo.firstDayOfWeek=kt,mo.weekdays=Ht,mo.weekdaysMin=Ft,mo.weekdaysShort=Ut,mo.weekdaysParse=Qt,mo.weekdaysRegex=Gt,mo.weekdaysShortRegex=Jt,mo.weekdaysMinRegex=Zt,mo.isPM=nn,mo.meridiem=an,_n("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(e){var t=e%10;return e+(1===de(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",_n),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",vn);var wo=Math.abs;function Do(){var e=this._data;return this._milliseconds=wo(this._milliseconds),this._days=wo(this._days),this._months=wo(this._months),e.milliseconds=wo(e.milliseconds),e.seconds=wo(e.seconds),e.minutes=wo(e.minutes),e.hours=wo(e.hours),e.months=wo(e.months),e.years=wo(e.years),this}function Lo(e,t,n,r){var i=Er(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function So(e,t){return Lo(this,e,t,1)}function ko(e,t){return Lo(this,e,t,-1)}function Ao(e){return e<0?Math.floor(e):Math.ceil(e)}function Eo(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,u=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Ao(No(s)+a),a=0,s=0),u.milliseconds=o%1e3,e=ce(o/1e3),u.seconds=e%60,t=ce(e/60),u.minutes=t%60,n=ce(t/60),u.hours=n%24,a+=ce(n/24),s+=i=ce(Io(a)),a-=Ao(No(i)),r=ce(s/12),s%=12,u.days=a,u.months=s,u.years=r,this}function Io(e){return 4800*e/146097}function No(e){return 146097*e/4800}function xo(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ie(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Io(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(No(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Co(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*de(this._months/12):NaN}function jo(e){return function(){return this.as(e)}}var Yo=jo("ms"),Oo=jo("s"),Ro=jo("m"),zo=jo("h"),Po=jo("d"),Ho=jo("w"),Uo=jo("M"),Fo=jo("Q"),Wo=jo("y");function Qo(){return Er(this)}function Bo(e){return e=ie(e),this.isValid()?this[e+"s"]():NaN}function qo(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vo=qo("milliseconds"),Go=qo("seconds"),Jo=qo("minutes"),Zo=qo("hours"),Ko=qo("days"),Xo=qo("months"),$o=qo("years");function ea(){return ce(this.days()/7)}var ta=Math.round,na={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ra(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ia(e,t,n,r){var i=Er(e).abs(),o=ta(i.as("s")),a=ta(i.as("m")),s=ta(i.as("h")),u=ta(i.as("d")),l=ta(i.as("M")),c=ta(i.as("w")),d=ta(i.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||a<=1&&["m"]||a<n.m&&["mm",a]||s<=1&&["h"]||s<n.h&&["hh",s]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),(h=h||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,ra.apply(null,h)}function oa(e){return void 0===e?ta:"function"==typeof e&&(ta=e,!0)}function aa(e,t){return void 0!==na[e]&&(void 0===t?na[e]:(na[e]=t,"s"===e&&(na.ss=t-1),!0))}function sa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=na;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},na,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=ia(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var ua=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,u=ua(this._milliseconds)/1e3,l=ua(this._days),c=ua(this._months),d=this.asSeconds();return d?(e=ce(u/60),t=ce(e/60),u%=60,e%=60,n=ce(c/12),c%=12,r=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=la(this._months)!==la(d)?"-":"",a=la(this._days)!==la(d)?"-":"",s=la(this._milliseconds)!==la(d)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(u?s+r+"S":"")):"P0D"}var da=sr.prototype;return da.isValid=or,da.abs=Do,da.add=So,da.subtract=ko,da.as=xo,da.asMilliseconds=Yo,da.asSeconds=Oo,da.asMinutes=Ro,da.asHours=zo,da.asDays=Po,da.asWeeks=Ho,da.asMonths=Uo,da.asQuarters=Fo,da.asYears=Wo,da.valueOf=Co,da._bubble=Eo,da.clone=Qo,da.get=Bo,da.milliseconds=Vo,da.seconds=Go,da.minutes=Jo,da.hours=Zo,da.days=Ko,da.weeks=ea,da.months=Xo,da.years=$o,da.humanize=sa,da.toISOString=ca,da.toString=ca,da.toJSON=ca,da.locale=si,da.localeData=li,da.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),da.lang=ui,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Ye("x",Ie),Ye("X",Ce),He("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),He("x",(function(e,t,n){n._d=new Date(de(e))})),i.version="2.29.4",o(Zn),i.fn=lo,i.min=er,i.max=tr,i.now=nr,i.utc=p,i.unix=co,i.months=yo,i.isDate=h,i.locale=_n,i.invalid=v,i.duration=Er,i.isMoment=D,i.weekdays=Mo,i.parseZone=ho,i.localeData=vn,i.isDuration=ur,i.monthsShort=vo,i.weekdaysMin=bo,i.defineLocale=gn,i.updateLocale=yn,i.locales=Mn,i.weekdaysShort=To,i.normalizeUnits=ie,i.relativeTimeRounding=oa,i.relativeTimeThreshold=aa,i.calendarFormat=Fr,i.prototype=lo,i.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"},i}()},93379:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},a=[],s=0;s<e.length;s++){var u=e[s],l=r.base?u[0]+r.base:u[0],c=o[l]||0,d="".concat(l," ").concat(c);o[l]=c+1;var h=n(d),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var m=i(f,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:m,references:1})}a.push(d)}return a}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=n(o[a]);t[s].references--}for(var u=r(e,i),l=0;l<o.length;l++){var c=n(o[l]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=u}}},90569:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},19216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},44589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},52909:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiB2aWV3Qm94PSIwIDAgOCA4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSI0IiBjeT0iNCIgcj0iMy4yNSIgc3Ryb2tlPSJ1cmwoI3BhaW50MF9hbmd1bGFyXzEwNzJfNTIzNDMpIiBzdHJva2Utd2lkdGg9IjEuNSIvPgo8ZGVmcz4KPHJhZGlhbEdyYWRpZW50IGlkPSJwYWludDBfYW5ndWxhcl8xMDcyXzUyMzQzIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDQgNCkgcm90YXRlKC0xODApIHNjYWxlKDQpIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzlBQTRCMiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM5QUE0QjIiIHN0b3Atb3BhY2l0eT0iMCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo="},19173:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiB2aWV3Qm94PSIwIDAgOCA4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQgOEM2LjIwOTE0IDggOCA2LjIwOTE0IDggNEM4IDEuNzkwODYgNi4yMDkxNCAwIDQgMEMxLjc5MDg2IDAgMCAxLjc5MDg2IDAgNEMwIDYuMjA5MTQgMS43OTA4NiA4IDQgOFpNNS44NTM1NSAzLjM1MzU1QzYuMDQ4ODIgMy4xNTgyOSA2LjA0ODgyIDIuODQxNzEgNS44NTM1NSAyLjY0NjQ1QzUuNjU4MjkgMi40NTExOCA1LjM0MTcxIDIuNDUxMTggNS4xNDY0NSAyLjY0NjQ1TDMuNSA0LjI5Mjg5TDIuODUzNTUgMy42NDY0NUMyLjY1ODI5IDMuNDUxMTggMi4zNDE3MSAzLjQ1MTE4IDIuMTQ2NDUgMy42NDY0NUMxLjk1MTE4IDMuODQxNzEgMS45NTExOCA0LjE1ODI5IDIuMTQ2NDUgNC4zNTM1NUwzLjE0NjQ1IDUuMzUzNTVDMy4zNDE3MSA1LjU0ODgyIDMuNjU4MjkgNS41NDg4MiAzLjg1MzU1IDUuMzUzNTVMNS44NTM1NSAzLjM1MzU1WiIgZmlsbD0iIzIyQzU1RSIvPgo8L3N2Zz4K"},59947:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiB2aWV3Qm94PSIwIDAgOCA4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQgOEM2LjIwOTE0IDggOCA2LjIwOTE0IDggNEM4IDEuNzkwODYgNi4yMDkxNCAwIDQgMEMxLjc5MDg2IDAgMCAxLjc5MDg2IDAgNEMwIDYuMjA5MTQgMS43OTA4NiA4IDQgOFpNNS44NTM1NSAzLjM1MzU1QzYuMDQ4ODIgMy4xNTgyOSA2LjA0ODgyIDIuODQxNzEgNS44NTM1NSAyLjY0NjQ1QzUuNjU4MjkgMi40NTExOCA1LjM0MTcxIDIuNDUxMTggNS4xNDY0NSAyLjY0NjQ1TDMuNSA0LjI5Mjg5TDIuODUzNTUgMy42NDY0NUMyLjY1ODI5IDMuNDUxMTggMi4zNDE3MSAzLjQ1MTE4IDIuMTQ2NDUgMy42NDY0NUMxLjk1MTE4IDMuODQxNzEgMS45NTExOCA0LjE1ODI5IDIuMTQ2NDUgNC4zNTM1NUwzLjE0NjQ1IDUuMzUzNTVDMy4zNDE3MSA1LjU0ODgyIDMuNjU4MjkgNS41NDg4MiAzLjg1MzU1IDUuMzUzNTVMNS44NTM1NSAzLjM1MzU1WiIgZmlsbD0iIzlBQTRCMiIvPgo8L3N2Zz4K"},91164:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwMCIgd2lkdGg9IjMwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBkYXRhLW5hbWU9IkxheWVyIDEiIHZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTTQ4LjcxIDQyLjkxTDM0LjA4IDI4LjI5IDQ0LjMzIDE4YTEgMSAwIDAwLS4zMy0xLjYxTDIuMzUgMS4wNmExIDEgMCAwMC0xLjI5IDEuMjlMMTYuMzkgNDRhMSAxIDAgMDAxLjY1LjM2bDEwLjI1LTEwLjI4IDE0LjYyIDE0LjYzYTEgMSAwIDAwMS40MSAwbDQuMzgtNC4zOGExIDEgMCAwMC4wMS0xLjQyem0tNS4wOSAzLjY3TDI5IDMyYTEgMSAwIDAwLTEuNDEgMGwtOS44NSA5Ljg1TDMuNjkgMy42OWwzOC4xMiAxNEwzMiAyNy41OEExIDEgMCAwMDMyIDI5bDE0LjU5IDE0LjYyeiIvPjwvc3ZnPg=="}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.amdO={},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.b=void 0,n.nc=void 0;var r={};(()=>{n.d(r,{Q:()=>i});var e=n(58776),t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};const i=function(){function n(e){this.name="AgentDesktopPlugin",this.config={},this.isTyping=!1,this.stopTypingInterval=500,this.isTabActive=!0,this.isReadRecipetSent=!1,this.config=t(t({},this.config),e)}return n.prototype.onHostCreate=function(){var t=this,n=this;n.hostInstance.on("jwtGrantSuccess",(function(r){t.agentDesktopInfo||(n.onInit(),t.config=n.extend(n,r),t.agentDesktopInfo=new e.Z(t.config))})),n.hostInstance.on("beforeViewInit",(function(e){n.hostInstance.chatEle.off("click",".close-btn").on("click",".close-btn",(function(e){var t={};t.clientMessageId=(new Date).getTime(),t.event="close_agent_chat",t.message={body:"",type:""},t.resourceid="/bot.message",n.hostInstance.bot.sendMessage(t,(function(e){}))}))})),n.removeEmptyBubblesInTemplate()},n.prototype.onInit=function(){var e=this,t=this;this.$=t.hostInstance.$,this.appendVideoAudioElemnts(),document.addEventListener("visibilitychange",(function(){if("visible"===document.visibilityState){if(e.isTabActive=!0,!e.isReadRecipetSent){var n={event:"message_read",message:{body:"",type:""},resourceid:"/bot.message"};t.hostInstance.bot.sendMessage(n,(function(e){})),e.isReadRecipetSent=!0}}else e.isTabActive=!1})),t.hostInstance.on("onKeyDown",(function(n){var r=n.event;if(13!==r.keyCode&&r.which<=90&&r.which>=48||r.which>=96&&r.which<=105||r.which>=186&&r.which<=222||(32===r.keyCode||8===r.keyCode)&&"connected"===localStorage.getItem("kr-agent-status")){if(!e.isTyping){var i={event:"typing",message:{body:"",type:""},resourceid:"/bot.message"};t.hostInstance.bot.sendMessage(i,(function(e){e&&e.message&&console.log("Failed to send reciept",e,r.msgData)})),e.isTyping=!0}clearTimeout(e.typingTimer),e.typingTimer=setTimeout((function(){return t.sendStopTypingEvent()}),e.stopTypingInterval)}else 13===r.keyCode&&(clearTimeout(e.typingTimer),t.sendStopTypingEvent())})),t.hostInstance.on("onWSMessage",(function(t){var n,r,i,o,a,s,u,l,c,d,h,f,m,p;"agent_connected"===(null===(r=null===(n=t.messageData)||void 0===n?void 0:n.message)||void 0===r?void 0:r.type)?localStorage.setItem("kr-agent-status","connected"):"agent_disconnected"===(null===(o=null===(i=t.messageData)||void 0===i?void 0:i.message)||void 0===o?void 0:o.type)&&localStorage.setItem("kr-agent-status","disconneted"),t.messageData.message&&"text"===(null===(s=null===(a=null==t?void 0:t.messageData)||void 0===a?void 0:a.message[0])||void 0===s?void 0:s.type)&&"AGENT"===(null===(l=null===(u=null==t?void 0:t.messageData)||void 0===u?void 0:u.author)||void 0===l?void 0:l.type)&&(e.$(".typingIndicatorContent").css("display","none"),e.isReadRecipetSent=!1),"AGENT"===(null===(h=null===(d=null===(c=t.messageData)||void 0===c?void 0:c.message)||void 0===d?void 0:d.author)||void 0===h?void 0:h.type)&&"typing"===t.messageData.message.type&&"connected"===localStorage.getItem("kr-agent-status")?(e.$(".typingIndicatorContent").css("display","block"),e.$(".typingIndicator").addClass("agent-type-icon")):"AGENT"===(null===(p=null===(m=null===(f=t.messageData)||void 0===f?void 0:f.message)||void 0===m?void 0:m.author)||void 0===p?void 0:p.type)&&"stoptyping"===t.messageData.message.type&&"connected"===localStorage.getItem("kr-agent-status")?e.$(".typingIndicatorContent").css("display","none"):"conneted"!==localStorage.getItem("kr-agent-status")&&e.$(".typingIndicator").removeClass("agent-type-icon")})),t.hostInstance.on("afterRenderMessage",(function(n){var r,i,o,a,s;if(!n.messageHtml)return!1;if("connected"==localStorage.getItem("kr-agent-status"))if("currentUser"===(null===(r=n.msgData)||void 0===r?void 0:r.type)){e.$(".typingIndicatorContent").css("display","none");var u=n.msgData.message,l=n.messageHtml.find(".extra-info");l.children(".sentIndicator").length||(l.append('<div class="sentIndicator"></div>'),t.hostInstance.bot.on("message",(function(t){var n=JSON.parse(t.data);if(n)if("bot"===n.from&&"events"===n.type&&n.message.clientMessageId===u[0].clientMessageId){var r=e.$("#"+n.message.clientMessageId+" .sentIndicator");"message_delivered"===n.message.type?r.hasClass("read")||r.addClass("delivered"):"message_read"===n.message.type&&r.removeClass("delivered").addClass("read")}else if("bot"===n.from&&"events"===n.type&&"all"===n.message.clientMessageId){r=e.$(" .sentIndicator");"message_read"===n.message.type&&r.removeClass("delivered").addClass("read")}})))}else if("live_agent"==(null===(s=null===(a=null===(o=null===(i=n.msgData)||void 0===i?void 0:i.message[0])||void 0===o?void 0:o.component)||void 0===a?void 0:a.payload)||void 0===s?void 0:s.template_type)){var c={};n.msgData.messageId;c.event="message_delivered",c.message={body:"",type:""},c.resourceid="/bot.message",t.hostInstance.bot.sendMessage(c,(function(e){})),e.isTabActive&&(c.event="message_read",t.hostInstance.bot.sendMessage(c,(function(e){})),e.isReadRecipetSent=!0)}}))},n.prototype.appendVideoAudioElemnts=function(){var e=this.hostInstance.chatEle;e.append('<video id="kore_local_video" autoplay="autoplay" playsinline style="width:0px;height:0px"></video>'),e.append('<video id="kore_remote_video" autoplay="autoplay" playsinline style="width:0px;height:0px"></video>')},n.prototype.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]&&"object"==typeof t[n]?this.extend(e[n],t[n]):e[n]=t[n]);return e},n.prototype.sendStopTypingEvent=function(){var e={event:"stop_typing",message:{body:"",type:""},resourceid:"/bot.message"};this.hostInstance.bot.sendMessage(e,(function(e){e&&e.message&&console.log("Failed to send reciept",e)})),this.isTyping=!1},n.prototype.removeEmptyBubblesInTemplate=function(){var e=this.hostInstance,t=function(){function e(){}return e.prototype.renderMessage=function(e){var t,n,r,i,o,a,s,u;return"live_agent"!==(null===(r=null===(n=null===(t=null==e?void 0:e.message[0])||void 0===t?void 0:t.component)||void 0===n?void 0:n.payload)||void 0===r?void 0:r.template_type)||(null===(a=null===(o=null===(i=null==e?void 0:e.message[0])||void 0===i?void 0:i.component)||void 0===o?void 0:o.payload)||void 0===a?void 0:a.text.trim().length)?""===(null===(u=null===(s=null==e?void 0:e.message[0])||void 0===s?void 0:s.cInfo)||void 0===u?void 0:u.body)&&"_ignore_message_render_":"_ignore_message_render_"},e}();e.templateManager.installTemplate(new t)},n}()})();var o=r.Q;export{o as AgentDesktopPlugin};