mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-12-03 04:40:46 +08:00
9f90b69e7e
Wrong interpolation when creating keyframe between discontinuous keyframes Timeline graph axis now changes while not open when focusing an input
15 lines
34 KiB
JavaScript
15 lines
34 KiB
JavaScript
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["VuePrismEditor"]=e():t["VuePrismEditor"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),i=n("5ca1"),o=n("2aba"),c=n("32e9"),a=n("84f2"),u=n("41a0"),s=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",g=function(){return this};t.exports=function(t,e,n,y,b,m,x){u(n,e,y);var S,w,k,_=function(t){if(!p&&t in E)return E[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},C=e+" Iterator",T=b==v,O=!1,E=t.prototype,L=E[l]||E[d]||b&&E[b],j=L||_(b),P=b?T?_("entries"):j:void 0,$="Array"==e&&E.entries||L;if($&&(k=f($.call(new t)),k!==Object.prototype&&k.next&&(s(k,C,!0),r||"function"==typeof k[l]||c(k,l,g))),T&&L&&L.name!==v&&(O=!0,j=function(){return L.call(this)}),r&&!x||!p&&!O&&E[l]||c(E,l,j),a[e]=j,a[C]=g,b)if(S={values:T?j:_(v),keys:m?j:_(h),entries:P},x)for(w in S)w in E||o(E,w,S[w]);else i(i.P+i.F*(p||O),e,S);return S}},"02f4":function(t,e,n){var r=n("4588"),i=n("be13");t.exports=function(t){return function(e,n){var o,c,a=String(i(e)),u=r(n),s=a.length;return u<0||u>=s?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===s||(c=a.charCodeAt(u+1))<56320||c>57343?t?a.charAt(u):o:t?a.slice(u,u+2):c-56320+(o-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),i=n("e11e");t.exports=Object.keys||function(t){return r(t,i)}},1495:function(t,e,n){var r=n("86cc"),i=n("cb7c"),o=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){i(t);var n,c=o(e),a=c.length,u=0;while(a>u)r.f(t,n=c[u++],e[n]);return t}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),i=n("32e9"),o=n("79e5"),c=n("be13"),a=n("2b4c"),u=n("520a"),s=a("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=a(t),d=!o((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=d?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[s]=function(){return n}),n[p](""),!e})):void 0;if(!d||!h||"replace"===t&&!f||"split"===t&&!l){var v=/./[p],g=n(c,p,""[t],(function(t,e,n,r,i){return e.exec===u?d&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),y=g[0],b=g[1];r(String.prototype,t,y),i(RegExp.prototype,p,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),i=n("7726").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),i=n("2b4c")("toStringTag"),o="Arguments"==r(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},"28a5":function(t,e,n){"use strict";var r=n("aae3"),i=n("cb7c"),o=n("ebd6"),c=n("0390"),a=n("9def"),u=n("5f1b"),s=n("520a"),f=n("79e5"),l=Math.min,p=[].push,d="split",h="length",v="lastIndex",g=4294967295,y=!f((function(){RegExp(g,"y")}));n("214f")("split",2,(function(t,e,n,f){var b;return b="c"=="abbc"[d](/(b)*/)[1]||4!="test"[d](/(?:)/,-1)[h]||2!="ab"[d](/(?:ab)*/)[h]||4!="."[d](/(.?)(.?)/)[h]||"."[d](/()()/)[h]>1||""[d](/.?/)[h]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);var o,c,a,u=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,d=void 0===e?g:e>>>0,y=new RegExp(t.source,f+"g");while(o=s.call(y,i)){if(c=y[v],c>l&&(u.push(i.slice(l,o.index)),o[h]>1&&o.index<i[h]&&p.apply(u,o.slice(1)),a=o[0][h],l=c,u[h]>=d))break;y[v]===o.index&&y[v]++}return l===i[h]?!a&&y.test("")||u.push(""):u.push(i.slice(l)),u[h]>d?u.slice(0,d):u}:"0"[d](void 0,0)[h]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,i,r):b.call(String(i),n,r)},function(t,e){var r=f(b,t,this,e,b!==n);if(r.done)return r.value;var s=i(t),p=String(this),d=o(s,RegExp),h=s.unicode,v=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(y?"y":"g"),m=new d(y?s:"^(?:"+s.source+")",v),x=void 0===e?g:e>>>0;if(0===x)return[];if(0===p.length)return null===u(m,p)?[p]:[];var S=0,w=0,k=[];while(w<p.length){m.lastIndex=y?w:0;var _,C=u(m,y?p:p.slice(w));if(null===C||(_=l(a(m.lastIndex+(y?0:w)),p.length))===S)w=c(p,w,h);else{if(k.push(p.slice(S,w)),k.length===x)return k;for(var T=1;T<=C.length-1;T++)if(k.push(C[T]),k.length===x)return k;w=S=_}}return k.push(p.slice(S)),k}]}))},"2aba":function(t,e,n){var r=n("7726"),i=n("32e9"),o=n("69a8"),c=n("ca5a")("src"),a=n("fa5b"),u="toString",s=(""+a).split(u);n("8378").inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(o(n,c)||i(n,c,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[c]||a.call(this)}))},"2aeb":function(t,e,n){var r=n("cb7c"),i=n("1495"),o=n("e11e"),c=n("613b")("IE_PROTO"),a=function(){},u="prototype",s=function(){var t,e=n("230e")("iframe"),r=o.length,i="<",c=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+c+"document.F=Object"+i+"/script"+c),t.close(),s=t.F;while(r--)delete s[u][o[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=r(t),n=new a,a[u]=null,n[c]=t):n=s(),void 0===e?n:i(n,e)}},"2b4c":function(t,e,n){var r=n("5537")("wks"),i=n("ca5a"),o=n("7726").Symbol,c="function"==typeof o,a=t.exports=function(t){return r[t]||(r[t]=c&&o[t]||(c?o:i)("Symbol."+t))};a.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),i=n("d2c8"),o="includes";r(r.P+r.F*n("5147")(o),"String",{includes:function(t){return!!~i(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(t,e,n){var r=n("86cc"),i=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},3846:function(t,e,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"38fd":function(t,e,n){var r=n("69a8"),i=n("4bf8"),o=n("613b")("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},"412e":function(t,e,n){},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),i=n("4630"),o=n("7f20"),c={};n("32e9")(c,n("2b4c")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:i(1,n)}),o(t,e+" Iterator")}},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4917:function(t,e,n){"use strict";var r=n("cb7c"),i=n("9def"),o=n("0390"),c=n("5f1b");n("214f")("match",1,(function(t,e,n,a){return[function(n){var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var u=r(t),s=String(this);if(!u.global)return c(u,s);var f=u.unicode;u.lastIndex=0;var l,p=[],d=0;while(null!==(l=c(u,s))){var h=String(l[0]);p[d]=h,""===h&&(u.lastIndex=o(s,i(u.lastIndex),f)),d++}return 0===d?null:p}]}))},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"504c":function(t,e,n){var r=n("9e1e"),i=n("0d58"),o=n("6821"),c=n("52a7").f;t.exports=function(t){return function(e){var n,a=o(e),u=i(a),s=u.length,f=0,l=[];while(s>f)n=u[f++],r&&!c.call(a,n)||l.push(t?[n,a[n]]:a[n]);return l}}},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(i){}}return!0}},"520a":function(t,e,n){"use strict";var r=n("0bfb"),i=RegExp.prototype.exec,o=String.prototype.replace,c=i,a="lastIndex",u=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t[a]||0!==e[a]}(),s=void 0!==/()??/.exec("")[1],f=u||s;f&&(c=function(t){var e,n,c,f,l=this;return s&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),u&&(e=l[a]),c=i.call(l,t),u&&c&&(l[a]=l.global?c.index+c[0].length:e),s&&c&&c.length>1&&o.call(c[0],n,(function(){for(f=1;f<arguments.length-2;f++)void 0===arguments[f]&&(c[f]=void 0)})),c}),t.exports=c},"52a7":function(t,e){e.f={}.propertyIsEnumerable},5537:function(t,e,n){var r=n("8378"),i=n("7726"),o="__core-js_shared__",c=i[o]||(i[o]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,e,n){var r=n("7726"),i=n("8378"),o=n("32e9"),c=n("2aba"),a=n("9b43"),u="prototype",s=function(t,e,n){var f,l,p,d,h=t&s.F,v=t&s.G,g=t&s.S,y=t&s.P,b=t&s.B,m=v?r:g?r[e]||(r[e]={}):(r[e]||{})[u],x=v?i:i[e]||(i[e]={}),S=x[u]||(x[u]={});for(f in v&&(n=e),n)l=!h&&m&&void 0!==m[f],p=(l?m:n)[f],d=b&&l?a(p,r):y&&"function"==typeof p?a(Function.call,p):p,m&&c(m,f,p,t&s.U),x[f]!=p&&o(x,f,d),y&&S[f]!=p&&(S[f]=p)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var o=n.call(t,e);if("object"!==typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"613b":function(t,e,n){var r=n("5537")("keys"),i=n("ca5a");t.exports=function(t){return r[t]||(r[t]=i(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6762:function(t,e,n){"use strict";var r=n("5ca1"),i=n("c366")(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var r=n("626a"),i=n("be13");t.exports=function(t){return r(i(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"6b54":function(t,e,n){"use strict";n("3846");var r=n("cb7c"),i=n("0bfb"),o=n("9e1e"),c="toString",a=/./[c],u=function(t){n("2aba")(RegExp.prototype,c,t,!0)};n("79e5")((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?u((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):a.name!=c&&u((function(){return a.call(this)}))},"72d6":function(t,e,n){var r=n("8a8d"),i=n("ad9a");function o(t,e){if(!(this instanceof o))return new o(t,e);if(this.node=this.start=this.peeked=t,this.root=e,this.closingTag=!1,this._revisit=!0,this._selects=[],this._rejects=[],t&&this.higher(t))throw new Error("root must be a parent or ancestor to node")}function c(t,e){var n="nextSibling"==t;return function(i,o,c){i=this.compile(i),o=o&&o>0?o:1;var a=this.node,u=this.closingTag,s=this._revisit;while(a){if(r(n,u)&&a[e])a=a[e],u=!n;else if(1==a.nodeType&&!a[e]&&r(n,u)){if(u=n,!s)continue}else if(a[t])a=a[t],u=!n;else if(a=a.parentNode,u=n,!s)continue;if(!a||this.higher(a,this.root))break;if(i(a)&&this.selects(a,c)&&this.rejects(a,c)){if(--o)continue;return c||(this.node=a),this.closingTag=u,a}}return null}}t.exports=o,o.prototype.reset=function(t){return this.node=t||this.start,this},o.prototype.revisit=function(t){return this._revisit=void 0==t||t,this},o.prototype.opening=function(){return 1==this.node.nodeType&&(this.closingTag=!1),this},o.prototype.atOpening=function(){return!this.closingTag},o.prototype.closing=function(){return 1==this.node.nodeType&&(this.closingTag=!0),this},o.prototype.atClosing=function(){return this.closingTag},o.prototype.next=c("nextSibling","firstChild"),o.prototype.previous=o.prototype.prev=c("previousSibling","lastChild"),o.prototype.select=function(t){return t=this.compile(t),this._selects.push(t),this},o.prototype.selects=function(t,e){var n=this._selects,r=n.length;if(!r)return!0;for(var i=0;i<r;i++)if(n[i].call(this,t,e))return!0;return!1},o.prototype.reject=function(t){return t=this.compile(t),this._rejects.push(t),this},o.prototype.rejects=function(t,e){var n=this._rejects,r=n.length;if(!r)return!0;for(var i=0;i<r;i++)if(n[i].call(this,t,e))return!1;return!0},o.prototype.higher=function(t){var e=this.root;if(!e)return!1;t=t.parentNode;while(t&&t!=e)t=t.parentNode;return t!=e},o.prototype.compile=function(t){switch(typeof t){case"number":return function(e){return t==e.nodeType};case"string":return new Function("node","return "+i(t,"node."));case"function":return t;default:return function(){return!0}}},o.prototype.peak=o.prototype.peek=function(t,e){return 1==arguments.length&&(e=t,t=!0),e=void 0==e?1:e,e?e>0?this.next(t,e,!0):this.prev(t,Math.abs(e),!0):this.node},o.prototype.use=function(t){return t(this),this}},"74a0":function(t,e,n){"use strict";
|
|
/*!
|
|
* escape-html
|
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
* Copyright(c) 2015 Andreas Lubbe
|
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
* MIT Licensed
|
|
*/var r=/["'&<>]/;function i(t){var e,n=""+t,i=r.exec(n);if(!i)return n;var o="",c=0,a=0;for(c=i.index;c<n.length;c++){switch(n.charCodeAt(c)){case 34:e=""";break;case 38:e="&";break;case 39:e="'";break;case 60:e="<";break;case 62:e=">";break;default:continue}a!==c&&(o+=n.substring(a,c)),a=c+1,o+=e}return a!==c?o+n.substring(a,c):o}t.exports=i},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(t,e,n){var r=n("4588"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7f20":function(t,e,n){var r=n("86cc").f,i=n("69a8"),o=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},8378:function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},8615:function(t,e,n){var r=n("5ca1"),i=n("504c")(!1);r(r.S,"Object",{values:function(t){return i(t)}})},"86cc":function(t,e,n){var r=n("cb7c"),i=n("c69a"),o=n("6a99"),c=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return c(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8a8d":function(t,e){function n(t,e){return t^e}t.exports=n},"954e":function(t,e,n){"use strict";var r,i=n("cf4f"),o={},c={default:{""":'"',""":'"',"'":"'","'":"'","&":"&","&":"&",">":">",">":">","<":"<","<":"<"},extras:{"¢":"¢","¢":"¢","©":"©","©":"©","€":"€","€":"€","£":"£","£":"£","®":"®","®":"®","¥":"¥","¥":"¥"}};function a(t,e){if(!s(t))return"";var n=c[e||"default"],r=u(e,n);return t.replace(r,(function(t){return n[t]}))}function u(t,e){if(o[t])return o[t];var n=Object.keys(e).join("|"),r=new RegExp("(?=("+n+"))\\1","g");return o[t]=r,r}function s(t){return t&&"string"===typeof t}Object.defineProperty(c,"all",{get:function(){return r||(r=i({},c.default,c.extras))}}),a.chars=c.default,a.extras=c.extras,Object.defineProperty(a,"all",{get:function(){return c.all}}),t.exports=a},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),i=Array.prototype;void 0==i[r]&&n("32e9")(i,r,{}),t.exports=function(t){i[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a481:function(t,e,n){"use strict";var r=n("cb7c"),i=n("4bf8"),o=n("9def"),c=n("4588"),a=n("0390"),u=n("5f1b"),s=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,(function(t,e,n,v){return[function(r,i){var o=t(this),c=void 0==r?void 0:r[e];return void 0!==c?c.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=v(n,t,this,e);if(i.done)return i.value;var l=r(t),p=String(this),d="function"===typeof e;d||(e=String(e));var y=l.global;if(y){var b=l.unicode;l.lastIndex=0}var m=[];while(1){var x=u(l,p);if(null===x)break;if(m.push(x),!y)break;var S=String(x[0]);""===S&&(l.lastIndex=a(p,o(l.lastIndex),b))}for(var w="",k=0,_=0;_<m.length;_++){x=m[_];for(var C=String(x[0]),T=s(f(c(x.index),p.length),0),O=[],E=1;E<x.length;E++)O.push(h(x[E]));var L=x.groups;if(d){var j=[C].concat(O,T,p);void 0!==L&&j.push(L);var P=String(e.apply(void 0,j))}else P=g(C,p,T,O,L,e);T>=k&&(w+=p.slice(k,T)+P,k=T+C.length)}return w+p.slice(k)}];function g(t,e,r,o,c,a){var u=r+t.length,s=o.length,f=d;return void 0!==c&&(c=i(c),f=p),n.call(a,f,(function(n,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(u);case"<":a=c[i.slice(1,-1)];break;default:var f=+i;if(0===f)return n;if(f>s){var p=l(f/10);return 0===p?n:p<=s?void 0===o[p-1]?i.charAt(1):o[p-1]+i.charAt(1):n}a=o[f-1]}return void 0===a?"":a}))}}))},aae3:function(t,e,n){var r=n("d3f4"),i=n("2d95"),o=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},ac6a:function(t,e,n){for(var r=n("cadf"),i=n("0d58"),o=n("2aba"),c=n("7726"),a=n("32e9"),u=n("84f2"),s=n("2b4c"),f=s("iterator"),l=s("toStringTag"),p=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(d),v=0;v<h.length;v++){var g,y=h[v],b=d[y],m=c[y],x=m&&m.prototype;if(x&&(x[f]||a(x,f,p),x[l]||a(x,l,y),u[y]=p,b))for(g in r)x[g]||o(x,g,r[g],!0)}},ad9a:function(t,e){var n=/\b(Array|Date|Object|Math|JSON)\b/g;function r(t){return t.replace(/\.\w+|\w+ *\(|"[^"]*"|'[^']*'|\/([^/]+)\//g,"").replace(n,"").match(/[a-zA-Z_]\w*/g)||[]}function i(t,e,n){var r=/\.\w+|\w+ *\(|"[^"]*"|'[^']*'|\/([^/]+)\/|[a-zA-Z_]\w*/g;return t.replace(r,(function(t){return"("==t[t.length-1]||~e.indexOf(t)?n(t):t}))}function o(t){for(var e=[],n=0;n<t.length;n++)~e.indexOf(t[n])||e.push(t[n]);return e}function c(t){return function(e){return t+e}}t.exports=function(t,e){var n=o(r(t));return e&&"string"==typeof e&&(e=c(e)),e?i(t,n,e):n}},aef6:function(t,e,n){"use strict";var r=n("5ca1"),i=n("9def"),o=n("d2c8"),c="endsWith",a=""[c];r(r.P+r.F*n("5147")(c),"String",{endsWith:function(t){var e=o(this,t,c),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),u=void 0===n?r:Math.min(i(n),r),s=String(t);return a?a.call(e,s,u):e.slice(u-s.length,u)===s}})},b0c5:function(t,e,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},b16a:function(t,e,n){"use strict";n("412e")},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,e,n){var r=n("6821"),i=n("9def"),o=n("77f1");t.exports=function(t){return function(e,n,c){var a,u=r(e),s=i(u.length),f=o(c,s);if(t&&n!=n){while(s>f)if(a=u[f++],a!=a)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),i=n("d53b"),o=n("84f2"),c=n("6821");t.exports=n("01f9")(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce10:function(t,e,n){var r=n("69a8"),i=n("6821"),o=n("c366")(!1),c=n("613b")("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,s=[];for(n in a)n!=c&&r(a,n)&&s.push(n);while(e.length>u)r(a,n=e[u++])&&(~o(s,n)||s.push(n));return s}},cf4f:function(t,e,n){"use strict";var r=n("d913");function i(t,e){for(var n in e)o(e,n)&&(t[n]=e[n])}function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t){r(t)||(t={});for(var e=arguments.length,n=1;n<e;n++){var o=arguments[n];r(o)&&i(t,o)}return t}},d2c8:function(t,e,n){var r=n("aae3"),i=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d913:function(t,e,n){"use strict";
|
|
/*!
|
|
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
|
*
|
|
* Copyright (c) 2015, Jon Schlinkert.
|
|
* Licensed under the MIT License.
|
|
*/t.exports=function(t){return"undefined"!==typeof t&&null!==t&&("object"===typeof t||"function"===typeof t)}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},ebd6:function(t,e,n){var r=n("cb7c"),i=n("d8e8"),o=n("2b4c")("species");t.exports=function(t,e){var n,c=r(t).constructor;return void 0===c||void 0==(n=r(c)[o])?e:i(n)}},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fb15:function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));var i=function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return r("div",{staticClass:"prism-editor-wrapper"},[e.lineNumbers?r("div",{staticClass:"prism-editor__line-numbers",style:{"min-height":e.lineNumbersHeight},attrs:{"aria-hidden":"true"}},[r("div",{staticClass:"prism-editor__line-width-calc",staticStyle:{height:"0px",visibility:"hidden","pointer-events":"none"}},[e._v("\n 999\n ")]),e._l(e.lineNumbersCount,(function(t){return r("div",{key:t,staticClass:"prism-editor__line-number token comment"},[e._v("\n "+e._s(t)+"\n ")])}))],2):e._e(),r("pre",e._g({ref:"pre",staticClass:"prism-editor__code",class:(t={},t["language-"+e.language]=!0,t),attrs:{contenteditable:!e.readonly,spellCheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","data-gramm":"false"},domProps:{innerHTML:e._s(e.content)},on:{keydown:e.handleKeyDown,keyup:e.handleKeyUp,click:e.handleClick}},e.$listeners))])},o=[],c=(n("ac6a"),n("cadf"),n("8615"),n("6762"),n("2fdb"),n("aef6"),n("28a5"),n("74a0")),a=n.n(c);function u(t,e,n){return"text"===e&&(t=a()(t)),'<code class="language-'.concat(n,'">').concat(t,"</code>")}var s=function(t,e){if(!e)return u(t,"text","text");e=e.toLowerCase();var n=e;if("vue"!==e&&"html"!==e||(e="markup"),"md"===e&&(e="markdown"),"ts"===e&&(e="typescript"),Prism.languages[e]){var r=Prism.highlight(t,Prism.languages[e],e);return u(r,n,e)}return u(t,"text","text")},f=(n("a481"),function(t){return t.replace("\n","<br>")}),l=f,p=n("954e"),d=n.n(p),h=function(t){return d()(t.replace(/<br>/gm,"\n").replace(/<\/?[^>]*>/gm,""))},v=h,g=(n("6b54"),n("72d6")),y=n.n(g);function b(t,e){if(document.activeElement===t){var n=window.getSelection();if(1==arguments.length){if(!n.rangeCount)return;var r={},i=n.getRangeAt(0),o=i.cloneRange();return o.selectNodeContents(t),o.setEnd(i.endContainer,i.endOffset),r.end=o.toString().length,o.setStart(i.startContainer,i.startOffset),r.start=r.end-o.toString().length,r.atStart=0===o.startOffset,r.commonAncestorContainer=o.commonAncestorContainer,r.endContainer=o.endContainer,r.startContainer=o.startContainer,r}var c,a,u=e.end&&e.end!==e.start,s=0,f=(i=document.createRange(),y()(t).select(Node.TEXT_NODE).revisit(!1)),l=e.start>t.textContent.length?t.textContent.length:e.start,p=e.end>t.textContent.length?t.textContent.length:e.end,d=e.atStart;while(c=f.next()){var h=s;s+=c.textContent.length;var v=d?s>l:s>=l;if(!a&&v&&(a=!0,i.setStart(c,l-h),!u)){i.collapse(!0),m(t,i);break}if(u&&s>=p){i.setEnd(c,p-h),m(t,i);break}}}}function m(t,e){var n=window.getSelection();t.focus(),n.removeAllRanges(),n.addRange(e)}var x=b,S=(n("4917"),function(t,e){var n=t.slice(0,e),r=n.lastIndexOf("\n")+1,i=n.slice(r);return i}),w=/^\s+/,k=function(t,e){var n=S(t,e),r=n.match(w);return null===r?"":r[0]||""},_=/^(\t| {2})* {2}$/,C=function(t,e){var n=S(t,e);return _.test(n)?2:0},T={shift:16,ctrl:17,alt:18,pauseBreak:19,capsLock:20,esc:27,pageUp:33,pageDown:34,end:35,home:36,arrowLeft:37,arrowUp:38,arrowRight:39,arrowDown:40,printScreen:44,meta:91,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numLock:144,scrollLock:145},O={model:{prop:"code",event:"change"},props:{emitEvents:{type:Boolean,default:!1},language:{type:String,default:"js"},lineNumbers:{type:Boolean,default:!1},autoStyleLineNumbers:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},code:{type:String,default:""},ignoreTabKey:{type:Boolean,default:!1}},data:function(){return{undoStack:[],selection:void 0,lineNumbersHeight:"20px",undoOffset:0,undoTimestamp:0,lastPos:0,codeData:"",composing:!1}},watch:{code:{immediate:!0,handler:function(t){this.codeData=t||""}},content:{immediate:!0,handler:function(){var t=this;this.lineNumbers&&this.$nextTick((function(){t.setLineNumbersHeight()}))}},lineNumbers:function(){var t=this;this.$nextTick((function(){t.styleLineNumbers(),t.setLineNumbersHeight()}))}},computed:{content:function(){return s(this.codeData||"",this.language)},lineNumbersCount:function(){var t=this.codeData.split(/\r\n|\n/).length;return this.codeData.endsWith("\n")&&t--,t}},updated:function(){this.selection&&x(this.$refs.pre,this.selection)},mounted:function(){var t=this;this.recordChange(this.getPlain()),this.undoTimestamp=0,this.styleLineNumbers();var e=function(e){e.preventDefault();var n=x(t.$refs.pre),r=(e.originalEvent||e).clipboardData.getData("Text");document.execCommand("insertHTML",!1,a()(r));var i=n.end+r.length;t.selection={start:i,end:i};var o=t.getPlain();t.recordChange(o,t.selection),t.updateContent(o),t.setLineNumbersHeight()},n={"(":")","{":"}","[":"]",'"':'"',"'":"'"},r=function(e){var r=event.key;if(n[r]&&t.selection.start!=t.selection.end){event.preventDefault();var i=[t.code.substr(0,t.selection.start),r,t.code.substring(t.selection.start,t.selection.end),n[r],t.code.substring(t.selection.end)];t.code=i.join(""),t.selection.start+=1,t.selection.end+=1;var o=t.getPlain();t.recordChange(o,t.selection),t.updateContent(o),t.setLineNumbersHeight()}},i=this.$refs.pre;i.addEventListener("paste",e),i.addEventListener("keypress",r),this.$once("hook:beforeDestroy",(function(){i.removeEventListener("paste",e),i.removeEventListener("keypress",r)})),i.addEventListener("compositionstart",(function(){t.composing=!0})),i.addEventListener("compositionend",(function(){t.composing=!1}))},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(this.lineNumbers&&this.autoStyleLineNumbers){var t=this.$refs.pre,e=this.$el.querySelector(".prism-editor__line-numbers"),n=window.getComputedStyle(t);this.$nextTick((function(){var r="border-top-left-radius",i="border-bottom-left-radius";e.style[r]=n[r],e.style[i]=n[i],t.style[r]=0,t.style[i]=0;var o=["background-color","margin-top","padding-top","font-family","font-size","line-height"];o.forEach((function(t){e.style[t]=n[t]})),e.style["margin-bottom"]="-"+n["padding-top"]}))}},handleClick:function(t){this.emitEvents&&this.$emit("editorClick",t),this.undoTimestamp=0,this.selection=x(this.$refs.pre)},getPlain:function(){if(this._innerHTML===this.$refs.pre.innerHTML)return this._plain;var t=v(l(this.$refs.pre.innerHTML));return this._innerHTML=this.$refs.pre.innerHTML,this._plain=t,this._plain},recordChange:function(t,e){if(t!==this.undoStack[this.undoStack.length-1]){this.undoOffset>0&&(this.undoStack=this.undoStack.slice(0,-this.undoOffset),this.undoOffset=0);var n=Date.now(),r={plain:t,selection:e};n-this.undoTimestamp<3e3?this.undoStack[this.undoStack.length-1]=r:(this.undoStack.push(r),this.undoStack.length>50&&this.undoStack.shift()),this.undoTimestamp=n}},updateContent:function(t){this.$emit("change",t),this.$emit("update:code",t)},restoreStackState:function(t){var e=this.undoStack[this.undoStack.length-1-t],n=e.plain,r=e.selection;this.selection=r,this.undoOffset=t,this.updateContent(n)},undo:function(){var t=this.undoOffset+1;t>=this.undoStack.length||this.restoreStackState(t)},redo:function(){var t=this.undoOffset-1;t<0||this.restoreStackState(t)},handleKeyDown:function(t){if(this.emitEvents&&this.$emit("keydown",t),9!==t.keyCode||this.ignoreTabKey)if(8===t.keyCode){var e=x(this.$refs.pre),n=e.start,r=e.end;if(n!==r)return;var i=C(this.$refs.pre.innerText,n);if(i<=0)return;for(var o=0;o<i;o++)document.execCommand("delete",!1);t.preventDefault()}else if(13===t.keyCode){var c=x(this.$refs.pre),a=c.start,u=k(this.$refs.pre.innerText,a);document.execCommand("insertHTML",!1,"\n "+u),document.execCommand("delete",!1),t.preventDefault()}else 90!==t.keyCode||t.metaKey===t.ctrlKey||t.altKey||(t.shiftKey?this.redo():this.undo(),t.preventDefault());else document.execCommand("insertHTML",!1," "),t.preventDefault()},handleKeyUp:function(t){var e=t.which;if(this.composing){if(13!==e)return;this.composing=!1}if(this.code||(this.codeData=t.target.innerText),this.emitEvents&&this.$emit("keyup",t),91!==t.keyCode&&93!==t.keyCode&&(!t.ctrlKey&&!t.metaKey||88===t.keyCode))if(13===t.keyCode&&(this.undoTimestamp=0),this.selection=x(this.$refs.pre),Object.values(T).includes(t.keyCode))this.undoTimestamp=0;else{var n=this.getPlain();this.recordChange(n,this.selection),this.updateContent(n)}}}},E=O;n("b16a");function L(t,e,n,r,i,o,c,a){var u,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),c?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},s._ssrRegister=u):i&&(u=a?function(){i.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(t,e){return u.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:s}}var j=L(E,i,o,!1,null,null,null),P=j.exports;e["default"]=P}})["default"]}));
|