@RenderBody() @@ -83,7 +91,7 @@ nav {

Site de développement

@SiteSettings.Value.Slogan - + - .")}},"function"==typeof d.on?d.on("load",function(){u=!0}):d.load(function(){u=!0}),s.fn=s.prototype={init:function(t,n,o){var r=e(this);this.url=t,this.qs=n,this.lastError=null,this._={keepAliveData:{},connectingMessageBuffer:new a(this,function(e){r.triggerHandler(g.onReceived,[e])}),lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null,totalTransportConnectTimeout:0},"boolean"==typeof o&&(this.logging=o)},_parseResponse:function(e){var t=this;return e&&"string"==typeof e?t.json.parse(e):e},_originalJson:t.JSON,json:t.JSON,isCrossDomain:function(n,o){var r;return n=e.trim(n),o=o||t.location,0!==n.indexOf("http")?!1:(r=t.document.createElement("a"),r.href=n,r.protocol+i(r.protocol,r.host)!==o.protocol+i(o.protocol,o.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:s.connectionState.disconnected,clientProtocol:"1.5",reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(n,r){var i,a=this,l={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},f=a._deferral||e.Deferred(),v=t.document.createElement("a");if(a.lastError=null,a._deferral=f,!a.json)throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");if("function"===e.type(n)?r=n:"object"===e.type(n)&&(e.extend(l,n),"function"===e.type(l.callback)&&(r=l.callback)),l.transport=o(l.transport,a),!l.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");if(a._.config=l,!u&&l.waitForPageLoad===!0)return a._.deferredStartHandler=function(){a.start(n,r)},d.bind("load",a._.deferredStartHandler),f.promise();if(a.state===s.connectionState.connecting)return f.promise();if(m(a,s.connectionState.disconnected,s.connectionState.connecting)===!1)return f.resolve(a),f.promise();b(a),v.href=a.url,v.protocol&&":"!==v.protocol?(a.protocol=v.protocol,a.host=v.host):(a.protocol=t.document.location.protocol,a.host=v.host||t.document.location.host),a.baseUrl=a.protocol+"//"+a.host,a.wsProtocol="https:"===a.protocol?"wss://":"ws://","auto"===l.transport&&l.jsonp===!0&&(l.transport="longPolling"),0===a.url.indexOf("//")&&(a.url=t.location.protocol+a.url,a.log("Protocol relative URL detected, normalizing it to '"+a.url+"'.")),this.isCrossDomain(a.url)&&(a.log("Auto detected cross domain url."),"auto"===l.transport&&(l.transport=["webSockets","serverSentEvents","longPolling"]),"undefined"==typeof l.withCredentials&&(l.withCredentials=!0),l.jsonp||(l.jsonp=!e.support.cors,l.jsonp&&a.log("Using jsonp because this browser doesn't support CORS.")),a.contentType=s._.defaultContentType),a.withCredentials=l.withCredentials,a.ajaxDataType=l.jsonp?"jsonp":"text",e(a).bind(g.onStart,function(t,n){"function"===e.type(r)&&r.call(a),f.resolve(a)}),a._.initHandler=s.transports._logic.initHandler(a),i=function(n,o){var r=s._.error(c.noTransportOnInit);if(o=o||0,o>=n.length)return a.log(0===o?"No transports supported by the server were selected.":1===o?"No fallback transports were selected.":"Fallback transports exhausted."),e(a).triggerHandler(g.onError,[r]),f.reject(r),void a.stop();if(a.state!==s.connectionState.disconnected){var l=n[o],u=s.transports[l],p=function(){i(n,o+1)};a.transport=u;try{a._.initHandler.start(u,function(){var n=s._.firefoxMajorVersion(t.navigator.userAgent)>=11,o=!!a.withCredentials&&n;a.log("The start request succeeded. Transitioning to the connected state."),S(a)&&s.transports._logic.monitorKeepAlive(a),s.transports._logic.startHeartbeat(a),s._.configurePingInterval(a),m(a,s.connectionState.connecting,s.connectionState.connected)||a.log("WARNING! The connection was not in the connecting state."),a._.connectingMessageBuffer.drain(),e(a).triggerHandler(g.onStart),d.bind("unload",function(){a.log("Window unloading, stopping the connection."),a.stop(o)}),n&&d.bind("beforeunload",function(){t.setTimeout(function(){a.stop(o)},0)})},p)}catch(v){a.log(u.name+" transport threw '"+v.message+"' when attempting to start."),p()}}};var h=a.url+"/negotiate",_=function(t,n){var o=s._.error(c.errorOnNegotiate,t,n._.negotiateRequest);e(n).triggerHandler(g.onError,o),f.reject(o),n.stop()};return e(a).triggerHandler(g.onStarting),h=s.transports._logic.prepareQueryString(a,h),a.log("Negotiating with '"+h+"'."),a._.negotiateRequest=s.transports._logic.ajax(a,{url:h,error:function(e,t){t!==p?_(e,a):f.reject(s._.error(c.stoppedWhileNegotiating,null,a._.negotiateRequest))},success:function(t){var n,o,r,u=[],d=[];try{n=a._parseResponse(t)}catch(p){return void _(s._.error(c.errorParsingNegotiateResponse,p),a)}return o=a._.keepAliveData,a.appRelativeUrl=n.Url,a.id=n.ConnectionId,a.token=n.ConnectionToken,a.webSocketServerUrl=n.WebSocketServerUrl,a._.pollTimeout=1e3*n.ConnectionTimeout+1e4,a.disconnectTimeout=1e3*n.DisconnectTimeout,a._.totalTransportConnectTimeout=a.transportConnectTimeout+1e3*n.TransportConnectTimeout,n.KeepAliveTimeout?(o.activated=!0,o.timeout=1e3*n.KeepAliveTimeout,o.timeoutWarning=o.timeout*a.keepAliveWarnAt,a._.beatInterval=(o.timeout-o.timeoutWarning)/3):o.activated=!1,a.reconnectWindow=a.disconnectTimeout+(o.timeout||0),n.ProtocolVersion&&n.ProtocolVersion===a.clientProtocol?(e.each(s.transports,function(e){return 0===e.indexOf("_")||"webSockets"===e&&!n.TryWebSockets?!0:void d.push(e)}),e.isArray(l.transport)?e.each(l.transport,function(t,n){e.inArray(n,d)>=0&&u.push(n)}):"auto"===l.transport?u=d:e.inArray(l.transport,d)>=0&&u.push(l.transport),void i(u)):(r=s._.error(s._.format(c.protocolIncompatible,a.clientProtocol,n.ProtocolVersion)),e(a).triggerHandler(g.onError,[r]),void f.reject(r))}}),f.promise()},starting:function(t){var n=this;return e(n).bind(g.onStarting,function(e,o){t.call(n)}),n},send:function(e){var t=this;if(t.state===s.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(t.state===s.connectionState.connecting)throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");return t.transport.send(t,e),t},received:function(t){var n=this;return e(n).bind(g.onReceived,function(e,o){t.call(n,o)}),n},stateChanged:function(t){var n=this;return e(n).bind(g.onStateChanged,function(e,o){t.call(n,o)}),n},error:function(t){var n=this;return e(n).bind(g.onError,function(e,o,r){n.lastError=o,t.call(n,o,r)}),n},disconnected:function(t){var n=this;return e(n).bind(g.onDisconnect,function(e,o){t.call(n)}),n},connectionSlow:function(t){var n=this;return e(n).bind(g.onConnectionSlow,function(e,o){t.call(n)}),n},reconnecting:function(t){var n=this;return e(n).bind(g.onReconnecting,function(e,o){t.call(n)}),n},reconnected:function(t){var n=this;return e(n).bind(g.onReconnect,function(e,o){t.call(n)}),n},stop:function(n,o){var r=this,i=r._deferral;return r._.deferredStartHandler&&d.unbind("load",r._.deferredStartHandler),delete r._.config,delete r._.deferredStartHandler,u||r._.config&&r._.config.waitForPageLoad!==!0?r.state!==s.connectionState.disconnected?(r.log("Stopping connection."),t.clearTimeout(r._.beatHandle),t.clearInterval(r._.pingIntervalId),r.transport&&(r.transport.stop(r),o!==!1&&r.transport.abort(r,n),S(r)&&s.transports._logic.stopMonitoringKeepAlive(r),r.transport=null),r._.negotiateRequest&&(r._.negotiateRequest.abort(p),delete r._.negotiateRequest),r._.initHandler&&r._.initHandler.stop(),delete r._deferral,delete r.messageId,delete r.groupsToken,delete r.id,delete r._.pingIntervalId,delete r._.lastMessageAt,delete r._.lastActiveAt,r._.connectingMessageBuffer.clear(),m(r,r.state,s.connectionState.disconnected),e(r).triggerHandler(g.onDisconnect),r):void 0:(r.log("Stopping connection prior to negotiate."),void(i&&i.reject(s._.error(c.stoppedWhileLoading))))},log:function(e){v(e,this.logging)}},s.fn.init.prototype=s.fn,s.noConflict=function(){return e.connection===s&&(e.connection=l),s},e.connection&&(l=e.connection),e.connection=e.signalR=s}(window.jQuery,window),function(e,t,n){function o(e){e._.keepAliveData.monitoring&&r(e),c.markActive(e)&&(e._.beatHandle=t.setTimeout(function(){o(e)},e._.beatInterval))}function r(t){var n,o=t._.keepAliveData;t.state===s.connectionState.connected&&(n=(new Date).getTime()-t._.lastMessageAt,n>=o.timeout?(t.log("Keep alive timed out. Notifying transport that connection has been lost."),t.transport.lostConnection(t)):n>=o.timeoutWarning?o.userNotified||(t.log("Keep alive has been missed, connection may be dead/slow."),e(t).triggerHandler(l.onConnectionSlow),o.userNotified=!0):o.userNotified=!1)}function i(e,t){var n=e.url+t;return e.transport&&(n+="?transport="+e.transport.name),c.prepareQueryString(e,n)}function a(e){this.connection=e,this.startRequested=!1,this.startCompleted=!1,this.connectionStopped=!1}var c,s=e.signalR,l=e.signalR.events,u=e.signalR.changeState,d="__Start Aborted__";s.transports={},a.prototype={start:function(e,o,r){var i=this,a=i.connection,c=!1;return i.startRequested||i.connectionStopped?void a.log("WARNING! "+e.name+" transport cannot be started. Initialization ongoing or completed."):(a.log(e.name+" transport starting."),e.start(a,function(){c||i.initReceived(e,o)},function(t){return c||(c=!0,i.transportFailed(e,t,r)),!i.startCompleted||i.connectionStopped}),void(i.transportTimeoutHandle=t.setTimeout(function(){c||(c=!0,a.log(e.name+" transport timed out when trying to connect."),i.transportFailed(e,n,r))},a._.totalTransportConnectTimeout)))},stop:function(){this.connectionStopped=!0,t.clearTimeout(this.transportTimeoutHandle),s.transports._logic.tryAbortStartRequest(this.connection)},initReceived:function(e,n){var o=this,r=o.connection;return o.startRequested?void r.log("WARNING! The client received multiple init messages."):void(o.connectionStopped||(o.startRequested=!0,t.clearTimeout(o.transportTimeoutHandle),r.log(e.name+" transport connected. Initiating start request."),s.transports._logic.ajaxStart(r,function(){o.startCompleted=!0,n()})))},transportFailed:function(n,o,r){var i,a=this.connection,c=a._deferral;this.connectionStopped||(t.clearTimeout(this.transportTimeoutHandle),this.startRequested?this.startCompleted||(i=s._.error(s.resources.errorDuringStartRequest,o),a.log(n.name+" transport failed during the start request. Stopping the connection."),e(a).triggerHandler(l.onError,[i]),c&&c.reject(i),a.stop()):(n.stop(a),a.log(n.name+" transport failed to connect. Attempting to fall back."),r()))}},c=s.transports._logic={ajax:function(t,n){return e.ajax(e.extend(!0,{},e.signalR.ajaxDefaults,{type:"GET",data:{},xhrFields:{withCredentials:t.withCredentials},contentType:t.contentType,dataType:t.ajaxDataType},n))},pingServer:function(t){var n,o,r=e.Deferred();return t.transport?(n=t.url+"/ping",n=c.addQs(n,t.qs),o=c.ajax(t,{url:n,success:function(e){var n;try{n=t._parseResponse(e)}catch(i){return r.reject(s._.transportError(s.resources.pingServerFailedParse,t.transport,i,o)),void t.stop()}"pong"===n.Response?r.resolve():r.reject(s._.transportError(s._.format(s.resources.pingServerFailedInvalidResponse,e),t.transport,null,o))},error:function(e){401===e.status||403===e.status?(r.reject(s._.transportError(s._.format(s.resources.pingServerFailedStatusCode,e.status),t.transport,e,o)),t.stop()):r.reject(s._.transportError(s.resources.pingServerFailed,t.transport,e,o))}})):r.reject(s._.transportError(s.resources.noConnectionTransport,t.transport)),r.promise()},prepareQueryString:function(e,n){var o;return o=c.addQs(n,"clientProtocol="+e.clientProtocol),o=c.addQs(o,e.qs),e.token&&(o+="&connectionToken="+t.encodeURIComponent(e.token)),e.data&&(o+="&connectionData="+t.encodeURIComponent(e.data)),o},addQs:function(t,n){var o,r=-1!==t.indexOf("?")?"&":"?";if(!n)return t;if("object"==typeof n)return t+r+e.param(n);if("string"==typeof n)return o=n.charAt(0),("?"===o||"&"===o)&&(r=""),t+r+n;throw new Error("Query string property must be either a string or object.")},getUrl:function(e,n,o,r,i){var a="webSockets"===n?"":e.baseUrl,s=a+e.appRelativeUrl,l="transport="+n;return!i&&e.groupsToken&&(l+="&groupsToken="+t.encodeURIComponent(e.groupsToken)),o?(s+=r?"/poll":"/reconnect",!i&&e.messageId&&(l+="&messageId="+t.encodeURIComponent(e.messageId))):s+="/connect",s+="?"+l,s=c.prepareQueryString(e,s),i||(s+="&tid="+Math.floor(11*Math.random())),s},maximizePersistentResponse:function(e){return{MessageId:e.C,Messages:e.M,Initialized:"undefined"!=typeof e.S?!0:!1,ShouldReconnect:"undefined"!=typeof e.T?!0:!1,LongPollDelay:e.L,GroupsToken:e.G}},updateGroups:function(e,t){t&&(e.groupsToken=t)},stringifySend:function(e,t){return"string"==typeof t||"undefined"==typeof t||null===t?t:e.json.stringify(t)},ajaxSend:function(t,n){var o,r=c.stringifySend(t,n),a=i(t,"/send"),u=function(t,r){e(r).triggerHandler(l.onError,[s._.transportError(s.resources.sendFailed,r.transport,t,o),n])};return o=c.ajax(t,{url:a,type:"jsonp"===t.ajaxDataType?"GET":"POST",contentType:s._.defaultContentType,data:{data:r},success:function(e){var n;if(e){try{n=t._parseResponse(e)}catch(o){return u(o,t),void t.stop()}c.triggerReceived(t,n)}},error:function(e,n){"abort"!==n&&"parsererror"!==n&&u(e,t)}})},ajaxAbort:function(e,t){if("undefined"!=typeof e.transport){t="undefined"==typeof t?!0:t;var n=i(e,"/abort");c.ajax(e,{url:n,async:t,timeout:1e3,type:"POST"}),e.log("Fired ajax abort async = "+t+".")}},ajaxStart:function(t,n){var o=function(e){var n=t._deferral;n&&n.reject(e)},r=function(n){t.log("The start request failed. Stopping the connection."),e(t).triggerHandler(l.onError,[n]),o(n),t.stop()};t._.startRequest=c.ajax(t,{url:i(t,"/start"),success:function(e,o,i){var a;try{a=t._parseResponse(e)}catch(c){return void r(s._.error(s._.format(s.resources.errorParsingStartResponse,e),c,i))}"started"===a.Response?n():r(s._.error(s._.format(s.resources.invalidStartResponse,e),null,i))},error:function(e,n,i){n!==d?r(s._.error(s.resources.errorDuringStartRequest,i,e)):(t.log("The start request aborted because connection.stop() was called."),o(s._.error(s.resources.stoppedDuringStartRequest,null,e)))}})},tryAbortStartRequest:function(e){e._.startRequest&&(e._.startRequest.abort(d),delete e._.startRequest)},tryInitialize:function(e,t,n){t.Initialized&&n?n():t.Initialized&&e.log("WARNING! The client received an init message after reconnecting.")},triggerReceived:function(t,n){t._.connectingMessageBuffer.tryBuffer(n)||e(t).triggerHandler(l.onReceived,[n])},processMessages:function(t,n,o){var r;c.markLastMessage(t),n&&(r=c.maximizePersistentResponse(n),c.updateGroups(t,r.GroupsToken),r.MessageId&&(t.messageId=r.MessageId),r.Messages&&(e.each(r.Messages,function(e,n){c.triggerReceived(t,n)}),c.tryInitialize(t,r,o)))},monitorKeepAlive:function(t){var n=t._.keepAliveData;n.monitoring?t.log("Tried to monitor keep alive but it's already being monitored."):(n.monitoring=!0,c.markLastMessage(t),t._.keepAliveData.reconnectKeepAliveUpdate=function(){c.markLastMessage(t)},e(t).bind(l.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t.log("Now monitoring keep alive with a warning timeout of "+n.timeoutWarning+", keep alive timeout of "+n.timeout+" and disconnecting timeout of "+t.disconnectTimeout))},stopMonitoringKeepAlive:function(t){var n=t._.keepAliveData;n.monitoring&&(n.monitoring=!1,e(t).unbind(l.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t._.keepAliveData={},t.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(e){e._.lastActiveAt=(new Date).getTime(),o(e)},markLastMessage:function(e){e._.lastMessageAt=(new Date).getTime()},markActive:function(e){return c.verifyLastActive(e)?(e._.lastActiveAt=(new Date).getTime(),!0):!1},isConnectedOrReconnecting:function(e){return e.state===s.connectionState.connected||e.state===s.connectionState.reconnecting},ensureReconnectingState:function(t){return u(t,s.connectionState.connected,s.connectionState.reconnecting)===!0&&e(t).triggerHandler(l.onReconnecting),t.state===s.connectionState.reconnecting},clearReconnectTimeout:function(e){e&&e._.reconnectTimeout&&(t.clearTimeout(e._.reconnectTimeout),delete e._.reconnectTimeout)},verifyLastActive:function(t){if((new Date).getTime()-t._.lastActiveAt>=t.reconnectWindow){var n=s._.format(s.resources.reconnectWindowTimeout,new Date(t._.lastActiveAt),t.reconnectWindow);return t.log(n),e(t).triggerHandler(l.onError,[s._.error(n,"TimeoutException")]),t.stop(!1,!1),!1}return!0},reconnect:function(e,n){var o=s.transports[n];if(c.isConnectedOrReconnecting(e)&&!e._.reconnectTimeout){if(!c.verifyLastActive(e))return;e._.reconnectTimeout=t.setTimeout(function(){c.verifyLastActive(e)&&(o.stop(e),c.ensureReconnectingState(e)&&(e.log(n+" reconnecting."),o.start(e)))},e.reconnectDelay)}},handleParseFailure:function(t,n,o,r,i){var a=s._.transportError(s._.format(s.resources.parseFailed,n),t.transport,o,i);r&&r(a)?t.log("Failed to parse server response while attempting to connect."):(e(t).triggerHandler(l.onError,[a]),t.stop())},initHandler:function(e){return new a(e)},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(e,t,n){var o=e.signalR,r=e.signalR.events,i=e.signalR.changeState,a=o.transports._logic;o.transports.webSockets={name:"webSockets",supportsKeepAlive:function(){return!0},send:function(t,n){var i=a.stringifySend(t,n);try{t.socket.send(i)}catch(c){e(t).triggerHandler(r.onError,[o._.transportError(o.resources.webSocketsInvalidState,t.transport,c,t.socket),n])}},start:function(n,c,s){var l,u=!1,d=this,p=!c,g=e(n);return t.WebSocket?void(n.socket||(l=n.webSocketServerUrl?n.webSocketServerUrl:n.wsProtocol+n.host,l+=a.getUrl(n,this.name,p),n.log("Connecting to websocket endpoint '"+l+"'."),n.socket=new t.WebSocket(l),n.socket.onopen=function(){u=!0,n.log("Websocket opened."),a.clearReconnectTimeout(n),i(n,o.connectionState.reconnecting,o.connectionState.connected)===!0&&g.triggerHandler(r.onReconnect)},n.socket.onclose=function(t){var i;this===n.socket&&(u&&"undefined"!=typeof t.wasClean&&t.wasClean===!1?(i=o._.transportError(o.resources.webSocketClosed,n.transport,t),n.log("Unclean disconnect from websocket: "+(t.reason||"[no reason given]."))):n.log("Websocket closed."),s&&s(i)||(i&&e(n).triggerHandler(r.onError,[i]),d.reconnect(n)))},n.socket.onmessage=function(t){var o;try{o=n._parseResponse(t.data)}catch(r){return void a.handleParseFailure(n,t.data,r,s,t)}o&&(e.isEmptyObject(o)||o.M?a.processMessages(n,o,c):a.triggerReceived(n,o))})):void s()},reconnect:function(e){a.reconnect(e,this.name)},lostConnection:function(e){this.reconnect(e)},stop:function(e){a.clearReconnectTimeout(e),e.socket&&(e.log("Closing the Websocket."),e.socket.close(),e.socket=null)},abort:function(e,t){a.ajaxAbort(e,t)}}}(window.jQuery,window),function(e,t,n){var o=e.signalR,r=e.signalR.events,i=e.signalR.changeState,a=o.transports._logic,c=function(e){t.clearTimeout(e._.reconnectAttemptTimeoutHandle),delete e._.reconnectAttemptTimeoutHandle};o.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:function(){return!0},timeOut:3e3,start:function(n,s,l){var u,d=this,p=!1,g=e(n),f=!s;if(n.eventSource&&(n.log("The connection already has an event source. Stopping it."),n.stop()),!t.EventSource)return void(l&&(n.log("This browser doesn't support SSE."),l()));u=a.getUrl(n,this.name,f);try{n.log("Attempting to connect to SSE endpoint '"+u+"'."),n.eventSource=new t.EventSource(u,{withCredentials:n.withCredentials})}catch(v){return n.log("EventSource failed trying to connect with error "+v.Message+"."),void(l?l():(g.triggerHandler(r.onError,[o._.transportError(o.resources.eventSourceFailedToConnect,n.transport,v)]),f&&d.reconnect(n)))}f&&(n._.reconnectAttemptTimeoutHandle=t.setTimeout(function(){p===!1&&n.eventSource.readyState!==t.EventSource.OPEN&&d.reconnect(n)},d.timeOut)),n.eventSource.addEventListener("open",function(e){n.log("EventSource connected."),c(n),a.clearReconnectTimeout(n),p===!1&&(p=!0,i(n,o.connectionState.reconnecting,o.connectionState.connected)===!0&&g.triggerHandler(r.onReconnect))},!1),n.eventSource.addEventListener("message",function(e){var t;if("initialized"!==e.data){try{t=n._parseResponse(e.data)}catch(o){return void a.handleParseFailure(n,e.data,o,l,e)}a.processMessages(n,t,s)}},!1),n.eventSource.addEventListener("error",function(e){var i=o._.transportError(o.resources.eventSourceError,n.transport,e);this===n.eventSource&&(l&&l(i)||(n.log("EventSource readyState: "+n.eventSource.readyState+"."),e.eventPhase===t.EventSource.CLOSED?(n.log("EventSource reconnecting due to the server connection ending."),d.reconnect(n)):(n.log("EventSource error."),g.triggerHandler(r.onError,[i]))))},!1)},reconnect:function(e){a.reconnect(e,this.name)},lostConnection:function(e){this.reconnect(e)},send:function(e,t){a.ajaxSend(e,t)},stop:function(e){c(e),a.clearReconnectTimeout(e),e&&e.eventSource&&(e.log("EventSource calling close()."),e.eventSource.close(),e.eventSource=null,delete e.eventSource)},abort:function(e,t){a.ajaxAbort(e,t)}}}(window.jQuery,window),function(e,t,n){var o=e.signalR,r=e.signalR.events,i=e.signalR.changeState,a=o.transports._logic,c=function(){var e=t.document.createElement("iframe");return e.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),e},s=function(){var e=null,n=1e3,r=0;return{prevent:function(){o._.ieVersion<=8&&(0===r&&(e=t.setInterval(function(){var e=c();t.document.body.appendChild(e),t.document.body.removeChild(e),e=null},n)),r++)},cancel:function(){1===r&&t.clearInterval(e),r>0&&r--}}}();o.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:function(){return!0},iframeClearThreshold:50,start:function(e,n,o){var r,i=this,l=a.foreverFrame.count+=1,u=c(),d=function(){e.log("Forever frame iframe finished loading and is no longer receiving messages."),o&&o()||i.reconnect(e)};return t.EventSource?void(o&&(e.log("Forever Frame is not supported by SignalR on browsers with SSE support."),o())):(u.setAttribute("data-signalr-connection-id",e.id),s.prevent(),r=a.getUrl(e,this.name),r+="&frameId="+l,t.document.documentElement.appendChild(u),e.log("Binding to iframe's load event."),u.addEventListener?u.addEventListener("load",d,!1):u.attachEvent&&u.attachEvent("onload",d),u.src=r,a.foreverFrame.connections[l]=e,e.frame=u,e.frameId=l,void(n&&(e.onSuccess=function(){e.log("Iframe transport started."),n()})))},reconnect:function(e){var n=this;a.isConnectedOrReconnecting(e)&&a.verifyLastActive(e)&&t.setTimeout(function(){if(a.verifyLastActive(e)&&e.frame&&a.ensureReconnectingState(e)){var t=e.frame,o=a.getUrl(e,n.name,!0)+"&frameId="+e.frameId;e.log("Updating iframe src to '"+o+"'."),t.src=o}},e.reconnectDelay)},lostConnection:function(e){this.reconnect(e)},send:function(e,t){a.ajaxSend(e,t)},receive:function(t,n){var r,i,c;if(t.json!==t._originalJson&&(n=t._originalJson.stringify(n)),c=t._parseResponse(n),a.processMessages(t,c,t.onSuccess),t.state===e.signalR.connectionState.connected&&(t.frameMessageCount=(t.frameMessageCount||0)+1,t.frameMessageCount>o.transports.foreverFrame.iframeClearThreshold&&(t.frameMessageCount=0,r=t.frame.contentWindow||t.frame.contentDocument,r&&r.document&&r.document.body)))for(i=r.document.body;i.firstChild;)i.removeChild(i.firstChild)},stop:function(e){var n=null;if(s.cancel(),e.frame){if(e.frame.stop)e.frame.stop();else try{n=e.frame.contentWindow||e.frame.contentDocument,n.document&&n.document.execCommand&&n.document.execCommand("Stop")}catch(o){e.log("Error occurred when stopping foreverFrame transport. Message = "+o.message+".")}e.frame.parentNode===t.document.body&&t.document.body.removeChild(e.frame),delete a.foreverFrame.connections[e.frameId],e.frame=null,e.frameId=null,delete e.frame,delete e.frameId,delete e.onSuccess,delete e.frameMessageCount,e.log("Stopping forever frame.")}},abort:function(e,t){a.ajaxAbort(e,t)},getConnection:function(e){return a.foreverFrame.connections[e]},started:function(t){i(t,o.connectionState.reconnecting,o.connectionState.connected)===!0&&e(t).triggerHandler(r.onReconnect)}}}(window.jQuery,window),function(e,t,n){var o=e.signalR,r=e.signalR.events,i=e.signalR.changeState,a=e.signalR.isDisconnecting,c=o.transports._logic;o.transports.longPolling={name:"longPolling",supportsKeepAlive:function(){return!1},reconnectDelay:3e3,start:function(n,s,l){var u=this,d=function(){d=e.noop,n.log("LongPolling connected."),s?s():n.log("WARNING! The client received an init message after reconnecting.")},p=function(e){return l(e)?(n.log("LongPolling failed to connect."),!0):!1},g=n._,f=0,v=function(n){t.clearTimeout(g.reconnectTimeoutId),g.reconnectTimeoutId=null,i(n,o.connectionState.reconnecting,o.connectionState.connected)===!0&&(n.log("Raising the reconnect event"),e(n).triggerHandler(r.onReconnect))},m=36e5;n.pollXhr&&(n.log("Polling xhr requests already exists, aborting."),n.stop()),n.messageId=null,g.reconnectTimeoutId=null,g.pollTimeoutId=t.setTimeout(function(){!function i(s,l){var h=s.messageId,S=null===h,b=!S,_=!l,y=c.getUrl(s,u.name,b,_,!0),T={};s.messageId&&(T.messageId=s.messageId),s.groupsToken&&(T.groupsToken=s.groupsToken),a(s)!==!0&&(n.log("Opening long polling request to '"+y+"'."),s.pollXhr=c.ajax(n,{xhrFields:{onprogress:function(){c.markLastMessage(n)}},url:y,type:"POST",contentType:o._.defaultContentType,data:T,timeout:n._.pollTimeout,success:function(o){var r,l,u,m=0;n.log("Long poll complete."),f=0;try{r=n._parseResponse(o)}catch(h){return void c.handleParseFailure(s,o,h,p,s.pollXhr)}null!==g.reconnectTimeoutId&&v(s),r&&(l=c.maximizePersistentResponse(r)),c.processMessages(s,r,d),l&&"number"===e.type(l.LongPollDelay)&&(m=l.LongPollDelay),a(s)!==!0&&(u=l&&l.ShouldReconnect,(!u||c.ensureReconnectingState(s))&&(m>0?g.pollTimeoutId=t.setTimeout(function(){i(s,u)},m):i(s,u)))},error:function(a,l){var d=o._.transportError(o.resources.longPollFailed,n.transport,a,s.pollXhr);if(t.clearTimeout(g.reconnectTimeoutId),g.reconnectTimeoutId=null,"abort"===l)return void n.log("Aborted xhr request.");if(!p(d)){if(f++,n.state!==o.connectionState.reconnecting&&(n.log("An error occurred using longPolling. Status = "+l+". Response = "+a.responseText+"."),e(s).triggerHandler(r.onError,[d])),(n.state===o.connectionState.connected||n.state===o.connectionState.reconnecting)&&!c.verifyLastActive(n))return;if(!c.ensureReconnectingState(s))return;g.pollTimeoutId=t.setTimeout(function(){i(s,!0)},u.reconnectDelay); + +}}}),b&&l===!0&&(g.reconnectTimeoutId=t.setTimeout(function(){v(s)},Math.min(1e3*(Math.pow(2,f)-1),m))))}(n)},250)},lostConnection:function(e){e.pollXhr&&e.pollXhr.abort("lostConnection")},send:function(e,t){c.ajaxSend(e,t)},stop:function(e){t.clearTimeout(e._.pollTimeoutId),t.clearTimeout(e._.reconnectTimeoutId),delete e._.pollTimeoutId,delete e._.reconnectTimeoutId,e.pollXhr&&(e.pollXhr.abort(),e.pollXhr=null,delete e.pollXhr)},abort:function(e,t){c.ajaxAbort(e,t)}}}(window.jQuery,window),function(e,t,n){function o(e){return e+u}function r(e,t,n){var o,r=e.length,i=[];for(o=0;r>o;o+=1)e.hasOwnProperty(o)&&(i[o]=t.call(n,e[o],o,e));return i}function i(t){return e.isFunction(t)?null:"undefined"===e.type(t)?null:t}function a(e){for(var t in e)if(e.hasOwnProperty(t))return!0;return!1}function c(e,t){var n,o=e._.invocationCallbacks;a(o)&&e.log("Clearing hub invocation callbacks with error: "+t+"."),e._.invocationCallbackId=0,delete e._.invocationCallbacks,e._.invocationCallbacks={};for(var r in o)n=o[r],n.method.call(n.scope,{E:t})}function s(e,t){return new s.fn.init(e,t)}function l(t,n){var o={qs:null,logging:!1,useDefaultPath:!0};return e.extend(o,n),(!t||o.useDefaultPath)&&(t=(t||"")+"/signalr"),new l.fn.init(t,o)}var u=".hubProxy",d=e.signalR;s.fn=s.prototype={init:function(e,t){this.state={},this.connection=e,this.hubName=t,this._={callbackMap:{}}},constructor:s,hasSubscriptions:function(){return a(this._.callbackMap)},on:function(t,n){var r=this,i=r._.callbackMap;return t=t.toLowerCase(),i[t]||(i[t]={}),i[t][n]=function(e,t){n.apply(r,t)},e(r).bind(o(t),i[t][n]),r},off:function(t,n){var r,i=this,c=i._.callbackMap;return t=t.toLowerCase(),r=c[t],r&&(r[n]?(e(i).unbind(o(t),r[n]),delete r[n],a(r)||delete c[t]):n||(e(i).unbind(o(t)),delete c[t])),i},invoke:function(t){var n=this,o=n.connection,a=e.makeArray(arguments).slice(1),c=r(a,i),s={H:n.hubName,M:t,A:c,I:o._.invocationCallbackId},l=e.Deferred(),u=function(r){var i,a,c=n._maximizeHubResponse(r);e.extend(n.state,c.State),c.Progress?l.notifyWith?l.notifyWith(n,[c.Progress.Data]):o._.progressjQueryVersionLogged||(o.log("A hub method invocation progress update was received but the version of jQuery in use ("+e.prototype.jquery+") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."),o._.progressjQueryVersionLogged=!0):c.Error?(c.StackTrace&&o.log(c.Error+"\n"+c.StackTrace+"."),i=c.IsHubException?"HubException":"Exception",a=d._.error(c.Error,i),a.data=c.ErrorData,o.log(n.hubName+"."+t+" failed to execute. Error: "+a.message),l.rejectWith(n,[a])):(o.log("Invoked "+n.hubName+"."+t),l.resolveWith(n,[c.Result]))};return o._.invocationCallbacks[o._.invocationCallbackId.toString()]={scope:n,method:u},o._.invocationCallbackId+=1,e.isEmptyObject(n.state)||(s.S=n.state),o.log("Invoking "+n.hubName+"."+t),o.send(s),l.promise()},_maximizeHubResponse:function(e){return{State:e.S,Result:e.R,Progress:e.P?{Id:e.P.I,Data:e.P.D}:null,Id:e.I,IsHubException:e.H,Error:e.E,StackTrace:e.T,ErrorData:e.D}}},s.fn.init.prototype=s.fn,l.fn=l.prototype=e.connection(),l.fn.init=function(t,n){var r={qs:null,logging:!1,useDefaultPath:!0},i=this;e.extend(r,n),e.signalR.fn.init.call(i,t,r.qs,r.logging),i.proxies={},i._.invocationCallbackId=0,i._.invocationCallbacks={},i.received(function(t){var n,r,a,c,s,l;t&&("undefined"!=typeof t.P?(a=t.P.I.toString(),c=i._.invocationCallbacks[a],c&&c.method.call(c.scope,t)):"undefined"!=typeof t.I?(a=t.I.toString(),c=i._.invocationCallbacks[a],c&&(i._.invocationCallbacks[a]=null,delete i._.invocationCallbacks[a],c.method.call(c.scope,t))):(n=this._maximizeClientHubInvocation(t),i.log("Triggering client hub event '"+n.Method+"' on hub '"+n.Hub+"'."),s=n.Hub.toLowerCase(),l=n.Method.toLowerCase(),r=this.proxies[s],e.extend(r.state,n.State),e(r).triggerHandler(o(l),[n.Args])))}),i.error(function(e,t){var n,o;t&&(n=t.I,o=i._.invocationCallbacks[n],o&&(i._.invocationCallbacks[n]=null,delete i._.invocationCallbacks[n],o.method.call(o.scope,{E:e})))}),i.reconnecting(function(){i.transport&&"webSockets"===i.transport.name&&c(i,"Connection started reconnecting before invocation result was received.")}),i.disconnected(function(){c(i,"Connection was disconnected before invocation result was received.")})},l.fn._maximizeClientHubInvocation=function(e){return{Hub:e.H,Method:e.M,Args:e.A,State:e.S}},l.fn._registerSubscribedHubs=function(){var t=this;t._subscribedToHubs||(t._subscribedToHubs=!0,t.starting(function(){var n=[];e.each(t.proxies,function(e){this.hasSubscriptions()&&(n.push({name:e}),t.log("Client subscribed to hub '"+e+"'."))}),0===n.length&&t.log("No hubs have been subscribed to. The client will not receive data from hubs. To fix, declare at least one client side function prior to connection start for each hub you wish to subscribe to."),t.data=t.json.stringify(n)}))},l.fn.createHubProxy=function(e){e=e.toLowerCase();var t=this.proxies[e];return t||(t=s(this,e),this.proxies[e]=t),this._registerSubscribedHubs(),t},l.fn.init.prototype=l.fn,e.hubConnection=l}(window.jQuery,window),function(e,t){e.signalR.version="2.2.1"}(window.jQuery); \ No newline at end of file diff --git a/Yavsc/wwwroot/js/md-helpers.min.js b/Yavsc/wwwroot/js/md-helpers.min.js new file mode 100644 index 00000000..739eed31 --- /dev/null +++ b/Yavsc/wwwroot/js/md-helpers.min.js @@ -0,0 +1 @@ +var markdownize=function(r){if(!r)return"";var n=r.split("\n").map($.trim).filter(function(r){return""!=r}).join("\n");return toMarkdown(n)},converter=new showdown.Converter,htmlize=function(r){return converter.makeHtml(r)},updateMD=function(r,n){if(!n)return jQuery("#"+r).val("");var e=markdownize(n);jQuery("#"+r).val()!==e&&jQuery("#"+r).val(e)}; \ No newline at end of file diff --git a/Yavsc/wwwroot/js/parallax.js b/Yavsc/wwwroot/js/parallax.js new file mode 100644 index 00000000..4dce2d3c --- /dev/null +++ b/Yavsc/wwwroot/js/parallax.js @@ -0,0 +1,97 @@ +// +// parralax.js +// +// Author: +// Paul Schneider +// +// Copyright (c) 2015 GNU GPL +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . + + +$(document).ready(function($){ + var $window = $(window); + var $stwidth = $(window).width(); + var $stheight = $(window).height(); + + var onPos = function (bgobj,ax,ay) { + var speed = bgobj.data('speed'); + var dx=($window.scrollLeft()+ax-$stwidth/2)/speed; + var dy=($window.scrollTop()+ay-$stheight/2)/speed; + var xPos = bgobj.attr('orgbgpx') - Math.round( dx ); + var yPos = bgobj.attr('orgbgpy') - Math.round( dy ); + // Put together our final background position + var coords = '' + xPos + bgobj.attr('orgbgpxu') + yPos + bgobj.attr('orgbgpyu'); + // Move the background + bgobj.css({ backgroundPosition: coords }); + }; + var tiltLR=0; + var titleFB=0; + + $('[data-type="background"]').each(function(){ + var $bgobj = $(this); // assigning the object + // get the initial background position, assumes a "X% Yem" ? + var orgpos = $bgobj.css('backgroundPosition'); + var bgpos = orgpos.split(" "); + + var bgposx = bgpos[0]; + var bgposy = bgpos[1]; + if (/%$/.test(bgposx)){ + bgposx = bgposx.substr(0,bgposx.length-1); + $bgobj.attr('orgbgpxu','% '); + } + else if (/em$/.test(bgposx)){ + bgposx = bgposx.substr(0,bgposx.length-2); + $bgobj.attr('orgbgpxu','em '); + } + else if (/px$/.test(bgposx)){ + bgposx = bgposx.substr(0,bgposx.length-2); + $bgobj.attr('orgbgpxu','px '); + } + else { $bgobj.attr('orgbgpxu','px '); } + + if (/%$/.test(bgposy)){ + bgposy = bgposy.substr(0,bgposy.length-1); + $bgobj.attr('orgbgpyu','% '); + } + else if (/em$/.test(bgposy)){ + bgposy = bgposy.substr(0,bgposy.length-2); + $bgobj.attr('orgbgpyu','em '); + } + else if (/px$/.test(bgposy)){ + bgposy = bgposy.substr(0,bgposy.length-2); + $bgobj.attr('orgbgpyu','px '); + } + else { $bgobj.attr('orgbgpyu','px '); } + $bgobj.attr('orgbgpx',parseInt(bgposx)); + $bgobj.attr('orgbgpy',parseInt(bgposy)); + + $(window).scroll(function() { + onPos($bgobj,tiltLR,titleFB); + }); + if (window.DeviceOrientationEvent) { + if ($stwidth>320 && $stheight>320) { + window.addEventListener('deviceorientation', function(event) { + tiltLR = $stwidth*Math.sin(event.gamma*Math.PI/180); + titleFB = $stheight*Math.sin(event.beta*Math.PI/90); + onPos($bgobj,tiltLR,titleFB); + },false); } + $(window).mousemove(function(e) { + tiltLR = e.pageX; + titleFB = e.pageY; + onPos($bgobj,e.pageX,e.pageY); + }); + } + }); +}(jQuery)); diff --git a/Yavsc/wwwroot/js/parallax.min.js b/Yavsc/wwwroot/js/parallax.min.js new file mode 100644 index 00000000..d199c3d2 --- /dev/null +++ b/Yavsc/wwwroot/js/parallax.min.js @@ -0,0 +1 @@ +$(document).ready(function(t){var r=t(window),o=t(window).width(),a=t(window).height(),e=function(t,e,n){var g=t.data("speed"),s=(r.scrollLeft()+e-o/2)/g,i=(r.scrollTop()+n-a/2)/g,p=t.attr("orgbgpx")-Math.round(s),u=t.attr("orgbgpy")-Math.round(i),b=""+p+t.attr("orgbgpxu")+u+t.attr("orgbgpyu");t.css({backgroundPosition:b})},n=0,g=0;t('[data-type="background"]').each(function(){var r=t(this),s=r.css("backgroundPosition"),i=s.split(" "),p=i[0],u=i[1];/%$/.test(p)?(p=p.substr(0,p.length-1),r.attr("orgbgpxu","% ")):/em$/.test(p)?(p=p.substr(0,p.length-2),r.attr("orgbgpxu","em ")):/px$/.test(p)?(p=p.substr(0,p.length-2),r.attr("orgbgpxu","px ")):r.attr("orgbgpxu","px "),/%$/.test(u)?(u=u.substr(0,u.length-1),r.attr("orgbgpyu","% ")):/em$/.test(u)?(u=u.substr(0,u.length-2),r.attr("orgbgpyu","em ")):/px$/.test(u)?(u=u.substr(0,u.length-2),r.attr("orgbgpyu","px ")):r.attr("orgbgpyu","px "),r.attr("orgbgpx",parseInt(p)),r.attr("orgbgpy",parseInt(u)),t(window).scroll(function(){e(r,n,g)}),window.DeviceOrientationEvent&&(o>320&&a>320&&window.addEventListener("deviceorientation",function(t){n=o*Math.sin(t.gamma*Math.PI/180),g=a*Math.sin(t.beta*Math.PI/90),e(r,n,g)},!1),t(window).mousemove(function(t){n=t.pageX,g=t.pageY,e(r,t.pageX,t.pageY)}))})}(jQuery)); \ No newline at end of file diff --git a/Yavsc/wwwroot/js/quill.min.js b/Yavsc/wwwroot/js/quill.min.js new file mode 100644 index 00000000..b0ae9275 --- /dev/null +++ b/Yavsc/wwwroot/js/quill.min.js @@ -0,0 +1,5 @@ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Quill=t()}}(function(){var t;return function e(t,n,r){function i(s,l){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!l&&u)return u(s,!0);if(o)return o(s,!0);var a=new Error("Cannot find module '"+s+"'");throw a.code="MODULE_NOT_FOUND",a}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s=200?Xn(e):null,a=e.length;u&&(s=g,l=!1,e=u);t:for(;++ir;)t=t[e[r++]];return r&&r==i?t:he}}function U(t,e,n,r,i,o){return t===e?!0:null==t||null==e||!Xt(t)&&!a(e)?t!==t&&e!==e:j(t,e,U,n,r,i,o)}function j(t,e,n,r,i,o,s){var l=cr(t),u=cr(e),a=qe,c=qe;l||(a=_n.call(t),a==Ne?a=De:a!=De&&(l=Jt(t))),u||(c=_n.call(e),c==Ne?c=De:c!=De&&(u=Jt(e)));var h=a==De,f=c==De,p=a==c;if(p&&!l&&!h)return dt(t,e,a);if(!i){var d=h&&yn.call(t,"__wrapped__"),g=f&&yn.call(e,"__wrapped__");if(d||g)return n(d?t.value():t,g?e.value():e,r,i,o,s)}if(!p)return!1;o||(o=[]),s||(s=[]);for(var v=o.length;v--;)if(o[v]==t)return s[v]==e;o.push(t),s.push(e);var m=(l?pt:gt)(t,e,n,r,i,o,s);return o.pop(),s.pop(),m}function B(t,e,n){var r=e.length,i=r,o=!n;if(null==t)return!i;for(t=jt(t);r--;){var s=e[r];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++re&&(e=-e>i?0:i+e),n=n===he||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r=i){for(;i>r;){var o=r+i>>>1,s=t[o];(n?e>=s:e>s)&&null!==s?r=o+1:i=o}return i}return X(t,e,se,n)}function X(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,s=e!==e,l=null===e,u=e===he;o>i;){var a=xn((i+o)/2),c=n(t[a]),h=c!==he,f=c===c;if(s)var p=f||r;else p=l?f&&h&&(r||null!=c):u?f&&(r||h):null==c?!1:r?e>=c:e>c;p?i=a+1:o=a}return Dn(o,jn)}function $(t,e,n){if("function"!=typeof t)return se;if(e===he)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,s){return t.call(e,n,r,i,o,s)}}return function(){return t.apply(e,arguments)}}function Z(t){return An.call(t,0)}function Q(t,e,n){for(var r=n.length,i=-1,o=On(t.length-r,0),s=-1,l=e.length,u=Array(o+l);++s2?n[i-2]:he,s=i>2?n[2]:he,l=i>1?n[i-1]:he;for("function"==typeof o?(o=$(o,l,5),i-=2):(o="function"==typeof l?l:he,i-=o?1:0),s&&qt(n[0],n[1],s)&&(o=3>i?he:o,i=1);++r-1?n[s]:he}return I(n,r,t)}}function lt(t,e){return function(n,r,i){return"function"==typeof r&&i===he&&cr(n)?t(n,r):e(n,$(r,i,3))}}function ut(t){var e=Pt(function(n,r){var i=c(r,e.placeholder);return ft(n,t,null,r,i)});return e}function at(t,e){return function(n,r,i,o){var s=arguments.length<3;return"function"==typeof r&&o===he&&cr(n)?t(n,r,i,s):z(n,vt(r,o,4),i,s,e)}}function ct(t,e,n,r,i,o,s,l,u,a){function h(){for(var _=arguments.length,E=_,T=Array(_);E--;)T[E]=arguments[E];if(r&&(T=Q(T,r,i)),o&&(T=J(T,o,s)),g||y){var A=h.placeholder,x=c(T,A);if(_-=x.length,a>_){var L=l?m(l):null,N=On(a-_,0),q=g?x:null,S=g?null:x,w=g?T:null,C=g?null:T;e|=g?ye:be,e&=~(g?be:ye),v||(e&=~(pe|de));var k=[t,e,n,w,q,C,S,L,u,N],I=ct.apply(he,k);return wt(t)&&Qn(I,k),I.placeholder=A,I}}var O=p?n:this,D=d?O[t]:t;return l&&(T=Mt(T,l)),f&&uu))return!1;for(;++l-1&&t%1==0&&e>t}function qt(t,e,n){if(!Xt(n))return!1;var r=typeof e;if("number"==r?Lt(n)&&Nt(e,n.length):"string"==r&&e in n){var i=n[e];return t===t?t===i:i!==i}return!1}function St(t,e){var n=typeof t;if("string"==n&&$e.test(t)||"number"==n)return!0;if(cr(t))return!1;var r=!Xe.test(t);return r||null!=e&&t in jt(e)}function wt(t){var e=mt(t);if(!(e in p.prototype))return!1;var n=h[e];if(t===n)return!0;var r=$n(n);return!!r&&t===r[0]}function Ct(t){return"number"==typeof t&&t>-1&&t%1==0&&Hn>=t}function kt(t){return t===t&&!Xt(t)}function It(t,e){var n=t[1],r=e[1],i=n|r,o=_e>i,s=r==_e&&n==ve||r==_e&&n==Ee&&t[7].length<=e[8]||r==(_e|Ee)&&n==ve;if(!o&&!s)return t;r&pe&&(t[2]=e[2],i|=n&pe?0:ge);var l=e[3];if(l){var u=t[3];t[3]=u?Q(u,l,e[4]):m(l),t[4]=u?c(t[3],Le):m(e[4])}return l=e[5],l&&(u=t[5],t[5]=u?J(u,l,e[6]):m(l),t[6]=u?c(t[5],Le):m(e[6])),l=e[7],l&&(t[7]=m(l)),r&_e&&(t[8]=null==t[8]?e[8]:Dn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function Ot(t,e){t=jt(t);for(var n=-1,r=e.length,i={};++nn?On(r+n,0):n;else if(n){var i=W(t,e),s=t[i];return(e===e?e===s:s!==s)?i:-1}return o(t,e,n||0)}function Ht(t){var e=t?t.length:0;return e?t[e-1]:he}function Kt(t,e,n){var r=cr(t)?b:k;return n&&qt(t,e,n)&&(e=null),("function"!=typeof e||n!==he)&&(e=vt(e,n,3)),r(t,e)}function Gt(t,e,n){var r=cr(t)?_:F;return e=vt(e,n,3),r(t,e)}function Pt(t,e){if("function"!=typeof t)throw new TypeError(xe);return e=On(e===he?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=On(n.length-e,0),o=Array(i);++r-1}function Wt(t,e,n,r){n="function"==typeof n?$(n,r,3):he;var i=n?n(t,e):he;return i===he?U(t,e,n):!!i}function Xt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function $t(t){return null==t?!1:_n.call(t)==ke?En.test(mn.call(t)):a(t)&&nn.test(t)}function Zt(t){return"number"==typeof t||a(t)&&_n.call(t)==Oe}function Qt(t){return"string"==typeof t||a(t)&&_n.call(t)==Ue}function Jt(t){return a(t)&&Ct(t.length)&&!!on[_n.call(t)]}function te(t){if(null==t)return[];Xt(t)||(t=Object(t));var e=t.length;e=e&&Ct(e)&&(cr(t)||Vt(t))&&e||0;for(var n=t.constructor,r=-1,i="function"==typeof n&&n.prototype===t,o=Array(e),s=e>0;++r>>1,Fn=wn?wn.BYTES_PER_ELEMENT:0,Hn=9007199254740991,Kn=Sn&&new Sn,Gn={},Pn=h.support={};!function(t){var e=function(){this.x=t},n=[];e.prototype={valueOf:t,y:t};for(var r in new e)n.push(r);try{Pn.dom=11===vn.createDocumentFragment().nodeType}catch(i){Pn.dom=!1}}(1,0);var zn=function(){function t(){}return function(e){if(Xt(e)){t.prototype=e;var n=new t;t.prototype=null}return n||{}}}(),Vn=nt(M),Yn=rt(),Wn=Kn?function(t,e){return Kn.set(t,e),t}:se;An||(Z=Tn&&qn?function(t){var e=t.byteLength,n=wn?xn(e/Fn):0,r=n*Fn,i=new Tn(e);if(n){var o=new wn(i,0,n);o.set(new wn(t,0,n))}return e!=r&&(o=new qn(i,r),o.set(new qn(t,r))),i}:oe(null));var Xn=Cn&&Nn?function(t){return new d(t)}:oe(null),$n=Kn?function(t){return Kn.get(t)}:ue,Zn=G("length"),Qn=function(){var t=0,e=0;return function(n,r){var i=sr(),o=Ae-(i-e);if(e=i,o>0){if(++t>=Te)return n}else t=0;return Wn(n,r)}}(),Jn=Pt(function(t,e){return Lt(t)?C(t,O(e,!1,!0)):[]}),tr=Pt(function(t){for(var e=t.length,n=e,r=Array(h),i=yt(),s=i==o,l=[];n--;){var u=t[n]=Lt(u=t[n])?u:[];r[n]=s&&u.length>=120?Xn(n&&u):null}var a=t[0],c=-1,h=a?a.length:0,f=r[0];t:for(;++ci;i++)t&&t.push(n._listeners[i]);return[n]}if("*"===d||"**"===d||n[d]){if("*"===d){for(l in n)"_listeners"!==l&&n.hasOwnProperty(l)&&(f=f.concat(s(t,e,n[l],r+1)));return f}if("**"===d){h=r+1===p||r+2===p&&"*"===g,h&&n._listeners&&(f=f.concat(s(t,e,n,p)));for(l in n)"_listeners"!==l&&n.hasOwnProperty(l)&&("*"===l||"**"===l?(n[l]._listeners&&!h&&(f=f.concat(s(t,e,n[l],p))),f=f.concat(s(t,e,n[l],r))):f=f.concat(l===g?s(t,e,n[l],r+2):s(t,e,n[l],r)));return f}f=f.concat(s(t,e,n[d],r+1))}if(u=n["*"],u&&s(t,e,u,r+1),a=n["**"])if(p>r){a._listeners&&s(t,e,a,p);for(l in a)"_listeners"!==l&&a.hasOwnProperty(l)&&(l===g?s(t,e,a[l],r+2):l===d?s(t,e,a[l],r+1):(c={},c[l]=a[l],s(t,e,{"**":c},r+1)))}else a._listeners?s(t,e,a,p):a["*"]&&a["*"]._listeners&&s(t,e,a["*"],p);return f}function l(t,e){t="string"==typeof t?t.split(this.delimiter):t.slice();for(var n=0,r=t.length;r>n+1;n++)if("**"===t[n]&&"**"===t[n+1])return;for(var i=this.listenerTree,o=t.shift();o;){if(i[o]||(i[o]={}),i=i[o],0===t.length){if(i._listeners){if("function"==typeof i._listeners)i._listeners=[i._listeners,e];else if(u(i._listeners)&&(i._listeners.push(e),!i._listeners.warned)){var s=a;"undefined"!=typeof this._events.maxListeners&&(s=this._events.maxListeners),s>0&&i._listeners.length>s&&(i._listeners.warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",i._listeners.length),console.trace())}}else i._listeners=e;return!0}o=t.shift()}return!0}var u=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=10;o.prototype.delimiter=".",o.prototype.setMaxListeners=function(t){this._events||n.call(this),this._events.maxListeners=t,this._conf||(this._conf={}),this._conf.maxListeners=t},o.prototype.event="",o.prototype.once=function(t,e){return this.many(t,1,e),this},o.prototype.many=function(t,e,n){function r(){0===--e&&i.off(t,r),n.apply(this,arguments)}var i=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");return r._origin=n,this.on(t,r),i},o.prototype.emit=function(){this._events||n.call(this);var t=arguments[0];if("newListener"===t&&!this.newListener&&!this._events.newListener)return!1;if(this._all){for(var e=arguments.length,r=new Array(e-1),i=1;e>i;i++)r[i-1]=arguments[i];for(i=0,e=this._all.length;e>i;i++)this.event=t,this._all[i].apply(this,r)}if("error"===t&&!(this._all||this._events.error||this.wildcard&&this.listenerTree.error))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");var o;if(this.wildcard){o=[];var l="string"==typeof t?t.split(this.delimiter):t.slice();s.call(this,o,l,this.listenerTree,0)}else o=this._events[t];if("function"==typeof o){if(this.event=t,1===arguments.length)o.call(this);else if(arguments.length>1)switch(arguments.length){case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:for(var e=arguments.length,r=new Array(e-1),i=1;e>i;i++)r[i-1]=arguments[i];o.apply(this,r)}return!0}if(o){for(var e=arguments.length,r=new Array(e-1),i=1;e>i;i++)r[i-1]=arguments[i];for(var u=o.slice(),i=0,e=u.length;e>i;i++)this.event=t,u[i].apply(this,r);return u.length>0||!!this._all}return!!this._all},o.prototype.on=function(t,e){if("function"==typeof t)return this.onAny(t),this;if("function"!=typeof e)throw new Error("on only accepts instances of Function");if(this._events||n.call(this),this.emit("newListener",t,e),this.wildcard)return l.call(this,t,e),this;if(this._events[t]){if("function"==typeof this._events[t])this._events[t]=[this._events[t],e];else if(u(this._events[t])&&(this._events[t].push(e),!this._events[t].warned)){var r=a;"undefined"!=typeof this._events.maxListeners&&(r=this._events.maxListeners),r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),console.trace())}}else this._events[t]=e;return this},o.prototype.onAny=function(t){if("function"!=typeof t)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),this._all.push(t),this},o.prototype.addListener=o.prototype.on,o.prototype.off=function(t,e){if("function"!=typeof e)throw new Error("removeListener only takes instances of Function");var n,r=[];if(this.wildcard){var i="string"==typeof t?t.split(this.delimiter):t.slice();r=s.call(this,null,i,this.listenerTree,0)}else{if(!this._events[t])return this;n=this._events[t],r.push({_listeners:n})}for(var o=0;oc;c++)if(n[c]===e||n[c].listener&&n[c].listener===e||n[c]._origin&&n[c]._origin===e){a=c;break}if(0>a)continue;return this.wildcard?l._listeners.splice(a,1):this._events[t].splice(a,1),0===n.length&&(this.wildcard?delete l._listeners:delete this._events[t]),this}(n===e||n.listener&&n.listener===e||n._origin&&n._origin===e)&&(this.wildcard?delete l._listeners:delete this._events[t])}return this},o.prototype.offAny=function(t){var e,n=0,r=0;if(t&&this._all&&this._all.length>0){for(e=this._all,n=0,r=e.length;r>n;n++)if(t===e[n])return e.splice(n,1),this}else this._all=[];return this},o.prototype.removeListener=o.prototype.off,o.prototype.removeAllListeners=function(t){if(0===arguments.length)return!this._events||n.call(this),this;if(this.wildcard)for(var e="string"==typeof t?t.split(this.delimiter):t.slice(),r=s.call(this,null,e,this.listenerTree,0),i=0;i0&&(n.attributes=e),this.push(n))},l.prototype["delete"]=function(t){return 0>=t?this:this.push({"delete":t})},l.prototype.retain=function(t,e){if(0>=t)return this;var n={retain:t};return i.object(e)&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o.clone(t),i.object(n)){if(i.number(t["delete"])&&i.number(n["delete"]))return this.ops[e-1]={"delete":n["delete"]+t["delete"]},this;if(i.number(n["delete"])&&null!=t.insert&&(e-=1,n=this.ops[e-1],!i.object(n)))return this.ops.unshift(t),this;if(i.equal(t.attributes,n.attributes)){if(i.string(t.insert)&&i.string(n.insert))return this.ops[e-1]={insert:n.insert+t.insert},i.object(t.attributes)&&(this.ops[e-1].attributes=t.attributes),this;if(i.number(t.retain)&&i.number(n.retain))return this.ops[e-1]={retain:n.retain+t.retain},i.object(t.attributes)&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.length=function(){return this.ops.reduce(function(t,e){return t+o.length(e)},0)},l.prototype.slice=function(t,e){t=t||0,i.number(e)||(e=1/0);for(var n=new l,r=o.iterator(this.ops),s=0;e>s&&r.hasNext();){var u;t>s?u=r.next(t-s):(u=r.next(e-s),n.push(u)),s+=o.length(u)}return n},l.prototype.compose=function(t){for(var e=o.iterator(this.ops),n=o.iterator(t.ops),r=new l;e.hasNext()||n.hasNext();)if("insert"===n.peekType())r.push(n.next());else if("delete"===e.peekType())r.push(e.next());else{var s=Math.min(e.peekLength(),n.peekLength()),u=e.next(s),a=n.next(s);if(i.number(a.retain)){var c={};i.number(u.retain)?c.retain=s:c.insert=u.insert;var h=o.attributes.compose(u.attributes,a.attributes,i.number(u.retain));h&&(c.attributes=h),r.push(c)}else i.number(a["delete"])&&i.number(u.retain)&&r.push(a)}return r.chop()},l.prototype.concat=function(t){var e=this.slice();return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t){var e=new l;if(this.ops===t.ops)return e;var n=[this.ops,t.ops].map(function(e){return e.map(function(n){if(null!=n.insert)return i.string(n.insert)?n.insert:s;var r=e===t.ops?"on":"with";throw new Error("diff() called "+r+" non-document")}).join("")}),u=r(n[0],n[1]),a=o.iterator(this.ops),c=o.iterator(t.ops);return u.forEach(function(t){for(var n=t[1].length;n>0;){var s=0;switch(t[0]){case r.INSERT:s=Math.min(c.peekLength(),n),e.push(c.next(s));break;case r.DELETE:s=Math.min(n,a.peekLength()),a.next(s),e["delete"](s);break;case r.EQUAL:s=Math.min(a.peekLength(),c.peekLength(),n);var l=a.next(s),u=c.next(s);i.equal(l.insert,u.insert)?e.retain(s,o.attributes.diff(l.attributes,u.attributes)):e.push(u)["delete"](s); + +}n-=s}}),e.chop()},l.prototype.transform=function(t,e){if(e=!!e,i.number(t))return this.transformPosition(t,e);for(var n=o.iterator(this.ops),r=o.iterator(t.ops),s=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())s.push(r.next());else{var u=Math.min(n.peekLength(),r.peekLength()),a=n.next(u),c=r.next(u);if(a["delete"])continue;c["delete"]?s.push(c):s.retain(u,o.attributes.transform(a.attributes,c.attributes,e))}else s.retain(o.length(n.next()));return s.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=o.iterator(this.ops),r=0;n.hasNext()&&t>=r;){var i=n.peekLength(),s=n.peekType();n.next(),"delete"!==s?("insert"===s&&(t>r||!e)&&(t+=i),r+=i):t-=Math.min(i,t-r)}return t},e.exports=l},{"./is":4,"./op":5,"fast-diff":6}],4:[function(t,e,n){e.exports={equal:function(t,e){if(t===e)return!0;if(null==t&&null==e)return!0;if(null==t||null==e)return!1;if(!this.object(t)||!this.object(e))return!1;if(Object.keys(t).length!=Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0},array:function(t){return Array.isArray(t)},number:function(t){return"number"==typeof t?!0:"object"==typeof t&&"[object Number]"===Object.prototype.toString.call(t)?!0:!1},object:function(t){return t?"function"==typeof t||"object"==typeof t:!1},string:function(t){return"string"==typeof t?!0:"object"==typeof t&&"[object String]"===Object.prototype.toString.call(t)?!0:!1}}},{}],5:[function(t,e,n){function r(t){this.ops=t,this.index=0,this.offset=0}var i=t("./is"),o={attributes:{clone:function(t,e){return i.object(t)?Object.keys(t).reduce(function(n,r){return void 0===t[r]||null===t[r]&&!e||(n[r]=t[r]),n},{}):{}},compose:function(t,e,n){i.object(t)||(t={}),i.object(e)||(e={});var r=this.clone(e,n);for(var o in t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){i.object(t)||(t={}),i.object(e)||(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,r){return t[r]!==e[r]&&(n[r]=void 0===e[r]?null:e[r]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if(!i.object(t))return e;if(!i.object(e))return void 0;if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}},clone:function(t){var e=this.attributes.clone(t);return i.object(e.attributes)&&(e.attributes=this.attributes.clone(e.attributes,!0)),e},iterator:function(t){return new r(t)},length:function(t){return i.number(t["delete"])?t["delete"]:i.number(t.retain)?t.retain:i.string(t.insert)?t.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=o.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,i.number(e["delete"]))return{"delete":t};var s={};return e.attributes&&(s.attributes=e.attributes),i.number(e.retain)?s.retain=t:s.insert=i.string(e.insert)?e.insert.substr(n,t):e.insert,s}return{retain:1/0}},r.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?i.number(this.ops[this.index]["delete"])?"delete":i.number(this.ops[this.index].retain)?"retain":"insert":"retain"},e.exports=o},{"./is":4}],6:[function(t,e,n){function r(t,e){if(t==e)return t?[[p,t]]:[];var n=l(t,e),r=t.substring(0,n);t=t.substring(n),e=e.substring(n),n=u(t,e);var o=t.substring(t.length-n);t=t.substring(0,t.length-n),e=e.substring(0,e.length-n);var s=i(t,e);return r&&s.unshift([p,r]),o&&s.push([p,o]),c(s),s}function i(t,e){var n;if(!t)return[[f,e]];if(!e)return[[h,t]];var i=t.length>e.length?t:e,s=t.length>e.length?e:t,l=i.indexOf(s);if(-1!=l)return n=[[f,i.substring(0,l)],[p,s],[f,i.substring(l+s.length)]],t.length>e.length&&(n[0][0]=n[2][0]=h),n;if(1==s.length)return[[h,t],[f,e]];var u=a(t,e);if(u){var c=u[0],d=u[1],g=u[2],v=u[3],m=u[4],y=r(c,g),b=r(d,v);return y.concat([[p,m]],b)}return o(t,e)}function o(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),o=i,l=2*i,u=new Array(l),a=new Array(l),c=0;l>c;c++)u[c]=-1,a[c]=-1;u[o+1]=0,a[o+1]=0;for(var p=n-r,d=p%2!=0,g=0,v=0,m=0,y=0,b=0;i>b;b++){for(var _=-b+g;b-v>=_;_+=2){var E,T=o+_;E=_==-b||_!=b&&u[T-1]E&&r>A&&t.charAt(E)==e.charAt(A);)E++,A++;if(u[T]=E,E>n)v+=2;else if(A>r)g+=2;else if(d){var x=o+p-_;if(x>=0&&l>x&&-1!=a[x]){var L=n-a[x];if(E>=L)return s(t,e,E,A)}}}for(var N=-b+m;b-y>=N;N+=2){var L,x=o+N;L=N==-b||N!=b&&a[x-1]L&&r>q&&t.charAt(n-L-1)==e.charAt(r-q-1);)L++,q++;if(a[x]=L,L>n)y+=2;else if(q>r)m+=2;else if(!d){var T=o+p-N;if(T>=0&&l>T&&-1!=u[T]){var E=u[T],A=o+E-T;if(L=n-L,E>=L)return s(t,e,E,A)}}}}return[[h,t],[f,e]]}function s(t,e,n,i){var o=t.substring(0,n),s=e.substring(0,i),l=t.substring(n),u=e.substring(i),a=r(o,s),c=r(l,u);return a.concat(c)}function l(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;i>n;)t.substring(o,i)==e.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function u(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;i>n;)t.substring(t.length-i,t.length-o)==e.substring(e.length-i,e.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function a(t,e){function n(t,e,n){for(var r,i,o,s,a=t.substring(n,n+Math.floor(t.length/4)),c=-1,h="";-1!=(c=e.indexOf(a,c+1));){var f=l(t.substring(n),e.substring(c)),p=u(t.substring(0,n),e.substring(0,c));h.length=t.length?[r,i,o,s,h]:null}var r=t.length>e.length?t:e,i=t.length>e.length?e:t;if(r.length<4||2*i.lengtha[4].length?s:a:s;var c,h,f,p;t.length>e.length?(c=o[0],h=o[1],f=o[2],p=o[3]):(f=o[0],p=o[1],c=o[2],h=o[3]);var d=o[4];return[c,h,f,p,d]}function c(t){t.push([p,""]);for(var e,n=0,r=0,i=0,o="",s="";n1?(0!==r&&0!==i&&(e=l(s,o),0!==e&&(n-r-i>0&&t[n-r-i-1][0]==p?t[n-r-i-1][1]+=s.substring(0,e):(t.splice(0,0,[p,s.substring(0,e)]),n++),s=s.substring(e),o=o.substring(e)),e=u(s,o),0!==e&&(t[n][1]=s.substring(s.length-e)+t[n][1],s=s.substring(0,s.length-e),o=o.substring(0,o.length-e))),0===r?t.splice(n-i,r+i,[f,s]):0===i?t.splice(n-r,r+i,[h,o]):t.splice(n-r-i,r+i,[h,o],[f,s]),n=n-r-i+(r?1:0)+(i?1:0)+1):0!==n&&t[n-1][0]==p?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",s=""}""===t[t.length-1][1]&&t.pop();var a=!1;for(n=1;n0))return[void 0,t];if(n=this.toDelta().length(),t===n)return[this.lines.last,this.lines.last.length];if(t>n)return[void 0,t-n];for(e=this.lines.first;null!=e;){if(t\s+\ <")},t.prototype.insertLineBefore=function(t,e){var n;return n=new s(this,t),null!=e?(c(t.parentNode).isElement()||this.root.insertBefore(t,e.node),this.lines.insertAfter(e.prev,n)):(c(t.parentNode).isElement()||this.root.appendChild(t),this.lines.append(n)),n},t.prototype.mergeLines=function(t,e){return e.length>1&&(1===t.length&&c(t.leaves.last.node).remove(),a.each(c(e.node).childNodes(),function(e){return e.tagName!==c.DEFAULT_BREAK_TAG?t.node.appendChild(e):void 0})),this.removeLine(e),t.rebuild()},t.prototype.optimizeLines=function(){return a.each(this.lines.toArray(),function(t,e){return t.optimize(),!0})},t.prototype.rebuild=function(){var t,e,n;for(e=this.lines.toArray(),t=this.root.firstChild,null!=t&&null!=c.LIST_TAGS[t.tagName]&&(t=t.firstChild),a.each(e,function(e){return function(n,r){for(var i,o;n.node!==t;){if(n.node.parentNode!==e.root&&(null!=(o=n.node.parentNode)?o.parentNode:void 0)!==e.root)return e.removeLine(n);t=e.normalizer.normalizeLine(t),i=e.insertLineBefore(t,n),t=c(t).nextLineNode(e.root)}return n.outerHTML!==t.outerHTML&&(n.node=e.normalizer.normalizeLine(n.node),n.rebuild()),t=c(t).nextLineNode(e.root)}}(this)),n=[];null!=t;)t=this.normalizer.normalizeLine(t),this.appendLine(t),n.push(t=c(t).nextLineNode(this.root));return n},t.prototype.removeLine=function(t){return null!=t.node.parentNode&&(c.LIST_TAGS[t.node.parentNode.tagName]&&1===t.node.parentNode.childNodes.length?c(t.node.parentNode).remove():c(t.node).remove()),this.lines.remove(t)},t.prototype.setHTML=function(t){return t=u.stripComments(t),t=u.stripWhitespace(t),this.root.innerHTML=t,this.lines=new l,this.rebuild()},t.prototype.splitLine=function(t,e){var n,r,i,o;return e=Math.min(e,t.length-1),o=c(t.node).split(e,!0),n=o[0],r=o[1],t.node=n,t.rebuild(),i=this.insertLineBefore(r,t.next),i.formats=a.clone(t.formats),i.resetContent(),i},t.prototype.toDelta=function(){var t,e;return e=this.lines.toArray(),t=new r,a.each(e,function(e){return a.each(e.delta.ops,function(e){return t.push(e)})}),t},t}(),e.exports=i},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,"./line":12,"./normalizer":13,lodash:1,"rich-text/lib/delta":3}],9:[function(t,e,n){var r,i,o,s,l,u,a;u=t("lodash"),r=t("rich-text/lib/delta"),a=t("../lib/dom"),i=t("./document"),s=t("./line"),l=t("./selection"),o=function(){function t(t,e,n){this.root=t,this.quill=e,this.options=null!=n?n:{},this.root.setAttribute("id",this.options.id),this.doc=new i(this.root,this.options),this.delta=this.doc.toDelta(),this.length=this.delta.length(),this.selection=new l(this.doc,this.quill),this.timer=setInterval(u.bind(this.checkUpdate,this),this.options.pollInterval),this.savedRange=null,this.quill.on("selection-change",function(t){return function(e){return t.savedRange=e}}(this)),this.options.readOnly||this.enable()}return t.sources={API:"api",SILENT:"silent",USER:"user"},t.prototype.destroy=function(){return clearInterval(this.timer)},t.prototype.disable=function(){return this.enable(!1)},t.prototype.enable=function(t){return null==t&&(t=!0),this.root.setAttribute("contenteditable",t)},t.prototype.applyDelta=function(e,n){var r;return r=this._update(),r&&(e=r.transform(e,!0),r=e.transform(r,!1)),e.ops.length>0&&(e=this._trackDelta(function(t){return function(){var n;return n=0,u.each(e.ops,function(e){return u.isString(e.insert)?(t._insertAt(n,e.insert,e.attributes),n+=e.insert.length):u.isNumber(e.insert)?(t._insertEmbed(n,e.attributes),n+=1):u.isNumber(e["delete"])?t._deleteAt(n,e["delete"]):u.isNumber(e.retain)?(u.each(e.attributes,function(r,i){return t._formatAt(n,e.retain,i,r)}),n+=e.retain):void 0}),t.selection.shiftAfter(0,0,u.bind(t.doc.optimizeLines,t.doc))}}(this)),this.delta=this.doc.toDelta(),this.length=this.delta.length(),this.innerHTML=this.root.innerHTML,e&&n!==t.sources.SILENT&&this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,e,n)),r&&r.ops.length>0&&n!==t.sources.SILENT?this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,r,t.sources.USER):void 0},t.prototype.checkUpdate=function(e){var n;return null==e&&(e="user"),null==this.root.parentNode?clearInterval(this.timer):(n=this._update(),n&&(this.delta=this.delta.compose(n),this.length=this.delta.length(),this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,n,e)),n&&(e=t.sources.SILENT),this.selection.update(e))},t.prototype.focus=function(){return null!=this.selection.range?this.selection.setRange(this.selection.range):this.root.focus()},t.prototype.getBounds=function(t){var e,n,r,i,o,s,l;return this.checkUpdate(),s=this.doc.findLeafAt(t,!0),r=s[0],i=s[1],null==r?null:(n=this.root.parentNode.getBoundingClientRect(),l="left",0===r.length?e=r.node.parentNode.getBoundingClientRect():a.VOID_TAGS[r.node.tagName]?(e=r.node.getBoundingClientRect(),1===i&&(l="right")):(o=document.createRange(),i=e?void 0:this.selection.shiftAfter(t,-1*e,function(n){return function(){var r,i,o,s,l,u,a;for(a=n.doc.findLineAt(t),o=a[0],u=a[1],r=o,s=o.length-u<=e&&u>0;null!=r&&e>0;)l=r.next,i=Math.min(r.length-u,e),0===u&&e>=r.length?n.doc.removeLine(r):r.deleteText(u,i),e-=i,r=l,u=0;return s&&o.next?n.doc.mergeLines(o,o.next):void 0}}(this))},t.prototype._formatAt=function(t,e,n,r){return this.selection.shiftAfter(t,0,function(i){return function(){var o,s,l,u,a;for(u=i.doc.findLineAt(t),s=u[0],l=u[1],a=[];null!=s&&e>0;)o=Math.min(e,s.length-l-1),s.formatText(l,o,n,r),e-=o,e>0&&s.format(n,r),e-=1,l=0,a.push(s=s.next);return a}}(this))},t.prototype._insertEmbed=function(t,e){return this.selection.shiftAfter(t,1,function(n){return function(){var r,i,o;return o=n.doc.findLineAt(t),r=o[0],i=o[1],r.insertEmbed(i,e)}}(this))},t.prototype._insertAt=function(t,e,n){return null==n&&(n={}),this.selection.shiftAfter(t,e.length,function(r){return function(){var i,o,s,l;return e=e.replace(/\r\n?/g,"\n"),o=e.split("\n"),l=r.doc.findLineAt(t),i=l[0],s=l[1],u.each(o,function(t,e){var l;return null==i||i.length<=s?(e0)&&(i=r.doc.appendLine(document.createElement(a.DEFAULT_BLOCK_TAG)),s=0,i.insertText(s,t,n),i.format(n),l=null):(i.insertText(s,t,n),e0?t:!1)},t}(),e.exports=o},{"../lib/dom":17,"./document":8,"./line":12,"./selection":14,lodash:1,"rich-text/lib/delta":3}],10:[function(t,e,n){var r,i,o;i=t("lodash"),o=t("../lib/dom"),r=function(){function t(t){this.config=t}return t.types={LINE:"line",EMBED:"embed"},t.FORMATS={bold:{tag:"B",prepare:"bold"},italic:{tag:"I",prepare:"italic"},underline:{tag:"U",prepare:"underline"},strike:{tag:"S",prepare:"strikeThrough"},color:{style:"color","default":"rgb(0, 0, 0)",prepare:"foreColor"},background:{style:"backgroundColor","default":"rgb(255, 255, 255)",prepare:"backColor"},font:{style:"fontFamily","default":"'Helvetica', 'Arial', sans-serif",prepare:"fontName"},size:{style:"fontSize","default":"13px",prepare:function(t){return document.execCommand("fontSize",!1,o.convertFontSize(t))}},link:{tag:"A",add:function(t,e){return t.setAttribute("href",e),t},remove:function(t){return t.removeAttribute("href"),t},value:function(t){return t.getAttribute("href")}},image:{type:t.types.EMBED,tag:"IMG",attribute:"src"},align:{type:t.types.LINE,style:"textAlign","default":"left"},bullet:{type:t.types.LINE,exclude:"list",parentTag:"UL",tag:"LI"},list:{type:t.types.LINE,exclude:"bullet",parentTag:"OL",tag:"LI"}},t.prototype.add=function(e,n){var r,s,l,u,a;return n?this.value(e)===n?e:(i.isString(this.config.parentTag)&&(l=e.parentNode,l.tagName!==this.config.parentTag&&(l=document.createElement(this.config.parentTag),o(e).wrap(l)),e.parentNode.tagName===(null!=(u=e.parentNode.previousSibling)?u.tagName:void 0)&&o(e.parentNode.previousSibling).merge(e.parentNode),e.parentNode.tagName===(null!=(a=e.parentNode.nextSibling)?a.tagName:void 0)&&o(e.parentNode).merge(e.parentNode.nextSibling)),i.isString(this.config.tag)&&e.tagName!==this.config.tag&&(r=document.createElement(this.config.tag),null!=o.VOID_TAGS[r.tagName]?(null!=e.parentNode&&o(e).replace(r),e=r):this.isType(t.types.LINE)?e=o(e).switchTag(this.config.tag).get():(o(e).wrap(r),e=r)),(i.isString(this.config.style)||i.isString(this.config.attribute)||i.isString(this.config["class"]))&&(i.isString(this.config["class"])&&(e=this.remove(e)),o(e).isTextNode()&&(s=document.createElement(o.DEFAULT_INLINE_TAG),o(e).wrap(s),e=s),i.isString(this.config.style)&&n!==this.config["default"]&&(e.style[this.config.style]=n),i.isString(this.config.attribute)&&e.setAttribute(this.config.attribute,n),i.isString(this.config["class"])&&o(e).addClass(this.config["class"]+n)),i.isFunction(this.config.add)&&(e=this.config.add(e,n)),e):this.remove(e)},t.prototype.isType=function(t){return t===this.config.type},t.prototype.match=function(t){var e,n,r,s,l;if(!o(t).isElement())return!1;if(i.isString(this.config.parentTag)&&(null!=(s=t.parentNode)?s.tagName:void 0)!==this.config.parentTag)return!1;if(i.isString(this.config.tag)&&t.tagName!==this.config.tag)return!1;if(i.isString(this.config.style)&&(!t.style[this.config.style]||t.style[this.config.style]===this.config["default"]))return!1;if(i.isString(this.config.attribute)&&!t.hasAttribute(this.config.attribute))return!1;if(i.isString(this.config["class"])){for(l=o(t).classes(),n=0,r=l.length;r>n;n++)if(e=l[n],0===e.indexOf(this.config["class"]))return!0;return!1}return!0},t.prototype.prepare=function(t){return i.isString(this.config.prepare)?document.execCommand(this.config.prepare,!1,t):i.isFunction(this.config.prepare)?this.config.prepare(t):void 0},t.prototype.remove=function(e){var n,r,s,l;if(!this.match(e))return e;if(i.isString(this.config.style)&&(e.style[this.config.style]="",e.getAttribute("style")||e.removeAttribute("style")),i.isString(this.config.attribute)&&e.removeAttribute(this.config.attribute),i.isString(this.config["class"]))for(l=o(e).classes(),r=0,s=l.length;s>r;r++)n=l[r],0===n.indexOf(this.config["class"])&&o(e).removeClass(n);if(i.isString(this.config.tag))if(this.isType(t.types.LINE))i.isString(this.config.parentTag)&&(null!=e.previousSibling&&o(e).splitBefore(e.parentNode.parentNode),null!=e.nextSibling&&o(e.nextSibling).splitBefore(e.parentNode.parentNode)),e=o(e).switchTag(o.DEFAULT_BLOCK_TAG).get();else{if(this.isType(t.types.EMBED))return void o(e).remove();e=o(e).switchTag(o.DEFAULT_INLINE_TAG).get()}return i.isString(this.config.parentTag)&&o(e.parentNode).unwrap(),i.isFunction(this.config.remove)&&(e=this.config.remove(e)),e.tagName!==o.DEFAULT_INLINE_TAG||e.hasAttributes()||(e=o(e).unwrap()),e},t.prototype.value=function(t){var e,n,r,s;if(!this.match(t))return void 0;if(this.config.value)return this.config.value(t);if(i.isString(this.config.attribute))return t.getAttribute(this.config.attribute)||void 0;if(i.isString(this.config.style))return t.style[this.config.style]||void 0;if(i.isString(this.config["class"])){for(s=o(t).classes(),n=0,r=s.length;r>n;n++)if(e=s[n],0===e.indexOf(this.config["class"]))return e.slice(this.config["class"].length)}else if(i.isString(this.config.tag))return!0;return void 0},t}(),e.exports=r},{"../lib/dom":17,lodash:1}],11:[function(t,e,n){var r,i,o,s,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;s=t("lodash"),l=t("../lib/dom"),r=t("./format"),o=t("../lib/linked-list"),i=function(t){function e(t,n){this.node=t,this.formats=s.clone(n),this.text=l(this.node).text(),this.length=this.text.length,l(this.node).data(e.DATA_KEY,this)}return u(e,t),e.DATA_KEY="leaf",e.isLeafNode=function(t){return l(t).isTextNode()||null==t.firstChild},e.prototype.deleteText=function(t,n){var r;if(n>0)return this.text=this.text.slice(0,t)+this.text.slice(t+n),this.length=this.text.length,null!=l.EMBED_TAGS[this.node.tagName]?(r=document.createTextNode(this.text),l(r).data(e.DATA_KEY,this),this.node=l(this.node).replace(r).get()):l(this.node).text(this.text)},e.prototype.insertText=function(t,n){var r;return this.text=this.text.slice(0,t)+n+this.text.slice(t),l(this.node).isTextNode()?l(this.node).text(this.text):(r=document.createTextNode(n),l(r).data(e.DATA_KEY,this),this.node.tagName===l.DEFAULT_BREAK_TAG?this.node=l(this.node).replace(r).get():(this.node.appendChild(r),this.node=r)),this.length=this.text.length},e}(o.Node),e.exports=i},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,lodash:1}],12:[function(t,e,n){var r,i,o,s,l,u,a,c,h=function(t,e){function n(){this.constructor=t}for(var r in e)f.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty;a=t("lodash"),r=t("rich-text/lib/delta"),c=t("../lib/dom"),i=t("./format"),o=t("./leaf"),s=t("./line"),l=t("../lib/linked-list"),u=t("./normalizer"),s=function(t){function e(t,n){this.doc=t,this.node=n,this.formats={},this.rebuild(),e.__super__.constructor.call(this,this.node)}return h(e,t),e.DATA_KEY="line",e.prototype.buildLeaves=function(t,e){return a.each(c(t).childNodes(),function(t){return function(n){var r;return n=t.doc.normalizer.normalizeNode(n),r=a.clone(e),a.each(t.doc.formats,function(t,e){return!t.isType(i.types.LINE)&&t.match(n)?r[e]=t.value(n):void 0}),o.isLeafNode(n)?t.leaves.append(new o(n,r)):t.buildLeaves(n,r)}}(this))},e.prototype.deleteText=function(t,e){var n,r,i;if(e>0){for(i=this.findLeafAt(t),r=i[0],t=i[1];null!=r&&e>0;)n=Math.min(e,r.length-t),r.deleteText(t,n),e-=n,r=r.next,t=0;return this.rebuild()}},e.prototype.findLeaf=function(t){return null!=t?c(t).data(o.DATA_KEY):void 0},e.prototype.findLeafAt=function(t,e){var n;if(null==e&&(e=!1),t>=this.length-1)return[this.leaves.last,this.leaves.last.length];for(n=this.leaves.first;null!=n;){if(t0;){if(a=s.next,r&&s.formats[n]!==r||!r&&null!=s.formats[n]){if(g=s.node,null!=s.formats[n]){for(c(g).splitBefore(this.node);!o.match(g);)g=g.parentNode;c(g).split(s.length)}l>0&&(f=c(g).split(l),u=f[0],g=f[1]),s.length>l+e&&(p=c(g).split(e),g=p[0],d=p[1]),o.add(g,r)}e-=s.length-l,l=0,s=a}return this.rebuild()}},e.prototype._insert=function(t,e,n){var r,o,s,l,u,h;return u=this.findLeafAt(t),r=u[0],o=u[1],e=a.reduce(n,function(t){return function(e,n,r){var o;return o=t.doc.formats[r],null==o||o.isType(i.types.LINE)||(e=o.add(e,n)),e}}(this),e),h=c(r.node).split(o),l=h[0],s=h[1],s&&(s=c(s).splitBefore(this.node).get()),this.node.insertBefore(e,s),this.rebuild()},e.prototype.insertEmbed=function(t,e){var n,r,o,s,l,u,h,f;return h=this.findLeafAt(t),r=h[0],o=h[1],f=c(r.node).split(o),u=f[0],s=f[1],n=a.find(Object.keys(e),function(t){return function(e){return t.doc.formats[e].isType(i.types.EMBED)}}(this)),l=this.doc.formats[n].add({},e[n]),e=a.clone(e),delete e[n],this._insert(t,l,e)},e.prototype.insertText=function(t,e,n){var r,i,o;return null==n&&(n={}),e.length>0?(o=this.findLeafAt(t),r=o[0],i=o[1],a.isEqual(r.formats,n)?(r.insertText(i,e),this.resetContent()):this._insert(t,document.createTextNode(e),n)):void 0},e.prototype.optimize=function(){return u.optimizeLine(this.node),this.rebuild()},e.prototype.rebuild=function(t){return null==t&&(t=!1),!t&&null!=this.outerHTML&&this.outerHTML===this.node.outerHTML&&a.all(this.leaves.toArray(),function(t){return function(e){return c(e.node).isAncestor(t.node)}}(this))?!1:(this.node=this.doc.normalizer.normalizeNode(this.node),0!==c(this.node).length()||this.node.querySelector(c.DEFAULT_BREAK_TAG)||this.node.appendChild(document.createElement(c.DEFAULT_BREAK_TAG)),this.leaves=new l,this.formats=a.reduce(this.doc.formats,function(t){return function(e,n,r){return n.isType(i.types.LINE)&&(n.match(t.node)?e[r]=n.value(t.node):delete e[r]),e}}(this),this.formats),this.buildLeaves(this.node,{}),this.resetContent(),!0)},e.prototype.resetContent=function(){return c(this.node).data(e.DATA_KEY,this),this.outerHTML=this.node.outerHTML,this.length=1,this.delta=new r,a.each(this.leaves.toArray(),function(t){return function(e){return t.length+=e.length,null!=c.EMBED_TAGS[e.node.tagName]?t.delta.insert(1,e.formats):t.delta.insert(e.text,e.formats)}}(this)),this.delta.insert("\n",this.formats)},e}(l.Node),e.exports=s},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,"./leaf":11,"./line":12,"./normalizer":13,lodash:1,"rich-text/lib/delta":3}],13:[function(t,e,n){var r,i,o,s;i=t("lodash"),s=t("../lib/dom"),o=function(t){return t=t.replace(/(?:^|[-_])(\w)/g,function(t,e){return e?e.toUpperCase():""}),t.charAt(0).toLowerCase()+t.slice(1)},r=function(){function t(){this.whitelist={styles:{},tags:{}},this.whitelist.tags[s.DEFAULT_BREAK_TAG]=!0,this.whitelist.tags[s.DEFAULT_BLOCK_TAG]=!0,this.whitelist.tags[s.DEFAULT_INLINE_TAG]=!0}return t.ALIASES={STRONG:"B",EM:"I",DEL:"S",STRIKE:"S"},t.ATTRIBUTES={color:"color",face:"fontFamily",size:"fontSize"},t.prototype.addFormat=function(t){return null!=t.tag&&(this.whitelist.tags[t.tag]=!0),null!=t.parentTag&&(this.whitelist.tags[t.parentTag]=!0),null!=t.style?this.whitelist.styles[t.style]=!0:void 0},t.prototype.normalizeLine=function(e){return e=t.wrapInline(e),e=t.handleBreaks(e),"LI"===e.tagName&&t.flattenList(e),e=t.pullBlocks(e),e=this.normalizeNode(e),t.unwrapText(e),null!=e&&null!=s.LIST_TAGS[e.tagName]&&(e=e.firstChild),e},t.prototype.normalizeNode=function(e){return s(e).isTextNode()?e:(i.each(t.ATTRIBUTES,function(t,n){var r;return e.hasAttribute(n)?(r=e.getAttribute(n),"size"===n&&(r=s.convertFontSize(r)),e.style[t]=r,e.removeAttribute(n)):void 0}),("bold"===e.style.fontWeight||e.style.fontWeight>500)&&(e.style.fontWeight="",s(e).wrap(document.createElement("b")),e=e.parentNode),this.whitelistStyles(e),this.whitelistTags(e))},t.prototype.whitelistStyles=function(t){var e,n;return e=s(t).styles(),n=i.omit(e,function(t){return function(e,n){return null==t.whitelist.styles[o(n)]}}(this)),Object.keys(n).length0?s(t).styles(n,!0):t.removeAttribute("style"):void 0},t.prototype.whitelistTags=function(e){return s(e).isElement()?(null!=t.ALIASES[e.tagName]?e=s(e).switchTag(t.ALIASES[e.tagName]).get():null==this.whitelist.tags[e.tagName]&&(e=null!=s.BLOCK_TAGS[e.tagName]?s(e).switchTag(s.DEFAULT_BLOCK_TAG).get():e.hasAttributes()||null==e.firstChild?s(e).switchTag(s.DEFAULT_INLINE_TAG).get():s(e).unwrap()),e):e},t.flattenList=function(t){var e,n,r;return r=t.nextSibling,e=i.map(t.querySelectorAll("li")),e.forEach(function(e){return t.parentNode.insertBefore(e,r),r=e.nextSibling}),n=i.map(t.querySelectorAll(Object.keys(s.LIST_TAGS).join(","))),n.forEach(function(t){return s(t).remove()})},t.handleBreaks=function(t){var e;return e=i.map(t.querySelectorAll(s.DEFAULT_BREAK_TAG)),i.each(e,function(e){return function(e){return null==e.nextSibling||s.isIE(10)&&null==e.previousSibling?void 0:s(e.nextSibling).splitBefore(t.parentNode)}}(this)),t},t.optimizeLine=function(t){var e,n,r,o;for(t.normalize(),e=s(t).length(),r=s(t).descendants(),o=[];r.length>0;)n=r.pop(),null!=(null!=n?n.parentNode:void 0)&&null==s.EMBED_TAGS[n.tagName]&&(n.tagName===s.DEFAULT_BREAK_TAG?o.push(0!==e?s(n).remove():void 0):0===s(n).length()?(r.push(n.nextSibling),o.push(s(n).unwrap())):null!=n.previousSibling&&n.tagName===n.previousSibling.tagName&&i.isEqual(s(n).attributes(),s(n.previousSibling).attributes())?(r.push(n.firstChild),o.push(s(n.previousSibling).merge(n))):o.push(void 0));return o},t.pullBlocks=function(e){var n;for(n=e.firstChild;null!=n;){if(null!=s.BLOCK_TAGS[n.tagName]&&"LI"!==n.tagName){s(n).isolate(e.parentNode),null!=s.LIST_TAGS[n.tagName]&&n.firstChild?(s(n.parentNode).unwrap(),null==e.parentNode&&(e=n)):(s(n).unwrap(),t.pullBlocks(e));break}n=n.nextSibling}return e},t.stripComments=function(t){return t.replace(//g,"")},t.stripWhitespace=function(t){return t=t.trim(),t=t.replace(/(\r?\n|\r)+/g," "),t=t.replace(/\>\s+\<")},t.wrapInline=function(t){var e,n;if(null!=s.BLOCK_TAGS[t.tagName])return t;for(e=document.createElement(s.DEFAULT_BLOCK_TAG),t.parentNode.insertBefore(e,t);null!=t&&null==s.BLOCK_TAGS[t.tagName];)n=t.nextSibling,e.appendChild(t),t=n;return e},t.unwrapText=function(t){var e;return e=i.map(t.querySelectorAll(s.DEFAULT_INLINE_TAG)),i.each(e,function(t){return t.hasAttributes()?void 0:s(t).unwrap()})},t}(),e.exports=r},{"../lib/dom":17,lodash:1}],14:[function(t,e,n){var r,i,o,s,l,u;l=t("lodash"),u=t("../lib/dom"),r=t("./leaf"),i=t("./normalizer"),o=t("../lib/range"),s=function(){function t(t,e){this.doc=t,this.emitter=e,this.focus=!1,this.range=new o(0,0),this.nullDelay=!1,this.update("silent")}return t.prototype.checkFocus=function(){return document.activeElement===this.doc.root},t.prototype.getRange=function(t){var e,n,r;return null==t&&(t=!1),this.checkFocus()?(n=this._getNativeRange(),null==n?null:(r=this._positionToIndex(n.startContainer,n.startOffset),e=n.startContainer===n.endContainer&&n.startOffset===n.endOffset?r:this._positionToIndex(n.endContainer,n.endOffset),new o(Math.min(r,e),Math.max(r,e)))):t?this.range:null},t.prototype.preserve=function(t){var e,n,r,i,o,s,l,u,a;return r=this._getNativeRange(),null!=r&&this.checkFocus()?(i=this._encodePosition(r.startContainer,r.startOffset),u=i[0],a=i[1],o=this._encodePosition(r.endContainer,r.endOffset),e=o[0],n=o[1],t(),s=this._decodePosition(u,a),u=s[0],a=s[1],l=this._decodePosition(e,n),e=l[0],n=l[1],this._setNativeRange(u,a,e,n)):t()},t.prototype.scrollIntoView=function(){var t,e,n,r,i,o,s,l,u;if(this.range)return n=this.emitter.editor,u=n.getBounds(this.range.start),r=this.range.isCollapsed()?u:n.getBounds(this.range.end),t=n.root.parentNode.getBoundingClientRect(),e=t.bottom-t.top,e0&&(t=e.getRangeAt(0),u(t.startContainer).isAncestor(this.doc.root,!0)&&(t.startContainer===t.endContainer||u(t.endContainer).isAncestor(this.doc.root,!0)))?t:null},t.prototype._indexToPosition=function(t){var e,n,r;return 0===this.doc.lines.length?[this.doc.root,0]:(r=this.doc.findLeafAt(t,!0),e=r[0],n=r[1],this._decodePosition(e.node,n))},t.prototype._positionToIndex=function(t,e){var n,r,i,o,s,l;if(u.isIE(10)&&"BR"===t.tagName&&1===e&&(e=0),l=this._encodePosition(t,e),r=l[0],e=l[1],o=this.doc.findLine(r),null==o)return 0;for(n=o.findLeaf(r),s=0;null!=o.prev;)o=o.prev,s+=o.length;if(null==n)return s;for(i=0;null!=n.prev;)n=n.prev,i+=n.length;return s+i+e},t.prototype._setNativeRange=function(t,e,n,r){var i,o;if(o=document.getSelection())if(null!=t){if(this.checkFocus()||this.doc.root.focus(),i=this._getNativeRange(),null==i||t!==i.startContainer||e!==i.startOffset||n!==i.endContainer||r!==i.endOffset)return o.removeAllRanges(),i=document.createRange(),i.setStart(t,e),i.setEnd(n,r),o.addRange(i)}else if(o.removeAllRanges(),this.doc.root.blur(),u.isIE(11)&&!u.isIE(9))return document.body.focus()},t}(),e.exports=s},{"../lib/dom":17,"../lib/range":20,"./leaf":11,"./normalizer":13,lodash:1}],15:[function(t,e,n){t("./modules/authorship"),t("./modules/image-tooltip"),t("./modules/keyboard"),t("./modules/link-tooltip"),t("./modules/multi-cursor"),t("./modules/paste-manager"),t("./modules/toolbar"),t("./modules/tooltip"),t("./modules/undo-manager"),e.exports=t("./quill")},{"./modules/authorship":21,"./modules/image-tooltip":22,"./modules/keyboard":23,"./modules/link-tooltip":24,"./modules/multi-cursor":25,"./modules/paste-manager":26,"./modules/toolbar":27,"./modules/tooltip":28,"./modules/undo-manager":29,"./quill":30}],16:[function(t,e,n){var r,i,o,s=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;o=t("./dom"),i=t("./picker"),r=function(t){function e(){e.__super__.constructor.apply(this,arguments),o(this.container).addClass("ql-color-picker")}return s(e,t),e.prototype.buildItem=function(t,n,r){var i;return i=e.__super__.buildItem.call(this,t,n,r),i.style.backgroundColor=n.value,i},e}(i),e.exports=r},{"./dom":17,"./picker":19}],17:[function(t,e,n){var r,i,o,s,l,u=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;o=t("lodash"),l=null,i=function(){function t(t){this.node=t,this.trigger=u(this.trigger,this)}return t.prototype.addClass=function(t){return this.hasClass(t)?void 0:(null!=this.node.classList?this.node.classList.add(t):null!=this.node.className&&(this.node.className=(this.node.className+" "+t).trim()),this)},t.prototype.attributes=function(t){var e,n,r,i,s,l;if(t)return o.each(t,function(t){return function(e,n){return t.node.setAttribute(n,e)}}(this)),this;if(null==this.node.attributes)return{};for(t={},s=this.node.attributes,n=r=0,i=s.length;i>r;n=++r)l=s[n],e=this.node.attributes[n],t[e.name]=e.value;return t},t.prototype.child=function(t){var e,n;for(e=this.node.firstChild,n=s(e).length();null!=e&&!(n>t);)t-=n,e=e.nextSibling,n=s(e).length();return null==e&&(e=this.node.lastChild,t=s(e).length()),[e,t]},t.prototype.childNodes=function(){return o.map(this.node.childNodes)},t.prototype.classes=function(){return this.node.className.split(/\s+/)},t.prototype.data=function(t,e){var n;return null!=e?(null==this.node["ql-data"]&&(this.node["ql-data"]={}),this.node["ql-data"][t]=e,this):null!=(n=this.node["ql-data"])?n[t]:void 0},t.prototype.descendants=function(){return o.map(this.node.getElementsByTagName("*"))},t.prototype.get=function(){return this.node},t.prototype.hasClass=function(t){return null!=this.node.classList?this.node.classList.contains(t):null!=this.node.className?this.classes().indexOf(t)>-1:!1},t.prototype.isAncestor=function(t,e){var n;if(null==e&&(e=!1),t===this.node)return e;for(n=this.node;n;){if(n===t)return!0;n=n.parentNode}return!1},t.prototype.isElement=function(){var t;return(null!=(t=this.node)?t.nodeType:void 0)===s.ELEMENT_NODE},t.prototype.isTextNode=function(){var t;return(null!=(t=this.node)?t.nodeType:void 0)===s.TEXT_NODE},t.prototype.isolate=function(t){return null!=this.node.nextSibling&&s(this.node.nextSibling).splitBefore(t),this.splitBefore(t),this},t.prototype.length=function(){var t;return null==this.node?0:(t=this.text().length,this.isElement()&&(t+=this.node.querySelectorAll(Object.keys(s.EMBED_TAGS).join(",")).length),t)},t.prototype.merge=function(t){var e;return e=s(t),this.isElement()?(e.moveChildren(this.node),this.normalize()):this.text(this.text()+e.text()),e.remove(),this},t.prototype.moveChildren=function(t){return o.each(this.childNodes(),function(e){return t.appendChild(e)}),this},t.prototype.nextLineNode=function(t){var e;return e=this.node.nextSibling,null==e&&this.node.parentNode!==t&&(e=this.node.parentNode.nextSibling),null!=e&&null!=s.LIST_TAGS[e.tagName]&&(e=e.firstChild),e},t.prototype.normalize=function(){var t,e,n,r;for(e=this.node.firstChild;null!=e;)r=e.nextSibling,t=s(e),null!=r&&s(r).isTextNode()&&(0===t.text().length?t.remove():t.isTextNode()&&(n=r.nextSibling,t.merge(r),r=n)),e=r;return this},t.prototype.on=function(t,e){return this.node.addEventListener(t,function(n){return function(r){var i,o;return i=!l||"keydown"!==t&&"keyup"!==t?r:l,o=e.call(n.node,i),o||(r.preventDefault(),r.stopPropagation()),o}}(this)),this},t.prototype.remove=function(){var t;return null!=(t=this.node.parentNode)&&t.removeChild(this.node),this.node=null,null},t.prototype.removeClass=function(t){var e;if(this.hasClass(t))return null!=this.node.classList?this.node.classList.remove(t):null!=this.node.className&&(e=this.classes(),e.splice(e.indexOf(t),1),this.node.className=e.join(" ")),this.node.getAttribute("class")||this.node.removeAttribute("class"),this},t.prototype.replace=function(t){return this.node.parentNode.replaceChild(t,this.node),this.node=t,this},t.prototype.splitBefore=function(t,e){var n,r,i,o;if(null==e&&(e=!1),this.node===t||this.node.parentNode===t)return this;if(null!=this.node.previousSibling||e){for(i=this.node.parentNode,r=i.cloneNode(!1),i.parentNode.insertBefore(r,i.nextSibling),o=this.node;null!=o;)n=o.nextSibling,r.appendChild(o),o=n;return s(r).splitBefore(t)}return s(this.node.parentNode).splitBefore(t)},t.prototype.split=function(t,e){var n,r,i,o,l,u,a,c,h,f;if(null==e&&(e=!1),a=this.length(),t=Math.max(0,t),t=Math.min(t,a),!e&&0===t)return[this.node.previousSibling,this.node,!1];if(!e&&t===a)return[this.node,this.node.nextSibling,!1];if(this.node.nodeType===s.TEXT_NODE)return n=this.node.splitText(t),[this.node,n,!0];for(l=this.node,f=this.node.cloneNode(!1),this.node.parentNode.insertBefore(f,l.nextSibling),c=this.child(t),r=c[0],t=c[1],h=s(r).split(t),i=h[0],o=h[1];null!==o;)u=o.nextSibling,f.appendChild(o),o=u;return[l,f,!0]},t.prototype.styles=function(t,e){var n,r;return null==e&&(e=!1),t?(e||(t=o.defaults(t,this.styles())),r=o.map(t,function(t,e){return e+": "+t}).join("; ")+";",this.node.setAttribute("style",r),this):(r=this.node.getAttribute("style")||"",n=o.reduce(r.split(";"),function(t,e){var n,r,i;return r=e.split(":"),n=r[0],i=r[1],n&&i&&(n=n.trim(),i=i.trim(),t[n.toLowerCase()]=i),t},{}))},t.prototype.switchTag=function(t){var e,n;return t=t.toUpperCase(),this.node.tagName===t?this:(n=document.createElement(t),e=this.attributes(),null==s.VOID_TAGS[t]&&this.moveChildren(n),this.replace(n),this.node=n,this.attributes(e))},t.prototype.text=function(t){if(null!=t){switch(this.node.nodeType){case s.ELEMENT_NODE:this.node.textContent=t;break;case s.TEXT_NODE:this.node.data=t}return this}switch(this.node.nodeType){case s.ELEMENT_NODE:return this.node.tagName===s.DEFAULT_BREAK_TAG?"":null!=s.EMBED_TAGS[this.node.tagName]?s.EMBED_TEXT:null!=this.node.textContent?this.node.textContent:"";case s.TEXT_NODE:return this.node.data||"";default:return""}},t.prototype.textNodes=function(){var t,e,n;for(n=document.createTreeWalker(this.node,NodeFilter.SHOW_TEXT,null,!1),e=[];t=n.nextNode();)e.push(t);return e},t.prototype.toggleClass=function(t,e){return null==e&&(e=!this.hasClass(t)),e?this.addClass(t):this.removeClass(t),this},t.prototype.trigger=function(t,e){var n,r,i;return null==e&&(e={}),["keypress","keydown","keyup"].indexOf(t)<0?(n=document.createEvent("Event"),n.initEvent(t,e.bubbles,e.cancelable)):(n=document.createEvent("KeyboardEvent"),l=o.clone(e),l.which=o.isNumber(e.key)?e.key:o.isString(e.key)?e.key.toUpperCase().charCodeAt(0):0,s.isIE(10)?(i=[],e.altKey&&i.push("Alt"),e.ctrlKey&&i.push("Control"),e.metaKey&&i.push("Meta"),e.shiftKey&&i.push("Shift"),n.initKeyboardEvent(t,e.bubbles,e.cancelable,window,0,0,i.join(" "),null,null)):(r=o.isFunction(n.initKeyboardEvent)?"initKeyboardEvent":"initKeyEvent",n[r](t,e.bubbles,e.cancelable,window,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,0))),this.node.dispatchEvent(n),l=null,this},t.prototype.unwrap=function(){var t,e;return e=this.node.firstChild,t=this.node.nextSibling,o.each(this.childNodes(),function(e){return function(n){return e.node.parentNode.insertBefore(n,t)}}(this)),this.remove(),e},t.prototype.wrap=function(t){var e;for(null!=this.node.parentNode&&this.node.parentNode.insertBefore(t,this.node),e=t;null!=e.firstChild;)e=t.firstChild;return e.appendChild(this.node),this},t}(),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype["default"]=function(){return this.node.querySelector("option[selected]")},e.prototype.option=function(t,e){var n,r,i,s,l,u;if(null==e&&(e=!0),u=o.isElement(t)?t.value:t){for(u=u.replace(/[^\w]+/g,""),l=this.node.children,r=i=0,s=l.length;s>i;r=++i)if(n=l[r],n.value.replace(/[^\w]+/g,"")===u){this.node.selectedIndex=r;break}}else this.node.selectedIndex=-1;return e&&this.trigger("change"),this},e.prototype.reset=function(t){var e;return null==t&&(t=!0),e=this["default"](),null!=e?e.selected=!0:this.node.selectedIndex=0,t&&this.trigger("change"),this},e.prototype.value=function(){return this.node.selectedIndex>-1?this.node.options[this.node.selectedIndex].value:""},e}(i),s=function(t){return"SELECT"===(null!=t?t.tagName:void 0)?new r(t):new i(t)},s=o.extend(s,{ELEMENT_NODE:1,NOBREAK_SPACE:" ",TEXT_NODE:3,ZERO_WIDTH_NOBREAK_SPACE:"\ufeff",DEFAULT_BLOCK_TAG:"DIV",DEFAULT_BREAK_TAG:"BR",DEFAULT_INLINE_TAG:"SPAN",EMBED_TEXT:"!",FONT_SIZES:{"10px":1,"13px":2,"16px":3,"18px":4,"24px":5,"32px":6,"48px":7},KEYS:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},BLOCK_TAGS:{ADDRESS:"ADDRESS",ARTICLE:"ARTICLE",ASIDE:"ASIDE",AUDIO:"AUDIO",BLOCKQUOTE:"BLOCKQUOTE",CANVAS:"CANVAS",DD:"DD",DIV:"DIV",DL:"DL",FIGCAPTION:"FIGCAPTION",FIGURE:"FIGURE",FOOTER:"FOOTER",FORM:"FORM",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",HEADER:"HEADER",HGROUP:"HGROUP",LI:"LI",OL:"OL",OUTPUT:"OUTPUT",P:"P",PRE:"PRE",SECTION:"SECTION",TABLE:"TABLE",TBODY:"TBODY",TD:"TD",TFOOT:"TFOOT",TH:"TH",THEAD:"THEAD",TR:"TR",UL:"UL",VIDEO:"VIDEO"},EMBED_TAGS:{IMG:"IMG"},LINE_TAGS:{DIV:"DIV",LI:"LI"},LIST_TAGS:{OL:"OL",UL:"UL"},VOID_TAGS:{AREA:"AREA",BASE:"BASE",BR:"BR",COL:"COL",COMMAND:"COMMAND",EMBED:"EMBED",HR:"HR",IMG:"IMG",INPUT:"INPUT",KEYGEN:"KEYGEN",LINK:"LINK",META:"META",PARAM:"PARAM",SOURCE:"SOURCE",TRACK:"TRACK",WBR:"WBR"},convertFontSize:function(t){var e,n,r,i;o.isString(t)&&t.indexOf("px")>-1?(r=Object.keys(s.FONT_SIZES),i=o.values(s.FONT_SIZES)):(i=Object.keys(s.FONT_SIZES),r=o.values(s.FONT_SIZES));for(e in r)if(n=r[e],parseInt(t)<=parseInt(n))return i[e];return o.last(i)},isIE:function(t){var e;return e=document.documentMode,e&&t>=e},isIOS:function(){return/iPhone|iPad/i.test(navigator.userAgent)},isMac:function(){return/Mac/i.test(navigator.platform)}}),e.exports=s},{lodash:1}],18:[function(t,e,n){var r,i;i=function(){function t(t){this.data=t,this.prev=this.next=null}return t}(),r=function(){function t(){this.length=0,this.first=this.last=null}return t.Node=i,t.prototype.append=function(t){return null!=this.first?(t.next=null,this.last.next=t):this.first=t,t.prev=this.last,this.last=t,this.length+=1},t.prototype.insertAfter=function(t,e){return e.prev=t,null!=t?(e.next=t.next,null!=t.next&&(t.next.prev=e),t.next=e,t===this.last&&(this.last=e)):(e.next=this.first,this.first.prev=e,this.first=e),this.length+=1},t.prototype.remove=function(t){return this.length>1?(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.first&&(this.first=t.next),t===this.last&&(this.last=t.prev)):this.first=this.last=null,t.prev=t.next=null,this.length-=1},t.prototype.toArray=function(){var t,e;for(t=[],e=this.first;null!=e;)t.push(e),e=e.next;return t},t}(),e.exports=r},{}],19:[function(t,e,n){var r,i,o;i=t("lodash"),o=t("./dom"),r=function(){function t(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),o(this.container).addClass("ql-picker"),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),o(document).on("click",function(t){return function(){return t.close(),!0}}(this)),o(this.label).on("click",function(t){return function(){return i.defer(function(){return o(t.container).toggleClass("ql-expanded")}),!1}}(this)),o(this.select).on("change",function(t){return function(){var e,n;return t.select.selectedIndex>-1&&(e=t.container.querySelectorAll(".ql-picker-item")[t.select.selectedIndex],n=t.select.options[t.select.selectedIndex]),t.selectItem(e,!1),o(t.label).toggleClass("ql-active",n!==o(t.select)["default"]())}}(this))}return t.TEMPLATE='',t.prototype.buildItem=function(t,e,n){var r;return r=document.createElement("span"),r.setAttribute("data-value",e.getAttribute("value")),o(r).addClass("ql-picker-item").text(o(e).text()).on("click",function(t){return function(){return t.selectItem(r,!0),t.close()}}(this)),this.select.selectedIndex===n&&this.selectItem(r,!1),r},t.prototype.buildPicker=function(){var e;return i.each(o(this.select).attributes(),function(t){return function(e,n){return t.container.setAttribute(n,e)}}(this)),this.container.innerHTML=t.TEMPLATE,this.label=this.container.querySelector(".ql-picker-label"),e=this.container.querySelector(".ql-picker-options"),i.each(this.select.options,function(t){return function(n,r){var i;return i=t.buildItem(e,n,r),e.appendChild(i)}}(this))},t.prototype.close=function(){return o(this.container).removeClass("ql-expanded")},t.prototype.selectItem=function(t,e){var n,r;return n=this.container.querySelector(".ql-selected"),null!=n&&o(n).removeClass("ql-selected"),null!=t?(r=t.getAttribute("data-value"),o(t).addClass("ql-selected"),o(this.label).text(o(t).text()),o(this.select).option(r,e),this.label.setAttribute("data-value",r)):(this.label.innerHTML=" ",this.label.removeAttribute("data-value"))},t}(),e.exports=r},{"./dom":17,lodash:1}],20:[function(t,e,n){var r,i;i=t("lodash"),r=function(){function t(t,e){this.start=t,this.end=e}return t.compare=function(t,e){return t===e?!0:null==t||null==e?!1:t.equals(e)},t.prototype.equals=function(t){return null==t?!1:this.start===t.start&&this.end===t.end},t.prototype.shift=function(t,e){var n;return n=i.map([this.start,this.end],function(n){return t>n?n:e>=0?n+e:Math.max(t,n+e)}),this.start=n[0],this.end=n[1],n},t.prototype.isCollapsed=function(){return this.start===this.end},t}(),e.exports=r},{lodash:1}],21:[function(t,e,n){var r,i,o,s,l;o=t("../quill"),s=o.require("lodash"),l=o.require("dom"),i=o.require("delta"),r=function(){function t(t,e){this.quill=t,this.options=e,null!=this.options.button&&this.attachButton(this.options.button),this.options.enabled&&this.enable(),this.quill.addFormat("author",{"class":"author-"}),null!=this.options.authorId&&(this.quill.on(this.quill.constructor.events.PRE_EVENT,function(t){return function(e,n,r){var l,u;return e===t.quill.constructor.events.TEXT_CHANGE&&"user"===r?(l=new i,u={author:t.options.authorId},s.each(n.ops,function(e){return null==e["delete"]?null!=e.insert||null!=e.retain&&null!=e.attributes?(e.attributes||(e.attributes={}),e.attributes.author=t.options.authorId,l.retain(e.retain||e.insert.length||1,u)):l.retain(e.retain):void 0}),t.quill.updateContents(l,o.sources.SILENT)):void 0}}(this)),this.addAuthor(this.options.authorId,this.options.color))}return t.DEFAULTS={authorId:null,color:"transparent",enabled:!1},t.prototype.addAuthor=function(t,e){var n;return n={},n[".authorship .author-"+t]={"background-color":""+e},this.quill.theme.addStyles(n)},t.prototype.attachButton=function(t){var e;return e=l(t),e.on("click",function(t){return function(){return e.toggleClass("ql-on"),t.enable($dom.hasClass("ql-on"))}}(this))},t.prototype.enable=function(t){return null==t&&(t=!0),l(this.quill.root).toggleClass("authorship",t)},t.prototype.disable=function(){return this.enable(!1)},t}(),o.registerModule("authorship",r),e.exports=r},{"../quill":30}],22:[function(t,e,n){var r,i,o,s,l,u,a,c=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;o=t("../quill"),l=t("./tooltip"),u=o.require("lodash"),a=o.require("dom"),r=o.require("delta"),s=o.require("range"),i=function(t){function e(t,n){this.quill=t,this.options=n,this.options=u.defaults(this.options,l.DEFAULTS),e.__super__.constructor.call(this,this.quill,this.options),this.preview=this.container.querySelector(".preview"),this.textbox=this.container.querySelector(".input"),a(this.container).addClass("ql-image-tooltip"),this.initListeners()}return c(e,t),e.DEFAULTS={template:'
Preview
Cancel Insert'},e.prototype.initListeners=function(){return a(this.quill.root).on("focus",u.bind(this.hide,this)),a(this.container.querySelector(".insert")).on("click",u.bind(this.insertImage,this)),a(this.container.querySelector(".cancel")).on("click",u.bind(this.hide,this)),a(this.textbox).on("input",u.bind(this._preview,this)),this.initTextbox(this.textbox,this.insertImage,this.hide),this.quill.onModuleLoad("toolbar",function(t){return function(e){return t.toolbar=e,e.initFormat("image",u.bind(t._onToolbar,t))}}(this))},e.prototype.insertImage=function(){var t,e;return e=this._normalizeURL(this.textbox.value),null==this.range&&(this.range=new s(0,0)),this.range&&(this.preview.innerHTML="Preview",this.textbox.value="",t=this.range.end,this.quill.insertEmbed(t,"image",e,"user"),this.quill.setSelection(t+1,t+1)),this.hide()},e.prototype._onToolbar=function(t,e){return e?(this.textbox.value||(this.textbox.value="http://"),this.show(),this.textbox.focus(),u.defer(function(t){return function(){return t.textbox.setSelectionRange(t.textbox.value.length,t.textbox.value.length)}}(this))):(this.quill.deleteText(t,"user"),this.toolbar.setActive("image",!1))},e.prototype._preview=function(){var t;if(this._matchImageURL(this.textbox.value))return"IMG"===this.preview.firstChild.tagName?this.preview.firstChild.setAttribute("src",this.textbox.value):(t=document.createElement("img"),t.setAttribute("src",this.textbox.value),this.preview.replaceChild(t,this.preview.firstChild))},e.prototype._matchImageURL=function(t){return/^https?:\/\/.+\.(jpe?g|gif|png)$/.test(t)},e.prototype._normalizeURL=function(t){return/^https?:\/\//.test(t)||(t="http://"+t),t},e}(l),o.registerModule("image-tooltip",i),e.exports=i},{"../quill":30,"./tooltip":28}],23:[function(t,e,n){var r,i,o,s,l;o=t("../quill"),s=o.require("lodash"),l=o.require("dom"),r=o.require("delta"),i=function(){function t(t,e){this.quill=t,this.hotkeys={},this._initListeners(),this._initHotkeys(),this.quill.onModuleLoad("toolbar",function(t){return function(e){return t.toolbar=e}}(this))}return t.hotkeys={BOLD:{key:"B",metaKey:!0},INDENT:{key:l.KEYS.TAB},ITALIC:{key:"I",metaKey:!0},OUTDENT:{key:l.KEYS.TAB,shiftKey:!0},UNDERLINE:{key:"U",metaKey:!0}},t.prototype.addHotkey=function(t,e){return Array.isArray(t)||(t=[t]),s.each(t,function(t){return function(n){var r,i;return n=s.isObject(n)?s.clone(n):{key:n},n.callback=e,i=s.isNumber(n.key)?n.key:n.key.toUpperCase().charCodeAt(0),null==(r=t.hotkeys)[i]&&(r[i]=[]),t.hotkeys[i].push(n)}}(this))},t.prototype.removeHotkeys=function(e,n){var r,i,o,l,u;return e=s.isString(e)?e.toUpperCase():e,e=t.hotkeys[e]?t.hotkeys[e]:e,e=s.isObject(e)?e:{key:e},u=s.isNumber(e.key)?e.key:e.key.charCodeAt(0),null==(r=this.hotkeys)[u]&&(r[u]=[]),o=s.partition(this.hotkeys[u],function(t){return s.isEqual(e,s.omit(t,"callback"))&&(!n||n===t.callback)}),l=o[0],i=o[1],this.hotkeys[u]=i,s.map(l,"callback")},t.prototype.toggleFormat=function(t,e){var n,r;return n=t.isCollapsed()?this.quill.getContents(Math.max(0,t.start-1),t.end):this.quill.getContents(t),r=0===n.ops.length||!s.all(n.ops,function(t){var n;return null!=(n=t.attributes)?n[e]:void 0}),t.isCollapsed()?this.quill.prepareFormat(e,r,o.sources.USER):this.quill.formatText(t,e,r,o.sources.USER),null!=this.toolbar?this.toolbar.setActive(e,r):void 0},t.prototype._initEnter=function(){var t;return t=[{key:l.KEYS.ENTER},{key:l.KEYS.ENTER,shiftKey:!0}],this.addHotkey(t,function(t){return function(e,n){var i,l,u,a,c,h;return null==e?!0:(c=t.quill.editor.doc.findLineAt(e.start),u=c[0],a=c[1],h=u.findLeafAt(a),l=h[0],a=h[1],i=(new r).retain(e.start).insert("\n",u.formats)["delete"](e.end-e.start),t.quill.updateContents(i,o.sources.USER),s.each(l.formats,function(e,n){t.quill.prepareFormat(n,e),null!=t.toolbar&&t.toolbar.setActive(n,e)}),t.quill.editor.selection.scrollIntoView(),!1)}}(this))},t.prototype._initDeletes=function(){return this.addHotkey([l.KEYS.DELETE,l.KEYS.BACKSPACE],function(t){return function(e,n){var r,i,s,u;return null!=e&&t.quill.getLength()>0&&(e.start!==e.end?t.quill.deleteText(e.start,e.end,o.sources.USER):n.key===l.KEYS.BACKSPACE?(u=t.quill.editor.doc.findLineAt(e.start),i=u[0],s=u[1],0===s&&(i.formats.bullet||i.formats.list)?(r=i.formats.bullet?"bullet":"list",t.quill.formatLine(e.start,e.start,r,!1,o.sources.USER)):e.start>0&&t.quill.deleteText(e.start-1,e.start,o.sources.USER)):e.startVisit URL:   -  Change Remove Done'},e.hotkeys={LINK:{key:"K",metaKey:!0}},e.prototype.initListeners=function(){return this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,function(t){return function(e){var n;if(null!=e&&e.isCollapsed())return n=t._findAnchor(e),n?(t.setMode(n.href,!1),t.show(n)):t.container.style.left!==o.HIDE_MARGIN?(t.range=null,t.hide()):void 0}}(this)),l(this.container.querySelector(".done")).on("click",s.bind(this.saveLink,this)),l(this.container.querySelector(".remove")).on("click",function(t){return function(){return t.removeLink(t.range)}}(this)),l(this.container.querySelector(".change")).on("click",function(t){return function(){return t.setMode(t.link.href,!0)}}(this)),this.initTextbox(this.textbox,this.saveLink,this.hide),this.quill.onModuleLoad("toolbar",function(t){return function(e){return t.toolbar=e,e.initFormat("link",s.bind(t._onToolbar,t))}}(this)),this.quill.onModuleLoad("keyboard",function(t){return function(n){return n.addHotkey(e.hotkeys.LINK,s.bind(t._onKeyboard,t))}}(this))},e.prototype.saveLink=function(){var t,e,n;return n=this._normalizeURL(this.textbox.value),null!=this.range&&(e=this.range.end,this.range.isCollapsed()?(t=this._findAnchor(this.range),null!=t&&(t.href=n)):this.quill.formatText(this.range,"link",n,"user"),this.quill.setSelection(e,e)),this.setMode(n,!1)},e.prototype.removeLink=function(t){return t.isCollapsed()&&(t=this._expandRange(t)),this.hide(),this.quill.formatText(t,"link",!1,"user"),null!=this.toolbar?this.toolbar.setActive("link",!1):void 0},e.prototype.setMode=function(t,e){var n;return null==e&&(e=!1),e?(this.textbox.value=t,s.defer(function(e){return function(){return e.textbox.focus(),e.textbox.setSelectionRange(0,t.length)}}(this))):(this.link.href=t,t=this.link.href,n=t.length>this.options.maxLength?t.slice(0,this.options.maxLength)+"...":t,l(this.link).text(n)),l(this.container).toggleClass("editing",e)},e.prototype._findAnchor=function(t){var e,n,r,i;for(i=this.quill.editor.doc.findLeafAt(t.start,!0),e=i[0],r=i[1],null!=e&&(n=e.node);null!=n&&n!==this.quill.root;){if("A"===n.tagName)return n;n=n.parentNode}return null},e.prototype._expandRange=function(t){var e,n,r,i,o;return i=this.quill.editor.doc.findLeafAt(t.start,!0),n=i[0],r=i[1],o=t.start-r,e=o+n.length,{start:o,end:e}},e.prototype._onToolbar=function(t,e){return this._toggle(t,e)},e.prototype._onKeyboard=function(){var t;return t=this.quill.getSelection(),this._toggle(t,!this._findAnchor(t))},e.prototype._toggle=function(t,e){var n;if(t)return e?t.isCollapsed()?void 0:(this.setMode(this._suggestURL(t),!0),n=this.quill.editor.selection._getNativeRange(),this.show(n)):this.removeLink(t)},e.prototype._normalizeURL=function(t){return/^(https?:\/\/|mailto:)/.test(t)||(t="http://"+t),t},e.prototype._suggestURL=function(t){var e;return e=this.quill.getText(t),this._normalizeURL(e)},e}(o),i.registerModule("link-tooltip",r),e.exports=r},{"../quill":30,"./tooltip":28}],25:[function(t,e,n){var r,i,o,s,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;o=t("../quill"),r=t("eventemitter2").EventEmitter2,s=o.require("lodash"),l=o.require("dom"),i=function(t){function e(t,e){this.quill=t,this.options=e,this.cursors={},this.container=this.quill.addContainer("ql-multi-cursor",!0),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,s.bind(this._applyDelta,this))}return u(e,t),e.DEFAULTS={template:' ',timeout:2500},e.events={CURSOR_ADDED:"cursor-addded",CURSOR_MOVED:"cursor-moved",CURSOR_REMOVED:"cursor-removed"},e.prototype.clearCursors=function(){return s.each(Object.keys(this.cursors),s.bind(this.removeCursor,this)),this.cursors={}},e.prototype.moveCursor=function(t,e){var n;return n=this.cursors[t],null!=n?(n.index=e,l(n.elem).removeClass("hidden"),clearTimeout(n.timer),n.timer=setTimeout(function(t){return function(){return l(n.elem).addClass("hidden"),n.timer=null}}(this),this.options.timeout),this._updateCursor(n),n):void 0},e.prototype.removeCursor=function(t){var n;return n=this.cursors[t],this.emit(e.events.CURSOR_REMOVED,n),null!=n&&n.elem.parentNode.removeChild(n.elem),delete this.cursors[t]},e.prototype.setCursor=function(t,n,r,i){var o;return null==this.cursors[t]&&(this.cursors[t]=o={userId:t,index:n,color:i,elem:this._buildCursor(r,i)},this.emit(e.events.CURSOR_ADDED,o)),s.defer(function(e){return function(){return e.moveCursor(t,n)}}(this)),this.cursors[t]},e.prototype.shiftCursors=function(t,e,n){return null==n&&(n=null),s.each(this.cursors,function(r){return function(i,o){var s;if(i)return s=Math.max(e,t-i.index),i.userId===n?r.moveCursor(n,i.index+s):i.index>t?i.index+=s:void 0}}(this))},e.prototype.update=function(){return s.each(this.cursors,function(t){return function(e,n){return null!=e?(t._updateCursor(e),!0):void 0}}(this))},e.prototype._applyDelta=function(t){var e;return e=0,s.each(t.ops,function(t){return function(n){var r,i;return r=0,null!=n.insert?(r=n.insert.length||1,t.shiftCursors(e,r,null!=(i=n.attributes)?i.author:void 0)):null!=n["delete"]?t.shiftCursors(e,-1*n["delete"],null):null!=n.retain&&(t.shiftCursors(e,0,null),r=n.retain),e+=r}}(this)),this.update()},e.prototype._buildCursor=function(t,e){var n,r,i,o;return n=document.createElement("span"),l(n).addClass("cursor"),n.innerHTML=this.options.template,i=n.querySelector(".cursor-flag"),o=n.querySelector(".cursor-name"),l(o).text(t),r=n.querySelector(".cursor-caret"),r.style.backgroundColor=o.style.backgroundColor=e,this.container.appendChild(n),n},e.prototype._updateCursor=function(t){ +var n,r;return n=this.quill.getBounds(t.index),null==n?this.removeCursor(t.userId):(t.elem.style.top=n.top+this.quill.container.scrollTop+"px",t.elem.style.left=n.left+"px",t.elem.style.height=n.height+"px",r=t.elem.querySelector(".cursor-flag"),l(t.elem).toggleClass("top",parseInt(t.elem.style.top)<=r.offsetHeight).toggleClass("left",parseInt(t.elem.style.left)<=r.offsetWidth).toggleClass("right",this.quill.root.offsetWidth-parseInt(t.elem.style.left)<=r.offsetWidth),this.emit(e.events.CURSOR_MOVED,t))},e}(r),o.registerModule("multi-cursor",i),e.exports=i},{"../quill":30,eventemitter2:2}],26:[function(t,e,n){var r,i,o,s,l,u,a=function(t,e){return function(){return t.apply(e,arguments)}};s=t("../quill"),i=t("../core/document"),l=s.require("lodash"),u=s.require("dom"),r=s.require("delta"),o=function(){function t(e,n){var r;this.quill=e,this._onConvert=a(this._onConvert,this),this.container=this.quill.addContainer("ql-paste-manager"),this.container.setAttribute("contenteditable",!0),this.container.setAttribute("tabindex","-1"),u(this.quill.root).on("paste",l.bind(this._paste,this)),this.options=l.defaults(n,t.DEFAULTS),null==(r=this.options).onConvert&&(r.onConvert=this._onConvert)}return t.DEFAULTS={onConvert:null},t.prototype._onConvert=function(t){var e,n,o;return n=new i(t,this.quill.options),e=n.toDelta(),o=e.length(),0===o?e:e.compose((new r).retain(o-1)["delete"](1))},t.prototype._paste=function(){var t,e;return t=this.quill.getLength(),e=this.quill.getSelection(),null!=e?(this.container.focus(),l.defer(function(t){return function(){var n,r;return n=t.options.onConvert(t.container),r=n.length(),r>0&&(e.start>0&&n.ops.unshift({retain:e.start}),n["delete"](e.end-e.start),t.quill.updateContents(n,"user")),t.quill.setSelection(e.start+r,e.start+r),t.quill.editor.selection.scrollIntoView(),t.container.innerHTML=""}}(this))):void 0},t}(),s.registerModule("paste-manager",o),e.exports=o},{"../core/document":8,"../quill":30}],27:[function(t,e,n){var r,i,o,s;r=t("../quill"),o=r.require("lodash"),s=r.require("dom"),i=function(){function t(e,n){if(this.quill=e,this.options=n,(o.isString(this.options)||o.isElement(this.options))&&(this.options={container:this.options}),null==this.options.container)throw new Error("container required for toolbar",this.options);this.container=o.isString(this.options.container)?document.querySelector(this.options.container):this.options.container,this.inputs={},this.preventUpdate=!1,this.triggering=!1,o.each(this.quill.options.formats,function(e){return function(n){return null==t.formats.TOOLTIP[n]?e.initFormat(n,o.bind(e._applyFormat,e,n)):void 0}}(this)),this.quill.on(r.events.FORMAT_INIT,function(e){return function(n){return null==t.formats.TOOLTIP[n]?e.initFormat(n,o.bind(e._applyFormat,e,n)):void 0}}(this)),this.quill.on(r.events.SELECTION_CHANGE,function(t){return function(e){return null!=e?t.updateActive(e):void 0}}(this)),this.quill.on(r.events.TEXT_CHANGE,function(t){return function(){return t.updateActive()}}(this)),this.quill.onModuleLoad("keyboard",function(t){return function(e){return e.addHotkey([s.KEYS.BACKSPACE,s.KEYS.DELETE],function(){return o.defer(o.bind(t.updateActive,t))})}}(this)),s(this.container).addClass("ql-toolbar"),s.isIOS()&&s(this.container).addClass("ios")}return t.DEFAULTS={container:null},t.formats={LINE:{align:"align",bullet:"bullet",list:"list"},SELECT:{align:"align",background:"background",color:"color",font:"font",size:"size"},TOGGLE:{bold:"bold",bullet:"bullet",image:"image",italic:"italic",link:"link",list:"list",strike:"strike",underline:"underline"},TOOLTIP:{image:"image",link:"link"}},t.prototype.initFormat=function(e,n){var r,i,o;return o=".ql-"+e,null!=t.formats.SELECT[e]?(o="select"+o,r="change"):r="click",i=this.container.querySelector(o),null!=i?(this.inputs[e]=i,s(i).on(r,function(t){return function(){var e,o;return o="change"===r?s(i).value():!s(i).hasClass("ql-active"),t.preventUpdate=!0,t.quill.focus(),e=t.quill.getSelection(),null!=e&&n(e,o),s.isIE(11)&&t.quill.editor.selection.scrollIntoView(),t.preventUpdate=!1,!1}}(this))):void 0},t.prototype.setActive=function(t,e){var n,r,i,o;return"image"===t&&(e=!1),r=this.inputs[t],null!=r?(n=s(r),"SELECT"===r.tagName?(this.triggering=!0,o=n.value(r),null==e&&(e=null!=(i=n["default"]())?i.value:void 0),Array.isArray(e)&&(e=""),e!==o&&(null!=e?n.option(e):n.reset()),this.triggering=!1):n.toggleClass("ql-active",e||!1)):void 0},t.prototype.updateActive=function(t,e){var n;return null==e&&(e=null),t||(t=this.quill.getSelection()),null==t||this.preventUpdate?void 0:(n=this._getActive(t),o.each(this.inputs,function(t){return function(r,i){return(!Array.isArray(e)||e.indexOf(i)>-1)&&t.setActive(i,n[i]),!0}}(this)))},t.prototype._applyFormat=function(e,n,r){return this.triggering?void 0:(n.isCollapsed()?this.quill.prepareFormat(e,r,"user"):null!=t.formats.LINE[e]?this.quill.formatLine(n,e,r,"user"):this.quill.formatText(n,e,r,"user"),o.defer(function(t){return function(){return t.updateActive(n,["bullet","list"]),t.setActive(e,r)}}(this)))},t.prototype._getActive=function(t){var e,n;return e=this._getLeafActive(t),n=this._getLineActive(t),o.defaults({},e,n)},t.prototype._getLeafActive=function(t){var e,n,r,i,s;return t.isCollapsed()?(s=this.quill.editor.doc.findLineAt(t.start),r=s[0],i=s[1],e=0===i?this.quill.getContents(t.start,t.end+1):this.quill.getContents(t.start-1,t.end)):e=this.quill.getContents(t),n=o.map(e.ops,"attributes"),this._intersectFormats(n)},t.prototype._getLineActive=function(t){var e,n,r,i,s,l;for(n=[],s=this.quill.editor.doc.findLineAt(t.start),e=s[0],i=s[1],l=this.quill.editor.doc.findLineAt(t.end),r=l[0],i=l[1],null!=r&&r===e&&(r=r.next);null!=e&&e!==r;)n.push(o.clone(e.formats)),e=e.next;return this._intersectFormats(n)},t.prototype._intersectFormats=function(e){return o.reduce(e.slice(1),function(e,n){var r,i,s,l,u;return null==n&&(n={}),r=Object.keys(e),s=null!=n?Object.keys(n):{},l=o.intersection(r,s),u=o.difference(r,s),i=o.difference(s,r),o.each(l,function(r){if(null!=t.formats.SELECT[r])if(Array.isArray(e[r])){if(e[r].indexOf(n[r])<0)return e[r].push(n[r])}else if(e[r]!==n[r])return e[r]=[e[r],n[r]]}),o.each(u,function(n){return null!=t.formats.TOGGLE[n]?delete e[n]:null==t.formats.SELECT[n]||Array.isArray(e[n])?void 0:e[n]=[e[n]]}),o.each(i,function(r){return null!=t.formats.SELECT[r]?e[r]=[n[r]]:void 0}),e},e[0]||{})},t}(),r.registerModule("toolbar",i),e.exports=i},{"../quill":30}],28:[function(t,e,n){var r,i,o,s;r=t("../quill"),o=r.require("lodash"),s=r.require("dom"),i=function(){function t(e,n){this.quill=e,this.options=n,this.container=this.quill.addContainer("ql-tooltip"),this.container.innerHTML=this.options.template,this.hide(),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,function(e){return function(n,r){return e.container.style.left!==t.HIDE_MARGIN?(e.range=null,e.hide()):void 0}}(this))}return t.DEFAULTS={offset:10,template:""},t.HIDE_MARGIN="-10000px",t.prototype.initTextbox=function(t,e,n){return s(t).on("keydown",function(t){return function(r){switch(r.which){case s.KEYS.ENTER:return r.preventDefault(),e.call(t);case s.KEYS.ESCAPE:return r.preventDefault(),n.call(t);default:return!0}}}(this))},t.prototype.hide=function(){return this.container.style.left=t.HIDE_MARGIN,this.range&&this.quill.setSelection(this.range),this.range=null},t.prototype.position=function(t){var e,n,r,i,o,s,l;return null!=t?(s=t.getBoundingClientRect(),o=this.quill.container.getBoundingClientRect(),r=s.left-o.left,i=s.top-o.top,n=s.bottom-o.bottom,e=r+s.width/2-this.container.offsetWidth/2,l=i+s.height+this.options.offset,l+this.container.offsetHeight>this.quill.container.offsetHeight&&(l=i-this.container.offsetHeight-this.options.offset),e=Math.max(0,Math.min(e,this.quill.container.offsetWidth-this.container.offsetWidth)),l=Math.max(0,Math.min(l,this.quill.container.offsetHeight-this.container.offsetHeight))):(e=this.quill.container.offsetWidth/2-this.container.offsetWidth/2,l=this.quill.container.offsetHeight/2-this.container.offsetHeight/2),l+=this.quill.container.scrollTop,[e,l]},t.prototype.show=function(t){var e,n,r;return this.range=this.quill.getSelection(),n=this.position(t),e=n[0],r=n[1],this.container.style.left=e+"px",this.container.style.top=r+"px",this.container.focus()},t}(),r.registerModule("tooltip",i),e.exports=i},{"../quill":30}],29:[function(t,e,n){var r,i,o,s;i=t("../quill"),s=i.require("lodash"),r=i.require("delta"),o=function(){function t(t,e){this.quill=t,this.options=null!=e?e:{},this.lastRecorded=0,this.ignoreChange=!1,this.clear(),this.initListeners()}return t.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.hotkeys={UNDO:{key:"Z",metaKey:!0},REDO:{key:"Z",metaKey:!0,shiftKey:!0}},t.prototype.initListeners=function(){return this.quill.onModuleLoad("keyboard",function(e){return function(n){var r;return n.addHotkey(t.hotkeys.UNDO,function(){return e.quill.editor.checkUpdate(),e.undo(),!1}),r=[t.hotkeys.REDO],navigator.platform.indexOf("Win")>-1&&r.push({key:"Y",metaKey:!0}),n.addHotkey(r,function(){return e.quill.editor.checkUpdate(),e.redo(),!1})}}(this)),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,function(t){return function(e,n){return t.ignoreChange?void 0:(t.options.userOnly&&n!==i.sources.USER?t._transform(e):t.record(e,t.oldDelta),t.oldDelta=t.quill.getContents())}}(this))},t.prototype.clear=function(){return this.stack={undo:[],redo:[]},this.oldDelta=this.quill.getContents()},t.prototype.record=function(t,e){var n,r,i,o;if(t.ops.length>0){this.stack.redo=[];try{if(o=this.quill.getContents().diff(this.oldDelta),i=(new Date).getTime(),this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0?(n=this.stack.undo.pop(),o=o.compose(n.undo),t=n.redo.compose(t)):this.lastRecorded=i,this.stack.undo.push({redo:t,undo:o}),this.stack.undo.length>this.options.maxStack)return this.stack.undo.unshift()}catch(s){return r=s,console.warn("Could not record change... clearing undo stack."),this.clear()}}},t.prototype.redo=function(){return this._change("redo","undo")},t.prototype.undo=function(){return this._change("undo","redo")},t.prototype._getLastChangeIndex=function(t){var e,n;return n=0,e=0,s.each(t.ops,function(t){return null!=t.insert?n=Math.max(e+(t.insert.length||1),n):null!=t["delete"]?n=Math.max(e,n):null!=t.retain?(null!=t.attributes&&(n=Math.max(e+t.retain,n)),e+=t.retain):void 0}),n},t.prototype._change=function(t,e){var n,r;return this.stack[t].length>0?(n=this.stack[t].pop(),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],i.sources.USER),this.ignoreChange=!1,r=this._getLastChangeIndex(n[t]),this.quill.setSelection(r,r),this.oldDelta=this.quill.getContents(),this.stack[e].push(n)):void 0},t.prototype._transform=function(t){var e,n,r,i,o,s,l,u;for(this.oldDelta=t.transform(this.oldDelta,!0),s=this.stack.undo,n=0,i=s.length;i>n;n++)e=s[n],e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0);for(l=this.stack.redo,u=[],r=0,o=l.length;o>r;r++)e=l[r],e.undo=t.transform(e.undo,!0),u.push(e.redo=t.transform(e.redo,!0));return u},t}(),i.registerModule("undo-manager",o),e.exports=o},{"../quill":30}],30:[function(t,e,n){var r,i,o,s,l,u,a,c,h,f,p,d=function(t,e){function n(){this.constructor=t}for(var r in e)g.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},g={}.hasOwnProperty,v=[].slice;h=t("lodash"),p=t("../package.json"),r=t("rich-text/lib/delta"),s=t("eventemitter2").EventEmitter2,f=t("./lib/dom"),i=t("./core/document"),o=t("./core/editor"),l=t("./core/format"),u=t("./core/normalizer"),c=t("./lib/range"),a=function(t){function e(t,n){var r,i,s;if(this.container=t,null==n&&(n={}),h.isString(this.container)&&(this.container=document.querySelector(this.container)),null==this.container)throw new Error("Invalid Quill container");if(i=h.defaults(n.modules||{},e.DEFAULTS.modules),r=this.container.innerHTML,this.container.innerHTML="",this.options=h.defaults(n,e.DEFAULTS),this.options.modules=i,this.options.id=this.id="ql-editor-"+(e.editors.length+1),this.modules={},this.root=this.addContainer("ql-editor"),this.editor=new o(this.root,this,this.options),e.editors.push(this),this.setHTML(r,e.sources.SILENT),s=e.themes[this.options.theme],null==s)throw new Error("Cannot load "+this.options.theme+" theme. Are you sure you registered it?");this.theme=new s(this,this.options),h.each(this.options.modules,function(t){return function(e,n){return t.addModule(n,e)}}(this))}return d(e,t),e.version=p.version,e.editors=[],e.modules=[],e.themes=[],e.DEFAULTS={formats:["align","bold","italic","strike","underline","color","background","font","size","link","image","bullet","list"],modules:{keyboard:!0,"paste-manager":!0,"undo-manager":!0},pollInterval:100,readOnly:!1,styles:{},theme:"base"},e.events={FORMAT_INIT:"format-init",MODULE_INIT:"module-init",POST_EVENT:"post-event",PRE_EVENT:"pre-event",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},e.sources=o.sources,e.registerModule=function(t,n){return null!=e.modules[t]&&console.warn("Overwriting "+t+" module"),e.modules[t]=n},e.registerTheme=function(t,n){return null!=e.themes[t]&&console.warn("Overwriting "+t+" theme"),e.themes[t]=n},e.require=function(t){switch(t){case"lodash":return h;case"delta":return r;case"format":return l;case"normalizer":return u;case"dom":return f;case"document":return i;case"range":return c;default:return null}},e.prototype.destroy=function(){var t;return t=this.getHTML(),h.each(this.modules,function(t,e){return h.isFunction(t.destroy)?t.destroy():void 0}),this.editor.destroy(),this.removeAllListeners(),e.editors.splice(h.indexOf(e.editors,this),1),this.container.innerHTML=t},e.prototype.addContainer=function(t,e){var n,r;return null==e&&(e=!1),r=e?this.root:null,n=document.createElement("div"),f(n).addClass(t),this.container.insertBefore(n,r),n},e.prototype.addFormat=function(t,n){return this.editor.doc.addFormat(t,n),this.emit(e.events.FORMAT_INIT,t)},e.prototype.addModule=function(t,n){var r;if(r=e.modules[t],null==r)throw new Error("Cannot load "+t+" module. Are you sure you registered it?");return n===!0&&(n={}),n=h.defaults(n,this.theme.constructor.OPTIONS[t]||{},r.DEFAULTS||{}),this.modules[t]=new r(this,n),this.emit(e.events.MODULE_INIT,t,this.modules[t]),this.modules[t]},e.prototype.deleteText=function(t,n,i){var o,s,l;return null==i&&(i=e.sources.API),l=this._buildParams(t,n,{},i),t=l[0],n=l[1],s=l[2],i=l[3],n>t?(o=(new r).retain(t)["delete"](n-t),this.editor.applyDelta(o,i)):void 0},e.prototype.emit=function(){var t,n;return n=arguments[0],t=2<=arguments.length?v.call(arguments,1):[],e.__super__.emit.apply(this,[e.events.PRE_EVENT,n].concat(v.call(t))),e.__super__.emit.apply(this,[n].concat(v.call(t))),e.__super__.emit.apply(this,[e.events.POST_EVENT,n].concat(v.call(t)))},e.prototype.focus=function(){return this.editor.focus()},e.prototype.formatLine=function(t,e,n,r,i){var o,s,l,u,a;return u=this._buildParams(t,e,n,r,i),t=u[0],e=u[1],o=u[2],i=u[3],a=this.editor.doc.findLineAt(e),s=a[0],l=a[1],null!=s&&(e+=s.length-l),this.formatText(t,e,o,i)},e.prototype.formatText=function(t,e,n,i,o){var s,l,u;return u=this._buildParams(t,e,n,i,o),t=u[0],e=u[1],l=u[2],o=u[3],l=h.reduce(l,function(t){return function(e,n,r){var i;return i=t.editor.doc.formats[r],n&&n!==i.config["default"]||(e[r]=null),e}}(this),l),s=(new r).retain(t).retain(e-t,l),this.editor.applyDelta(s,o)},e.prototype.getBounds=function(t){return this.editor.getBounds(t)},e.prototype.getContents=function(t,e){return null==t&&(t=0),null==e&&(e=null),h.isObject(t)&&(e=t.end,t=t.start),this.editor.delta.slice(t,e)},e.prototype.getHTML=function(){return this.editor.doc.getHTML()},e.prototype.getLength=function(){return this.editor.length},e.prototype.getModule=function(t){return this.modules[t]},e.prototype.getSelection=function(){return this.editor.checkUpdate(),this.editor.selection.getRange()},e.prototype.getText=function(t,e){return null==t&&(t=0),null==e&&(e=null),h.map(this.getContents(t,e).ops,function(t){return h.isString(t.insert)?t.insert:""}).join("")},e.prototype.insertEmbed=function(t,e,n,i){var o,s,l,u;return u=this._buildParams(t,0,e,n,i),t=u[0],s=u[1],l=u[2],i=u[3],o=(new r).retain(t).insert(1,l),this.editor.applyDelta(o,i)},e.prototype.insertText=function(t,e,n,i,o){var s,l,u,a;return a=this._buildParams(t,0,n,i,o),t=a[0],l=a[1],u=a[2],o=a[3],e.length>0?(s=(new r).retain(t).insert(e,u),this.editor.applyDelta(s,o)):void 0},e.prototype.onModuleLoad=function(t,n){return this.modules[t]?n(this.modules[t]):this.on(e.events.MODULE_INIT,function(e,r){return e===t?n(r):void 0})},e.prototype.prepareFormat=function(t,n,r){var i,o;return null==r&&(r=e.sources.API),i=this.editor.doc.formats[t],null!=i&&(o=this.getSelection(),null!=o?o.isCollapsed():void 0)?i.isType(l.types.LINE)?this.formatLine(o,t,n,r):i.prepare(n):void 0},e.prototype.setContents=function(t,n){var i;return null==n&&(n=e.sources.API),t=new r(Array.isArray(t)?t.slice():t.ops.slice()),i=h.last(t.slice(t.length()-1).ops),t["delete"](this.getLength()-1),null!=i&&h.isString(i.insert)&&"\n"===h.last(i.insert)&&t["delete"](1),this.updateContents(t,n)},e.prototype.setHTML=function(t,n){return null==n&&(n=e.sources.API),t.trim()||(t="<"+f.DEFAULT_BLOCK_TAG+"><"+f.DEFAULT_BREAK_TAG+">"),this.editor.doc.setHTML(t),this.editor.checkUpdate(n)},e.prototype.setSelection=function(t,n,r){var i;return null==r&&(r=e.sources.API),h.isNumber(t)&&h.isNumber(n)?i=new c(t,n):(i=t,r=n||r),this.editor.selection.setRange(i,r)},e.prototype.setText=function(t,n){var i;return null==n&&(n=e.sources.API),i=(new r).insert(t),this.setContents(i,n)},e.prototype.updateContents=function(t,n){return null==n&&(n=e.sources.API),Array.isArray(t)&&(t={ops:t}),this.editor.applyDelta(t,n)},e.prototype._buildParams=function(){var t,n;return n=1<=arguments.length?v.call(arguments,0):[],h.isObject(n[0])&&n.splice(0,1,n[0].start,n[0].end),h.isString(n[2])&&(t={},t[n[2]]=n[3],n.splice(2,2,t)),null==n[3]&&(n[3]=e.sources.API),n},e}(s),a.registerTheme("base",t("./themes/base")),a.registerTheme("snow",t("./themes/snow")),e.exports=a},{"../package.json":7,"./core/document":8,"./core/editor":9,"./core/format":10,"./core/normalizer":13,"./lib/dom":17,"./lib/range":20,"./themes/base":32,"./themes/snow":33,eventemitter2:2,lodash:1,"rich-text/lib/delta":3}],31:[function(t,e,n){e.exports='.ql-image-tooltip{padding:10px;width:300px}.ql-image-tooltip:after{clear:both;content:"";display:table}.ql-image-tooltip a{border:1px solid #000;box-sizing:border-box;display:inline-block;float:left;padding:5px;text-align:center;width:50%}.ql-image-tooltip img{bottom:0;left:0;margin:auto;max-height:100%;max-width:100%;position:absolute;right:0;top:0}.ql-image-tooltip .input{box-sizing:border-box;width:100%}.ql-image-tooltip .preview{margin:10px 0;position:relative;border:1px dashed #000;height:200px}.ql-image-tooltip .preview span{display:inline-block;position:absolute;text-align:center;top:40%;width:100%}.ql-link-tooltip{padding:5px 10px}.ql-link-tooltip input.input{width:170px}.ql-link-tooltip a.done,.ql-link-tooltip input.input{display:none}.ql-link-tooltip a.change{margin-right:4px}.ql-link-tooltip.editing a.done,.ql-link-tooltip.editing input.input{display:inline-block}.ql-link-tooltip.editing a.change,.ql-link-tooltip.editing a.remove,.ql-link-tooltip.editing a.url{display:none}.ql-multi-cursor{position:absolute;left:0;top:0;z-index:1000}.ql-multi-cursor .cursor{margin-left:-1px;position:absolute}.ql-multi-cursor .cursor-flag{bottom:100%;position:absolute;white-space:nowrap}.ql-multi-cursor .cursor-name{display:inline-block;color:#fff;padding:2px 8px}.ql-multi-cursor .cursor-caret{height:100%;position:absolute;width:2px}.ql-multi-cursor .cursor.hidden .cursor-flag{display:none}.ql-multi-cursor .cursor.top .cursor-flag{bottom:auto;top:100%}.ql-multi-cursor .cursor.right .cursor-flag{right:-2px}.ql-paste-manager{left:-100000px;position:absolute;top:50%}.ql-toolbar{box-sizing:border-box}.ql-tooltip{background-color:#fff;border:1px solid #000;box-sizing:border-box;position:absolute;top:0;white-space:nowrap;z-index:2000}.ql-tooltip a{cursor:pointer;text-decoration:none}.ql-container{box-sizing:border-box;cursor:text;font-family:Helvetica,Arial,sans-serif;height:100%;line-height:1.42;margin:0;overflow-x:hidden;overflow-y:auto;padding:12px 15px;position:relative}.ql-editor{box-sizing:border-box;min-height:100%;outline:0;tab-size:4;white-space:pre-wrap}.ql-editor div{margin:0;padding:0}.ql-editor a{text-decoration:underline}.ql-editor b{font-weight:700;font-style:bold}.ql-editor i{font-style:italic}.ql-editor s{text-decoration:line-through}.ql-editor u{text-decoration:underline}.ql-editor a,.ql-editor b,.ql-editor i,.ql-editor s,.ql-editor span,.ql-editor u{background-color:inherit}.ql-editor img{max-width:100%}.ql-editor blockquote,.ql-editor ol,.ql-editor ul{margin:0 0 0 2em;padding:0}.ql-editor ol{list-style-type:decimal}.ql-editor ul{list-style-type:disc}.ql-editor.ql-ie-10 br,.ql-editor.ql-ie-9 br{display:none}'},{}],32:[function(t,e,n){var r,i,o,s;i=t("lodash"),s=t("../../lib/dom"),o=t("./base.styl"),r=function(){function t(e,n){var r;this.quill=e,this.options=n,s(this.quill.container).addClass("ql-container"),this.options.styles&&this.addStyles(o+t.objToCss(this.options.styles)),s.isIE(10)&&(r=s.isIE(9)?"9":"10",s(this.quill.root).addClass("ql-ie-"+r))}return t.OPTIONS={},t.objToCss=function(t){return i.map(t,function(t,e){var n;return n=i.map(t,function(t,e){return e+": "+t+";"}).join(" "),e+" { "+n+" }"}).join("\n")},t.prototype.addStyles=function(e){var n;return i.isObject(e)&&(e=t.objToCss(e)),n=document.createElement("style"),n.type="text/css",n.appendChild(document.createTextNode(e)),document.head.appendChild(n)},t}(),e.exports=r},{"../../lib/dom":17,"./base.styl":31,lodash:1}],33:[function(t,e,n){var r,i,o,s,l,u,a=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("lodash"),i=t("../../lib/color-picker"),r=t("../base"),u=t("../../lib/dom"),o=t("../../lib/picker"),s=function(t){function e(t,n){this.quill=t,this.options=n,e.__super__.constructor.apply(this,arguments),u(this.quill.container).addClass("ql-snow"),this.pickers=[],this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,function(t){return function(e){return null!=e?l.invoke(t.pickers,"close"):void 0}}(this)),this.quill.onModuleLoad("multi-cursor",l.bind(this.extendMultiCursor,this)),this.quill.onModuleLoad("toolbar",l.bind(this.extendToolbar,this))}return a(e,t),e.COLORS=["#000000","#e60000","#ff9900","#ffff00","#008A00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],e.OPTIONS={"multi-cursor":{template:' '}},e.prototype.extendMultiCursor=function(t){return t.on(t.constructor.events.CURSOR_ADDED,function(t){var e,n;return e=t.elem.querySelector(".cursor-triangle.bottom"),n=t.elem.querySelector(".cursor-triangle.top"),e.style.borderTopColor=n.style.borderBottomColor=t.color})},e.prototype.extendToolbar=function(t){return u(t.container).addClass("ql-snow"),l.each(["color","background","font","size","align"],function(e){return function(n){var r,s;if(s=t.container.querySelector(".ql-"+n),null!=s){switch(n){case"font":case"size":case"align":r=new o(s);break;case"color":case"background":r=new i(s),l.each(r.container.querySelectorAll(".ql-picker-item"),function(t,e){return 7>e?u(t).addClass("ql-primary-color"):void 0})}return null!=r?e.pickers.push(r):void 0}}}(this)),l.each(u(t.container).textNodes(),function(t){return 0===u(t).text().trim().length?u(t).remove():void 0})},e}(r),e.exports=s},{"../../lib/color-picker":16,"../../lib/dom":17,"../../lib/picker":19,"../base":32,lodash:1}]},{},[15])(15)}); \ No newline at end of file diff --git a/Yavsc/wwwroot/js/showdown.min.js b/Yavsc/wwwroot/js/showdown.min.js new file mode 100644 index 00000000..afb239f0 --- /dev/null +++ b/Yavsc/wwwroot/js/showdown.min.js @@ -0,0 +1 @@ +(function(){function e(e){"use strict";var r={omitExtraWLInCodeBlocks:{"default":!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{"default":!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{"default":!1,describe:"Specify a prefix to generated header ids",type:"string"},headerLevelStart:{"default":!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{"default":!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{"default":!1,describe:"Turn on/off GFM autolink style",type:"boolean"},literalMidWordUnderscores:{"default":!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},strikethrough:{"default":!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{"default":!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{"default":!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{"default":!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{"default":!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{"default":!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"}};if(e===!1)return JSON.parse(JSON.stringify(r));var t={};for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n]["default"]);return t}function r(e,r){"use strict";var t=r?"Error in "+r+" extension->":"Error in unnamed extension",s={valid:!0,error:""};n.helper.isArray(e)||(e=[e]);for(var a=0;a-1))return e;h=""}else h=t.gUrls[p],n.helper.isUndefined(t.gTitles[p])||(d=t.gTitles[p]);h=n.helper.escapeCharacters(h,"*_",!1);var f='"};return e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,s),e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,s),e=e.replace(/(\[([^\[\]]+)\])()()()()()/g,s)}),n.subParser("autoLinks",function(e,r){"use strict";function t(e,r){var t=n.subParser("unescapeSpecialChars")(r);return n.subParser("encodeEmailAddress")(t)}var s=/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/gi,a=/<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)>/gi,i=/\b(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)\b/gi,o=/<(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi;return e=e.replace(a,'$1'),e=e.replace(o,t),r.simplifiedAutoLink&&(e=e.replace(s,'$1'),e=e.replace(i,t)),e}),n.subParser("blockGamut",function(e,r,t){"use strict";e=n.subParser("blockQuotes")(e,r,t),e=n.subParser("headers")(e,r,t);var s=n.subParser("hashBlock")("
",r,t);return e=e.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,s),e=e.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,s),e=e.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,s),e=n.subParser("lists")(e,r,t),e=n.subParser("codeBlocks")(e,r,t),e=n.subParser("tables")(e,r,t),e=n.subParser("hashHTMLBlocks")(e,r,t),e=n.subParser("paragraphs")(e,r,t)}),n.subParser("blockQuotes",function(e,r,t){"use strict";return e=e.replace(/((^[ \t]{0,3}>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(e,s){var a=s;return a=a.replace(/^[ \t]*>[ \t]?/gm,"~0"),a=a.replace(/~0/g,""),a=a.replace(/^[ \t]+$/gm,""),a=n.subParser("githubCodeBlocks")(a,r,t),a=n.subParser("blockGamut")(a,r,t),a=a.replace(/(^|\n)/g,"$1 "),a=a.replace(/(\s*
[^\r]+?<\/pre>)/gm,function(e,r){var t=r;return t=t.replace(/^  /gm,"~0"),t=t.replace(/~0/g,"")}),n.subParser("hashBlock")("
\n"+a+"\n
",r,t)})}),n.subParser("codeBlocks",function(e,r,t){"use strict";e+="~0";var s=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g;return e=e.replace(s,function(e,s,a){var i=s,o=a,u="\n";return i=n.subParser("outdent")(i),i=n.subParser("encodeCode")(i),i=n.subParser("detab")(i),i=i.replace(/^\n+/g,""),i=i.replace(/\n+$/g,""),r.omitExtraWLInCodeBlocks&&(u=""),i="
"+i+u+"
",n.subParser("hashBlock")(i,r,t)+o}),e=e.replace(/~0/,"")}),n.subParser("codeSpans",function(e){"use strict";return e=e.replace(/(<]*?>)([^]*?)<\/code>/g,function(e,r,t){return t=t.replace(/^([ \t]*)/g,""),t=t.replace(/[ \t]*$/g,""),t=n.subParser("encodeCode")(t),r+t+""}),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,r,t,s){var a=s;return a=a.replace(/^([ \t]*)/g,""),a=a.replace(/[ \t]*$/g,""),a=n.subParser("encodeCode")(a),r+""+a+""})}),n.subParser("detab",function(e){"use strict";return e=e.replace(/\t(?=\t)/g," "),e=e.replace(/\t/g,"~A~B"),e=e.replace(/~B(.+?)~A/g,function(e,r){for(var t=r,n=4-t.length%4,s=0;n>s;s++)t+=" ";return t}),e=e.replace(/~A/g," "),e=e.replace(/~B/g,"")}),n.subParser("encodeAmpsAndAngles",function(e){"use strict";return e=e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),e=e.replace(/<(?![a-z\/?\$!])/gi,"<")}),n.subParser("encodeBackslashEscapes",function(e){"use strict";return e=e.replace(/\\(\\)/g,n.helper.escapeCharactersCallback),e=e.replace(/\\([`*_{}\[\]()>#+-.!])/g,n.helper.escapeCharactersCallback)}),n.subParser("encodeCode",function(e){"use strict";return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=n.helper.escapeCharacters(e,"*_{}[]\\",!1)}),n.subParser("encodeEmailAddress",function(e){"use strict";var r=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e="mailto:"+e,e=e.replace(/./g,function(e){if("@"===e)e=r[Math.floor(2*Math.random())](e);else if(":"!==e){var t=Math.random();e=t>.9?r[2](e):t>.45?r[1](e):r[0](e)}return e}),e=''+e+"",e=e.replace(/">.+:/g,'">')}),n.subParser("escapeSpecialCharsWithinTagAttributes",function(e){"use strict";var r=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi;return e=e.replace(r,function(e){var r=e.replace(/(.)<\/?code>(?=.)/g,"$1`");return r=n.helper.escapeCharacters(r,"\\`*_",!1)})}),n.subParser("githubCodeBlocks",function(e,r,t){"use strict";return r.ghCodeBlocks?(e+="~0",e=e.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(e,s,a){var i=r.omitExtraWLInCodeBlocks?"":"\n";return a=n.subParser("encodeCode")(a),a=n.subParser("detab")(a),a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,""),a="
"+a+i+"
",n.subParser("hashBlock")(a,r,t)}),e=e.replace(/~0/,"")):e}),n.subParser("hashBlock",function(e,r,t){"use strict";return e=e.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(t.gHtmlBlocks.push(e)-1)+"K\n\n"}),n.subParser("hashElement",function(e,r,t){"use strict";return function(e,r){var n=r;return n=n.replace(/\n\n/g,"\n"),n=n.replace(/^\n/,""),n=n.replace(/\n+$/g,""),n="\n\n~K"+(t.gHtmlBlocks.push(n)-1)+"K\n\n"}}),n.subParser("hashHTMLBlocks",function(e,r,t){"use strict";return e=e.replace(/\n/g,"\n\n"),e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,n.subParser("hashElement")(e,r,t)),e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside|address|audio|canvas|figure|hgroup|output|video)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,n.subParser("hashElement")(e,r,t)),e=e.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,r,t)),e=e.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,r,t)),e=e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,r,t)),e=e.replace(/\n\n/g,"\n")}),n.subParser("headers",function(e,r,t){"use strict";function s(e){var r,s=e.replace(/[^\w]/g,"").toLowerCase();return t.hashLinkCounts[s]?r=s+"-"+t.hashLinkCounts[s]++:(r=s,t.hashLinkCounts[s]=1),a===!0&&(a="section"),n.helper.isString(a)?a+r:r}var a=r.prefixHeaderId,i=isNaN(parseInt(r.headerLevelStart))?1:parseInt(r.headerLevelStart),o=r.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,u=r.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;return e=e.replace(o,function(e,a){var o=n.subParser("spanGamut")(a,r,t),u=r.noHeaderId?"":' id="'+s(a)+'"',l=i,c=""+o+"";return n.subParser("hashBlock")(c,r,t)}),e=e.replace(u,function(e,a){var o=n.subParser("spanGamut")(a,r,t),u=r.noHeaderId?"":' id="'+s(a)+'"',l=i+1,c=""+o+"";return n.subParser("hashBlock")(c,r,t)}),e=e.replace(/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm,function(e,a,o){var u=n.subParser("spanGamut")(o,r,t),l=r.noHeaderId?"":' id="'+s(o)+'"',c=i-1+a.length,p=""+u+"";return n.subParser("hashBlock")(p,r,t)})}),n.subParser("images",function(e,r,t){"use strict";function s(e,r,s,a,i,o,u,l){var c=t.gUrls,p=t.gTitles,h=t.gDimensions;if(s=s.toLowerCase(),l||(l=""),""===a||null===a){if((""===s||null===s)&&(s=r.toLowerCase().replace(/ ?\n/g," ")),a="#"+s,n.helper.isUndefined(c[s]))return e;a=c[s],n.helper.isUndefined(p[s])||(l=p[s]),n.helper.isUndefined(h[s])||(i=h[s].width,o=h[s].height)}var d="img";if(r.match(/^video:/)?(r=r.substring(6),d="video"):r.match(/^audio:/)?(r=r.substring(6),d="audio"):r.match(/^image:/)&&(r=r.substring(6)),r=r.replace(/"/g,"""),r=n.helper.escapeCharacters(r,"*_",!1),a=n.helper.escapeCharacters(a,"*_",!1),"img"===d){var f=''+r+'',g+=""}var a=/!\[(.*?)]\s?\([ \t]*()?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(['"])(.*?)\6[ \t]*)?\)/g,i=/!\[(.*?)][ ]?(?:\n[ ]*)?\[(.*?)]()()()()()/g;return e=e.replace(i,s),e=e.replace(a,s)}),n.subParser("italicsAndBold",function(e,r){"use strict";return r.literalMidWordUnderscores?(e=e.replace(/(^|\s|>|\b)__(?=\S)([^]+?)__(?=\b|<|\s|$)/gm,"$1$2"),e=e.replace(/(^|\s|>|\b)_(?=\S)([^]+?)_(?=\b|<|\s|$)/gm,"$1$2"),e=e.replace(/\*\*(?=\S)([^]+?)\*\*/g,"$1"),e=e.replace(/\*(?=\S)([^]+?)\*/g,"$1")):(e=e.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"$2"),e=e.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"$2")),e}),n.subParser("lists",function(e,r,t){"use strict";function s(e,s){t.gListLevel++,e=e.replace(/\n{2,}$/,"\n"),e+="~0";var a=/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+((\[(x| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,i=/\n[ \t]*\n(?!~0)/.test(e);return e=e.replace(a,function(e,s,a,o,u,l,c){c=c&&""!==c.trim();var p=n.subParser("outdent")(u,r,t),h="";return l&&r.tasklists&&(h=' class="task-list-item" style="list-style-type: none;"',p=p.replace(/^[ \t]*\[(x| )?]/m,function(){var e='-1?(p=n.subParser("githubCodeBlocks")(p,r,t),p=n.subParser("blockGamut")(p,r,t)):(p=n.subParser("lists")(p,r,t),p=p.replace(/\n$/,""),p=i?n.subParser("paragraphs")(p,r,t):n.subParser("spanGamut")(p,r,t)),p="\n"+p+"\n"}),e=e.replace(/~0/g,""),t.gListLevel--,s&&(e=e.replace(/\s+$/,"")),e}function a(e,r,t){var n="ul"===r?/^ {0,2}\d+\.[ \t]/gm:/^ {0,2}[*+-][ \t]/gm,a=[],i="";if(-1!==e.search(n)){!function u(e){var a=e.search(n);-1!==a?(i+="\n\n<"+r+">"+s(e.slice(0,a),!!t)+"\n\n",r="ul"===r?"ol":"ul",n="ul"===r?/^ {0,2}\d+\.[ \t]/gm:/^ {0,2}[*+-][ \t]/gm,u(e.slice(a))):i+="\n\n<"+r+">"+s(e,!!t)+"\n\n"}(e);for(var o=0;o"+s(e,!!t)+"\n\n";return i}e+="~0";var i=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return t.gListLevel?e=e.replace(i,function(e,r,t){var n=t.search(/[*+-]/g)>-1?"ul":"ol";return a(r,n,!0)}):(i=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,e=e.replace(i,function(e,r,t,n){var s=n.search(/[*+-]/g)>-1?"ul":"ol";return a(t,s)})),e=e.replace(/~0/,"")}),n.subParser("outdent",function(e){"use strict";return e=e.replace(/^(\t|[ ]{1,4})/gm,"~0"),e=e.replace(/~0/g,"")}),n.subParser("paragraphs",function(e,r,t){"use strict";e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,"");for(var s=e.split(/\n{2,}/g),a=[],i=s.length,o=0;i>o;o++){var u=s[o];u.search(/~K(\d+)K/g)>=0?a.push(u):u.search(/\S/)>=0&&(u=n.subParser("spanGamut")(u,r,t),u=u.replace(/^([ \t]*)/g,"

"),u+="

",a.push(u))}for(i=a.length,o=0;i>o;o++)for(;a[o].search(/~K(\d+)K/)>=0;){var l=t.gHtmlBlocks[RegExp.$1];l=l.replace(/\$/g,"$$$$"),a[o]=a[o].replace(/~K\d+K/,l)}return a.join("\n\n")}),n.subParser("runExtension",function(e,r,t,n){"use strict";if(e.filter)r=e.filter(r,n.converter,t);else if(e.regex){var s=e.regex;!s instanceof RegExp&&(s=new RegExp(s,"g")),r=r.replace(s,e.replace)}return r}),n.subParser("spanGamut",function(e,r,t){"use strict";return e=n.subParser("codeSpans")(e,r,t),e=n.subParser("escapeSpecialCharsWithinTagAttributes")(e,r,t),e=n.subParser("encodeBackslashEscapes")(e,r,t),e=n.subParser("images")(e,r,t),e=n.subParser("anchors")(e,r,t),e=n.subParser("autoLinks")(e,r,t),e=n.subParser("encodeAmpsAndAngles")(e,r,t),e=n.subParser("italicsAndBold")(e,r,t),e=n.subParser("strikethrough")(e,r,t),e=e.replace(/ +\n/g,"
\n")}),n.subParser("strikethrough",function(e,r){"use strict";return r.strikethrough&&(e=e.replace(/(?:~T){2}([^~]+)(?:~T){2}/g,"$1")),e}),n.subParser("stripBlankLines",function(e){"use strict";return e.replace(/^[ \t]+$/gm,"")}),n.subParser("stripLinkDefinitions",function(e,r,t){"use strict";var s=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=~0))/gm;return e+="~0",e=e.replace(s,function(e,s,a,i,o,u,l){return s=s.toLowerCase(),t.gUrls[s]=n.subParser("encodeAmpsAndAngles")(a),u?u+l:(l&&(t.gTitles[s]=l.replace(/"|'/g,""")),r.parseImgDimensions&&i&&o&&(t.gDimensions[s]={width:i,height:o}),"")}),e=e.replace(/~0/,"")}),n.subParser("tables",function(e,r,t){"use strict";var s=function(){var e,s={};return s.th=function(e,s){var a="";return e=e.trim(),""===e?"":(r.tableHeaderId&&(a=' id="'+e.replace(/ /g,"_").toLowerCase()+'"'),e=n.subParser("spanGamut")(e,r,t),s=s&&""!==s.trim()?' style="'+s+'"':"",""+e+"")},s.td=function(e,s){var a=n.subParser("spanGamut")(e.trim(),r,t);return s=s&&""!==s.trim()?' style="'+s+'"':"",""+a+""},s.ths=function(){var e="",r=0,t=[].slice.apply(arguments[0]),n=[].slice.apply(arguments[1]);for(r;r\n",e+="\n"},s.tr=function(){var e,r=[].slice.apply(arguments[0]),t=[].slice.apply(arguments[1]);return e="\n",e+=s.tds.apply(this,[r,t]),e+="\n"},e=function(e){var r,t,n=0,a=e.split("\n"),i=[];for(n;n"),t=r.substring(1,r.length-1).split("|"),0===l.length)for(c=0;c");r.trim().match(/^[|].*[|]$/);)r=r.trim(),o.push(s.tr.apply(this,[r.substring(1,r.length-1).split("|"),l])),r=a[++n];o.push(""),o.push(""),i.push(o.join("\n"));continue}r=a[--n]}i.push(r)}return i.join("\n")},{parse:e}};if(r.tables){var a=s();return a.parse(e)}return e}),n.subParser("unescapeSpecialChars",function(e){"use strict";return e=e.replace(/~E(\d+)E/g,function(e,r){var t=parseInt(r);return String.fromCharCode(t)})});var u=this;"undefined"!=typeof module&&module.exports?module.exports=n:"function"==typeof define&&define.amd?define("showdown",function(){"use strict";return n}):u.showdown=n}).call(this); \ No newline at end of file diff --git a/Yavsc/wwwroot/js/site.min.js b/Yavsc/wwwroot/js/site.min.js old mode 100644 new mode 100755 index 40d7a194..7352236f --- a/Yavsc/wwwroot/js/site.min.js +++ b/Yavsc/wwwroot/js/site.min.js @@ -1,26 +1 @@ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return null}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var s=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(s,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),s=i.data("bs.alert");s||i.data("bs.alert",s=new n(this)),"string"==typeof e&&s[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.3.5",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){o.detach().trigger("closed.bs.alert").remove()}var s=t(this),r=s.attr("data-target");r||(r=s.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var o=t(r);e&&e.preventDefault(),o.length||(o=s.closest(".alert")),o.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var s=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=s,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),s=n.data("bs.button"),r="object"==typeof e&&e;s||n.data("bs.button",s=new i(this,r)),"toggle"==e?s.toggle():e&&s.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.3.5",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,s=n.is("input")?"val":"html",r=n.data();e+="Text",null==r.resetText&&n.data("resetText",n[s]()),setTimeout(t.proxy(function(){n[s](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target);n.hasClass("btn")||(n=n.closest(".btn")),e.call(n,"toggle"),t(i.target).is('input[type="radio"]')||t(i.target).is('input[type="checkbox"]')||i.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),s=n.data("bs.carousel"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),o="string"==typeof e?e:r.slide;s||n.data("bs.carousel",s=new i(this,r)),"number"==typeof e?s.to(e):o?s[o]():r.interval&&s.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),n="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(n&&!this.options.wrap)return e;var s="prev"==t?-1:1,r=(i+s)%this.$items.length;return this.$items.eq(r)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,n){var s=this.$element.find(".item.active"),r=n||this.getItemForDirection(e,s),o=this.interval,a="next"==e?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var u=r[0],c=t.Event("slide.bs.carousel",{relatedTarget:u,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,o&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=t(this.$indicators.children()[this.getItemIndex(r)]);h&&h.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:u,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,s.addClass(a),r.addClass(a),s.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),s.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(s.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(d)),o&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var s=function(i){var n,s=t(this),r=t(s.attr("data-target")||(n=s.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var o=t.extend({},r.data(),s.data()),a=s.attr("data-slide-to");a&&(o.interval=!1),e.call(r,o),a&&r.data("bs.carousel").to(a),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",s).on("click.bs.carousel.data-api","[data-slide-to]",s),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each(function(){var i=t(this),s=i.data("bs.collapse"),r=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!s&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),s||i.data("bs.collapse",s=new n(this,r)),"string"==typeof e&&s[e]()})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.5",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,s=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(s&&s.length&&(e=s.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){s&&s.length&&(i.call(s,"hide"),e||s.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[o](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var s=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(n.TRANSITION_DURATION):s.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var s=t(n);this.addAriaAndCollapsedClass(e(s),s)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var s=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=s,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var s=t(this);s.attr("data-target")||n.preventDefault();var r=e(s),o=r.data("bs.collapse"),a=o?"toggle":s.data();i.call(r,a)})}(jQuery),+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(s).remove(),t(r).each(function(){var n=t(this),s=e(n),r={relatedTarget:this};s.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(s[0],i.target)||(s.trigger(i=t.Event("hide.bs.dropdown",r)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),s.removeClass("open").trigger("hidden.bs.dropdown",r))))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var s=".dropdown-backdrop",r='[data-toggle="dropdown"]',o=function(e){t(e).on("click.bs.dropdown",this.toggle)};o.VERSION="3.3.5",o.prototype.toggle=function(n){var s=t(this);if(!s.is(".disabled, :disabled")){var r=e(s),o=r.hasClass("open");if(i(),!o){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(r.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;s.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},o.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var s=e(n),o=s.hasClass("open");if(!o&&27!=i.which||o&&27==i.which)return 27==i.which&&s.find(r).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",l=s.find(".dropdown-menu"+a);if(l.length){var u=l.index(i.target);38==i.which&&u>0&&u--,40==i.which&&udocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth