You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
easy-markdown-editor/dist/simplemde.min.js

7 lines
279 KiB
JavaScript

/**
* simplemde v1.11.2
* Copyright Jeroen Akkerman
* @link https://github.com/ionaru/simplemde-markdown-editor
* @license MIT
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).SimpleMDE=e()}}(function(){return function o(a,l,s){function c(t,e){if(!l[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=l[t]={exports:{}};a[t][0].call(i.exports,function(e){return c(a[t][1][e]||e)},i,i.exports,o,a,l,s)}return l[t].exports}for(var u="function"==typeof require&&require,e=0;e<s.length;e++)c(s[e]);return c}({1:[function(e,t,n){"use strict";n.byteLength=function(e){return 3*e.length/4-h(e)},n.toByteArray=function(e){var t,n,r,i,o,a=e.length;i=h(e),o=new u(3*a/4-i),n=0<i?a-4:a;var l=0;for(t=0;t<n;t+=4)r=s[e.charCodeAt(t)]<<18|s[e.charCodeAt(t+1)]<<12|s[e.charCodeAt(t+2)]<<6|s[e.charCodeAt(t+3)],o[l++]=r>>16&255,o[l++]=r>>8&255,o[l++]=255&r;2===i?(r=s[e.charCodeAt(t)]<<2|s[e.charCodeAt(t+1)]>>4,o[l++]=255&r):1===i&&(r=s[e.charCodeAt(t)]<<10|s[e.charCodeAt(t+1)]<<4|s[e.charCodeAt(t+2)]>>2,o[l++]=r>>8&255,o[l++]=255&r);return o},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i="",o=[],a=16383,l=0,s=n-r;l<s;l+=a)o.push(f(e,l,s<l+a?s:l+a));1===r?(t=e[n-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="=");return o.push(i),o.join("")};for(var c=[],s=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=r.length;i<o;++i)c[i]=r[i],s[r.charCodeAt(i)]=i;function h(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function f(e,t,n){for(var r,i,o=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(c[(i=r)>>18&63]+c[i>>12&63]+c[i>>6&63]+c[63&i]);return o.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],2:[function(e,t,n){},{}],3:[function(e,t,n){"use strict";var r=e("base64-js"),o=e("ieee754");n.Buffer=h,n.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},n.INSPECT_MAX_BYTES=50;var i=2147483647;function a(e){if(i<e)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=h.prototype,t}function h(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(e)}return l(e,t,n)}function l(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return W(e)||e&&W(e.buffer)?function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=h.prototype,r}(e,t,n):"string"==typeof e?function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!h.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|d(e,t),r=a(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t):function(e){if(h.isBuffer(e)){var t=0|f(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}if(e){if(ArrayBuffer.isView(e)||"length"in e)return"number"!=typeof e.length||B(e.length)?a(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.")}(e)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e){return s(e),a(e<0?0:0|f(e))}function u(e){for(var t=e.length<0?0:0|f(e.length),n=a(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e){if(i<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function d(e,t){i