"use strict";(self.webpackChunkcollab_learning_extension=self.webpackChunkcollab_learning_extension||[]).push([[19,400],{6400:(e,l,n)=>{n.r(l),n.d(l,{JsonView:()=>V,allExpanded:()=>x,collapseAllNested:()=>y,darkStyles:()=>k,defaultStyles:()=>v});var a=n(3345);const t=e=>"boolean"==typeof e||e instanceof Boolean,o=e=>"number"==typeof e||e instanceof Number,c=e=>"bigint"==typeof e||e instanceof BigInt,s=e=>!!e&&e instanceof Date,u=e=>"string"==typeof e||e instanceof String,i=e=>Array.isArray(e),r=e=>e instanceof Object&&null!==e;let d=1;const p=()=>d++;function m(e){let{field:l,value:n,data:t,lastElement:o,openBracket:c,closeBracket:s,level:u,style:i,shouldExpandNode:r,clickToExpandNode:d}=e;const m=(0,a.useRef)(!1),[_,b,E]=function(e){const[l,n]=(0,a.useState)(e());return[l,()=>n((e=>!e)),n]}((()=>r(u,n,l)));(0,a.useEffect)((()=>{m.current?E(r(u,n,l)):m.current=!0}),[r]);const N=_?i.collapseIcon:i.expandIcon,v=_?"collapse JSON":"expand JSON",k=function(){const e=(0,a.useRef)();return void 0===e.current&&(e.current=`:jsnvw:${p()}:`),e.current}(),x=u+1,y=t.length-1,V=e=>{" "===e.key&&(e.preventDefault(),b())};return(0,a.createElement)("div",{className:i.basicChildStyle,role:"list"},(0,a.createElement)("span",{className:N,onClick:b,onKeyDown:V,role:"button",tabIndex:0,"aria-label":v,"aria-expanded":_,"aria-controls":_?k:void 0}),l&&(d?(0,a.createElement)("span",{className:i.clickableLabel,onClick:b,onKeyDown:V,role:"button",tabIndex:-1},l,":"):(0,a.createElement)("span",{className:i.label},l,":")),(0,a.createElement)("span",{className:i.punctuation},c),_?(0,a.createElement)("div",{id:k},t.map(((e,l)=>(0,a.createElement)(f,{key:e[0]||l,field:e[0],value:e[1],style:i,lastElement:l===y,level:x,shouldExpandNode:r,clickToExpandNode:d})))):(0,a.createElement)("span",{className:i.collapsedContent,onClick:b,onKeyDown:V,role:"button",tabIndex:-1,"aria-hidden":!0,"aria-label":v,"aria-expanded":_}),(0,a.createElement)("span",{className:i.punctuation},s),!o&&(0,a.createElement)("span",{className:i.punctuation},","))}function _(e){let{field:l,value:n,style:a,lastElement:t,shouldExpandNode:o,clickToExpandNode:c,level:s}=e;return m({field:l,value:n,lastElement:t||!1,level:s,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:o,clickToExpandNode:c,data:Object.keys(n).map((e=>[e,n[e]]))})}function b(e){let{field:l,value:n,style:a,lastElement:t,level:o,shouldExpandNode:c,clickToExpandNode:s}=e;return m({field:l,value:n,lastElement:t||!1,level:o,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:c,clickToExpandNode:s,data:n.map((e=>[void 0,e]))})}function E(e){let{field:l,value:n,style:i,lastElement:r}=e,d=n,p=i.otherValue;return null===n?(d="null",p=i.nullValue):void 0===n?(d="undefined",p=i.undefinedValue):u(n)?(d=i.noQuotesForStringValues?n:`"${n}"`,p=i.stringValue):t(n)?(d=n?"true":"false",p=i.booleanValue):o(n)?(d=n.toString(),p=i.numberValue):c(n)?(d=`${n.toString()}n`,p=i.numberValue):d=s(n)?n.toISOString():n.toString(),""===l&&(l='""'),(0,a.createElement)("div",{className:i.basicChildStyle,role:"listitem"},l&&(0,a.createElement)("span",{className:i.label},l,":"),(0,a.createElement)("span",{className:p},d),!r&&(0,a.createElement)("span",{className:i.punctuation},","))}function f(e){const l=e.value;return i(l)?(0,a.createElement)(b,Object.assign({},e)):r(l)&&!s(l)?(0,a.createElement)(_,Object.assign({},e)):(0,a.createElement)(E,Object.assign({},e))}var N="_2bkNM";const v={container:"_2IvMF _GzYRV",basicChildStyle:N,label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1},k={container:"_11RoI _GzYRV",basicChildStyle:N,label:"_2bSDX",clickableLabel:"_1RQEj _2bSDX _1MFti",nullValue:"_LaAZe",undefinedValue:"_GTKgm",stringValue:"_Chy1W",booleanValue:"_2vRm-",numberValue:"_2bveF",otherValue:"_1prJR",punctuation:"_gsbQL _3eOF8",collapseIcon:"_3QHg2 _f10Tu _1MFti _1LId0",expandIcon:"_17H2C _f10Tu _1MFti _1UmXx",collapsedContent:"_3fDAz _1pNG9 _1MFti",noQuotesForStringValues:!1},x=()=>!0,y=e=>e<1,V=e=>{let{data:l,style:n=v,shouldExpandNode:t=x,clickToExpandNode:o=!1}=e;return(0,a.createElement)("div",{className:n.container},(0,a.createElement)(f,{value:l,style:n,lastElement:!0,level:0,shouldExpandNode:t,clickToExpandNode:o}))}}}]);