Files
server-configs/siyuan/data/plugins/code-line-highlighter/index.js

1 line
26 KiB
JavaScript
Raw Normal View History

2026-02-13 22:24:27 +08:00
(()=>{"use strict";var e={56(e,t,o){e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},72(e){var t=[];function o(e){for(var o=-1,r=0;r<t.length;r++)if(t[r].identifier===e){o=r;break}return o}function r(e,r){for(var n={},s=[],l=0;l<e.length;l++){var a=e[l],c=r.base?a[0]+r.base:a[0],h=n[c]||0,u="".concat(c," ").concat(h);n[c]=h+1;var d=o(u),g={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==d)t[d].references++,t[d].updater(g);else{var p=i(g,r);r.byIndex=l,t.splice(l,0,{identifier:u,updater:p,references:1})}s.push(u)}return s}function i(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,i){var n=r(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<n.length;s++){var l=o(n[s]);t[l].references--}for(var a=r(e,i),c=0;c<n.length;c++){var h=o(n[c]);0===t[h].references&&(t[h].updater(),t.splice(h,1))}n=a}}},113(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},216(e,t,o){o.r(t),o.d(t,{default:()=>f});var r=o(72),i=o.n(r),n=o(825),s=o.n(n),l=o(659),a=o.n(l),c=o(56),h=o.n(c),u=o(540),d=o.n(u),g=o(113),p=o.n(g),m=o(523),b={};b.styleTagTransform=p(),b.setAttributes=h(),b.insert=a().bind(null,"head"),b.domAPI=s(),b.insertStyleElement=d(),i()(m.A,b);const f=m.A&&m.A.locals?m.A.locals:void 0},314(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",r=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),r&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),r&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,r,i,n){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var l=0;l<this.length;l++){var a=this[l][0];null!=a&&(s[a]=!0)}for(var c=0;c<e.length;c++){var h=[].concat(e[c]);r&&s[h[0]]||(void 0!==n&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=n),o&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=o):h[2]=o),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),t.push(h))}},t}},523(e,t,o){o.d(t,{A:()=>l});var r=o(601),i=o.n(r),n=o(314),s=o.n(n)()(i());s.push([e.id,"/* Code Line Highlighter Plugin Styles */\n\n/* Overlay styling */\n.code-line-highlighter-overlay {\n transition: opacity 0.2s ease;\n}\n\n/* Ensure proper z-index stacking */\n.hl-block .hljs {\n isolation: isolate;\n}\n\n/* Line number highlighting */\n.hl-block .protyle-linenumber__rows span {\n transition: background-color 0.2s ease;\n}\n",""]);const l=s},540(e){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},601(e){e.exports=function(e){return e[1]}},659(e){var t={};e.exports=function(e,o){var r=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},825(e){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var r="";o.supports&&(r+="@supports (".concat(o.supports,") {")),o.media&&(r+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(r+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),r+=o.css,i&&(r+="}"),o.media&&(r+="}"),o.supports&&(r+="}");var n=o.sourceMap;n&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,o)},remove:function(){!function(e){