PageSourceSearch

https://www.iucv.com/plugins/shiki/assets/static/dist-BYocTvpR.js

js iucv.com collected 2026-10-04 01:42:24 UTC 4,879 bytes, 1 lines download raw bytes

1var e=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function t(e,t,i){let l=[];for(let s of e){if("v3"===i){let e=s.children.flatMap((e,t)=>{if("element"!==e.type)return e;let i=e.children[0];if("text"!==i.type)return e;let n=t===s.children.length-1;if(!r(i.value,n))return e;let l=i.value.split(/(\s+\/\/)/);if(l.length<=1)return e;let o=[l[0]];for(let e=1;e<l.length;e+=2)o.push(l[e]+(l[e+1]||""));return o=o.filter(Boolean),o.length<=1?e:o.map(t=>({...e,children:[{type:"text",value:t}]}))});e.length!==s.children.length&&(s.children=e)}let e=s.children,o=e.length-1;"v1"===i?o=0:t&&(o=e.length-2);for(let i=Math.max(o,0);i<e.length;i++){let o=e[i];if("element"!==o.type)continue;let a=o.children.at(0);if("text"!==a?.type)continue;let c=i===e.length-1,h=r(a.value,c);if(!h&&i>0&&a.value.trim().startsWith("[!code")){let t=e[i-1];if("element"===t?.type){let i=t.children.at(0);if("text"===i?.type&&i.value.includes("//")){let n=r(i.value+a.value,c);if(n){h=n,l.push({info:n,line:s,token:t,isLineCommentOnly:2===e.length&&1===t.children.length&&1===o.children.length,isJsxStyle:!1,additionalTokens:[o]});continue}}}}if(h)if(t&&!c&&0!==i){let t=n(e[i-1],"{")&&n(e[i+1],"}");l.push({info:h,line:s,token:o,isLineCommentOnly:3===e.length&&1===o.children.length,isJsxStyle:t,additionalTokens:void 0})}else l.push({info:h,line:s,token:o,isLineCommentOnly:1===e.length&&1===o.children.length,isJsxStyle:!1,additionalTokens:void 0})}}return l}function n(e,t){if("element"!==e.type)return!1;let i=e.children[0];return"text"===i.type&&i.value.trim()===t}function r(t,i){let n=t.trimStart(),l=t.length-n.length;n=n.trimEnd();let s=t.length-n.length-l;for(let[t,r]of e){if(r&&!i)continue;let e=t.exec(n);if(e)return[" ".repeat(l)+e[1],e[2],e[3]?e[3]+" ".repeat(s):void 0]}}function i(e){let t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&0===t[1].trim().length?e.slice(0,t.index):e}function a(e,n,l,s){return s??="v3",{name:e,code(e){let r=e.children.filter(e=>"element"===e.type),o=[];e.data??={};let a=e.data;a._shiki_notation??=t(r,["jsx","tsx"].includes(this.options.lang),s);let c=a._shiki_notation;for(let e of c){if(0===e.info[1].length)continue;let t=r.indexOf(e.line);e.isLineCommentOnly&&"v1"!==s&&t++;let a=!1;if(e.info[1]=e.info[1].replace(n,(...i)=>l.call(this,i,e.line,e.token,r,t)?(a=!0,""):i[0]),!a)continue;"v1"===s&&(e.info[1]=i(e.info[1]));let c=0===e.info[1].trim().length;if(c&&(e.info[1]=""),c&&e.isLineCommentOnly)o.push(e.line);else if(c&&e.isJsxStyle)e.line.children.splice(e.line.children.indexOf(e.token)-1,3);else if(c){if(e.additionalTokens)for(let t=e.additionalTokens.length-1;t>=0;t--){let i=e.additionalTokens[t],n=e.line.children.indexOf(i);-1!==n&&e.line.children.splice(n,1)}e.line.children.splice(e.line.children.indexOf(e.token),1)}else{let t=e.token.children[0];if("text"===t.type&&(t.value=e.info.join(""),e.additionalTokens))for(let t of e.additionalTokens){let e=t.children[0];"text"===e?.type&&(e.value="")}}}for(let t of o){let i=e.children.indexOf(t),n=e.children[i+1],l=1;"text"===n?.type&&"\n"===n?.value&&(l=2),e.children.splice(i,l)}}}}function o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function s(e={},t="@shikijs/transformers:notation-map"){let{classMap:i={},classActivePre:n,classActiveCode:l}=e;return a(t,RegExp(`#?\\s*\\[!code (${Object.keys(i).map(o).join("|")})(:\\d+)?\\]`,"gi"),function([e,t,s=":1"],r,o,a,c){let h=Number.parseInt(s.slice(1),10);for(let e=c;e<Math.min(c+h,a.length);e++)this.addClassToHast(a[e],i[t]);return n&&this.addClassToHast(this.pre,n),l&&this.addClassToHast(this.code,l),!0},e.matchAlgorithm)}function c(e={}){let{classLineAdd:t="diff add",classLineRemove:i="diff remove",classActivePre:n="has-diff",classActiveCode:l}=e;return s({classMap:{"++":t,"--":i},classActivePre:n,classActiveCode:l,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function l(e={}){let{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"],info:["highlighted","info"]},classActivePre:i="has-highlighted",classActiveCode:n}=e;return s({classMap:t,classActivePre:i,classActiveCode:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function u(e={}){let{classActiveLine:t="focused",classActivePre:i="has-focused",classActiveCode:n}=e;
1return s({classMap:{focus:t},classActivePre:i,classActiveCode:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-focus")}function d(e={}){let{classActiveLine:t="highlighted",classActivePre:i="has-highlighted",classActiveCode:n}=e;return s({classMap:{highlight:t,hl:t},classActivePre:i,classActiveCode:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}export{c as transformerNotationDiff,l as transformerNotationErrorLevel,u as transformerNotationFocus,d as transformerNotationHighlight};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.