forked from onsip/SIP.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsip-core.min.js
1 lines (1 loc) · 155 KB
/
sip-core.min.js
1
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SIP=t():e.SIP=t()}(this,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",function(){return i}),r.d(t,"__assign",function(){return o}),r.d(t,"__rest",function(){return a}),r.d(t,"__decorate",function(){return s}),r.d(t,"__param",function(){return c}),r.d(t,"__metadata",function(){return u}),r.d(t,"__awaiter",function(){return d}),r.d(t,"__generator",function(){return l}),r.d(t,"__exportStar",function(){return h}),r.d(t,"__values",function(){return p}),r.d(t,"__read",function(){return f}),r.d(t,"__spread",function(){return g}),r.d(t,"__spreadArrays",function(){return v}),r.d(t,"__await",function(){return m}),r.d(t,"__asyncGenerator",function(){return y}),r.d(t,"__asyncDelegator",function(){return S}),r.d(t,"__asyncValues",function(){return T}),r.d(t,"__makeTemplateObject",function(){return b}),r.d(t,"__importStar",function(){return _}),r.d(t,"__importDefault",function(){return $});var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function s(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}c((n=n.apply(e,t||[])).next())})}function l(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function f(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function y(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||s(e,t)})})}function s(e,t){try{(r=i[e](t)).value instanceof m?Promise.resolve(r.value.v).then(c,u):d(o[0][2],r)}catch(e){d(o[0][3],e)}var r}function c(e){s("next",e)}function u(e){s("throw",e)}function d(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function T(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,i,(t=e[r](t)).done,t.value)})}}}function b(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function $(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(22),t),n.__exportStar(r(35),t),n.__exportStar(r(67),t),n.__exportStar(r(68),t),n.__exportStar(r(69),t),n.__exportStar(r(35),t),n.__exportStar(r(25),t),n.__exportStar(r(13),t),n.__exportStar(r(23),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(55),t),n.__exportStar(r(57),t),n.__exportStar(r(59),t),n.__exportStar(r(29),t),n.__exportStar(r(19),t),n.__exportStar(r(32),t),n.__exportStar(r(33),t),n.__exportStar(r(20),t),n.__exportStar(r(34),t),n.__exportStar(r(62),t),n.__exportStar(r(21),t),n.__exportStar(r(30),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),i=r(1),o=function(){function e(e,t,r,n){this.transactionConstructor=e,this.core=t,this.message=r,this.delegate=n,this.challenged=!1,this.stale=!1,this.logger=this.loggerFactory.getLogger("sip.user-agent-client"),this.init()}return e.prototype.dispose=function(){this.transaction.dispose()},Object.defineProperty(e.prototype,"loggerFactory",{get:function(){return this.core.loggerFactory},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transaction",{get:function(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction},enumerable:!0,configurable:!0}),e.prototype.cancel=function(t,r){var o=this;if(void 0===r&&(r={}),!this.transaction)throw new Error("Transaction undefined.");if(!this.message.to)throw new Error("To undefined.");if(!this.message.from)throw new Error("From undefined.");var a=this.core.makeOutgoingRequestMessage(n.C.CANCEL,this.message.ruri,this.message.from.uri,this.message.to.uri,{toTag:this.message.toTag,fromTag:this.message.fromTag,callId:this.message.callId,cseq:this.message.cseq},r.extraHeaders);if(a.branch=this.message.branch,this.message.headers.Route&&(a.headers.Route=this.message.headers.Route),t&&a.setHeader("Reason",t),this.transaction.state===i.TransactionState.Proceeding)new e(i.NonInviteClientTransaction,this.core,a);else this.transaction.once("stateChanged",function(){if(o.transaction&&o.transaction.state===i.TransactionState.Proceeding)new e(i.NonInviteClientTransaction,o.core,a)});return a},e.prototype.authenticationGuard=function(e){var t,r,n=e.statusCode;if(!n)throw new Error("Response status code undefined.");if(401!==n&&407!==n)return!0;if(401===n?(t=e.parseHeader("www-authenticate"),r="authorization"):(t=e.parseHeader("proxy-authenticate"),r="proxy-authorization"),!t)return this.logger.warn(n+" with wrong or missing challenge, cannot authenticate"),!0;if(this.challenged&&(this.stale||!0!==t.stale))return this.logger.warn(n+" apparently in authentication loop, cannot authenticate"),!0;if(!this.credentials&&(this.credentials=this.core.configuration.authenticationFactory(),!this.credentials))return this.logger.warn("Unable to obtain credentials, cannot authenticate"),!0;if(!this.credentials.authenticate(this.message,t))return!0;this.challenged=!0,t.stale&&(this.stale=!0);var i=this.message.cseq+=1;return this.message.setHeader("cseq",i+" "+this.message.method),this.message.setHeader(r,this.credentials.toString()),this.init(),!1},e.prototype.receiveResponse=function(e){if(this.authenticationGuard(e)){var t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});break;case/^1[0-9]{2}$/.test(t):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e});break;case/^2[0-9]{2}$/.test(t):this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:e});break;case/^3[0-9]{2}$/.test(t):this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});break;case/^[4-6][0-9]{2}$/.test(t):this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});break;default:throw new Error("Invalid status code "+t)}}},e.prototype.init=function(){var e=this,t={loggerFactory:this.loggerFactory,onRequestTimeout:function(){return e.onRequestTimeout()},onStateChange:function(t){t===i.TransactionState.Terminated&&(e.core.userAgentClients.delete(n),r===e._transaction&&e.dispose())},onTransportError:function(t){return e.onTransportError(t)},receiveResponse:function(t){return e.receiveResponse(t)}},r=new this.transactionConstructor(this.message,this.core.transport,t);this._transaction=r;var n=r.id+r.request.method;this.core.userAgentClients.set(n,this)},e.prototype.onRequestTimeout=function(){this.logger.warn("User agent client request timed out. Generating internal 408 Request Timeout.");var e=new n.IncomingResponseMessage;e.statusCode=408,e.reasonPhrase="Request Timeout",this.receiveResponse(e)},e.prototype.onTransportError=function(e){this.logger.error(e.message),this.logger.error("User agent client request transport error. Generating internal 503 Service Unavailable.");var t=new n.IncomingResponseMessage;t.statusCode=503,t.reasonPhrase="Service Unavailable",this.receiveResponse(t)},e}();t.UserAgentClient=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(16),i=r(2),o=r(12),a=r(1),s=function(){function e(e,t,r,n){this.transactionConstructor=e,this.core=t,this.message=r,this.delegate=n,this.logger=this.loggerFactory.getLogger("sip.user-agent-server"),this.toTag=r.toTag?r.toTag:o.newTag(),this.init()}return e.prototype.dispose=function(){this.transaction.dispose()},Object.defineProperty(e.prototype,"loggerFactory",{get:function(){return this.core.loggerFactory},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transaction",{get:function(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction},enumerable:!0,configurable:!0}),e.prototype.accept=function(e){if(void 0===e&&(e={statusCode:200}),!this.acceptable)throw new n.TransactionStateError(this.message.method+" not acceptable in state "+this.transaction.state+".");var t=e.statusCode;if(t<200||t>299)throw new TypeError("Invalid statusCode: "+t);return this.reply(e)},e.prototype.progress=function(e){if(void 0===e&&(e={statusCode:180}),!this.progressable)throw new n.TransactionStateError(this.message.method+" not progressable in state "+this.transaction.state+".");var t=e.statusCode;if(t<101||t>199)throw new TypeError("Invalid statusCode: "+t);return this.reply(e)},e.prototype.redirect=function(e,t){if(void 0===t&&(t={statusCode:302}),!this.redirectable)throw new n.TransactionStateError(this.message.method+" not redirectable in state "+this.transaction.state+".");var r=t.statusCode;if(r<300||r>399)throw new TypeError("Invalid statusCode: "+r);var i=new Array;return e.forEach(function(e){return i.push("Contact: "+e.toString())}),t.extraHeaders=(t.extraHeaders||[]).concat(i),this.reply(t)},e.prototype.reject=function(e){if(void 0===e&&(e={statusCode:480}),!this.rejectable)throw new n.TransactionStateError(this.message.method+" not rejectable in state "+this.transaction.state+".");var t=e.statusCode;if(t<400||t>699)throw new TypeError("Invalid statusCode: "+t);return this.reply(e)},e.prototype.trying=function(e){if(!this.tryingable)throw new n.TransactionStateError(this.message.method+" not tryingable in state "+this.transaction.state+".");return this.reply({statusCode:100})},e.prototype.receiveCancel=function(e){this.delegate&&this.delegate.onCancel&&this.delegate.onCancel(e)},Object.defineProperty(e.prototype,"acceptable",{get:function(){if(this.transaction instanceof a.InviteServerTransaction)return this.transaction.state===a.TransactionState.Proceeding||this.transaction.state===a.TransactionState.Accepted;if(this.transaction instanceof a.NonInviteServerTransaction)return this.transaction.state===a.TransactionState.Trying||this.transaction.state===a.TransactionState.Proceeding;throw new Error("Unknown transaction type.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"progressable",{get:function(){if(this.transaction instanceof a.InviteServerTransaction)return this.transaction.state===a.TransactionState.Proceeding;if(this.transaction instanceof a.NonInviteServerTransaction)return!1;throw new Error("Unknown transaction type.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"redirectable",{get:function(){if(this.transaction instanceof a.InviteServerTransaction)return this.transaction.state===a.TransactionState.Proceeding;if(this.transaction instanceof a.NonInviteServerTransaction)return this.transaction.state===a.TransactionState.Trying||this.transaction.state===a.TransactionState.Proceeding;throw new Error("Unknown transaction type.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rejectable",{get:function(){if(this.transaction instanceof a.InviteServerTransaction)return this.transaction.state===a.TransactionState.Proceeding;if(this.transaction instanceof a.NonInviteServerTransaction)return this.transaction.state===a.TransactionState.Trying||this.transaction.state===a.TransactionState.Proceeding;throw new Error("Unknown transaction type.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tryingable",{get:function(){if(this.transaction instanceof a.InviteServerTransaction)return this.transaction.state===a.TransactionState.Proceeding;if(this.transaction instanceof a.NonInviteServerTransaction)return this.transaction.state===a.TransactionState.Trying;throw new Error("Unknown transaction type.")},enumerable:!0,configurable:!0}),e.prototype.reply=function(e){e.toTag||100===e.statusCode||(e.toTag=this.toTag),e.userAgent=e.userAgent||this.core.configuration.userAgentHeaderFieldValue,e.supported=e.supported||this.core.configuration.supportedOptionTagsResponse;var t=i.constructOutgoingResponse(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t},e.prototype.init=function(){var e=this,t={loggerFactory:this.loggerFactory,onStateChange:function(t){t===a.TransactionState.Terminated&&(e.core.userAgentServers.delete(n),e.dispose())},onTransportError:function(t){e.logger.error(t.message),e.delegate&&e.delegate.onTransportError?e.delegate.onTransportError(t):e.logger.error("User agent server response transport error.")}},r=new this.transactionConstructor(this.message,this.core.transport,t);this._transaction=r;var n=r.id;this.core.userAgentServers.set(r.id,this)},e}();t.UserAgentServer=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(17),t),n.__exportStar(r(16),t),n.__exportStar(r(71),t),n.__exportStar(r(2),t),n.__exportStar(r(15),t),n.__exportStar(r(27),t),n.__exportStar(r(1),t),n.__exportStar(r(73),t),n.__exportStar(r(50),t),n.__exportStar(r(6),t),n.__exportStar(r(85),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=500;t.Timers={T1:n,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,TIMER_N:32e3,PROVISIONAL_RESPONSE_INTERVAL:6e4}},function(e,t,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var i,o,a,s;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):f(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,d=f(c,u);for(r=0;r<u;++r)o(d[r],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,l(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,l(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,o,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},,,,,function(e,t,r){"use strict";function n(e,t){void 0===t&&(t=32);for(var r="",n=0;n<e;n++){r+=Math.floor(Math.random()*t).toString(t)}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.createRandomToken=n,t.getReasonPhrase=function(e){return i[e]||""},t.newTag=function(){return n(10)},t.headerize=function(e){for(var t={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},r=e.toLowerCase().replace(/_/g,"-").split("-"),n=r.length,i="",o=0;o<n;o++)0!==o&&(i+="-"),i+=r[o].charAt(0).toUpperCase()+r[o].substring(1);return t[i]&&(i=t[i]),i},t.str_utf8_length=function(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length};var i={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",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:"Internal Server 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"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"}(t.TransactionState||(t.TransactionState={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2);t.AllowedMethods=[n.C.ACK,n.C.BYE,n.C.CANCEL,n.C.INFO,n.C.INVITE,n.C.MESSAGE,n.C.NOTIFY,n.C.OPTIONS,n.C.PRACK,n.C.REFER,n.C.SUBSCRIBE]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(64),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(24),t),n.__exportStar(r(65),t),n.__exportStar(r(66),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(18),t),n.__exportStar(r(63),t),n.__exportStar(r(47),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),i=function(){function e(e,t){this.core=e,this.dialogState=t,this.core.dialogs.set(this.id,this)}return e.initialDialogStateForUserAgentClient=function(e,t){var r=t.getHeaders("record-route").reverse(),i=t.parseHeader("contact");if(!i)throw new Error("Contact undefined.");if(!(i instanceof n.NameAddrHeader))throw new Error("Contact not instance of NameAddrHeader.");var o=i.uri,a=e.cseq,s=e.callId,c=e.fromTag,u=t.toTag;if(!s)throw new Error("Call id undefined.");if(!c)throw new Error("From tag undefined.");if(!u)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");var d=e.from.uri,l=e.to.uri;if(!t.statusCode)throw new Error("Incoming response status code undefined.");return{id:s+c+u,early:t.statusCode<200,callId:s,localTag:c,remoteTag:u,localSequenceNumber:a,remoteSequenceNumber:void 0,localURI:d,remoteURI:l,remoteTarget:o,routeSet:r,secure:!1}},e.initialDialogStateForUserAgentServer=function(e,t,r){void 0===r&&(r=!1);var i=e.getHeaders("record-route"),o=e.parseHeader("contact");if(!o)throw new Error("Contact undefined.");if(!(o instanceof n.NameAddrHeader))throw new Error("Contact not instance of NameAddrHeader.");var a=o.uri,s=e.cseq,c=e.callId,u=t,d=e.fromTag,l=e.from.uri;return{id:c+u+d,early:r,callId:c,localTag:u,remoteTag:d,localSequenceNumber:void 0,remoteSequenceNumber:s,localURI:e.to.uri,remoteURI:l,remoteTarget:a,routeSet:i,secure:!1}},e.prototype.dispose=function(){this.core.dialogs.delete(this.id)},Object.defineProperty(e.prototype,"id",{get:function(){return this.dialogState.id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"early",{get:function(){return this.dialogState.early},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callId",{get:function(){return this.dialogState.callId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localTag",{get:function(){return this.dialogState.localTag},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"remoteTag",{get:function(){return this.dialogState.remoteTag},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localSequenceNumber",{get:function(){return this.dialogState.localSequenceNumber},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"remoteSequenceNumber",{get:function(){return this.dialogState.remoteSequenceNumber},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localURI",{get:function(){return this.dialogState.localURI},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"remoteURI",{get:function(){return this.dialogState.remoteURI},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"remoteTarget",{get:function(){return this.dialogState.remoteTarget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"routeSet",{get:function(){return this.dialogState.routeSet},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secure",{get:function(){return this.dialogState.secure},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userAgentCore",{get:function(){return this.core},enumerable:!0,configurable:!0}),e.prototype.confirm=function(){this.dialogState.early=!1},e.prototype.receiveRequest=function(e){if(e.method!==n.C.ACK){if(this.remoteSequenceNumber){if(e.cseq<=this.remoteSequenceNumber)throw new Error("Out of sequence in dialog request. Did you forget to call sequenceGuard()?");this.dialogState.remoteSequenceNumber=e.cseq}this.remoteSequenceNumber||(this.dialogState.remoteSequenceNumber=e.cseq)}},e.prototype.recomputeRouteSet=function(e){this.dialogState.routeSet=e.getHeaders("record-route").reverse()},e.prototype.createOutgoingRequestMessage=function(e,t){var r,n=this.remoteURI,i=this.remoteTag,o=this.localURI,a=this.localTag,s=this.callId;r=t&&t.cseq?t.cseq:this.dialogState.localSequenceNumber?this.dialogState.localSequenceNumber+=1:this.dialogState.localSequenceNumber=1;var c=this.remoteTarget,u=this.routeSet,d=t&&t.extraHeaders,l=t&&t.body;return this.userAgentCore.makeOutgoingRequestMessage(e,c,o,n,{callId:s,cseq:r,fromTag:a,toTag:i,routeSet:u},d,l)},e.prototype.sequenceGuard=function(e){return e.method===n.C.ACK||(!(this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber)||(this.core.replyStateless(e,{statusCode:500}),!1))},e}();t.Dialog=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(29),i=r(12),o=function(){function e(){this.headers={}}return e.prototype.addHeader=function(e,t){var r={raw:t};e=i.headerize(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]},e.prototype.getHeader=function(e){var t=this.headers[i.headerize(e)];if(t)return t[0]?t[0].raw:void 0},e.prototype.getHeaders=function(e){var t=this.headers[i.headerize(e)],r=[];if(!t)return[];for(var n=0,o=t;n<o.length;n++){var a=o[n];r.push(a.raw)}return r},e.prototype.hasHeader=function(e){return!!this.headers[i.headerize(e)]},e.prototype.parseHeader=function(e,t){if(void 0===t&&(t=0),e=i.headerize(e),this.headers[e]&&!(t>=this.headers[e].length)){var r=this.headers[e][t],o=r.raw;if(r.parsed)return r.parsed;var a=n.Grammar.parse(o,e.replace(/-/g,"_"));return-1===a?void this.headers[e].splice(t,1):(r.parsed=a,a)}},e.prototype.s=function(e,t){return void 0===t&&(t=0),this.parseHeader(e,t)},e.prototype.setHeader=function(e,t){this.headers[i.headerize(e)]=[{raw:t}]},e.prototype.toString=function(){return this.data},e}();t.IncomingMessage=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(t,r,n){var i=e.call(this,n)||this;return i.uri=t,i._displayName=r,i}return n.__extends(t,e),Object.defineProperty(t.prototype,"friendlyName",{get:function(){return this.displayName||this.uri.aor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"displayName",{get:function(){return this._displayName},set:function(e){this._displayName=e},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new t(this.uri.clone(),this._displayName,JSON.parse(JSON.stringify(this.parameters)))},t.prototype.toString=function(){var e=this.displayName||"0"===this.displayName?'"'+this.displayName+'" ':"";for(var t in e+="<"+this.uri.toString()+">",this.parameters)this.parameters.hasOwnProperty(t)&&(e+=";"+t,null!==this.parameters[t]&&(e+="="+this.parameters[t]));return e},t}(r(21).Parameters);t.NameAddrHeader=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){for(var t in this.parameters={},e)e.hasOwnProperty(t)&&this.setParam(t,e[t])}return e.prototype.setParam=function(e,t){e&&(this.parameters[e.toLowerCase()]=null==t?null:t.toString())},e.prototype.getParam=function(e){if(e)return this.parameters[e.toLowerCase()]},e.prototype.hasParam=function(e){return!!e&&!!this.parameters.hasOwnProperty(e.toLowerCase())},e.prototype.deleteParam=function(e){if(e=e.toLowerCase(),this.parameters.hasOwnProperty(e)){var t=this.parameters[e];return delete this.parameters[e],t}},e.prototype.clearParams=function(){this.parameters={}},e}();t.Parameters=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(r,n,i,o,a){var s=e.call(this,n,i,t.makeId(r),o,a)||this;s._request=r,s.user=i;var c=n.server&&n.server.scheme?n.server.scheme:void 0;return r.setViaHeader(s.id,c),s}return n.__extends(t,e),t.makeId=function(e){if("CANCEL"===e.method){if(!e.branch)throw new Error("Outgoing CANCEL request without a branch.");return e.branch}return"z9hG4bK"+Math.floor(1e7*Math.random())},Object.defineProperty(t.prototype,"request",{get:function(){return this._request},enumerable:!0,configurable:!0}),t.prototype.onRequestTimeout=function(){this.user.onRequestTimeout&&this.user.onRequestTimeout()},t}(r(23).Transaction);t.ClientTransaction=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(7),o=r(16),a=function(e){function t(t,r,n,i,o){var a=e.call(this)||this;return a._transport=t,a._user=r,a._id=n,a._state=i,a.logger=r.loggerFactory.getLogger(o,n),a.logger.debug("Constructing "+a.typeToString()+" with id "+a.id+"."),a}return n.__extends(t,e),t.prototype.dispose=function(){this.logger.debug("Destroyed "+this.typeToString()+" with id "+this.id+".")},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kind",{get:function(){throw new Error("Invalid kind.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"transport",{get:function(){return this._transport},enumerable:!0,configurable:!0}),t.prototype.on=function(t,r){return e.prototype.on.call(this,t,r)},t.prototype.logTransportError=function(e,t){this.logger.error(e.message),this.logger.error("Transport error occurred in "+this.typeToString()+" with id "+this.id+"."),this.logger.error(t)},t.prototype.send=function(e){var t=this;return this.transport.send(e).catch(function(e){var r;if(!(e instanceof o.TransportError))throw r=e&&"string"==typeof e.message?new o.TransportError(e.message):new o.TransportError,t.onTransportError(r),r;t.onTransportError(e)})},t.prototype.setState=function(e){this.logger.debug('State change to "'+e+'" on '+this.typeToString()+" with id "+this.id+"."),this._state=e,this._user.onStateChange&&this._user.onStateChange(e),this.emit("stateChanged")},t.prototype.typeToString=function(){return"UnknownType"},t}(i.EventEmitter);t.Transaction=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(t){var r=this.constructor,n=e.call(this,t)||this;return Object.setPrototypeOf(n,r.prototype),n}return n.__extends(t,e),t}(Error);t.Exception=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(t,r,n,i,o){var a=e.call(this,r,n,t.viaBranch,i,o)||this;return a._request=t,a.user=n,a}return n.__extends(t,e),Object.defineProperty(t.prototype,"request",{get:function(){return this._request},enumerable:!0,configurable:!0}),t}(r(23).Transaction);t.ServerTransaction=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){var o=void 0!==t.userAgentCore?t.userAgentCore:t;return e.call(this,i.NonInviteServerTransaction,o,r,n)||this}return n.__extends(t,e),t}(r(4).UserAgentServer);t.NotifyUserAgentServer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(70),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"}(t.Levels||(t.Levels={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0).__importStar(r(58));!function(e){e.parse=function(e,t){var r={startRule:t};try{n.parse(e,r)}catch(e){r.data=-1}return r.data},e.nameAddrHeaderParse=function(t){var r=e.parse(t,"Name_Addr_Header");return-1!==r?r:void 0},e.URIParse=function(t){var r=e.parse(t,"SIP_URI");return-1!==r?r:void 0}}(t.Grammar||(t.Grammar={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(t,r,n,i,o,a){var s=e.call(this,o)||this;if(s.headers={},!n)throw new TypeError('missing or invalid "host" parameter');for(var c in t=t||"sip",a)a.hasOwnProperty(c)&&s.setHeader(c,a[c]);return s.raw={scheme:t,user:r,host:n,port:i},s.normal={scheme:t.toLowerCase(),user:r,host:n.toLowerCase(),port:i},s}return n.__extends(t,e),Object.defineProperty(t.prototype,"scheme",{get:function(){return this.normal.scheme},set:function(e){this.raw.scheme=e,this.normal.scheme=e.toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"user",{get:function(){return this.normal.user},set:function(e){this.normal.user=this.raw.user=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"host",{get:function(){return this.normal.host},set:function(e){this.raw.host=e,this.normal.host=e.toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"aor",{get:function(){return this.normal.user+"@"+this.normal.host},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"port",{get:function(){return this.normal.port},set:function(e){this.normal.port=this.raw.port=e},enumerable:!0,configurable:!0}),t.prototype.setHeader=function(e,t){this.headers[this.headerize(e)]=t instanceof Array?t:[t]},t.prototype.getHeader=function(e){if(e)return this.headers[this.headerize(e)]},t.prototype.hasHeader=function(e){return!!e&&!!this.headers.hasOwnProperty(this.headerize(e))},t.prototype.deleteHeader=function(e){if(e=this.headerize(e),this.headers.hasOwnProperty(e)){var t=this.headers[e];return delete this.headers[e],t}},t.prototype.clearHeaders=function(){this.headers={}},t.prototype.clone=function(){return new t(this._raw.scheme,this._raw.user||"",this._raw.host,this._raw.port,JSON.parse(JSON.stringify(this.parameters)),JSON.parse(JSON.stringify(this.headers)))},t.prototype.toRaw=function(){return this._toString(this._raw)},t.prototype.toString=function(){return this._toString(this._normal)},Object.defineProperty(t.prototype,"_normal",{get:function(){return this.normal},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_raw",{get:function(){return this.raw},enumerable:!0,configurable:!0}),t.prototype._toString=function(e){var t=e.scheme+":";for(var r in e.scheme.toLowerCase().match("^sips?$")||(t+="//"),e.user&&(t+=this.escapeUser(e.user)+"@"),t+=e.host,(e.port||0===e.port)&&(t+=":"+e.port),this.parameters)this.parameters.hasOwnProperty(r)&&(t+=";"+r,null!==this.parameters[r]&&(t+="="+this.parameters[r]));var n=[];for(var i in this.headers)if(this.headers.hasOwnProperty(i))for(var o in this.headers[i])this.headers[i].hasOwnProperty(o)&&n.push(i+"="+this.headers[i][o]);return n.length>0&&(t+="?"+n.join("&")),t},t.prototype.escapeUser=function(e){return encodeURIComponent(decodeURIComponent(e)).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")},t.prototype.headerize=function(e){for(var t={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},r=e.toLowerCase().replace(/_/g,"-").split("-"),n=r.length,i="",o=0;o<n;o++)0!==o&&(i+="-"),i+=r[o].charAt(0).toUpperCase()+r[o].substring(1);return t[i]&&(i=t[i]),i},t}(r(21).Parameters);t.URI=i},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(){return e.call(this)||this}return n.__extends(t,e),t}(r(19).IncomingMessage);t.IncomingRequestMessage=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(){return e.call(this)||this}return n.__extends(t,e),t}(r(19).IncomingMessage);t.IncomingResponseMessage=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(20),o=r(12),a=function(){function e(t,r,i,a,s,c,u){this.headers={},this.extraHeaders=[],this.options=e.getDefaultOptions(),s&&(this.options=n.__assign({},this.options,s),this.options.optionTags&&this.options.optionTags.length&&(this.options.optionTags=this.options.optionTags.slice()),this.options.routeSet&&this.options.routeSet.length&&(this.options.routeSet=this.options.routeSet.slice())),c&&c.length&&(this.extraHeaders=c.slice()),u&&(this.body={body:u.content,contentType:u.contentType}),this.method=t,this.ruri=r.clone(),this.fromURI=i.clone(),this.fromTag=this.options.fromTag?this.options.fromTag:o.newTag(),this.from=e.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=a.clone(),this.toTag=this.options.toTag,this.to=e.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+o.createRandomToken(15),this.cseq=this.options.cseq,this.setHeader("route",this.options.routeSet),this.setHeader("via",""),this.setHeader("to",this.to.toString()),this.setHeader("from",this.from.toString()),this.setHeader("cseq",this.cseq+" "+this.method),this.setHeader("call-id",this.callId),this.setHeader("max-forwards","70")}return e.getDefaultOptions=function(){return{callId:"",callIdPrefix:"",cseq:1,toDisplayName:"",toTag:"",fromDisplayName:"",fromTag:"",forceRport:!1,hackViaTcp:!1,hackViaWS:!1,optionTags:["outbound"],routeSet:[],userAgentString:"sip.js",viaHost:""}},e.makeNameAddrHeader=function(e,t,r){var n={};return r&&(n.tag=r),new i.NameAddrHeader(e,t,n)},e.prototype.getHeader=function(e){var t=this.headers[o.headerize(e)];if(t){if(t[0])return t[0]}else for(var r=new RegExp("^\\s*"+e+"\\s*:","i"),n=0,i=this.extraHeaders;n<i.length;n++){var a=i[n];if(r.test(a))return a.substring(a.indexOf(":")+1).trim()}},e.prototype.getHeaders=function(e){var t=[],r=this.headers[o.headerize(e)];if(r)for(var n=0,i=r;n<i.length;n++){var a=i[n];t.push(a)}else for(var s=new RegExp("^\\s*"+e+"\\s*:","i"),c=0,u=this.extraHeaders;c<u.length;c++){var d=u[c];s.test(d)&&t.push(d.substring(d.indexOf(":")+1).trim())}return t},e.prototype.hasHeader=function(e){if(this.headers[o.headerize(e)])return!0;for(var t=new RegExp("^\\s*"+e+"\\s*:","i"),r=0,n=this.extraHeaders;r<n.length;r++){var i=n[r];if(t.test(i))return!0}return!1},e.prototype.setHeader=function(e,t){this.headers[o.headerize(e)]=t instanceof Array?t:[t]},e.prototype.setViaHeader=function(e,t){void 0===t&&(t="WSS"),this.options.hackViaTcp?t="TCP":this.options.hackViaWS&&(t="WS");var r="SIP/2.0/"+t;r+=" "+this.options.viaHost+";branch="+e,this.options.forceRport&&(r+=";rport"),this.setHeader("via",r),this.branch=e},e.prototype.toString=function(){var e="";for(var t in e+=this.method+" "+this.ruri.toRaw()+" SIP/2.0\r\n",this.headers)if(this.headers[t])for(var r=0,n=this.headers[t];r<n.length;r++){e+=t+": "+n[r]+"\r\n"}for(var i=0,a=this.extraHeaders;i<a.length;i++){e+=(t=a[i]).trim()+"\r\n"}return e+="Supported: "+this.options.optionTags.join(", ")+"\r\n",e+="User-Agent: "+this.options.userAgentString+"\r\n",this.body?"string"==typeof this.body?(e+="Content-Length: "+o.str_utf8_length(this.body)+"\r\n\r\n",e+=this.body):this.body.body&&this.body.contentType?(e+="Content-Type: "+this.body.contentType+"\r\n",e+="Content-Length: "+o.str_utf8_length(this.body.body)+"\r\n\r\n",e+=this.body.body):e+="Content-Length: 0\r\n\r\n":e+="Content-Length: 0\r\n\r\n",e},e}();t.OutgoingRequestMessage=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(6),o=r(22),a=r(13),s=function(e){function t(t,r,n){var o=e.call(this,t,r,n,a.TransactionState.Calling,"sip.transaction.ict")||this;return o.ackRetransmissionCache=new Map,o.B=setTimeout(function(){return o.timer_B()},i.Timers.TIMER_B),o.send(t.toString()).catch(function(e){o.logTransportError(e,"Failed to send initial outgoing request.")}),o}return n.__extends(t,e),t.prototype.dispose=function(){this.B&&(clearTimeout(this.B),this.B=void 0),this.D&&(clearTimeout(this.D),this.D=void 0),this.M&&(clearTimeout(this.M),this.M=void 0),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"kind",{get:function(){return"ict"},enumerable:!0,configurable:!0}),t.prototype.ackResponse=function(e){var t=this,r=e.toTag;if(!r)throw new Error("To tag undefined.");var n="z9hG4bK"+Math.floor(1e7*Math.random()),i=this.transport.server&&this.transport.server.scheme?this.transport.server.scheme:void 0;e.setViaHeader(n,i),this.ackRetransmissionCache.set(r,e),this.send(e.toString()).catch(function(e){t.logTransportError(e,"Failed to send ACK to 2xx response.")})},t.prototype.receiveResponse=function(e){var t=this,r=e.statusCode;if(!r||r<100||r>699)throw new Error("Invalid status code "+r);switch(this.state){case a.TransactionState.Calling:if(r>=100&&r<=199)return this.stateTransition(a.TransactionState.Proceeding),void(this.user.receiveResponse&&this.user.receiveResponse(e));if(r>=200&&r<=299)return this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(a.TransactionState.Accepted),void(this.user.receiveResponse&&this.user.receiveResponse(e));if(r>=300&&r<=699)return this.stateTransition(a.TransactionState.Completed),this.ack(e),void(this.user.receiveResponse&&this.user.receiveResponse(e));break;case a.TransactionState.Proceeding:if(r>=100&&r<=199)return void(this.user.receiveResponse&&this.user.receiveResponse(e));if(r>=200&&r<=299)return this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(a.TransactionState.Accepted),void(this.user.receiveResponse&&this.user.receiveResponse(e));if(r>=300&&r<=699)return this.stateTransition(a.TransactionState.Completed),this.ack(e),void(this.user.receiveResponse&&this.user.receiveResponse(e));break;case a.TransactionState.Accepted:if(r>=200&&r<=299){if(!this.ackRetransmissionCache.has(e.toTag))return this.ackRetransmissionCache.set(e.toTag,void 0),void(this.user.receiveResponse&&this.user.receiveResponse(e));var n=this.ackRetransmissionCache.get(e.toTag);return n?void this.send(n.toString()).catch(function(e){t.logTransportError(e,"Failed to send retransmission of ACK to 2xx response.")}):void 0}break;case a.TransactionState.Completed:if(r>=300&&r<=699)return void this.ack(e);break;case a.TransactionState.Terminated:break;default:throw new Error("Invalid state "+this.state)}var i="Received unexpected "+r+" response while in state "+this.state+".";this.logger.warn(i)},t.prototype.onTransportError=function(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(a.TransactionState.Terminated,!0)},t.prototype.typeToString=function(){return"INVITE client transaction"},t.prototype.ack=function(e){var t=this,r=this.request.ruri,n=this.request.callId,i=this.request.cseq,o=this.request.getHeader("from"),a=e.getHeader("to"),s=this.request.getHeader("via"),c=this.request.getHeader("route");if(!o)throw new Error("From undefined.");if(!a)throw new Error("To undefined.");if(!s)throw new Error("Via undefined.");var u="ACK "+r+" SIP/2.0\r\n";c&&(u+="Route: "+c+"\r\n"),u+="Via: "+s+"\r\n",u+="To: "+a+"\r\n",u+="From: "+o+"\r\n",u+="Call-ID: "+n+"\r\n",u+="CSeq: "+i+" ACK\r\n",u+="Max-Forwards: 70\r\n",u+="Content-Length: 0\r\n\r\n",this.send(u).catch(function(e){t.logTransportError(e,"Failed to send ACK to non-2xx response.")})},t.prototype.stateTransition=function(e,t){var r=this;void 0===t&&(t=!1);var n=function(){throw new Error("Invalid state transition from "+r.state+" to "+e)};switch(e){case a.TransactionState.Calling:n();break;case a.TransactionState.Proceeding:this.state!==a.TransactionState.Calling&&n();break;case a.TransactionState.Accepted:case a.TransactionState.Completed:this.state!==a.TransactionState.Calling&&this.state!==a.TransactionState.Proceeding&&n();break;case a.TransactionState.Terminated:this.state!==a.TransactionState.Calling&&this.state!==a.TransactionState.Accepted&&this.state!==a.TransactionState.Completed&&(t||n());break;default:n()}this.B&&(clearTimeout(this.B),this.B=void 0),a.TransactionState.Proceeding,e===a.TransactionState.Completed&&(this.D=setTimeout(function(){return r.timer_D()},i.Timers.TIMER_D)),e===a.TransactionState.Accepted&&(this.M=setTimeout(function(){return r.timer_M()},i.Timers.TIMER_M)),e===a.TransactionState.Terminated&&this.dispose(),this.setState(e)},t.prototype.timer_A=function(){},t.prototype.timer_B=function(){this.logger.debug("Timer B expired for INVITE client transaction "+this.id+"."),this.state===a.TransactionState.Calling&&(this.onRequestTimeout(),this.stateTransition(a.TransactionState.Terminated))},t.prototype.timer_D=function(){this.logger.debug("Timer D expired for INVITE client transaction "+this.id+"."),this.state===a.TransactionState.Completed&&this.stateTransition(a.TransactionState.Terminated)},t.prototype.timer_M=function(){this.logger.debug("Timer M expired for INVITE client transaction "+this.id+"."),this.state===a.TransactionState.Accepted&&this.stateTransition(a.TransactionState.Terminated)},t}(o.ClientTransaction);t.InviteClientTransaction=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(1),a=function(e){function t(t,r,n){var a,s=t.createOutgoingRequestMessage(i.C.BYE,n);return a=e.call(this,o.NonInviteClientTransaction,t.userAgentCore,s,r)||this,t.dispose(),a}return n.__extends(t,e),t}(r(3).UserAgentClient);t.ByeUserAgentClient=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){return e.call(this,i.NonInviteServerTransaction,t.userAgentCore,r,n)||this}return n.__extends(t,e),t}(r(4).UserAgentServer);t.ByeUserAgentServer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(1),a=function(e){function t(t,r,n){var a=t.createOutgoingRequestMessage(i.C.INFO,n);return e.call(this,o.NonInviteClientTransaction,t.userAgentCore,a,r)||this}return n.__extends(t,e),t}(r(3).UserAgentClient);t.InfoUserAgentClient=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){return e.call(this,i.NonInviteServerTransaction,t.userAgentCore,r,n)||this}return n.__extends(t,e),t}(r(4).UserAgentServer);t.InfoUserAgentServer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(1),a=function(e){function t(t,r,n){var a=t.createOutgoingRequestMessage(i.C.NOTIFY,n);return e.call(this,o.NonInviteClientTransaction,t.userAgentCore,a,r)||this}return n.__extends(t,e),t}(r(3).UserAgentClient);t.NotifyUserAgentClient=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(1),a=function(e){function t(t,r,n){var a,s=t.createOutgoingRequestMessage(i.C.PRACK,n);return a=e.call(this,o.NonInviteClientTransaction,t.userAgentCore,s,r)||this,t.signalingStateTransition(s),a}return n.__extends(t,e),t}(r(3).UserAgentClient);t.PrackUserAgentClient=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){var o=e.call(this,i.NonInviteServerTransaction,t.userAgentCore,r,n)||this;return t.signalingStateTransition(r),o.dialog=t,o}return n.__extends(t,e),t.prototype.accept=function(t){return void 0===t&&(t={statusCode:200}),t.body&&this.dialog.signalingStateTransition(t.body),e.prototype.accept.call(this,t)},t}(r(4).UserAgentServer);t.PrackUserAgentServer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(1),a=function(e){function t(t,r,n){var a=this,s=t.createOutgoingRequestMessage(i.C.INVITE,n);return(a=e.call(this,o.InviteClientTransaction,t.userAgentCore,s,r)||this).delegate=r,t.signalingStateTransition(s),t.reinviteUserAgentClient=a,a.dialog=t,a}return n.__extends(t,e),t.prototype.receiveResponse=function(e){var t=this,r=e.statusCode?e.statusCode.toString():"";if(!r)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(r):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});break;case/^1[0-9]{2}$/.test(r):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:this.dialog,prack:function(e){throw new Error("Unimplemented.")}});break;case/^2[0-9]{2}$/.test(r):this.dialog.signalingStateTransition(e),this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:e,session:this.dialog,ack:function(e){return t.dialog.ack(e)}});break;case/^3[0-9]{2}$/.test(r):this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});break;case/^[4-6][0-9]{2}$/.test(r):this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});break;default:throw new Error("Invalid status code "+r)}},t}(r(3).UserAgentClient);t.ReInviteUserAgentClient=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){var o=e.call(this,i.InviteServerTransaction,t.userAgentCore,r,n)||this;return t.reinviteUserAgentServer=o,o.dialog=t,o}return n.__extends(t,e),t.prototype.accept=function(t){void 0===t&&(t={statusCode:200}),t.extraHeaders=t.extraHeaders||[],t.extraHeaders=t.extraHeaders.concat(this.dialog.routeSet.map(function(e){return"Record-Route: "+e}));var r=e.prototype.accept.call(this,t),i=this.dialog,o=n.__assign({},r,{session:i});return t.body&&this.dialog.signalingStateTransition(t.body),this.dialog.reConfirm(),o},t.prototype.progress=function(t){void 0===t&&(t={statusCode:180});var r=e.prototype.progress.call(this,t),i=this.dialog,o=n.__assign({},r,{session:i});return t.body&&this.dialog.signalingStateTransition(t.body),o},t}(r(4).UserAgentServer);t.ReInviteUserAgentServer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(1),a=function(e){function t(t,r,n){var a=t.createOutgoingRequestMessage(i.C.REFER,n);return e.call(this,o.NonInviteClientTransaction,t.userAgentCore,a,r)||this}return n.__extends(t,e),t}(r(3).UserAgentClient);t.ReferUserAgentClient=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){var o=void 0!==t.userAgentCore?t.userAgentCore:t;return e.call(this,i.NonInviteServerTransaction,o,r,n)||this}return n.__extends(t,e),t}(r(4).UserAgentServer);t.ReferUserAgentServer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(27),a=r(6),s=r(14),c=r(26),u=r(48),d=function(e){function t(t,r,n,i,o,a){var s=e.call(this,i,o)||this;return s.delegate=a,s._autoRefresh=!1,s._subscriptionEvent=t,s._subscriptionExpires=r,s._subscriptionExpiresInitial=r,s._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),s._subscriptionRefresh=void 0,s._subscriptionRefreshLastSet=void 0,s._subscriptionState=n,s.logger=i.loggerFactory.getLogger("sip.subscribe-dialog"),s.logger.log("SUBSCRIBE dialog "+s.id+" constructed"),s}return n.__extends(t,e),t.initialDialogStateForSubscription=function(e,t){var r=t.getHeaders("record-route"),n=t.parseHeader("contact");if(!n)throw new Error("Contact undefined.");if(!(n instanceof i.NameAddrHeader))throw new Error("Contact not instance of NameAddrHeader.");var o=n.uri,a=e.cseq,s=e.callId,c=e.fromTag,u=t.fromTag;if(!s)throw new Error("Call id undefined.");if(!c)throw new Error("From tag undefined.");if(!u)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");return{id:s+c+u,early:!1,callId:s,localTag:c,remoteTag:u,localSequenceNumber:a,remoteSequenceNumber:void 0,localURI:e.from.uri,remoteURI:e.to.uri,remoteTarget:o,routeSet:r,secure:!1}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.N&&(clearTimeout(this.N),this.N=void 0),this.refreshTimerClear(),this.logger.log("SUBSCRIBE dialog "+this.id+" destroyed")},Object.defineProperty(t.prototype,"autoRefresh",{get:function(){return this._autoRefresh},set:function(e){this._autoRefresh=!0,this.refreshTimerSet()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subscriptionEvent",{get:function(){return this._subscriptionEvent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subscriptionExpires",{get:function(){var e=Math.floor(Date.now()/1e3)-this._subscriptionExpiresLastSet,t=this._subscriptionExpires-e;return Math.max(t,0)},set:function(e){if(e<0)throw new Error("Expires must be greater than or equal to zero.");if(this._subscriptionExpires=e,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this.autoRefresh){var t=this.subscriptionRefresh;(void 0===t||t>=e)&&this.refreshTimerSet()}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subscriptionExpiresInitial",{get:function(){return this._subscriptionExpiresInitial},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subscriptionRefresh",{get:function(){if(void 0!==this._subscriptionRefresh&&void 0!==this._subscriptionRefreshLastSet){var e=Math.floor(Date.now()/1e3)-this._subscriptionRefreshLastSet,t=this._subscriptionRefresh-e;return Math.max(t,0)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subscriptionState",{get:function(){return this._subscriptionState},enumerable:!0,configurable:!0}),t.prototype.receiveRequest=function(t){if(this.logger.log("SUBSCRIBE dialog "+this.id+" received "+t.method+" request"),this.sequenceGuard(t))switch(e.prototype.receiveRequest.call(this,t),t.method){case i.C.NOTIFY:this.onNotify(t);break;default:this.logger.log("SUBSCRIBE dialog "+this.id+" received unimplemented "+t.method+" request"),this.core.replyStateless(t,{statusCode:501})}else this.logger.log("SUBSCRIBE dialog "+this.id+" rejected out of order "+t.method+" request.")},t.prototype.refresh=function(){var e="Allow: "+s.AllowedMethods.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)},t.prototype.subscribe=function(e,t){var r=this;if(void 0===t&&(t={}),this.subscriptionState!==o.SubscriptionState.Pending&&this.subscriptionState!==o.SubscriptionState.Active)throw new Error("Invalid state "+this.subscriptionState+'. May only re-subscribe while in state "pending" or "active".');this.logger.log("SUBSCRIBE dialog "+this.id+" sending SUBSCRIBE request");var n=new u.ReSubscribeUserAgentClient(this,e,t);return this.N=setTimeout(function(){return r.timer_N()},a.Timers.TIMER_N),n},t.prototype.terminate=function(){this.stateTransition(o.SubscriptionState.Terminated),this.onTerminated()},t.prototype.unsubscribe=function(){var e="Allow: "+s.AllowedMethods.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)},t.prototype.onNotify=function(e){var t=e.parseHeader("Event").event;if(t&&t===this.subscriptionEvent){this.N&&(clearTimeout(this.N),this.N=void 0);var r=e.parseHeader("Subscription-State");if(r&&r.state){var n=r.state,i=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(o.SubscriptionState.Pending,i);break;case"active":this.stateTransition(o.SubscriptionState.Active,i);break;case"terminated":this.stateTransition(o.SubscriptionState.Terminated,i);break;default:this.logger.warn("Unrecognized subscription state.")}var a=new c.NotifyUserAgentServer(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(a):a.accept()}else this.core.replyStateless(e,{statusCode:489})}else this.core.replyStateless(e,{statusCode:489})},t.prototype.onRefresh=function(e){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(e)},t.prototype.onTerminated=function(){this.delegate&&this.delegate.onTerminated&&this.delegate.onTerminated()},t.prototype.refreshTimerClear=function(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)},t.prototype.refreshTimerSet=function(){var e=this;if(this.refreshTimerClear(),this.autoRefresh&&this.subscriptionExpires>0){var t=900*this.subscriptionExpires;this._subscriptionRefresh=Math.floor(t/1e3),this._subscriptionRefreshLastSet=Math.floor(Date.now()/1e3),this.refreshTimer=setTimeout(function(){e.refreshTimer=void 0,e._subscriptionRefresh=void 0,e._subscriptionRefreshLastSet=void 0,e.onRefresh(e.refresh())},t)}},t.prototype.stateTransition=function(e,t){var r=this,n=function(){r.logger.warn("Invalid subscription state transition from "+r.subscriptionState+" to "+e)};switch(e){case o.SubscriptionState.Initial:case o.SubscriptionState.NotifyWait:return void n();case o.SubscriptionState.Pending:if(this.subscriptionState!==o.SubscriptionState.NotifyWait&&this.subscriptionState!==o.SubscriptionState.Pending)return void n();break;case o.SubscriptionState.Active:case o.SubscriptionState.Terminated:if(this.subscriptionState!==o.SubscriptionState.NotifyWait&&this.subscriptionState!==o.SubscriptionState.Pending&&this.subscriptionState!==o.SubscriptionState.Active)return void n();break;default:return void n()}e===o.SubscriptionState.Pending&&t&&(this.subscriptionExpires=t),e===o.SubscriptionState.Active&&t&&(this.subscriptionExpires=t),e===o.SubscriptionState.Terminated&&this.dispose(),this._subscriptionState=e},t.prototype.timer_N=function(){this.subscriptionState!==o.SubscriptionState.Terminated&&(this.stateTransition(o.SubscriptionState.Terminated),this.onTerminated())},t}(r(18).Dialog);t.SubscriptionDialog=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(1),a=function(e){function t(t,r,n){var a=this,s=t.createOutgoingRequestMessage(i.C.SUBSCRIBE,n);return(a=e.call(this,o.NonInviteClientTransaction,t.userAgentCore,s,r)||this).dialog=t,a}return n.__extends(t,e),t.prototype.waitNotifyStop=function(){},t.prototype.receiveResponse=function(t){if(t.statusCode&&t.statusCode>=200&&t.statusCode<300){var r=t.getHeader("Expires");if(r){var n=Number(r);this.dialog.subscriptionExpires>n&&(this.dialog.subscriptionExpires=n)}else this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE")}if(t.statusCode&&t.statusCode>=400&&t.statusCode<700){[404,405,410,416,480,481,482,483,484,485,489,501,604].includes(t.statusCode)&&this.dialog.terminate()}e.prototype.receiveResponse.call(this,t)},t}(r(3).UserAgentClient);t.ReSubscribeUserAgentClient=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(28),i=function(){function e(e,t,r){this.logger=e,this.category=t,this.label=r}return e.prototype.error=function(e){this.genericLog(n.Levels.error,e)},e.prototype.warn=function(e){this.genericLog(n.Levels.warn,e)},e.prototype.log=function(e){this.genericLog(n.Levels.log,e)},e.prototype.debug=function(e){this.genericLog(n.Levels.debug,e)},e.prototype.genericLog=function(e,t){this.logger.genericLog(e,this.category,this.label,t)},e}();t.Logger=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(36),t),n.__exportStar(r(37),t),n.__exportStar(r(75),t),n.__exportStar(r(38),t),n.__exportStar(r(39),t),n.__exportStar(r(76),t),n.__exportStar(r(77),t),n.__exportStar(r(78),t),n.__exportStar(r(79),t),n.__exportStar(r(40),t),n.__exportStar(r(26),t),n.__exportStar(r(80),t),n.__exportStar(r(41),t),n.__exportStar(r(42),t),n.__exportStar(r(43),t),n.__exportStar(r(44),t),n.__exportStar(r(48),t),n.__exportStar(r(81),t),n.__exportStar(r(45),t),n.__exportStar(r(46),t),n.__exportStar(r(82),t),n.__exportStar(r(83),t),n.__exportStar(r(84),t),n.__exportStar(r(3),t),n.__exportStar(r(4),t)},,,,,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(56),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ACK="ACK",e.BYE="BYE",e.CANCEL="CANCEL",e.INFO="INFO",e.INVITE="INVITE",e.MESSAGE="MESSAGE",e.NOTIFY="NOTIFY",e.OPTIONS="OPTIONS",e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.SUBSCRIBE="SUBSCRIBE",e.PUBLISH="PUBLISH",e.REFER="REFER",e.PRACK="PRACK"}(t.C||(t.C={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32),i=r(33),o=r(34);function a(e){return!(!e||"string"!=typeof e.content||"string"!=typeof e.contentType||void 0!==e.contentDisposition)||"string"==typeof e.contentDisposition}function s(e){return"application/sdp"===e?"session":"render"}t.fromBodyLegacy=function(e){var t="string"==typeof e?e:e.body,r="string"==typeof e?"application/sdp":e.contentType;return{contentDisposition:s(r),contentType:r,content:t}},t.getBody=function(e){var t,r,c,u;if(e instanceof n.IncomingRequestMessage&&e.body&&(t=(u=e.parseHeader("Content-Disposition"))?u.type:void 0,r=e.parseHeader("Content-Type"),c=e.body),e instanceof i.IncomingResponseMessage&&e.body&&(t=(u=e.parseHeader("Content-Disposition"))?u.type:void 0,r=e.parseHeader("Content-Type"),c=e.body),e instanceof o.OutgoingRequestMessage&&e.body)if(t=e.getHeader("Content-Disposition"),r=e.getHeader("Content-Type"),"string"==typeof e.body){if(!r)throw new Error("Header content type header does not equal body content type.");c=e.body}else{if(r&&r!==e.body.contentType)throw new Error("Header content type header does not equal body content type.");r=e.body.contentType,c=e.body.body}if(a(e)&&(t=e.contentDisposition,r=e.contentType,c=e.content),c){if(r&&!t&&(t=s(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:c}}},t.isBody=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(20),o=r(30),a=function(e){function t(r,n,i,o){var a=e.call(this)||this;return a.message=r,a.expected=n,a.found=i,a.location=o,a.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a,t),a}return n.__extends(t,e),t.buildMessage=function(e,t){function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function n(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function i(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+r(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+r(e)})}function o(e){switch(e.type){case"literal":return'"'+n(e.text)+'"';case"class":var t=e.parts.map(function(e){return Array.isArray(e)?i(e[0])+"-"+i(e[1]):i(e)});return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,r,n=e.map(o);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+((a=t)?'"'+n(a)+'"':"end of input")+" found.";var a},t}(Error);t.SyntaxError=a,t.parse=function(e,t){t=void 0!==t?t:{};var r,n={},s={Contact:119,Name_Addr_Header:156,Record_Route:176,Request_Response:81,SIP_URI:45,Subscription_State:186,Supported:191,Require:182,Via:194,absoluteURI:84,Call_ID:118,Content_Disposition:130,Content_Length:135,Content_Type:136,CSeq:146,displayName:122,Event:149,From:151,host:52,Max_Forwards:154,Min_SE:213,Proxy_Authenticate:157,quoted_string:40,Refer_To:178,Replaces:179,Session_Expires:210,stun_URI:217,To:192,turn_URI:223,uuid:226,WWW_Authenticate:209,challenge:158,sipfrag:230,Referred_By:231},c=119,u=["\r\n",S("\r\n",!1),/^[0-9]/,T([["0","9"]],!1,!1),/^[a-zA-Z]/,T([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,T([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,T([["\0","\xff"]],!1,!1),/^["]/,T(['"'],!1,!1)," ",S(" ",!1),"\t",S("\t",!1),/^[a-zA-Z0-9]/,T([["a","z"],["A","Z"],["0","9"]],!1,!1),";",S(";",!1),"/",S("/",!1),"?",S("?",!1),":",S(":",!1),"@",S("@",!1),"&",S("&",!1),"=",S("=",!1),"+",S("+",!1),"$",S("$",!1),",",S(",",!1),"-",S("-",!1),"_",S("_",!1),".",S(".",!1),"!",S("!",!1),"~",S("~",!1),"*",S("*",!1),"'",S("'",!1),"(",S("(",!1),")",S(")",!1),"%",S("%",!1),function(){return" "},function(){return":"},/^[!-~]/,T([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,T([["\x80","\uffff"]],!1,!1),/^[\x80-\xBF]/,T([["\x80","\xbf"]],!1,!1),/^[a-f]/,T([["a","f"]],!1,!1),"`",S("`",!1),"<",S("<",!1),">",S(">",!1),"\\",S("\\",!1),"[",S("[",!1),"]",S("]",!1),"{",S("{",!1),"}",S("}",!1),function(){return"*"},function(){return"/"},function(){return"="},function(){return"("},function(){return")"},function(){return">"},function(){return"<"},function(){return","},function(){return";"},function(){return":"},function(){return'"'},/^[!-']/,T([["!","'"]],!1,!1),/^[*-[]/,T([["*","["]],!1,!1),/^[\]-~]/,T([["]","~"]],!1,!1),function(e){return e},/^[#-[]/,T([["#","["]],!1,!1),/^[\0-\t]/,T([["\0","\t"]],!1,!1),/^[\x0B-\f]/,T([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,T([["\x0e","\x7f"]],!1,!1),function(){(t=t||{data:{}}).data.uri=new o.URI(t.data.scheme,t.data.user,t.data.host,t.data.port),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port},function(){(t=t||{data:{}}).data.uri=new o.URI(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params,"SIP_URI"===t.startRule&&(t.data=t.data.uri)},"sips",S("sips",!0),"sip",S("sip",!0),function(e){(t=t||{data:{}}).data.scheme=e},function(){(t=t||{data:{}}).data.user=decodeURIComponent(m().slice(0,-1))},function(){(t=t||{data:{}}).data.password=m()},function(){return(t=t||{data:{}}).data.host=m(),t.data.host},function(){return(t=t||{data:{}}).data.host_type="domain",m()},/^[a-zA-Z0-9_\-]/,T([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,T([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return(t=t||{data:{}}).data.host_type="IPv6",m()},"::",S("::",!1),function(){return(t=t||{data:{}}).data.host_type="IPv6",m()},function(){return(t=t||{data:{}}).data.host_type="IPv4",m()},"25",S("25",!1),/^[0-5]/,T([["0","5"]],!1,!1),"2",S("2",!1),/^[0-4]/,T([["0","4"]],!1,!1),"1",S("1",!1),/^[1-9]/,T([["1","9"]],!1,!1),function(e){return t=t||{data:{}},e=parseInt(e.join("")),t.data.port=e,e},"transport=",S("transport=",!0),"udp",S("udp",!0),"tcp",S("tcp",!0),"sctp",S("sctp",!0),"tls",S("tls",!0),function(e){(t=t||{data:{}}).data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=e.toLowerCase()},"user=",S("user=",!0),"phone",S("phone",!0),"ip",S("ip",!0),function(e){(t=t||{data:{}}).data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=e.toLowerCase()},"method=",S("method=",!0),function(e){(t=t||{data:{}}).data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=e},"ttl=",S("ttl=",!0),function(e){(t=t||{data:{}}).data.params||(t.data.params={}),t.data.params.ttl=e},"maddr=",S("maddr=",!0),function(e){(t=t||{data:{}}).data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=e},"lr",S("lr",!0),function(){(t=t||{data:{}}).data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(e,r){(t=t||{data:{}}).data.uri_params||(t.data.uri_params={}),r=null===r?void 0:r[1],t.data.uri_params[e.toLowerCase()]=r},function(e,r){e=e.join("").toLowerCase(),r=r.join(""),(t=t||{data:{}}).data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[e]?t.data.uri_headers[e].push(r):t.data.uri_headers[e]=[r]},function(){"Refer_To"===(t=t||{data:{}}).startRule&&(t.data.uri=new o.URI(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params)},"//",S("//",!1),function(){(t=t||{data:{}}).data.scheme=m()},S("SIP",!0),function(){(t=t||{data:{}}).data.sip_version=m()},"INVITE",S("INVITE",!1),"ACK",S("ACK",!1),"VXACH",S("VXACH",!1),"OPTIONS",S("OPTIONS",!1),"BYE",S("BYE",!1),"CANCEL",S("CANCEL",!1),"REGISTER",S("REGISTER",!1),"SUBSCRIBE",S("SUBSCRIBE",!1),"NOTIFY",S("NOTIFY",!1),"REFER",S("REFER",!1),"PUBLISH",S("PUBLISH",!1),function(){return(t=t||{data:{}}).data.method=m(),t.data.method},function(e){(t=t||{data:{}}).data.status_code=parseInt(e.join(""))},function(){(t=t||{data:{}}).data.reason_phrase=m()},function(){(t=t||{data:{}}).data=m()},function(){var e,r;for(r=(t=t||{data:{}}).data.multi_header.length,e=0;e<r;e++)if(null===t.data.multi_header[e].parsed){t.data=null;break}null!==t.data?t.data=t.data.multi_header:t.data=-1},function(){var e;(t=t||{data:{}}).data.multi_header||(t.data.multi_header=[]);try{e=new i.NameAddrHeader(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch(t){e=null}t.data.multi_header.push({position:l,offset:y().start.offset,parsed:e})},function(e){'"'===(e=m().trim())[0]&&(e=e.substring(1,e.length-1)),(t=t||{data:{}}).data.displayName=e},"q",S("q",!0),function(e){(t=t||{data:{}}).data.params||(t.data.params={}),t.data.params.q=e},"expires",S("expires",!0),function(e){(t=t||{data:{}}).data.params||(t.data.params={}),t.data.params.expires=e},function(e){return parseInt(e.join(""))},"0",S("0",!1),function(){return parseFloat(m())},function(e,r){(t=t||{data:{}}).data.params||(t.data.params={}),r=null===r?void 0:r[1],t.data.params[e.toLowerCase()]=r},"render",S("render",!0),"session",S("session",!0),"icon",S("icon",!0),"alert",S("alert",!0),function(){"Content_Disposition"===(t=t||{data:{}}).startRule&&(t.data.type=m().toLowerCase())},"handling",S("handling",!0),"optional",S("optional",!0),"required",S("required",!0),function(e){(t=t||{data:{}}).data=parseInt(e.join(""))},function(){(t=t||{data:{}}).data=m()},"text",S("text",!0),"image",S("image",!0),"audio",S("audio",!0),"video",S("video",!0),"application",S("application",!0),"message",S("message",!0),"multipart",S("multipart",!0),"x-",S("x-",!0),function(e){(t=t||{data:{}}).data.value=parseInt(e.join(""))},function(e){(t=t||{data:{}}).data=e},function(e){(t=t||{data:{}}).data.event=e.toLowerCase()},function(){var e=(t=t||{data:{}}).data.tag;t.data=new i.NameAddrHeader(t.data.uri,t.data.displayName,t.data.params),e&&t.data.setParam("tag",e)},"tag",S("tag",!0),function(e){(t=t||{data:{}}).data.tag=e},function(e){(t=t||{data:{}}).data=parseInt(e.join(""))},function(e){(t=t||{data:{}}).data=e},function(){(t=t||{data:{}}).data=new i.NameAddrHeader(t.data.uri,t.data.displayName,t.data.params)},"digest",S("Digest",!0),"realm",S("realm",!0),function(e){(t=t||{data:{}}).data.realm=e},"domain",S("domain",!0),"nonce",S("nonce",!0),function(e){(t=t||{data:{}}).data.nonce=e},"opaque",S("opaque",!0),function(e){(t=t||{data:{}}).data.opaque=e},"stale",S("stale",!0),"true",S("true",!0),function(){(t=t||{data:{}}).data.stale=!0},"false",S("false",!0),function(){(t=t||{data:{}}).data.stale=!1},"algorithm",S("algorithm",!0),"md5",S("MD5",!0),"md5-sess",S("MD5-sess",!0),function(e){(t=t||{data:{}}).data.algorithm=e.toUpperCase()},"qop",S("qop",!0),"auth-int",S("auth-int",!0),"auth",S("auth",!0),function(e){(t=t||{data:{}}).data.qop||(t.data.qop=[]),t.data.qop.push(e.toLowerCase())},function(e){(t=t||{data:{}}).data.value=parseInt(e.join(""))},function(){var e,r;for(r=(t=t||{data:{}}).data.multi_header.length,e=0;e<r;e++)if(null===t.data.multi_header[e].parsed){t.data=null;break}null!==t.data?t.data=t.data.multi_header:t.data=-1},function(){var e;(t=t||{data:{}}).data.multi_header||(t.data.multi_header=[]);try{e=new i.NameAddrHeader(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch(t){e=null}t.data.multi_header.push({position:l,offset:y().start.offset,parsed:e})},function(){(t=t||{data:{}}).data=new i.NameAddrHeader(t.data.uri,t.data.displayName,t.data.params)},function(){(t=t||{data:{}}).data.replaces_from_tag&&t.data.replaces_to_tag||(t.data=-1)},function(){(t=t||{data:{}}).data={call_id:t.data}},"from-tag",S("from-tag",!0),function(e){(t=t||{data:{}}).data.replaces_from_tag=e},"to-tag",S("to-tag",!0),function(e){(t=t||{data:{}}).data.replaces_to_tag=e},"early-only",S("early-only",!0),function(){(t=t||{data:{}}).data.early_only=!0},function(e,t){return t},function(e,t){return function(e,t){return[e].concat(t)}(e,t)},function(e){"Require"===(t=t||{data:{}}).startRule&&(t.data=e||[])},function(e){(t=t||{data:{}}).data.value=parseInt(e.join(""))},"active",S("active",!0),"pending",S("pending",!0),"terminated",S("terminated",!0),function(){(t=t||{data:{}}).data.state=m()},"reason",S("reason",!0),function(e){t=t||{data:{}},void 0!==e&&(t.data.reason=e)},function(e){t=t||{data:{}},void 0!==e&&(t.data.expires=e)},"retry_after",S("retry_after",!0),function(e){t=t||{data:{}},void 0!==e&&(t.data.retry_after=e)},"deactivated",S("deactivated",!0),"probation",S("probation",!0),"rejected",S("rejected",!0),"timeout",S("timeout",!0),"giveup",S("giveup",!0),"noresource",S("noresource",!0),"invariant",S("invariant",!0),function(e){"Supported"===(t=t||{data:{}}).startRule&&(t.data=e||[])},function(){var e=(t=t||{data:{}}).data.tag;t.data=new i.NameAddrHeader(t.data.uri,t.data.displayName,t.data.params),e&&t.data.setParam("tag",e)},"ttl",S("ttl",!0),function(e){(t=t||{data:{}}).data.ttl=e},"maddr",S("maddr",!0),function(e){(t=t||{data:{}}).data.maddr=e},"received",S("received",!0),function(e){(t=t||{data:{}}).data.received=e},"branch",S("branch",!0),function(e){(t=t||{data:{}}).data.branch=e},"rport",S("rport",!0),function(e){t=t||{data:{}},void 0!==e&&(t.data.rport=e.join(""))},function(e){(t=t||{data:{}}).data.protocol=e},S("UDP",!0),S("TCP",!0),S("TLS",!0),S("SCTP",!0),function(e){(t=t||{data:{}}).data.transport=e},function(){(t=t||{data:{}}).data.host=m()},function(e){(t=t||{data:{}}).data.port=parseInt(e.join(""))},function(e){return parseInt(e.join(""))},function(e){"Session_Expires"===(t=t||{data:{}}).startRule&&(t.data.deltaSeconds=e)},"refresher",S("refresher",!1),"uas",S("uas",!1),"uac",S("uac",!1),function(e){"Session_Expires"===(t=t||{data:{}}).startRule&&(t.data.refresher=e)},function(e){"Min_SE"===(t=t||{data:{}}).startRule&&(t.data=e)},"stuns",S("stuns",!0),"stun",S("stun",!0),function(e){(t=t||{data:{}}).data.scheme=e},function(e){(t=t||{data:{}}).data.host=e},"?transport=",S("?transport=",!1),"turns",S("turns",!0),"turn",S("turn",!0),function(e){(t=t||{data:{}}).data.transport=e},function(){(t=t||{data:{}}).data=m()},"Referred-By",S("Referred-By",!1),"b",S("b",!1),"cid",S("cid",!1)],d=[C('2 ""6 7!'),C('4"""5!7#'),C('4$""5!7%'),C('4&""5!7\''),C(";'.# &;("),C('4(""5!7)'),C('4*""5!7+'),C('2,""6,7-'),C('2.""6.7/'),C('40""5!71'),C('22""6273.\x89 &24""6475.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""[email protected] &2B""6B7C.) &2D""6D7E'),C(";).# &;,"),C('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),C('%%2X""6X7Y/5#;#/,$;#/#$+#)(#\'#("\'#&\'#/"!&,)'),C('%%$;$0#*;$&/,#; /#$+")("\'#&\'#." &"/=#$;$/�#*;$&&&#/\'$8":Z" )("\'#&\'#'),C(';.." &"'),C("%$;'.# &;(0)*;'.# &;(&/?#28\"\"6879/0$;//'$8#:[# )(#'#(\"'#&'#"),C('%%$;2/�#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("\'#&\'#0=*%$;.0#*;.&/,#;2/#$+")("\'#&\'#&/#$+")("\'#&\'#/"!&,)'),C('4\\""5!7].# &;3'),C('4^""5!7_'),C('4`""5!7a'),C(';!.) &4b""5!7c'),C('%$;).\x95 &2F""6F7G.\x89 &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""[email protected] &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/\x9e#0\x9b*;).\x95 &2F""6F7G.\x89 &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""[email protected] &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),C('%$;).\x89 &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""[email protected] &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/\x92#0\x8f*;).\x89 &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""[email protected] &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),C('2T""6T7U.\xe3 &2V""6V7W.\xd7 &2f""6f7g.\xcb &2h""6h7i.\xbf &2:""6:7;.\xb3 &2D""6D7E.\xa7 &22""6273.\x9b &28""6879.\x8f &2j""6j7k.\x83 &;&.} &24""6475.q &2l""6l7m.e &2n""6n7o.Y &26""6677.M &2>""6>7?.A &2p""6p7q.5 &2r""6r7s.) &;\'.# &;('),C('%$;).\u012b &2F""6F7G.\u011f &2J""6J7K.\u0113 &2L""6L7M.\u0107 &2X""6X7Y.\xfb &2P""6P7Q.\xef &2H""6H7I.\xe3 &2@""6@7A.\xd7 &2d""6d7e.\xcb &2R""6R7S.\xbf &2N""6N7O.\xb3 &2T""6T7U.\xa7 &2V""6V7W.\x9b &2f""6f7g.\x8f &2h""6h7i.\x83 &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s/\u0134#0\u0131*;).\u012b &2F""6F7G.\u011f &2J""6J7K.\u0113 &2L""6L7M.\u0107 &2X""6X7Y.\xfb &2P""6P7Q.\xef &2H""6H7I.\xe3 &2@""6@7A.\xd7 &2d""6d7e.\xcb &2R""6R7S.\xbf &2N""6N7O.\xb3 &2T""6T7U.\xa7 &2V""6V7W.\x9b &2f""6f7g.\x8f &2h""6h7i.\x83 &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s&&&#/"!&,)'),C("%;//?#2P\"\"6P7Q/0$;//'$8#:t# )(#'#(\"'#&'#"),C("%;//?#24\"\"6475/0$;//'$8#:u# )(#'#(\"'#&'#"),C("%;//?#2>\"\"6>7?/0$;//'$8#:v# )(#'#(\"'#&'#"),C("%;//?#2T\"\"6T7U/0$;//'$8#:w# )(#'#(\"'#&'#"),C("%;//?#2V\"\"6V7W/0$;//'$8#:x# )(#'#(\"'#&'#"),C('%2h""6h7i/0#;//\'$8":y" )("\'#&\'#'),C('%;//6#2f""6f7g/\'$8":z" )("\'#&\'#'),C("%;//?#2D\"\"6D7E/0$;//'$8#:{# )(#'#(\"'#&'#"),C("%;//?#22\"\"6273/0$;//'$8#:|# )(#'#(\"'#&'#"),C("%;//?#28\"\"6879/0$;//'$8#:}# )(#'#(\"'#&'#"),C("%;//0#;&/'$8\":~\" )(\"'#&'#"),C("%;&/0#;//'$8\":~\" )(\"'#&'#"),C("%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#(\"'#&'#"),C('4\x7f""5!7\x80.A &4\x81""5!7\x82.5 &4\x83""5!7\x84.) &;3.# &;.'),C("%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#(\"'#&'#/\"!&,)"),C("%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/\"!&,)/1$;&/($8$:\x85$!!)($'#(#'#(\"'#&'#"),C(';..G &2L""6L7M.; &4\x86""5!7\x87./ &4\x83""5!7\x84.# &;3'),C('%2j""6j7k/J#4\x88""5!7\x89.5 &4\x8a""5!7\x8b.) &4\x8c""5!7\x8d/#$+")("\'#&\'#'),C("%;N/M#28\"\"6879/>$;O.\" &\"/0$;S/'$8$:\x8e$ )($'#(#'#(\"'#&'#"),C("%;N/d#28\"\"6879/U$;O.\" &\"/G$;S/>$;_/5$;l.\" &\"/'$8&:\x8f& )(&'#(%'#($'#(#'#(\"'#&'#"),C('%3\x90""5$7\x91.) &3\x92""5#7\x93/\' 8!:\x94!! )'),C('%;P/]#%28""6879/,#;R/#$+")("\'#&\'#." &"/6$2:""6:7;/\'$8#:\x95# )(#\'#("\'#&\'#'),C("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),C('2<""6<7=.q &2>""6>7?.e &2@""[email protected] &2B""6B7C.M &2D""6D7E.A &22""6273.5 &26""6677.) &24""6475'),C('%$;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""[email protected] &2B""6B7C.) &2D""6D7E0e*;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""[email protected] &2B""6B7C.) &2D""6D7E&/& 8!:\x96! )'),C('%;T/J#%28""6879/,#;^/#$+")("\'#&\'#." &"/#$+")("\'#&\'#'),C("%;U.) &;\\.# &;X/& 8!:\x97! )"),C('%$%;V/2#2J""6J7K/#$+")("\'#&\'#0<*%;V/2#2J""6J7K/#$+")("\'#&\'#&/D#;W/;$2J""6J7K." &"/\'$8#:\x98# )(#\'#("\'#&\'#'),C('$4\x99""5!7\x9a/,#0)*4\x99""5!7\x9a&&&#'),C('%4$""5!7%/?#$4\x9b""5!7\x9c0)*4\x9b""5!7\x9c&/#$+")("\'#&\'#'),C('%2l""6l7m/?#;Y/6$2n""6n7o/\'$8#:\x9d# )(#\'#("\'#&\'#'),C('%%;Z/\xb3#28""6879/\xa4$;Z/\x9b$28""6879/\x8c$;Z/\x83$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+-)(-\'#(,\'#(+\'#(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0790 &%2\x9e""6\x9e7\x9f/\xa4#;Z/\x9b$28""6879/\x8c$;Z/\x83$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,\'#(+\'#(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u06f9 &%2\x9e""6\x9e7\x9f/\x8c#;Z/\x83$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u067a &%2\x9e""6\x9e7\x9f/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0613 &%2\x9e""6\x9e7\x9f/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u05c4 &%2\x9e""6\x9e7\x9f/D#;Z/;$28""6879/,$;[/#$+$)($\'#(#\'#("\'#&\'#.\u058d &%2\x9e""6\x9e7\x9f/,#;[/#$+")("\'#&\'#.\u056e &%2\x9e""6\x9e7\x9f/,#;Z/#$+")("\'#&\'#.\u054f &%;Z/\x9b#2\x9e""6\x9e7\x9f/\x8c$;Z/\x83$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+\'#(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u04c7 &%;Z/\xaa#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x83$2\x9e""6\x9e7\x9f/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*\'#()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0430 &%;Z/\xb9#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x92$%28""6879/,#;Z/#$+")("\'#&\'#." &"/k$2\x9e""6\x9e7\x9f/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()\'#((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u038a &%;Z/\xc8#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xa1$%28""6879/,#;Z/#$+")("\'#&\'#." &"/z$%28""6879/,#;Z/#$+")("\'#&\'#." &"/S$2\x9e""6\x9e7\x9f/D$;Z/;$28""6879/,$;[/#$+()((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u02d5 &%;Z/\xd7#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xb0$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x89$%28""6879/,#;Z/#$+")("\'#&\'#." &"/b$%28""6879/,#;Z/#$+")("\'#&\'#." &"/;$2\x9e""6\x9e7\x9f/,$;[/#$+\')(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0211 &%;Z/\xfe#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xd7$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xb0$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x89$%28""6879/,#;Z/#$+")("\'#&\'#." &"/b$%28""6879/,#;Z/#$+")("\'#&\'#." &"/;$2\x9e""6\x9e7\x9f/,$;Z/#$+()((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#.\u0126 &%;Z/\u011c#%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xf5$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xce$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\xa7$%28""6879/,#;Z/#$+")("\'#&\'#." &"/\x80$%28""6879/,#;Z/#$+")("\'#&\'#." &"/Y$%28""6879/,#;Z/#$+")("\'#&\'#." &"/2$2\x9e""6\x9e7\x9f/#$+()((\'#(\'\'#(&\'#(%\'#($\'#(#\'#("\'#&\'#/& 8!:\xa0! )'),C('%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($\'#(#\'#("\'#&\'#'),C("%;Z/;#28\"\"6879/,$;Z/#$+#)(#'#(\"'#&'#.# &;\\"),C("%;]/o#2J\"\"6J7K/`$;]/W$2J\"\"6J7K/H$;]/?$2J\"\"6J7K/0$;]/'$8':\xa1' )(''#(&'#(%'#($'#(#'#(\"'#&'#"),C('%2\xa2""6\xa27\xa3/2#4\xa4""5!7\xa5/#$+")("\'#&\'#.\x98 &%2\xa6""6\xa67\xa7/;#4\xa8""5!7\xa9/,$;!/#$+#)(#\'#("\'#&\'#.j &%2\xaa""6\xaa7\xab/5#;!/,$;!/#$+#)(#\'#("\'#&\'#.B &%4\xac""5!7\xad/,#;!/#$+")("\'#&\'#.# &;!'),C('%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%\'#($\'#(#\'#("\'#&\'#/\' 8!:\xae!! )'),C('$%22""6273/,#;`/#$+")("\'#&\'#0<*%22""6273/,#;`/#$+")("\'#&\'#&'),C(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),C('%3\xaf""5*7\xb0/a#3\xb1""5#7\xb2.G &3\xb3""5#7\xb4.; &3\xb5""5$7\xb6./ &3\xb7""5#7\xb8.# &;6/($8":\xb9"! )("\'#&\'#'),C('%3\xba""5%7\xbb/I#3\xbc""5%7\xbd./ &3\xbe""5"7\xbf.# &;6/($8":\xc0"! )("\'#&\'#'),C('%3\xc1""5\'7\xc2/1#;\x90/($8":\xc3"! )("\'#&\'#'),C('%3\xc4""5$7\xc5/1#;\xf0/($8":\xc6"! )("\'#&\'#'),C('%3\xc7""5&7\xc8/1#;T/($8":\xc9"! )("\'#&\'#'),C('%3\xca""5"7\xcb/N#%2>""6>7?/,#;6/#$+")("\'#&\'#." &"/\'$8":\xcc" )("\'#&\'#'),C('%;h/P#%2>""6>7?/,#;i/#$+")("\'#&\'#." &"/)$8":\xcd""! )("\'#&\'#'),C('%$;j/�#*;j&&&#/"!&,)'),C('%$;j/�#*;j&&&#/"!&,)'),C(";k.) &;+.# &;-"),C('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),C('%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("\'#&\'#0<*%2<""6<7=/,#;m/#$+")("\'#&\'#&/#$+#)(#\'#("\'#&\'#'),C('%;n/A#2>""6>7?/2$;o/)$8#:\xce#"" )(#\'#("\'#&\'#'),C("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),C("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),C('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),C(";\x91.# &;r"),C("%;\x90/G#;'/>$;s/5$;'/,$;\x84/#$+%)(%'#($'#(#'#(\"'#&'#"),C(";M.# &;t"),C("%;\x7f/E#28\"\"6879/6$;u.# &;x/'$8#:\xcf# )(#'#(\"'#&'#"),C('%;v.# &;w/J#%26""6677/,#;\x83/#$+")("\'#&\'#." &"/#$+")("\'#&\'#'),C('%2\xd0""6\xd07\xd1/:#;\x80/1$;w." &"/#$+#)(#\'#("\'#&\'#'),C('%24""6475/,#;{/#$+")("\'#&\'#'),C("%;z/3#$;y0#*;y&/#$+\")(\"'#&'#"),C(";*.) &;+.# &;-"),C(';+.\x8f &;-.\x89 &22""6273.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""[email protected] &2B""6B7C.) &2D""6D7E'),C('%;|/e#$%24""6475/,#;|/#$+")("\'#&\'#0<*%24""6475/,#;|/#$+")("\'#&\'#&/#$+")("\'#&\'#'),C('%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("\'#&\'#0<*%22""6273/,#;}/#$+")("\'#&\'#&/#$+")("\'#&\'#'),C("$;~0#*;~&"),C(';+.w &;-.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""[email protected] &2B""6B7C.) &2D""6D7E'),C('%%;"/\x87#$;".G &;!.A &2@""[email protected] &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""[email protected] &2F""6F7G.) &2J""6J7K&/#$+")("\'#&\'#/& 8!:\xd2! )'),C(";\x81.# &;\x82"),C('%%;O/2#2:""6:7;/#$+")("\'#&\'#." &"/,#;S/#$+")("\'#&\'#." &"'),C('$;+.\x83 &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A/\x8c#0\x89*;+.\x83 &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A&&&#'),C("$;y0#*;y&"),C('%3\x92""5#7\xd3/q#24""6475/b$$;!/�#*;!&&&#/L$2J""6J7K/=$$;!/�#*;!&&&#/\'$8%:\xd4% )(%\'#($\'#(#\'#("\'#&\'#'),C('2\xd5""6\xd57\xd6'),C('2\xd7""6\xd77\xd8'),C('2\xd9""6\xd97\xda'),C('2\xdb""6\xdb7\xdc'),C('2\xdd""6\xdd7\xde'),C('2\xdf""6\xdf7\xe0'),C('2\xe1""6\xe17\xe2'),C('2\xe3""6\xe37\xe4'),C('2\xe5""6\xe57\xe6'),C('2\xe7""6\xe77\xe8'),C('2\xe9""6\xe97\xea'),C("%;\x85.Y &;\x86.S &;\x88.M &;\x89.G &;\x8a.A &;\x8b.; &;\x8c.5 &;\x8f./ &;\x8d.) &;\x8e.# &;6/& 8!:\xeb! )"),C("%;\x84/G#;'/>$;\x92/5$;'/,$;\x94/#$+%)(%'#($'#(#'#(\"'#&'#"),C("%;\x93/' 8!:\xec!! )"),C("%;!/5#;!/,$;!/#$+#)(#'#(\"'#&'#"),C("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:\xed! )"),C("%;\xb6/Y#$%;A/,#;\xb6/#$+\")(\"'#&'#06*%;A/,#;\xb6/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),C('%;9/N#%2:""6:7;/,#;9/#$+")("\'#&\'#." &"/\'$8":\xee" )("\'#&\'#'),C("%;:.c &%;\x98/Y#$%;A/,#;\x98/#$+\")(\"'#&'#06*%;A/,#;\x98/#$+\")(\"'#&'#&/#$+\")(\"'#&'#/& 8!:\xef! )"),C("%;L.# &;\x99/]#$%;B/,#;\x9b/#$+\")(\"'#&'#06*%;B/,#;\x9b/#$+\")(\"'#&'#&/'$8\":\xf0\" )(\"'#&'#"),C("%;\x9a.\" &\"/>#;@/5$;M/,$;?/#$+$)($'#(#'#(\"'#&'#"),C("%%;6/Y#$%;./,#;6/#$+\")(\"'#&'#06*%;./,#;6/#$+\")(\"'#&'#&/#$+\")(\"'#&'#.# &;H/' 8!:\xf1!! )"),C(";\x9c.) &;\x9d.# &;\xa0"),C("%3\xf2\"\"5!7\xf3/:#;</1$;\x9f/($8#:\xf4#! )(#'#(\"'#&'#"),C("%3\xf5\"\"5'7\xf6/:#;</1$;\x9e/($8#:\xf7#! )(#'#(\"'#&'#"),C("%$;!/�#*;!&&&#/' 8!:\xf8!! )"),C('%2\xf9""6\xf97\xfa/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($\'#(#\'#("\'#&\'#." &"/\'$8":\xfb" )("\'#&\'#'),C('%;6/J#%;</,#;\xa1/#$+")("\'#&\'#." &"/)$8":\xfc""! )("\'#&\'#'),C(";6.) &;T.# &;H"),C("%;\xa3/Y#$%;B/,#;\xa4/#$+\")(\"'#&'#06*%;B/,#;\xa4/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),C('%3\xfd""5&7\xfe.G &3\xff""5\'7\u0100.; &3\u0101""5$7\u0102./ &3\u0103""5%7\u0104.# &;6/& 8!:\u0105! )'),C(";\xa5.# &;\xa0"),C('%3\u0106""5(7\u0107/M#;</D$3\u0108""5(7\u0109./ &3\u010a""5(7\u010b.# &;6/#$+#)(#\'#("\'#&\'#'),C("%;6/Y#$%;A/,#;6/#$+\")(\"'#&'#06*%;A/,#;6/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),C("%$;!/�#*;!&&&#/' 8!:\u010c!! )"),C("%;\xa9/& 8!:\u010d! )"),C("%;\xaa/k#;;/b$;\xaf/Y$$%;B/,#;\xb0/#$+\")(\"'#&'#06*%;B/,#;\xb0/#$+\")(\"'#&'#&/#$+$)($'#(#'#(\"'#&'#"),C(";\xab.# &;\xac"),C('3\u010e""5$7\u010f.S &3\u0110""5%7\u0111.G &3\u0112""5%7\u0113.; &3\u0114""5%7\u0115./ &3\u0116""5+7\u0117.# &;\xad'),C('3\u0118""5\'7\u0119./ &3\u011a""5)7\u011b.# &;\xad'),C(";6.# &;\xae"),C('%3\u011c""5"7\u011d/,#;6/#$+")("\'#&\'#'),C(";\xad.# &;6"),C("%;6/5#;</,$;\xb1/#$+#)(#'#(\"'#&'#"),C(";6.# &;H"),C("%;\xb3/5#;./,$;\x90/#$+#)(#'#(\"'#&'#"),C("%$;!/�#*;!&&&#/' 8!:\u011e!! )"),C("%;\x9e/' 8!:\u011f!! )"),C('%;\xb6/^#$%;B/,#;\xa0/#$+")("\'#&\'#06*%;B/,#;\xa0/#$+")("\'#&\'#&/($8":\u0120"!!)("\'#&\'#'),C('%%;7/e#$%2J""6J7K/,#;7/#$+")("\'#&\'#0<*%2J""6J7K/,#;7/#$+")("\'#&\'#&/#$+")("\'#&\'#/"!&,)'),C("%;L.# &;\x99/]#$%;B/,#;\xb8/#$+\")(\"'#&'#06*%;B/,#;\xb8/#$+\")(\"'#&'#&/'$8\":\u0121\" )(\"'#&'#"),C(";\xb9.# &;\xa0"),C("%3\u0122\"\"5#7\u0123/:#;</1$;6/($8#:\u0124#! )(#'#(\"'#&'#"),C("%$;!/�#*;!&&&#/' 8!:\u0125!! )"),C("%;\x9e/' 8!:\u0126!! )"),C("%$;\x9a0#*;\x9a&/x#;@/o$;M/f$;?/]$$%;B/,#;\xa0/#$+\")(\"'#&'#06*%;B/,#;\xa0/#$+\")(\"'#&'#&/'$8%:\u0127% )(%'#($'#(#'#(\"'#&'#"),C(";\xbe"),C("%3\u0128\"\"5&7\u0129/k#;./b$;\xc1/Y$$%;A/,#;\xc1/#$+\")(\"'#&'#06*%;A/,#;\xc1/#$+\")(\"'#&'#&/#$+$)($'#(#'#(\"'#&'#.# &;\xbf"),C("%;6/k#;./b$;\xc0/Y$$%;A/,#;\xc0/#$+\")(\"'#&'#06*%;A/,#;\xc0/#$+\")(\"'#&'#&/#$+$)($'#(#'#(\"'#&'#"),C("%;6/;#;</2$;6.# &;H/#$+#)(#'#(\"'#&'#"),C(";\xc2.G &;\xc4.A &;\xc6.; &;\xc8.5 &;\xc9./ &;\xca.) &;\xcb.# &;\xc0"),C("%3\u012a\"\"5%7\u012b/5#;</,$;\xc3/#$+#)(#'#(\"'#&'#"),C("%;I/' 8!:\u012c!! )"),C("%3\u012d\"\"5&7\u012e/\x97#;</\x8e$;D/\x85$;\xc5/|$$%$;'/�#*;'&&&#/,#;\xc5/#$+\")(\"'#&'#0C*%$;'/�#*;'&&&#/,#;\xc5/#$+\")(\"'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#(\"'#&'#"),C(";t.# &;w"),C("%3\u012f\"\"5%7\u0130/5#;</,$;\xc7/#$+#)(#'#(\"'#&'#"),C("%;I/' 8!:\u0131!! )"),C("%3\u0132\"\"5&7\u0133/:#;</1$;I/($8#:\u0134#! )(#'#(\"'#&'#"),C('%3\u0135""5%7\u0136/]#;</T$%3\u0137""5$7\u0138/& 8!:\u0139! ).4 &%3\u013a""5%7\u013b/& 8!:\u013c! )/#$+#)(#\'#("\'#&\'#'),C('%3\u013d""5)7\u013e/R#;</I$3\u013f""5#7\u0140./ &3\u0141""5(7\u0142.# &;6/($8#:\u0143#! )(#\'#("\'#&\'#'),C('%3\u0144""5#7\u0145/\x93#;</\x8a$;D/\x81$%;\xcc/e#$%2D""6D7E/,#;\xcc/#$+")("\'#&\'#0<*%2D""6D7E/,#;\xcc/#$+")("\'#&\'#&/#$+")("\'#&\'#/,$;E/#$+%)(%\'#($\'#(#\'#("\'#&\'#'),C('%3\u0146""5(7\u0147./ &3\u0148""5$7\u0149.# &;6/\' 8!:\u014a!! )'),C("%;6/Y#$%;A/,#;6/#$+\")(\"'#&'#06*%;A/,#;6/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),C("%;\xcf/G#;./>$;\xcf/5$;./,$;\x90/#$+%)(%'#($'#(#'#(\"'#&'#"),C("%$;!/�#*;!&&&#/' 8!:\u014b!! )"),C("%;\xd1/]#$%;A/,#;\xd1/#$+\")(\"'#&'#06*%;A/,#;\xd1/#$+\")(\"'#&'#&/'$8\":\u014c\" )(\"'#&'#"),C("%;\x99/]#$%;B/,#;\xa0/#$+\")(\"'#&'#06*%;B/,#;\xa0/#$+\")(\"'#&'#&/'$8\":\u014d\" )(\"'#&'#"),C('%;L.O &;\x99.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#\'#("\'#&\'#/]#$%;B/,#;\xa0/#$+")("\'#&\'#06*%;B/,#;\xa0/#$+")("\'#&\'#&/\'$8":\u014e" )("\'#&\'#'),C("%;\xd4/]#$%;B/,#;\xd5/#$+\")(\"'#&'#06*%;B/,#;\xd5/#$+\")(\"'#&'#&/'$8\":\u014f\" )(\"'#&'#"),C("%;\x96/& 8!:\u0150! )"),C('%3\u0151""5(7\u0152/:#;</1$;6/($8#:\u0153#! )(#\'#("\'#&\'#.g &%3\u0154""5&7\u0155/:#;</1$;6/($8#:\u0156#! )(#\'#("\'#&\'#.: &%3\u0157""5*7\u0158/& 8!:\u0159! ).# &;\xa0'),C('%%;6/k#$%;A/2#;6/)$8":\u015a""$ )("\'#&\'#0<*%;A/2#;6/)$8":\u015a""$ )("\'#&\'#&/)$8":\u015b""! )("\'#&\'#." &"/\' 8!:\u015c!! )'),C("%;\xd8/Y#$%;A/,#;\xd8/#$+\")(\"'#&'#06*%;A/,#;\xd8/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),C("%;\x99/Y#$%;B/,#;\xa0/#$+\")(\"'#&'#06*%;B/,#;\xa0/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),C("%$;!/�#*;!&&&#/' 8!:\u015d!! )"),C("%;\xdb/Y#$%;B/,#;\xdc/#$+\")(\"'#&'#06*%;B/,#;\xdc/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),C('%3\u015e""5&7\u015f.; &3\u0160""5\'7\u0161./ &3\u0162""5*7\u0163.# &;6/& 8!:\u0164! )'),C("%3\u0165\"\"5&7\u0166/:#;</1$;\xdd/($8#:\u0167#! )(#'#(\"'#&'#.} &%3\xf5\"\"5'7\xf6/:#;</1$;\x9e/($8#:\u0168#! )(#'#(\"'#&'#.P &%3\u0169\"\"5+7\u016a/:#;</1$;\x9e/($8#:\u016b#! )(#'#(\"'#&'#.# &;\xa0"),C('3\u016c""5+7\u016d.k &3\u016e""5)7\u016f._ &3\u0170""5(7\u0171.S &3\u0172""5\'7\u0173.G &3\u0174""5&7\u0175.; &3\u0176""5*7\u0177./ &3\u0178""5)7\u0179.# &;6'),C(';1." &"'),C('%%;6/k#$%;A/2#;6/)$8":\u015a""$ )("\'#&\'#0<*%;A/2#;6/)$8":\u015a""$ )("\'#&\'#&/)$8":\u015b""! )("\'#&\'#." &"/\' 8!:\u017a!! )'),C("%;L.# &;\x99/]#$%;B/,#;\xe1/#$+\")(\"'#&'#06*%;B/,#;\xe1/#$+\")(\"'#&'#&/'$8\":\u017b\" )(\"'#&'#"),C(";\xb9.# &;\xa0"),C("%;\xe3/Y#$%;A/,#;\xe3/#$+\")(\"'#&'#06*%;A/,#;\xe3/#$+\")(\"'#&'#&/#$+\")(\"'#&'#"),C("%;\xea/k#;./b$;\xed/Y$$%;B/,#;\xe4/#$+\")(\"'#&'#06*%;B/,#;\xe4/#$+\")(\"'#&'#&/#$+$)($'#(#'#(\"'#&'#"),C(";\xe5.; &;\xe6.5 &;\xe7./ &;\xe8.) &;\xe9.# &;\xa0"),C("%3\u017c\"\"5#7\u017d/:#;</1$;\xf0/($8#:\u017e#! )(#'#(\"'#&'#"),C("%3\u017f\"\"5%7\u0180/:#;</1$;T/($8#:\u0181#! )(#'#(\"'#&'#"),C("%3\u0182\"\"5(7\u0183/F#;</=$;\\.) &;Y.# &;X/($8#:\u0184#! )(#'#(\"'#&'#"),C("%3\u0185\"\"5&7\u0186/:#;</1$;6/($8#:\u0187#! )(#'#(\"'#&'#"),C("%3\u0188\"\"5%7\u0189/A#;</8$$;!0#*;!&/($8#:\u018a#! )(#'#(\"'#&'#"),C("%;\xeb/G#;;/>$;6/5$;;/,$;\xec/#$+%)(%'#($'#(#'#(\"'#&'#"),C('%3\x92""5#7\xd3.# &;6/\' 8!:\u018b!! )'),C('%3\xb1""5#7\u018c.G &3\xb3""5#7\u018d.; &3\xb7""5#7\u018e./ &3\xb5""5$7\u018f.# &;6/\' 8!:\u0190!! )'),C('%;\xee/D#%;C/,#;\xef/#$+")("\'#&\'#." &"/#$+")("\'#&\'#'),C("%;U.) &;\\.# &;X/& 8!:\u0191! )"),C('%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%\'#($\'#(#\'#("\'#&\'#/\' 8!:\u0192!! )'),C('%%;!/?#;!." &"/1$;!." &"/#$+#)(#\'#("\'#&\'#/\' 8!:\u0193!! )'),C(";\xbe"),C('%;\x9e/^#$%;B/,#;\xf3/#$+")("\'#&\'#06*%;B/,#;\xf3/#$+")("\'#&\'#&/($8":\u0194"!!)("\'#&\'#'),C(";\xf4.# &;\xa0"),C('%2\u0195""6\u01957\u0196/L#;</C$2\u0197""6\u01977\u0198.) &2\u0199""6\u01997\u019a/($8#:\u019b#! )(#\'#("\'#&\'#'),C('%;\x9e/^#$%;B/,#;\xa0/#$+")("\'#&\'#06*%;B/,#;\xa0/#$+")("\'#&\'#&/($8":\u019c"!!)("\'#&\'#'),C("%;6/5#;0/,$;\xf7/#$+#)(#'#(\"'#&'#"),C("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),C("$;%0#*;%&"),C("%;\xfa/;#28\"\"6879/,$;\xfb/#$+#)(#'#(\"'#&'#"),C('%3\u019d""5%7\u019e.) &3\u019f""5$7\u01a0/\' 8!:\u01a1!! )'),C('%;\xfc/J#%28""6879/,#;^/#$+")("\'#&\'#." &"/#$+")("\'#&\'#'),C("%;\\.) &;X.# &;\x82/' 8!:\u01a2!! )"),C(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),C('2L""6L7M.\x95 &2B""6B7C.\x89 &2<""6<7=.} &2R""6R7S.q &2T""6T7U.e &2V""6V7W.Y &2P""6P7Q.M &2@""[email protected] &2D""6D7E.5 &22""6273.) &2>""6>7?'),C('%;\u0100/b#28""6879/S$;\xfb/J$%2\u01a3""6\u01a37\u01a4/,#;\xec/#$+")("\'#&\'#." &"/#$+$)($\'#(#\'#("\'#&\'#'),C('%3\u01a5""5%7\u01a6.) &3\u01a7""5$7\u01a8/\' 8!:\u01a1!! )'),C('%3\xb1""5#7\xb2.6 &3\xb3""5#7\xb4.* &$;+0#*;+&/\' 8!:\u01a9!! )'),C("%;\u0104/\x87#2F\"\"6F7G/x$;\u0103/o$2F\"\"6F7G/`$;\u0103/W$2F\"\"6F7G/H$;\u0103/?$2F\"\"6F7G/0$;\u0105/'$8):\u01aa) )()'#(('#(''#(&'#(%'#($'#(#'#(\"'#&'#"),C("%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#(\"'#&'#"),C("%;\u0103/,#;\u0103/#$+\")(\"'#&'#"),C("%;\u0103/5#;\u0103/,$;\u0103/#$+#)(#'#(\"'#&'#"),C("%;q/T#$;m0#*;m&/D$%; /,#;\xf8/#$+\")(\"'#&'#.\" &\"/#$+#)(#'#(\"'#&'#"),C('%2\u01ab""6\u01ab7\u01ac.) &2\u01ad""6\u01ad7\u01ae/w#;0/n$;\u0108/e$$%;B/2#;\u0109.# &;\xa0/#$+")("\'#&\'#0<*%;B/2#;\u0109.# &;\xa0/#$+")("\'#&\'#&/#$+$)($\'#(#\'#("\'#&\'#'),C(";\x99.# &;L"),C("%2\u01af\"\"6\u01af7\u01b0/5#;</,$;\u010a/#$+#)(#'#(\"'#&'#"),C("%;D/S#;,/J$2:\"\"6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#(\"'#&'#")],l=0,h=0,p=[{line:1,column:1}],f=0,g=[],v=0;if(void 0!==t.startRule){if(!(t.startRule in s))throw new Error("Can't start parsing from rule \""+t.startRule+'".');c=s[t.startRule]}function m(){return e.substring(h,l)}function y(){return _(h,l)}function S(e,t){return{type:"literal",text:e,ignoreCase:t}}function T(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function b(t){var r,n=p[t];if(n)return n;for(r=t-1;!p[r];)r--;for(n={line:(n=p[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return p[t]=n,n}function _(e,t){var r=b(e),n=b(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function $(e){l<f||(l>f&&(f=l,g=[]),g.push(e))}function w(e,t,r){return new a(a.buildMessage(e,t),e,t,r)}function C(e){return e.split("").map(function(e){return e.charCodeAt(0)-32})}if(t.data={},(r=function t(r){for(var i,o=d[r],a=0,s=[],c=o.length,p=[],f=[];;){for(;a<c;)switch(o[a]){case 0:f.push(u[o[a+1]]),a+=2;break;case 1:f.push(void 0),a++;break;case 2:f.push(null),a++;break;case 3:f.push(n),a++;break;case 4:f.push([]),a++;break;case 5:f.push(l),a++;break;case 6:f.pop(),a++;break;case 7:l=f.pop(),a++;break;case 8:f.length-=o[a+1],a+=2;break;case 9:f.splice(-2,1),a++;break;case 10:f[f.length-2].push(f.pop()),a++;break;case 11:f.push(f.splice(f.length-o[a+1],o[a+1])),a+=2;break;case 12:f.push(e.substring(f.pop(),l)),a++;break;case 13:p.push(c),s.push(a+3+o[a+1]+o[a+2]),f[f.length-1]?(c=a+3+o[a+1],a+=3):(c=a+3+o[a+1]+o[a+2],a+=3+o[a+1]);break;case 14:p.push(c),s.push(a+3+o[a+1]+o[a+2]),f[f.length-1]===n?(c=a+3+o[a+1],a+=3):(c=a+3+o[a+1]+o[a+2],a+=3+o[a+1]);break;case 15:p.push(c),s.push(a+3+o[a+1]+o[a+2]),f[f.length-1]!==n?(c=a+3+o[a+1],a+=3):(c=a+3+o[a+1]+o[a+2],a+=3+o[a+1]);break;case 16:f[f.length-1]!==n?(p.push(c),s.push(a),c=a+2+o[a+1],a+=2):a+=2+o[a+1];break;case 17:p.push(c),s.push(a+3+o[a+1]+o[a+2]),e.length>l?(c=a+3+o[a+1],a+=3):(c=a+3+o[a+1]+o[a+2],a+=3+o[a+1]);break;case 18:p.push(c),s.push(a+4+o[a+2]+o[a+3]),e.substr(l,u[o[a+1]].length)===u[o[a+1]]?(c=a+4+o[a+2],a+=4):(c=a+4+o[a+2]+o[a+3],a+=4+o[a+2]);break;case 19:p.push(c),s.push(a+4+o[a+2]+o[a+3]),e.substr(l,u[o[a+1]].length).toLowerCase()===u[o[a+1]]?(c=a+4+o[a+2],a+=4):(c=a+4+o[a+2]+o[a+3],a+=4+o[a+2]);break;case 20:p.push(c),s.push(a+4+o[a+2]+o[a+3]),u[o[a+1]].test(e.charAt(l))?(c=a+4+o[a+2],a+=4):(c=a+4+o[a+2]+o[a+3],a+=4+o[a+2]);break;case 21:f.push(e.substr(l,o[a+1])),l+=o[a+1],a+=2;break;case 22:f.push(u[o[a+1]]),l+=u[o[a+1]].length,a+=2;break;case 23:f.push(n),0===v&&$(u[o[a+1]]),a+=2;break;case 24:h=f[f.length-1-o[a+1]],a+=2;break;case 25:h=l,a++;break;case 26:i=o.slice(a+4,a+4+o[a+3]).map(function(e){return f[f.length-1-e]}),f.splice(f.length-o[a+2],o[a+2],u[o[a+1]].apply(null,i)),a+=4+o[a+3];break;case 27:f.push(t(o[a+1])),a+=2;break;case 28:v++,a++;break;case 29:v--,a++;break;default:throw new Error("Invalid opcode: "+o[a]+".")}if(!(p.length>0))break;c=p.pop(),a=s.pop()}return f[0]}(c))!==n&&l===e.length)return r;throw r!==n&&l<e.length&&$({type:"end"}),w(g,f<e.length?e.charAt(f):null,f<e.length?_(f,f+1):_(f,f))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0).__importDefault(r(60)),i=r(12),o=function(){function e(e,t,r){this.logger=e.getLogger("sipjs.digestauthentication"),this.username=t,this.password=r,this.nc=0,this.ncHex="00000000"}return e.prototype.authenticate=function(e,t,r){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 this.logger.warn("challenge with Digest algorithm different than 'MD5', authentication aborted"),!1}else this.algorithm="MD5";if(!this.realm)return this.logger.warn("challenge without Digest realm, authentication aborted"),!1;if(!this.nonce)return this.logger.warn("challenge without Digest nonce, authentication aborted"),!1;if(t.qop)if(t.qop.indexOf("auth")>-1)this.qop="auth";else{if(!(t.qop.indexOf("auth-int")>-1))return this.logger.warn("challenge without Digest qop different than 'auth' or 'auth-int', authentication aborted"),!1;this.qop="auth-int"}else this.qop=void 0;return this.method=e.method,this.uri=e.ruri,this.cnonce=i.createRandomToken(12),this.nc+=1,this.updateNcHex(),4294967296===this.nc&&(this.nc=1,this.ncHex="00000001"),this.calculateResponse(r),!0},e.prototype.toString=function(){var e=[];if(!this.response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm="+this.algorithm),e.push('username="'+this.username+'"'),e.push('realm="'+this.realm+'"'),e.push('nonce="'+this.nonce+'"'),e.push('uri="'+this.uri+'"'),e.push('response="'+this.response+'"'),this.opaque&&e.push('opaque="'+this.opaque+'"'),this.qop&&(e.push("qop="+this.qop),e.push('cnonce="'+this.cnonce+'"'),e.push("nc="+this.ncHex)),"Digest "+e.join(", ")},e.prototype.updateNcHex=function(){var e=Number(this.nc).toString(16);this.ncHex="00000000".substr(0,8-e.length)+e},e.prototype.calculateResponse=function(e){var t,r=n.default(this.username+":"+this.realm+":"+this.password);"auth"===this.qop?(t=n.default(this.method+":"+this.uri),this.response=n.default(r+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+t)):"auth-int"===this.qop?(t=n.default(this.method+":"+this.uri+":"+n.default(e||"")),this.response=n.default(r+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+t)):void 0===this.qop&&(t=n.default(this.method+":"+this.uri),this.response=n.default(r+":"+this.nonce+":"+t))},e}();t.DigestAuthentication=o},function(e,t,r){var n;e.exports=(n=r(61),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],p=e[t+2],f=e[t+3],g=e[t+4],v=e[t+5],m=e[t+6],y=e[t+7],S=e[t+8],T=e[t+9],b=e[t+10],_=e[t+11],$=e[t+12],w=e[t+13],C=e[t+14],I=e[t+15],E=o[0],x=o[1],R=o[2],A=o[3];E=u(E,x,R,A,a,7,s[0]),A=u(A,E,x,R,c,12,s[1]),R=u(R,A,E,x,p,17,s[2]),x=u(x,R,A,E,f,22,s[3]),E=u(E,x,R,A,g,7,s[4]),A=u(A,E,x,R,v,12,s[5]),R=u(R,A,E,x,m,17,s[6]),x=u(x,R,A,E,y,22,s[7]),E=u(E,x,R,A,S,7,s[8]),A=u(A,E,x,R,T,12,s[9]),R=u(R,A,E,x,b,17,s[10]),x=u(x,R,A,E,_,22,s[11]),E=u(E,x,R,A,$,7,s[12]),A=u(A,E,x,R,w,12,s[13]),R=u(R,A,E,x,C,17,s[14]),E=d(E,x=u(x,R,A,E,I,22,s[15]),R,A,c,5,s[16]),A=d(A,E,x,R,m,9,s[17]),R=d(R,A,E,x,_,14,s[18]),x=d(x,R,A,E,a,20,s[19]),E=d(E,x,R,A,v,5,s[20]),A=d(A,E,x,R,b,9,s[21]),R=d(R,A,E,x,I,14,s[22]),x=d(x,R,A,E,g,20,s[23]),E=d(E,x,R,A,T,5,s[24]),A=d(A,E,x,R,C,9,s[25]),R=d(R,A,E,x,f,14,s[26]),x=d(x,R,A,E,S,20,s[27]),E=d(E,x,R,A,w,5,s[28]),A=d(A,E,x,R,p,9,s[29]),R=d(R,A,E,x,y,14,s[30]),E=l(E,x=d(x,R,A,E,$,20,s[31]),R,A,v,4,s[32]),A=l(A,E,x,R,S,11,s[33]),R=l(R,A,E,x,_,16,s[34]),x=l(x,R,A,E,C,23,s[35]),E=l(E,x,R,A,c,4,s[36]),A=l(A,E,x,R,g,11,s[37]),R=l(R,A,E,x,y,16,s[38]),x=l(x,R,A,E,b,23,s[39]),E=l(E,x,R,A,w,4,s[40]),A=l(A,E,x,R,a,11,s[41]),R=l(R,A,E,x,f,16,s[42]),x=l(x,R,A,E,m,23,s[43]),E=l(E,x,R,A,T,4,s[44]),A=l(A,E,x,R,$,11,s[45]),R=l(R,A,E,x,I,16,s[46]),E=h(E,x=l(x,R,A,E,p,23,s[47]),R,A,a,6,s[48]),A=h(A,E,x,R,y,10,s[49]),R=h(R,A,E,x,C,15,s[50]),x=h(x,R,A,E,v,21,s[51]),E=h(E,x,R,A,$,6,s[52]),A=h(A,E,x,R,f,10,s[53]),R=h(R,A,E,x,b,15,s[54]),x=h(x,R,A,E,c,21,s[55]),E=h(E,x,R,A,S,6,s[56]),A=h(A,E,x,R,I,10,s[57]),R=h(R,A,E,x,m,15,s[58]),x=h(x,R,A,E,w,21,s[59]),E=h(E,x,R,A,g,6,s[60]),A=h(A,E,x,R,_,10,s[61]),R=h(R,A,E,x,p,15,s[62]),x=h(x,R,A,E,T,21,s[63]),o[0]=o[0]+E|0,o[1]=o[1]+x|0,o[2]=o[2]+R|0,o[3]=o[3]+A|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var d=c[u];c[u]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),n.MD5)},function(e,t,r){var n;e.exports=(n=n||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},o=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var o=0;o<i;o+=4)t[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){var t=t,r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var s=i(4294967296*(r||e.random()));r=987654071*s(),n.push(4294967296*s()|0)}return new a.init(n,t)}}),s=n.enc={},c=s.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},d=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},l=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=4*o,c=i/s,u=(c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0))*o,d=e.min(4*u,i);if(u){for(var l=0;l<u;l+=o)this._doProcessBlock(n,l);var h=n.splice(0,u);r.sigBytes-=d}return new a.init(h,d)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),h=(i.Hasher=l.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new h.HMAC.init(e,r).finalize(t)}}}),n.algo={});return n}(Math),n)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12);t.constructOutgoingResponse=function(e,t){var r="\r\n";if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);var i=t.reasonPhrase?t.reasonPhrase:n.getReasonPhrase(t.statusCode),o="SIP/2.0 "+t.statusCode+" "+i+r;t.statusCode>=100&&t.statusCode,t.statusCode;var a="From: "+e.getHeader("From")+r,s="Call-ID: "+e.callId+r,c="CSeq: "+e.cseq+" "+e.method+r,u=e.getHeaders("via").reduce(function(e,t){return e+"Via: "+t+r},""),d="To: "+e.getHeader("to");if(t.statusCode>100&&!e.parseHeader("to").hasParam("tag")){var l=t.toTag;l||(l=n.newTag()),d+=";tag="+l}d+=r;var h="";t.supported&&(h="Supported: "+t.supported.join(", ")+r);var p="";t.userAgent&&(p="User-Agent: "+t.userAgent+r);var f="";return t.extraHeaders&&(f=t.extraHeaders.reduce(function(e,t){return e+t.trim()+r},"")),o+=u,o+=a,o+=d,o+=c,o+=s,o+=h,o+=p,o+=f,t.body?(o+="Content-Type: "+t.body.contentType+r,o+="Content-Length: "+n.str_utf8_length(t.body.content)+r+r,o+=t.body.content):o+="Content-Length: 0\r\n\r\n",{message:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(15),a=r(6),s=r(1),c=r(36),u=r(37),d=r(38),l=r(39),h=r(40),p=r(26),f=r(41),g=r(42),v=r(43),m=r(44),y=r(45),S=r(46),T=function(e){function t(t,r,n,i){var a=e.call(this,r,n)||this;return a.initialTransaction=t,a._signalingState=o.SignalingState.Initial,a.ackWait=!1,a.delegate=i,t instanceof s.InviteServerTransaction&&(a.ackWait=!0),a.early||a.start2xxRetransmissionTimer(),a.signalingStateTransition(t.request),a.logger=r.loggerFactory.getLogger("sip.invite-dialog"),a.logger.log("INVITE dialog "+a.id+" constructed"),a}return n.__extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._signalingState=o.SignalingState.Closed,this._offer=void 0,this._answer=void 0,this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.logger.log("INVITE dialog "+this.id+" destroyed")},Object.defineProperty(t.prototype,"sessionState",{get:function(){return this.early?o.SessionState.Early:this.ackWait?o.SessionState.AckWait:this._signalingState===o.SignalingState.Closed?o.SessionState.Terminated:o.SessionState.Confirmed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"signalingState",{get:function(){return this._signalingState},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offer",{get:function(){return this._offer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"answer",{get:function(){return this._answer},enumerable:!0,configurable:!0}),t.prototype.confirm=function(){this.early&&this.start2xxRetransmissionTimer(),e.prototype.confirm.call(this)},t.prototype.reConfirm=function(){this.reinviteUserAgentServer&&this.startReInvite2xxRetransmissionTimer()},t.prototype.ack=function(e){var t;if(void 0===e&&(e={}),this.logger.log("INVITE dialog "+this.id+" sending ACK request"),this.reinviteUserAgentClient){if(!(this.reinviteUserAgentClient.transaction instanceof s.InviteClientTransaction))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof s.InviteClientTransaction))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}e.cseq=t.request.cseq;var r=this.createOutgoingRequestMessage(i.C.ACK,e);return t.ackResponse(r),this.signalingStateTransition(r),{message:r}},t.prototype.bye=function(e,t){if(this.logger.log("INVITE dialog "+this.id+" sending BYE request"),this.initialTransaction instanceof s.InviteServerTransaction){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==s.TransactionState.Terminated)throw new Error("UAS MUST NOT send a BYE on a confirmed dialog until it has received an ACK for its 2xx response or until the server transaction times out.")}return new c.ByeUserAgentClient(this,e,t)},t.prototype.info=function(e,t){if(this.logger.log("INVITE dialog "+this.id+" sending INFO request"),this.early)throw new Error("Dialog not confirmed.");return new d.InfoUserAgentClient(this,e,t)},t.prototype.invite=function(e,t){if(this.logger.log("INVITE dialog "+this.id+" sending INVITE request"),this.early)throw new Error("Dialog not confirmed.");if(this.reinviteUserAgentClient)throw new Error("There is an ongoing re-INVITE client transaction.");if(this.reinviteUserAgentServer)throw new Error("There is an ongoing re-INVITE server transaction.");return new v.ReInviteUserAgentClient(this,e,t)},t.prototype.notify=function(e,t){if(this.logger.log("INVITE dialog "+this.id+" sending NOTIFY request"),this.early)throw new Error("Dialog not confirmed.");return new h.NotifyUserAgentClient(this,e,t)},t.prototype.prack=function(e,t){return this.logger.log("INVITE dialog "+this.id+" sending PRACK request"),new f.PrackUserAgentClient(this,e,t)},t.prototype.refer=function(e,t){if(this.logger.log("INVITE dialog "+this.id+" sending REFER request"),this.early)throw new Error("Dialog not confirmed.");return new y.ReferUserAgentClient(this,e,t)},t.prototype.receiveRequest=function(t){if(this.logger.log("INVITE dialog "+this.id+" received "+t.method+" request"),t.method===i.C.ACK){if(this.ackWait){if(this.initialTransaction instanceof s.InviteClientTransaction)return void this.logger.warn("INVITE dialog "+this.id+" received unexpected "+t.method+" request, dropping.");if(this.initialTransaction.request.cseq!==t.cseq)return void this.logger.warn("INVITE dialog "+this.id+" received unexpected "+t.method+" request, dropping.");this.ackWait=!1}else{if(!this.reinviteUserAgentServer)return void this.logger.warn("INVITE dialog "+this.id+" received unexpected "+t.method+" request, dropping.");if(this.reinviteUserAgentServer.transaction.request.cseq!==t.cseq)return void this.logger.warn("INVITE dialog "+this.id+" received unexpected "+t.method+" request, dropping.");this.reinviteUserAgentServer=void 0}return this.signalingStateTransition(t),void(this.delegate&&this.delegate.onAck&&this.delegate.onAck({message:t}))}if(this.sequenceGuard(t)){if(t.method===i.C.INVITE){if(this.reinviteUserAgentServer){var r=["Retry-After: "+(Math.floor(10*Math.random())+1)];return void this.core.replyStateless(t,{statusCode:500,extraHeaders:r})}if(this.reinviteUserAgentClient)return void this.core.replyStateless(t,{statusCode:491})}if(e.prototype.receiveRequest.call(this,t),t.method===i.C.INVITE){var n=t.parseHeader("contact");if(!n)throw new Error("Contact undefined.");if(!(n instanceof i.NameAddrHeader))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=n.uri}switch(t.method){case i.C.BYE:var o=new u.ByeUserAgentServer(this,t);this.delegate&&this.delegate.onBye?this.delegate.onBye(o):o.accept(),this.dispose();break;case i.C.INFO:o=new l.InfoUserAgentServer(this,t);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(o):o.reject({statusCode:469,extraHeaders:["Recv-Info :"]});break;case i.C.INVITE:o=new m.ReInviteUserAgentServer(this,t);this.signalingStateTransition(t),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(o):o.reject({statusCode:488});break;case i.C.NOTIFY:o=new p.NotifyUserAgentServer(this,t);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(o):o.accept();break;case i.C.PRACK:o=new g.PrackUserAgentServer(this,t);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(o):o.accept();break;case i.C.REFER:o=new S.ReferUserAgentServer(this,t);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(o):o.reject();break;default:this.logger.log("INVITE dialog "+this.id+" received unimplemented "+t.method+" request"),this.core.replyStateless(t,{statusCode:501})}}else this.logger.log("INVITE dialog "+this.id+" rejected out of order "+t.method+" request.")},t.prototype.reliableSequenceGuard=function(e){var t=e.statusCode;if(!t)throw new Error("Status code undefined");if(t>100&&t<200){var r=e.getHeader("require"),n=e.getHeader("rseq"),i=r&&r.includes("100rel")&&n?Number(n):void 0;if(i){if(this.rseq&&this.rseq+1!==i)return!1;this.rseq||(this.rseq=i)}}return!0},t.prototype.signalingStateTransition=function(e){var t=i.getBody(e);if(t&&"session"===t.contentDisposition){if(e instanceof i.IncomingRequestMessage)switch(this._signalingState){case o.SignalingState.Initial:case o.SignalingState.Stable:this._signalingState=o.SignalingState.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case o.SignalingState.HaveLocalOffer:this._signalingState=o.SignalingState.Stable,this._answer=t;break;case o.SignalingState.HaveRemoteOffer:case o.SignalingState.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof i.IncomingResponseMessage)switch(this._signalingState){case o.SignalingState.Initial:case o.SignalingState.Stable:this._signalingState=o.SignalingState.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case o.SignalingState.HaveLocalOffer:this._signalingState=o.SignalingState.Stable,this._answer=t;break;case o.SignalingState.HaveRemoteOffer:case o.SignalingState.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof i.OutgoingRequestMessage)switch(this._signalingState){case o.SignalingState.Initial:case o.SignalingState.Stable:this._signalingState=o.SignalingState.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case o.SignalingState.HaveLocalOffer:break;case o.SignalingState.HaveRemoteOffer:this._signalingState=o.SignalingState.Stable,this._answer=t;break;case o.SignalingState.Closed:break;default:throw new Error("Unexpected signaling state.")}if(i.isBody(e))switch(this._signalingState){case o.SignalingState.Initial:case o.SignalingState.Stable:this._signalingState=o.SignalingState.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case o.SignalingState.HaveLocalOffer:break;case o.SignalingState.HaveRemoteOffer:this._signalingState=o.SignalingState.Stable,this._answer=t;break;case o.SignalingState.Closed:break;default:throw new Error("Unexpected signaling state.")}}},t.prototype.start2xxRetransmissionTimer=function(){var e=this;if(this.initialTransaction instanceof s.InviteServerTransaction){var t=this.initialTransaction,r=a.Timers.T1,n=function(){e.ackWait?(e.logger.log("No ACK for 2xx response received, attempting retransmission"),t.retransmitAcceptedResponse(),r=Math.min(2*r,a.Timers.T2),e.invite2xxTimer=setTimeout(n,r)):e.invite2xxTimer=void 0};this.invite2xxTimer=setTimeout(n,r);var i=function(){t.state===s.TransactionState.Terminated&&(t.removeListener("stateChanged",i),e.invite2xxTimer&&(clearTimeout(e.invite2xxTimer),e.invite2xxTimer=void 0),e.ackWait&&(e.delegate&&e.delegate.onAckTimeout?e.delegate.onAckTimeout():e.bye()))};t.addListener("stateChanged",i)}},t.prototype.startReInvite2xxRetransmissionTimer=function(){var e=this;if(this.reinviteUserAgentServer&&this.reinviteUserAgentServer.transaction instanceof s.InviteServerTransaction){var t=this.reinviteUserAgentServer.transaction,r=a.Timers.T1,n=function(){e.reinviteUserAgentServer?(e.logger.log("No ACK for 2xx response received, attempting retransmission"),t.retransmitAcceptedResponse(),r=Math.min(2*r,a.Timers.T2),e.invite2xxTimer=setTimeout(n,r)):e.invite2xxTimer=void 0};this.invite2xxTimer=setTimeout(n,r);var i=function(){t.state===s.TransactionState.Terminated&&(t.removeListener("stateChanged",i),e.invite2xxTimer&&(clearTimeout(e.invite2xxTimer),e.invite2xxTimer=void 0),e.reinviteUserAgentServer)};t.addListener("stateChanged",i)}},t}(r(18).Dialog);t.SessionDialog=T},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"}(t.SessionState||(t.SessionState={})),function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"}(t.SignalingState||(t.SignalingState={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(t){return e.call(this,t||"Transaction state error.")||this}return n.__extends(t,e),t}(r(24).Exception);t.TransactionStateError=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(t){return e.call(this,t||"Unspecified transport error.")||this}return n.__extends(t,e),t}(r(24).Exception);t.TransportError=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(6),a=r(25),s=r(13),c=function(e){function t(t,r,n){return e.call(this,t,r,n,s.TransactionState.Proceeding,"sip.transaction.ist")||this}return n.__extends(t,e),t.prototype.dispose=function(){this.stopProgressExtensionTimer(),this.H&&(clearTimeout(this.H),this.H=void 0),this.I&&(clearTimeout(this.I),this.I=void 0),this.L&&(clearTimeout(this.L),this.L=void 0),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"kind",{get:function(){return"ist"},enumerable:!0,configurable:!0}),t.prototype.receiveRequest=function(e){var t=this;switch(this.state){case s.TransactionState.Proceeding:if(e.method===i.C.INVITE)return void(this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(function(e){t.logTransportError(e,"Failed to send retransmission of provisional response.")}));break;case s.TransactionState.Accepted:if(e.method===i.C.INVITE)return;break;case s.TransactionState.Completed:if(e.method===i.C.INVITE){if(!this.lastFinalResponse)throw new Error("Last final response undefined.");return void this.send(this.lastFinalResponse).catch(function(e){t.logTransportError(e,"Failed to send retransmission of final response.")})}if(e.method===i.C.ACK)return void this.stateTransition(s.TransactionState.Confirmed);break;case s.TransactionState.Confirmed:case s.TransactionState.Terminated:if(e.method===i.C.INVITE||e.method===i.C.ACK)return;break;default:throw new Error("Invalid state "+this.state)}var r="INVITE server transaction received unexpected "+e.method+" request while in state "+this.state+".";this.logger.warn(r)},t.prototype.receiveResponse=function(e,t){var r=this;if(e<100||e>699)throw new Error("Invalid status code "+e);switch(this.state){case s.TransactionState.Proceeding:if(e>=100&&e<=199)return this.lastProvisionalResponse=t,e>100&&this.startProgressExtensionTimer(),void this.send(t).catch(function(e){r.logTransportError(e,"Failed to send 1xx response.")});if(e>=200&&e<=299)return this.lastFinalResponse=t,this.stateTransition(s.TransactionState.Accepted),void this.send(t).catch(function(e){r.logTransportError(e,"Failed to send 2xx response.")});if(e>=300&&e<=699)return this.lastFinalResponse=t,this.stateTransition(s.TransactionState.Completed),void this.send(t).catch(function(e){r.logTransportError(e,"Failed to send non-2xx final response.")});break;case s.TransactionState.Accepted:if(e>=200&&e<=299)return void this.send(t).catch(function(e){r.logTransportError(e,"Failed to send 2xx response.")});break;case s.TransactionState.Completed:case s.TransactionState.Confirmed:case s.TransactionState.Terminated:break;default:throw new Error("Invalid state "+this.state)}var n="INVITE server transaction received unexpected "+e+" response from TU while in state "+this.state+".";throw this.logger.error(n),new Error(n)},t.prototype.retransmitAcceptedResponse=function(){var e=this;this.state===s.TransactionState.Accepted&&this.lastFinalResponse&&this.send(this.lastFinalResponse).catch(function(t){e.logTransportError(t,"Failed to send 2xx response.")})},t.prototype.onTransportError=function(e){this.user.onTransportError&&this.user.onTransportError(e)},t.prototype.typeToString=function(){return"INVITE server transaction"},t.prototype.stateTransition=function(e){var t=this,r=function(){throw new Error("Invalid state transition from "+t.state+" to "+e)};switch(e){case s.TransactionState.Proceeding:r();break;case s.TransactionState.Accepted:case s.TransactionState.Completed:this.state!==s.TransactionState.Proceeding&&r();break;case s.TransactionState.Confirmed:this.state!==s.TransactionState.Completed&&r();break;case s.TransactionState.Terminated:this.state!==s.TransactionState.Accepted&&this.state!==s.TransactionState.Completed&&this.state!==s.TransactionState.Confirmed&&r();break;default:r()}this.stopProgressExtensionTimer(),e===s.TransactionState.Accepted&&(this.L=setTimeout(function(){return t.timer_L()},o.Timers.TIMER_L)),e===s.TransactionState.Completed&&(this.H=setTimeout(function(){return t.timer_H()},o.Timers.TIMER_H)),e===s.TransactionState.Confirmed&&(this.I=setTimeout(function(){return t.timer_I()},o.Timers.TIMER_I)),e===s.TransactionState.Terminated&&this.dispose(),this.setState(e)},t.prototype.startProgressExtensionTimer=function(){var e=this;void 0===this.progressExtensionTimer&&(this.progressExtensionTimer=setInterval(function(){if(e.logger.debug("Progress extension timer expired for INVITE server transaction "+e.id+"."),!e.lastProvisionalResponse)throw new Error("Last provisional response undefined.");e.send(e.lastProvisionalResponse).catch(function(t){e.logTransportError(t,"Failed to send retransmission of provisional response.")})},o.Timers.PROVISIONAL_RESPONSE_INTERVAL))},t.prototype.stopProgressExtensionTimer=function(){void 0!==this.progressExtensionTimer&&(clearInterval(this.progressExtensionTimer),this.progressExtensionTimer=void 0)},t.prototype.timer_G=function(){},t.prototype.timer_H=function(){this.logger.debug("Timer H expired for INVITE server transaction "+this.id+"."),this.state===s.TransactionState.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(s.TransactionState.Terminated))},t.prototype.timer_I=function(){this.logger.debug("Timer I expired for INVITE server transaction "+this.id+"."),this.stateTransition(s.TransactionState.Terminated)},t.prototype.timer_L=function(){this.logger.debug("Timer L expired for INVITE server transaction "+this.id+"."),this.state===s.TransactionState.Accepted&&this.stateTransition(s.TransactionState.Terminated)},t}(a.ServerTransaction);t.InviteServerTransaction=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(6),o=r(22),a=r(13),s=function(e){function t(t,r,n){var o=e.call(this,t,r,n,a.TransactionState.Trying,"sip.transaction.nict")||this;return o.F=setTimeout(function(){return o.timer_F()},i.Timers.TIMER_F),o.send(t.toString()).catch(function(e){o.logTransportError(e,"Failed to send initial outgoing request.")}),o}return n.__extends(t,e),t.prototype.dispose=function(){this.F&&(clearTimeout(this.F),this.F=void 0),this.K&&(clearTimeout(this.K),this.K=void 0),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"kind",{get:function(){return"nict"},enumerable:!0,configurable:!0}),t.prototype.receiveResponse=function(e){var t=e.statusCode;if(!t||t<100||t>699)throw new Error("Invalid status code "+t);switch(this.state){case a.TransactionState.Trying:if(t>=100&&t<=199)return this.stateTransition(a.TransactionState.Proceeding),void(this.user.receiveResponse&&this.user.receiveResponse(e));if(t>=200&&t<=699)return this.stateTransition(a.TransactionState.Completed),408===t?void this.onRequestTimeout():void(this.user.receiveResponse&&this.user.receiveResponse(e));break;case a.TransactionState.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699)return this.stateTransition(a.TransactionState.Completed),408===t?void this.onRequestTimeout():void(this.user.receiveResponse&&this.user.receiveResponse(e));case a.TransactionState.Completed:case a.TransactionState.Terminated:return;default:throw new Error("Invalid state "+this.state)}var r="Non-INVITE client transaction received unexpected "+t+" response while in state "+this.state+".";this.logger.warn(r)},t.prototype.onTransportError=function(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(a.TransactionState.Terminated,!0)},t.prototype.typeToString=function(){return"non-INVITE client transaction"},t.prototype.stateTransition=function(e,t){var r=this;void 0===t&&(t=!1);var n=function(){throw new Error("Invalid state transition from "+r.state+" to "+e)};switch(e){case a.TransactionState.Trying:n();break;case a.TransactionState.Proceeding:this.state!==a.TransactionState.Trying&&n();break;case a.TransactionState.Completed:this.state!==a.TransactionState.Trying&&this.state!==a.TransactionState.Proceeding&&n();break;case a.TransactionState.Terminated:this.state!==a.TransactionState.Trying&&this.state!==a.TransactionState.Proceeding&&this.state!==a.TransactionState.Completed&&(t||n());break;default:n()}e===a.TransactionState.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(function(){return r.timer_K()},i.Timers.TIMER_K)),e===a.TransactionState.Terminated&&this.dispose(),this.setState(e)},t.prototype.timer_F=function(){this.logger.debug("Timer F expired for non-INVITE client transaction "+this.id+"."),this.state!==a.TransactionState.Trying&&this.state!==a.TransactionState.Proceeding||(this.onRequestTimeout(),this.stateTransition(a.TransactionState.Terminated))},t.prototype.timer_K=function(){this.state===a.TransactionState.Completed&&this.stateTransition(a.TransactionState.Terminated)},t}(o.ClientTransaction);t.NonInviteClientTransaction=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(6),o=r(25),a=r(13),s=function(e){function t(t,r,n){return e.call(this,t,r,n,a.TransactionState.Trying,"sip.transaction.nist")||this}return n.__extends(t,e),t.prototype.dispose=function(){this.J&&(clearTimeout(this.J),this.J=void 0),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"kind",{get:function(){return"nist"},enumerable:!0,configurable:!0}),t.prototype.receiveRequest=function(e){var t=this;switch(this.state){case a.TransactionState.Trying:break;case a.TransactionState.Proceeding:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(function(e){t.logTransportError(e,"Failed to send retransmission of provisional response.")});break;case a.TransactionState.Completed:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(function(e){t.logTransportError(e,"Failed to send retransmission of final response.")});break;case a.TransactionState.Terminated:break;default:throw new Error("Invalid state "+this.state)}},t.prototype.receiveResponse=function(e,t){var r=this;if(e<100||e>699)throw new Error("Invalid status code "+e);if(e>100&&e<=199)throw new Error("Provisional response other than 100 not allowed.");switch(this.state){case a.TransactionState.Trying:if(this.lastResponse=t,e>=100&&e<200)return this.stateTransition(a.TransactionState.Proceeding),void this.send(t).catch(function(e){r.logTransportError(e,"Failed to send provisional response.")});if(e>=200&&e<=699)return this.stateTransition(a.TransactionState.Completed),void this.send(t).catch(function(e){r.logTransportError(e,"Failed to send final response.")});break;case a.TransactionState.Proceeding:if(this.lastResponse=t,e>=200&&e<=699)return this.stateTransition(a.TransactionState.Completed),void this.send(t).catch(function(e){r.logTransportError(e,"Failed to send final response.")});break;case a.TransactionState.Completed:return;case a.TransactionState.Terminated:break;default:throw new Error("Invalid state "+this.state)}var n="Non-INVITE server transaction received unexpected "+e+" response from TU while in state "+this.state+".";throw this.logger.error(n),new Error(n)},t.prototype.onTransportError=function(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(a.TransactionState.Terminated,!0)},t.prototype.typeToString=function(){return"non-INVITE server transaction"},t.prototype.stateTransition=function(e,t){var r=this;void 0===t&&(t=!1);var n=function(){throw new Error("Invalid state transition from "+r.state+" to "+e)};switch(e){case a.TransactionState.Trying:n();break;case a.TransactionState.Proceeding:this.state!==a.TransactionState.Trying&&n();break;case a.TransactionState.Completed:this.state!==a.TransactionState.Trying&&this.state!==a.TransactionState.Proceeding&&n();break;case a.TransactionState.Terminated:this.state!==a.TransactionState.Proceeding&&this.state!==a.TransactionState.Completed&&(t||n());break;default:n()}e===a.TransactionState.Completed&&(this.J=setTimeout(function(){return r.timer_J()},i.Timers.TIMER_J)),e===a.TransactionState.Terminated&&this.dispose(),this.setState(e)},t.prototype.timer_J=function(){this.logger.debug("Timer J expired for NON-INVITE server transaction "+this.id+"."),this.state===a.TransactionState.Completed&&this.stateTransition(a.TransactionState.Terminated)},t}(o.ServerTransaction);t.NonInviteServerTransaction=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"}(t.SubscriptionState||(t.SubscriptionState={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(28),t),n.__exportStar(r(72),t),n.__exportStar(r(49),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(28),i=r(49),o=function(){function e(){this.builtinEnabled=!0,this._level=n.Levels.log,this.loggers={},this.logger=this.getLogger("sip:loggerfactory")}return Object.defineProperty(e.prototype,"level",{get:function(){return this._level},set:function(e){e>=0&&e<=3?this._level=e:e>3?this._level=3:n.Levels.hasOwnProperty(e)?this._level=e:this.logger.error("invalid 'level' parameter value: "+JSON.stringify(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connector",{get:function(){return this._connector},set:function(e){e?"function"==typeof e?this._connector=e:this.logger.error("invalid 'connector' parameter value: "+JSON.stringify(e)):this._connector=void 0},enumerable:!0,configurable:!0}),e.prototype.getLogger=function(e,t){if(t&&3===this.level)return new i.Logger(this,e,t);if(this.loggers[e])return this.loggers[e];var r=new i.Logger(this,e);return this.loggers[e]=r,r},e.prototype.genericLog=function(e,t,r,i){this.level>=e&&this.builtinEnabled&&this.print(e,t,r,i),this.connector&&this.connector(n.Levels[e],t,r,i)},e.prototype.print=function(e,t,r,i){if("string"==typeof i){var o=[new Date,t];r&&o.push(r),i=o.concat(i).join(" | ")}switch(e){case n.Levels.error:console.error(i);break;case n.Levels.warn:console.warn(i);break;case n.Levels.log:console.log(i);break;case n.Levels.debug:console.debug(i)}},e}();t.LoggerFactory=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(74),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(2),o=r(1),a=r(50),s=r(14),c=["application/sdp","application/dtmf-relay"],u=function(){function e(e,t){void 0===t&&(t={}),this.userAgentClients=new Map,this.userAgentServers=new Map,this.configuration=e,this.delegate=t,this.dialogs=new Map,this.subscribers=new Map,this.logger=e.loggerFactory.getLogger("sip.user-agent-core")}return e.prototype.dispose=function(){this.reset()},e.prototype.reset=function(){this.dialogs.forEach(function(e){return e.dispose()}),this.dialogs.clear(),this.subscribers.forEach(function(e){return e.dispose()}),this.subscribers.clear(),this.userAgentClients.forEach(function(e){return e.dispose()}),this.userAgentClients.clear(),this.userAgentServers.forEach(function(e){return e.dispose()}),this.userAgentServers.clear()},Object.defineProperty(e.prototype,"loggerFactory",{get:function(){return this.configuration.loggerFactory},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transport",{get:function(){var e=this.configuration.transportAccessor();if(!e)throw new Error("Transport undefined.");return e},enumerable:!0,configurable:!0}),e.prototype.invite=function(e,t){return new a.InviteUserAgentClient(this,e,t)},e.prototype.message=function(e,t){return new a.MessageUserAgentClient(this,e,t)},e.prototype.publish=function(e,t){return new a.PublishUserAgentClient(this,e,t)},e.prototype.register=function(e,t){return new a.RegisterUserAgentClient(this,e,t)},e.prototype.subscribe=function(e,t){return new a.SubscribeUserAgentClient(this,e,t)},e.prototype.request=function(e,t){return new a.UserAgentClient(o.NonInviteClientTransaction,this,e,t)},e.prototype.makeOutgoingRequestMessage=function(e,t,r,o,a,s,c){var u=this.configuration.sipjsId,d=this.configuration.displayName,l=this.configuration.viaForceRport,h=this.configuration.hackViaTcp,p=this.configuration.hackViaWS,f=this.configuration.supportedOptionTags.slice();e===i.C.REGISTER&&f.push("path","gruu"),e===i.C.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&f.push("gruu");var g={callIdPrefix:u,forceRport:l,fromDisplayName:d,hackViaTcp:h,hackViaWS:p,optionTags:f,routeSet:this.configuration.routeSet,userAgentString:this.configuration.userAgentHeaderFieldValue,viaHost:this.configuration.viaHost},v=n.__assign({},g,a);return new i.OutgoingRequestMessage(e,t,r,o,v,s,c)},e.prototype.receiveIncomingRequestFromTransport=function(e){this.receiveRequestFromTransport(e)},e.prototype.receiveIncomingResponseFromTransport=function(e){this.receiveResponseFromTransport(e)},e.prototype.replyStateless=function(e,t){var r=this.configuration.userAgentHeaderFieldValue,o=this.configuration.supportedOptionTagsResponse;t=n.__assign({},t,{userAgent:r,supported:o});var a=i.constructOutgoingResponse(e,t);return this.transport.send(a.message),a},e.prototype.receiveRequestFromTransport=function(e){var t=e.viaBranch,r=this.userAgentServers.get(t);e.method===i.C.ACK&&r&&r.transaction.state===o.TransactionState.Accepted&&r instanceof a.InviteUserAgentServer?this.logger.warn("Discarding out of dialog ACK after 2xx response sent on transaction "+t+"."):e.method!==i.C.CANCEL?r?r.transaction.receiveRequest(e):this.receiveRequest(e):r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof o.InviteServerTransaction&&r.transaction.state===o.TransactionState.Proceeding&&r instanceof a.InviteUserAgentServer&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481})},e.prototype.receiveRequest=function(e){if(s.AllowedMethods.includes(e.method)){if(!e.ruri)throw new Error("Request-URI undefined.");if("sip"===e.ruri.scheme){var t=e.ruri,r=function(e){return!!e&&e.user===t.user};if(!r(this.configuration.aor)&&!(r(this.configuration.contact.uri)||r(this.configuration.contact.pubGruu)||r(this.configuration.contact.tempGruu)))return this.logger.warn("Request-URI does not point to us."),void(e.method!==i.C.ACK&&this.replyStateless(e,{statusCode:404}));if(e.method!==i.C.INVITE||e.hasHeader("Contact")){if(!e.toTag){var n=e.viaBranch;if(!this.userAgentServers.has(n))if(Array.from(this.userAgentServers.values()).some(function(t){return t.transaction.request.fromTag===e.fromTag&&t.transaction.request.callId===e.callId&&t.transaction.request.cseq===e.cseq}))return void this.replyStateless(e,{statusCode:482})}e.toTag?this.receiveInsideDialogRequest(e):this.receiveOutsideDialogRequest(e)}else this.replyStateless(e,{statusCode:400,reasonPhrase:"Missing Contact Header"})}else this.replyStateless(e,{statusCode:416})}else{var o="Allow: "+s.AllowedMethods.toString();this.replyStateless(e,{statusCode:405,extraHeaders:[o]})}},e.prototype.receiveInsideDialogRequest=function(e){if(e.method===i.C.NOTIFY){var t=e.parseHeader("Event");if(!t||!t.event)return void this.replyStateless(e,{statusCode:489});var r=e.callId+e.toTag+t.event,n=this.subscribers.get(r);if(n){var o=new a.NotifyUserAgentServer(this,e);return void n.onNotify(o)}}var u=e.callId+e.toTag+e.fromTag,d=this.dialogs.get(u);if(d){if(e.method===i.C.OPTIONS){var l="Allow: "+s.AllowedMethods.toString(),h="Accept: "+c.toString();return void this.replyStateless(e,{statusCode:200,extraHeaders:[l,h]})}d.receiveRequest(e)}else e.method!==i.C.ACK&&this.replyStateless(e,{statusCode:481})},e.prototype.receiveOutsideDialogRequest=function(e){switch(e.method){case i.C.ACK:break;case i.C.BYE:this.replyStateless(e,{statusCode:481});break;case i.C.CANCEL:throw new Error("Unexpected out of dialog request method "+e.method+".");case i.C.INFO:this.replyStateless(e,{statusCode:405});break;case i.C.INVITE:var t=new a.InviteUserAgentServer(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject();break;case i.C.MESSAGE:t=new a.MessageUserAgentServer(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept();break;case i.C.NOTIFY:t=new a.NotifyUserAgentServer(this,e);this.delegate.onNotify?this.delegate.onNotify(t):this.replyStateless(e,{statusCode:405});break;case i.C.OPTIONS:var r="Allow: "+s.AllowedMethods.toString(),n="Accept: "+c.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[r,n]});break;case i.C.REFER:t=new a.ReferUserAgentServer(this,e);this.delegate.onRefer?this.delegate.onRefer(t):this.replyStateless(e,{statusCode:405});break;case i.C.SUBSCRIBE:t=new a.SubscribeUserAgentServer(this,e);this.delegate.onSubscribe?this.delegate.onSubscribe(t):t.reject();break;default:throw new Error("Unexpected out of dialog request method "+e.method+".")}},e.prototype.receiveResponseFromTransport=function(e){if(e.getHeaders("via").length>1)this.logger.warn("More than one Via header field present in the response, dropping");else{var t=e.viaBranch+e.method,r=this.userAgentClients.get(t);r?r.transaction.receiveResponse(e):this.logger.warn("Discarding unmatched "+e.statusCode+" response to "+e.method+" "+t+".")}},e}();t.UserAgentCore=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){return e.call(this,i.NonInviteClientTransaction,t,r,n)||this}return n.__extends(t,e),t}(r(3).UserAgentClient);t.CancelUserAgentClient=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(17),o=r(15),a=r(1),s=function(e){function t(t,r,n){var i=e.call(this,a.InviteClientTransaction,t,r,n)||this;return i.confirmedDialogAcks=new Map,i.confirmedDialogs=new Map,i.earlyDialogs=new Map,i.delegate=n,i}return n.__extends(t,e),t.prototype.dispose=function(){this.earlyDialogs.forEach(function(e){return e.dispose()}),this.earlyDialogs.clear(),e.prototype.dispose.call(this)},t.prototype.receiveResponse=function(e){var t=this;if(this.authenticationGuard(e)){var r=e.statusCode?e.statusCode.toString():"";if(!r)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(r):return void(this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e}));case/^1[0-9]{2}$/.test(r):if(!e.toTag)return void this.logger.warn("Non-100 1xx INVITE response received without a to tag, dropping.");var n=i.Dialog.initialDialogStateForUserAgentClient(this.message,e),s=this.earlyDialogs.get(n.id);if(!s){if(!((d=this.transaction)instanceof a.InviteClientTransaction))throw new Error("Transaction not instance of InviteClientTransaction.");s=new i.SessionDialog(d,this.core,n),this.earlyDialogs.set(s.id,s)}if(!s.reliableSequenceGuard(e))return void this.logger.warn("1xx INVITE reliable response received out of order, dropping.");s.signalingState!==o.SignalingState.Initial&&s.signalingState!==o.SignalingState.HaveLocalOffer||s.signalingStateTransition(e);var c=s;return void(this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:c,prack:function(e){return c.prack(void 0,e)}}));case/^2[0-9]{2}$/.test(r):n=i.Dialog.initialDialogStateForUserAgentClient(this.message,e);var u=this.confirmedDialogs.get(n.id);if(u){if(h=this.confirmedDialogAcks.get(n.id)){if(!((d=this.transaction)instanceof a.InviteClientTransaction))throw new Error("Client transaction not instance of InviteClientTransaction.");d.ackResponse(h.message)}return}if(u=this.earlyDialogs.get(n.id))u.confirm(),u.recomputeRouteSet(e),this.earlyDialogs.delete(u.id),this.confirmedDialogs.set(u.id,u);else{var d;if(!((d=this.transaction)instanceof a.InviteClientTransaction))throw new Error("Transaction not instance of InviteClientTransaction.");u=new i.SessionDialog(d,this.core,n),this.confirmedDialogs.set(u.id,u)}u.signalingState!==o.SignalingState.Initial&&u.signalingState!==o.SignalingState.HaveLocalOffer||u.signalingStateTransition(e);var l=u;if(this.delegate&&this.delegate.onAccept)this.delegate.onAccept({message:e,session:l,ack:function(e){var r=l.ack(e);return t.confirmedDialogAcks.set(l.id,r),r}});else{var h=l.ack();this.confirmedDialogAcks.set(l.id,h)}return;case/^3[0-9]{2}$/.test(r):return this.earlyDialogs.forEach(function(e){return e.dispose()}),this.earlyDialogs.clear(),void(this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e}));case/^[4-6][0-9]{2}$/.test(r):return this.earlyDialogs.forEach(function(e){return e.dispose()}),this.earlyDialogs.clear(),void(this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e}));default:throw new Error("Invalid status code "+r)}throw new Error("Executing what should be an unreachable code path receiving "+r+" response.")}},t}(r(3).UserAgentClient);t.InviteUserAgentClient=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(17),o=r(16),a=r(15),s=r(1),c=r(14),u=function(e){function t(t,r,n){var i=e.call(this,s.InviteServerTransaction,t,r,n)||this;return i.core=t,i}return n.__extends(t,e),t.prototype.dispose=function(){this.earlyDialog&&this.earlyDialog.dispose(),e.prototype.dispose.call(this)},t.prototype.accept=function(t){if(void 0===t&&(t={statusCode:200}),!this.acceptable)throw new o.TransactionStateError(this.message.method+" not acceptable in state "+this.transaction.state+".");if(!this.confirmedDialog)if(this.earlyDialog)this.earlyDialog.confirm(),this.confirmedDialog=this.earlyDialog,this.earlyDialog=void 0;else{var r=this.transaction;if(!(r instanceof s.InviteServerTransaction))throw new Error("Transaction not instance of InviteClientTransaction.");var u=i.Dialog.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new i.SessionDialog(r,this.core,u)}var d=this.message.getHeaders("record-route").map(function(e){return"Record-Route: "+e}),l="Contact: "+this.core.configuration.contact.toString(),h="Allow: "+c.AllowedMethods.toString();if(!t.body)if(this.confirmedDialog.signalingState===a.SignalingState.Stable)t.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===a.SignalingState.Initial||this.confirmedDialog.signalingState===a.SignalingState.HaveRemoteOffer)throw new Error("Response must have a body.");t.statusCode=t.statusCode||200,t.extraHeaders=t.extraHeaders||[],t.extraHeaders=t.extraHeaders.concat(d),t.extraHeaders.push(h),t.extraHeaders.push(l);var p=e.prototype.accept.call(this,t),f=this.confirmedDialog,g=n.__assign({},p,{session:f});return t.body&&this.confirmedDialog.signalingState!==a.SignalingState.Stable&&this.confirmedDialog.signalingStateTransition(t.body),g},t.prototype.progress=function(t){if(void 0===t&&(t={statusCode:180}),!this.progressable)throw new o.TransactionStateError(this.message.method+" not progressable in state "+this.transaction.state+".");if(!this.earlyDialog){var r=this.transaction;if(!(r instanceof s.InviteServerTransaction))throw new Error("Transaction not instance of InviteClientTransaction.");var c=i.Dialog.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new i.SessionDialog(r,this.core,c)}var u=this.message.getHeaders("record-route").map(function(e){return"Record-Route: "+e}),d="Contact: "+this.core.configuration.contact;t.extraHeaders=t.extraHeaders||[],t.extraHeaders=t.extraHeaders.concat(u),t.extraHeaders.push(d);var l=e.prototype.progress.call(this,t),h=this.earlyDialog,p=n.__assign({},l,{session:h});return t.body&&this.earlyDialog.signalingState!==a.SignalingState.Stable&&this.earlyDialog.signalingStateTransition(t.body),p},t.prototype.redirect=function(t,r){return void 0===r&&(r={statusCode:302}),e.prototype.redirect.call(this,t,r)},t.prototype.reject=function(t){return void 0===t&&(t={statusCode:486}),e.prototype.reject.call(this,t)},t}(r(4).UserAgentServer);t.InviteUserAgentServer=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){return e.call(this,i.NonInviteClientTransaction,t,r,n)||this}return n.__extends(t,e),t}(r(3).UserAgentClient);t.MessageUserAgentClient=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){var o=e.call(this,i.NonInviteServerTransaction,t,r,n)||this;return o.core=t,o}return n.__extends(t,e),t}(r(4).UserAgentServer);t.MessageUserAgentServer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){return e.call(this,i.NonInviteClientTransaction,t,r,n)||this}return n.__extends(t,e),t}(r(3).UserAgentClient);t.PublishUserAgentClient=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){return e.call(this,i.NonInviteServerTransaction,t.userAgentCore,r,n)||this}return n.__extends(t,e),t}(r(4).UserAgentServer);t.ReSubscribeUserAgentServer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){return e.call(this,i.NonInviteClientTransaction,t,r,n)||this}return n.__extends(t,e),t}(r(3).UserAgentClient);t.RegisterUserAgentClient=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(47),o=r(27),a=r(6),s=r(1),c=function(e){function t(t,r,n){var i=this,a=r.getHeader("Event");if(!a)throw new Error("Event undefined");var c=r.getHeader("Expires");if(!c)throw new Error("Expires undefined");return(i=e.call(this,s.NonInviteClientTransaction,t,r,n)||this).delegate=n,i.subscriberId=r.callId+r.fromTag+a,i.subscriptionExpiresRequested=i.subscriptionExpires=Number(c),i.subscriptionEvent=a,i.subscriptionState=o.SubscriptionState.NotifyWait,i.waitNotifyStart(),i}return n.__extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onNotify=function(e){var t=e.message.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent)return this.logger.warn("Failed to parse event."),void e.reject({statusCode:489});var r=e.message.parseHeader("Subscription-State");if(!r||!r.state)return this.logger.warn("Failed to parse subscription state."),void e.reject({statusCode:489});var n=r.state;switch(n){case"pending":case"active":case"terminated":break;default:return this.logger.warn("Invalid subscription state "+n),void e.reject({statusCode:489})}if("terminated"!==n&&!e.message.parseHeader("contact"))return this.logger.warn("Failed to parse contact."),void e.reject({statusCode:489});if(this.dialog)throw new Error("Dialog already created. This implementation only supports install of single subscriptions.");switch(this.waitNotifyStop(),this.subscriptionExpires=r.expires?Math.min(this.subscriptionExpires,Math.max(r.expires,0)):this.subscriptionExpires,n){case"pending":this.subscriptionState=o.SubscriptionState.Pending;break;case"active":this.subscriptionState=o.SubscriptionState.Active;break;case"terminated":this.subscriptionState=o.SubscriptionState.Terminated;break;default:throw new Error("Unrecognized state "+n+".")}if(this.subscriptionState!==o.SubscriptionState.Terminated){var a=i.SubscriptionDialog.initialDialogStateForSubscription(this.message,e.message);this.dialog=new i.SubscriptionDialog(this.subscriptionEvent,this.subscriptionExpires,this.subscriptionState,this.core,a)}if(this.delegate&&this.delegate.onNotify){var s=e,c=this.dialog;this.delegate.onNotify({request:s,subscription:c})}else e.accept()},t.prototype.waitNotifyStart=function(){var e=this;this.N||(this.core.subscribers.set(this.subscriberId,this),this.N=setTimeout(function(){return e.timer_N()},a.Timers.TIMER_N))},t.prototype.waitNotifyStop=function(){this.N&&(this.core.subscribers.delete(this.subscriberId),clearTimeout(this.N),this.N=void 0)},t.prototype.receiveResponse=function(t){if(this.authenticationGuard(t)){if(t.statusCode&&t.statusCode>=200&&t.statusCode<300){var r=t.getHeader("Expires");if(r){var n=Number(r);n>this.subscriptionExpiresRequested&&this.logger.warn("Expires header in a 200-class response to SUBSCRIBE with a higher value than the one in the request"),n<this.subscriptionExpires&&(this.subscriptionExpires=n)}else this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");this.dialog&&this.dialog.subscriptionExpires>this.subscriptionExpires&&(this.dialog.subscriptionExpires=this.subscriptionExpires)}t.statusCode&&t.statusCode>=300&&t.statusCode<700&&this.waitNotifyStop(),e.prototype.receiveResponse.call(this,t)}},t.prototype.timer_N=function(){this.logger.warn("Timer N expired for SUBSCRIBE user agent client. Timed out waiting for NOTIFY."),this.waitNotifyStop(),this.delegate&&this.delegate.onNotifyTimeout&&this.delegate.onNotifyTimeout()},t}(r(3).UserAgentClient);t.SubscribeUserAgentClient=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=function(e){function t(t,r,n){var o=e.call(this,i.NonInviteServerTransaction,t,r,n)||this;return o.core=t,o}return n.__extends(t,e),t}(r(4).UserAgentServer);t.SubscribeUserAgentServer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=function(e){function t(t,r){var n=e.call(this)||this;return n.logger=t,n}return n.__extends(t,e),t.prototype.connect=function(e){var t=this;return void 0===e&&(e={}),this.connectPromise(e).then(function(e){e.overrideEvent||t.emit("connected")})},t.prototype.send=function(e,t){var r=this;return void 0===t&&(t={}),this.sendPromise(e).then(function(e){e.overrideEvent||r.emit("messageSent",e.msg)})},t.prototype.disconnect=function(e){var t=this;return void 0===e&&(e={}),this.disconnectPromise(e).then(function(e){e.overrideEvent||t.emit("disconnected")})},t.prototype.afterConnected=function(e){this.isConnected()?e():this.once("connected",e)},t.prototype.waitForConnected=function(){var e=this;return console.warn("DEPRECATION WARNING Transport.waitForConnected(): use afterConnected() instead"),new Promise(function(t){e.afterConnected(t)})},t}(r(7).EventEmitter);t.Transport=i}])});