(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+leM":function(e,t,n){"use strict";t.__esModule=!0;var r=n("M42G"),i=n("iZBl"),o=n("keth"),s=n("8HiN"),a=n("p571"),u=n("7W0T"),l=n("OCCK"),c=n("dvth"),d=n("kaSr"),p=n("8v+A"),h=n("kPIN");h.isIonicIos=("iPhone"===h.product||"iPad"===h.product)&&-1===h.ua.indexOf("Safari"),h.isIonicAndroid="Android"===h.os.family&&"Android Browser"==h.name;var f=n("5h3M");t.OpenVidu=function(){function e(){var e=this;this.publishers=[],this.secret="",this.recorder=!1,this.advancedConfiguration={},this.webrtcStatsInterval=0,this.ee=new d,this.libraryVersion=f.version,console.info("'OpenVidu' initialized"),console.info("openvidu-browser version: "+this.libraryVersion),"iOS"!==h.os.family&&"Android"!==h.os.family||window.addEventListener("orientationchange",function(){e.publishers.forEach(function(t){if(t.stream.isLocalStreamPublished&&t.stream&&t.stream.hasVideo&&t.stream.streamManager.videos[0])var n=0,r=t.stream.videoDimensions.width,i=t.stream.videoDimensions.height,o=setInterval(function(){new Promise(function(e,n){if(h.isIonicIos)e({newWidth:t.stream.streamManager.videos[0].video.videoWidth,newHeight:t.stream.streamManager.videos[0].video.videoHeight});else{var r=t.stream.getMediaStream().getVideoTracks()[0].getSettings();e({newWidth:-1!==h.name.toLowerCase().indexOf("firefox")?r.width:t.videoReference.videoWidth,newHeight:-1!==h.name.toLowerCase().indexOf("firefox")?r.height:t.videoReference.videoHeight})}}).then(function(e){a(r,i,e.newWidth,e.newHeight)})},75),a=function(r,i,a,u){++n>10&&clearTimeout(o),a===r&&u===i||(t.stream.videoDimensions={width:a||0,height:u||0},e.sendRequest("streamPropertyChanged",{streamId:t.stream.streamId,property:"videoDimensions",newValue:JSON.stringify(t.stream.videoDimensions),reason:"deviceRotated"},function(n,o){n?console.error("Error sending 'streamPropertyChanged' event",n):(e.session.emitEvent("streamPropertyChanged",[new s.StreamPropertyChangedEvent(e.session,t.stream,"videoDimensions",t.stream.videoDimensions,{width:r,height:i},"deviceRotated")]),t.emitEvent("streamPropertyChanged",[new s.StreamPropertyChangedEvent(t,t.stream,"videoDimensions",t.stream.videoDimensions,{width:r,height:i},"deviceRotated")]))}),clearTimeout(o))}})})}return e.prototype.initSession=function(){return this.session=new o.Session(this),this.session},e.prototype.initPublisher=function(e,t,n){var r;r=t&&"function"!=typeof t?{audioSource:void 0!==(r=t).audioSource?r.audioSource:void 0,frameRate:"undefined"!=typeof MediaStreamTrack&&r.videoSource instanceof MediaStreamTrack?void 0:void 0!==r.frameRate?r.frameRate:void 0,insertMode:void 0!==r.insertMode?"string"==typeof r.insertMode?u.VideoInsertMode[r.insertMode]:r.insertMode:u.VideoInsertMode.APPEND,mirror:void 0===r.mirror||r.mirror,publishAudio:void 0===r.publishAudio||r.publishAudio,publishVideo:void 0===r.publishVideo||r.publishVideo,resolution:"undefined"!=typeof MediaStreamTrack&&r.videoSource instanceof MediaStreamTrack?void 0:void 0!==r.resolution?r.resolution:"640x480",videoSource:void 0!==r.videoSource?r.videoSource:void 0,filter:r.filter}:{insertMode:u.VideoInsertMode.APPEND,mirror:!0,publishAudio:!0,publishVideo:!0,resolution:"640x480"};var o,s=new i.Publisher(e,r,this);return t&&"function"==typeof t?o=t:n&&(o=n),s.initialize().then(function(){void 0!==o&&o(void 0),s.emitEvent("accessAllowed",[])}).catch(function(e){void 0!==o&&o(e),s.emitEvent("accessDenied",[e])}),this.publishers.push(s),s},e.prototype.initPublisherAsync=function(e,t){var n=this;return new Promise(function(r,i){var o,s=function(e){e?i(e):r(o)};o=t?n.initPublisher(e,t,s):n.initPublisher(e,s)})},e.prototype.initLocalRecorder=function(e){return new r.LocalRecorder(e)},e.prototype.checkSystemRequirements=function(){var e=h.name,t=h.ua?h.ua:navigator.userAgent;return"iOS"!==h.os.family||"Safari"===e&&-1===t.indexOf("CriOS")&&-1===t.indexOf("FxiOS")?"Safari"!==e&&"Chrome"!==e&&"Chrome Mobile"!==e&&"Firefox"!==e&&"Firefox Mobile"!==e&&"Opera"!==e&&"Opera Mobile"!==e&&"Android Browser"!==e&&"Electron"!==e?0:1:0},e.prototype.checkScreenSharingCapabilities=function(){var e=h.name,t=h.os.family;return"iOS"===t||"Android"===t?0:"Chrome"!==e&&"Firefox"!==e&&"Opera"!==e&&"Electron"!==e?0:1},e.prototype.getDevices=function(){return new Promise(function(e,t){navigator.mediaDevices.enumerateDevices().then(function(t){var n=[];h.isIonicAndroid&&cordova.plugins&&cordova.plugins.EnumerateDevicesPlugin?cordova.plugins.EnumerateDevicesPlugin.getEnumerateDevices().then(function(r){var i=[],o=[],s=[];i=r.filter(function(e){return"audioinput"===e.kind}),o=t.filter(function(e){return"videoinput"===e.kind}),s=t.filter(function(e){return"audioinput"===e.kind}),o.forEach(function(e,t){n.push(e.label?{kind:e.kind,deviceId:e.deviceId,label:e.label}:{kind:e.kind,deviceId:e.deviceId,label:0===t?"Front Camera":1===t?"Back Camera":"Unknown Camera"})}),s.forEach(function(e,t){if(e.label)n.push({kind:e.kind,deviceId:e.deviceId,label:e.label});else{var r="";switch(t){case 0:r="Default";break;case 1:var o=i.filter(function(e){return e.label.includes("Built")})[0];r=o?o.label:"Built-in Microphone";break;case 2:var s=i.filter(function(e){return e.label.includes("Wired")})[0];r=s?s.label:"Headset earpiece";break;case 3:var a=i.filter(function(e){return e.label.includes("Bluetooth")})[0];r=a?a.label:"Wireless";break;default:r="Unknown Microphone"}n.push({kind:e.kind,deviceId:e.deviceId,label:r})}}),e(n)}):(t.forEach(function(e){"audioinput"!==e.kind&&"videoinput"!==e.kind||n.push({kind:e.kind,deviceId:e.deviceId,label:e.label})}),e(n))}).catch(function(e){console.error("Error getting devices",e),t(e)})})},e.prototype.getUserMedia=function(e){var t=this;return new Promise(function(n,r){t.generateMediaConstraints(e).then(function(t){navigator.mediaDevices.getUserMedia(t).then(function(e){n(e)}).catch(function(t){var n=t.toString();r(new a.OpenViduError("screen"!==e.videoSource?a.OpenViduErrorName.DEVICE_ACCESS_DENIED:a.OpenViduErrorName.SCREEN_CAPTURE_DENIED,n))})}).catch(function(e){r(e)})})},e.prototype.enableProdMode=function(){console.log=function(){},console.debug=function(){},console.info=function(){},console.warn=function(){}},e.prototype.setAdvancedConfiguration=function(e){this.advancedConfiguration=e},e.prototype.generateMediaConstraints=function(e){var t=this;return new Promise(function(n,r){var i={audio:null!==e.audioSource&&!1!==e.audioSource&&(void 0===e.audioSource||e.audioSource),video:null!==e.videoSource&&!1!==e.videoSource&&{height:{ideal:480},width:{ideal:640}}};if("string"==typeof i.audio&&(i.audio={deviceId:{exact:i.audio}}),i.video){if(e.resolution){var o=e.resolution.toLowerCase().split("x"),s=Number(o[0]),u=Number(o[1]);i.video.width.ideal=s,i.video.height.ideal=u}if(e.frameRate&&(i.video.frameRate={ideal:e.frameRate}),e.videoSource&&"string"==typeof e.videoSource)if("screen"===e.videoSource||-1!==h.name.indexOf("Firefox")&&"window"===e.videoSource||"Electron"===h.name&&e.videoSource.startsWith("screen:"))if(t.checkScreenSharingCapabilities())if("Electron"===h.name){var d=e.videoSource,p=d.substr(d.indexOf("screen:")+"screen:".length);i.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:p}},n(i)}else{if(t.advancedConfiguration.screenShareChromeExtension&&-1===h.name.indexOf("Firefox")&&!navigator.mediaDevices.getDisplayMedia)c.getScreenConstraints(function(e,o){if(e||o.mandatory&&"screen"===o.mandatory.chromeMediaSource)if("permission-denied"===e||"PermissionDeniedError"===e){var s=new a.OpenViduError(a.OpenViduErrorName.SCREEN_CAPTURE_DENIED,"You must allow access to one window of your desktop");console.error(s),r(s)}else{var u=t.advancedConfiguration.screenShareChromeExtension.split("/").pop().trim();c.getChromeExtensionStatus(u,function(e){if("installed-disabled"===e){var n=new a.OpenViduError(a.OpenViduErrorName.SCREEN_EXTENSION_DISABLED,"You must enable the screen extension");console.error(n),r(n)}if("not-installed"===e){var i=new a.OpenViduError(a.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED,t.advancedConfiguration.screenShareChromeExtension);console.error(i),r(i)}})}else i.video=o,n(i)});else if(navigator.mediaDevices.getDisplayMedia)n(i);else{var f=-1!==h.name.indexOf("Firefox")?e.videoSource:void 0;l.getScreenId(f,function(e,o,s){if(e){if("not-installed"===e){var u=new a.OpenViduError(a.OpenViduErrorName.SCREEN_EXTENSION_NOT_INSTALLED,t.advancedConfiguration.screenShareChromeExtension?t.advancedConfiguration.screenShareChromeExtension:"https://chrome.google.com/webstore/detail/openvidu-screensharing/lfcgfepafnobdloecchnfaclibenjold");console.error(u),r(u)}else if("installed-disabled"===e){var l=new a.OpenViduError(a.OpenViduErrorName.SCREEN_EXTENSION_DISABLED,"You must enable the screen extension");console.error(l),r(l)}else if("permission-denied"===e){var c=new a.OpenViduError(a.OpenViduErrorName.SCREEN_CAPTURE_DENIED,"You must allow access to one window of your desktop");console.error(c),r(c)}}else i.video=s.video,n(i)})}e.videoSource="screen"}else{var m=new a.OpenViduError(a.OpenViduErrorName.SCREEN_SHARING_NOT_SUPPORTED,"You can only screen share in desktop Chrome, Firefox, Opera or Electron. Detected client: "+h.name);console.error(m),r(m)}else i.video.deviceId={exact:e.videoSource},n(i);else n(i)}else n(i)})},e.prototype.startWs=function(e){var t={heartbeat:5e3,sendCloseMessage:!1,ws:{uri:this.wsUri,useSockJS:!1,onconnected:e,ondisconnect:this.disconnectCallback.bind(this),onreconnecting:this.reconnectingCallback.bind(this),onreconnected:this.reconnectedCallback.bind(this)},rpc:{requestTimeout:1e4,participantJoined:this.session.onParticipantJoined.bind(this.session),participantPublished:this.session.onParticipantPublished.bind(this.session),participantUnpublished:this.session.onParticipantUnpublished.bind(this.session),participantLeft:this.session.onParticipantLeft.bind(this.session),participantEvicted:this.session.onParticipantEvicted.bind(this.session),recordingStarted:this.session.onRecordingStarted.bind(this.session),recordingStopped:this.session.onRecordingStopped.bind(this.session),sendMessage:this.session.onNewMessage.bind(this.session),streamPropertyChanged:this.session.onStreamPropertyChanged.bind(this.session),filterEventDispatched:this.session.onFilterEventDispatched.bind(this.session),iceCandidate:this.session.recvIceCandidate.bind(this.session),mediaError:this.session.onMediaError.bind(this.session)}};this.jsonRpcClient=new p.clients.JsonRpcClient(t)},e.prototype.closeWs=function(){this.jsonRpcClient.close(4102,"Connection closed by client")},e.prototype.sendRequest=function(e,t,n){t&&t instanceof Function&&(n=t,t={}),console.debug('Sending request: {method:"'+e+'", params: '+JSON.stringify(t)+"}"),this.jsonRpcClient.send(e,t,n)},e.prototype.getWsUri=function(){return this.wsUri},e.prototype.getSecret=function(){return this.secret},e.prototype.getRecorder=function(){return this.recorder},e.prototype.disconnectCallback=function(){console.warn("Websocket connection lost"),this.isRoomAvailable()?this.session.onLostConnection("networkDisconnect"):alert("Connection error. Please reload page.")},e.prototype.reconnectingCallback=function(){console.warn("Websocket connection lost (reconnecting)"),this.isRoomAvailable()||alert("Connection error. Please reload page.")},e.prototype.reconnectedCallback=function(){var e=this;console.warn("Websocket reconnected"),this.isRoomAvailable()?this.sendRequest("connect",{sessionId:this.session.connection.rpcSessionId},function(t,n){t?(console.error(t),e.session.onLostConnection("networkDisconnect"),e.jsonRpcClient.close(4101,"Reconnection fault")):(e.jsonRpcClient.resetPing(),e.session.onRecoveredConnection())}):alert("Connection error. Please reload page.")},e.prototype.isRoomAvailable=function(){return void 0!==this.session&&this.session instanceof o.Session||(console.warn("Session instance not found"),!1)},e}()},"+snY":function(e,t,n){var r=n("FaRF").__extends;t.__esModule=!0;var i=n("HyLw");t.ConnectionEvent=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n,r)||this;return s.connection=i,s.reason=o,s}return r(t,e),t.prototype.callDefaultBehavior=function(){},t}(i.Event)},0:function(e,t,n){e.exports=n("zUnb")},"0fCr":function(e,t,n){"use strict";t.__esModule=!0;var r=n("AlV1"),i=n("IWAk"),o=n("ReYS"),s=n("WDJJ"),a=n("PyKc"),u=n("3lFV"),l=n("8HiN"),c=n("p571"),d=n("kaSr"),p=n("vxzt"),h=n("kPIN");t.Stream=function(){function e(e,t){var n=this;this.ee=new d,this.isSubscribeToRemote=!1,this.isLocalStreamReadyToPublish=!1,this.isLocalStreamPublished=!1,this.publishedOnce=!1,this.publisherStartSpeakingEventEnabled=!1,this.publisherStopSpeakingEventEnabled=!1,this.volumeChangeEventEnabled=!1,this.session=e,t.hasOwnProperty("id")?(this.inboundStreamOpts=t,this.streamId=this.inboundStreamOpts.id,this.creationTime=this.inboundStreamOpts.createdAt,this.hasAudio=this.inboundStreamOpts.hasAudio,this.hasVideo=this.inboundStreamOpts.hasVideo,this.hasAudio&&(this.audioActive=this.inboundStreamOpts.audioActive),this.hasVideo&&(this.videoActive=this.inboundStreamOpts.videoActive,this.typeOfVideo=this.inboundStreamOpts.typeOfVideo?this.inboundStreamOpts.typeOfVideo:void 0,this.frameRate=-1===this.inboundStreamOpts.frameRate?void 0:this.inboundStreamOpts.frameRate,this.videoDimensions=this.inboundStreamOpts.videoDimensions),this.inboundStreamOpts.filter&&Object.keys(this.inboundStreamOpts.filter).length>0&&(this.inboundStreamOpts.filter.lastExecMethod&&0===Object.keys(this.inboundStreamOpts.filter.lastExecMethod).length&&delete this.inboundStreamOpts.filter.lastExecMethod,this.filter=this.inboundStreamOpts.filter)):(this.outboundStreamOpts=t,this.hasAudio=this.isSendAudio(),this.hasVideo=this.isSendVideo(),this.hasAudio&&(this.audioActive=!!this.outboundStreamOpts.publisherProperties.publishAudio),this.hasVideo&&(this.videoActive=!!this.outboundStreamOpts.publisherProperties.publishVideo,this.frameRate=this.outboundStreamOpts.publisherProperties.frameRate,this.typeOfVideo="undefined"!=typeof MediaStreamTrack&&this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack?"CUSTOM":this.isSendScreen()?"SCREEN":"CAMERA"),this.outboundStreamOpts.publisherProperties.filter&&(this.filter=this.outboundStreamOpts.publisherProperties.filter)),this.ee.on("mediastream-updated",function(){n.streamManager.updateMediaStream(n.mediaStream),console.debug("Video srcObject ["+n.mediaStream+"] updated in stream ["+n.streamId+"]")})}return e.prototype.on=function(e,t){var n=this;return this.ee.on(e,function(r){r?console.info("Event '"+e+"' triggered by stream '"+n.streamId+"'",r):console.info("Event '"+e+"' triggered by stream '"+n.streamId+"'"),t(r)}),this},e.prototype.once=function(e,t){var n=this;return this.ee.once(e,function(r){r?console.info("Event '"+e+"' triggered once by stream '"+n.streamId+"'",r):console.info("Event '"+e+"' triggered once by stream '"+n.streamId+"'"),t(r)}),this},e.prototype.off=function(e,t){return t?this.ee.off(e,t):this.ee.removeAllListeners(e),this},e.prototype.applyFilter=function(e,t){var n=this;return new Promise(function(i,o){console.info("Applying filter to stream "+n.streamId),"string"!=typeof(t=t||{})&&(t=JSON.stringify(t)),n.session.openvidu.sendRequest("applyFilter",{streamId:n.streamId,type:e,options:t},function(s,a){if(s)console.error("Error applying filter for Stream "+n.streamId,s),o(401===s.code?new c.OpenViduError(c.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED,"You don't have permissions to apply a filter"):s);else{console.info("Filter successfully applied on Stream "+n.streamId);var u=n.filter;n.filter=new r.Filter(e,t),n.filter.stream=n,n.session.emitEvent("streamPropertyChanged",[new l.StreamPropertyChangedEvent(n.session,n,"filter",n.filter,u,"applyFilter")]),n.streamManager.emitEvent("streamPropertyChanged",[new l.StreamPropertyChangedEvent(n.streamManager,n,"filter",n.filter,u,"applyFilter")]),i(n.filter)}})})},e.prototype.removeFilter=function(){var e=this;return new Promise(function(t,n){console.info("Removing filter of stream "+e.streamId),e.session.openvidu.sendRequest("removeFilter",{streamId:e.streamId},function(r,i){if(r)console.error("Error removing filter for Stream "+e.streamId,r),n(401===r.code?new c.OpenViduError(c.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED,"You don't have permissions to remove a filter"):r);else{console.info("Filter successfully removed from Stream "+e.streamId);var o=e.filter;delete e.filter,e.session.emitEvent("streamPropertyChanged",[new l.StreamPropertyChangedEvent(e.session,e,"filter",e.filter,o,"applyFilter")]),e.streamManager.emitEvent("streamPropertyChanged",[new l.StreamPropertyChangedEvent(e.streamManager,e,"filter",e.filter,o,"applyFilter")]),t()}})})},e.prototype.getMediaStream=function(){return this.mediaStream},e.prototype.setMediaStream=function(e){this.mediaStream=e},e.prototype.updateMediaStreamInVideos=function(){this.ee.emitEvent("mediastream-updated",[])},e.prototype.getWebRtcPeer=function(){return this.webRtcPeer},e.prototype.getRTCPeerConnection=function(){return this.webRtcPeer.pc},e.prototype.subscribeToMyRemote=function(e){this.isSubscribeToRemote=e},e.prototype.setOutboundStreamOptions=function(e){this.outboundStreamOpts=e},e.prototype.subscribe=function(){var e=this;return new Promise(function(t,n){e.initWebRtcPeerReceive().then(function(){t()}).catch(function(e){n(e)})})},e.prototype.publish=function(){var e=this;return new Promise(function(t,n){e.isLocalStreamReadyToPublish?e.initWebRtcPeerSend().then(function(){t()}).catch(function(e){n(e)}):e.ee.once("stream-ready-to-publish",function(){e.publish().then(function(){t()}).catch(function(e){n(e)})})})},e.prototype.disposeWebRtcPeer=function(){if(this.webRtcPeer){var e=!!this.outboundStreamOpts&&"undefined"!=typeof MediaStreamTrack&&this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack;this.webRtcPeer.dispose(e)}this.speechEvent&&(this.speechEvent.stop&&this.speechEvent.stop(),delete this.speechEvent),this.stopWebRtcStats(),console.info((this.outboundStreamOpts?"Outbound ":"Inbound ")+"WebRTCPeer from 'Stream' with id ["+this.streamId+"] is now closed")},e.prototype.disposeMediaStream=function(){this.mediaStream&&(this.mediaStream.getAudioTracks().forEach(function(e){e.stop()}),this.mediaStream.getVideoTracks().forEach(function(e){e.stop()}),delete this.mediaStream),console.info((this.outboundStreamOpts?"Local ":"Remote ")+"MediaStream from 'Stream' with id ["+this.streamId+"] is now disposed")},e.prototype.displayMyRemote=function(){return this.isSubscribeToRemote},e.prototype.isSendAudio=function(){return!!this.outboundStreamOpts&&null!==this.outboundStreamOpts.publisherProperties.audioSource&&!1!==this.outboundStreamOpts.publisherProperties.audioSource},e.prototype.isSendVideo=function(){return!!this.outboundStreamOpts&&null!==this.outboundStreamOpts.publisherProperties.videoSource&&!1!==this.outboundStreamOpts.publisherProperties.videoSource},e.prototype.isSendScreen=function(){var e="screen"===this.outboundStreamOpts.publisherProperties.videoSource;return"Electron"===h.name&&(e="string"==typeof this.outboundStreamOpts.publisherProperties.videoSource&&this.outboundStreamOpts.publisherProperties.videoSource.startsWith("screen:")),!!this.outboundStreamOpts&&e},e.prototype.setSpeechEventIfNotExists=function(){if(!this.speechEvent){var e=this.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions||{};e.interval="number"==typeof e.interval?e.interval:50,e.threshold="number"==typeof e.threshold?e.threshold:-50,this.speechEvent=p(this.mediaStream,e)}},e.prototype.enableSpeakingEvents=function(){var e=this;this.setSpeechEventIfNotExists(),this.publisherStartSpeakingEventEnabled||(this.publisherStartSpeakingEventEnabled=!0,this.speechEvent.on("speaking",function(){e.session.emitEvent("publisherStartSpeaking",[new a.PublisherSpeakingEvent(e.session,"publisherStartSpeaking",e.connection,e.streamId)])})),this.publisherStopSpeakingEventEnabled||(this.publisherStopSpeakingEventEnabled=!0,this.speechEvent.on("stopped_speaking",function(){e.session.emitEvent("publisherStopSpeaking",[new a.PublisherSpeakingEvent(e.session,"publisherStopSpeaking",e.connection,e.streamId)])}))},e.prototype.enableOnceSpeakingEvents=function(){var e=this;this.setSpeechEventIfNotExists(),this.publisherStartSpeakingEventEnabled||(this.publisherStartSpeakingEventEnabled=!0,this.speechEvent.once("speaking",function(){e.session.emitEvent("publisherStartSpeaking",[new a.PublisherSpeakingEvent(e.session,"publisherStartSpeaking",e.connection,e.streamId)]),e.disableSpeakingEvents()})),this.publisherStopSpeakingEventEnabled||(this.publisherStopSpeakingEventEnabled=!0,this.speechEvent.once("stopped_speaking",function(){e.session.emitEvent("publisherStopSpeaking",[new a.PublisherSpeakingEvent(e.session,"publisherStopSpeaking",e.connection,e.streamId)]),e.disableSpeakingEvents()}))},e.prototype.disableSpeakingEvents=function(){this.speechEvent&&(this.volumeChangeEventEnabled?(this.speechEvent.off("speaking"),this.speechEvent.off("stopped_speaking")):(this.speechEvent.stop(),delete this.speechEvent)),this.publisherStartSpeakingEventEnabled=!1,this.publisherStopSpeakingEventEnabled=!1},e.prototype.enableVolumeChangeEvent=function(){var e=this;this.setSpeechEventIfNotExists(),this.volumeChangeEventEnabled||(this.volumeChangeEventEnabled=!0,this.speechEvent.on("volume_change",function(t){var n={newValue:t,oldValue:e.speechEvent.oldVolumeValue};e.speechEvent.oldVolumeValue=t,e.streamManager.emitEvent("streamAudioVolumeChange",[new u.StreamManagerEvent(e.streamManager,"streamAudioVolumeChange",n)])}))},e.prototype.enableOnceVolumeChangeEvent=function(){var e=this;this.setSpeechEventIfNotExists(),this.volumeChangeEventEnabled||(this.volumeChangeEventEnabled=!0,this.speechEvent.once("volume_change",function(t){var n={newValue:t,oldValue:e.speechEvent.oldVolumeValue};e.speechEvent.oldVolumeValue=t,e.disableVolumeChangeEvent(),e.streamManager.emitEvent("streamAudioVolumeChange",[new u.StreamManagerEvent(e.streamManager,"streamAudioVolumeChange",n)])}))},e.prototype.disableVolumeChangeEvent=function(){this.speechEvent&&(this.session.speakingEventsEnabled?this.speechEvent.off("volume_change"):(this.speechEvent.stop(),delete this.speechEvent)),this.volumeChangeEventEnabled=!1},e.prototype.isLocal=function(){return!this.inboundStreamOpts&&!!this.outboundStreamOpts},e.prototype.getSelectedIceCandidate=function(){var e=this;return new Promise(function(t,n){e.webRtcStats.getSelectedIceCandidateInfo().then(function(e){return t(e)}).catch(function(e){return n(e)})})},e.prototype.getRemoteIceCandidateList=function(){return this.webRtcPeer.remoteCandidatesQueue},e.prototype.getLocalIceCandidateList=function(){return this.webRtcPeer.localCandidatesQueue},e.prototype.initWebRtcPeerSend=function(){var e=this;return new Promise(function(t,n){var r={audio:e.isSendAudio(),video:e.isSendVideo()},i={mediaStream:e.mediaStream,mediaConstraints:r,onicecandidate:e.connection.sendIceCandidate.bind(e.connection),iceServers:e.getIceServersConf(),simulcast:!1};e.webRtcPeer=e.displayMyRemote()?new o.WebRtcPeerSendrecv(i):new o.WebRtcPeerSendonly(i),e.webRtcPeer.generateOffer().then(function(r){!function(r){console.debug("Sending SDP offer to publish as "+e.streamId,r);var i="";e.isSendVideo()&&(i="undefined"!=typeof MediaStreamTrack&&e.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack?"CUSTOM":e.isSendScreen()?"SCREEN":"CAMERA"),e.session.openvidu.sendRequest("publishVideo",{sdpOffer:r,doLoopback:e.displayMyRemote()||!1,hasAudio:e.isSendAudio(),hasVideo:e.isSendVideo(),audioActive:e.audioActive,videoActive:e.videoActive,typeOfVideo:i,frameRate:e.frameRate?e.frameRate:-1,videoDimensions:JSON.stringify(e.videoDimensions),filter:e.outboundStreamOpts.publisherProperties.filter},function(r,i){r?n(401===r.code?new c.OpenViduError(c.OpenViduErrorName.OPENVIDU_PERMISSION_DENIED,"You don't have permissions to publish"):"Error on publishVideo: "+JSON.stringify(r)):(e.webRtcPeer.processAnswer(i.sdpAnswer,!1).then(function(){e.streamId=i.id,e.creationTime=i.createdAt,e.isLocalStreamPublished=!0,e.publishedOnce=!0,e.displayMyRemote()&&e.remotePeerSuccessfullyEstablished(),e.ee.emitEvent("stream-created-by-publisher",[]),e.initWebRtcStats(),t()}).catch(function(e){n(e)}),console.info("'Publisher' successfully published to session"))})}(r)}).catch(function(e){n(new Error("(publish) SDP offer error: "+JSON.stringify(e)))})})},e.prototype.initWebRtcPeerReceive=function(){var e=this;return new Promise(function(t,n){var r={audio:e.inboundStreamOpts.hasAudio,video:e.inboundStreamOpts.hasVideo};console.debug("'Session.subscribe(Stream)' called. Constraints of generate SDP offer",r);var i={onicecandidate:e.connection.sendIceCandidate.bind(e.connection),mediaConstraints:r,iceServers:e.getIceServersConf(),simulcast:!1};e.webRtcPeer=new o.WebRtcPeerRecvonly(i),e.webRtcPeer.generateOffer().then(function(r){var i;i=r,console.debug("Sending SDP offer to subscribe to "+e.streamId,i),e.session.openvidu.sendRequest("receiveVideoFrom",{sender:e.streamId,sdpOffer:i},function(r,i){r?n(new Error("Error on recvVideoFrom: "+JSON.stringify(r))):(e.session.isFirstIonicIosSubscriber&&(e.session.isFirstIonicIosSubscriber=!1,setTimeout(function(){e.session.countDownForIonicIosSubscribersActive=!1},400)),e.webRtcPeer.processAnswer(i.sdpAnswer,e.session.countDownForIonicIosSubscribersActive).then(function(){e.remotePeerSuccessfullyEstablished(),e.initWebRtcStats(),t()}).catch(function(e){n(e)}))})}).catch(function(e){n(new Error("(subscribe) SDP offer error: "+JSON.stringify(e)))})})},e.prototype.remotePeerSuccessfullyEstablished=function(){if(h.isIonicIos)this.mediaStream=this.webRtcPeer.pc.getRemoteStreams()[0];else{this.mediaStream=new MediaStream;for(var e=void 0,t=0,n=this.webRtcPeer.pc.getReceivers();t0},e}()},"0ixB":function(e,t){var n=["stun:","turn:"];e.exports=function(e){var t,r,i=(e||{}).url||e,o={};return"string"==typeof i||i instanceof String?(i=i.trim(),(t=n[n.indexOf(i.slice(0,5))])?(r=(i=i.slice(5)).split("@"),o.username=e.username,o.credential=e.credential,r.length>1&&(i=r[1],r=r[0].split(":"),o.username=r[0],o.credential=(e||{}).credential||r[1]||""),o.url=t+i,o.urls=[o.url],o):e):e}},"3QOI":function(e){e.exports=["stun.l.google.com:19302","stun1.l.google.com:19302","stun2.l.google.com:19302","stun3.l.google.com:19302","stun4.l.google.com:19302","stun.ekiga.net","stun.ideasip.com","stun.schlund.de","stun.stunprotocol.org:3478","stun.voiparound.com","stun.voipbuster.com","stun.voipstunt.com","stun.voxgratia.org"]},"3lFV":function(e,t,n){var r=n("FaRF").__extends;t.__esModule=!0;var i=n("HyLw");t.StreamManagerEvent=function(e){function t(t,n,r){var i=e.call(this,!1,t,n)||this;return i.value=r,i}return r(t,e),t.prototype.callDefaultBehavior=function(){},t}(i.Event)},"5h3M":function(e){e.exports={author:"OpenVidu",dependencies:{"@types/node":"12.6.8","@types/platform":"1.3.2",freeice:"2.2.2",hark:"1.2.3",platform:"1.3.5",uuid:"3.3.2","wolfy87-eventemitter":"5.2.6"},description:"OpenVidu Browser",devDependencies:{browserify:"16.3.0",grunt:"1.0.4","grunt-autoprefixer":"3.0.4","grunt-cli":"1.3.2","grunt-contrib-copy":"1.0.0","grunt-contrib-sass":"1.0.0","grunt-contrib-uglify":"4.0.1","grunt-contrib-watch":"1.1.0","grunt-string-replace":"1.3.1","grunt-ts":"6.0.0-beta.22",tsify:"4.0.1",tslint:"5.18.0",typedoc:"0.15.0",typescript:"3.5.3","uglify-js":"3.6.0"},license:"Apache-2.0",main:"lib/index.js",name:"openvidu-browser",repository:{type:"git",url:"git://github.com/OpenVidu/openvidu"},scripts:{browserify:"VERSION=${VERSION:-}; cd src && ../node_modules/browserify/bin/cmd.js Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../static/js/openvidu-browser-$VERSION.js -v","browserify-prod":"VERSION=${VERSION:-}; cd src && ../node_modules/browserify/bin/cmd.js --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | ../node_modules/uglify-js/bin/uglifyjs --source-map content=inline --output ../static/js/openvidu-browser-$VERSION.min.js",build:"cd src/OpenVidu && ./../../node_modules/typescript/bin/tsc && cd ../.. && ./node_modules/typescript/bin/tsc --declaration src/index.ts --outDir ./lib --sourceMap --lib dom,es5,es2015.promise,scripthost",docs:"./node_modules/typedoc/bin/typedoc --options ./config/typedoc.js --out ./docs ./src && rm -rf ../../openvidu.io/api/openvidu-browser/* && cp -R ./docs/. ../../openvidu.io/api/openvidu-browser",test:'echo "Error: no test specified" && exit 1'},types:"lib/index.d.ts",version:"2.11.0"}},"5lRx":function(e,t){t.pack=function(e){throw new TypeError("Not yet implemented")},t.unpack=function(e){throw new TypeError("Not yet implemented")}},"7W0T":function(e,t,n){"use strict";t.__esModule=!0,function(e){e.AFTER="AFTER",e.APPEND="APPEND",e.BEFORE="BEFORE",e.PREPEND="PREPEND",e.REPLACE="REPLACE"}(t.VideoInsertMode||(t.VideoInsertMode={}))},"8HiN":function(e,t,n){var r=n("FaRF").__extends;t.__esModule=!0;var i=n("HyLw");t.StreamPropertyChangedEvent=function(e){function t(t,n,r,i,o,s){var a=e.call(this,!1,t,"streamPropertyChanged")||this;return a.stream=n,a.changedProperty=r,a.newValue=i,a.oldValue=o,a.reason=s,a}return r(t,e),t.prototype.callDefaultBehavior=function(){},t}(i.Event)},"8v+A":function(e,t,n){var r=!1;if(Object.defineProperty)try{Object.defineProperty({},"x",{})}catch(f){r=!0}Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i});var i=n("Dfy+").EventEmitter,o=n("pRLG"),s=n("ZlF2"),a=n("I17Z"),u=5e3;function l(e){if(e){if(e instanceof Function)return{send:e};if(e.send instanceof Function)return e;if(e.postMessage instanceof Function)return e.send=e.postMessage,e;if(e.write instanceof Function)return e.send=e.write,e;if(void 0===e.onmessage&&!(e.pause instanceof Function))throw new SyntaxError("Transport is not a function nor a valid object")}}function c(e,t){r?(this.method=e,this.params=t):(Object.defineProperty(this,"method",{value:e,enumerable:!0}),Object.defineProperty(this,"params",{value:t,enumerable:!0}))}function d(e,t,n,s){var d=this;if(!e)throw new SyntaxError("Packer is not defined");if(!e.pack||!e.unpack)throw new SyntaxError("Packer is invalid");var p=function(e){if(!e)return{};for(var t in e){var n=e[t];"string"==typeof n&&(e[t]={response:n})}return e}(e.responseMethods);if(t instanceof Function){if(null!=n)throw new SyntaxError("There can't be parameters after onRequest");s=t,n=void 0,t=void 0}if(t&&t.send instanceof Function){if(n&&!(n instanceof Function))throw new SyntaxError("Only a function can be after transport");s=n,n=t,t=void 0}if(n instanceof Function){if(null!=s)throw new SyntaxError("There can't be parameters after onRequest");s=n,n=void 0}if(n&&n.send instanceof Function&&s&&!(s instanceof Function))throw new SyntaxError("Only a function can be after transport");t=t||{},i.call(this),s&&this.on("request",s),r?this.peerID=t.peerID:Object.defineProperty(this,"peerID",{value:t.peerID});var h=t.max_retries||0;function m(e){d.decode(e.data||e)}this.getTransport=function(){return n},this.setTransport=function(e){n&&(n.removeEventListener?n.removeEventListener("message",m):n.removeListener&&n.removeListener("data",m)),e&&(e.addEventListener?e.addEventListener("message",m):e.addListener&&e.addListener("data",m)),n=l(e)},r||Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)}),this.setTransport(n);var g=t.request_timeout||u,y=t.ping_request_timeout||g,v=t.response_timeout||u,b=t.duplicates_timeout||u,_=0,w=new a,E=new a,S=new a,C={};function x(e,t){var n=setTimeout(function(){S.remove(e,t)},b);S.set(n,e,t)}function T(t,n,i,o,s){c.call(this,t,n),this.getTransport=function(){return s},this.setTransport=function(e){s=l(e)},r||Object.defineProperty(this,"transport",{get:this.getTransport.bind(this),set:this.setTransport.bind(this)});var a=E.get(i,o);s||d.getTransport()||(r?this.duplicated=Boolean(a):Object.defineProperty(this,"duplicated",{value:Boolean(a)}));var u=p[t];this.pack=e.pack.bind(e,this,i),this.reply=function(t,n,r){if(t instanceof Function||t&&t.send instanceof Function){if(null!=n)throw new SyntaxError("There can't be parameters after callback");r=t,n=null,t=void 0}else if(n instanceof Function||n&&n.send instanceof Function){if(null!=r)throw new SyntaxError("There can't be parameters after callback");r=n,n=null}var s;return r=l(r),a&&clearTimeout(a.timeout),null!=o&&(t&&(t.dest=o),n&&(n.dest=o)),t||null!=n?(null!=d.peerID&&(t?t.from=d.peerID:n.from=d.peerID),s=e.pack(s=u?null==u.error&&t?{error:t}:{method:t?u.error:u.response,params:t||n}:{error:t,result:n},i)):s=a?a.message:e.pack({result:null},i),function(e,t,n){var r={message:e,timeout:setTimeout(function(){E.remove(t,n)},v)};E.set(r,t,n)}(s,i,o),(r=r||this.getTransport()||d.getTransport())?r.send(s):s}}function O(e){var t=C[e];if(t){delete C[e];var n=w.pop(t.id,t.dest);n&&(clearTimeout(n.timeout),x(t.id,t.dest))}}o(T,c),this.cancel=function(e){if(e)return O(e);for(var e in C)O(e)},this.close=function(){var e=this.getTransport();e&&e.close&&e.close(4003,"Cancel request"),this.cancel(),S.forEach(clearTimeout),E.forEach(function(e){clearTimeout(e.timeout)})},this.encode=function(t,n,r,i,o){if(n instanceof Function){if(null!=r)throw new SyntaxError("There can't be parameters after callback");o=n,i=void 0,r=void 0,n=void 0}else if(r instanceof Function){if(null!=i)throw new SyntaxError("There can't be parameters after callback");o=r,i=void 0,r=void 0}else if(i instanceof Function){if(null!=o)throw new SyntaxError("There can't be parameters after callback");o=i,i=void 0}null!=d.peerID&&((n=n||{}).from=d.peerID),null!=r&&((n=n||{}).dest=r);var s={method:t,params:n};if(o){var a=_++,u=0;function c(e,t){d.cancel(s),o(e,t)}var f={message:s=e.pack(s,a),callback:c,responseMethods:p[t]||{}},m=l(i);function v(e){return f.timeout=setTimeout(E,("ping"===t?y:g)*Math.pow(2,u++)),C[s]={id:a,dest:r},w.set(f,a,r),(e=e||m||d.getTransport())?e.send(s):s}function b(e){e=l(e),console.warn(u+" retry for request message:",s);var t=S.pop(a,r);return clearTimeout(t),v(e)}function E(){if(u0&&a.length>o){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else a=s[t]=r,++e._eventsCount;return e}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(n=s[e]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=m(e,r),o=0;o=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var n=o,r=n+1,i=e.length;r=0;o--)this.removeListener(e,t[o]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},EVdn:function(e,t,n){var r;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,i){"use strict";var o=[],s=n.document,a=Object.getPrototypeOf,u=o.slice,l=o.concat,c=o.push,d=o.indexOf,p={},h=p.toString,f=p.hasOwnProperty,m=f.toString,g=m.call(Object),y={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},b=function(e){return null!=e&&e===e.window},_={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||s).createElement("script");if(o.text=e,t)for(r in _)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function E(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?p[h.call(e)]||"object":typeof e}var S=function(e,t){return new S.fn.init(e,t)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function x(e){var t=!!e&&"length"in e&&e.length,n=E(e);return!v(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}S.fn=S.prototype={jquery:"3.4.1",constructor:S,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+j+")"+j+"*"),q=new RegExp(j+"|>"),G=new RegExp(B),Z=new RegExp("^"+V+"$"),Q={ID:new RegExp("^#("+V+")"),CLASS:new RegExp("^\\.("+V+")"),TAG:new RegExp("^("+V+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){p()},se=_e(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{N.apply(A=M.call(w.childNodes),w.childNodes)}catch(xe){N={apply:A.length?function(e,t){P.apply(e,M.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ae(e,t,r,i){var o,a,l,c,d,f,y,v=t&&t.ownerDocument,E=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==E&&9!==E&&11!==E)return r;if(!i&&((t?t.ownerDocument||t:w)!==h&&p(t),t=t||h,m)){if(11!==E&&(d=$.exec(e)))if(o=d[1]){if(9===E){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(v&&(l=v.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(d[2])return N.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return N.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!O[e+" "]&&(!g||!g.test(e))&&(1!==E||"object"!==t.nodeName.toLowerCase())){if(y=e,v=t,1===E&&q.test(e)){for((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=_),a=(f=s(e)).length;a--;)f[a]="#"+c+" "+be(f[a]);y=f.join(","),v=ee.test(e)&&ye(t.parentNode)||t}try{return N.apply(r,v.querySelectorAll(y)),r}catch(S){O(e,!0)}finally{c===_&&t.removeAttribute("id")}}}return u(e.replace(U,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[_]=!0,e}function ce(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(xe){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return le(function(t){return t=+t,le(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=(e.ownerDocument||e).documentElement;return!Y.test(e.namespaceURI||t&&t.nodeName||"HTML")},p=ae.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:w;return s!==h&&9===s.nodeType&&s.documentElement?(f=(h=s).documentElement,m=!o(h),w!==h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=X.test(h.getElementsByClassName),n.getById=ce(function(e){return f.appendChild(e).id=_,!h.getElementsByName||!h.getElementsByName(_).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},y=[],g=[],(n.qsa=X.test(h.querySelectorAll))&&(ce(function(e){f.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+j+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+j+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+_+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||g.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+j+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(n.matchesSelector=X.test(v=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),y.push("!=",B)}),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),t=X.test(f.compareDocumentPosition),b=t||X.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},I=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===h||e.ownerDocument===w&&b(w,e)?-1:t===h||t.ownerDocument===w&&b(w,t)?1:c?D(c,e)-D(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===h?-1:t===h?1:i?-1:o?1:c?D(c,e)-D(c,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?pe(s[r],a[r]):s[r]===w?-1:a[r]===w?1:0},h):h},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h&&p(e),n.matchesSelector&&m&&!O[t+" "]&&(!y||!y.test(t))&&(!g||!g.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(xe){O(t,!0)}return ae(t,h,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!==h&&p(e),b(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!==h&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&k.call(r.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==o?o:n.attributes||!m?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ae.escape=function(e){return(e+"").replace(re,ie)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(I),d){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=ae.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=ae.selectors={cacheLength:50,createPseudo:le,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&G.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ae.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(z," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,p,h,f,m=o!==s?"nextSibling":"previousSibling",g=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!u&&!a,b=!1;if(g){if(o){for(;m;){for(p=t;p=p[m];)if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&v){for(b=(h=(l=(c=(d=(p=g)[_]||(p[_]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===E&&l[1])&&l[2],p=h&&g.childNodes[h];p=++h&&p&&p[m]||(b=h=0)||f.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[E,h,b];break}}else if(v&&(b=h=(l=(c=(d=(p=t)[_]||(p[_]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===E&&l[1]),!1===b)for(;(p=++h&&p&&p[m]||(b=h=0)||f.pop())&&((a?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++b||(v&&((c=(d=p[_]||(p[_]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]=[E,b]),p!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return i[_]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,n){for(var r,o=i(e,t),s=o.length;s--;)e[r=D(e,o[s])]=!(n[r]=o[s])}):function(e){return i(e,0,n)}):i}},pseudos:{not:le(function(e){var t=[],n=[],r=a(e.replace(U,"$1"));return r[_]?le(function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:le(function(e){return function(t){return ae(e,t).length>0}}),contains:le(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}}),lang:le(function(e){return Z.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge(function(){return[0]}),last:ge(function(e,t){return[t-1]}),eq:ge(function(e,t,n){return[n<0?n+t:n]}),even:ge(function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e}),gt:ge(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Ee(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;a-1&&(o[l]=!(s[l]=d))}}else y=Ee(y===s?y.splice(f,y.length):y),i?i(null,s,y,u):N.apply(s,y)})}function Ce(e){for(var t,n,i,o=e.length,s=r.relative[e[0].type],a=s||r.relative[" "],u=s?1:0,c=_e(function(e){return e===t},a,!0),d=_e(function(e){return D(t,e)>-1},a,!0),p=[function(e,n,r){var i=!s&&(r||n!==l)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,i}];u1&&we(p),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(U,"$1"),n,u0,i=e.length>0,o=function(o,s,a,u,c){var d,f,g,y=0,v="0",b=o&&[],_=[],w=l,S=o||i&&r.find.TAG("*",c),C=E+=null==w?1:Math.random()||.1,x=S.length;for(c&&(l=s===h||s||c);v!==x&&null!=(d=S[v]);v++){if(i&&d){for(f=0,s||d.ownerDocument===h||(p(d),a=!m);g=e[f++];)if(g(d,s||h,a)){u.push(d);break}c&&(E=C)}n&&((d=!g&&d)&&y--,o&&b.push(d))}if(y+=v,n&&v!==y){for(f=0;g=t[f++];)g(b,_,s,a);if(o){if(y>0)for(;v--;)b[v]||_[v]||(_[v]=R.call(u));_=Ee(_)}N.apply(u,_),c&&!o&&_.length>0&&y+t.length>1&&ae.uniqueSort(u)}return c&&(E=C,l=w),b};return n?le(o):o}(o,i))).selector=e}return a},u=ae.select=function(e,t,n,i){var o,u,l,c,d,p="function"==typeof e&&e,h=!i&&s(e=p.selector||e);if(n=n||[],1===h.length){if((u=h[0]=h[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&m&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=Q.needsContext.test(e)?0:u.length;o--&&!r.relative[c=(l=u[o]).type];)if((d=r.find[c])&&(i=d(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ye(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&be(u)))return N.apply(n,i),n;break}}return(p||a(e,h))(i,t,!m,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=_.split("").sort(I).join("")===_,n.detectDuplicates=!!d,p(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))}),ce(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||de(L,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),ae}(n);S.find=T,S.expr=T.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=T.uniqueSort,S.text=T.getText,S.isXMLDoc=T.isXML,S.contains=T.contains,S.escapeSelector=T.escape;var O=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},I=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var R=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(e,t,n){return v(t)?S.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?S.grep(e,function(e){return e===t!==n}):"string"!=typeof t?S.grep(e,function(e){return d.call(t,e)>-1!==n}):S.filter(t,e,n)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(P(this,e||[],!1))},not:function(e){return this.pushStack(P(this,e||[],!0))},is:function(e){return!!P(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var N,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||N,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:M.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(S.merge(this,S.parseHTML(r[1],(t=t instanceof S?t[0]:t)&&t.nodeType?t.ownerDocument||t:s,!0)),R.test(r[1])&&S.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=s.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,N=S(s);var D=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?d.call(S(e),this[0]):d.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return O(e,"parentNode")},parentsUntil:function(e,t,n){return O(e,"parentNode",n)},next:function(e){return j(e,"nextSibling")},prev:function(e){return j(e,"previousSibling")},nextAll:function(e){return O(e,"nextSibling")},prevAll:function(e){return O(e,"previousSibling")},nextUntil:function(e,t,n){return O(e,"nextSibling",n)},prevUntil:function(e,t,n){return O(e,"previousSibling",n)},siblings:function(e){return I((e.parentNode||{}).firstChild,e)},children:function(e){return I(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(e,t){S.fn[e]=function(n,r){var i=S.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=S.filter(r,i)),this.length>1&&(L[e]||S.uniqueSort(i),D.test(e)&&i.reverse()),this.pushStack(i)}});var V=/[^\x20\t\r\n\f]+/g;function F(e){return e}function B(e){throw e}function z(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(V)||[],function(e,n){t[n]=!0}),t}(e):S.extend({},e);var t,n,r,i,o=[],s=[],a=-1,u=function(){for(i=i||e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a-1;)o.splice(n,1),n<=a&&a--}),this},has:function(e){return e?S.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return S.Deferred(function(n){S.each(t,function(t,r){var i=v(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){var o=0;function s(e,t,r,i){return function(){var a=this,u=arguments,l=function(){var n,l;if(!(e=o&&(r!==B&&(a=void 0,u=[n]),t.rejectWith(a,u))}};e?c():(S.Deferred.getStackHook&&(c.stackTrace=S.Deferred.getStackHook()),n.setTimeout(c))}}return S.Deferred(function(n){t[0][3].add(s(0,n,v(i)?i:F,n.notifyWith)),t[1][3].add(s(0,n,v(e)?e:F)),t[2][3].add(s(0,n,v(r)?r:B))}).promise()},promise:function(e){return null!=e?S.extend(e,i):i}},o={};return S.each(t,function(e,n){var s=n[2],a=n[5];i[n[1]]=s.add,a&&s.add(function(){r=a},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=u.call(arguments),o=S.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?u.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(z(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)z(i[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&U.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){n.setTimeout(function(){throw e})};var H=S.Deferred();function W(){s.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),S.ready()}S.fn.ready=function(e){return H.then(e).catch(function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||H.resolveWith(s,[S]))}}),S.ready.then=H.then,"complete"===s.readyState||"loading"!==s.readyState&&!s.documentElement.doScroll?n.setTimeout(S.ready):(s.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var q=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===E(n))for(a in i=!0,n)q(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,v(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){$.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return r=X.get(e,t=(t||"fx")+"queue"),n&&(!r||Array.isArray(n)?r=X.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){var n=S.queue(e,t=t||"fx"),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:S.Callbacks("once memory").add(function(){X.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i,ve={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function _e(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=ae(o),s=be(d.appendChild(o),"script"),l&&_e(s),n)for(c=0;o=s[c++];)ye.test(o.type||"")&&n.push(o);return d}we=s.createDocumentFragment().appendChild(s.createElement("div")),(Ee=s.createElement("input")).setAttribute("type","radio"),Ee.setAttribute("checked","checked"),Ee.setAttribute("name","t"),we.appendChild(Ee),y.checkClone=we.cloneNode(!0).cloneNode(!0).lastChild.checked,we.innerHTML="",y.noCloneChecked=!!we.cloneNode(!0).lastChild.defaultValue;var xe=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Oe=/^([^.]*)(?:\.(.+)|)/;function Ie(){return!0}function ke(){return!1}function Ae(e,t){return e===function(){try{return s.activeElement}catch(e){}}()==("focus"===t)}function Re(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Re(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return S().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Pe(e,t,n){n?(X.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=X.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=u.call(arguments),X.set(this,t,o),r=n(this,t),this[t](),o!==(i=X.get(this,t))||r?X.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(X.set(this,t,{value:S.event.trigger(S.extend(o[0],S.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===X.get(e,t)&&S.event.add(e,t,Ie)}S.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,l,c,d,p,h,f,m,g=X.get(e);if(g)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(se,i),n.guid||(n.guid=S.guid++),(u=g.events)||(u=g.events={}),(s=g.handle)||(s=g.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(V)||[""]).length;l--;)h=m=(a=Oe.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),h&&(d=S.event.special[h]||{},d=S.event.special[h=(i?d.delegateType:d.bindType)||h]||{},c=S.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:f.join(".")},o),(p=u[h])||((p=u[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,f,s)||e.addEventListener&&e.addEventListener(h,s)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,d,p,h,f,m,g=X.hasData(e)&&X.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(V)||[""]).length;l--;)if(h=m=(a=Oe.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),h){for(d=S.event.special[h]||{},p=u[h=(r?d.delegateType:d.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));s&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||S.removeEvent(e,h,g.handle),delete u[h])}else for(h in u)S.event.remove(e,h+t[l],n,r,!0);S.isEmptyObject(u)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=S.event.fix(e),u=new Array(arguments.length),l=(X.get(this,"events")||{})[a.type]||[],c=S.event.special[a.type]||{};for(u[0]=a,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],s={},n=0;n-1:S.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Me=/\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Ve(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Fe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Be(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(X.hasData(e)&&(o=X.access(e),s=X.set(t,o),l=o.events))for(i in delete s.handle,s.events={},l)for(n=0,r=l[i].length;n1&&"string"==typeof f&&!y.checkClone&&De.test(f))return e.each(function(i){var o=e.eq(i);m&&(t[0]=f.call(this,i,o.html())),ze(o,t,n,r)});if(p&&(o=(i=Ce(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=S.map(be(i,"script"),Ve)).length;d")},clone:function(e,t,n){var r,i,o,s,a,u,l,c=e.cloneNode(!0),d=ae(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(s=be(c),r=0,i=(o=be(e)).length;r0&&_e(s,!d&&be(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(K(n)){if(t=n[X.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[X.expando]=void 0}n[$.expando]&&(n[$.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Ue(this,e,!0)},remove:function(e){return Ue(this,e)},text:function(e){return q(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return ze(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return ze(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return ze(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return ze(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return q(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Me.test(e)&&!ve[(ge.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-a-.5))||0),u}function it(e,t,n){var r=We(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,s=Ge(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(s)){if(!n)return s;s="auto"}return(!y.boxSizingReliable()&&i||"auto"===s||!parseFloat(s)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+rt(e,t,n||(i?"border":"content"),o,r,s)+"px"}function ot(e,t,n,r,i){return new ot.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=Y(t),u=$e.test(t),l=e.style;if(u||(t=Je(a)),s=S.cssHooks[t]||S.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=de(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,s,a=Y(t);return $e.test(t)||(t=Je(a)),(s=S.cssHooks[t]||S.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in tt&&(i=tt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,t){S.cssHooks[t]={get:function(e,n,r){if(n)return!Xe.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?it(e,t,r):ce(e,et,function(){return it(e,t,r)})},set:function(e,n,r){var i,o=We(e),s=!y.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===S.css(e,"boxSizing",!1,o),u=r?rt(e,t,r,a,o):0;return a&&s&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-rt(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),nt(0,n,u)}}}),S.cssHooks.marginLeft=Ze(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-ce(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(e,t){S.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(S.cssHooks[e+t].set=nt)}),S.fn.extend({css:function(e,t){return q(this,function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=We(e),i=t.length;s1)}}),S.Tween=ot,(ot.prototype={constructor:ot,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=ot.propHooks[this.prop];return e&&e.get?e.get(this):ot.propHooks._default.get(this)},run:function(e){var t,n=ot.propHooks[this.prop];return this.pos=t=this.options.duration?S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ot.propHooks._default.set(this),this}}).init.prototype=ot.prototype,(ot.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Je(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=ot.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=ot.prototype.init,S.fx.step={};var st,at,ut=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ct(){at&&(!1===s.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ct):n.setTimeout(ct,S.fx.interval),S.fx.tick())}function dt(){return n.setTimeout(function(){st=void 0}),st=Date.now()}function pt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ht(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,s=i.length;o1)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(V);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var n=gt[t]||S.find.attr;gt[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=gt[s],gt[s]=i,i=null!=n(e,t,r)?s:null,gt[s]=o),i}});var yt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function bt(e){return(e.match(V)||[]).join(" ")}function _t(e){return e.getAttribute&&e.getAttribute("class")||""}function wt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(V)||[]}S.fn.extend({prop:function(e,t){return q(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(i=S.propHooks[t=S.propFix[t]||t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):yt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){return null},set:function(e){}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,u=0;if(v(e))return this.each(function(t){S(this).addClass(e.call(this,t,_t(this)))});if((t=wt(e)).length)for(;n=this[u++];)if(i=_t(n),r=1===n.nodeType&&" "+bt(i)+" "){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=bt(r))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,u=0;if(v(e))return this.each(function(t){S(this).removeClass(e.call(this,t,_t(this)))});if(!arguments.length)return this.attr("class","");if((t=wt(e)).length)for(;n=this[u++];)if(i=_t(n),r=1===n.nodeType&&" "+bt(i)+" "){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=bt(r))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):v(e)?this.each(function(n){S(this).toggleClass(e.call(this,n,_t(this),t),t)}):this.each(function(){var t,i,o,s;if(r)for(i=0,o=S(this),s=wt(e);t=s[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=_t(this))&&X.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":X.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+bt(_t(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;S.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=v(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,S(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=S.map(i,function(e){return null==e?"":e+""})),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Et,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:bt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in n;var St=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,r,i){var o,a,u,l,c,d,p,h,m=[r||s],g=f.call(e,"type")?e.type:e,y=f.call(e,"namespace")?e.namespace.split("."):[];if(a=h=u=r=r||s,3!==r.nodeType&&8!==r.nodeType&&!St.test(g+S.event.triggered)&&(g.indexOf(".")>-1&&(y=g.split("."),g=y.shift(),y.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[S.expando]?e:new S.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:S.makeArray(t,[e]),p=S.event.special[g]||{},i||!p.trigger||!1!==p.trigger.apply(r,t))){if(!i&&!p.noBubble&&!b(r)){for(St.test((l=p.delegateType||g)+g)||(a=a.parentNode);a;a=a.parentNode)m.push(a),u=a;u===(r.ownerDocument||s)&&m.push(u.defaultView||u.parentWindow||n)}for(o=0;(a=m[o++])&&!e.isPropagationStopped();)h=a,e.type=o>1?l:p.bindType||g,(d=(X.get(a,"events")||{})[e.type]&&X.get(a,"handle"))&&d.apply(a,t),(d=c&&a[c])&&d.apply&&K(a)&&(e.result=d.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(m.pop(),t)||!K(r)||c&&v(r[g])&&!b(r)&&((u=r[c])&&(r[c]=null),S.event.triggered=g,e.isPropagationStopped()&&h.addEventListener(g,Ct),r[g](),e.isPropagationStopped()&&h.removeEventListener(g,Ct),S.event.triggered=void 0,u&&(r[c]=u)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){S.event.simulate(t,e.target,S.event.fix(e))};S.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=X.access(r,t);i||r.addEventListener(e,n,!0),X.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=X.access(r,t)-1;i?X.access(r,t,i):(r.removeEventListener(e,n,!0),X.remove(r,t))}}});var xt=n.location,Tt=Date.now(),Ot=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(r){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var It=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;function Pt(e,t,n,r){var i;if(Array.isArray(t))S.each(t,function(t,i){n||It.test(e)?r(e,i):Pt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==E(t))r(e,t);else for(i in t)Pt(e+"["+i+"]",t[i],n,r)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Rt.test(this.nodeName)&&!At.test(e)&&(this.checked||!me.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Nt=/%20/g,Mt=/#.*$/,Dt=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,jt=/^(?:GET|HEAD)$/,Vt=/^\/\//,Ft={},Bt={},zt="*/".concat("*"),Ut=s.createElement("a");function Ht(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(V)||[];if(v(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Wt(e,t,n,r){var i={},o=e===Bt;function s(a){var u;return i[a]=!0,S.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),s(l),!1)}),u}return s(t.dataTypes[0])||!i["*"]&&s("*")}function qt(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Ut.href=xt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,S.ajaxSettings),t):qt(S.ajaxSettings,e)},ajaxPrefilter:Ht(Ft),ajaxTransport:Ht(Bt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0);var r,i,o,a,u,l,c,d,p,h,f=S.ajaxSetup({},t=t||{}),m=f.context||f,g=f.context&&(m.nodeType||m.jquery)?S(m):S.event,y=S.Deferred(),v=S.Callbacks("once memory"),b=f.statusCode||{},_={},w={},E="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Lt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||E;return r&&r.abort(t),x(0,t),this}};if(y.promise(C),f.url=((e||f.url||xt.href)+"").replace(Vt,xt.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(V)||[""],null==f.crossDomain){l=s.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Ut.protocol+"//"+Ut.host!=l.protocol+"//"+l.host}catch(T){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=S.param(f.data,f.traditional)),Wt(Ft,f,t,C),c)return C;for(p in(d=S.event&&f.global)&&0==S.active++&&S.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!jt.test(f.type),i=f.url.replace(Mt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Nt,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ot.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Dt,"$1"),h=(Ot.test(i)?"&":"?")+"_="+Tt+++h),f.url=i+h),f.ifModified&&(S.lastModified[i]&&C.setRequestHeader("If-Modified-Since",S.lastModified[i]),S.etag[i]&&C.setRequestHeader("If-None-Match",S.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+zt+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(m,C,f)||c))return C.abort();if(E="abort",v.add(f.complete),C.done(f.success),C.fail(f.error),r=Wt(Bt,f,t,C)){if(C.readyState=1,d&&g.trigger("ajaxSend",[C,f]),c)return C;f.async&&f.timeout>0&&(u=n.setTimeout(function(){C.abort("timeout")},f.timeout));try{c=!1,r.send(_,x)}catch(T){if(c)throw T;x(-1,T)}}else x(-1,"No Transport");function x(e,t,s,a){var l,p,h,_,w,E=t;c||(c=!0,u&&n.clearTimeout(u),r=void 0,o=a||"",C.readyState=e>0?4:0,l=e>=200&&e<300||304===e,s&&(_=function(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,C,s)),_=function(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(T){return{state:"parsererror",error:s?T:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(f,_,C,l),l?(f.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(S.lastModified[i]=w),(w=C.getResponseHeader("etag"))&&(S.etag[i]=w)),204===e||"HEAD"===f.type?E="nocontent":304===e?E="notmodified":(E=_.state,p=_.data,l=!(h=_.error))):(h=E,!e&&E||(E="error",e<0&&(e=0))),C.status=e,C.statusText=(t||E)+"",l?y.resolveWith(m,[p,E,C]):y.rejectWith(m,[C,E,h]),C.statusCode(b),b=void 0,d&&g.trigger(l?"ajaxSuccess":"ajaxError",[C,f,l?p:h]),v.fireWith(m,[C,E]),d&&(g.trigger("ajaxComplete",[C,f]),--S.active||S.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,t){S[t]=function(e,n,r,i){return v(n)&&(i=i||r,r=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:i,data:n,success:r},S.isPlainObject(e)&&e))}}),S._evalUrl=function(e,t){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return v(e)?this.each(function(t){S(this).wrapInner(e.call(this,t))}):this.each(function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v(e);return this.each(function(n){S(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Zt=S.ajaxSettings.xhr();y.cors=!!Zt&&"withCredentials"in Zt,y.ajax=Zt=!!Zt,S.ajaxTransport(function(e){var t,r;if(y.cors||Zt&&!e.crossDomain)return{send:function(i,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Gt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(u){if(t)throw u}},abort:function(){t&&t()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=S("