.kotlin.kotlin-compiler-embeddable.2.1.20-Beta1.source-code.custom-formatters.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-compiler-embeddable Show documentation
Show all versions of kotlin-compiler-embeddable Show documentation
the Kotlin compiler embeddable
The newest version!
class e{static create(e,t){return`${e}:${t}`}}class t{static create(t,n,r){const[a,l]=n.reduce(((t,n)=>n instanceof e?[t[0].concat(n),t[1]]:[t[0],t[1].concat(n)]),[[],[]]);return[t,{style:l.join(";"),class:a.join(" ")}].concat(r)}static object(e){return["object",{object:e}]}}function n(e,n){return t.create("span",e,n)}function r(e,n){return t.create("div",e,n)}function a(e,n){return t.create("li",e,n)}function l(e){return t.object(e)}const o={STRING_LITERAL_COLOR:"#FE8D59",KEYWORD_COLOR:"#BFE8CB",NUMBER_LITERAL_COLOR:"#C4EED0",CLASS_IDENTIFIER_COLOR:"#C7C7C7",FIELD_IDENTIFIER_COLOR:"#7CACF8"},u={STRING_LITERAL_COLOR:"#B3271E",KEYWORD_COLOR:"#062E6F",NUMBER_LITERAL_COLOR:"#0C58D0",CLASS_IDENTIFIER_COLOR:"#1F1F1F",FIELD_IDENTIFIER_COLOR:"#0842A0"},c=Symbol("STRING_LITERAL_COLOR"),i=Symbol("KEYWORD_COLOR"),s=Symbol("NUMBER_LITERAL_COLOR"),v=Symbol("CLASS_IDENTIFIER_COLOR"),y=Symbol("FIELD_IDENTIFIER_COLOR");function h(t){const n=window.matchMedia("(prefers-color-scheme: dark)").matches?o:u;return e.create("color",n[t.description])}function A(t){return e.create("padding-left",t)}class f{constructor(e,t){this.header=e,this.body=t}static create(e,t){return new f(e,t)}}function d(e){return n([h(s)],[e.value])}var L=f.create(d);var R=f.create((function(e){return n([h(s)],[e.value+"L"])}));var g=f.create((function(e){return n([h(s)],[e.value+"f"])}));var m=f.create((function(){return n([h(i)],["null"])}));const E="kotlin.String",O="kotlin.Array",I="kotlin.ByteArray",_="kotlin.ShortArray",C="kotlin.IntArray",F="kotlin.LongArray",b="kotlin.UByteArray",$="kotlin.UShortArray",k="kotlin.UIntArray",S="kotlin.ULongArray",T="kotlin.FloatArray",D="kotlin.DoubleArray",N="kotlin.collections.ArrayList",p="kotlin.collections.HashMap",M="kotlin.collections.HashSet",B="(ref ",w="null ";function U(e,t=!1){return`${B}${t?w:""}$${e})`}function j(e){return e.startsWith(B)}function W(e){if(!j(e))return null;const t=e.startsWith(w,5)?10:5;return e.substring(t+1,e.length-1)}function z(){return U(O)}function Y(){return U(O,!0)}const G=new Set(["$_hashCode","$itable","$typeInfo","$vtable"]);var K=f.create((function(e){return n([h(v)],[W(e.type)])}),(function(e){const t=[];for(const r in e.value)G.has(r)||t.push(a([],[n([h(y)],[r.slice(1),": "]),l(e.value[r])]));return r([],t)}));var H=f.create((function(e){return n([h(s)],[e.value])}));var P=f.create((function(e){const t=e.value.$_chars.value;let r='"';for(let e=0;e ",se.get(t)?.header(t)??l(t)])}),(function({value:{key:e,value:t}}){return r([],[a([],[n([h(y)],"key: "),l(e)]),a([],[n([h(y)],"value: "),l(t)])])}));function Z({count:e,lengthFieldName:t}){return r=>{const a=e(r);return n([h(v)],[n([],[W(r.type)," {",n([],[`${t} = ${a}`]),"}"])])}}function ee({elementAt:e,count:t,lengthFieldName:r}){return l=>J({value:{start:0,end:t(l),elementAt:t=>e(l,t)}}).concat([a([],[n([h(y)],[`${r}: `]),d({value:t(l)})])])}const te={lengthFieldName:"length",count:e=>e.value.$storage.value.length,elementAt:(e,t)=>e.value.$storage.value[t]},ne=f.create(Z(te),ee(te)),re={lengthFieldName:"size",count:e=>e.value.$length.value,elementAt:(e,t)=>te.elementAt(e.value.$backing,t)},ae=f.create(Z(re),ee(re)),le={lengthFieldName:"size",count:e=>ue.count(e.value.$backing),elementAt:(e,t)=>te.elementAt(e.value.$backing.value.$keysArray,t)},oe=f.create(Z(le),ee(le)),ue={lengthFieldName:"size",count:e=>e.value.$_size.value,elementAt:(e,t)=>({type:V,value:{key:te.elementAt(e.value.$keysArray,t),value:te.elementAt(e.value.$valuesArray,t)}})},ce=f.create(Z(ue),ee(ue)),ie=new Map([[V,X],[x,Q],[U(E),P],[U(E,!0),P],["i8",L],["i16",L],["i32",L],["i64",R],["f32",g],["f64",H],[z(),ne],[Y(),ne],[z(),ne],[Y(),ne],[U(I),ne],[U(I,!0),ne],[U(b),ne],[U(b,!0),ne],[U(_),ne],[U(_,!0),ne],[U($),ne],[U($,!0),ne],[U(C),ne],[U(C,!0),ne],[U(k),ne],[U(k,!0),ne],[U(F),ne],[U(F,!0),ne],[U(S),ne],[U(S,!0),ne],[U(T),ne],[U(T,!0),ne],[U(D),ne],[U(D,!0),ne],[U(N),ae],[U(N,!0),ae],[U(M),oe],[U(M,!0),oe],[U(p),ce],[U(p,!0),ce]]);var se={get(e){const t=e?.type;if(null==t)return;const n=ie.get(t);return void 0!==n?null===e.value?m:n:j(t)?null===e.value?m:K:void 0}};globalThis.devtoolsFormatters=Array.isArray(globalThis.devtoolsFormatters)?globalThis.devtoolsFormatters:[],globalThis.devtoolsFormatters.push({header(e,t){const n=se.get(e);return n?n.header(e):null},hasBody(e){const t=se.get(e);return void 0!==t?.body},body(e){const t=se.get(e);return t?.body?t.body(e):null}});
© 2015 - 2025 Weber Informatics LLC | Privacy Policy